diff --git a/build/api/errors/throwModificationError.js b/build/api/errors/throwModificationError.js index 90b9171..d25e058 100644 --- a/build/api/errors/throwModificationError.js +++ b/build/api/errors/throwModificationError.js @@ -70,8 +70,8 @@ const throwModificationError = function (error) { }); self.inheritedInstance = erroredInstance; const results = self.invokePostHooks(); - const { type, collection, namespace } = results; - if (type.has(true) || collection.has(true) || namespace.has(true)) { + const { type, collection, } = results; + if (type.has(true) || collection.has(true)) { return; } odp(erroredInstance, 'args', { diff --git a/build/api/errors/throwModificationError.js.map b/build/api/errors/throwModificationError.js.map index 095b47e..e179028 100644 --- a/build/api/errors/throwModificationError.js.map +++ b/build/api/errors/throwModificationError.js.map @@ -1 +1 @@ -{"version":3,"file":"throwModificationError.js","sourceRoot":"","sources":["../../../src/api/errors/throwModificationError.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,iBAAiB,GAEjB,GAAG,qBAAS,CAAC;AAEd,qDAAuD;AACvD,MAAM,EACL,oBAAoB,EACpB,GAAG,oBAAW,CAAC;AAEhB,yBAA4C;AAE5C,oCAAkC;AAClC,MAAM,EACL,uBAAuB,EACvB,GAAG,eAAU,CAAC;AAEf,uCAAoC;AACpC,MAAM,EACL,KAAK,EACL,GAAG,aAAK,CAAC;AAEV,sEAAuE;AAEhE,MAAM,sBAAsB,GAAG,UAAsB,KAAU;IAIrE,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,EACL,QAAQ,EACR,IAAI,EAAE,EACL,KAAK,EAAE,SAAS,EAChB,EACD,IAAI,EACJ,GAAG,IAAI,CAAC;IAMT,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC;IAEvD,IAAK,KAAK,CAAC,eAAe,KAAK,SAAS,EAAG,CAAC;QAE3C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAE,KAAK,CAAC,eAAe,CAAE,CAAC;QAC5C,KAAK,CAAC,OAAO,CAAC,IA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Ae,CAAC;QACxB,CAAC;KACD,CAAE,CAAC;IAEJ,GAAG,CAAE,eAAe,EAAE,SAAS,EAAE;QAChC,GAAG;YACF,OAAO,GAAG,EAAE;gBACX,OAAO,eAAe,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC3C,CAAC,CAAC;QACH,CAAC;KACD,CAAE,CAAC;IAEJ,GAAG,CAAE,eAAe,EAAE,OAAO,EAAE;QAC9B,GAAG;YACF,OAAO,GAAG,EAAE;gBACX,OAAO,KAAK,CAAE,eAAe,CAAE,CAAC;YACjC,CAAC,CAAC;QACH,CAAC;KACD,CAAE,CAAC;IAEJ,MAAM,eAAe,CAAC;AAEvB,CAAC,CAAC;AAzJW,QAAA,sBAAsB,0BAyJjC"} \ No newline at end of file +{"version":3,"file":"throwModificationError.js","sourceRoot":"","sources":["../../../src/api/errors/throwModificationError.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,iBAAiB,GAEjB,GAAG,qBAAS,CAAC;AAEd,qDAAuD;AACvD,MAAM,EACL,oBAAoB,EACpB,GAAG,oBAAW,CAAC;AAEhB,yBAA4C;AAE5C,oCAAkC;AAClC,MAAM,EACL,uBAAuB,EACvB,GAAG,eAAU,CAAC;AAEf,uCAAoC;AACpC,MAAM,EACL,KAAK,EACL,GAAG,aAAK,CAAC;AAEV,sEAAuE;AAEhE,MAAM,sBAAsB,GAAG,UAAsB,KAAU;IAIrE,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,EACL,QAAQ,EACR,IAAI,EAAE,EACL,KAAK,EAAE,SAAS,EAChB,EACD,IAAI,EACJ,GAAG,IAAI,CAAC;IAMT,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,KAAK,CAAC;IAEvD,IAAK,KAAK,CAAC,eAAe,KAAK,SAAS,EAAG,CAAC;QAE3C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAE,KAAK,CAAC,eAAe,C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;QACxB,CAAC;KACD,CAAE,CAAC;IAEJ,GAAG,CAAE,eAAe,EAAE,SAAS,EAAE;QAChC,GAAG;YACF,OAAO,GAAG,EAAE;gBACX,OAAO,eAAe,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC3C,CAAC,CAAC;QACH,CAAC;KACD,CAAE,CAAC;IAEJ,GAAG,CAAE,eAAe,EAAE,OAAO,EAAE;QAC9B,GAAG;YACF,OAAO,GAAG,EAAE;gBACX,OAAO,KAAK,CAAE,eAAe,CAAE,CAAC;YACjC,CAAC,CAAC;QACH,CAAC;KACD,CAAE,CAAC;IAEJ,MAAM,eAAe,CAAC;AAEvB,CAAC,CAAC;AAxJW,QAAA,sBAAsB,0BAwJjC"} \ No newline at end of file diff --git a/build/api/hooks/invokeHook.js.map b/build/api/hooks/invokeHook.js.map index 21e228b..7d6cb4c 100644 --- a/build/api/hooks/invokeHook.js.map +++ b/build/api/hooks/invokeHook.js.map @@ -1 +1 @@ -{"version":3,"file":"invokeHook.js","sourceRoot":"","sources":["../../../src/api/hooks/invokeHook.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,+CAA4C;AAC5C,MAAM,EACL,SAAS,GACT,GAAG,qBAAS,CAAC;AAEd,iDAA8C;AAE9C,yCAAsC;AAE/B,MAAM,UAAU,GAAG,UAAsB,QAAgB,EAAE,IAAgC;IAEjG,MAAM,EACL,IAAI,EACJ,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,EAEJ,OAAO,EACP,GAAG,IAAI,CAAC;IAET,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;IAGpC,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,IAAK,IAAA,SAAG,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAE,EAAG,CAAC;QAMnC,MAAM,EACL,QAAQ,GAER,GAAG,IAAI,CAAC;QAET,MAAM,QAAQ,GAAG;YAChB,IAAI;YACJ,QAAQ;YACR,gBAAgB,EAAG,g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EF,CAAC;IAED,OAAO,iBAAiB,CAAC;AAE1B,CAAC,CAAC;AA9DW,QAAA,UAAU,cA8DrB"} \ No newline at end of file diff --git a/build/api/types/InstanceCreator.d.ts b/build/api/types/InstanceCreator.d.ts index 5812197..945548a 100644 --- a/build/api/types/InstanceCreator.d.ts +++ b/build/api/types/InstanceCreator.d.ts @@ -9,7 +9,6 @@ declare const InstanceCreatorPrototype: { invokePostHooks: (this: any) => { type: any; collection: any; - namespace: any; }; throwModificationError: (this: any, error: any) => void; }; diff --git a/build/api/types/InstanceCreator.js b/build/api/types/InstanceCreator.js index 265e015..3df87dd 100644 --- a/build/api/types/InstanceCreator.js +++ b/build/api/types/InstanceCreator.js @@ -15,14 +15,13 @@ const obeyConstructor_1 = require("./obeyConstructor"); const createInstanceModificator_1 = require("./createInstanceModificator"); const invokePreHooks = function () { const { type, existentInstance, args, InstanceModificator } = this; - const { namespace, collection, } = type; + const { collection, } = type; const hookData = { type, existentInstance, args, InstanceModificator }; - namespace.invokeHook('preCreation', hookData); collection.invokeHook('preCreation', hookData); type.invokeHook('preCreation', hookData); }; @@ -30,7 +29,7 @@ const invokePostHooks = function () { const creator = this; const { inheritedInstance, } = creator; const { __type__: type, __parent__: existentInstance, __args__: args, } = inheritedInstance; - const { namespace, collection, } = type; + const { collection, } = type; const hookType = inheritedInstance instanceof Error ? 'creationError' : 'postCreation'; const hookData = { @@ -43,7 +42,6 @@ const invokePostHooks = function () { return { type: type.invokeHook(hookType, hookData), collection: collection.invokeHook(hookType, hookData), - namespace: namespace.invokeHook(hookType, hookData) }; }; const postProcessing = function (continuationOf) { diff --git a/build/api/types/InstanceCreator.js.map b/build/api/types/InstanceCreator.js.map index 895e6d0..54fa686 100644 --- a/build/api/types/InstanceCreator.js.map +++ b/build/api/types/InstanceCreator.js.map @@ -1 +1 @@ -{"version":3,"file":"InstanceCreator.js","sourceRoot":"","sources":["../../../src/api/types/InstanceCreator.ts"],"names":[],"mappings":"AACA,YAAY,CAAC;;;AAI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AAE,CAAC;IAE3D,IAAK,WAAW,EAAG,CAAC;QAEnB,IAAI,CAAC;YAEJ,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,mBAAmB,CAAE,GAAG,IAAI,CAAE,CAAC;YAEvD,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC;QAEjC,CAAC;QAAC,OAAQ,KAAK,EAAG,CAAC;YAElB,IAAI,CAAC,sBAAsB,CAAE,KAAK,CAAE,CAAC;QAEtC,CAAC;IAEF,CAAC;SAAM,CAAC;QAEP,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,mBAAmB,CAAE,GAAG,IAAI,CAAE,CAAC;QAEvD,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC;IAEjC,CAAC;IAGD,IAAK,IAAI,CAAC,iBAAiB,YAAY,OAAO,EAAG,CAAC;QAEjD,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAE,IAAI,CAAE,CAAC;QAEvC,GAAG,CAAE,MAAM,EAAE,qBAAqB,EAAE;YACnC,GAAG;gBACF,OAAO,QAAQ,CAAC;YACjB,CAAC;SACD,CAAE,CAAC;QAEJ,OAAO,MAAM,CAAC;IAEf,CAAC;IAED,IAAI,CAAC,cAAc,CAAE,IAAI,CAAE,CAAC;IAE5B,OAAO,IAAI,CAAC,iBAAiB,CAAC;AAE/B,CAAyD,CAAC;AAE1D,MAAM,CAAC,MAAM,CAAE,uBAAe,CAAC,SAAS,EAAE,wBAAwB,CAAE,CAAC"} \ No newline at end of file diff --git a/build/api/types/Mnemosyne.js b/build/api/types/Mnemosyne.js index 813c0a6..f1b4d3b 100644 --- a/build/api/types/Mnemosyne.js +++ b/build/api/types/Mnemosyne.js @@ -90,11 +90,11 @@ const MnemonicaProtoProps = { }); } }; -const Mnemosyne = function (namespace, gaia) { +const Mnemosyne = function (gaia) { const Mnemonica = function () { odp(this, SymbolConstructorName, { get() { - return namespace.name; + return MNEMONICA; } }); }; diff --git a/build/api/types/Mnemosyne.js.map b/build/api/types/Mnemosyne.js.map index 8efab18..72a5d12 100644 --- a/build/api/types/Mnemosyne.js.map +++ b/build/api/types/Mnemosyne.js.map @@ -1 +1 @@ -{"version":3,"file":"Mnemosyne.js","sourceRoot":"","sources":["../../../src/api/types/Mnemosyne.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,qBAAqB,EACrB,UAAU,EACV,iBAAiB,EAEjB,SAAS,EACT,IAAI,EACJ,MAAM,EAEN,GAAG,qBAAS,CAAC;AAEd,oCAAkC;AAClC,MAAM,EACL,cAAc,EACd,wBAAwB,EACxB,GAAG,eAAU,CAAC;AAEf,iDAA8C;AAC9C,+CAA4C;AAC5C,2CAAwC;AAExC,yEAAkE;AAElE,uDAAoD;AAEpD,MAAM,IAAI,GAAG,UAAW,MAAW;IAElC,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzC,MAAM,eAAe,GAAG,cAAc,CAAgC,CAAC;IACvE,eAAe,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAE,SAAS,CAAE,CAAC;IAEvD,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC;IAEjC,GAAG,CAAE,IAAI,EAAE,SAAS,EAAE;QACrB,GAAG;YACF,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;QAChC,CAAC;KACD,CAAE,CAAC;IAEJ,OAAO,IAAI,CAAC;AACb,CAAgC,CAAC;AAGjC,MAAM,mBAAmB,GAAG;IAE3B,OAAO;QACN,OAAO;YACN,OAAO,IAAA,iBAAO,EAAE,IAAI,CAAE,CAAC;QACxB,CAAC,CAAC;IACH,CAAC;IAED,IAAI;QACH,OAAO,UAAsB,GAAG,IAAW;YAC1C,OAAO,IAAA,WAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAE,CAAC;QAC9B,CAAC,CAAC;IAC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EAAE;YAC/B,GAAG;gBACF,OAAO,MAAM,CAAC,IAAI,CAAE,IAAI,CAAE,CAAC;YAC5B,CAAC;SACD,CAAE,CAAC;IACL,CAAC,CAAE,CAAC;IAEJ,MAAM,CAAC,qBAAqB,CAAE,mBAAmB,CAAE,CAAC,OAAO,CAAE,CAAE,MAAc,EAAG,EAAE;QACjF,GAAG,CAAE,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE;YACjC,GAAG;gBACF,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAE,mBAAmB,EAAE,MAAM,CAAE,CAAC;gBAGhE,OAAO,YAAY,CAAC,IAAI,CAAE,IAAI,CAAE,CAAC;YAClC,CAAC;SACD,CAAE,CAAC;IACL,CAAC,CAAE,CAAC;IAGJ,GAAG,CAAE,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE;QAC7C,GAAG;YACF,OAAO,cAAc,CAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAE,CAAC;QAChD,CAAC;KACD,CAAE,CAAC;IAEJ,GAAG,CAAE,SAAS,CAAC,SAAS,EAAE,UAAU,EAAE;QACrC,GAAG;YACF,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAE,CAAC;IAEJ,MAAM,KAAK,GAAG,IAAI,SAAS,EAAE,CAAC;IAE9B,OAAO,CAAC,cAAc,CAAE,IAAI,EAAE,KAAK,CAAE,CAAC;AAEvC,CAAoD,CAAC;AAGrD,kBAAe;IACd,IAAI;IACJ,SAAS;IACT,IAAI,sBAAsB;QACzB,OAAO,MAAM,CAAC,IAAI,CAAE,mBAAmB,CAAE,CAAC;IAC3C,CAAC;CACD,CAAC"} \ No newline at end of file diff --git a/build/api/types/TypeProxy.js b/build/api/types/TypeProxy.js index 8c8c944..9ab2579 100644 --- a/build/api/types/TypeProxy.js +++ b/build/api/types/TypeProxy.js @@ -80,7 +80,7 @@ const makeSubTypeProxy = function (subtype, inheritedInstance) { apply(Target, thisArg = inheritedInstance, _args) { let existentInstance = reflectPrimitiveWrappers(thisArg); if (!existentInstance[SymbolGaia]) { - const gaia = new Mnemosyne(subtype.namespace, new Gaia(existentInstance)); + const gaia = new Mnemosyne(new Gaia(existentInstance)); existentInstance = new Proxy(gaia, { get: gaiaProxyHandlerGet }); @@ -100,7 +100,6 @@ const MnemonicaInstanceProps = [ '__subtypes__', '__stack__', '__collection__', - '__namespace__', '__timestamp__', '__creator__' ].concat(MnemosynePrototypeKeys); @@ -147,7 +146,7 @@ const gaiaProxyHandlerGet = (target, prop, receiver) => { exports.TypeProxy.prototype.construct = function (__, args) { const { __type__: type, Uranus } = this; const uranus = reflectPrimitiveWrappers(Uranus); - const gaia = new Mnemosyne(type.namespace, new Gaia(uranus)); + const gaia = new Mnemosyne(new Gaia(uranus)); const gaiaProxy = new Proxy(gaia, { get: gaiaProxyHandlerGet }); diff --git a/build/api/types/TypeProxy.js.map b/build/api/types/TypeProxy.js.map index 48cf647..ad0c828 100644 --- a/build/api/types/TypeProxy.js.map +++ b/build/api/types/TypeProxy.js.map @@ -1 +1 @@ -{"version":3,"file":"TypeProxy.js","sourceRoot":"","sources":["../../../src/api/types/TypeProxy.ts"],"names":[],"mappings":"AACA,YAAY,CAAC;;;AAIb,+CAA4C;AAC5C,MAAM,EACL,UAAU,GACV,GAAG,qBAAS,CAAC;AAEd,yCAAsC;AAEtC,qDAAuD;AACvD,MAAM,EACL,qBAAqB,GACrB,GAAG,oBAAW,CAAC;AAEhB,oCAAkC;AAClC,MAAM,EACL,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,wBAAwB,GACxB,GAAG,eAAU,CAAC;AAEf,2CAAqC;AACrC,MAAM,EACL,IAAI,EACJ,SAAS,EACT,sBAAsB,EACtB,GAAG,mBAAU,CAAC;AAEf,uDAAoD;AAEvC,QAAA,SAAS,GAAG,UAAW,QAAa,EAAE,MAAW;IAC7D,MAAM,CAAC,MAAM,CAAE,IAAI,EAAE;QACpB,QAAQ;QACR,MAAM;KACN,CAAE,CAA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AM,CAAE,CAAC;IAClD,MAAM,IAAI,GAAG,IAAI,SAAS,CAAE,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI,CAAE,MAAM,CAAE,CAAE,CAAC;IACjE,MAAM,SAAS,GAAG,IAAI,KAAK,CAAE,IAAI,EAAE;QAClC,GAAG,EAAG,mBAAmB;KACzB,CAAE,CAAC;IAEJ,MAAM,QAAQ,GAAG,IAAI,iCAAe,CAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAE,CAAC;IAC9D,OAAO,QAAQ,CAAC;AAEjB,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"TypeProxy.js","sourceRoot":"","sources":["../../../src/api/types/TypeProxy.ts"],"names":[],"mappings":"AACA,YAAY,CAAC;;;AAIb,+CAA4C;AAC5C,MAAM,EACL,UAAU,GACV,GAAG,qBAAS,CAAC;AAEd,yCAAsC;AAEtC,qDAAuD;AACvD,MAAM,EACL,qBAAqB,GACrB,GAAG,oBAAW,CAAC;AAEhB,oCAAkC;AAClC,MAAM,EACL,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,wBAAwB,GACxB,GAAG,eAAU,CAAC;AAEf,2CAAqC;AACrC,MAAM,EACL,IAAI,EACJ,SAAS,EACT,sBAAsB,EACtB,GAAG,mBAAU,CAAC;AAEf,uDAAoD;AAEvC,QAAA,SAAS,GAAG,UAAW,QAAa,EAAE,MAAW;IAC7D,MAAM,CAAC,MAAM,CAAE,IAAI,EAAE;QACpB,QAAQ;QACR,MAAM;KACN,CAAE,CAAC;IACJ,MAAM,SAAS,GAAG,IAAI,KAAK,CAAE,iCAAe,EAAE,IAAI,CAAE,CAAC;IACrD,OAAO,SAAS,CAAC;AAClB,CAA6B,CAAC;AAE9B,iBAAS,CAAC,SAAS,CAAC,GAAG,GAAG,UAAW,MAAW,EAAE,IAAY;IAE7D,MAAM,EACL,QAAQ,EAAE,IAAI,EACd,GAAG,IAAI,CAAC;IAKT,IAAK,IAAI,KAAK,WAAW,EAAG,CAAC;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,CAAC"} \ No newline at end of file diff --git a/build/api/types/addProps.js b/build/api/types/addProps.js index 8f93103..f9be819 100644 --- a/build/api/types/addProps.js +++ b/build/api/types/addProps.js @@ -6,7 +6,7 @@ const { odp, } = constants_1.constants; const addProps = function () { const self = this; const { type, existentInstance, args, config: { submitStack }, __proto_proto__: proto } = self; - const { namespace, collection, subtypes, } = type; + const { collection, subtypes, } = type; odp(proto, '__proto_proto__', { get() { return proto; @@ -22,11 +22,6 @@ const addProps = function () { return collection; } }); - odp(proto, '__namespace__', { - get() { - return namespace; - } - }); odp(proto, '__subtypes__', { get() { return subtypes; diff --git a/build/api/types/addProps.js.map b/build/api/types/addProps.js.map index b6d41c3..a59c12f 100644 --- a/build/api/types/addProps.js.map +++ b/build/api/types/addProps.js.map @@ -1 +1 @@ -{"version":3,"file":"addProps.js","sourceRoot":"","sources":["../../../src/api/types/addProps.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,+CAA4C;AAE5C,MAAM,EACL,GAAG,GACH,GAAG,qBAAS,CAAC;AAEP,MAAM,QAAQ,GAAG;IAGvB,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,EACL,IAAI,EACJ,gBAAgB,EAChB,IAAI,EACJ,MAAM,EAAE,EACP,WAAW,EACX,EACD,eAAe,EAAE,KAAK,EACtB,GAAG,IAAI,CAAC;IAET,MAAM,EACL,SAAS,EACT,UAAU,EACV,QAAQ,GACR,GAAG,IAAI,CAAC;IAET,GAAG,CAAC,KAAK,EAAE,iBAAiB,EAAE;QAC7B,GAAG;YACF,OAAO,KAAK,CAAC;QACd,CAAC;KACD,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE;QACtB,GAAG;YACF,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,EAAE,gBAAgB,EAAE;QAC5B,GAAG;YACF,OAAO,UAAU,CAAC;QACnB,CAAC;KACD,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,EAAE,eAAe,EAAE;QAC3B,GAAG;YACF,OAAO,SAAS,CAAC;QAClB,CAAC;KACD,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,EAAE,cAAc,EAAE;QAC1B,GAAG;YACF,OAAO,QAAQ,CAAC;QACjB,CAAC;KACD,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE;QACtB,GAAG;YACF,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAC,CAAC;IAEH,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE;QACxB,GAAG;YACF,OAAO,gBAAgB,CAAC;QACzB,CAAC;KACD,CAAC,CAAC;IAEH,IAAI,WAAW,EAAE,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE;YACvB,GAAG;gBACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACzB,CAAC;SACD,CAAC,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE;QACzB,GAAG;YACF,OAAO,IAAI,CAAC;QACb,CAAC;KACD,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,GAAG,CAAC,KAAK,EAAE,eAAe,EAAE;QAC3B,GAAG;YACF,OAAO,SAAS,CAAC;QAClB,CAAC;KACD,CAAC,CAAC;AAEJ,CAAC,CAAC;AArFW,QAAA,QAAQ,YAqFnB;AACF,MAAM,CAAC,OAAO,GAAG;IAChB,QAAQ,EAAR,gBAAQ;CACR,CAAC"} \ No newline at end of file +{"version":3,"file":"addProps.js","sourceRoot":"","sources":["../../../src/api/types/addProps.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,+CAA4C;AAE5C,MAAM,EACL,GAAG,GACH,GAAG,qBAAS,CAAC;AAEP,MAAM,QAAQ,GAAG;IAGvB,MA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,GAAG,EAAE,CAAC;IAC7B,GAAG,CAAE,KAAK,EAAE,eAAe,EAAE;QAC5B,GAAG;YACF,OAAO,SAAS,CAAC;QAClB,CAAC;KACD,CAAE,CAAC;AAEL,CAAC,CAAC;AA9EW,QAAA,QAAQ,YA8EnB;AACF,MAAM,CAAC,OAAO,GAAG;IAChB,QAAQ,EAAR,gBAAQ;CACR,CAAC"} \ No newline at end of file diff --git a/build/api/types/index.js b/build/api/types/index.js index e891fcc..9f1e1b8 100644 --- a/build/api/types/index.js +++ b/build/api/types/index.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.lookup = exports.define = void 0; const hop_1 = require("../../utils/hop"); const constants_1 = require("../../constants"); -const { odp, SymbolSubtypeCollection, SymbolConstructorName, SymbolConfig, TYPE_TITLE_PREFIX, MNEMOSYNE, } = constants_1.constants; +const { odp, SymbolParentType, SymbolConstructorName, SymbolConfig, TYPE_TITLE_PREFIX, MNEMOSYNE, } = constants_1.constants; const errors_1 = require("../../descriptors/errors"); const { ALREADY_DECLARED, WRONG_TYPE_DEFINITION, TYPENAME_MUST_BE_A_STRING, HANDLER_MUST_BE_A_FUNCTION, } = errors_1.ErrorsTypes; const hooksApi = require("../hooks"); @@ -13,9 +13,8 @@ const utils_1 = require("../utils"); const { checkProto, getTypeChecker, CreationHandler, getTypeSplitPath, checkTypeName, isClass, } = utils_1.default; const errors_2 = require("../errors"); const TypeDescriptor = function (defineOrigin, types, TypeName, constructHandler, proto, config) { - const parentType = types[SymbolSubtypeCollection] || null; + const parentType = types[SymbolParentType] || null; const isSubType = parentType ? true : false; - const namespace = isSubType ? parentType.namespace : types.namespace; const collection = isSubType ? parentType.collection : types[MNEMOSYNE]; if (types.has(TypeName)) { throw new ALREADY_DECLARED; @@ -33,14 +32,13 @@ const TypeDescriptor = function (defineOrigin, types, TypeName, constructHandler isSubType, subtypes, parentType, - namespace, collection, title, config, hooks: Object.create(null) }); errors_2.getStack.call(this, `Definition of [ ${TypeName} ] made at:`, [], defineOrigin); - odp(subtypes, SymbolSubtypeCollection, { + odp(subtypes, SymbolParentType, { get() { return type; } diff --git a/build/api/types/index.js.map b/build/api/types/index.js.map index 90d67ba..8bf2b08 100644 --- a/build/api/types/index.js.map +++ b/build/api/types/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAIb,yCAAsC;AAEtC,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,uBAAuB,EACvB,qBAAqB,EACrB,YAAY,EAEZ,iBAAiB,EACjB,SAAS,GAET,GAAG,qBAAS,CAAC;AAEd,qDAAuD;AACvD,MAAM,EACL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,GAC1B,GAAG,oBAAW,CAAC;AAKhB,qCAAqC;AACrC,2CAAwC;AAExC,2FAAoF;AAEpF,oCAAkC;AAClC,MAAM,EACL,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,GACP,GAAG,eAAU,CAAC;AAEf,sCAAqC;AAQrC,MAAM,cAAc,GAAG,UAEtB,YAA8B,EAC9B,KAAU,EACV,QAAgB,EAChB,gBAAkC,EAClC,KAAiC,EACjC,MAAkC;IAKlC,MAAM,UAAU,GAAG,KAAK,CAAE,uBAAuB,CAAE,IAAI,IAAI,CAAC;IAE5D,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAE5C,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;IACrE,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAE,SAAS,CAAE,CAAC;IAE1E,IAAK,KAAK,CAAC,GAAG,CAAE,QAA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,IAAK,CAAC,cAAc,CAAC,MAAM,EAAG,CAAC;QAC9B,MAAM,IAAI,qBAAqB,CAAE,oCAAoC,CAAE,CAAC;IACzE,CAAC;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAE,cAAc,CAAE,CAAC;IAEjD,MAAM,CAAE,IAAI,CAAE,GAAG,KAAK,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAE,IAAI,CAAE,CAAC;IAC9B,IAAK,KAAK,CAAC,MAAM,KAAK,CAAC,EAAG,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAE,CAAC,CAAE,CAAC,IAAI,CAAE,GAAG,CAAE,CAAC;IACpD,OAAO,cAAM,CAAC,IAAI,CAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAE,CAAC;AAErD,CAAC,CAAC;AArBW,QAAA,MAAM,UAqBjB"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAIb,yCAAsC;AAEtC,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EAEZ,iBAAiB,EACjB,SAAS,GAET,GAAG,qBAAS,CAAC;AAEd,qDAAuD;AAGvD,MAAM,EACL,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,GAC1B,GAAG,oBAAW,CAAC;AAKhB,qCAAqC;AACrC,2CAAwC;AAExC,2FAAoF;AAEpF,oCAAkC;AAClC,MAAM,EACL,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,GACP,GAAG,eAAU,CAAC;AAEf,sCAAqC;AAErC,MAAM,cAAc,GAAG,UAEtB,YAA8B,EAC9B,KAAU,EACV,QAAgB,EAChB,gBAAkC,EAClC,KAAiC,EACjC,MAAkC;IAKl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AE,MAAM,CAAE,CAAC;IAEpF,CAAC;IAED,MAAM,IAAI,qBAAqB,CAAE,4BAA4B,CAAE,CAAC;AAEjE,CAAC,CAAC;AA1CW,QAAA,MAAM,UA0CjB;AAEK,MAAM,MAAM,GAAQ,UAAsB,cAAsB;IAEtE,IAAK,OAAO,cAAc,KAAK,QAAQ,EAAG,CAAC;QAC1C,MAAM,IAAI,qBAAqB,CAAE,yCAAyC,CAAE,CAAC;IAC9E,CAAC;IAED,IAAK,CAAC,cAAc,CAAC,MAAM,EAAG,CAAC;QAC9B,MAAM,IAAI,qBAAqB,CAAE,oCAAoC,CAAE,CAAC;IACzE,CAAC;IAED,MAAM,KAAK,GAAG,gBAAgB,CAAE,cAAc,CAAE,CAAC;IAEjD,MAAM,CAAE,IAAI,CAAE,GAAG,KAAK,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAE,IAAI,CAAE,CAAC;IAC9B,IAAK,KAAK,CAAC,MAAM,KAAK,CAAC,EAAG,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAE,CAAC,CAAE,CAAC,IAAI,CAAE,GAAG,CAAE,CAAC;IACpD,OAAO,cAAM,CAAC,IAAI,CAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAE,CAAC;AAErD,CAAC,CAAC;AArBW,QAAA,MAAM,UAqBjB"} \ No newline at end of file diff --git a/build/constants/index.d.ts b/build/constants/index.d.ts index 5c246db..1ba5eac 100644 --- a/build/constants/index.d.ts +++ b/build/constants/index.d.ts @@ -1,9 +1,8 @@ export declare const constants: { - readonly SymbolSubtypeCollection: symbol; + readonly SymbolParentType: symbol; readonly SymbolConstructorName: symbol; readonly SymbolGaia: symbol; readonly SymbolReplaceGaia: symbol; - readonly SymbolDefaultNamespace: symbol; readonly SymbolDefaultTypesCollection: symbol; readonly SymbolConfig: symbol; readonly SymbolUsed: symbol; @@ -12,6 +11,8 @@ export declare const constants: { readonly GAIA: string; readonly URANUS: string; readonly odp: (o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType) => any; + readonly defaultOptions: Record; + readonly defaultOptionsKeys: string[]; TYPE_TITLE_PREFIX: string; ErrorMessages: { BASE_ERROR_MESSAGE: string; @@ -26,8 +27,6 @@ export declare const constants: { MISSING_HOOK_CALLBACK: string; MISSING_CALLBACK_ARGUMENT: string; FLOW_CHECKER_REDEFINITION: string; - NAMESPACE_DOES_NOT_EXIST: string; - ASSOCIATION_EXISTS: string; OPTIONS_ERROR: string; WRONG_STACK_CLEANER: string; PROTOTYPE_USED_TWICE: string; diff --git a/build/constants/index.js b/build/constants/index.js index 8a806e4..860cadf 100644 --- a/build/constants/index.js +++ b/build/constants/index.js @@ -5,9 +5,8 @@ const MNEMONICA = 'Mnemonica'; const MNEMOSYNE = 'Mnemosyne'; const GAIA = 'Gaia'; const URANUS = 'Uranus'; -const SymbolDefaultNamespace = Symbol(`default ${MNEMONICA} namespace`); const SymbolDefaultTypesCollection = Symbol(`default ${MNEMONICA} types collection`); -const SymbolSubtypeCollection = Symbol('SubType Collection'); +const SymbolParentType = Symbol('Parent of this SubType Collection'); const SymbolConstructorName = Symbol('Defined Constructor Name'); const SymbolGaia = Symbol('Defined Gaia Constructor'); const SymbolReplaceGaia = Symbol('Defined Method Name to Replace Gaia'); @@ -27,15 +26,31 @@ const ErrorMessages = { MISSING_HOOK_CALLBACK: 'hook definition requires callback', MISSING_CALLBACK_ARGUMENT: 'callback is required argument', FLOW_CHECKER_REDEFINITION: 'attempt to re-define flow checker callback', - NAMESPACE_DOES_NOT_EXIST: 'namespace does not exits', - ASSOCIATION_EXISTS: 'association is already made', OPTIONS_ERROR: 'options must be an object or a string', WRONG_STACK_CLEANER: 'wrong stack cleaner instanceof', PROTOTYPE_USED_TWICE: '.prototype used twice', }; +const createInstanceModificator_1 = require("../api/types/createInstanceModificator"); +const defaultOptions = { + get ModificationConstructor() { + return createInstanceModificator_1.default; + }, + get strictChain() { + return true; + }, + get blockErrors() { + return true; + }, + get submitStack() { + return false; + }, + get awaitReturn() { + return true; + }, +}; exports.constants = { - get 'SymbolSubtypeCollection'() { - return SymbolSubtypeCollection; + get 'SymbolParentType'() { + return SymbolParentType; }, get 'SymbolConstructorName'() { return SymbolConstructorName; @@ -46,9 +61,6 @@ exports.constants = { get 'SymbolReplaceGaia'() { return SymbolReplaceGaia; }, - get 'SymbolDefaultNamespace'() { - return SymbolDefaultNamespace; - }, get 'SymbolDefaultTypesCollection'() { return SymbolDefaultTypesCollection; }, @@ -75,6 +87,12 @@ exports.constants = { return Object.defineProperty(o, p, attributes); }; }, + get 'defaultOptions'() { + return defaultOptions; + }, + get 'defaultOptionsKeys'() { + return Object.keys(defaultOptions); + }, TYPE_TITLE_PREFIX, ErrorMessages, }; diff --git a/build/constants/index.js.map b/build/constants/index.js.map index 3d610d1..b792875 100644 --- a/build/constants/index.js.map +++ b/build/constants/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,MAAM,SAAS,GAAG,WAAW,CAAC;AAK9B,MAAM,SAAS,GAAG,WAAW,CAAC;AAI9B,MAAM,IAAI,GAAG,MAAM,CAAC;AACpB,MAAM,MAAM,GAAG,QAAQ,CAAC;AAIxB,MAAM,sBAAsB,GAAG,MAAM,CAAE,WAAW,SAAS,YAAY,CAAE,CAAC;AAC1E,MAAM,4BAA4B,GAAG,MAAM,CAAE,WAAW,SAAS,mBAAmB,CAAE,CAAC;AACvF,MAAM,uBAAuB,GAAG,MAAM,CAAE,oBAAoB,CAAE,CAAC;AAC/D,MAAM,qBAAqB,GAAG,MAAM,CAAE,0BAA0B,CAAE,CAAC;AACnE,MAAM,UAAU,GAAG,MAAM,CAAE,0BAA0B,CAAE,CAAC;AACxD,MAAM,iBAAiB,GAAG,MAAM,CAAE,qCAAqC,CAAE,CAAC;AAE1E,MAAM,YAAY,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S,CAAC;IAClB,CAAC;IACD,IAAI,MAAM;QACT,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI,QAAQ;QACX,OAAO,MAAM,CAAC;IACf,CAAC;IACD,IAAI,KAAK;QACR,OAAO,CAAE,CAAM,EAAE,CAAc,EAAE,UAA8C,EAAQ,EAAE;YACxF,OAAO,MAAM,CAAC,cAAc,CAAE,CAAC,EAAE,CAAC,EAAE,UAAU,CAAE,CAAC;QAClD,CAAC,CAAC;IACH,CAAC;IAED,iBAAiB;IAEjB,aAAa;CAEb,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,MAAM,SAAS,GAAG,WAAW,CAAC;AAK9B,MAAM,SAAS,GAAG,WAAW,CAAC;AAI9B,MAAM,IAAI,GAAG,MAAM,CAAC;AACpB,MAAM,MAAM,GAAG,QAAQ,CAAC;AAGxB,MAAM,4BAA4B,GAAG,MAAM,CAAE,WAAW,SAAS,mBAAmB,CAAE,CAAC;AACvF,MAAM,gBAAgB,GAAG,MAAM,CAAE,mCAAmC,CAAE,CAAC;AACvE,MAAM,qBAAqB,GAAG,MAAM,CAAE,0BAA0B,CAAE,CAAC;AACnE,MAAM,UAAU,GAAG,MAAM,CAAE,0BAA0B,CAAE,CAAC;AACxD,MAAM,iBAAiB,GAAG,MAAM,CAAE,qCAAqC,CAAE,CAAC;AAE1E,MAAM,YAAY,GAAG,MAAM,CAAE,uBAAuB,CAAE,CAAC;AACvD,MAAM,UAAU,GAAG,MAAM,CAAE,uBAAuB,CAAE,CAAC;AAGrD,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAG9C,MAAM,aAAa,GAAG;IAErB,kBAAkB,EAAW,yBAAyB;IACtD,yBAAyB,EAAI,2BAA2B;IACxD,0BAA0B,EAAG,4BAA4B;IACzD,qBAAqB,EAAQ,uBAAuB;IACpD,yBAAyB,EAAI,2BAA2B;IACxD,0BA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,CAAC;IACD,IAAI,KAAK;QACR,OAAO,CAAE,CAAM,EAAE,CAAc,EAAE,UAA8C,EAAQ,EAAE;YACxF,OAAO,MAAM,CAAC,cAAc,CAAE,CAAC,EAAE,CAAC,EAAE,UAAU,CAAE,CAAC;QAClD,CAAC,CAAC;IACH,CAAC;IAED,IAAI,gBAAgB;QACnB,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,IAAI,oBAAoB;QACvB,OAAO,MAAM,CAAC,IAAI,CAAE,cAAc,CAAE,CAAC;IACtC,CAAC;IAED,iBAAiB;IAEjB,aAAa;CAEb,CAAC"} \ No newline at end of file diff --git a/build/descriptors/index.d.ts b/build/descriptors/index.d.ts index 7696928..0463fa4 100644 --- a/build/descriptors/index.d.ts +++ b/build/descriptors/index.d.ts @@ -1 +1,7 @@ -export declare const descriptors: any; +export declare const descriptors: { + ErrorsTypes: { + [index: string]: any; + }; + createTypesCollection: (config?: {}) => any; + defaultTypes: any; +}; diff --git a/build/descriptors/index.js b/build/descriptors/index.js index a426e04..5fb3333 100644 --- a/build/descriptors/index.js +++ b/build/descriptors/index.js @@ -2,7 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.descriptors = void 0; const errors_1 = require("./errors"); -const namespaces_1 = require("./namespaces"); const types_1 = require("./types"); -exports.descriptors = Object.assign(Object.assign(Object.assign({}, namespaces_1.namespaces), types_1.types), { ErrorsTypes: errors_1.ErrorsTypes }); +exports.descriptors = Object.assign(Object.assign({}, types_1.types), { ErrorsTypes: errors_1.ErrorsTypes }); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/descriptors/index.js.map b/build/descriptors/index.js.map index eb3c6f3..6de2286 100644 --- a/build/descriptors/index.js.map +++ b/build/descriptors/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAKb,qCAAuC;AACvC,6CAA0C;AAC1C,mCAAgC;AAEnB,QAAA,WAAW,iDAOpB,uBAAU,GAIV,aAAK,KAER,WAAW,EAAX,oBAAW,IAEV"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/descriptors/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,qCAAuC;AACvC,mCAEiB;AAGJ,QAAA,WAAW,mCAEpB,aAAK,KAER,WAAW,EAAX,oBAAW,IAEV"} \ No newline at end of file diff --git a/build/descriptors/namespaces/index.d.ts b/build/descriptors/namespaces/index.d.ts deleted file mode 100644 index 8893901..0000000 --- a/build/descriptors/namespaces/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const namespaces: any; diff --git a/build/descriptors/namespaces/index.js b/build/descriptors/namespaces/index.js deleted file mode 100644 index 87db04c..0000000 --- a/build/descriptors/namespaces/index.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.namespaces = void 0; -const constants_1 = require("../../constants"); -const { odp, MNEMONICA, SymbolDefaultNamespace, SymbolConfig, } = constants_1.constants; -const errors_1 = require("../../descriptors/errors"); -const { OPTIONS_ERROR, } = errors_1.ErrorsTypes; -const hooksAPI = require("../../api/hooks"); -const __1 = require("../"); -const createInstanceModificator_1 = require("../../api/types/createInstanceModificator"); -const defaultOptions = { - ModificationConstructor: createInstanceModificator_1.default, - strictChain: true, - blockErrors: true, - submitStack: false, - awaitReturn: true, -}; -const namespaceStorage = new Map(); -const Namespace = function (name, config) { - if (typeof config === 'string') { - config = { - description: config - }; - } - if (!(config instanceof Object)) { - throw new OPTIONS_ERROR; - } - const typesCollections = new Map(); - config = Object.assign({}, defaultOptions, config); - odp(this, SymbolConfig, { - get() { - return config; - } - }); - odp(this, 'name', { - get() { - return name; - }, - enumerable: true - }); - odp(this, 'typesCollections', { - get() { - return typesCollections; - }, - enumerable: true - }); - const hooks = Object.create(null); - odp(this, 'hooks', { - get() { - return hooks; - } - }); - namespaceStorage.set(name, this); -}; -Namespace.prototype = Object.assign({ createTypesCollection(association, config) { - const { createTypesCollection } = __1.descriptors; - return createTypesCollection(this, association, config); - } }, hooksAPI); -const DEFAULT_NAMESPACE = new Namespace(SymbolDefaultNamespace, { - description: `default ${MNEMONICA} namespace` -}); -exports.namespaces = Object.create(null); -odp(exports.namespaces, 'createNamespace', { - get() { - return (name, config = {}) => { - return new Namespace(name, config); - }; - }, - enumerable: true -}); -odp(exports.namespaces, 'namespaces', { - get() { - return namespaceStorage; - }, - enumerable: true -}); -odp(exports.namespaces, 'defaultNamespace', { - get() { - return DEFAULT_NAMESPACE; - }, - enumerable: true -}); -odp(exports.namespaces, SymbolDefaultNamespace, { - get() { - return DEFAULT_NAMESPACE; - } -}); -odp(exports.namespaces, 'defaultOptionsKeys', { - get() { - return Object.keys(defaultOptions); - } -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/descriptors/namespaces/index.js.map b/build/descriptors/namespaces/index.js.map deleted file mode 100644 index 479d8b6..0000000 --- a/build/descriptors/namespaces/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/descriptors/namespaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAOb,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,SAAS,EACT,sBAAsB,EACtB,YAAY,GACZ,GAAG,qBAAS,CAAC;AAEd,qDAAuD;AACvD,MAAM,EACL,aAAa,GACb,GAAG,oBAAW,CAAC;AAEhB,4CAA4C;AAE5C,2BAAkC;AAElC,yFAAgF;AAEhF,MAAM,cAAc,GAAG;IAEtB,uBAAuB,EAAvB,mCAAuB;IAKvB,WAAW,EAAG,IAAI;IAOlB,WAAW,EAAG,IAAI;IAKlB,WAAW,EAAG,KAAK;IAKnB,WAAW,EAAG,IAAI;CAElB,CAAC;AAOF,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;AAEnC,MAAM,SAAS,GAAG,UAAW,IAAqB,EAAE,MAAc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,SAAS,CAAE,sBAAsB,EAAE;IAChE,WAAW,EAAG,WAAW,SAAS,YAAY;CAC9C,CAAE,CAAC;AAGS,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAE,IAAI,CAAE,CAAC;AAEhD,GAAG,CAAE,kBAAU,EAAE,iBAAiB,EAAE;IACnC,GAAG;QACF,OAAO,CAAE,IAAY,EAAE,MAAM,GAAG,EAAE,EAAG,EAAE;YACtC,OAAO,IAAI,SAAS,CAAE,IAAI,EAAE,MAAM,CAAE,CAAC;QACtC,CAAC,CAAC;IACH,CAAC;IACD,UAAU,EAAG,IAAI;CACjB,CAAE,CAAC;AAEJ,GAAG,CAAE,kBAAU,EAAE,YAAY,EAAE;IAC9B,GAAG;QACF,OAAO,gBAAgB,CAAC;IACzB,CAAC;IACD,UAAU,EAAG,IAAI;CACjB,CAAE,CAAC;AAEJ,GAAG,CAAE,kBAAU,EAAE,kBAAkB,EAAE;IACpC,GAAG;QACF,OAAO,iBAAiB,CAAC;IAC1B,CAAC;IACD,UAAU,EAAG,IAAI;CACjB,CAAE,CAAC;AAEJ,GAAG,CAAE,kBAAU,EAAE,sBAAsB,EAAE;IACxC,GAAG;QACF,OAAO,iBAAiB,CAAC;IAC1B,CAAC;CACD,CAAE,CAAC;AAEJ,GAAG,CAAE,kBAAU,EAAE,oBAAoB,EAAE;IACtC,GAAG;QACF,OAAO,MAAM,CAAC,IAAI,CAAE,cAAc,CAAE,CAAC;IACtC,CAAC;CACD,CAAE,CAAC"} \ No newline at end of file diff --git a/build/descriptors/types/index.d.ts b/build/descriptors/types/index.d.ts index cef3736..979cb7a 100644 --- a/build/descriptors/types/index.d.ts +++ b/build/descriptors/types/index.d.ts @@ -1,4 +1,4 @@ export declare const types: { - readonly createTypesCollection: (namespace: any, association: any, config?: {}) => any; + readonly createTypesCollection: (config?: {}) => any; readonly defaultTypes: any; }; diff --git a/build/descriptors/types/index.js b/build/descriptors/types/index.js index 380d152..9905c75 100644 --- a/build/descriptors/types/index.js +++ b/build/descriptors/types/index.js @@ -1,26 +1,25 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.types = void 0; -const hop_1 = require("../../utils/hop"); const constants_1 = require("../../constants"); -const { odp, SymbolConstructorName, SymbolDefaultNamespace, SymbolDefaultTypesCollection, SymbolConfig, MNEMONICA, MNEMOSYNE, } = constants_1.constants; -const errors_1 = require("../../descriptors/errors"); -const { NAMESPACE_DOES_NOT_EXIST, ASSOCIATION_EXISTS, } = errors_1.ErrorsTypes; -const namespaces_1 = require("../namespaces"); -const { [SymbolDefaultNamespace]: defaultNamespace, defaultOptionsKeys } = namespaces_1.namespaces; +const { odp, SymbolConstructorName, SymbolDefaultTypesCollection, SymbolConfig, defaultOptions, defaultOptionsKeys, MNEMONICA, MNEMOSYNE, } = constants_1.constants; const types_1 = require("../../api/types"); const hooksAPI = require("../../api/hooks"); -const proto = Object.assign({ define: types_1.define, - lookup: types_1.lookup }, hooksAPI); -const TypesCollection = function (namespace, config) { +const { registerHook, invokeHook, registerFlowChecker, } = hooksAPI; +const typesCollections = new Map(); +const TypesCollection = function (_config) { const self = this; const subtypes = new Map(); - config = defaultOptionsKeys.reduce((o, key) => { - if (typeof config[key] === typeof namespace[SymbolConfig][key]) { - o[key] = config[key]; + const config = defaultOptionsKeys.reduce((o, key) => { + const value = _config[key]; + const option = defaultOptions[key]; + const t_conf = typeof value; + const t_opts = typeof option; + if (t_conf === t_opts) { + o[key] = value; } else { - o[key] = namespace[SymbolConfig][key]; + o[key] = option; } return o; }, {}); @@ -32,7 +31,7 @@ const TypesCollection = function (namespace, config) { odp(this, Symbol.hasInstance, { get() { return (instance) => { - return instance[SymbolConstructorName] === namespace.name; + return instance[SymbolConstructorName] === MNEMONICA; }; } }); @@ -43,22 +42,12 @@ const TypesCollection = function (namespace, config) { }); odp(subtypes, MNEMOSYNE, { get() { - return namespace.typesCollections.get(self); + return typesCollections.get(self); } }); odp(this, MNEMOSYNE, { get() { - return namespace.typesCollections.get(self); - } - }); - odp(this, 'namespace', { - get() { - return namespace; - } - }); - odp(subtypes, 'namespace', { - get() { - return namespace; + return typesCollections.get(self); } }); const hooks = Object.create(null); @@ -70,14 +59,14 @@ const TypesCollection = function (namespace, config) { }; odp(TypesCollection.prototype, MNEMONICA, { get() { - return this.namespace.typesCollections.get(this); + return typesCollections.get(this); } }); odp(TypesCollection.prototype, 'define', { get() { const { subtypes } = this; return function (...args) { - return proto.define.call(this, subtypes, ...args); + return types_1.define.call(this, subtypes, ...args); }; }, enumerable: true @@ -85,34 +74,34 @@ odp(TypesCollection.prototype, 'define', { odp(TypesCollection.prototype, 'lookup', { get() { return function (...args) { - return proto.lookup.call(this.subtypes, ...args); + return types_1.lookup.call(this.subtypes, ...args); }.bind(this); }, enumerable: true }); odp(TypesCollection.prototype, 'registerHook', { get() { - const proxy = this.namespace.typesCollections.get(this); + const self = this; return function (hookName, hookCallback) { - return proto.registerHook.call(this, hookName, hookCallback); - }.bind(proxy); + return registerHook.call(self, hookName, hookCallback); + }.bind(this); }, enumerable: true }); odp(TypesCollection.prototype, 'invokeHook', { get() { - const proxy = this.namespace.typesCollections.get(this); return function (hookName, hookCallback) { - return proto.invokeHook.call(this, hookName, hookCallback); - }.bind(proxy); + const self = this; + return invokeHook.call(typesCollections.get(self), hookName, hookCallback); + }.bind(this); } }); odp(TypesCollection.prototype, 'registerFlowChecker', { get() { - const proxy = this.namespace.typesCollections.get(this); return function (flowCheckerCallback) { - return proto.registerFlowChecker.call(this, flowCheckerCallback); - }.bind(proxy); + const self = this; + return registerFlowChecker.call(typesCollections.get(self), flowCheckerCallback); + }.bind(this); } }); const typesCollectionProxyHandler = { @@ -134,25 +123,13 @@ const typesCollectionProxyHandler = { } : undefined; } }; -const createTypesCollection = (namespace = defaultNamespace, association, config = {}) => { - if (!(namespace instanceof Object) || - !(0, hop_1.hop)(namespace, 'name') || - !namespaces_1.namespaces.namespaces.has(namespace.name)) { - throw new NAMESPACE_DOES_NOT_EXIST; - } - if (namespace.typesCollections.has(association)) { - throw new ASSOCIATION_EXISTS; - } - const typesCollection = new TypesCollection(namespace, config); +const createTypesCollection = (config = {}) => { + const typesCollection = new TypesCollection(config); const typesCollectionProxy = new Proxy(typesCollection, typesCollectionProxyHandler); - namespace.typesCollections.set(typesCollection, typesCollectionProxy); - namespace.typesCollections.set(typesCollectionProxy, typesCollection); - if (association) { - namespace.typesCollections.set(association, typesCollectionProxy); - } + typesCollections.set(typesCollection, typesCollectionProxy); return typesCollectionProxy; }; -const DEFAULT_TYPES = createTypesCollection(defaultNamespace, SymbolDefaultTypesCollection); +const DEFAULT_TYPES = createTypesCollection(); odp(DEFAULT_TYPES, SymbolDefaultTypesCollection, { get() { return true; @@ -160,8 +137,8 @@ odp(DEFAULT_TYPES, SymbolDefaultTypesCollection, { }); exports.types = { get createTypesCollection() { - return function (namespace, association, config = {}) { - return createTypesCollection(namespace, association, config); + return function (config = {}) { + return createTypesCollection(config); }; }, get defaultTypes() { diff --git a/build/descriptors/types/index.js.map b/build/descriptors/types/index.js.map index b30b747..9fe91ab 100644 --- a/build/descriptors/types/index.js.map +++ b/build/descriptors/types/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/descriptors/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAKb,yCAAsC;AAItC,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,YAAY,EACZ,SAAS,EACT,SAAS,GACT,GAAG,qBAAS,CAAC;AAEd,qDAAuD;AACvD,MAAM,EACL,wBAAwB,EACxB,kBAAkB,GAClB,GAAG,oBAAW,CAAC;AAEhB,8CAA2C;AAE3C,MAAM,EACL,CAAE,sBAAsB,CAAE,EAAE,gBAAgB,EAC5C,kBAAkB,EAClB,GAAG,uBAAU,CAAC;AAGf,2CAAiD;AAEjD,4CAA4C;AAE5C,MAAM,KAAK,mBACV,MAAM,EAAN,cAAM;IACN,MAAM,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;IACjE,MAAM,oBAAoB,GAAG,IAAI,KAAK,CAAE,eAAe,EAAE,2BAA2B,CAAE,CAAC;IAEvF,SAAS,CAAC,gBAAgB,CAAC,GAAG,CAAE,eAAe,EAAE,oBAAoB,CAAE,CAAC;IACxE,SAAS,CAAC,gBAAgB,CAAC,GAAG,CAAE,oBAAoB,EAAE,eAAe,CAAE,CAAC;IAExE,IAAK,WAAW,EAAG,CAAC;QACnB,SAAS,CAAC,gBAAgB,CAAC,GAAG,CAAE,WAAW,EAAE,oBAAoB,CAAE,CAAC;IACrE,CAAC;IAED,OAAO,oBAAoB,CAAC;AAE7B,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,qBAAqB,CAAE,gBAAgB,EAAE,4BAA4B,CAAE,CAAC;AAC9F,GAAG,CAAE,aAAa,EAAE,4BAA4B,EAAE;IACjD,GAAG;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAE,CAAC;AAES,QAAA,KAAK,GAAG;IACpB,IAAI,qBAAqB;QACxB,OAAO,UAAW,SAAc,EAAE,WAAgB,EAAE,MAAM,GAAG,EAAE;YAC9D,OAAO,qBAAqB,CAAE,SAAS,EAAE,WAAW,EAAE,MAAM,CAAE,CAAC;QAChE,CAAC,CAAC;IACH,CAAC;IACD,IAAI,YAAY;QACf,OAAO,aAAa,CAAC;IACtB,CAAC;CAED,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/descriptors/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAMb,+CAA4C;AAC5C,MAAM,EACL,GAAG,EACH,qBAAqB,EACrB,4BAA4B,EAC5B,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,SAAS,GACT,GAAG,qBAAS,CAAC;AAGd,2CAAiD;AAEjD,4CAA4C;AAE5C,MAAM,EACL,YAAY,EACZ,UAAU,EACV,mBAAmB,GACnB,GAAG,QAAQ,CAAC;AAEb,MAAM,gBAAgB,GAAG,IAA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;IAED,wBAAwB,CAAG,MAAW,EAAE,IAAY;QACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAE,IAAI,CAAE,CAAC,CAAC,CAAC;YACpC,YAAY,EAAG,IAAI;YACnB,UAAU,EAAK,IAAI;YACnB,QAAQ,EAAO,KAAK;YACpB,KAAK,EAAU,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAE,IAAI,CAAE;SAC1C,CAAC,CAAC,CAAC,SAAS,CAAC;IACf,CAAC;CACD,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAE,MAAM,GAAG,EAAE,EAAG,EAAE;IAE/C,MAAM,eAAe,GAAG,IAAI,eAAe,CAAE,MAAM,CAAE,CAAC;IACtD,MAAM,oBAAoB,GAAG,IAAI,KAAK,CAAE,eAAe,EAAE,2BAA2B,CAAE,CAAC;IAEvF,gBAAgB,CAAC,GAAG,CAAE,eAAe,EAAE,oBAAoB,CAAE,CAAC;IAE9D,OAAO,oBAAoB,CAAC;AAE7B,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,qBAAqB,EAAE,CAAC;AAC9C,GAAG,CAAE,aAAa,EAAE,4BAA4B,EAAE;IACjD,GAAG;QACF,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAE,CAAC;AAES,QAAA,KAAK,GAAG;IACpB,IAAI,qBAAqB;QACxB,OAAO,UAAW,MAAM,GAAG,EAAE;YAC5B,OAAO,qBAAqB,CAAE,MAAM,CAAE,CAAC;QACxC,CAAC,CAAC;IACH,CAAC;IACD,IAAI,YAAY;QACf,OAAO,aAAa,CAAC;IACtB,CAAC;CAED,CAAC"} \ No newline at end of file diff --git a/build/index.d.ts b/build/index.d.ts index 2250ab7..c3ed90e 100644 --- a/build/index.d.ts +++ b/build/index.d.ts @@ -1,35 +1,6 @@ -import { TypeLookup, IDEF } from './types'; +import { TypeLookup, IDEF, hook, hooksTypes, constructorOptions, Proto, SN, IDefinitorInstance } from './types'; export type { IDEF } from './types'; export declare const defaultTypes: any; -type hooksTypes = 'preCreation' | 'postCreation' | 'creationError'; -type hooksOpts = { - TypeName: string; - args: unknown[]; - existentInstance: object; - inheritedInstance: object; -}; -type hook = { - (opts: hooksOpts): void; -}; -type constructorOptions = { - ModificationConstructor?: CallableFunction; - strictChain?: boolean; - blockErrors?: boolean; - submitStack?: boolean; - awaitReturn?: boolean; -}; -type Proto = Pick> & T; -type SN = Record unknown>; -interface IDefinitorInstance { - new (...arg: unknown[]): { - [key in keyof S]: S[key]; - }; - define: IDefinitor; - registerHook: (hookType: hooksTypes, cb: hook) => void; -} -interface IDefinitor

{ - >, S extends SN & M>(this: unknown, TypeName: SubTypeName, constructHandler: IDEF, proto?: PP, config?: constructorOptions): IDefinitorInstance; -} export declare const define: , S extends SN & N, R extends IDefinitorInstance>(this: unknown, TypeName?: string, constructHandler?: IDEF, proto?: P, config?: constructorOptions) => R; export declare const lookup: TypeLookup; export declare const apply: >(entity: E, Constructor: IDEF, args?: unknown[]) => { [key in keyof S]: S[key]; }; @@ -42,8 +13,10 @@ export declare const registerHook: (Constructor: IDEF, hook export declare const mnemonica: { [index: string]: unknown; }; -export declare const SymbolSubtypeCollection: unknown, SymbolConstructorName: unknown, SymbolGaia: unknown, SymbolReplaceGaia: unknown, SymbolDefaultNamespace: unknown, SymbolDefaultTypesCollection: unknown, SymbolConfig: unknown, MNEMONICA: unknown, MNEMOSYNE: unknown, GAIA: unknown, URANUS: unknown, TYPE_TITLE_PREFIX: unknown, ErrorMessages: unknown, createNamespace: unknown, namespaces: unknown, defaultNamespace: unknown, createTypesCollection: unknown; +export declare const SymbolParentType: unknown, SymbolConstructorName: unknown, SymbolGaia: unknown, SymbolReplaceGaia: unknown, SymbolDefaultTypesCollection: unknown, SymbolConfig: unknown, MNEMONICA: unknown, MNEMOSYNE: unknown, GAIA: unknown, URANUS: unknown, TYPE_TITLE_PREFIX: unknown, ErrorMessages: unknown, createTypesCollection: unknown; export declare const defaultCollection: any; -export declare const errors: any; +export declare const errors: { + [index: string]: any; +}; export { utils } from './utils'; export { defineStackCleaner } from './utils'; diff --git a/build/index.js b/build/index.js index 576ebe5..ad15ab2 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6 +1,6 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); -exports.defineStackCleaner = exports.utils = exports.errors = exports.defaultCollection = exports.createTypesCollection = exports.defaultNamespace = exports.namespaces = exports.createNamespace = exports.ErrorMessages = exports.TYPE_TITLE_PREFIX = exports.URANUS = exports.GAIA = exports.MNEMOSYNE = exports.MNEMONICA = exports.SymbolConfig = exports.SymbolDefaultTypesCollection = exports.SymbolDefaultNamespace = exports.SymbolReplaceGaia = exports.SymbolGaia = exports.SymbolConstructorName = exports.SymbolSubtypeCollection = exports.mnemonica = exports.registerHook = exports.decorate = exports.bind = exports.call = exports.apply = exports.lookup = exports.define = exports.defaultTypes = void 0; +exports.defineStackCleaner = exports.utils = exports.errors = exports.defaultCollection = exports.createTypesCollection = exports.ErrorMessages = exports.TYPE_TITLE_PREFIX = exports.URANUS = exports.GAIA = exports.MNEMOSYNE = exports.MNEMONICA = exports.SymbolConfig = exports.SymbolDefaultTypesCollection = exports.SymbolReplaceGaia = exports.SymbolGaia = exports.SymbolConstructorName = exports.SymbolParentType = exports.mnemonica = exports.registerHook = exports.decorate = exports.bind = exports.call = exports.apply = exports.lookup = exports.define = exports.defaultTypes = void 0; const constants_1 = require("./constants"); const { odp } = constants_1.constants; const errorsApi = require("./api/errors"); @@ -65,7 +65,7 @@ exports.mnemonica = Object.entries(Object.assign(Object.assign(Object.assign({ d }); return acc; }, {}); -exports.SymbolSubtypeCollection = exports.mnemonica.SymbolSubtypeCollection, exports.SymbolConstructorName = exports.mnemonica.SymbolConstructorName, exports.SymbolGaia = exports.mnemonica.SymbolGaia, exports.SymbolReplaceGaia = exports.mnemonica.SymbolReplaceGaia, exports.SymbolDefaultNamespace = exports.mnemonica.SymbolDefaultNamespace, exports.SymbolDefaultTypesCollection = exports.mnemonica.SymbolDefaultTypesCollection, exports.SymbolConfig = exports.mnemonica.SymbolConfig, exports.MNEMONICA = exports.mnemonica.MNEMONICA, exports.MNEMOSYNE = exports.mnemonica.MNEMOSYNE, exports.GAIA = exports.mnemonica.GAIA, exports.URANUS = exports.mnemonica.URANUS, exports.TYPE_TITLE_PREFIX = exports.mnemonica.TYPE_TITLE_PREFIX, exports.ErrorMessages = exports.mnemonica.ErrorMessages, exports.createNamespace = exports.mnemonica.createNamespace, exports.namespaces = exports.mnemonica.namespaces, exports.defaultNamespace = exports.mnemonica.defaultNamespace, exports.createTypesCollection = exports.mnemonica.createTypesCollection; +exports.SymbolParentType = exports.mnemonica.SymbolParentType, exports.SymbolConstructorName = exports.mnemonica.SymbolConstructorName, exports.SymbolGaia = exports.mnemonica.SymbolGaia, exports.SymbolReplaceGaia = exports.mnemonica.SymbolReplaceGaia, exports.SymbolDefaultTypesCollection = exports.mnemonica.SymbolDefaultTypesCollection, exports.SymbolConfig = exports.mnemonica.SymbolConfig, exports.MNEMONICA = exports.mnemonica.MNEMONICA, exports.MNEMOSYNE = exports.mnemonica.MNEMOSYNE, exports.GAIA = exports.mnemonica.GAIA, exports.URANUS = exports.mnemonica.URANUS, exports.TYPE_TITLE_PREFIX = exports.mnemonica.TYPE_TITLE_PREFIX, exports.ErrorMessages = exports.mnemonica.ErrorMessages, exports.createTypesCollection = exports.mnemonica.createTypesCollection; exports.defaultCollection = exports.defaultTypes.subtypes; exports.errors = descriptors_1.descriptors.ErrorsTypes; var utils_1 = require("./utils"); diff --git a/build/index.js.map b/build/index.js.map index 4b7b035..cf8b32d 100644 --- a/build/index.js.map +++ b/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,CAAC;;;AAIb,2CAAwC;AACxC,MAAM,EAAE,GAAG,EAAE,GAAG,qBAAS,CAAC;AAE1B,0CAA0C;AAC1C,+CAA4C;AAK3C,oBAAY,GACT,yBAAW,cAAC;AAE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AS,wBAZZ,kBAAU,GAYP,iBAAS,aAXZ,yBAAiB,GAWd,iBAAS,oBAVZ,oCAA4B,GAUzB,iBAAS,+BATZ,oBAAY,GAST,iBAAS,eARZ,iBAAS,GAQN,iBAAS,YAPZ,iBAAS,GAON,iBAAS,YANZ,YAAI,GAMD,iBAAS,OALZ,cAAM,GAKH,iBAAS,SAJZ,yBAAiB,GAId,iBAAS,oBAHZ,qBAAa,GAGV,iBAAS,gBAFZ,6BAAqB,GAElB,iBAAS,uBAAC;AAGD,QAAA,iBAAiB,GAAG,oBAAY,CAAC,QAAQ,CAAC;AAC1C,QAAA,MAAM,GAAG,yBAAW,CAAC,WAAW,CAAC;AAE9C,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,iCAA6C;AAApC,2GAAA,kBAAkB,OAAA"} \ No newline at end of file diff --git a/build/types/index.d.ts b/build/types/index.d.ts index 15518f6..d269350 100644 --- a/build/types/index.d.ts +++ b/build/types/index.d.ts @@ -13,7 +13,7 @@ export type TypeClass = { new (...args: unknown[]): unknown; define: TypeAbsorber; lookup: TypeLookup; - registerHook: (type: 'preCreation' | 'postCreation' | 'creationError', hook: CallableFunction) => unknown; + registerHook: (type: 'preCreation' | 'postCreation' | 'creationError', hookCb: CallableFunction) => unknown; }; export type TypeAbsorber = (this: unknown, TypeName: string, constructHandler: CallableFunction, proto?: object, config?: object) => TypeClass; export type ITypeAbsorber = (this: unknown, TypeName: string, constructHandler: IDEF, proto?: object, config?: object) => ITypeClass; @@ -22,5 +22,39 @@ export interface ITypeClass { (this: T, ...args: unknown[]): T; define: ITypeAbsorber; lookup: TypeLookup; - registerHook: (type: 'preCreation' | 'postCreation' | 'creationError', hook: CallableFunction) => unknown; + registerHook: (type: 'preCreation' | 'postCreation' | 'creationError', hookCb: CallableFunction) => unknown; } +export type hooksTypes = 'preCreation' | 'postCreation' | 'creationError'; +export type hooksOpts = { + TypeName: string; + args: unknown[]; + existentInstance: object; + inheritedInstance: object; +}; +export type hook = { + (opts: hooksOpts): void; +}; +export type constructorOptions = { + ModificationConstructor?: CallableFunction; + strictChain?: boolean; + blockErrors?: boolean; + submitStack?: boolean; + awaitReturn?: boolean; +}; +export type Proto = Pick> & T; +export type SN = Record unknown>; +export interface IDefinitorInstance { + new (...arg: unknown[]): { + [key in keyof S]: S[key]; + }; + define: IDefinitor; + registerHook: (hookType: hooksTypes, cb: hook) => void; +} +export interface IDefinitor

{ + >, S extends SN & M>(this: unknown, TypeName: SubTypeName, constructHandler: IDEF, proto?: PP, config?: constructorOptions): IDefinitorInstance; +} +export type TypeDescriptorInstance = { + define: CallableFunction; + lookup: CallableFunction; + subtypes: object; +}; diff --git a/package-lock.json b/package-lock.json index 36c197e..5a6b835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "mnemonica", - "version": "0.9.990", + "version": "0.9.991", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mnemonica", - "version": "0.9.989", + "version": "0.9.991", "license": "MIT", "devDependencies": { "@types/jest": "^29.5.14", - "@types/node": "^18.19.67", + "@types/node": "^18.19.70", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "chai": "^4.5.0", @@ -21,12 +21,12 @@ "husky": "^8.0.3", "jest": "^29.7.0", "json5": "^2.2.3", - "lint-staged": "^15.2.10", + "lint-staged": "^15.3.0", "mocha": "^10.8.2", "mocha-lcov-reporter": "^1.3.0", "nyc": "^15.1.0", "ts-jest": "^29.2.5", - "typescript": "^5.7.2" + "typescript": "^5.7.3" }, "engines": { "node": ">=16 <24" @@ -1073,9 +1073,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, "license": "MIT", "dependencies": { @@ -1315,9 +1315,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.67", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.67.tgz", - "integrity": "sha512-wI8uHusga+0ZugNp0Ol/3BqQfEcCCNfojtO6Oou9iVNGPTL6QNSdnUdqq85fRgIorLhLMuPIKpsN98QE9Nh+KQ==", + "version": "18.19.70", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.70.tgz", + "integrity": "sha512-RE+K0+KZoEpDUbGGctnGdkrLFwi1eYKTlIHNl2Um98mUkGsm1u2Ff6Ltd0e8DktTtC98uy7rSj+hO8t/QuLoVQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1719,14 +1719,14 @@ "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" }, "engines": { "node": ">= 0.4" @@ -1788,16 +1788,16 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -1807,16 +1807,16 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -1826,20 +1826,19 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -2059,9 +2058,9 @@ "license": "ISC" }, "node_modules/browserslist": { - "version": "4.24.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", - "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "funding": [ { @@ -2079,9 +2078,9 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001669", - "electron-to-chromium": "^1.5.41", - "node-releases": "^2.0.18", + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.1" }, "bin": { @@ -2196,9 +2195,9 @@ } }, "node_modules/call-bind-apply-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.0.tgz", - "integrity": "sha512-CCKAP2tkPau7D3GE8+V8R6sQubA9R5foIzGp+85EXCVSCivuxBNAWqcpn72PKYiIcqoViv/kcUDpaEIMBVi1lQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", "dev": true, "license": "MIT", "dependencies": { @@ -2209,6 +2208,23 @@ "node": ">= 0.4" } }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2230,9 +2246,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001687", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz", - "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==", + "version": "1.0.30001692", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz", + "integrity": "sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A==", "dev": true, "funding": [ { @@ -2592,15 +2608,15 @@ } }, "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2610,31 +2626,31 @@ } }, "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "is-data-view": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/inspect-js" } }, "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" }, @@ -2827,13 +2843,13 @@ } }, "node_modules/dunder-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", - "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.0", + "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, @@ -2858,9 +2874,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.71", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.71.tgz", - "integrity": "sha512-dB68l59BI75W1BUGVTAEJy45CEVuEGy9qPVVQ8pnHyHMn36PLPPoE1mjLH+lo9rKulO3HC2OhbACI/8tCqJBcA==", + "version": "1.5.79", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.79.tgz", + "integrity": "sha512-nYOxJNxQ9Om4EC88BE4pPoNI8xwSFf8pU/BAeOl4Hh/b/i6V4biTAzwV7pXi3ARKeoYO5JZKMIXTryXSVer5RA==", "dev": true, "license": "ISC" }, @@ -2908,58 +2924,63 @@ } }, "node_modules/es-abstract": { - "version": "1.23.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.5.tgz", - "integrity": "sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==", + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", "object-inspect": "^1.13.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.5", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" }, "engines": { "node": ">= 0.4" @@ -3002,15 +3023,16 @@ } }, "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -3526,9 +3548,9 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -3536,7 +3558,7 @@ "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -3570,9 +3592,9 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", + "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", "dev": true, "license": "ISC", "dependencies": { @@ -3819,16 +3841,18 @@ } }, "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -3891,20 +3915,22 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.5.tgz", - "integrity": "sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "dunder-proto": "^1.0.0", + "call-bind-apply-helpers": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", + "get-proto": "^1.0.0", "gopd": "^1.2.0", "has-symbols": "^1.1.0", - "hasown": "^2.0.2" + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -3923,6 +3949,20 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3937,15 +3977,15 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -4071,11 +4111,14 @@ "license": "MIT" }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4318,29 +4361,30 @@ "license": "ISC" }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -4357,13 +4401,16 @@ "license": "MIT" }, "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.0.tgz", + "integrity": "sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -4402,13 +4449,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.0.tgz", - "integrity": "sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", + "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" }, "engines": { @@ -4432,9 +4479,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, "license": "MIT", "dependencies": { @@ -4448,12 +4495,14 @@ } }, "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", "dev": true, "license": "MIT", "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", "is-typed-array": "^1.1.13" }, "engines": { @@ -4464,13 +4513,14 @@ } }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4490,13 +4540,13 @@ } }, "node_modules/is-finalizationregistry": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.0.tgz", - "integrity": "sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -4529,13 +4579,16 @@ } }, "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -4570,19 +4623,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4594,13 +4634,13 @@ } }, "node_modules/is-number-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.0.tgz", - "integrity": "sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -4631,14 +4671,14 @@ } }, "node_modules/is-regex": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.0.tgz", - "integrity": "sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "gopd": "^1.1.0", + "call-bound": "^1.0.2", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" }, @@ -4663,13 +4703,13 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "call-bound": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -4692,13 +4732,13 @@ } }, "node_modules/is-string": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.0.tgz", - "integrity": "sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "has-tostringtag": "^1.0.2" }, "engines": { @@ -4709,15 +4749,15 @@ } }, "node_modules/is-symbol": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.0.tgz", - "integrity": "sha512-qS8KkNNXUZ/I+nX6QT8ZS1/Yx0A444yhzdTKxCzKkNjQ9sHErBxJnJAgh+f5YhusYECEcjo4XcyH87hn6+ks0A==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "has-symbols": "^1.0.3", - "safe-regex-test": "^1.0.3" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -4727,13 +4767,13 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -4776,27 +4816,30 @@ } }, "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", + "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -5554,9 +5597,9 @@ } }, "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "license": "MIT", "bin": { @@ -5672,22 +5715,22 @@ "license": "MIT" }, "node_modules/lint-staged": { - "version": "15.2.10", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", - "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.3.0.tgz", + "integrity": "sha512-vHFahytLoF2enJklgtOtCtIjZrKD/LoxlaUusd5nh7dWv/dkKQJY74ndFSzxCdv7g0ueGg1ORgTSt4Y9LPZn9A==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "~5.3.0", + "chalk": "~5.4.1", "commander": "~12.1.0", - "debug": "~4.3.6", + "debug": "~4.4.0", "execa": "~8.0.1", - "lilconfig": "~3.1.2", - "listr2": "~8.2.4", + "lilconfig": "~3.1.3", + "listr2": "~8.2.5", "micromatch": "~4.0.8", "pidtree": "~0.6.0", "string-argv": "~0.3.2", - "yaml": "~2.5.0" + "yaml": "~2.6.1" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -5700,9 +5743,9 @@ } }, "node_modules/lint-staged/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "dev": true, "license": "MIT", "engines": { @@ -5712,24 +5755,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/lint-staged/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/lint-staged/node_modules/execa": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", @@ -6110,6 +6135,16 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -6416,9 +6451,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true, "license": "MIT" }, @@ -6729,15 +6764,17 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -6782,13 +6819,14 @@ } }, "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, @@ -6843,6 +6881,24 @@ "node": ">= 0.8.0" } }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -7276,20 +7332,20 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.8.tgz", - "integrity": "sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", - "dunder-proto": "^1.0.0", - "es-abstract": "^1.23.5", + "es-abstract": "^1.23.9", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.2.0", - "which-builtin-type": "^1.2.0" + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -7299,15 +7355,17 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", - "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", "set-function-name": "^2.0.2" }, "engines": { @@ -7348,19 +7406,22 @@ "license": "ISC" }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7514,15 +7575,16 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -7553,16 +7615,33 @@ ], "license": "MIT" }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "is-regex": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -7635,6 +7714,21 @@ "node": ">= 0.4" } }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7659,16 +7753,73 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -7898,16 +8049,19 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7917,16 +8071,20 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8218,32 +8376,32 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.3", "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -8253,19 +8411,19 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.3.tgz", - "integrity": "sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "reflect.getprototypeof": "^1.0.6" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -8306,9 +8464,9 @@ } }, "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -8320,16 +8478,19 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8343,9 +8504,9 @@ "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", "dev": true, "funding": [ { @@ -8364,7 +8525,7 @@ "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -8435,17 +8596,17 @@ } }, "node_modules/which-boxed-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.0.tgz", - "integrity": "sha512-Ei7Miu/AXe2JJ4iNF5j/UphAgRoma4trE6PtisM09bPygb3egMH3YLW/befsWb1A1AxvNSFidOFTB18XtnIIng==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "dev": true, "license": "MIT", "dependencies": { "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.0", - "is-number-object": "^1.1.0", - "is-string": "^1.1.0", - "is-symbol": "^1.1.0" + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" }, "engines": { "node": ">= 0.4" @@ -8455,25 +8616,25 @@ } }, "node_modules/which-builtin-type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.0.tgz", - "integrity": "sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.2", "function.prototype.name": "^1.1.6", "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", - "is-date-object": "^1.0.5", + "is-date-object": "^1.1.0", "is-finalizationregistry": "^1.1.0", "is-generator-function": "^1.0.10", - "is-regex": "^1.1.4", + "is-regex": "^1.2.1", "is-weakref": "^1.0.2", "isarray": "^2.0.5", - "which-boxed-primitive": "^1.0.2", + "which-boxed-primitive": "^1.1.0", "which-collection": "^1.0.2", - "which-typed-array": "^1.1.15" + "which-typed-array": "^1.1.16" }, "engines": { "node": ">= 0.4" @@ -8509,16 +8670,17 @@ "license": "ISC" }, "node_modules/which-typed-array": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", - "integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "for-each": "^0.3.3", - "gopd": "^1.0.1", + "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" }, "engines": { @@ -8644,9 +8806,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", - "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", "dev": true, "license": "ISC", "bin": { diff --git a/package.json b/package.json index 46b313f..2b7759d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mnemonica", - "version": "0.9.990", + "version": "0.9.991", "description": "abstract technique that aids information retention : instance inheritance system", "type": "commonjs", "main": "./build/index.js", @@ -65,7 +65,7 @@ "homepage": "https://github.com/wentout/mnemonica#readme", "devDependencies": { "@types/jest": "^29.5.14", - "@types/node": "^18.19.67", + "@types/node": "^18.19.70", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "chai": "^4.5.0", @@ -76,12 +76,12 @@ "husky": "^8.0.3", "jest": "^29.7.0", "json5": "^2.2.3", - "lint-staged": "^15.2.10", + "lint-staged": "^15.3.0", "mocha": "^10.8.2", "mocha-lcov-reporter": "^1.3.0", "nyc": "^15.1.0", "ts-jest": "^29.2.5", - "typescript": "^5.7.2" + "typescript": "^5.7.3" }, "engines": { "node": ">=16 <24" diff --git a/src/api/errors/throwModificationError.ts b/src/api/errors/throwModificationError.ts index fa3cb77..d6be491 100644 --- a/src/api/errors/throwModificationError.ts +++ b/src/api/errors/throwModificationError.ts @@ -122,11 +122,11 @@ export const throwModificationError = function ( this: any, error: any ) { // is gathering value from deep chain and while comparing it with // assignment operator, then it will not create this property // so we need direct property declaration here ... - odp ( erroredInstance, 'stack', { + odp( erroredInstance, 'stack', { get () { return erroredInstanceStack; } - }); + } ); self.inheritedInstance = erroredInstance; @@ -135,10 +135,9 @@ export const throwModificationError = function ( this: any, error: any ) { const { type, collection, - namespace } = results; - if ( type.has( true ) || collection.has( true ) || namespace.has( true ) ) { + if ( type.has( true ) || collection.has( true ) ) { return; } // if hooks had some interception: stop diff --git a/src/api/hooks/invokeHook.ts b/src/api/hooks/invokeHook.ts index 74cb4c8..4950c10 100644 --- a/src/api/hooks/invokeHook.ts +++ b/src/api/hooks/invokeHook.ts @@ -28,7 +28,6 @@ export const invokeHook = function ( this: any, hookType: string, opts: { [ inde if ( hop( self.hooks, hookType ) ) { // "this" referes to - // namespace, if called from namespaces // type, if called from types const { diff --git a/src/api/types/InstanceCreator.ts b/src/api/types/InstanceCreator.ts index 7056707..2f6e9fd 100644 --- a/src/api/types/InstanceCreator.ts +++ b/src/api/types/InstanceCreator.ts @@ -42,7 +42,6 @@ const invokePreHooks = function ( this: any ) { } = this; const { - namespace, collection, } = type; @@ -53,8 +52,6 @@ const invokePreHooks = function ( this: any ) { InstanceModificator }; - namespace.invokeHook( 'preCreation', hookData ); - collection.invokeHook( 'preCreation', hookData ); type.invokeHook( 'preCreation', hookData ); @@ -77,7 +74,6 @@ const invokePostHooks = function ( this: any ) { } = inheritedInstance; const { - namespace, collection, } = type; @@ -98,8 +94,6 @@ const invokePostHooks = function ( this: any ) { collection : collection.invokeHook( hookType, hookData ), - namespace : namespace.invokeHook( hookType, hookData ) - }; }; diff --git a/src/api/types/Mnemosyne.ts b/src/api/types/Mnemosyne.ts index 4a06c91..5a9a222 100644 --- a/src/api/types/Mnemosyne.ts +++ b/src/api/types/Mnemosyne.ts @@ -155,12 +155,12 @@ const MnemonicaProtoProps = { }; -const Mnemosyne = function ( namespace: any, gaia: any ) { +const Mnemosyne = function ( gaia: any ) { const Mnemonica: any = function ( this: any ) { odp( this, SymbolConstructorName, { get () { - return namespace.name; + return MNEMONICA; } } ); }; diff --git a/src/api/types/TypeProxy.ts b/src/api/types/TypeProxy.ts index 327b8bd..1a3ae55 100644 --- a/src/api/types/TypeProxy.ts +++ b/src/api/types/TypeProxy.ts @@ -146,7 +146,7 @@ const makeSubTypeProxy = function ( subtype: any, inheritedInstance: any ) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore if ( !existentInstance[ SymbolGaia ] ) { - const gaia = new Mnemosyne( subtype.namespace, new Gaia( existentInstance ) ); + const gaia = new Mnemosyne( new Gaia( existentInstance ) ); existentInstance = new Proxy( gaia, { get : gaiaProxyHandlerGet } ); @@ -176,7 +176,6 @@ const MnemonicaInstanceProps = [ '__stack__', '__collection__', - '__namespace__', '__timestamp__', '__creator__' @@ -274,7 +273,7 @@ TypeProxy.prototype.construct = function ( __: any, args: any[] ) { // constructs new Gaia -> new Mnemosyne // 2 build the first instance in chain const uranus = reflectPrimitiveWrappers( Uranus ); - const gaia = new Mnemosyne( type.namespace, new Gaia( uranus ) ); + const gaia = new Mnemosyne( new Gaia( uranus ) ); const gaiaProxy = new Proxy( gaia, { get : gaiaProxyHandlerGet } ); diff --git a/src/api/types/addProps.ts b/src/api/types/addProps.ts index bc8076f..fb16df7 100644 --- a/src/api/types/addProps.ts +++ b/src/api/types/addProps.ts @@ -6,7 +6,7 @@ const { odp, } = constants; -export const addProps = function (this: any): any { +export const addProps = function ( this: any ): any { // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; @@ -22,74 +22,67 @@ export const addProps = function (this: any): any { } = self; const { - namespace, collection, subtypes, } = type; - odp(proto, '__proto_proto__', { + odp( proto, '__proto_proto__', { get () { return proto; } - }); + } ); - odp(proto, '__args__', { + odp( proto, '__args__', { get () { return args; } - }); + } ); - odp(proto, '__collection__', { + odp( proto, '__collection__', { get () { return collection; } - }); + } ); - odp(proto, '__namespace__', { - get () { - return namespace; - } - }); - - odp(proto, '__subtypes__', { + odp( proto, '__subtypes__', { get () { return subtypes; } - }); + } ); - odp(proto, '__type__', { + odp( proto, '__type__', { get () { return type; } - }); + } ); - odp(proto, '__parent__', { + odp( proto, '__parent__', { get () { return existentInstance; } - }); + } ); - if (submitStack) { + if ( submitStack ) { const { stack } = this; - odp(proto, '__stack__', { + odp( proto, '__stack__', { get () { - return stack.join('\n'); + return stack.join( '\n' ); } - }); + } ); } - odp(proto, '__creator__', { + odp( proto, '__creator__', { get () { return self; } - }); + } ); const timestamp = Date.now(); - odp(proto, '__timestamp__', { + odp( proto, '__timestamp__', { get () { return timestamp; } - }); + } ); }; module.exports = { diff --git a/src/api/types/index.ts b/src/api/types/index.ts index ba2d5f4..469fab2 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,13 +1,13 @@ 'use strict'; -import { ConstructorFunction } from '../../types'; +import { ConstructorFunction, TypeDescriptorInstance } from '../../types'; import { hop } from '../../utils/hop'; import { constants } from '../../constants'; const { odp, - SymbolSubtypeCollection, + SymbolParentType, SymbolConstructorName, SymbolConfig, @@ -17,6 +17,8 @@ const { } = constants; import { ErrorsTypes } from '../../descriptors/errors'; +// import { descriptors } from '../../descriptors'; + const { ALREADY_DECLARED, WRONG_TYPE_DEFINITION, @@ -44,12 +46,6 @@ const { import { getStack } from '../errors'; -type TypeDescriptorInstance = { - define: CallableFunction; - lookup: CallableFunction; - subtypes: object; -}; - const TypeDescriptor = function ( this: any, defineOrigin: CallableFunction, @@ -60,13 +56,12 @@ const TypeDescriptor = function ( config: { [ index: string ]: any }, ) { - // here "types" refers to types collection object {} + // here "types" refers to subtypes of type or collection object {} - const parentType = types[ SymbolSubtypeCollection ] || null; + const parentType = types[ SymbolParentType ] || null; const isSubType = parentType ? true : false; - const namespace = isSubType ? parentType.namespace : types.namespace; const collection = isSubType ? parentType.collection : types[ MNEMOSYNE ]; if ( types.has( TypeName ) ) { @@ -75,6 +70,7 @@ const TypeDescriptor = function ( checkProto( proto ); + // const subtypes = descriptors.createTypesCollection(); const subtypes = new Map(); const title = `${TYPE_TITLE_PREFIX}${TypeName}`; @@ -95,7 +91,6 @@ const TypeDescriptor = function ( subtypes, parentType, - namespace, collection, title, @@ -108,7 +103,7 @@ const TypeDescriptor = function ( getStack.call( this, `Definition of [ ${TypeName} ] made at:`, [], defineOrigin ); - odp( subtypes, SymbolSubtypeCollection, { + odp( subtypes, SymbolParentType, { get () { return type; } diff --git a/src/constants/index.ts b/src/constants/index.ts index a5a4dff..35d4a33 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -13,11 +13,9 @@ const MNEMOSYNE = 'Mnemosyne'; const GAIA = 'Gaia'; const URANUS = 'Uranus'; - // symbols -const SymbolDefaultNamespace = Symbol( `default ${MNEMONICA} namespace` ); const SymbolDefaultTypesCollection = Symbol( `default ${MNEMONICA} types collection` ); -const SymbolSubtypeCollection = Symbol( 'SubType Collection' ); +const SymbolParentType = Symbol( 'Parent of this SubType Collection' ); const SymbolConstructorName = Symbol( 'Defined Constructor Name' ); const SymbolGaia = Symbol( 'Defined Gaia Constructor' ); const SymbolReplaceGaia = Symbol( 'Defined Method Name to Replace Gaia' ); @@ -44,17 +42,55 @@ const ErrorMessages = { MISSING_HOOK_CALLBACK : 'hook definition requires callback', MISSING_CALLBACK_ARGUMENT : 'callback is required argument', FLOW_CHECKER_REDEFINITION : 'attempt to re-define flow checker callback', - NAMESPACE_DOES_NOT_EXIST : 'namespace does not exits', - ASSOCIATION_EXISTS : 'association is already made', OPTIONS_ERROR : 'options must be an object or a string', WRONG_STACK_CLEANER : 'wrong stack cleaner instanceof', PROTOTYPE_USED_TWICE : '.prototype used twice', }; +import ModificationConstructor from '../api/types/createInstanceModificator'; + +const defaultOptions = { + + get ModificationConstructor () { + return ModificationConstructor; + }, + + // shall or not we use strict checking + // for creation sub-instances Only from current type + // or we might use up-nested sub-instances from chain + get strictChain () { + return true; + }, + + // should we use forced errors checking + // to make all inherited types errored + // if there is an error somewhere in chain + // disallow instance construction + // if there is an error in prototype chain + get blockErrors () { + return true; + }, + + // if it is necessary to collect stack + // as a __stack__ prototype property + // during the process of instance creation + get submitStack () { + return false; + }, + + // await new Constructor() + // must return value + // optional ./issues/106 + get awaitReturn () { + return true; + }, + +} as Record; + export const constants = { - get 'SymbolSubtypeCollection' () { - return SymbolSubtypeCollection; + get 'SymbolParentType' () { + return SymbolParentType; }, get 'SymbolConstructorName' () { @@ -69,10 +105,6 @@ export const constants = { return SymbolReplaceGaia; }, - get 'SymbolDefaultNamespace' () { - return SymbolDefaultNamespace; - }, - get 'SymbolDefaultTypesCollection' () { return SymbolDefaultTypesCollection; }, @@ -104,6 +136,14 @@ export const constants = { }; }, + get 'defaultOptions' () { + return defaultOptions; + }, + + get 'defaultOptionsKeys' () { + return Object.keys( defaultOptions ); + }, + TYPE_TITLE_PREFIX, ErrorMessages, diff --git a/src/descriptors/index.ts b/src/descriptors/index.ts index 8986a0a..ae5c44c 100644 --- a/src/descriptors/index.ts +++ b/src/descriptors/index.ts @@ -1,23 +1,13 @@ 'use strict'; -// 1. init default namespace -// 2. create default namespace in types - import { ErrorsTypes } from './errors'; -import { namespaces } from './namespaces'; -import { types } from './types'; +import { + types +} from './types'; -export const descriptors = { - // namespaces.createNamespace, - // namespaces.defaultNamespace, - // namespaces.SymbolDefaultNamespace, - // namespaces.defaultOptionsKeys, - // namespaces.namespaces, - ...namespaces, +export const descriptors = { - // types.defaultTypes, - // types.createTypesCollection, ...types, ErrorsTypes diff --git a/src/descriptors/namespaces/index.ts b/src/descriptors/namespaces/index.ts deleted file mode 100644 index bfa63b0..0000000 --- a/src/descriptors/namespaces/index.ts +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -// 1. init default namespace -// 2. create default namespace in types - -import { ConstructorFunction } from '../../types'; - -import { constants } from '../../constants'; -const { - odp, - MNEMONICA, - SymbolDefaultNamespace, - SymbolConfig, -} = constants; - -import { ErrorsTypes } from '../../descriptors/errors'; -const { - OPTIONS_ERROR, -} = ErrorsTypes; - -import * as hooksAPI from '../../api/hooks'; - -import { descriptors } from '../'; - -import ModificationConstructor from '../../api/types/createInstanceModificator'; - -const defaultOptions = { - - ModificationConstructor, - - // shall or not we use strict checking - // for creation sub-instances Only from current type - // or we might use up-nested sub-instances from chain - strictChain : true, - - // should we use forced errors checking - // to make all inherited types errored - // if there is an error somewhere in chain - // disallow instance construction - // if there is an error in prototype chain - blockErrors : true, - - // if it is necessary to collect stack - // as a __stack__ prototype property - // during the process of instance creation - submitStack : false, - - // await new Constructor() - // must return value - // optional ./issues/106 - awaitReturn : true, - -}; - -// namespace storage -// name + namespace config -// future feature : path of namespace -// shortcut for ns of module exports -// inter-mediator -const namespaceStorage = new Map(); - -const Namespace = function ( name: string | symbol, config: object ) { - - if ( typeof config === 'string' ) { - config = { - description : config - }; - } - - if ( !( config instanceof Object ) ) { - throw new OPTIONS_ERROR; - } - - const typesCollections = new Map(); - - config = Object.assign( {}, defaultOptions, config ); - - odp( this, SymbolConfig, { - get () { - return config; - } - } ); - - odp( this, 'name', { - get () { - return name; - }, - enumerable : true - } ); - - odp( this, 'typesCollections', { - get () { - return typesCollections; - }, - enumerable : true - } ); - - const hooks = Object.create( null ); - odp( this, 'hooks', { - get () { - return hooks; - } - } ); - - namespaceStorage.set( name, this ); - -} as ConstructorFunction; - -Namespace.prototype = { - createTypesCollection ( association: unknown, config: object ) { - const { - createTypesCollection - } = descriptors; - return createTypesCollection( this, association, config ); - }, - ...hooksAPI -}; - -const DEFAULT_NAMESPACE = new Namespace( SymbolDefaultNamespace, { - description : `default ${MNEMONICA} namespace` -} ); - - -export const namespaces = Object.create( null ); - -odp( namespaces, 'createNamespace', { - get () { - return ( name: string, config = {} ) => { - return new Namespace( name, config ); - }; - }, - enumerable : true -} ); - -odp( namespaces, 'namespaces', { - get () { - return namespaceStorage; - }, - enumerable : true -} ); - -odp( namespaces, 'defaultNamespace', { - get () { - return DEFAULT_NAMESPACE; - }, - enumerable : true -} ); - -odp( namespaces, SymbolDefaultNamespace, { - get () { - return DEFAULT_NAMESPACE; - } -} ); - -odp( namespaces, 'defaultOptionsKeys', { - get () { - return Object.keys( defaultOptions ); - } -} ); diff --git a/src/descriptors/types/index.ts b/src/descriptors/types/index.ts index 6a5c235..71e83b3 100644 --- a/src/descriptors/types/index.ts +++ b/src/descriptors/types/index.ts @@ -1,60 +1,51 @@ 'use strict'; -// 1. init default namespace -// 2. create default namespace in types - -import { hop } from '../../utils/hop'; - -import { ConstructorFunction } from '../../types'; +import { + ConstructorFunction +} from '../../types'; import { constants } from '../../constants'; const { odp, SymbolConstructorName, - SymbolDefaultNamespace, SymbolDefaultTypesCollection, SymbolConfig, + defaultOptions, + defaultOptionsKeys, MNEMONICA, MNEMOSYNE, } = constants; -import { ErrorsTypes } from '../../descriptors/errors'; -const { - NAMESPACE_DOES_NOT_EXIST, - ASSOCIATION_EXISTS, -} = ErrorsTypes; - -import { namespaces } from '../namespaces'; - -const { - [ SymbolDefaultNamespace ]: defaultNamespace, - defaultOptionsKeys -} = namespaces; - // here is TypesCollection.define() method import { define, lookup } from '../../api/types'; import * as hooksAPI from '../../api/hooks'; -const proto = { - define, - lookup, - ...hooksAPI -}; +const { + registerHook, + invokeHook, + registerFlowChecker, +} = hooksAPI; -const TypesCollection = function ( namespace: any, config: { [ index: string ]: unknown } ) { +const typesCollections = new Map(); + +const TypesCollection = function ( _config: Record ) { // eslint-disable-next-line @typescript-eslint/no-this-alias const self = this; const subtypes = new Map(); - // namespace config is less important than types collection config - config = defaultOptionsKeys.reduce( ( o: { [ index: string ]: any }, key: string ) => { - if ( typeof config[ key ] === typeof namespace[ SymbolConfig ][ key ] ) { - o[ key ] = config[ key ]; + // default config is less important than types collection config + const config = defaultOptionsKeys.reduce( ( o: Record, key: string ) => { + const value = _config[ key ]; + const option = defaultOptions[ key ]; + const t_conf = typeof value; + const t_opts = typeof option; + if ( t_conf === t_opts ) { + o[ key ] = value; } else { - o[ key ] = namespace[ SymbolConfig ][ key ]; + o[ key ] = option; } return o; }, {} ); @@ -68,7 +59,7 @@ const TypesCollection = function ( namespace: any, config: { [ index: string ]: odp( this, Symbol.hasInstance, { get () { return ( instance: any ) => { - return instance[ SymbolConstructorName ] === namespace.name; + return instance[ SymbolConstructorName ] === MNEMONICA; }; } } ); @@ -83,7 +74,7 @@ const TypesCollection = function ( namespace: any, config: { [ index: string ]: odp( subtypes, MNEMOSYNE, { get () { // returning proxy - return namespace.typesCollections.get( self ); + return typesCollections.get( self ); } } ); @@ -91,19 +82,7 @@ const TypesCollection = function ( namespace: any, config: { [ index: string ]: odp( this, MNEMOSYNE, { get () { // returning proxy - return namespace.typesCollections.get( self ); - } - } ); - - odp( this, 'namespace', { - get () { - return namespace; - } - } ); - - odp( subtypes, 'namespace', { - get () { - return namespace; + return typesCollections.get( self ); } } ); @@ -116,12 +95,9 @@ const TypesCollection = function ( namespace: any, config: { [ index: string ]: } as ConstructorFunction; - odp( TypesCollection.prototype, MNEMONICA, { get () { - // returning proxy - return this.namespace.typesCollections.get( this ); - // return this; + return typesCollections.get( this ); } } ); @@ -132,7 +108,7 @@ odp( TypesCollection.prototype, 'define', { } = this; return function ( this: any, ...args: any[] ) { // this - define function of mnemonica interface - return proto.define.call( this, subtypes, ...args ); + return define.call( this, subtypes, ...args ); }; }, enumerable : true @@ -141,7 +117,7 @@ odp( TypesCollection.prototype, 'define', { odp( TypesCollection.prototype, 'lookup', { get () { return function ( this: any, ...args: any[] ) { - return proto.lookup.call( this.subtypes, ...args ); + return lookup.call( this.subtypes, ...args ); }.bind( this ); }, enumerable : true @@ -149,29 +125,34 @@ odp( TypesCollection.prototype, 'lookup', { odp( TypesCollection.prototype, 'registerHook', { get () { - const proxy: unknown = this.namespace.typesCollections.get( this ); - return function ( this: any, hookName: string, hookCallback: CallableFunction ) { - return proto.registerHook.call( this, hookName, hookCallback ); - }.bind( proxy ); + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + return function ( this: unknown, hookName: string, hookCallback: CallableFunction ) { + // return proto.registerHook.call( typesCollections.get( self ), hookName, hookCallback ); + return registerHook.call( self, hookName, hookCallback ); + }.bind( this ); }, enumerable : true } ); odp( TypesCollection.prototype, 'invokeHook', { get () { - const proxy: unknown = this.namespace.typesCollections.get( this ); - return function ( this: any, hookName: string, hookCallback: CallableFunction ) { - return proto.invokeHook.call( this, hookName, hookCallback ); - }.bind( proxy ); + return function ( this: unknown, hookName: string, hookCallback: CallableFunction ) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + // return proto.invokeHook.call( typesCollections.get( self ), hookName, hookCallback ); + return invokeHook.call( typesCollections.get( self ), hookName, hookCallback ); + }.bind( this ); } } ); odp( TypesCollection.prototype, 'registerFlowChecker', { get () { - const proxy: unknown = this.namespace.typesCollections.get( this ); - return function ( this: any, flowCheckerCallback: () => unknown ) { - return proto.registerFlowChecker.call( this, flowCheckerCallback ); - }.bind( proxy ); + return function ( this: unknown, flowCheckerCallback: () => unknown ) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + return registerFlowChecker.call( typesCollections.get( self ), flowCheckerCallback ); + }.bind( this ); } } ); @@ -197,35 +178,18 @@ const typesCollectionProxyHandler = { } }; -const createTypesCollection = ( namespace = defaultNamespace, association: any, config = {} ) => { - - if ( - !( namespace instanceof Object ) || - !hop( namespace, 'name' ) || - !namespaces.namespaces.has( namespace.name ) - ) { - throw new NAMESPACE_DOES_NOT_EXIST; - } +const createTypesCollection = ( config = {} ) => { - if ( namespace.typesCollections.has( association ) ) { - throw new ASSOCIATION_EXISTS; - } - - const typesCollection = new TypesCollection( namespace, config ); + const typesCollection = new TypesCollection( config ); const typesCollectionProxy = new Proxy( typesCollection, typesCollectionProxyHandler ); - namespace.typesCollections.set( typesCollection, typesCollectionProxy ); - namespace.typesCollections.set( typesCollectionProxy, typesCollection ); - - if ( association ) { - namespace.typesCollections.set( association, typesCollectionProxy ); - } + typesCollections.set( typesCollection, typesCollectionProxy ); return typesCollectionProxy; }; -const DEFAULT_TYPES = createTypesCollection( defaultNamespace, SymbolDefaultTypesCollection ); +const DEFAULT_TYPES = createTypesCollection(); odp( DEFAULT_TYPES, SymbolDefaultTypesCollection, { get () { return true; @@ -234,8 +198,8 @@ odp( DEFAULT_TYPES, SymbolDefaultTypesCollection, { export const types = { get createTypesCollection () { - return function ( namespace: any, association: any, config = {} ) { - return createTypesCollection( namespace, association, config ); + return function ( config = {} ) { + return createTypesCollection( config ); }; }, get defaultTypes () { diff --git a/src/index.ts b/src/index.ts index a1752b3..f5fa984 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,17 @@ /* eslint-disable @typescript-eslint/ban-ts-comment, indent, new-cap, space-before-function-paren */ 'use strict'; -import { TypeLookup, IDEF } from './types'; +import { + TypeLookup, + IDEF, + hook, + hooksTypes, + constructorOptions, + Proto, + SN, + IDefinitorInstance +} from './types'; +export type { IDEF } from './types'; import { constants } from './constants'; const { odp } = constants; @@ -9,8 +19,6 @@ const { odp } = constants; import * as errorsApi from './api/errors'; import { descriptors } from './descriptors'; -export type { IDEF } from './types'; - export const { defaultTypes, } = descriptors; @@ -19,76 +27,6 @@ function checkThis ( pointer: typeof mnemonica | typeof exports | unknown ): boo return pointer === mnemonica || pointer === exports; } -type hooksTypes = 'preCreation' | 'postCreation' | 'creationError' -type hooksOpts = { - TypeName: string, - args: unknown[], - existentInstance: object, - inheritedInstance: object, -} -type hook = { - ( opts: hooksOpts ): void -} - -type constructorOptions = { - - // explicit declaration we wish use - // an old style based constructors - // e.g. with prototype described with: - // createInstanceModificator200XthWay - // or more general with: createInstanceModificator - ModificationConstructor?: CallableFunction, - - // shall or not we use strict checking - // for creation sub-instances Only from current type - // or we might use up-nested sub-instances from chain - strictChain?: boolean, - - // should we use forced errors checking - // to make all inherited types errored - // if there is an error somewhere in chain - // disallow instance construction - // if there is an error in prototype chain - blockErrors?: boolean, - - // if it is necessary to collect stack - // as a __stack__ prototype property - // during the process of instance creation - submitStack?: boolean, - - // await new Constructor() - // must return value - // optional ./issues/106 - awaitReturn?: boolean, - -} - - -type Proto = Pick> & T; - -// type Narrowable = -// string | number | boolean | symbol | object | undefined | void | null | []; -// type RN = Record -type SN = Record unknown> - -interface IDefinitorInstance { - new( ...arg: unknown[] ): { - [ key in keyof S ]: S[ key ] - } - define: IDefinitor - registerHook: ( hookType: hooksTypes, cb: hook ) => void -} - -interface IDefinitor

{ - >, S extends SN & M> ( - this: unknown, - TypeName: SubTypeName, - constructHandler: IDEF, - proto?: PP, - config?: constructorOptions, - ): IDefinitorInstance -} - export const define = function < T, // K extends IDEF, @@ -186,11 +124,10 @@ export const mnemonica = Object.entries( { export const { - SymbolSubtypeCollection, + SymbolParentType, SymbolConstructorName, SymbolGaia, SymbolReplaceGaia, - SymbolDefaultNamespace, SymbolDefaultTypesCollection, SymbolConfig, MNEMONICA, @@ -199,9 +136,6 @@ export const { URANUS, TYPE_TITLE_PREFIX, ErrorMessages, - createNamespace, - namespaces, - defaultNamespace, createTypesCollection, } = mnemonica; diff --git a/src/types/index.ts b/src/types/index.ts index fe40536..d4f5f93 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -6,7 +6,7 @@ // type narrowable = string | number | boolean | symbol | object | undefined | void | null | []; // export type IDEF = { new(): T } | { (this: T): void }; // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type IDEF = { new(): T } | { (this: T, ...args: any[]): void }; +export type IDEF = { new(): T } | { ( this: T, ...args: any[] ): void }; export interface ConstructorFunction { new( ...args: unknown[] ): ConstructorInstance; @@ -21,7 +21,7 @@ export type TypeClass = { new( ...args: unknown[] ): unknown; define: TypeAbsorber; lookup: TypeLookup; - registerHook: ( type: 'preCreation' | 'postCreation' | 'creationError', hook: CallableFunction ) => unknown; + registerHook: ( type: 'preCreation' | 'postCreation' | 'creationError', hookCb: CallableFunction ) => unknown; }; export type TypeAbsorber = ( @@ -52,5 +52,81 @@ export interface ITypeClass { define: ITypeAbsorber, // define: typeof define, lookup: TypeLookup, - registerHook: ( type: 'preCreation' | 'postCreation' | 'creationError', hook: CallableFunction ) => unknown; + registerHook: ( type: 'preCreation' | 'postCreation' | 'creationError', hookCb: CallableFunction ) => unknown; } + +export type hooksTypes = 'preCreation' | 'postCreation' | 'creationError' +export type hooksOpts = { + TypeName: string, + args: unknown[], + existentInstance: object, + inheritedInstance: object, +} +export type hook = { + ( opts: hooksOpts ): void +} + +export type constructorOptions = { + + // explicit declaration we wish use + // an old style based constructors + // e.g. with prototype described with: + // createInstanceModificator200XthWay + // or more general with: createInstanceModificator + ModificationConstructor?: CallableFunction, + + // shall or not we use strict checking + // for creation sub-instances Only from current type + // or we might use up-nested sub-instances from chain + strictChain?: boolean, + + // should we use forced errors checking + // to make all inherited types errored + // if there is an error somewhere in chain + // disallow instance construction + // if there is an error in prototype chain + blockErrors?: boolean, + + // if it is necessary to collect stack + // as a __stack__ prototype property + // during the process of instance creation + submitStack?: boolean, + + // await new Constructor() + // must return value + // optional ./issues/106 + awaitReturn?: boolean, + +}; + + +export type Proto = Pick> & T; + +// type Narrowable = +// string | number | boolean | symbol | object | undefined | void | null | []; +// type RN = Record +export type SN = Record unknown> + +export interface IDefinitorInstance { + new( ...arg: unknown[] ): { + [ key in keyof S ]: S[ key ] + } + define: IDefinitor + registerHook: ( hookType: hooksTypes, cb: hook ) => void +} + +export interface IDefinitor

{ + >, S extends SN & M> ( + this: unknown, + TypeName: SubTypeName, + constructHandler: IDEF, + proto?: PP, + config?: constructorOptions, + ): IDefinitorInstance +} + +export type TypeDescriptorInstance = { + define: CallableFunction; + lookup: CallableFunction; + subtypes: object; +}; diff --git a/test/environment.js b/test/environment.js index 62eb09e..b8db9c8 100644 --- a/test/environment.js +++ b/test/environment.js @@ -10,11 +10,8 @@ const { define, defaultTypes: types, defaultCollection, - defaultNamespace, - namespaces, - SymbolDefaultNamespace, SymbolDefaultTypesCollection, - SymbolSubtypeCollection, + SymbolParentType, SymbolConstructorName, SymbolGaia, SymbolConfig, @@ -22,7 +19,6 @@ const { MNEMOSYNE, GAIA, createTypesCollection, - createNamespace, utils: { toJSON, merge, @@ -44,7 +40,6 @@ const tests = ( opts ) => { UserType, overMore, moreOver, - anotherDefaultTypesCollection, someADTCInstance, SubOfSomeADTCTypePre, SubOfSomeADTCTypePost, @@ -54,7 +49,6 @@ const tests = ( opts ) => { subOfSomeADTCInstanceC, subOfSomeADTCInstanceB, myDecoratedSubInstance, - anotherNamespace, anotherTypesCollection, oneElseTypesCollection, anotherCollectionInstance, @@ -96,11 +90,10 @@ const tests = ( opts ) => { describe( 'interface test', () => { const interface_keys = [ - 'SymbolSubtypeCollection', + 'SymbolParentType', 'SymbolConstructorName', 'SymbolGaia', 'SymbolReplaceGaia', - 'SymbolDefaultNamespace', 'SymbolDefaultTypesCollection', 'SymbolConfig', 'MNEMONICA', @@ -110,9 +103,6 @@ const tests = ( opts ) => { 'TYPE_TITLE_PREFIX', 'ErrorMessages', 'defineStackCleaner', - 'createNamespace', - 'namespaces', - 'defaultNamespace', 'createTypesCollection', 'defaultTypes', 'defaultCollection', @@ -311,15 +301,6 @@ const tests = ( opts ) => { // expect(Object.getPrototypeOf(Object.getPrototypeOf(moreOver)).hasOwnProperty('OverMore')).is.true; } ); - it( 'namespaces shoud be defined', () => { - expect( namespaces ).exist.and.is.a( 'map' ); - } ); - it( 'defaultNamespace shoud be defined', () => { - expect( defaultNamespace ).to.be.an( 'object' ) - .and.equal( namespaces.get( SymbolDefaultNamespace ) ); - expect( defaultNamespace.name ).to.be.a( 'symbol' ) - .and.equal( SymbolDefaultNamespace ); - } ); it( 'SymbolDefaultTypesCollection shoud be default', () => { expect( types[ SymbolDefaultTypesCollection ] ).equal( true ); } ); @@ -329,8 +310,8 @@ const tests = ( opts ) => { it( 'MNEMOSYNE shoud be defined', () => { expect( MNEMOSYNE ).to.be.a( 'string' ).and.equal( 'Mnemosyne' ); } ); - it( 'SymbolSubtypeCollection shoud be defined', () => { - expect( SymbolSubtypeCollection ).to.be.a( 'symbol' ); + it( 'SymbolParentType shoud be defined', () => { + expect( SymbolParentType ).to.be.a( 'symbol' ); } ); it( 'SymbolConstructorName shoud be defined', () => { expect( SymbolConstructorName ).to.be.a( 'symbol' ); @@ -341,34 +322,12 @@ const tests = ( opts ) => { expect( Object.create( null ) instanceof UserType ).to.be.false; } ); - try { - createTypesCollection( {} ); - } catch ( error ) { - it( 'should register types collection for proper namespace', () => { - expect( error.message ).is.equal( ErrorMessages.NAMESPACE_DOES_NOT_EXIST ); - } ); - } - - try { - createTypesCollection( anotherNamespace, 'another types collection' ); - } catch ( error ) { - it( 'should dismiss register types collection with the same name', () => { - expect( error.message ).is.equal( ErrorMessages.ASSOCIATION_EXISTS ); - } ); - } - it( 'should refer defaultCollection from defaultTypes.subtypes', () => { expect( types.subtypes ).equal( defaultCollection ); } ); it( 'should refer defaultCollection from defaultTypes.subtypes', () => { expect( defaultCollection ).instanceof( Map ); } ); - it( 'should refer defaultTypes from defaultNamespace', () => { - expect( defaultNamespace.typesCollections.has( types ) ).is.true; - } ); - it( 'should create collections in defaultNamespace by default', () => { - expect( anotherDefaultTypesCollection.namespace ).equal( defaultNamespace ); - } ); it( 'should create instances for in anotherDefaultTypesCollection', () => { expect( someADTCInstance.test ).equal( 123 ); } ); @@ -520,10 +479,7 @@ const tests = ( opts ) => { hookInstance = _hookInstance; return true; } ); - // try { - // debugger; const errored = new BadType( {} ); - // } catch (error) { const stackstart = '<-- creation of [ BadType ] traced -->'; it( 'should respect the rules', () => { expect( errored ).instanceOf( Error ); @@ -545,11 +501,9 @@ const tests = ( opts ) => { assert.equal( hop( errored, 'stack' ), true ); } ); it( 'thrown error.stack should have seekable definition without stack cleaner', () => { - debugger; expect( errored.stack.indexOf( stackstart ) ).equal( 1 ); expect( errored.stack .indexOf( 'environment.js' ) > 0 ).is.true; - // .equal(96); } ); it( 'thrown error.stack should have seekable definition without Error.captureStackTrace', () => { const { captureStackTrace } = Error; @@ -675,12 +629,8 @@ const tests = ( opts ) => { } ); } ); - describe( 'another namespace instances', () => { - it( 'Another Nnamespace has both defined collections', () => { - expect( anotherNamespace.typesCollections.has( anotherTypesCollection ) ).is.true; - expect( anotherNamespace.typesCollections.has( oneElseTypesCollection ) ).is.true; - } ); - it( 'Another Nnamespace typesCollections gather types', () => { + describe( 'another instances', () => { + it( 'Another typesCollections gather types', () => { // expect(anotherTypesCollection).hasOwnProperty('AnotherCollectionType'); expect( hop( anotherTypesCollection, 'AnotherCollectionType' ) ).is.true; // expect(oneElseTypesCollection).hasOwnProperty('OneElseCollectionType'); @@ -689,7 +639,7 @@ const tests = ( opts ) => { expect( hop( oneElseTypesCollection, 'SomethingThatDoesNotExist' ) ).is.false; } ); - it( 'Instance Of Another Nnamespace and AnotherCollectionType', () => { + it( 'Instance Of Another and AnotherCollectionType', () => { expect( anotherCollectionInstance ).instanceOf( AnotherCollectionType ); } ); it( 'anotherCollectionInstance.TestForAddition pass gaia proxy', () => { @@ -703,7 +653,7 @@ const tests = ( opts ) => { expect( check ).equal( 'check' ); expect( on ).equal( process.on ); } ); - it( 'Instance Of OneElse Nnamespace and OneElseCollectionType', () => { + it( 'Instance Of OneElse and OneElseCollectionType', () => { expect( oneElseCollectionInstance ).instanceOf( OneElseCollectionType ); } ); it( 'Instance circular .toJSON works', () => { @@ -723,49 +673,14 @@ const tests = ( opts ) => { [ SymbolConstructorName ]: protoConstructSymbol } }, - [ SymbolConstructorName ]: namespaceName + [ SymbolConstructorName ]: CstrName } = proto; expect( name ).equal( MNEMONICA ); expect( protoConstructSymbol ).equal( MNEMONICA ); - expect( namespaceName ).equal( 'anotherNamespace' ); + expect( CstrName ).equal( 'Mnemonica' ); } ); } ); - describe( 'hooks environment', () => { - try { - defaultNamespace.registerFlowChecker(); - } catch ( error ) { - it( 'Thrown with Missing Callback', () => { - expect( error ).instanceOf( Error ); - expect( error ).instanceOf( errors.MISSING_CALLBACK_ARGUMENT ); - } ); - } - try { - defaultNamespace.registerFlowChecker( () => { } ); - } catch ( error ) { - it( 'Thrown with Re-Definition', () => { - expect( error ).instanceOf( Error ); - expect( error ).instanceOf( errors.FLOW_CHECKER_REDEFINITION ); - } ); - } - try { - defaultNamespace.registerHook( 'WrongHookType', () => { } ); - } catch ( error ) { - it( 'Thrown with Re-Definition', () => { - expect( error ).instanceOf( Error ); - expect( error ).instanceOf( errors.WRONG_HOOK_TYPE ); - } ); - } - try { - defaultNamespace.registerHook( 'postCreation' ); - } catch ( error ) { - it( 'Thrown with Re-Definition', () => { - expect( error ).instanceOf( Error ); - expect( error ).instanceOf( errors.MISSING_HOOK_CALLBACK ); - } ); - } - } ); - describe( 'strict chain test', () => { it( 'deep chained type should be undefined', () => { expect( userWithoutPassword.WithoutPassword ).equal( undefined ); @@ -925,27 +840,13 @@ const tests = ( opts ) => { } ); } ); - describe( 'wrong namespace creation', () => { - - try { - createNamespace( 'wrong config namespace', true ); - } catch ( error ) { - it( 'should avoid namespace creation with wrong config', () => { - expect( error.message ).is.equal( ErrorMessages.OPTIONS_ERROR ); - } ); - } - - const goodNamespaceDescription = 'good config namespace'; - const goodNamespace = createNamespace( 'good_config_namespace', goodNamespaceDescription ); - it( 'namespace with string instead of config should have description', () => { - expect( goodNamespace[ SymbolConfig ].description ).is.equal( goodNamespaceDescription ); - } ); + describe( 'wrong creation', () => { const ModificationConstructor = require( './createInstanceModificator200XthWay' ); - const goodNamespaceTC = goodNamespace.createTypesCollection( 'good namespace types collection', { + const goodNamespaceTC = createTypesCollection( { ModificationConstructor } ); - it( 'namespace types collection creation check', () => { + it( 'types collection creation check', () => { expect( goodNamespaceTC[ SymbolConfig ].ModificationConstructor ).is.equal( ModificationConstructor ); expect( goodNamespaceTC[ SymbolConfig ].strictChain ).is.equal( true ); } ); diff --git a/test/hookSamples.js b/test/hookSamples.js deleted file mode 100644 index df7ada1..0000000 --- a/test/hookSamples.js +++ /dev/null @@ -1,189 +0,0 @@ -const namespaceFlowCheckerSample = [ - 'SomeADTCType', - 'SomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'SubOfSomeADTCType', - 'UserType', - 'UserType', - 'UserTypePL1', - 'UserTypePL1', - 'UserTypePL2', - 'UserTypePL2', - 'UserTypePL2', - 'UserTypePL2', - 'UserTypePL2', - 'UserTypePL2', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'WithoutPassword', - 'WithoutPassword', - 'WithoutPassword', - 'WithoutPassword', - 'WithoutPassword', - 'WithoutPassword', - 'WithoutPassword', - 'WithoutPassword', - 'WithAdditionalSign', - 'WithAdditionalSign', - 'MoreOver', - 'MoreOver', - 'OverMore', - 'OverMore', - 'EvenMore', - 'EvenMore', - 'EmptyType', - 'EmptyType', - 'EmptySubType', - 'EmptySubType', - 'EvenMore', - 'EvenMore', - 'OverMore', - 'OverMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'EvenMore', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'WithoutPassword', - 'WithoutPassword', - 'WithAdditionalSign', - 'WithAdditionalSign', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'WithoutPassword', - 'WithoutPassword', - 'WithAdditionalSign', - 'WithAdditionalSign', - 'UserType', - 'UserType', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'NullishReturn', - 'NullishReturn', - 'NamedFunction', - 'BadBadType', - 'BadBadType', - 'BadType', - 'BadTypeReThis', - 'BadTypeReInConstruct', - 'BadTypeReInConstruct', - 'ExistentConstructor', - 'ExistentConstructor', - 'ErroredShape', - 'ErroredShape', - 'ErroredShape', - 'ShapeMyError', - 'ShapeMyError', - 'ShapeMyError', - 'AsyncWOReturn', - 'HookThrownType', - 'AsyncWOReturnNAR', - 'NamedFunction', - 'NamedClass', - 'NamedClass', - 'SubNamedClass', - 'SubNamedClass', - 'NamedClass', - 'NamedClass', - 'SubNamedClass', - 'SubNamedClass', - 'ProxyTyped', - 'ProxyTyped', - 'BadType', - 'BadType', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'WithoutPassword', - 'WithoutPassword', - 'WithAdditionalSign', - 'WithAdditionalSign', - 'AsyncChain1st', - 'AsyncChain1st', - 'AsyncChain2nd', - 'AsyncChain2nd', - 'Async2Sync2nd', - 'Async2Sync2nd', - 'AsyncChain3rd', - 'AsyncChain3rd', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'WithoutPassword', - 'WithoutPassword', - 'WithAdditionalSign', - 'WithAdditionalSign', - 'AsyncChain1st', - 'AsyncChain1st', - 'AsyncChain2nd', - 'AsyncChain2nd', - 'Async2Sync2nd', - 'Async2Sync2nd', - 'AsyncChain3rd', - 'AsyncChain3rd', - 'UserTypeConstructor', - 'UserTypeConstructor', - 'WithoutPassword', - 'WithoutPassword', - 'WithAdditionalSign', - 'WithAdditionalSign', - 'AsyncChain1st', - 'AsyncChain1st', - 'AsyncChain2nd', - 'AsyncChain2nd', - 'Async2Sync2nd', - 'Async2Sync2nd', - 'AsyncChain3rd', - 'AsyncChain3rd', - 'WrongSyncType', - 'UserType', - 'UserType', - 'WrongAsyncType', - 'UserType', - 'UserType', - 'SleepType', - 'SleepType', - 'AsyncErroredType', - 'SleepType', - 'SleepType', - 'SleepType', - 'SleepType', - 'SyncErroredType', - 'SleepType', - 'SleepType', - 'AsyncErroredTypeStraight', - 'SleepType', - 'SleepType', - 'SyncErroredTypeStraight' -]; - -module.exports = { - namespaceFlowCheckerSample -}; diff --git a/test/hooks.js b/test/hooks.js index a5bc12a..0b74684 100644 --- a/test/hooks.js +++ b/test/hooks.js @@ -1,43 +1,25 @@ 'use strict'; -const { assert } = require( 'chai' ); +const { assert, expect } = require( 'chai' ); const { - defaultTypes: types, - defaultNamespace, + defaultTypes, + errors } = require( '..' ); const tests = ( opts ) => { const { userTypeHooksInvocations, - namespaceFlowCheckerInvocations, typesFlowCheckerInvocations, typesPreCreationInvocations, typesPostCreationInvocations, - namespacePreCreationInvocations, - namespacePostCreationInvocations, } = opts; describe( 'Hooks Tests', () => { - it( 'check invocations test', () => { - const { namespaceFlowCheckerSample } = require( './hookSamples' ); - namespaceFlowCheckerInvocations.forEach( ( el, idx ) => { - const nst = namespaceFlowCheckerSample[ idx ]; - const elt = el.TypeName; - if ( nst != elt ) { - console.log( idx, nst, elt ); - debugger; - } - assert.equal( nst, elt ); - } ); - } ); it( 'check invocations count', () => { assert.equal( 8, userTypeHooksInvocations.length ); - debugger; - // +2 - assert.equal( 183, namespaceFlowCheckerInvocations.length ); // +2 assert.equal( 171, typesFlowCheckerInvocations.length ); // +1 @@ -46,12 +28,7 @@ const tests = ( opts ) => { // checked before // that is why, and with clones // +1 - assert.equal( 78, typesPostCreationInvocations.length ); - // +1 - assert.equal( 99, namespacePreCreationInvocations.length ); - // there are two registered Hooks, that is why - // +2 - assert.equal( 168, namespacePostCreationInvocations.length ); + assert.equal( 156, typesPostCreationInvocations.length ); } ); } ); @@ -76,7 +53,7 @@ const tests = ( opts ) => { kind, } = entry; it( `'this' for ${kind}-hook of ${sort} should refer to type defaultTypes`, () => { - assert.equal( self, types ); + assert.equal( self, defaultTypes ); } ); } ); typesPostCreationInvocations.forEach( entry => { @@ -86,29 +63,44 @@ const tests = ( opts ) => { kind, } = entry; it( `'this' for ${kind}-hook of ${sort} should refer to type defaultTypes`, () => { - assert.equal( self, types ); + assert.equal( self, defaultTypes ); } ); } ); - namespacePreCreationInvocations.forEach( entry => { - const { - self, - sort, - kind, - } = entry; - it( `'this' for ${kind}-hook of ${sort} should refer to type defaultNamespace`, () => { - assert.equal( self, defaultNamespace ); + } ); + + describe( 'hooks environment', () => { + try { + defaultTypes.registerFlowChecker(); + } catch ( error ) { + it( 'Thrown with Missing Callback', () => { + expect( error ).instanceOf( Error ); + expect( error ).instanceOf( errors.MISSING_CALLBACK_ARGUMENT ); } ); - } ); - namespacePostCreationInvocations.forEach( entry => { - const { - self, - sort, - kind, - } = entry; - it( `'this' for ${kind}-hook of ${sort} should refer to type defaultNamespace`, () => { - assert.equal( self, defaultNamespace ); + } + try { + defaultTypes.registerFlowChecker( () => { } ); + } catch ( error ) { + it( 'Thrown with Re-Definition', () => { + expect( error ).instanceOf( Error ); + expect( error ).instanceOf( errors.FLOW_CHECKER_REDEFINITION ); } ); - } ); + } + try { + defaultTypes.registerHook( 'WrongHookType', () => { } ); + } catch ( error ) { + it( 'Thrown with Re-Definition', () => { + expect( error ).instanceOf( Error ); + expect( error ).instanceOf( errors.WRONG_HOOK_TYPE ); + } ); + } + try { + defaultTypes.registerHook( 'postCreation' ); + } catch ( error ) { + it( 'Thrown with Re-Definition', () => { + expect( error ).instanceOf( Error ); + expect( error ).instanceOf( errors.MISSING_HOOK_CALLBACK ); + } ); + } } ); }; diff --git a/test/index.js b/test/index.js index 7000fcd..516c91f 100644 --- a/test/index.js +++ b/test/index.js @@ -28,15 +28,13 @@ const { call, bind, registerHook, - defaultTypes: types, - createNamespace, + defaultTypes, createTypesCollection, MNEMONICA, URANUS, - SymbolSubtypeCollection, + SymbolParentType, SymbolConstructorName, SymbolGaia, - defaultNamespace, utils: { extract, pick, @@ -69,7 +67,6 @@ const UserType = mnemonica.define( 'UserType', function ( userData ) { this.password = password; return this; }, UserTypeProto, mc ); -// debugger; const userTypeHooksInvocations = []; @@ -118,7 +115,6 @@ const shaperFactory = () => { constructor () { // const zzz = new.target; // Shaper; - // debugger; this.shape = 123; } }; @@ -129,11 +125,9 @@ UserType.define( () => { const Shaper = shaperFactory( false ); class UserTypePL2 extends Shaper { constructor () { - // debugger; super(); // const zzz = new.target; // Shaper; - // debugger; this.user_pl_2_sign = 'pl_2'; } get UserTypePL2 () { @@ -168,66 +162,46 @@ Object.assign( UserType, { const typesFlowCheckerInvocations = []; const typesPreCreationInvocations = []; const typesPostCreationInvocations = []; -const namespaceFlowCheckerInvocations = []; -const namespacePreCreationInvocations = []; -const namespacePostCreationInvocations = []; -types.registerFlowChecker( ( opts ) => { +defaultTypes.registerFlowChecker( ( opts ) => { typesFlowCheckerInvocations.push( opts ); } ); -types.registerHook( 'preCreation', function ( opts ) { +defaultTypes.registerHook( 'preCreation', function ( opts ) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; typesPreCreationInvocations.push( { kind : 'pre', sort : 'collection', - self : this, + self, opts } ); } ); -types.registerHook( 'postCreation', function ( opts ) { +defaultTypes.registerHook( 'postCreation', function ( opts ) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; typesPostCreationInvocations.push( { - kind : 'post', - sort : 'collection', - self : this, - opts - } ); -} ); - -defaultNamespace.registerFlowChecker( ( opts ) => { - namespaceFlowCheckerInvocations.push( opts ); -} ); - -defaultNamespace.registerHook( 'preCreation', function ( opts ) { - namespacePreCreationInvocations.push( { - kind : 'pre', - sort : 'namespace', - self : this, - opts - } ); -} ); - -defaultNamespace.registerHook( 'postCreation', function ( opts ) { - namespacePostCreationInvocations.push( { - kind : 'pre', - sort : 'namespace', - self : this, + kind : 'post', + sort : 'collection', order : 'first', + self, opts } ); } ); -defaultNamespace.registerHook( 'postCreation', function ( opts ) { - namespacePostCreationInvocations.push( { - kind : 'pre', - sort : 'namespace', - self : this, +defaultTypes.registerHook( 'postCreation', function ( opts ) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + typesPostCreationInvocations.push( { + kind : 'post', + sort : 'collection', order : 'second', + self, opts } ); } ); - const anotherDefaultTypesCollection = createTypesCollection(); const { @@ -255,23 +229,18 @@ SubOfSomeADTCType.registerHook( 'postCreation', ( opts ) => { } ); -// debugger; const subOfSomeADTCInstanceANoArgs = apply( someADTCInstance, SubOfSomeADTCType ); const subOfSomeADTCInstanceA = apply( someADTCInstance, SubOfSomeADTCType, [ 1, 2, 3 ] ); -// debugger; const backSub = new subOfSomeADTCInstanceA.SubOfSomeADTCType; -// debugger; const subOfSomeADTCInstanceC = call( someADTCInstance, SubOfSomeADTCType, 1, 2, 3 ); -// debugger; const subOfSomeADTCInstanceB = bind( someADTCInstance, SubOfSomeADTCType )( 1, 2, 3 ); -const anotherNamespace = createNamespace( 'anotherNamespace' ); -const anotherTypesCollection = createTypesCollection( anotherNamespace, 'another types collection' ); -const oneElseTypesCollection = createTypesCollection( anotherNamespace ); +const anotherTypesCollection = createTypesCollection(); +const oneElseTypesCollection = createTypesCollection(); const AnotherCollectionType = anotherTypesCollection.define( 'AnotherCollectionType', function ( check ) { Object.assign( this, { check } ); @@ -349,7 +318,6 @@ const AsyncType = define( 'AsyncType', async function ( data ) { if ( this[ propName ] ) { return this[ propName ]; } - debugger; throw new Error( `prop is missing: ${propName}` ); }, @@ -410,7 +378,6 @@ SubOfNestedAsync.registerHook( 'postCreation', function ( hookData ) { SubOfNestedAsyncPostHookData = hookData; } ); -// debugger; describe( 'Main Test', () => { /* @@ -454,9 +421,7 @@ describe( 'Main Test', () => { WithoutPasswordSign : 'WithoutPasswordSign' }; - // debugger; - - const UserWithoutPassword = types.UserTypeConstructor.define( () => { + const UserWithoutPassword = defaultTypes.UserTypeConstructor.define( () => { const WithoutPassword = function () { this.password = undefined; }; @@ -499,7 +464,6 @@ describe( 'Main Test', () => { const OverMoreProto = { OverMoreSign : 'OverMoreSign' }; - // debugger; const OverMore = WithAdditionalSignTypeDef .define( 'MoreOver.OverMore', function ( str ) { @@ -558,7 +522,7 @@ describe( 'Main Test', () => { // ***************************************************** - // const userTC = new types.UserTypeConstructor(USER_DATA); + // const userTC = new defaultTypes.UserTypeConstructor(USER_DATA); const userTC = new UserTypeConstructor( USER_DATA ); const FORK_CALL_DATA = { @@ -577,7 +541,6 @@ describe( 'Main Test', () => { const unchainedUserWithoutPassword = new UserWithoutPassword(); const userWithoutPassword = new userTC.WithoutPassword(); - // debugger; const userWithoutPassword_2 = new userTC.WithoutPassword(); const sign2add = 'userWithoutPassword_2.WithAdditionalSign'; @@ -640,7 +603,6 @@ describe( 'Main Test', () => { subOfSomeADTCInstanceC, subOfSomeADTCInstanceB, myDecoratedSubInstance, - anotherNamespace, anotherTypesCollection, oneElseTypesCollection, anotherCollectionInstance, @@ -669,19 +631,16 @@ describe( 'Main Test', () => { if ( hooksTest ) { require( './hooks' )( { userTypeHooksInvocations, - namespaceFlowCheckerInvocations, typesFlowCheckerInvocations, typesPreCreationInvocations, typesPostCreationInvocations, - namespacePreCreationInvocations, - namespacePostCreationInvocations, } ); } describe( 'Type Definitions Tests', () => { const checkTypeDefinition = ( _types, TypeName, proto ) => { - const parentType = _types[ SymbolSubtypeCollection ]; + const parentType = _types[ SymbolParentType ]; const isSubType = parentType ? true : false; describe( `initial type declaration ${TypeName}`, () => { const def = _types.get( TypeName ); @@ -723,11 +682,11 @@ describe( 'Main Test', () => { } ); [ - [ types.subtypes, 'UserType', UserTypeProto ], + [ defaultTypes.subtypes, 'UserType', UserTypeProto ], [ UserType.subtypes, 'UserTypePL1', pl1Proto ], [ UserType.subtypes, 'UserTypePL2' ], - [ types.subtypes, 'UserTypeConstructor', UserTypeConstructorProto ], - [ types.UserTypeConstructor.subtypes, 'WithoutPassword', WithoutPasswordProto ], + [ defaultTypes.subtypes, 'UserTypeConstructor', UserTypeConstructorProto ], + [ defaultTypes.UserTypeConstructor.subtypes, 'WithoutPassword', WithoutPasswordProto ], [ UserWithoutPassword.subtypes, 'WithAdditionalSign', WithAdditionalSignProto ], [ WithAdditionalSignTypeDef.subtypes, 'MoreOver' ], [ MoreOverTypeDef.subtypes, 'OverMore', OverMoreProto ], @@ -742,12 +701,12 @@ describe( 'Main Test', () => { describe( 'Instance Constructors Tests', () => { it( 'type constructor itself is correct', () => { - assert.instanceOf( user, types.UserType ); - assert.equal( types.UserType.__type__, UserType.__type__ ); + assert.instanceOf( user, defaultTypes.UserType ); + assert.equal( defaultTypes.UserType.__type__, UserType.__type__ ); } ); it( 'actually do construction', () => { assert.instanceOf( user, UserType ); - assert.instanceOf( user, types.UserType ); + assert.instanceOf( user, defaultTypes.UserType ); } ); it( '.constructor.name is correct', () => { assert.equal( user.constructor.name, 'UserType' ); @@ -1119,7 +1078,6 @@ describe( 'Main Test', () => { let thrown2; try { - debugger; hookedMethod.call( null, 'getThisPropMethod' ); } catch ( error ) { thrown2 = error; @@ -1177,7 +1135,6 @@ describe( 'Main Test', () => { } ); // it('should be able to throw on returned after invocations', () => { - // debugger; // hookedMethod.call({ // getThisPropMethod (arg) { // return this[arg]; @@ -1194,10 +1151,8 @@ describe( 'Main Test', () => { new_targets = []; try { - debugger; erroredNestedConstructMethod(); } catch ( error ) { - debugger; thrown = error; } @@ -1218,7 +1173,6 @@ describe( 'Main Test', () => { } = thrown; assert.equal( args[ 0 ], 123 ); assert.equal( instance.constructor.name, 'NestedSubError' ); - debugger; const parsed = thrown.parse(); assert.equal( parsed.name, 'NestedSubError' ); @@ -1262,8 +1216,6 @@ describe( 'Main Test', () => { thrown = error; } - debugger; - expect( thrown ).instanceOf( Error ); expect( thrown ).instanceOf( AsyncType ); expect( thrown.message ).exist.and.is.a( 'string' ); diff --git a/test/instance.proto.js b/test/instance.proto.js index b9edb79..7b694d6 100644 --- a/test/instance.proto.js +++ b/test/instance.proto.js @@ -2,13 +2,13 @@ const { SymbolGaia, -} = require('..'); +} = require( '..' ); const gof = Object.getPrototypeOf; -const { assert, expect } = require('chai'); +const { assert, expect } = require( 'chai' ); -const tests = (opts) => { +const tests = ( opts ) => { const { user, @@ -44,51 +44,48 @@ const tests = (opts) => { userTCforkDAG, } = opts; - describe('instance .proto props tests', () => { + describe( 'instance .proto props tests', () => { - it('should have proper prototype .__args__', () => { - assert.equal(user.__args__[ 0 ], USER_DATA); - }); - it('should have proper prototype .__type__', () => { + it( 'should have proper prototype .__args__', () => { + assert.equal( user.__args__[ 0 ], USER_DATA ); + } ); + it( 'should have proper prototype .__type__', () => { // undefined ! - assert.equal(user.__type__.TypeProxy, UserType.__type__); - assert.equal(user.__type__.TypeName, UserType.TypeName); - }); - it('should have proper prototype .__namespace__', () => { - assert.equal(user.__namespace__, UserType.namespace); - }); - it('should have proper prototype .__collection__', () => { - assert.equal(user.__collection__, UserType.collection); - }); - it('should have proper prototype .__subtypes__', () => { - assert.equal(user.__subtypes__, UserType.subtypes); - }); - it('should have proper prototype .__parent__', () => { - assert.equal(evenMore.__parent__, overMore); - assert.notEqual(evenMore.__parent__, moreOver); - }); - it('should have proper prototype .__timestamp__', () => { - assert.exists(evenMore.__timestamp__); - }); - - it('should have proper first .clone old style', () => { + assert.equal( user.__type__.TypeProxy, UserType.__type__ ); + assert.equal( user.__type__.TypeName, UserType.TypeName ); + } ); + it( 'should have proper prototype .__collection__', () => { + assert.equal( user.__collection__, UserType.collection ); + } ); + it( 'should have proper prototype .__subtypes__', () => { + assert.equal( user.__subtypes__, UserType.subtypes ); + } ); + it( 'should have proper prototype .__parent__', () => { + assert.equal( evenMore.__parent__, overMore ); + assert.notEqual( evenMore.__parent__, moreOver ); + } ); + it( 'should have proper prototype .__timestamp__', () => { + assert.exists( evenMore.__timestamp__ ); + } ); + + it( 'should have proper first .clone old style', () => { const userClone = user.clone; assert.notEqual( - gof(gof(user)), - gof(gof(userClone)) + gof( gof( user ) ), + gof( gof( userClone ) ) ); - assert.notEqual(user, userClone); - assert.deepInclude(user, userClone); - assert.deepInclude(userClone, user); - assert.deepEqual(userClone, user); + assert.notEqual( user, userClone ); + assert.deepInclude( user, userClone ); + assert.deepInclude( userClone, user ); + assert.deepEqual( userClone, user ); - }); + } ); - it('should have proper first .fork() old style', () => { + it( 'should have proper first .fork() old style', () => { const forkData = { email : 'went.out@gmail.com', @@ -96,214 +93,214 @@ const tests = (opts) => { }; const userArgs = user.__args__; - const userFork = user.fork(forkData); + const userFork = user.fork( forkData ); - const userPP = gof(gof(user)); - const userForkPP = gof(gof(userFork)); + const userPP = gof( gof( user ) ); + const userForkPP = gof( gof( userFork ) ); - assert.notEqual(userPP, userForkPP); + assert.notEqual( userPP, userForkPP ); - assert.notEqual(user, userFork); - assert.deepEqual(userArgs[ 0 ], USER_DATA); - assert.deepEqual(new UserType(forkData), userFork); - assert.notDeepEqual(userArgs, userFork.__args__); - expect(userFork).instanceof(UserType); - assert.deepEqual(Object.keys(userFork), Object.keys(user)); + assert.notEqual( user, userFork ); + assert.deepEqual( userArgs[ 0 ], USER_DATA ); + assert.deepEqual( new UserType( forkData ), userFork ); + assert.notDeepEqual( userArgs, userFork.__args__ ); + expect( userFork ).instanceof( UserType ); + assert.deepEqual( Object.keys( userFork ), Object.keys( user ) ); - }); + } ); - it('should have proper first .fork() regular style', () => { + it( 'should have proper first .fork() regular style', () => { const forkData = { email : 'went.out@gmail.com', password : 'fork regular style password' }; const userTCArgs = userTC.__args__; - const userTCFork = userTC.fork(forkData); + const userTCFork = userTC.fork( forkData ); - const userTCPP = gof(gof(userTC)); - const userTCForkPP = gof(gof(userTCFork)); - assert.notEqual(userTCPP, userTCForkPP); + const userTCPP = gof( gof( userTC ) ); + const userTCForkPP = gof( gof( userTCFork ) ); + assert.notEqual( userTCPP, userTCForkPP ); - assert.notEqual(userTC, userTCFork); - assert.deepEqual(userTCArgs[ 0 ], USER_DATA); - const naiveFork = new UserTypeConstructor(forkData); - assert.deepOwnInclude(naiveFork, userTCFork); - assert.notDeepEqual(userTCArgs, userTCFork.__args__); - expect(userTCFork).instanceof(UserTypeConstructor); - assert.deepEqual(Object.keys(userTCFork), Object.keys(userTC)); + assert.notEqual( userTC, userTCFork ); + assert.deepEqual( userTCArgs[ 0 ], USER_DATA ); + const naiveFork = new UserTypeConstructor( forkData ); + assert.deepOwnInclude( naiveFork, userTCFork ); + assert.notDeepEqual( userTCArgs, userTCFork.__args__ ); + expect( userTCFork ).instanceof( UserTypeConstructor ); + assert.deepEqual( Object.keys( userTCFork ), Object.keys( userTC ) ); - }); + } ); - it('should have seekable __stack__', () => { + it( 'should have seekable __stack__', () => { const stackstart = '<-- creation of [ UserTypePL1 ] traced -->'; const { __stack__ } = userPL1; // debugger; - expect(__stack__.indexOf(stackstart)).equal(1); - }); + expect( __stack__.indexOf( stackstart ) ).equal( 1 ); + } ); - it('should have proper nested .fork() old style', () => { + it( 'should have proper nested .fork() old style', () => { const userPL1Fork = userPL1.fork(); - const userPL1PP = gof(gof(userPL1)); - const userPL1ForkPP = gof(gof(userPL1Fork)); + const userPL1PP = gof( gof( userPL1 ) ); + const userPL1ForkPP = gof( gof( userPL1Fork ) ); - assert.equal(userPL1ForkPP.UserTypePL1.toString(), userPL1PP.UserTypePL1.toString()); - assert.equal(userPL1ForkPP.UserTypePL2.toString(), userPL1PP.UserTypePL2.toString()); - assert.deepInclude(userPL1ForkPP.UserTypePL1, userPL1PP.UserTypePL1); - assert.deepInclude(userPL1PP.UserTypePL1, userPL1ForkPP.UserTypePL1); - assert.deepInclude(userPL1ForkPP.UserTypePL2, userPL1PP.UserTypePL2); - assert.deepInclude(userPL1PP.UserTypePL2, userPL1ForkPP.UserTypePL2); + assert.equal( userPL1ForkPP.UserTypePL1.toString(), userPL1PP.UserTypePL1.toString() ); + assert.equal( userPL1ForkPP.UserTypePL2.toString(), userPL1PP.UserTypePL2.toString() ); + assert.deepInclude( userPL1ForkPP.UserTypePL1, userPL1PP.UserTypePL1 ); + assert.deepInclude( userPL1PP.UserTypePL1, userPL1ForkPP.UserTypePL1 ); + assert.deepInclude( userPL1ForkPP.UserTypePL2, userPL1PP.UserTypePL2 ); + assert.deepInclude( userPL1PP.UserTypePL2, userPL1ForkPP.UserTypePL2 ); - assert.notEqual(userPL1PP, userPL1ForkPP); - assert.notEqual(userPL1, userPL1Fork); - assert.deepInclude(userPL1, userPL1Fork); - assert.deepInclude(userPL1Fork, userPL1); - assert.deepEqual(userPL1Fork.extract(), userPL1.extract()); + assert.notEqual( userPL1PP, userPL1ForkPP ); + assert.notEqual( userPL1, userPL1Fork ); + assert.deepInclude( userPL1, userPL1Fork ); + assert.deepInclude( userPL1Fork, userPL1 ); + assert.deepEqual( userPL1Fork.extract(), userPL1.extract() ); - }); + } ); - it('should have proper nested .clone regular style', () => { + it( 'should have proper nested .clone regular style', () => { const evenMoreClone = evenMore.clone; assert.deepEqual( - gof(gof(evenMore)), - gof(gof(evenMoreClone)) + gof( gof( evenMore ) ), + gof( gof( evenMoreClone ) ) ); - assert.notEqual(evenMore, evenMoreClone); - assert.deepInclude(evenMore, evenMoreClone); - assert.deepInclude(evenMoreClone, evenMore); - assert.deepEqual(evenMoreClone.extract(), evenMore.extract()); + assert.notEqual( evenMore, evenMoreClone ); + assert.deepInclude( evenMore, evenMoreClone ); + assert.deepInclude( evenMoreClone, evenMore ); + assert.deepEqual( evenMoreClone.extract(), evenMore.extract() ); - }); + } ); - it('should not mutate()', () => { - assert.notEqual(evenMore.__proto_proto__, EvenMoreProto); - }); + it( 'should not mutate()', () => { + assert.notEqual( evenMore.__proto_proto__, EvenMoreProto ); + } ); - it('should have proper nested .fork()', () => { - assert.notEqual(overMore.__proto_proto__, overMoreFork.__proto_proto__); + it( 'should have proper nested .fork()', () => { + assert.notEqual( overMore.__proto_proto__, overMoreFork.__proto_proto__ ); - assert.notEqual(evenMore.__proto_proto__, evenMoreFork.__proto_proto__); - assert.notEqual(evenMore.__timestamp__, evenMoreFork.__timestamp__); + assert.notEqual( evenMore.__proto_proto__, evenMoreFork.__proto_proto__ ); + assert.notEqual( evenMore.__timestamp__, evenMoreFork.__timestamp__ ); - assert.notEqual(evenMore, evenMoreFork); - assert.notEqual(evenMoreForkFork, evenMoreFork); + assert.notEqual( evenMore, evenMoreFork ); + assert.notEqual( evenMoreForkFork, evenMoreFork ); - const evenMorePP = gof(gof(evenMore)); - const evenMoreForkPP = gof(gof(evenMoreFork)); + const evenMorePP = gof( gof( evenMore ) ); + const evenMoreForkPP = gof( gof( evenMoreFork ) ); - assert.notEqual(evenMorePP, evenMoreForkPP); - assert.equal(evenMoreFork.str, strFork); - assert.equal(evenMoreForkFork.str, strForkOfFork); + assert.notEqual( evenMorePP, evenMoreForkPP ); + assert.equal( evenMoreFork.str, strFork ); + assert.equal( evenMoreForkFork.str, strForkOfFork ); // debugger; - assert.deepEqual(evenMore.__args__, evenMoreArgs); - assert.notDeepEqual(evenMore.__args__, evenMoreFork.__args__); - - const nativeFork = new overMore.EvenMore(strFork); - - assert.notEqual(nativeFork, evenMoreFork); - assert.deepInclude(nativeFork, evenMoreFork); - assert.deepInclude(evenMoreFork, nativeFork); - assert.notEqual(overMore.__args__, evenMore.__args__); - expect(evenMoreFork).instanceof(OverMore.lookup('EvenMore')); - assert.deepEqual(Object.keys(evenMore), Object.keys(evenMoreFork)); - - }); - - it('instance.ConstructorName.call(undefined) should work', () => { - expect(overMoreCallEvenMoreUndefined).instanceof(overMore.EvenMore); - expect(overMoreCallEvenMoreUndefined).instanceof(evenMore); - expect(overMoreCallEvenMoreUndefined.str).equal('re-defined EvenMore str'); - }); - - it('instance.ConstructorName.call(null) should work', () => { - expect(overMoreCallEvenMoreNull).instanceof(overMore.EvenMore); - expect(overMoreCallEvenMoreNull).instanceof(evenMore); - expect(overMoreCallEvenMoreNull + 1).equal(1); - }); - - it('instance.ConstructorName.call(new Number) should work', () => { - expect(overMoreCallEvenMoreNumber).instanceof(overMore.EvenMore); - expect(overMoreCallEvenMoreNumber).instanceof(evenMore); - expect(overMoreCallEvenMoreNumber).instanceof(Number); - expect(overMoreCallEvenMoreNumber + 2).equal(7); - }); - - it('instance.ConstructorName.call(new String) should work', () => { - - expect(overMoreCallEvenMoreString).instanceof(overMore.EvenMore); - expect(overMoreCallEvenMoreString).instanceof(evenMore); - expect(overMoreCallEvenMoreString).instanceof(String); - expect(overMoreCallEvenMoreString + 2).equal('52'); - }); - - it('instance.ConstructorName.call(new Boolean) should work', () => { - expect(overMoreCallEvenMoreBoolean).instanceof(overMore.EvenMore); - expect(overMoreCallEvenMoreBoolean).instanceof(evenMore); - expect(overMoreCallEvenMoreBoolean).instanceof(Boolean); - expect(overMoreCallEvenMoreBoolean + 1).equal(2); - }); - - it('instance.ConstructorName.call(process) should work', () => { + assert.deepEqual( evenMore.__args__, evenMoreArgs ); + assert.notDeepEqual( evenMore.__args__, evenMoreFork.__args__ ); + + const nativeFork = new overMore.EvenMore( strFork ); + + assert.notEqual( nativeFork, evenMoreFork ); + assert.deepInclude( nativeFork, evenMoreFork ); + assert.deepInclude( evenMoreFork, nativeFork ); + assert.notEqual( overMore.__args__, evenMore.__args__ ); + expect( evenMoreFork ).instanceof( OverMore.lookup( 'EvenMore' ) ); + assert.deepEqual( Object.keys( evenMore ), Object.keys( evenMoreFork ) ); + + } ); + + it( 'instance.ConstructorName.call(undefined) should work', () => { + expect( overMoreCallEvenMoreUndefined ).instanceof( overMore.EvenMore ); + expect( overMoreCallEvenMoreUndefined ).instanceof( evenMore ); + expect( overMoreCallEvenMoreUndefined.str ).equal( 're-defined EvenMore str' ); + } ); + + it( 'instance.ConstructorName.call(null) should work', () => { + expect( overMoreCallEvenMoreNull ).instanceof( overMore.EvenMore ); + expect( overMoreCallEvenMoreNull ).instanceof( evenMore ); + expect( overMoreCallEvenMoreNull + 1 ).equal( 1 ); + } ); + + it( 'instance.ConstructorName.call(new Number) should work', () => { + expect( overMoreCallEvenMoreNumber ).instanceof( overMore.EvenMore ); + expect( overMoreCallEvenMoreNumber ).instanceof( evenMore ); + expect( overMoreCallEvenMoreNumber ).instanceof( Number ); + expect( overMoreCallEvenMoreNumber + 2 ).equal( 7 ); + } ); + + it( 'instance.ConstructorName.call(new String) should work', () => { + + expect( overMoreCallEvenMoreString ).instanceof( overMore.EvenMore ); + expect( overMoreCallEvenMoreString ).instanceof( evenMore ); + expect( overMoreCallEvenMoreString ).instanceof( String ); + expect( overMoreCallEvenMoreString + 2 ).equal( '52' ); + } ); + + it( 'instance.ConstructorName.call(new Boolean) should work', () => { + expect( overMoreCallEvenMoreBoolean ).instanceof( overMore.EvenMore ); + expect( overMoreCallEvenMoreBoolean ).instanceof( evenMore ); + expect( overMoreCallEvenMoreBoolean ).instanceof( Boolean ); + expect( overMoreCallEvenMoreBoolean + 1 ).equal( 2 ); + } ); + + it( 'instance.ConstructorName.call(process) should work', () => { const gaia = overMoreCallEvenMoreProcess[ SymbolGaia ]; - const gaiaProto = gof(gaia); - expect(gof(gaiaProto)).equal(process); - - expect(overMoreCallEvenMoreProcess).instanceof(overMore.EvenMore); - expect(overMoreCallEvenMoreProcess).instanceof(evenMore); - assert.isFunction(overMoreCallEvenMoreProcess.on); - }); - - it('direct primitive DAG.call(new Boolean) should work', () => { - expect(userTCdirectDAG).instanceof(UserTypeConstructor); - expect(userTCdirectDAG).instanceof(Boolean); - expect(userTCdirectDAG + 1).equal(2); - }); - - it('direct primitive DAG somethin.fork.call(new Boolean) should work', () => { - expect(userTCforkDAG).instanceof(UserTypeConstructor); - expect(userTCforkDAG).instanceof(Boolean); - expect(userTCforkDAG + 1).equal(2); - }); - - it('instance.fork.call() should work + SomeType.SomeSubType', () => { - expect(userTCForkCall).instanceof(UserTypeConstructor); - expect(userTCForkCall).instanceof(UserType); - expect(userTCForkCall).instanceof(user); - expect(userTCForkApply).instanceof(UserTypeConstructor); - expect(userTCForkApply).instanceof(UserType); - expect(userTCForkApply).instanceof(user); - expect(userTCForkBind).instanceof(UserTypeConstructor); - expect(userTCForkBind).instanceof(UserType); - expect(userTCForkBind).instanceof(user); - assert.equal(user.__args__[ 0 ], USER_DATA); - assert.equal(userTC.__args__[ 0 ], USER_DATA); - assert.deepEqual(userTCForkCall.__args__[ 0 ], FORK_CALL_DATA); - assert.deepEqual(userTCForkApply.__args__[ 0 ], FORK_CALL_DATA); - assert.deepEqual(userTCForkBind.__args__[ 0 ], FORK_CALL_DATA); - assert.deepInclude(userTCForkCall, FORK_CALL_DATA); - assert.deepInclude(userTCForkApply, FORK_CALL_DATA); - assert.deepInclude(userTCForkBind, FORK_CALL_DATA); - expect(utcfcwp.password).equal(undefined); + const gaiaProto = gof( gaia ); + expect( gof( gaiaProto ) ).equal( process ); + + expect( overMoreCallEvenMoreProcess ).instanceof( overMore.EvenMore ); + expect( overMoreCallEvenMoreProcess ).instanceof( evenMore ); + assert.isFunction( overMoreCallEvenMoreProcess.on ); + } ); + + it( 'direct primitive DAG.call(new Boolean) should work', () => { + expect( userTCdirectDAG ).instanceof( UserTypeConstructor ); + expect( userTCdirectDAG ).instanceof( Boolean ); + expect( userTCdirectDAG + 1 ).equal( 2 ); + } ); + + it( 'direct primitive DAG somethin.fork.call(new Boolean) should work', () => { + expect( userTCforkDAG ).instanceof( UserTypeConstructor ); + expect( userTCforkDAG ).instanceof( Boolean ); + expect( userTCforkDAG + 1 ).equal( 2 ); + } ); + + it( 'instance.fork.call() should work + SomeType.SomeSubType', () => { + expect( userTCForkCall ).instanceof( UserTypeConstructor ); + expect( userTCForkCall ).instanceof( UserType ); + expect( userTCForkCall ).instanceof( user ); + expect( userTCForkApply ).instanceof( UserTypeConstructor ); + expect( userTCForkApply ).instanceof( UserType ); + expect( userTCForkApply ).instanceof( user ); + expect( userTCForkBind ).instanceof( UserTypeConstructor ); + expect( userTCForkBind ).instanceof( UserType ); + expect( userTCForkBind ).instanceof( user ); + assert.equal( user.__args__[ 0 ], USER_DATA ); + assert.equal( userTC.__args__[ 0 ], USER_DATA ); + assert.deepEqual( userTCForkCall.__args__[ 0 ], FORK_CALL_DATA ); + assert.deepEqual( userTCForkApply.__args__[ 0 ], FORK_CALL_DATA ); + assert.deepEqual( userTCForkBind.__args__[ 0 ], FORK_CALL_DATA ); + assert.deepInclude( userTCForkCall, FORK_CALL_DATA ); + assert.deepInclude( userTCForkApply, FORK_CALL_DATA ); + assert.deepInclude( userTCForkBind, FORK_CALL_DATA ); + expect( utcfcwp.password ).equal( undefined ); // debugger; const { EvenMore } = OverMore; - expect(overMore).instanceof(OverMore); - expect(overMore).instanceof(moreOver); - expect(evenMore).instanceof(EvenMore); - expect(evenMore).instanceof(OverMore); - expect(evenMore).instanceof(overMore); - expect(evenMoreForkCall).instanceof(EvenMore); - expect(evenMoreForkCall).instanceof(UserType); - expect(evenMoreForkCall).instanceof(user); - }); - - }); + expect( overMore ).instanceof( OverMore ); + expect( overMore ).instanceof( moreOver ); + expect( evenMore ).instanceof( EvenMore ); + expect( evenMore ).instanceof( OverMore ); + expect( evenMore ).instanceof( overMore ); + expect( evenMoreForkCall ).instanceof( EvenMore ); + expect( evenMoreForkCall ).instanceof( UserType ); + expect( evenMoreForkCall ).instanceof( user ); + } ); + + } ); }; diff --git a/test/nested.js b/test/nested.js index c12dcee..2ecbcd6 100644 --- a/test/nested.js +++ b/test/nested.js @@ -2,15 +2,15 @@ const ogp = Object.getPrototypeOf; -const hop = (o, p) => Object.prototype.hasOwnProperty.call(o, p); +const hop = ( o, p ) => Object.prototype.hasOwnProperty.call( o, p ); -const { assert, expect } = require('chai'); +const { assert, expect } = require( 'chai' ); const { defaultTypes: types, -} = require('..'); +} = require( '..' ); -const tests = (opts) => { +const tests = ( opts ) => { const { user, @@ -24,106 +24,105 @@ const tests = (opts) => { USER_DATA } = opts; - describe('nested type with old style check', () => { - it('actually do construction', () => { - assert.instanceOf(userPL1, types.UserType.subtypes.get('UserTypePL1')); - assert.instanceOf(userPL1, user.UserTypePL1); - assert.equal(ogp(ogp(ogp(userPL1))), user); - assert.equal(ogp(ogp(ogp(userPL2))), user); - }); - it('actually do construction with nested methods', () => { - assert.equal(userPL2.getSign(), 'pl_2'); - }); - it('.constructor.name is correct', () => { - assert.equal(userPL1.constructor.name, 'UserTypePL1'); - }); - it('.prototype is correct', () => { - expect(userPL1.constructor.prototype).to.be.an('object') - .that.includes(pl1Proto); - Object.entries(pl1Proto).forEach(entry => { + describe( 'nested type with old style check', () => { + it( 'actually do construction', () => { + assert.instanceOf( userPL1, types.UserType.subtypes.get( 'UserTypePL1' ) ); + assert.instanceOf( userPL1, user.UserTypePL1 ); + assert.equal( ogp( ogp( ogp( userPL1 ) ) ), user ); + assert.equal( ogp( ogp( ogp( userPL2 ) ) ), user ); + } ); + it( 'actually do construction with nested methods', () => { + assert.equal( userPL2.getSign(), 'pl_2' ); + } ); + it( '.constructor.name is correct', () => { + assert.equal( userPL1.constructor.name, 'UserTypePL1' ); + } ); + it( '.prototype is correct', () => { + expect( userPL1.constructor.prototype ).to.be.an( 'object' ) + .that.includes( pl1Proto ); + Object.entries( pl1Proto ).forEach( entry => { const [ key, value ] = entry; - assert.equal(userPL1[ key ], value); - }); - }); - it('definition is correct', () => { + assert.equal( userPL1[ key ], value ); + } ); + } ); + it( 'definition is correct', () => { const checker = { user_pl_1_sign : 'pl_1', }; - Object.entries(checker).forEach(entry => { + Object.entries( checker ).forEach( entry => { const [ key, value ] = entry; - assert.isTrue(hop(userPL1, key)); - assert.equal(userPL1[ key ], value); - }); - }); - }); + assert.isTrue( hop( userPL1, key ) ); + assert.equal( userPL1[ key ], value ); + } ); + } ); + } ); - describe('nested .getPrototypeOf(instence.constructor)', () => { - it('must follow constructor inheritance for classes', () => { - const protoConstructor = ogp(ogp(userPL2.constructor)); - assert.equal(protoConstructor, user.constructor); - }); - }); + describe( 'nested .getPrototypeOf(instence.constructor)', () => { + it( 'must follow constructor inheritance for classes', () => { + const protoConstructor = ogp( ogp( userPL2.constructor ) ); + assert.equal( protoConstructor, user.constructor ); + } ); + } ); - describe('nested type with new style check', () => { - it('actually do construction', () => { - assert.instanceOf(userPL2, types.UserType.subtypes.get('UserTypePL2')); - assert.instanceOf(userPL2, user.UserTypePL2); + describe( 'nested type with new style check', () => { + it( 'actually do construction', () => { + assert.instanceOf( userPL2, types.UserType.subtypes.get( 'UserTypePL2' ) ); + assert.instanceOf( userPL2, user.UserTypePL2 ); // assert.notInstanceOf(userPL2, Shaper); - debugger; const shouldNot = userPL2 instanceof userPL2.constructor.Shaper; - assert.equal(shouldNot, false); - }); - it('.constructor.name is correct', () => { - assert.equal(userPL2.constructor.name, 'UserTypePL2'); - }); - it('can construct without "new" keyword', () => { - assert.instanceOf(userPL_NoNew, types.UserType); + assert.equal( shouldNot, false ); + } ); + it( '.constructor.name is correct', () => { + assert.equal( userPL2.constructor.name, 'UserTypePL2' ); + } ); + it( 'can construct without "new" keyword', () => { + assert.instanceOf( userPL_NoNew, types.UserType ); // debugger; - assert.instanceOf(userPL_NoNew, types.UserType.subtypes.get('UserTypePL2')); - }); - it('and insanceof stays ok', () => { - assert.instanceOf(userPL_NoNew, user.UserTypePL2); - }); - it('and even for sibling type', () => { - assert.instanceOf(userPL_1_2, userPL1.UserTypePL2); - }); - it('and for sibling type constructed without "new"', () => { - assert.instanceOf(userPL_NoNew, userPL1.UserTypePL2); - }); - it('.prototype is correct', () => { - expect(userPL2.constructor.prototype) - .to.be.an('object') - .that.includes(pl2Proto); - }); - it('definitions are correct 4 class instances', () => { - const checker = Object.assign({ + assert.instanceOf( userPL_NoNew, types.UserType.subtypes.get( 'UserTypePL2' ) ); + } ); + it( 'and insanceof stays ok', () => { + assert.instanceOf( userPL_NoNew, user.UserTypePL2 ); + } ); + it( 'and even for sibling type', () => { + assert.instanceOf( userPL_1_2, userPL1.UserTypePL2 ); + } ); + it( 'and for sibling type constructed without "new"', () => { + assert.instanceOf( userPL_NoNew, userPL1.UserTypePL2 ); + } ); + it( '.prototype is correct', () => { + expect( userPL2.constructor.prototype ) + .to.be.an( 'object' ) + .that.includes( pl2Proto ); + } ); + it( 'definitions are correct 4 class instances', () => { + const checker = Object.assign( { user_pl_2_sign : 'pl_2', description : UserTypeProto.description - }, USER_DATA, pl2Proto); - Object.keys(USER_DATA).forEach(key => { - assert.isFalse(hop(userPL2[ key ], key)); - assert.equal(userPL2[ key ], USER_DATA[ key ]); - }); + }, USER_DATA, pl2Proto ); + Object.keys( USER_DATA ).forEach( key => { + assert.isFalse( hop( userPL2[ key ], key ) ); + assert.equal( userPL2[ key ], USER_DATA[ key ] ); + } ); - Object.entries(checker).forEach(entry => { + Object.entries( checker ).forEach( entry => { const [ key, value ] = entry; - assert.equal(userPL2[ key ], value); - }); - }); - it('definitions are correct for general', () => { - const checker = Object.assign({ + assert.equal( userPL2[ key ], value ); + } ); + } ); + it( 'definitions are correct for general', () => { + const checker = Object.assign( { user_pl_1_sign : 'pl_1', description : UserTypeProto.description - }, USER_DATA, pl1Proto); - Object.keys(USER_DATA).forEach(key => { - assert.isFalse(hop(userPL1[ key ], key)); - }); - Object.entries(checker).forEach(entry => { + }, USER_DATA, pl1Proto ); + Object.keys( USER_DATA ).forEach( key => { + assert.isFalse( hop( userPL1[ key ], key ) ); + } ); + Object.entries( checker ).forEach( entry => { const [ key, value ] = entry; - assert.equal(userPL1[ key ], value); - }); - }); - }); + assert.equal( userPL1[ key ], value ); + } ); + } ); + } ); }; module.exports = tests; diff --git a/test/nested.more.js b/test/nested.more.js index 3fa43c6..fb97a09 100644 --- a/test/nested.more.js +++ b/test/nested.more.js @@ -136,6 +136,7 @@ const tests = ( opts ) => { const constructors = collectConstructors( evenMore ); const constructorsKeys = Object.keys( constructors ); + debugger; var base = types; // debugger; @@ -173,10 +174,16 @@ const tests = ( opts ) => { if ( !props ) { return; } + debugger; const { idx, name, iof } = props; const str = `${idx} evenMore instanceof ${name}`; it( `must be true : ${str}`, () => { - assert.isTrue( iof, str ); + try { + assert.isTrue( iof, str ); + } catch ( error ) { + debugger; + idx; name; iof; + } } ); } ); } ); diff --git a/test/parse.js b/test/parse.js index 3fa0296..208f123 100644 --- a/test/parse.js +++ b/test/parse.js @@ -1,17 +1,17 @@ 'use strict'; -const { assert, expect } = require('chai'); +const { assert, expect } = require( 'chai' ); const { SymbolConstructorName, - SymbolDefaultNamespace, + MNEMONICA, utils: { parse }, errors, -} = require('..'); +} = require( '..' ); -const tests = (opts) => { +const tests = ( opts ) => { const { user, @@ -22,119 +22,119 @@ const tests = (opts) => { EmptyType, } = opts; - describe('parse tests', () => { + describe( 'parse tests', () => { - const samples = require('./parseSamples'); + const samples = require( './parseSamples' ); try { - parse(null); - } catch (error) { - it('expect wrong parse invocation throw', () => { - expect(error).to.be.an - .instanceof(errors - .WRONG_MODIFICATION_PATTERN); - expect(error).to.be.an - .instanceof(Error); - }); + parse( null ); + } catch ( error ) { + it( 'expect wrong parse invocation throw', () => { + expect( error ).to.be.an + .instanceof( errors + .WRONG_MODIFICATION_PATTERN ); + expect( error ).to.be.an + .instanceof( Error ); + } ); } try { - parse(Object.getPrototypeOf(user)); - } catch (error) { - it('expect wrong parse invocation throw', () => { - expect(error).to.be.an - .instanceof(errors - .WRONG_ARGUMENTS_USED); - expect(error).to.be.an - .instanceof(Error); - }); + parse( Object.getPrototypeOf( user ) ); + } catch ( error ) { + it( 'expect wrong parse invocation throw', () => { + expect( error ).to.be.an + .instanceof( errors + .WRONG_ARGUMENTS_USED ); + expect( error ).to.be.an + .instanceof( Error ); + } ); } try { - parse(Object.getPrototypeOf(Object.getPrototypeOf(userPL1))); - } catch (error) { - it('expect wrong parse invocation throw', () => { - expect(error).to.be.an - .instanceof(errors - .WRONG_ARGUMENTS_USED); - expect(error).to.be.an - .instanceof(Error); - }); + parse( Object.getPrototypeOf( Object.getPrototypeOf( userPL1 ) ) ); + } catch ( error ) { + it( 'expect wrong parse invocation throw', () => { + expect( error ).to.be.an + .instanceof( errors + .WRONG_ARGUMENTS_USED ); + expect( error ).to.be.an + .instanceof( Error ); + } ); } - - const parsedUser = parse(user); - const parsedUserTC = parse(userTC); + + const parsedUser = parse( user ); + const parsedUserTC = parse( userTC ); const results = { parsedUser, - parsedUserPL1 : parse(userPL1), - parsedUserPL2 : parse(userPL2), + parsedUserPL1 : parse( userPL1 ), + parsedUserPL2 : parse( userPL2 ), parsedUserTC, - parsedEvenMore : parse(evenMore), + parsedEvenMore : parse( evenMore ), }; - it('expect proper first instance in chain constructor', () => { - assert.equal(parsedUser.self[ SymbolConstructorName ], SymbolDefaultNamespace); - assert.equal(parsedUser.parent.self[ SymbolConstructorName ], SymbolDefaultNamespace); - assert.equal(parsedUserTC.self[ SymbolConstructorName ], SymbolDefaultNamespace); - assert.equal(parsedUserTC.parent.self[ SymbolConstructorName ], SymbolDefaultNamespace); - }); + it( 'expect proper first instance in chain constructor', () => { + assert.equal( parsedUser.self[ SymbolConstructorName ], MNEMONICA ); + assert.equal( parsedUser.parent.self[ SymbolConstructorName ], MNEMONICA ); + assert.equal( parsedUserTC.self[ SymbolConstructorName ], MNEMONICA ); + assert.equal( parsedUserTC.parent.self[ SymbolConstructorName ], MNEMONICA ); + } ); - it('should be ok with broken constructor chain', () => { + it( 'should be ok with broken constructor chain', () => { const oneElseEmpty = new EmptyType(); - const oneElseEmptyProto = Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(oneElseEmpty))); + const oneElseEmptyProto = Object.getPrototypeOf( Object.getPrototypeOf( Object.getPrototypeOf( oneElseEmpty ) ) ); - expect(() => { + expect( () => { oneElseEmptyProto[ SymbolConstructorName ] = undefined; - }).to.throw; - expect(() => { + } ).to.throw; + expect( () => { delete oneElseEmptyProto[ SymbolConstructorName ]; - }).to.throw; - }); + } ).to.throw; + } ); let count = 0; - const compare = (result, sample) => { - Object.entries(result).forEach(entry => { + const compare = ( result, sample ) => { + Object.entries( result ).forEach( entry => { const [ name, value ] = entry; const sampleValue = sample[ name ]; - if (name === 'parent') { - return compare(value, sampleValue); + if ( name === 'parent' ) { + return compare( value, sampleValue ); } - if (name === 'self') { - it(`parse results should have same "self" with samples for ${name}`, () => { + if ( name === 'self' ) { + it( `parse results should have same "self" with samples for ${name}`, () => { count++; - assert.deepOwnInclude(value, sampleValue); - assert.deepOwnInclude(sampleValue, value); - }); + assert.deepOwnInclude( value, sampleValue ); + assert.deepOwnInclude( sampleValue, value ); + } ); return; } - if (name === 'proto') { - it(`parse results should have same "proto" with samples for ${name}`, () => { + if ( name === 'proto' ) { + it( `parse results should have same "proto" with samples for ${name}`, () => { count++; // assert.deepInclude(value, sampleValue); - assert.deepInclude(sampleValue, value); - }); + assert.deepInclude( sampleValue, value ); + } ); return; } - it(`parse results should have same props with samples for "${name}"`, () => { + it( `parse results should have same props with samples for "${name}"`, () => { count++; - assert.deepEqual(value, sampleValue); - }); - }); + assert.deepEqual( value, sampleValue ); + } ); + } ); }; - Object.keys(results).forEach(key => { - compare(samples[ key ], results[ key ]); - }); + Object.keys( results ).forEach( key => { + compare( samples[ key ], results[ key ] ); + } ); - it('should have exactly 60 amount of generated results~sample parse tests', () => { - assert.equal(count, 60); - }); + it( 'should have exactly 60 amount of generated results~sample parse tests', () => { + assert.equal( count, 60 ); + } ); - }); + } ); };