@zenflux/core 0.1.19 → 0.1.21

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.
@@ -0,0 +1,11 @@
1
+ import { InitializeBase } from "@zenflux/core/src/bases/initialize-base";
2
+ export declare abstract class CacheBase<CacheResult> extends InitializeBase {
3
+ private readonly cache;
4
+ private cacheDebugger;
5
+ protected constructor(shouldDebugCache?: boolean);
6
+ protected getCache(key: string): CacheResult | undefined;
7
+ protected getCacheMap(): Map<string, CacheResult>;
8
+ protected setCache(key: string, value: CacheResult): void;
9
+ protected deleteCache(key: string): boolean;
10
+ protected deleteCacheWithPrefix(prefix: string): void;
11
+ }
@@ -3,3 +3,6 @@
3
3
  */
4
4
  export { ControllerBase } from "./controller-base";
5
5
  export { ObjectBase } from "./object-base";
6
+ export { InitializeBase } from "./initialize-base";
7
+ export { SingletonBase } from "./singleton-base";
8
+ export { CacheBase } from "./cache-base";
@@ -0,0 +1,6 @@
1
+ import { InitializeBase } from "@zenflux/core/src/bases/initialize-base";
2
+ export declare abstract class SingletonBase extends InitializeBase {
3
+ private static instances;
4
+ protected constructor();
5
+ protected static getInstance<T extends SingletonBase>(this: new () => T): T;
6
+ }
@@ -1,13 +1,34 @@
1
1
  /**
2
- * Bundled with love using the help of @zenflux/cli toolkit v0.1.38
3
- * Bundle name: @zenflux/core fileName: 'zenflux-core', built at Thu Nov 20 2025 12:34:10 GMT+0200 (Israel Standard Time)
2
+ * Bundled with love using the help of @zenflux/cli toolkit v0.1.42
3
+ * Bundle name: @zenflux/core fileName: 'zenflux-core', built at Thu Dec 11 2025 20:42:20 GMT+0200 (Israel Standard Time)
4
4
  */
5
5
 
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
+ var util = require('util');
11
+
10
12
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
13
+ function _interopNamespaceDefault(e) {
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n.default = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var util__namespace = /*#__PURE__*/_interopNamespaceDefault(util);
31
+
11
32
  class CommandAlreadyRegistered extends Error{constructor(command){super(`Command: '${command.getName()}' is already registered`);}}
12
33
 
13
34
  class CommandNotFound extends Error{constructor(command){super(`Command: '${command}' is not found`);}}
@@ -55,33 +76,6 @@ get restful () { return restful; }
55
76
 
56
77
  class ControllerBase extends ObjectBase{commands;restful;internal;static getName(){return "ZenFlux/Core/ControllerBase"}constructor(){super();this.initialize();}initialize(){this.register();this.setupHooks&&this.setupHooks();}register(){this.commands=commands.register(this.getCommands(),this);this.restful=restful.register(this.getRestful(),this);this.internal=internal.register(this.getInternal(),this);}getCommands(){return {}}getRestful(){return {}}getInternal(){return {}}setupHooks(){}}
57
78
 
58
- var index$1 = /*#__PURE__*/Object.freeze({
59
- __proto__: null,
60
- ControllerBase: ControllerBase,
61
- ObjectBase: ObjectBase
62
- });
63
-
64
- class CommandBase extends ObjectBase{static controller;args={};options={};logger;static getName(){return "ZenFlux/Core/CommandBases/CommandBase"}static setController(controller){if(this.controller){throw new ControllerAlreadySet(this.controller)}this.controller=controller;}static getController(){return this.controller}constructor(args={},options={}){super();const type=this.constructor;this.logger=new zCore.classes.Logger(type,{repeatedly:true});this.logger.startsWith(this.constructor,{args,options});this.initialize(args,options);}initialize(args,options){this.args=args;this.options=options;}apply(args=this.args,options=this.options){throw new ForceMethodImplementation(this,"apply")}async run(){return this.runInternal()}async runInternal(){this.onBeforeApply&&this.onBeforeApply();const result=await this.apply(this.args,this.options);this.onAfterApply&&this.onAfterApply();return result}}
65
-
66
- class CommandPublic extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandPublic"}}
67
-
68
- class CommandRestful extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandRestful"}getEndpoint(){throw new ForceMethodImplementation(this,"getEndpoint")}apply(args=this.args,options=this.options){const endpoint=this.applyEndpointFormat(this.getEndpoint(),args);return restful.getClient().fetch(endpoint,restful.currentHttpMethod,args||null)}applyEndpointFormat(endpoint,data={}){if(endpoint.includes("{")){endpoint=endpoint.split("/").map(endpointPart=>{const match=endpointPart.match("\\{(.*?)\\}");if(match?.length&&"undefined"!==typeof data[match[1]]){return data[match[1]]}return endpointPart}).join("/");}return endpoint}}
69
-
70
- class CommandInternal extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandInternal"}}
71
-
72
- var index = /*#__PURE__*/Object.freeze({
73
- __proto__: null,
74
- CommandBase: CommandBase,
75
- CommandInternal: CommandInternal,
76
- CommandPublic: CommandPublic,
77
- CommandRestful: CommandRestful
78
- });
79
-
80
- var indexPublic = /*#__PURE__*/Object.freeze({
81
- __proto__: null,
82
- ForceMethodImplementation: ForceMethodImplementation
83
- });
84
-
85
79
  const DEFAULT_LOG_LEVEL="5";function getEnvVar(key){if(typeof process!=="undefined"&&process?.env){return process.env[key]??process.env[`VITE_${key}`]}if(typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('zenflux-core.cjs', document.baseURI).href)) })!=="undefined"&&undefined){const env=undefined;return env[key]??env[`VITE_${key}`]}return undefined}function getLoggerDefaultLevel(){return DEFAULT_LOG_LEVEL}function getLoggerLogLevel(){const raw=getEnvVar("LOGGER_LOG_LEVEL");return parseInt(raw??DEFAULT_LOG_LEVEL,10)}function getLoggerTimeFormat(){return (getEnvVar("LOGGER_TIME_FORMAT")||"").trim()}function getLoggerLogLevelString(){switch(getLoggerLogLevel()){case 0:return "NONE";case 1:return "ERROR";case 2:return "WARN";case 3:return "ADMIN";case 4:return "INFO";case 5:return "LOG";case 6:return "DEBUG";default:return "UNKNOWN"}}function isLoggerDebugEnabled(){return getLoggerLogLevel()>=6}function isLoggerDisabled(){return getEnvVar("LOGGER_DISABLED")==="true"}function isLoggerPreviousSourceDisabled(){return getEnvVar("LOGGER_LOG_PREVIOUS_CALLER_SOURCE_DISABLED")==="true"}
86
80
 
87
81
  var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function getDefaultExportFromNamespaceIfPresent(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")?n["default"]:n}function getDefaultExportFromNamespaceIfNotNamed(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")&&Object.keys(n).length===1?n["default"]:n}function getAugmentedNamespace(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var f=n.default;if(typeof f=="function"){var a=function a(){var isInstance=false;try{isInstance=this instanceof a;}catch{}if(isInstance){return Reflect.construct(f,arguments,this.constructor)}return f.apply(this,arguments)};a.prototype=f.prototype;}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach(function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}});});return a}
@@ -110,9 +104,49 @@ let SimpleEventEmitter=class SimpleEventEmitter{listeners=new Map;on(event,callb
110
104
 
111
105
  const DEFAULT_LOG_PREFIX=pc.white("⚪ - [LOG]"),DEFAULT_INFO_PREFIX=pc.blue("🔵 - [INFO]"),DEFAULT_DEBUG_PREFIX=pc.gray("🟤 - [DEBUG]"),DEFAULT_WARN_PREFIX=pc.yellow("🟡 - [WARN]"),DEFAULT_ERROR_PREFIX=pc.red("🔴 - [ERROR]"),DEFAULT_ADMIN_PREFIX=pc.bold("🟣 - [ADMIN]");const LEVEL_LABELS={log:"LOG",info:"INFO",debug:"DEBUG",warn:"WARN",error:"ERROR",admin:"ADMIN"};const registeredNames={};class Logger extends LoggerBrowserInfra{static lastLogTime=Date.now();static timestampFormat=getLoggerTimeFormat();ownerName;messagePrefixes=[];config={};static setTimestampFormat(format){Logger.timestampFormat=(format||"").trim();}static getTimestampFormat(){return Logger.timestampFormat}static getName(){return "ZenFlux/Core/Modules/Logger"}static getLogLevelString(){return getLoggerLogLevelString()}static getLogLevel(){return getLoggerLogLevel()}static attachOutputListener(listener){return LoggerBrowserInfra.attachOutputSubscriber(listener)}static isDebugEnabled(){return isLoggerDebugEnabled()}constructor(owner,options){const{repeatedly=false,skipEventBusHook}=options||{};super(owner,{repeatedly});this.config={skipEventBusHook};this.ownerName=Logger.resolveOwnerName(owner);if(registeredNames[this.ownerName]){throw new Error(`Logger for '${this.ownerName}' already exists`)}registeredNames[this.ownerName]=true;if(isLoggerDisabled()){this.disableLoggers();return}if(isLoggerPreviousSourceDisabled()){this.getPreviousSource=()=>"";}switch(getLoggerLogLevel()){case 0:this.error=()=>{};case 1:this.warn=()=>{};case 2:this.admin=()=>{};case 3:this.info=()=>{};case 4:this.log=()=>{};case 5:this.debug=()=>{};}if(!this.config.skipEventBusHook){EventBus.$.registerMultiInstances(this,[this.outputEvent]);}}addMessagePrefix(prefix){this.messagePrefixes.push(prefix);}log(caller,message,...params){this.writeLog("log",DEFAULT_LOG_PREFIX,caller,message,...params);}info(caller,message,...params){this.writeLog("info",DEFAULT_INFO_PREFIX,caller,message,...params);}debug(caller,message,...params){this.writeLog("debug",DEFAULT_DEBUG_PREFIX,caller,message,...params);}warn(caller,message,...params){this.writeLog("warn",DEFAULT_WARN_PREFIX,caller,message,...params);}error(caller,message,...params){this.writeLog("error",DEFAULT_ERROR_PREFIX,caller,message,...params);}admin(caller,message,...params){this.writeLog("admin",DEFAULT_ADMIN_PREFIX,caller,message,...params);}startsEmpty(caller){this.printFunctionNotify("▶",caller,"");}startsWith(caller,params){this.printObjectEfficient("▶",caller,params);}dump(caller,params={},notice=""){for(const key in params){if(typeof params[key]==="object"){params[key]=JSON.stringify(LoggerBrowserInfra.useObjectMapper(params[key]),reduceCircularReferences());}this.printInLineElement("dp",caller,key,params[key],notice);}}drop(caller,according,data){for(const key in according){this.printInLineElement("dr",caller,key,according[key],"corresponding");}this.output(data);}throw(caller,output,name="null",params={}){this.printFunctionNotify("tw",caller,output);if(params){this.printInNextLineObject("tw",caller,name,params);}throw new Error().stack}beep(){console.log("\x07");}clone(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)}outputEvent(_prefix,_timeDiff,_source,_messagePrefix,_message,_params){}static resolveOwnerName(owner){if(typeof owner==="string"){return owner}if(owner instanceof ObjectBase){return owner.getName()}if(owner&&typeof owner.getName==="function"){return owner.getName()}return "UnknownOwner"}disableLoggers(){this.error=()=>{};this.warn=()=>{};this.admin=()=>{};this.info=()=>{};this.log=()=>{};this.debug=()=>{};}getStackTrace(){const stackTrace=(new Error().stack||"").split("\n");const stackLines=stackTrace.slice(1);const stackRegex=/ at (.+?) \((.+?)\)/;const result=[];for(const line of stackLines){const match=line.match(stackRegex);if(match){const[,context,file]=match;const parsedLine={context,file};if(line.startsWith("new")){parsedLine.isNew=true;parsedLine.object=context.split(" ")[1];}else if(context!=="Object.<anonymous>"){parsedLine.object=context;}result.push(parsedLine);}}return result}getPreviousSource(){const stack=this.getStackTrace().filter(line=>line.file.includes("/src/")).filter(line=>!line.file.includes("logger.ts")).filter(line=>!line.file.includes("debugger.ts")).filter(line=>!line.file.includes("/node_modules/"));let previousSource="";const previousCaller=stack[1]?.object?.split(".");if(previousCaller?.length>1){const previousCallerName=previousCaller[0],previousCallerMethod=previousCaller[1];previousSource=`${previousCallerName}::${previousCallerMethod}]`+"[";}return previousSource}writeLog(level,prefix,caller,message,...params){const callerName=this.getCallerName(caller);const source=this.getPreviousSource()+pc.white(`${this.ownerName}::${callerName}`);let messagePrefix="";if(this.messagePrefixes.length){messagePrefix=`[${this.messagePrefixes.join("][")}]`;}const timestampValue=Date.now();const timeDiff=(timestampValue-Logger.lastLogTime).toString().padStart(4,"0");const timeFormat=Logger.getTimestampFormat();const timestamp=timeFormat?this.formatTime(new Date(timestampValue),timeFormat):"";this.outputEvent(prefix,timeDiff,source,messagePrefix,message,params);const timestampPart=timestamp?`${timestamp} `:"";const output=`${timestampPart}${prefix}[+${timeDiff}ms][${source}]${messagePrefix}: ${message}`;const formatted=this.createBrowserFormat(level,callerName,messagePrefix,message);const metadata={id:`${timestampValue}-${Math.random().toString(16).slice(2)}`,level,namespace:this.ownerName,callerName,message,messagePrefix,payload:params.length===0?undefined:params.length===1?params[0]:params,timestamp:timestampValue,formatted};this.runWithOutputMetadata(metadata,()=>{this.output(output,...params);});Logger.lastLogTime=timestampValue;}createBrowserFormat(level,callerName,messagePrefix,message){const prefixLabel=LEVEL_LABELS[level]||level.toUpperCase();const prefixPart=messagePrefix?`${messagePrefix} `:"";return {format:`%c(${prefixLabel})-> %c%c${this.ownerName}%c::%c${callerName}%c() ${prefixPart}${message}%c`,styles:[...this.defaultStyle]}}formatTime(date,format){const pad=(num,size=2)=>num.toString().padStart(size,"0");const tokens={"YYYY":date.getFullYear().toString(),"Y":date.getFullYear().toString(),"M":pad(date.getMonth()+1),"D":pad(date.getDate()),"HH":pad(date.getHours()),"hh":pad(date.getHours()),"mm":pad(date.getMinutes()),"ss":pad(date.getSeconds()),"SSS":pad(date.getMilliseconds(),3),"S":pad(date.getMilliseconds(),3)};return format.replace(/YYYY|HH|hh|mm|ss|SSS|Y|M|D|S|h|m|s/g,token=>tokens[token]??token)}}
112
106
 
107
+ class InitializeBase extends ObjectBase{logger;constructor(shouldInitialize=true){super();this.logger=new Logger(this);if(this.initialize&&shouldInitialize){this.initialize();}}debounce(func,delay){let timeoutId;return (...args)=>{clearTimeout(timeoutId);timeoutId=setTimeout(()=>{func.apply(this,args);},delay);}}}
108
+
109
+ class SingletonBase extends InitializeBase{static instances=new Map;constructor(){super();}static getInstance(){if(!SingletonBase.instances.has(this)){SingletonBase.instances.set(this,new this);}return SingletonBase.instances.get(this)}}
110
+
111
+ function isDebugEnabled(type,name){return false}
112
+
113
+ class Debugger extends ObjectBase{shouldDebug;logger;static getName(){return "ZenFlux/Core/Modules/Debugger"}constructor(owner,prefix,shouldDebug=Logger.isDebugEnabled(),options){super(),this.shouldDebug=shouldDebug;if(shouldDebug){const loggerOptions=options?.skipEventBusHook?{skipEventBusHook:true}:undefined;this.logger=new Logger(owner,loggerOptions);if(prefix){this.logger.addMessagePrefix(prefix);}}else {this.log=()=>{};this.dumpDown=()=>{};this.enableCleanupDebug=()=>{};}}enableCleanupDebug(handle,id=""){if(!this.finalizationRegistry){this.finalizationRegistry=new FinalizationRegistry(id=>{this.log(this.constructor,`FinalizationRegistry: ${id}`);});}if(!id){id=handle.getName()+":"+handle.getUniqueId();}this.log(this.enableCleanupDebug,`Initialized: '${id}'`);this.finalizationRegistry.register(handle,id);}log(source,message,...args){if(args&&args.length>0){return this.logger.debug(source,message,...args)}this.logger.debug(source,message);}dumpDown(source,object,objectName=""){this.log(source,`${objectName?objectName+":":""} `+"🔽"+"\n"+pc.green(util__namespace.inspect(object,false,null,true)));}isEnabled(){return this.shouldDebug}}function createDebugger(owner,ownerType,prefix){const ownerName=typeof owner==="string"?owner:owner.getName();return new Debugger(owner,prefix,isDebugEnabled(ownerType,ownerName))}
114
+
115
+ class CacheBase extends InitializeBase{cache;cacheDebugger;constructor(shouldDebugCache=true){super();this.cacheDebugger=new Debugger(this,undefined,shouldDebugCache);this.cache=new Map;}getCache(key){this.cacheDebugger.log(this.getCache,`Getting cache for key: '${key}'`);const result=this.cache.get(key);if(result){this.cacheDebugger.log(this.getCache,`Got cache for key: '${key}'`);this.cacheDebugger.dumpDown(this.setCache,result);}return result}getCacheMap(){return this.cache}setCache(key,value){this.cacheDebugger.log(this.setCache,`Setting cache for key: '${key}'`);this.cacheDebugger.dumpDown(this.setCache,value);this.cache.set(key,value);}deleteCache(key){this.cacheDebugger.log(this.deleteCache,`Deleting cache for key: '${key}'`);if(!this.cache.has(key)){this.cacheDebugger.log(this.deleteCache,`Cache for key: '${key}' does not exist`);return false}return this.cache.delete(key)}deleteCacheWithPrefix(prefix){this.cacheDebugger.log(this.deleteCacheWithPrefix,`Deleting cache prefix: '${prefix}'`);for(const key of this.cache.keys()){if(key.startsWith(prefix)){this.deleteCache(key);}}}}
116
+
117
+ var index$1 = /*#__PURE__*/Object.freeze({
118
+ __proto__: null,
119
+ CacheBase: CacheBase,
120
+ ControllerBase: ControllerBase,
121
+ InitializeBase: InitializeBase,
122
+ ObjectBase: ObjectBase,
123
+ SingletonBase: SingletonBase
124
+ });
125
+
126
+ class CommandBase extends ObjectBase{static controller;args={};options={};logger;static getName(){return "ZenFlux/Core/CommandBases/CommandBase"}static setController(controller){if(this.controller){throw new ControllerAlreadySet(this.controller)}this.controller=controller;}static getController(){return this.controller}constructor(args={},options={}){super();const type=this.constructor;this.logger=new zCore.classes.Logger(type,{repeatedly:true});this.logger.startsWith(this.constructor,{args,options});this.initialize(args,options);}initialize(args,options){this.args=args;this.options=options;}apply(args=this.args,options=this.options){throw new ForceMethodImplementation(this,"apply")}async run(){return this.runInternal()}async runInternal(){this.onBeforeApply&&this.onBeforeApply();const result=await this.apply(this.args,this.options);this.onAfterApply&&this.onAfterApply();return result}}
127
+
128
+ class CommandPublic extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandPublic"}}
129
+
130
+ class CommandRestful extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandRestful"}getEndpoint(){throw new ForceMethodImplementation(this,"getEndpoint")}apply(args=this.args,options=this.options){const endpoint=this.applyEndpointFormat(this.getEndpoint(),args);return restful.getClient().fetch(endpoint,restful.currentHttpMethod,args||null)}applyEndpointFormat(endpoint,data={}){if(endpoint.includes("{")){endpoint=endpoint.split("/").map(endpointPart=>{const match=endpointPart.match("\\{(.*?)\\}");if(match?.length&&"undefined"!==typeof data[match[1]]){return data[match[1]]}return endpointPart}).join("/");}return endpoint}}
131
+
132
+ class CommandInternal extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandInternal"}}
133
+
134
+ var index = /*#__PURE__*/Object.freeze({
135
+ __proto__: null,
136
+ CommandBase: CommandBase,
137
+ CommandInternal: CommandInternal,
138
+ CommandPublic: CommandPublic,
139
+ CommandRestful: CommandRestful
140
+ });
141
+
142
+ var indexPublic = /*#__PURE__*/Object.freeze({
143
+ __proto__: null,
144
+ ForceMethodImplementation: ForceMethodImplementation
145
+ });
146
+
113
147
  var _package = {
114
148
  "name": "@zenflux/core",
115
- "version": "0.1.16",
149
+ "version": "0.1.20",
116
150
  "types": "dist/zenflux-core.d.ts",
117
151
  "type": "module",
118
152
  "files": [
@@ -132,14 +166,17 @@ var _package = {
132
166
  "types": "./dist/zenflux-core.d.ts"
133
167
  },
134
168
  "./dist/src/*": "./src/*",
135
- "./src/*": "./src/*",
169
+ "./src/*.ts": "./src/*.ts",
170
+ "./src/*": "./src/*.ts",
136
171
  "./src/bases": "./src/bases/index.ts",
172
+ "./src/bases/*": "./src/bases/*.ts",
137
173
  "./src/clients": "./src/clients/index.ts",
138
174
  "./src/command-bases": "./src/command-bases/index.ts",
139
175
  "./src/errors": "./src/errors/index.ts",
140
176
  "./src/interfaces": "./src/interfaces/index.ts",
141
177
  "./src/managers": "./src/managers/index.ts",
142
178
  "./src/modules/logger": "./src/modules/logger/index.ts",
179
+ "./src/modules/*": "./src/modules/*.ts",
143
180
  "./package.json": "./package.json"
144
181
  },
145
182
  "devDependencies": {
@@ -157,12 +194,12 @@ var _package = {
157
194
  }
158
195
  };
159
196
  const name = "@zenflux/core";
160
- const version = "0.1.16";
197
+ const version = "0.1.20";
161
198
  const types = "dist/zenflux-core.d.ts";
162
199
  const type = "module";
163
200
  const files = ["dist","types"];
164
201
  const scripts = {"@z-core--test":"jest","@z-core--build":"@z-cli @build","@z-core--dev":"@z-cli @watch --dev"};
165
- const exports$1 = {".":{"import":"./dist/zenflux-core.mjs","default":"./dist/zenflux-core.cjs","require":"./dist/zenflux-core.mjs.js","types":"./dist/zenflux-core.d.ts"},"./dist/src/*":"./src/*","./src/*":"./src/*","./src/bases":"./src/bases/index.ts","./src/clients":"./src/clients/index.ts","./src/command-bases":"./src/command-bases/index.ts","./src/errors":"./src/errors/index.ts","./src/interfaces":"./src/interfaces/index.ts","./src/managers":"./src/managers/index.ts","./src/modules/logger":"./src/modules/logger/index.ts","./package.json":"./package.json"};
202
+ const exports$1 = {".":{"import":"./dist/zenflux-core.mjs","default":"./dist/zenflux-core.cjs","require":"./dist/zenflux-core.mjs.js","types":"./dist/zenflux-core.d.ts"},"./dist/src/*":"./src/*","./src/*.ts":"./src/*.ts","./src/*":"./src/*.ts","./src/bases":"./src/bases/index.ts","./src/bases/*":"./src/bases/*.ts","./src/clients":"./src/clients/index.ts","./src/command-bases":"./src/command-bases/index.ts","./src/errors":"./src/errors/index.ts","./src/interfaces":"./src/interfaces/index.ts","./src/managers":"./src/managers/index.ts","./src/modules/logger":"./src/modules/logger/index.ts","./src/modules/*":"./src/modules/*.ts","./package.json":"./package.json"};
166
203
  const devDependencies = {"@jest/globals":"^29.7.0","@zenflux/cli":"workspace:*"};
167
204
  const publishConfig = {"access":"public"};
168
205
  const dependencies = {"fastmcp":"^3.23.1","zod":"^4.1.12","picocolors":"^1.0.0","@zenflux/utils":"workspace:*"};
@@ -3,11 +3,25 @@ declare const afterInitializeCallbacks: (() => void)[];
3
3
  declare namespace bases {
4
4
  export {
5
5
  ControllerBase,
6
- ObjectBase
6
+ ObjectBase,
7
+ InitializeBase,
8
+ SingletonBase,
9
+ CacheBase
7
10
  }
8
11
  }
9
12
  export { bases }
10
13
 
14
+ declare abstract class CacheBase<CacheResult> extends InitializeBase {
15
+ private readonly cache;
16
+ private cacheDebugger;
17
+ protected constructor(shouldDebugCache?: boolean);
18
+ protected getCache(key: string): CacheResult | undefined;
19
+ protected getCacheMap(): Map<string, CacheResult>;
20
+ protected setCache(key: string, value: CacheResult): void;
21
+ protected deleteCache(key: string): boolean;
22
+ protected deleteCacheWithPrefix(prefix: string): void;
23
+ }
24
+
11
25
  declare const classes: {
12
26
  Logger: typeof Logger;
13
27
  };
@@ -305,6 +319,13 @@ declare function initialize(config?: Partial<interfaces.IAPIConfig>): void;
305
319
 
306
320
  declare function initialize_2(config: IAPIConfig): void;
307
321
 
322
+ declare abstract class InitializeBase extends ObjectBase {
323
+ protected logger: Logger;
324
+ protected constructor(shouldInitialize?: boolean);
325
+ protected initialize?(): void;
326
+ protected debounce<T extends (...args: any[]) => any>(func: T, delay: number): (...args: Parameters<T>) => void;
327
+ }
328
+
308
329
  declare namespace interfaces {
309
330
  export {
310
331
  TCommandCallbackType,
@@ -517,6 +538,12 @@ declare class Restful extends Commands {
517
538
 
518
539
  declare let restful: Restful;
519
540
 
541
+ declare abstract class SingletonBase extends InitializeBase {
542
+ private static instances;
543
+ protected constructor();
544
+ protected static getInstance<T extends SingletonBase>(this: new () => T): T;
545
+ }
546
+
520
547
  /**
521
548
  * @author Leonid Vinikov <leonidvinikov@gmail.com>
522
549
  */
@@ -1,8 +1,10 @@
1
1
  /**
2
- * Bundled with love using the help of @zenflux/cli toolkit v0.1.38
3
- * Bundle name: @zenflux/core fileName: 'zenflux-core', built at Thu Nov 20 2025 12:34:10 GMT+0200 (Israel Standard Time)
2
+ * Bundled with love using the help of @zenflux/cli toolkit v0.1.42
3
+ * Bundle name: @zenflux/core fileName: 'zenflux-core', built at Thu Dec 11 2025 20:42:20 GMT+0200 (Israel Standard Time)
4
4
  */
5
5
 
6
+ import * as util from 'util';
7
+
6
8
  class CommandAlreadyRegistered extends Error{constructor(command){super(`Command: '${command.getName()}' is already registered`);}}
7
9
 
8
10
  class CommandNotFound extends Error{constructor(command){super(`Command: '${command}' is not found`);}}
@@ -50,33 +52,6 @@ get restful () { return restful; }
50
52
 
51
53
  class ControllerBase extends ObjectBase{commands;restful;internal;static getName(){return "ZenFlux/Core/ControllerBase"}constructor(){super();this.initialize();}initialize(){this.register();this.setupHooks&&this.setupHooks();}register(){this.commands=commands.register(this.getCommands(),this);this.restful=restful.register(this.getRestful(),this);this.internal=internal.register(this.getInternal(),this);}getCommands(){return {}}getRestful(){return {}}getInternal(){return {}}setupHooks(){}}
52
54
 
53
- var index$1 = /*#__PURE__*/Object.freeze({
54
- __proto__: null,
55
- ControllerBase: ControllerBase,
56
- ObjectBase: ObjectBase
57
- });
58
-
59
- class CommandBase extends ObjectBase{static controller;args={};options={};logger;static getName(){return "ZenFlux/Core/CommandBases/CommandBase"}static setController(controller){if(this.controller){throw new ControllerAlreadySet(this.controller)}this.controller=controller;}static getController(){return this.controller}constructor(args={},options={}){super();const type=this.constructor;this.logger=new zCore.classes.Logger(type,{repeatedly:true});this.logger.startsWith(this.constructor,{args,options});this.initialize(args,options);}initialize(args,options){this.args=args;this.options=options;}apply(args=this.args,options=this.options){throw new ForceMethodImplementation(this,"apply")}async run(){return this.runInternal()}async runInternal(){this.onBeforeApply&&this.onBeforeApply();const result=await this.apply(this.args,this.options);this.onAfterApply&&this.onAfterApply();return result}}
60
-
61
- class CommandPublic extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandPublic"}}
62
-
63
- class CommandRestful extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandRestful"}getEndpoint(){throw new ForceMethodImplementation(this,"getEndpoint")}apply(args=this.args,options=this.options){const endpoint=this.applyEndpointFormat(this.getEndpoint(),args);return restful.getClient().fetch(endpoint,restful.currentHttpMethod,args||null)}applyEndpointFormat(endpoint,data={}){if(endpoint.includes("{")){endpoint=endpoint.split("/").map(endpointPart=>{const match=endpointPart.match("\\{(.*?)\\}");if(match?.length&&"undefined"!==typeof data[match[1]]){return data[match[1]]}return endpointPart}).join("/");}return endpoint}}
64
-
65
- class CommandInternal extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandInternal"}}
66
-
67
- var index = /*#__PURE__*/Object.freeze({
68
- __proto__: null,
69
- CommandBase: CommandBase,
70
- CommandInternal: CommandInternal,
71
- CommandPublic: CommandPublic,
72
- CommandRestful: CommandRestful
73
- });
74
-
75
- var indexPublic = /*#__PURE__*/Object.freeze({
76
- __proto__: null,
77
- ForceMethodImplementation: ForceMethodImplementation
78
- });
79
-
80
55
  const DEFAULT_LOG_LEVEL="5";function getEnvVar(key){if(typeof process!=="undefined"&&process?.env){return process.env[key]??process.env[`VITE_${key}`]}if(typeof import.meta!=="undefined"&&import.meta.env){const env=import.meta.env;return env[key]??env[`VITE_${key}`]}return undefined}function getLoggerDefaultLevel(){return DEFAULT_LOG_LEVEL}function getLoggerLogLevel(){const raw=getEnvVar("LOGGER_LOG_LEVEL");return parseInt(raw??DEFAULT_LOG_LEVEL,10)}function getLoggerTimeFormat(){return (getEnvVar("LOGGER_TIME_FORMAT")||"").trim()}function getLoggerLogLevelString(){switch(getLoggerLogLevel()){case 0:return "NONE";case 1:return "ERROR";case 2:return "WARN";case 3:return "ADMIN";case 4:return "INFO";case 5:return "LOG";case 6:return "DEBUG";default:return "UNKNOWN"}}function isLoggerDebugEnabled(){return getLoggerLogLevel()>=6}function isLoggerDisabled(){return getEnvVar("LOGGER_DISABLED")==="true"}function isLoggerPreviousSourceDisabled(){return getEnvVar("LOGGER_LOG_PREVIOUS_CALLER_SOURCE_DISABLED")==="true"}
81
56
 
82
57
  var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function getDefaultExportFromNamespaceIfPresent(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")?n["default"]:n}function getDefaultExportFromNamespaceIfNotNamed(n){return n&&Object.prototype.hasOwnProperty.call(n,"default")&&Object.keys(n).length===1?n["default"]:n}function getAugmentedNamespace(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var f=n.default;if(typeof f=="function"){var a=function a(){var isInstance=false;try{isInstance=this instanceof a;}catch{}if(isInstance){return Reflect.construct(f,arguments,this.constructor)}return f.apply(this,arguments)};a.prototype=f.prototype;}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach(function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}});});return a}
@@ -105,9 +80,49 @@ let SimpleEventEmitter=class SimpleEventEmitter{listeners=new Map;on(event,callb
105
80
 
106
81
  const DEFAULT_LOG_PREFIX=pc.white("⚪ - [LOG]"),DEFAULT_INFO_PREFIX=pc.blue("🔵 - [INFO]"),DEFAULT_DEBUG_PREFIX=pc.gray("🟤 - [DEBUG]"),DEFAULT_WARN_PREFIX=pc.yellow("🟡 - [WARN]"),DEFAULT_ERROR_PREFIX=pc.red("🔴 - [ERROR]"),DEFAULT_ADMIN_PREFIX=pc.bold("🟣 - [ADMIN]");const LEVEL_LABELS={log:"LOG",info:"INFO",debug:"DEBUG",warn:"WARN",error:"ERROR",admin:"ADMIN"};const registeredNames={};class Logger extends LoggerBrowserInfra{static lastLogTime=Date.now();static timestampFormat=getLoggerTimeFormat();ownerName;messagePrefixes=[];config={};static setTimestampFormat(format){Logger.timestampFormat=(format||"").trim();}static getTimestampFormat(){return Logger.timestampFormat}static getName(){return "ZenFlux/Core/Modules/Logger"}static getLogLevelString(){return getLoggerLogLevelString()}static getLogLevel(){return getLoggerLogLevel()}static attachOutputListener(listener){return LoggerBrowserInfra.attachOutputSubscriber(listener)}static isDebugEnabled(){return isLoggerDebugEnabled()}constructor(owner,options){const{repeatedly=false,skipEventBusHook}=options||{};super(owner,{repeatedly});this.config={skipEventBusHook};this.ownerName=Logger.resolveOwnerName(owner);if(registeredNames[this.ownerName]){throw new Error(`Logger for '${this.ownerName}' already exists`)}registeredNames[this.ownerName]=true;if(isLoggerDisabled()){this.disableLoggers();return}if(isLoggerPreviousSourceDisabled()){this.getPreviousSource=()=>"";}switch(getLoggerLogLevel()){case 0:this.error=()=>{};case 1:this.warn=()=>{};case 2:this.admin=()=>{};case 3:this.info=()=>{};case 4:this.log=()=>{};case 5:this.debug=()=>{};}if(!this.config.skipEventBusHook){EventBus.$.registerMultiInstances(this,[this.outputEvent]);}}addMessagePrefix(prefix){this.messagePrefixes.push(prefix);}log(caller,message,...params){this.writeLog("log",DEFAULT_LOG_PREFIX,caller,message,...params);}info(caller,message,...params){this.writeLog("info",DEFAULT_INFO_PREFIX,caller,message,...params);}debug(caller,message,...params){this.writeLog("debug",DEFAULT_DEBUG_PREFIX,caller,message,...params);}warn(caller,message,...params){this.writeLog("warn",DEFAULT_WARN_PREFIX,caller,message,...params);}error(caller,message,...params){this.writeLog("error",DEFAULT_ERROR_PREFIX,caller,message,...params);}admin(caller,message,...params){this.writeLog("admin",DEFAULT_ADMIN_PREFIX,caller,message,...params);}startsEmpty(caller){this.printFunctionNotify("▶",caller,"");}startsWith(caller,params){this.printObjectEfficient("▶",caller,params);}dump(caller,params={},notice=""){for(const key in params){if(typeof params[key]==="object"){params[key]=JSON.stringify(LoggerBrowserInfra.useObjectMapper(params[key]),reduceCircularReferences());}this.printInLineElement("dp",caller,key,params[key],notice);}}drop(caller,according,data){for(const key in according){this.printInLineElement("dr",caller,key,according[key],"corresponding");}this.output(data);}throw(caller,output,name="null",params={}){this.printFunctionNotify("tw",caller,output);if(params){this.printInNextLineObject("tw",caller,name,params);}throw new Error().stack}beep(){console.log("\x07");}clone(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)}outputEvent(_prefix,_timeDiff,_source,_messagePrefix,_message,_params){}static resolveOwnerName(owner){if(typeof owner==="string"){return owner}if(owner instanceof ObjectBase){return owner.getName()}if(owner&&typeof owner.getName==="function"){return owner.getName()}return "UnknownOwner"}disableLoggers(){this.error=()=>{};this.warn=()=>{};this.admin=()=>{};this.info=()=>{};this.log=()=>{};this.debug=()=>{};}getStackTrace(){const stackTrace=(new Error().stack||"").split("\n");const stackLines=stackTrace.slice(1);const stackRegex=/ at (.+?) \((.+?)\)/;const result=[];for(const line of stackLines){const match=line.match(stackRegex);if(match){const[,context,file]=match;const parsedLine={context,file};if(line.startsWith("new")){parsedLine.isNew=true;parsedLine.object=context.split(" ")[1];}else if(context!=="Object.<anonymous>"){parsedLine.object=context;}result.push(parsedLine);}}return result}getPreviousSource(){const stack=this.getStackTrace().filter(line=>line.file.includes("/src/")).filter(line=>!line.file.includes("logger.ts")).filter(line=>!line.file.includes("debugger.ts")).filter(line=>!line.file.includes("/node_modules/"));let previousSource="";const previousCaller=stack[1]?.object?.split(".");if(previousCaller?.length>1){const previousCallerName=previousCaller[0],previousCallerMethod=previousCaller[1];previousSource=`${previousCallerName}::${previousCallerMethod}]`+"[";}return previousSource}writeLog(level,prefix,caller,message,...params){const callerName=this.getCallerName(caller);const source=this.getPreviousSource()+pc.white(`${this.ownerName}::${callerName}`);let messagePrefix="";if(this.messagePrefixes.length){messagePrefix=`[${this.messagePrefixes.join("][")}]`;}const timestampValue=Date.now();const timeDiff=(timestampValue-Logger.lastLogTime).toString().padStart(4,"0");const timeFormat=Logger.getTimestampFormat();const timestamp=timeFormat?this.formatTime(new Date(timestampValue),timeFormat):"";this.outputEvent(prefix,timeDiff,source,messagePrefix,message,params);const timestampPart=timestamp?`${timestamp} `:"";const output=`${timestampPart}${prefix}[+${timeDiff}ms][${source}]${messagePrefix}: ${message}`;const formatted=this.createBrowserFormat(level,callerName,messagePrefix,message);const metadata={id:`${timestampValue}-${Math.random().toString(16).slice(2)}`,level,namespace:this.ownerName,callerName,message,messagePrefix,payload:params.length===0?undefined:params.length===1?params[0]:params,timestamp:timestampValue,formatted};this.runWithOutputMetadata(metadata,()=>{this.output(output,...params);});Logger.lastLogTime=timestampValue;}createBrowserFormat(level,callerName,messagePrefix,message){const prefixLabel=LEVEL_LABELS[level]||level.toUpperCase();const prefixPart=messagePrefix?`${messagePrefix} `:"";return {format:`%c(${prefixLabel})-> %c%c${this.ownerName}%c::%c${callerName}%c() ${prefixPart}${message}%c`,styles:[...this.defaultStyle]}}formatTime(date,format){const pad=(num,size=2)=>num.toString().padStart(size,"0");const tokens={"YYYY":date.getFullYear().toString(),"Y":date.getFullYear().toString(),"M":pad(date.getMonth()+1),"D":pad(date.getDate()),"HH":pad(date.getHours()),"hh":pad(date.getHours()),"mm":pad(date.getMinutes()),"ss":pad(date.getSeconds()),"SSS":pad(date.getMilliseconds(),3),"S":pad(date.getMilliseconds(),3)};return format.replace(/YYYY|HH|hh|mm|ss|SSS|Y|M|D|S|h|m|s/g,token=>tokens[token]??token)}}
107
82
 
83
+ class InitializeBase extends ObjectBase{logger;constructor(shouldInitialize=true){super();this.logger=new Logger(this);if(this.initialize&&shouldInitialize){this.initialize();}}debounce(func,delay){let timeoutId;return (...args)=>{clearTimeout(timeoutId);timeoutId=setTimeout(()=>{func.apply(this,args);},delay);}}}
84
+
85
+ class SingletonBase extends InitializeBase{static instances=new Map;constructor(){super();}static getInstance(){if(!SingletonBase.instances.has(this)){SingletonBase.instances.set(this,new this);}return SingletonBase.instances.get(this)}}
86
+
87
+ function isDebugEnabled(type,name){return false}
88
+
89
+ class Debugger extends ObjectBase{shouldDebug;logger;static getName(){return "ZenFlux/Core/Modules/Debugger"}constructor(owner,prefix,shouldDebug=Logger.isDebugEnabled(),options){super(),this.shouldDebug=shouldDebug;if(shouldDebug){const loggerOptions=options?.skipEventBusHook?{skipEventBusHook:true}:undefined;this.logger=new Logger(owner,loggerOptions);if(prefix){this.logger.addMessagePrefix(prefix);}}else {this.log=()=>{};this.dumpDown=()=>{};this.enableCleanupDebug=()=>{};}}enableCleanupDebug(handle,id=""){if(!this.finalizationRegistry){this.finalizationRegistry=new FinalizationRegistry(id=>{this.log(this.constructor,`FinalizationRegistry: ${id}`);});}if(!id){id=handle.getName()+":"+handle.getUniqueId();}this.log(this.enableCleanupDebug,`Initialized: '${id}'`);this.finalizationRegistry.register(handle,id);}log(source,message,...args){if(args&&args.length>0){return this.logger.debug(source,message,...args)}this.logger.debug(source,message);}dumpDown(source,object,objectName=""){this.log(source,`${objectName?objectName+":":""} `+"🔽"+"\n"+pc.green(util.inspect(object,false,null,true)));}isEnabled(){return this.shouldDebug}}function createDebugger(owner,ownerType,prefix){const ownerName=typeof owner==="string"?owner:owner.getName();return new Debugger(owner,prefix,isDebugEnabled(ownerType,ownerName))}
90
+
91
+ class CacheBase extends InitializeBase{cache;cacheDebugger;constructor(shouldDebugCache=true){super();this.cacheDebugger=new Debugger(this,undefined,shouldDebugCache);this.cache=new Map;}getCache(key){this.cacheDebugger.log(this.getCache,`Getting cache for key: '${key}'`);const result=this.cache.get(key);if(result){this.cacheDebugger.log(this.getCache,`Got cache for key: '${key}'`);this.cacheDebugger.dumpDown(this.setCache,result);}return result}getCacheMap(){return this.cache}setCache(key,value){this.cacheDebugger.log(this.setCache,`Setting cache for key: '${key}'`);this.cacheDebugger.dumpDown(this.setCache,value);this.cache.set(key,value);}deleteCache(key){this.cacheDebugger.log(this.deleteCache,`Deleting cache for key: '${key}'`);if(!this.cache.has(key)){this.cacheDebugger.log(this.deleteCache,`Cache for key: '${key}' does not exist`);return false}return this.cache.delete(key)}deleteCacheWithPrefix(prefix){this.cacheDebugger.log(this.deleteCacheWithPrefix,`Deleting cache prefix: '${prefix}'`);for(const key of this.cache.keys()){if(key.startsWith(prefix)){this.deleteCache(key);}}}}
92
+
93
+ var index$1 = /*#__PURE__*/Object.freeze({
94
+ __proto__: null,
95
+ CacheBase: CacheBase,
96
+ ControllerBase: ControllerBase,
97
+ InitializeBase: InitializeBase,
98
+ ObjectBase: ObjectBase,
99
+ SingletonBase: SingletonBase
100
+ });
101
+
102
+ class CommandBase extends ObjectBase{static controller;args={};options={};logger;static getName(){return "ZenFlux/Core/CommandBases/CommandBase"}static setController(controller){if(this.controller){throw new ControllerAlreadySet(this.controller)}this.controller=controller;}static getController(){return this.controller}constructor(args={},options={}){super();const type=this.constructor;this.logger=new zCore.classes.Logger(type,{repeatedly:true});this.logger.startsWith(this.constructor,{args,options});this.initialize(args,options);}initialize(args,options){this.args=args;this.options=options;}apply(args=this.args,options=this.options){throw new ForceMethodImplementation(this,"apply")}async run(){return this.runInternal()}async runInternal(){this.onBeforeApply&&this.onBeforeApply();const result=await this.apply(this.args,this.options);this.onAfterApply&&this.onAfterApply();return result}}
103
+
104
+ class CommandPublic extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandPublic"}}
105
+
106
+ class CommandRestful extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandRestful"}getEndpoint(){throw new ForceMethodImplementation(this,"getEndpoint")}apply(args=this.args,options=this.options){const endpoint=this.applyEndpointFormat(this.getEndpoint(),args);return restful.getClient().fetch(endpoint,restful.currentHttpMethod,args||null)}applyEndpointFormat(endpoint,data={}){if(endpoint.includes("{")){endpoint=endpoint.split("/").map(endpointPart=>{const match=endpointPart.match("\\{(.*?)\\}");if(match?.length&&"undefined"!==typeof data[match[1]]){return data[match[1]]}return endpointPart}).join("/");}return endpoint}}
107
+
108
+ class CommandInternal extends CommandBase{static getName(){return "ZenFlux/Core/CommandBases/CommandInternal"}}
109
+
110
+ var index = /*#__PURE__*/Object.freeze({
111
+ __proto__: null,
112
+ CommandBase: CommandBase,
113
+ CommandInternal: CommandInternal,
114
+ CommandPublic: CommandPublic,
115
+ CommandRestful: CommandRestful
116
+ });
117
+
118
+ var indexPublic = /*#__PURE__*/Object.freeze({
119
+ __proto__: null,
120
+ ForceMethodImplementation: ForceMethodImplementation
121
+ });
122
+
108
123
  var _package = {
109
124
  "name": "@zenflux/core",
110
- "version": "0.1.16",
125
+ "version": "0.1.20",
111
126
  "types": "dist/zenflux-core.d.ts",
112
127
  "type": "module",
113
128
  "files": [
@@ -127,14 +142,17 @@ var _package = {
127
142
  "types": "./dist/zenflux-core.d.ts"
128
143
  },
129
144
  "./dist/src/*": "./src/*",
130
- "./src/*": "./src/*",
145
+ "./src/*.ts": "./src/*.ts",
146
+ "./src/*": "./src/*.ts",
131
147
  "./src/bases": "./src/bases/index.ts",
148
+ "./src/bases/*": "./src/bases/*.ts",
132
149
  "./src/clients": "./src/clients/index.ts",
133
150
  "./src/command-bases": "./src/command-bases/index.ts",
134
151
  "./src/errors": "./src/errors/index.ts",
135
152
  "./src/interfaces": "./src/interfaces/index.ts",
136
153
  "./src/managers": "./src/managers/index.ts",
137
154
  "./src/modules/logger": "./src/modules/logger/index.ts",
155
+ "./src/modules/*": "./src/modules/*.ts",
138
156
  "./package.json": "./package.json"
139
157
  },
140
158
  "devDependencies": {
@@ -152,12 +170,12 @@ var _package = {
152
170
  }
153
171
  };
154
172
  const name = "@zenflux/core";
155
- const version = "0.1.16";
173
+ const version = "0.1.20";
156
174
  const types = "dist/zenflux-core.d.ts";
157
175
  const type = "module";
158
176
  const files = ["dist","types"];
159
177
  const scripts = {"@z-core--test":"jest","@z-core--build":"@z-cli @build","@z-core--dev":"@z-cli @watch --dev"};
160
- const exports$1 = {".":{"import":"./dist/zenflux-core.mjs","default":"./dist/zenflux-core.cjs","require":"./dist/zenflux-core.mjs.js","types":"./dist/zenflux-core.d.ts"},"./dist/src/*":"./src/*","./src/*":"./src/*","./src/bases":"./src/bases/index.ts","./src/clients":"./src/clients/index.ts","./src/command-bases":"./src/command-bases/index.ts","./src/errors":"./src/errors/index.ts","./src/interfaces":"./src/interfaces/index.ts","./src/managers":"./src/managers/index.ts","./src/modules/logger":"./src/modules/logger/index.ts","./package.json":"./package.json"};
178
+ const exports$1 = {".":{"import":"./dist/zenflux-core.mjs","default":"./dist/zenflux-core.cjs","require":"./dist/zenflux-core.mjs.js","types":"./dist/zenflux-core.d.ts"},"./dist/src/*":"./src/*","./src/*.ts":"./src/*.ts","./src/*":"./src/*.ts","./src/bases":"./src/bases/index.ts","./src/bases/*":"./src/bases/*.ts","./src/clients":"./src/clients/index.ts","./src/command-bases":"./src/command-bases/index.ts","./src/errors":"./src/errors/index.ts","./src/interfaces":"./src/interfaces/index.ts","./src/managers":"./src/managers/index.ts","./src/modules/logger":"./src/modules/logger/index.ts","./src/modules/*":"./src/modules/*.ts","./package.json":"./package.json"};
161
179
  const devDependencies = {"@jest/globals":"^29.7.0","@zenflux/cli":"workspace:*"};
162
180
  const publishConfig = {"access":"public"};
163
181
  const dependencies = {"fastmcp":"^3.23.1","zod":"^4.1.12","picocolors":"^1.0.0","@zenflux/utils":"workspace:*"};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenflux/core",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "types": "dist/zenflux-core.d.ts",
5
5
  "type": "module",
6
6
  "files": [
@@ -20,19 +20,22 @@
20
20
  "types": "./dist/zenflux-core.d.ts"
21
21
  },
22
22
  "./dist/src/*": "./src/*",
23
- "./src/*": "./src/*",
23
+ "./src/*.ts": "./src/*.ts",
24
+ "./src/*": "./src/*.ts",
24
25
  "./src/bases": "./src/bases/index.ts",
26
+ "./src/bases/*": "./src/bases/*.ts",
25
27
  "./src/clients": "./src/clients/index.ts",
26
28
  "./src/command-bases": "./src/command-bases/index.ts",
27
29
  "./src/errors": "./src/errors/index.ts",
28
30
  "./src/interfaces": "./src/interfaces/index.ts",
29
31
  "./src/managers": "./src/managers/index.ts",
30
32
  "./src/modules/logger": "./src/modules/logger/index.ts",
33
+ "./src/modules/*": "./src/modules/*.ts",
31
34
  "./package.json": "./package.json"
32
35
  },
33
36
  "devDependencies": {
34
37
  "@jest/globals": "^29.7.0",
35
- "@zenflux/cli": "0.1.41"
38
+ "@zenflux/cli": "0.1.42"
36
39
  },
37
40
  "publishConfig": {
38
41
  "access": "public"
@@ -41,6 +44,6 @@
41
44
  "fastmcp": "^3.23.1",
42
45
  "zod": "^4.1.12",
43
46
  "picocolors": "^1.0.0",
44
- "@zenflux/utils": "0.1.23"
47
+ "@zenflux/utils": "0.1.24"
45
48
  }
46
49
  }