meocord 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function define(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}),a[b]}function wrap(b,d,e,f){var g=d&&d.prototype instanceof Generator?d:Generator,i=Object.create(g.prototype),a=new Context(f||[]);return h(i,"_invoke",{value:makeInvokeMethod(b,e,a)}),i}function tryCatch(a,b,c){try{return{type:"normal",arg:a.call(b,c)}}catch(a){return{type:"throw",arg:a}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(a){["next","throw","return"].forEach(function(b){define(a,b,function(a){return this._invoke(b,a)})})}function AsyncIterator(b,d){function invoke(e,f,g,i){var a=tryCatch(b[e],b,f);if("throw"!==a.type){var c=a.arg,k=c.value;return k&&"object"==_typeof(k)&&j.call(k,"__await")?d.resolve(k.__await).then(function(a){invoke("next",a,g,i)},function(a){invoke("throw",a,g,i)}):d.resolve(k).then(function(a){c.value=a,g(c)},function(a){return invoke("throw",a,g,i)})}i(a.arg)}var a;h(this,"_invoke",{value:function value(b,c){function callInvokeWithMethodAndArg(){return new d(function(a,d){invoke(b,c,a,d)})}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(a,d,e){var f="suspendedStart";return function(g,h){if(f==="executing")throw Error("Generator is already running");if("completed"===f){if("throw"===g)throw h;return{value:b,done:!0}}for(e.method=g,e.arg=h;;){var i=e.delegate;if(i){var j=maybeInvokeDelegate(i,e);if(j){if(j===m)continue;return j}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===f)throw f="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);f="executing";var k=tryCatch(a,d,e);if("normal"===k.type){if(f=e.done?"completed":"suspendedYield",k.arg===m)continue;return{value:k.arg,done:e.done}}"throw"===k.type&&(f="completed",e.method="throw",e.arg=k.arg)}}}function maybeInvokeDelegate(c,d){var e=d.method,f=c.iterator[e];if(f===b)return d.delegate=null,"throw"===e&&c.iterator["return"]&&(d.method="return",d.arg=b,maybeInvokeDelegate(c,d),"throw"===d.method)||"return"!==e&&(d.method="throw",d.arg=new TypeError("The iterator does not provide a '"+e+"' method")),m;var g=tryCatch(f,c.iterator,d.arg);if("throw"===g.type)return d.method="throw",d.arg=g.arg,d.delegate=null,m;var h=g.arg;return h?h.done?(d[c.resultName]=h.value,d.next=c.nextLoc,"return"!==d.method&&(d.method="next",d.arg=b),d.delegate=null,m):h:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,m)}function pushTryEntry(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}function resetTryEntry(a){var b=a.completion||{};b.type="normal",delete b.arg,a.completion=b}function Context(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(pushTryEntry,this),this.reset(!0)}function values(a){if(a||""===a){var c=a[l];if(c)return c.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var d=-1,e=function next(){for(;++d<a.length;)if(j.call(a,d))return next.value=a[d],next.done=!1,next;return next.value=b,next.done=!0,next};return e.next=e}}throw new TypeError(_typeof(a)+" is not iterable")}_regeneratorRuntime=function _regeneratorRuntime(){return f};var b,f={},e=Object.prototype,j=e.hasOwnProperty,h=Object.defineProperty||function(a,b,c){a[b]=c.value},k="function"==typeof Symbol?Symbol:{},l=k.iterator||"@@iterator",a=k.asyncIterator||"@@asyncIterator",c=k.toStringTag||"@@toStringTag";try{define({},"")}catch(a){define=function define(a,b,c){return a[b]=c}}f.wrap=wrap;var m={},i={};define(i,l,function(){return this});var n=Object.getPrototypeOf,d=n&&n(n(values([])));d&&d!==e&&j.call(d,l)&&(i=d);var o=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(i);return GeneratorFunction.prototype=GeneratorFunctionPrototype,h(o,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),h(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),f.isGeneratorFunction=function(a){var b="function"==typeof a&&a.constructor;return!!b&&(b===GeneratorFunction||"GeneratorFunction"===(b.displayName||b.name))},f.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,GeneratorFunctionPrototype):(a.__proto__=GeneratorFunctionPrototype,define(a,c,"GeneratorFunction")),a.prototype=Object.create(o),a},f.awrap=function(a){return{__await:a}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,a,function(){return this}),f.AsyncIterator=AsyncIterator,f.async=function(b,c,d,e,g){void 0===g&&(g=Promise);var h=new AsyncIterator(wrap(b,c,d,e),g);return f.isGeneratorFunction(c)?h:h.next().then(function(a){return a.done?a.value:h.next()})},defineIteratorMethods(o),define(o,c,"Generator"),define(o,l,function(){return this}),define(o,"toString",function(){return"[object Generator]"}),f.keys=function(a){var b=Object(a),c=[];for(var d in b)c.push(d);return c.reverse(),function next(){for(;c.length;){var a=c.pop();if(a in b)return next.value=a,next.done=!1,next}return next.done=!0,next}},f.values=values,Context.prototype={constructor:Context,reset:function reset(a){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(resetTryEntry),!a)for(var c in this)"t"===c.charAt(0)&&j.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=b)},stop:function stop(){this.done=!0;var a=this.tryEntries[0].completion;if("throw"===a.type)throw a.arg;return this.rval},dispatchException:function dispatchException(d){function handle(a,c){return h.type="throw",h.arg=d,e.next=a,c&&(e.method="next",e.arg=b),!!c}if(this.done)throw d;for(var e=this,f=this.tryEntries.length-1;0<=f;--f){var g=this.tryEntries[f],h=g.completion;if("root"===g.tryLoc)return handle("end");if(g.tryLoc<=this.prev){var k=j.call(g,"catchLoc"),l=j.call(g,"finallyLoc");if(k&&l){if(this.prev<g.catchLoc)return handle(g.catchLoc,!0);if(this.prev<g.finallyLoc)return handle(g.finallyLoc)}else if(!k){if(!l)throw Error("try statement without catch or finally");if(this.prev<g.finallyLoc)return handle(g.finallyLoc)}else if(this.prev<g.catchLoc)return handle(g.catchLoc,!0)}}},abrupt:function abrupt(b,c){for(var d,e=this.tryEntries.length-1;0<=e;--e)if(d=this.tryEntries[e],d.tryLoc<=this.prev&&j.call(d,"finallyLoc")&&this.prev<d.finallyLoc){var f=d;break}f&&("break"===b||"continue"===b)&&f.tryLoc<=c&&c<=f.finallyLoc&&(f=null);var g=f?f.completion:{};return g.type=b,g.arg=c,f?(this.method="next",this.next=f.finallyLoc,m):this.complete(g)},complete:function complete(a,b){if("throw"===a.type)throw a.arg;return"break"===a.type||"continue"===a.type?this.next=a.arg:"return"===a.type?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):"normal"===a.type&&b&&(this.next=b),m},finish:function finish(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.finallyLoc===a)return this.complete(b.completion,b.afterLoc),resetTryEntry(b),m},catch:function _catch(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.tryLoc===a){var d=b.completion;if("throw"===d.type){var f=d.arg;resetTryEntry(b)}return f}throw Error("illegal catch attempt")},delegateYield:function delegateYield(a,c,d){return this.delegate={iterator:values(a),resultName:c,nextLoc:d},"next"===this.method&&(this.arg=b),m}},f}function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function asyncGeneratorStep(b,d,f,e,g,h,a){try{var c=b[h](a),i=c.value}catch(a){return void f(a)}c.done?d(i):Promise.resolve(i).then(e,g)}function _asyncToGenerator(b){return function(){var c=this,d=arguments;return new Promise(function(e,f){function _next(a){asyncGeneratorStep(g,e,f,_next,_throw,"next",a)}function _throw(a){asyncGeneratorStep(g,e,f,_next,_throw,"throw",a)}var g=b.apply(c,d);_next(void 0)})}}/**
1
+ function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function define(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}),a[b]}function wrap(b,d,e,f){var g=d&&d.prototype instanceof Generator?d:Generator,i=Object.create(g.prototype),a=new Context(f||[]);return h(i,"_invoke",{value:makeInvokeMethod(b,e,a)}),i}function tryCatch(a,b,c){try{return{type:"normal",arg:a.call(b,c)}}catch(a){return{type:"throw",arg:a}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(a){["next","throw","return"].forEach(function(b){define(a,b,function(a){return this._invoke(b,a)})})}function AsyncIterator(b,d){function invoke(e,f,g,i){var a=tryCatch(b[e],b,f);if("throw"!==a.type){var c=a.arg,k=c.value;return k&&"object"==_typeof(k)&&j.call(k,"__await")?d.resolve(k.__await).then(function(a){invoke("next",a,g,i)},function(a){invoke("throw",a,g,i)}):d.resolve(k).then(function(a){c.value=a,g(c)},function(a){return invoke("throw",a,g,i)})}i(a.arg)}var a;h(this,"_invoke",{value:function value(b,c){function callInvokeWithMethodAndArg(){return new d(function(a,d){invoke(b,c,a,d)})}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(a,d,e){var f="suspendedStart";return function(g,h){if(f==="executing")throw Error("Generator is already running");if("completed"===f){if("throw"===g)throw h;return{value:b,done:!0}}for(e.method=g,e.arg=h;;){var i=e.delegate;if(i){var j=maybeInvokeDelegate(i,e);if(j){if(j===m)continue;return j}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===f)throw f="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);f="executing";var k=tryCatch(a,d,e);if("normal"===k.type){if(f=e.done?"completed":"suspendedYield",k.arg===m)continue;return{value:k.arg,done:e.done}}"throw"===k.type&&(f="completed",e.method="throw",e.arg=k.arg)}}}function maybeInvokeDelegate(c,d){var e=d.method,f=c.iterator[e];if(f===b)return d.delegate=null,"throw"===e&&c.iterator["return"]&&(d.method="return",d.arg=b,maybeInvokeDelegate(c,d),"throw"===d.method)||"return"!==e&&(d.method="throw",d.arg=new TypeError("The iterator does not provide a '"+e+"' method")),m;var g=tryCatch(f,c.iterator,d.arg);if("throw"===g.type)return d.method="throw",d.arg=g.arg,d.delegate=null,m;var h=g.arg;return h?h.done?(d[c.resultName]=h.value,d.next=c.nextLoc,"return"!==d.method&&(d.method="next",d.arg=b),d.delegate=null,m):h:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,m)}function pushTryEntry(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}function resetTryEntry(a){var b=a.completion||{};b.type="normal",delete b.arg,a.completion=b}function Context(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(pushTryEntry,this),this.reset(!0)}function values(a){if(a||""===a){var c=a[l];if(c)return c.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var d=-1,e=function next(){for(;++d<a.length;)if(j.call(a,d))return next.value=a[d],next.done=!1,next;return next.value=b,next.done=!0,next};return e.next=e}}throw new TypeError(_typeof(a)+" is not iterable")}_regeneratorRuntime=function _regeneratorRuntime(){return f};var b,f={},e=Object.prototype,j=e.hasOwnProperty,h=Object.defineProperty||function(a,b,c){a[b]=c.value},k="function"==typeof Symbol?Symbol:{},l=k.iterator||"@@iterator",a=k.asyncIterator||"@@asyncIterator",c=k.toStringTag||"@@toStringTag";try{define({},"")}catch(a){define=function define(a,b,c){return a[b]=c}}f.wrap=wrap;var m={},i={};define(i,l,function(){return this});var n=Object.getPrototypeOf,d=n&&n(n(values([])));d&&d!==e&&j.call(d,l)&&(i=d);var o=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(i);return GeneratorFunction.prototype=GeneratorFunctionPrototype,h(o,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),h(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),f.isGeneratorFunction=function(a){var b="function"==typeof a&&a.constructor;return!!b&&(b===GeneratorFunction||"GeneratorFunction"===(b.displayName||b.name))},f.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,GeneratorFunctionPrototype):(a.__proto__=GeneratorFunctionPrototype,define(a,c,"GeneratorFunction")),a.prototype=Object.create(o),a},f.awrap=function(a){return{__await:a}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,a,function(){return this}),f.AsyncIterator=AsyncIterator,f.async=function(b,c,d,e,g){void 0===g&&(g=Promise);var h=new AsyncIterator(wrap(b,c,d,e),g);return f.isGeneratorFunction(c)?h:h.next().then(function(a){return a.done?a.value:h.next()})},defineIteratorMethods(o),define(o,c,"Generator"),define(o,l,function(){return this}),define(o,"toString",function(){return"[object Generator]"}),f.keys=function(a){var b=Object(a),c=[];for(var d in b)c.push(d);return c.reverse(),function next(){for(;c.length;){var a=c.pop();if(a in b)return next.value=a,next.done=!1,next}return next.done=!0,next}},f.values=values,Context.prototype={constructor:Context,reset:function reset(a){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(resetTryEntry),!a)for(var c in this)"t"===c.charAt(0)&&j.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=b)},stop:function stop(){this.done=!0;var a=this.tryEntries[0].completion;if("throw"===a.type)throw a.arg;return this.rval},dispatchException:function dispatchException(d){function handle(a,c){return h.type="throw",h.arg=d,e.next=a,c&&(e.method="next",e.arg=b),!!c}if(this.done)throw d;for(var e=this,f=this.tryEntries.length-1;0<=f;--f){var g=this.tryEntries[f],h=g.completion;if("root"===g.tryLoc)return handle("end");if(g.tryLoc<=this.prev){var k=j.call(g,"catchLoc"),l=j.call(g,"finallyLoc");if(k&&l){if(this.prev<g.catchLoc)return handle(g.catchLoc,!0);if(this.prev<g.finallyLoc)return handle(g.finallyLoc)}else if(!k){if(!l)throw Error("try statement without catch or finally");if(this.prev<g.finallyLoc)return handle(g.finallyLoc)}else if(this.prev<g.catchLoc)return handle(g.catchLoc,!0)}}},abrupt:function abrupt(b,c){for(var d,e=this.tryEntries.length-1;0<=e;--e)if(d=this.tryEntries[e],d.tryLoc<=this.prev&&j.call(d,"finallyLoc")&&this.prev<d.finallyLoc){var f=d;break}f&&("break"===b||"continue"===b)&&f.tryLoc<=c&&c<=f.finallyLoc&&(f=null);var g=f?f.completion:{};return g.type=b,g.arg=c,f?(this.method="next",this.next=f.finallyLoc,m):this.complete(g)},complete:function complete(a,b){if("throw"===a.type)throw a.arg;return"break"===a.type||"continue"===a.type?this.next=a.arg:"return"===a.type?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):"normal"===a.type&&b&&(this.next=b),m},finish:function finish(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.finallyLoc===a)return this.complete(b.completion,b.afterLoc),resetTryEntry(b),m},catch:function _catch(a){for(var b,c=this.tryEntries.length-1;0<=c;--c)if(b=this.tryEntries[c],b.tryLoc===a){var d=b.completion;if("throw"===d.type){var f=d.arg;resetTryEntry(b)}return f}throw Error("illegal catch attempt")},delegateYield:function delegateYield(a,c,d){return this.delegate={iterator:values(a),resultName:c,nextLoc:d},"next"===this.method&&(this.arg=b),m}},f}function _slicedToArray(a,b){return _arrayWithHoles(a)||_iterableToArrayLimit(a,b)||_unsupportedIterableToArray(a,b)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(b,c){if(b){if("string"==typeof b)return _arrayLikeToArray(b,c);var a={}.toString.call(b).slice(8,-1);return"Object"===a&&b.constructor&&(a=b.constructor.name),"Map"===a||"Set"===a?Array.from(b):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(b,c):void 0}}function _arrayLikeToArray(b,c){(null==c||c>b.length)&&(c=b.length);for(var d=0,f=Array(c);d<c;d++)f[d]=b[d];return f}function _iterableToArrayLimit(b,c){var d=null==b?null:"undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(null!=d){var g,h,j,k,l=[],a=!0,m=!1;try{if(j=(d=d.call(b)).next,0===c){if(Object(d)!==d)return;a=!1}else for(;!(a=(g=j.call(d)).done)&&(l.push(g.value),l.length!==c);a=!0);}catch(a){m=!0,h=a}finally{try{if(!a&&null!=d["return"]&&(k=d["return"](),Object(k)!==k))return}finally{if(m)throw h}}return l}}function _arrayWithHoles(a){if(Array.isArray(a))return a}function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function asyncGeneratorStep(b,d,f,e,g,h,a){try{var c=b[h](a),i=c.value}catch(a){return void f(a)}c.done?d(i):Promise.resolve(i).then(e,g)}function _asyncToGenerator(b){return function(){var c=this,d=arguments;return new Promise(function(e,f){function _next(a){asyncGeneratorStep(g,e,f,_next,_throw,"next",a)}function _throw(a){asyncGeneratorStep(g,e,f,_next,_throw,"throw",a)}var g=b.apply(c,d);_next(void 0)})}}/**
2
2
  * MeoCord Framework
3
3
  * Copyright (C) 2025 Ukasyah Rahmatullah Zada
4
4
  *
@@ -14,7 +14,7 @@ function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright
14
14
  *
15
15
  * You should have received a copy of the GNU General Public License
16
16
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
- */import path from"path";import{findModulePackageDir}from"./common.util.js";import{existsSync,mkdirSync,readFileSync,rmSync,writeFileSync}from"fs";import{fixJSON}from"./json.util.js";import{createRequire}from"module";import webpack from"webpack";import NodeExternals from"webpack-node-externals";import{TsconfigPathsPlugin}from"tsconfig-paths-webpack-plugin";var require=createRequire(import.meta.url),tempOutputDir=path.resolve(process.cwd(),"dist",".meocord-temp");/**
17
+ */import path from"path";import{findModulePackageDir}from"./common.util.js";import{existsSync,mkdirSync,readFileSync,rmSync,writeFileSync}from"fs";import{fixJSON}from"./json.util.js";import{createRequire}from"module";import webpack from"webpack";import NodeExternals from"webpack-node-externals";import{TsconfigPathsPlugin}from"tsconfig-paths-webpack-plugin";var require=createRequire(import.meta.url),tempOutputDir=path.resolve(process.cwd(),".meocord-temp");/**
18
18
  * Compiles the TypeScript configuration file (meocord.config.ts) to JavaScript
19
19
  * and stores it in the temporary directory.
20
20
  *
@@ -24,4 +24,4 @@ function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright
24
24
  * and returns it as a JavaScript object.
25
25
  *
26
26
  * @returns {MeoCordConfig | undefined} The loaded configuration object, or undefined if loading fails.
27
- */function _compileMeoCordConfig(){return _compileMeoCordConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var a,b,c,d,e,f,g,h,i;return _regeneratorRuntime().wrap(function _callee$(j){for(;1;)switch(j.prev=j.next){case 0:if(b=findModulePackageDir("meocord"),b){j.next=3;break}return j.abrupt("return",!1);case 3:if(c=path.resolve(process.cwd(),"tsconfig.build.json"),d=path.resolve(process.cwd(),"tsconfig.json"),existsSync(d)){j.next=7;break}throw new Error("tsconfig.json not found in: ".concat(process.cwd()));case 7:if(e=JSON.parse(fixJSON(readFileSync(d,"utf-8"))),f=function removeUndefinedKeys(a){Object.keys(a).forEach(function(b){void 0===a[b]?delete a[b]:"object"===_typeof(a[b])&&null!==a[b]&&f(a[b])})},g={compilerOptions:{tsBuildInfoFile:null,strict:!0,module:"NodeNext",target:"ESNext",moduleResolution:"NodeNext",esModuleInterop:!0,resolveJsonModule:!0,allowSyntheticDefaultImports:!0,sourceMap:!1,baseUrl:".",rootDir:".",outDir:tempOutputDir,paths:null===e||void 0===e||null===(a=e.compilerOptions)||void 0===a?void 0:a.paths,skipLibCheck:!0,noImplicitAny:!1,forceConsistentCasingInFileNames:!0},include:["meocord.config.ts"]},f(g),writeFileSync(c,fixJSON(JSON.stringify(g))),existsSync(c)){j.next=15;break}return console.error("[MeoCord] tsconfig.build.json file not found: ".concat(c)),j.abrupt("return",!1);case 15:return existsSync(tempOutputDir)||mkdirSync(tempOutputDir,{recursive:!0}),h={mode:"production"===process.env.NODE_ENV?"production":"development",entry:"meocord.config.ts",target:"node",externals:NodeExternals({importType:"module"}),experiments:{outputModule:!0},module:{rules:[{test:/\.ts$/,use:{loader:"ts-loader",options:{configFile:c}},exclude:/node_modules/}]},resolve:{plugins:[new TsconfigPathsPlugin({configFile:c})],extensions:[".ts",".js"]},output:{filename:"meocord.config.js",path:tempOutputDir,publicPath:tempOutputDir,library:{type:"module"}}},i=webpack(h),j.prev=18,j.next=21,new Promise(function(a,b){i.run(function(c,d){return c?(console.error("Build encountered an error: ".concat(c.message)),b("Build encountered an error: ".concat(c.message))):null!==d&&void 0!==d&&d.hasErrors()?(console.error("Build failed due to errors in the compilation process:",d.compilation.errors),b("Build encountered an error: ".concat(d.compilation.errors))):void i.close(function(c){return c?(console.error("Error occurred while closing the compiler: ".concat(c.message)),b("Error occurred while closing the compiler: ".concat(c.message))):void a(!0)})})});case 21:return j.abrupt("return",j.sent);case 24:return j.prev=24,j.t0=j["catch"](18),j.t0 instanceof Error?console.error("[MeoCord] Failed to transpile config: ".concat(j.t0.message)):console.error("[MeoCord] Failed to transpile config: Unknown error"),j.abrupt("return",!1);case 28:return j.prev=28,rmSync(c,{force:!0}),j.finish(28);case 31:case"end":return j.stop()}},_callee,null,[[18,24,28,31]])})),_compileMeoCordConfig.apply(this,arguments)}export function loadMeoCordConfig(){var a=findModulePackageDir("meocord");if(a){var b=path.join(tempOutputDir,"meocord.config.js");if(existsSync(b))try{return require(b)["default"]}catch(a){return void(a instanceof Error?console.error("[MeoCord] Failed to load config: ".concat(a.message)):console.error("[MeoCord] Failed to load config: Unknown error"))}}}
27
+ */function _compileMeoCordConfig(){return _compileMeoCordConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var a,b,c,d,e,f,g,h,i,j;return _regeneratorRuntime().wrap(function _callee$(k){for(;1;)switch(k.prev=k.next){case 0:if(b=findModulePackageDir("meocord"),b){k.next=3;break}return k.abrupt("return",!1);case 3:if(c=path.join(process.cwd(),".meocord-temp","tsconfig.build.json"),d=path.resolve(process.cwd(),"tsconfig.json"),existsSync(d)){k.next=7;break}throw new Error("tsconfig.json not found in: ".concat(process.cwd()));case 7:if(e=JSON.parse(fixJSON(readFileSync(d,"utf-8"))),f=function removeUndefinedKeys(a){Object.keys(a).forEach(function(b){void 0===a[b]?delete a[b]:"object"===_typeof(a[b])&&null!==a[b]&&f(a[b])})},g=null!==e&&void 0!==e&&null!==(a=e.compilerOptions)&&void 0!==a&&a.paths?Object.entries(e.compilerOptions.paths).reduce(function(a,b){var c=_slicedToArray(b,2),d=c[0],e=c[1];return a[d]=e.map(function(a){return path.resolve(process.cwd(),a)}),a},{}):{},h={compilerOptions:{tsBuildInfoFile:null,strict:!0,module:"ESNext",target:"ESNext",moduleResolution:"Bundler",esModuleInterop:!0,resolveJsonModule:!0,allowSyntheticDefaultImports:!0,sourceMap:!1,baseUrl:path.resolve(process.cwd()),rootDir:path.resolve(process.cwd()),outDir:tempOutputDir,paths:g,skipLibCheck:!0,noImplicitAny:!1,forceConsistentCasingInFileNames:!0},include:[path.resolve(process.cwd(),"meocord.config.ts")]},f(h),existsSync(tempOutputDir)||mkdirSync(tempOutputDir,{recursive:!0}),writeFileSync(c,fixJSON(JSON.stringify(h))),existsSync(c)){k.next=17;break}return console.error("[MeoCord] tsconfig.build.json file not found: ".concat(c)),k.abrupt("return",!1);case 17:return i={mode:"production"===process.env.NODE_ENV?"production":"development",entry:path.join(process.cwd(),"meocord.config.ts"),target:"node",externals:NodeExternals({importType:"module"}),experiments:{outputModule:!0},module:{rules:[{test:/\.ts$/,use:{loader:"ts-loader",options:{configFile:c}},exclude:/node_modules/}]},resolve:{plugins:[new TsconfigPathsPlugin({configFile:c})],extensions:[".ts",".js"]},output:{filename:"meocord.config.js",path:tempOutputDir,publicPath:tempOutputDir,library:{type:"module"}}},j=webpack(i),k.prev=19,k.next=22,new Promise(function(a,b){j.run(function(c,d){return c?(console.error("Build encountered an error: ".concat(c.message)),b("Build encountered an error: ".concat(c.message))):null!==d&&void 0!==d&&d.hasErrors()?(console.error("Build failed due to errors in the compilation process:",d.compilation.errors),b("Build encountered an error: ".concat(d.compilation.errors))):void j.close(function(c){return c?(console.error("Error occurred while closing the compiler: ".concat(c.message)),b("Error occurred while closing the compiler: ".concat(c.message))):void a(!0)})})});case 22:return k.abrupt("return",k.sent);case 25:return k.prev=25,k.t0=k["catch"](19),k.t0 instanceof Error?console.error("[MeoCord] Failed to transpile config: ".concat(k.t0.message)):console.error("[MeoCord] Failed to transpile config: Unknown error"),k.abrupt("return",!1);case 29:return k.prev=29,rmSync(c,{force:!0}),k.finish(29);case 32:case"end":return k.stop()}},_callee,null,[[19,25,29,32]])})),_compileMeoCordConfig.apply(this,arguments)}export function loadMeoCordConfig(){var a=findModulePackageDir("meocord");if(a){var b=path.join(tempOutputDir,"meocord.config.js");if(existsSync(b))try{return require(b)["default"]}catch(a){return void(a instanceof Error?console.error("[MeoCord] Failed to load config: ".concat(a.message)):console.error("[MeoCord] Failed to load config: Unknown error"))}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "meocord",
3
3
  "description": "MeoCord is a lightweight and modular framework for building scalable Discord bots using TypeScript and Discord.js. It simplifies bot development with an extensible architecture, TypeScript-first approach, and powerful CLI tools.",
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "packageManager": "yarn@4.7.0",
6
6
  "type": "module",
7
7
  "scripts": {