@cldmv/slothlet 3.10.0 → 3.11.0

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.
Files changed (174) hide show
  1. package/README.md +10 -10
  2. package/dist/lib/builders/builder.mjs +1 -1
  3. package/dist/lib/builders/modes-processor.mjs +1 -1
  4. package/dist/lib/handlers/api-cache-manager.mjs +1 -1
  5. package/dist/lib/handlers/api-manager.mjs +1 -1
  6. package/dist/lib/handlers/unified-wrapper.mjs +1 -1
  7. package/dist/lib/helpers/generate-manifest.mjs +1 -1
  8. package/dist/lib/helpers/platform.mjs +1 -1
  9. package/dist/lib/i18n/languages/en-us.json +2 -0
  10. package/dist/lib/i18n/translations.mjs +1 -1
  11. package/dist/lib/modes/eager.mjs +1 -1
  12. package/dist/lib/modes/lazy.mjs +1 -1
  13. package/dist/lib/processors/loader.mjs +1 -1
  14. package/dist/slothlet.mjs +1 -1
  15. package/package.json +58 -31
  16. package/types/stub/devcheck.d.mts +3 -0
  17. package/types/stub/index.d.mts +4 -0
  18. package/types/stub/lib/builders/api-assignment.d.mts +3 -0
  19. package/types/stub/lib/builders/api_builder.d.mts +3 -0
  20. package/types/stub/lib/builders/builder.d.mts +3 -0
  21. package/types/stub/lib/builders/modes-processor.d.mts +3 -0
  22. package/types/stub/lib/errors.d.mts +3 -0
  23. package/types/stub/lib/factories/component-base.d.mts +3 -0
  24. package/types/stub/lib/factories/context.d.mts +3 -0
  25. package/types/stub/lib/handlers/api-cache-manager.d.mts +3 -0
  26. package/types/stub/lib/handlers/api-manager.d.mts +3 -0
  27. package/types/stub/lib/handlers/context-async.d.mts +3 -0
  28. package/types/stub/lib/handlers/context-live.d.mts +3 -0
  29. package/types/stub/lib/handlers/hook-manager.d.mts +3 -0
  30. package/types/stub/lib/handlers/lifecycle-token.d.mts +3 -0
  31. package/types/stub/lib/handlers/lifecycle.d.mts +3 -0
  32. package/types/stub/lib/handlers/materialize-manager.d.mts +3 -0
  33. package/types/stub/lib/handlers/metadata.d.mts +3 -0
  34. package/types/stub/lib/handlers/module-manager.d.mts +3 -0
  35. package/types/stub/lib/handlers/ownership.d.mts +3 -0
  36. package/types/stub/lib/handlers/permission-manager.d.mts +3 -0
  37. package/types/stub/lib/handlers/unified-wrapper.d.mts +3 -0
  38. package/types/stub/lib/handlers/version-manager.d.mts +3 -0
  39. package/types/stub/lib/helpers/class-instance-wrapper.d.mts +3 -0
  40. package/types/stub/lib/helpers/config.d.mts +3 -0
  41. package/types/stub/lib/helpers/eventemitter-context.d.mts +3 -0
  42. package/types/stub/lib/helpers/generate-manifest.d.mts +3 -0
  43. package/types/stub/lib/helpers/hint-detector.d.mts +3 -0
  44. package/types/stub/lib/helpers/manifest-resolver.d.mts +3 -0
  45. package/types/stub/lib/helpers/modes-utils.d.mts +3 -0
  46. package/types/stub/lib/helpers/module-discovery.d.mts +3 -0
  47. package/types/stub/lib/helpers/module-manifest-validator.d.mts +3 -0
  48. package/types/stub/lib/helpers/module-sort.d.mts +3 -0
  49. package/types/stub/lib/helpers/pattern-matcher.d.mts +3 -0
  50. package/types/stub/lib/helpers/platform.d.mts +3 -0
  51. package/types/stub/lib/helpers/resolve-from-caller.d.mts +3 -0
  52. package/types/stub/lib/helpers/sanitize.d.mts +3 -0
  53. package/types/stub/lib/helpers/utilities.d.mts +3 -0
  54. package/types/stub/lib/i18n/translations.d.mts +3 -0
  55. package/types/stub/lib/modes/eager.d.mts +3 -0
  56. package/types/stub/lib/modes/lazy.d.mts +3 -0
  57. package/types/stub/lib/processors/flatten.d.mts +3 -0
  58. package/types/stub/lib/processors/loader.d.mts +3 -0
  59. package/types/stub/lib/processors/type-generator.d.mts +3 -0
  60. package/types/stub/lib/processors/typescript.d.mts +3 -0
  61. package/types/stub/lib/runtime/runtime-asynclocalstorage.d.mts +3 -0
  62. package/types/stub/lib/runtime/runtime-livebindings.d.mts +3 -0
  63. package/types/stub/lib/runtime/runtime.d.mts +3 -0
  64. package/types/stub/lib/typegen/typegen.d.mts +3 -0
  65. package/types/stub/slothlet.d.mts +4 -0
  66. package/dist/lib/i18n/languages/de-de.json +0 -470
  67. package/dist/lib/i18n/languages/en-gb.json +0 -470
  68. package/dist/lib/i18n/languages/es-es.json +0 -470
  69. package/dist/lib/i18n/languages/es-mx.json +0 -470
  70. package/dist/lib/i18n/languages/fr-fr.json +0 -470
  71. package/dist/lib/i18n/languages/hi-in.json +0 -470
  72. package/dist/lib/i18n/languages/ja-jp.json +0 -470
  73. package/dist/lib/i18n/languages/ko-kr.json +0 -470
  74. package/dist/lib/i18n/languages/pt-br.json +0 -470
  75. package/dist/lib/i18n/languages/ru-ru.json +0 -470
  76. package/dist/lib/i18n/languages/zh-cn.json +0 -470
  77. package/types/dist/lib/builders/api-assignment.d.mts +0 -8
  78. package/types/dist/lib/builders/api-assignment.d.mts.map +0 -1
  79. package/types/dist/lib/builders/api_builder.d.mts +0 -12
  80. package/types/dist/lib/builders/api_builder.d.mts.map +0 -1
  81. package/types/dist/lib/builders/builder.d.mts +0 -6
  82. package/types/dist/lib/builders/builder.d.mts.map +0 -1
  83. package/types/dist/lib/builders/modes-processor.d.mts +0 -8
  84. package/types/dist/lib/builders/modes-processor.d.mts.map +0 -1
  85. package/types/dist/lib/errors.d.mts +0 -28
  86. package/types/dist/lib/errors.d.mts.map +0 -1
  87. package/types/dist/lib/factories/component-base.d.mts +0 -12
  88. package/types/dist/lib/factories/component-base.d.mts.map +0 -1
  89. package/types/dist/lib/factories/context.d.mts +0 -8
  90. package/types/dist/lib/factories/context.d.mts.map +0 -1
  91. package/types/dist/lib/handlers/api-cache-manager.d.mts +0 -25
  92. package/types/dist/lib/handlers/api-cache-manager.d.mts.map +0 -1
  93. package/types/dist/lib/handlers/api-manager.d.mts +0 -47
  94. package/types/dist/lib/handlers/api-manager.d.mts.map +0 -1
  95. package/types/dist/lib/handlers/context-async.d.mts +0 -28
  96. package/types/dist/lib/handlers/context-async.d.mts.map +0 -1
  97. package/types/dist/lib/handlers/context-live.d.mts +0 -28
  98. package/types/dist/lib/handlers/context-live.d.mts.map +0 -1
  99. package/types/dist/lib/handlers/hook-manager.d.mts +0 -69
  100. package/types/dist/lib/handlers/hook-manager.d.mts.map +0 -1
  101. package/types/dist/lib/handlers/lifecycle-token.d.mts +0 -4
  102. package/types/dist/lib/handlers/lifecycle-token.d.mts.map +0 -1
  103. package/types/dist/lib/handlers/lifecycle.d.mts +0 -13
  104. package/types/dist/lib/handlers/lifecycle.d.mts.map +0 -1
  105. package/types/dist/lib/handlers/materialize-manager.d.mts +0 -13
  106. package/types/dist/lib/handlers/materialize-manager.d.mts.map +0 -1
  107. package/types/dist/lib/handlers/metadata.d.mts +0 -26
  108. package/types/dist/lib/handlers/metadata.d.mts.map +0 -1
  109. package/types/dist/lib/handlers/module-manager.d.mts +0 -29
  110. package/types/dist/lib/handlers/module-manager.d.mts.map +0 -1
  111. package/types/dist/lib/handlers/ownership.d.mts +0 -57
  112. package/types/dist/lib/handlers/ownership.d.mts.map +0 -1
  113. package/types/dist/lib/handlers/permission-manager.d.mts +0 -56
  114. package/types/dist/lib/handlers/permission-manager.d.mts.map +0 -1
  115. package/types/dist/lib/handlers/unified-wrapper.d.mts +0 -37
  116. package/types/dist/lib/handlers/unified-wrapper.d.mts.map +0 -1
  117. package/types/dist/lib/handlers/version-manager.d.mts +0 -37
  118. package/types/dist/lib/handlers/version-manager.d.mts.map +0 -1
  119. package/types/dist/lib/helpers/class-instance-wrapper.d.mts +0 -4
  120. package/types/dist/lib/helpers/class-instance-wrapper.d.mts.map +0 -1
  121. package/types/dist/lib/helpers/config.d.mts +0 -153
  122. package/types/dist/lib/helpers/config.d.mts.map +0 -1
  123. package/types/dist/lib/helpers/eventemitter-context.d.mts +0 -5
  124. package/types/dist/lib/helpers/eventemitter-context.d.mts.map +0 -1
  125. package/types/dist/lib/helpers/generate-manifest.d.mts +0 -12
  126. package/types/dist/lib/helpers/generate-manifest.d.mts.map +0 -1
  127. package/types/dist/lib/helpers/hint-detector.d.mts +0 -7
  128. package/types/dist/lib/helpers/hint-detector.d.mts.map +0 -1
  129. package/types/dist/lib/helpers/manifest-resolver.d.mts +0 -2
  130. package/types/dist/lib/helpers/manifest-resolver.d.mts.map +0 -1
  131. package/types/dist/lib/helpers/modes-utils.d.mts +0 -8
  132. package/types/dist/lib/helpers/modes-utils.d.mts.map +0 -1
  133. package/types/dist/lib/helpers/module-discovery.d.mts +0 -8
  134. package/types/dist/lib/helpers/module-discovery.d.mts.map +0 -1
  135. package/types/dist/lib/helpers/module-manifest-validator.d.mts +0 -14
  136. package/types/dist/lib/helpers/module-manifest-validator.d.mts.map +0 -1
  137. package/types/dist/lib/helpers/module-sort.d.mts +0 -2
  138. package/types/dist/lib/helpers/module-sort.d.mts.map +0 -1
  139. package/types/dist/lib/helpers/pattern-matcher.d.mts +0 -4
  140. package/types/dist/lib/helpers/pattern-matcher.d.mts.map +0 -1
  141. package/types/dist/lib/helpers/platform.d.mts +0 -12
  142. package/types/dist/lib/helpers/platform.d.mts.map +0 -1
  143. package/types/dist/lib/helpers/resolve-from-caller.d.mts +0 -9
  144. package/types/dist/lib/helpers/resolve-from-caller.d.mts.map +0 -1
  145. package/types/dist/lib/helpers/sanitize.d.mts +0 -10
  146. package/types/dist/lib/helpers/sanitize.d.mts.map +0 -1
  147. package/types/dist/lib/helpers/utilities.d.mts +0 -9
  148. package/types/dist/lib/helpers/utilities.d.mts.map +0 -1
  149. package/types/dist/lib/i18n/translations.d.mts +0 -7
  150. package/types/dist/lib/i18n/translations.d.mts.map +0 -1
  151. package/types/dist/lib/modes/eager.d.mts +0 -15
  152. package/types/dist/lib/modes/eager.d.mts.map +0 -1
  153. package/types/dist/lib/modes/lazy.d.mts +0 -17
  154. package/types/dist/lib/modes/lazy.d.mts.map +0 -1
  155. package/types/dist/lib/processors/flatten.d.mts +0 -63
  156. package/types/dist/lib/processors/flatten.d.mts.map +0 -1
  157. package/types/dist/lib/processors/loader.d.mts +0 -12
  158. package/types/dist/lib/processors/loader.d.mts.map +0 -1
  159. package/types/dist/lib/processors/type-generator.d.mts +0 -5
  160. package/types/dist/lib/processors/type-generator.d.mts.map +0 -1
  161. package/types/dist/lib/processors/typescript.d.mts +0 -18
  162. package/types/dist/lib/processors/typescript.d.mts.map +0 -1
  163. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts +0 -4
  164. package/types/dist/lib/runtime/runtime-asynclocalstorage.d.mts.map +0 -1
  165. package/types/dist/lib/runtime/runtime-livebindings.d.mts +0 -3
  166. package/types/dist/lib/runtime/runtime-livebindings.d.mts.map +0 -1
  167. package/types/dist/lib/runtime/runtime.d.mts +0 -4
  168. package/types/dist/lib/runtime/runtime.d.mts.map +0 -1
  169. package/types/dist/lib/typegen/typegen.d.mts +0 -5
  170. package/types/dist/lib/typegen/typegen.d.mts.map +0 -1
  171. package/types/dist/slothlet.d.mts +0 -4
  172. package/types/dist/slothlet.d.mts.map +0 -1
  173. package/types/index.d.mts +0 -18
  174. package/types/index.d.mts.map +0 -1
package/dist/slothlet.mjs CHANGED
@@ -14,4 +14,4 @@
14
14
  limitations under the License.
15
15
  */
16
16
 
17
- import{isNode,fs,fsp,path,url,createRequire}from"@cldmv/slothlet/helpers/platform";import{getContextManager}from"@cldmv/slothlet/factories/context";import{SlothletError,SlothletWarning,SlothletDebug}from"@cldmv/slothlet/errors";import{registerInstance}from"@cldmv/slothlet/handlers/lifecycle-token";import{resolveWrapper}from"@cldmv/slothlet/handlers/unified-wrapper";import{initI18n}from"@cldmv/slothlet/i18n";import{enableEventEmitterPatching,disableEventEmitterPatching,cleanupEventEmitterResources,setApiContextChecker}from"@cldmv/slothlet/helpers/eventemitter-context";class Slothlet{static RESERVED_ROOT_KEYS=["slothlet","shutdown","destroy"];static SKIP_PROPS=["__metadata","__type","_materialize","_impl","____slothletInternal"];constructor(){this.SlothletError=SlothletError;this.SlothletWarning=SlothletWarning;this.debugLogger=null;this.instanceID=null;this.config=null;this.envTarget="node";this.api=null;this.boundApi=null;this.contextManager=null;this.isLoaded=false;this.reference=null;this.context=null;this.envSnapshot=null;this._totalLazyCount=0;this._unmaterializedLazyCount=0;this._materializationComplete=false;this._materializationWaiters=[];this._materializationCompleteEmitted=false;this.componentCategories=["helpers","handlers","builders","processors","modes"];for(const category of this.componentCategories){this[category]={}}}async _initializeComponents(){if(this.envTarget==="browser"){await this._initializeComponentsBrowser();return}const baseDir=path.join(path.dirname(url.fileURLToPath(import.meta.url)),"lib");for(const category of this.componentCategories){const categoryDir=path.join(baseDir,category);const files=fs.readdirSync(categoryDir).filter(f=>f.endsWith(".mjs"));for(const file of files){const filePath=path.join(categoryDir,file);try{const module=await import(url.pathToFileURL(filePath).href);const classExports=Object.values(module).filter(exp=>typeof exp==="function"&&exp.slothletProperty);for(const ClassExport of classExports){const propName=ClassExport.slothletProperty;this[category][propName]=new ClassExport(this);if(this.config?.debug?.initialization){this.debug("initialization",{key:"DEBUG_MODE_COMPONENT_INITIALIZED",component:ClassExport.name,category,propertyName:propName})}}}catch(error){throw new this.SlothletError("MODULE_IMPORT_FAILED",{modulePath:filePath},error)}}}}async _initializeComponentsBrowser(){const BROWSER_COMPONENT_SPECIFIERS=["@cldmv/slothlet/builders/api-assignment","@cldmv/slothlet/builders/api_builder","@cldmv/slothlet/builders/builder","@cldmv/slothlet/builders/modes-processor","@cldmv/slothlet/handlers/api-cache-manager","@cldmv/slothlet/handlers/api-manager","@cldmv/slothlet/handlers/hook-manager","@cldmv/slothlet/handlers/lifecycle","@cldmv/slothlet/handlers/materialize-manager","@cldmv/slothlet/handlers/metadata","@cldmv/slothlet/handlers/module-manager","@cldmv/slothlet/handlers/ownership","@cldmv/slothlet/handlers/permission-manager","@cldmv/slothlet/handlers/version-manager","@cldmv/slothlet/helpers/config","@cldmv/slothlet/helpers/hint-detector","@cldmv/slothlet/helpers/modes-utils","@cldmv/slothlet/helpers/resolve-from-caller","@cldmv/slothlet/helpers/sanitize","@cldmv/slothlet/helpers/utilities","@cldmv/slothlet/modes/eager","@cldmv/slothlet/modes/lazy","@cldmv/slothlet/processors/flatten","@cldmv/slothlet/processors/loader"];for(const specifier of BROWSER_COMPONENT_SPECIFIERS){const parts=specifier.split("/");const category=parts[2];const module=await import(specifier);const classExports=Object.values(module).filter(exp=>typeof exp==="function"&&exp.slothletProperty);for(const ClassExport of classExports){const propName=ClassExport.slothletProperty;this[category][propName]=new ClassExport(this)}}}_setupLifecycleSubscribers(){if(!this.handlers.lifecycle){return}if(this.handlers.metadata){this.handlers.lifecycle.subscribe("impl:created",(data,token)=>{this.handlers.metadata.tagSystemMetadata(data.impl,{filePath:data.filePath,apiPath:data.apiPath,moduleID:data.moduleID,sourceFolder:data.sourceFolder},token)});this.handlers.lifecycle.subscribe("impl:changed",(data,token)=>{this.handlers.metadata.tagSystemMetadata(data.impl,{filePath:data.filePath,apiPath:data.apiPath,moduleID:data.moduleID,sourceFolder:data.sourceFolder},token)});this.handlers.lifecycle.subscribe("impl:removed",data=>{if(data.apiPath){const rootSegment=data.apiPath.split(".")[0];this.handlers.metadata.removeUserMetadataByApiPath(rootSegment)}})}if(this.handlers.ownership){this.handlers.lifecycle.subscribe("impl:created",data=>{const collisionMode=this.config?.collision?.api||"merge";const implValue=data.wrapper?.__impl??data.impl;this.handlers.ownership.register({moduleID:data.moduleID,apiPath:data.apiPath,value:implValue,source:data.source,filePath:data.filePath,collisionMode})});this.handlers.lifecycle.subscribe("impl:changed",data=>{const collisionMode=this.config?.collision?.api||"merge";const implValue=data.wrapper?.__impl??data.impl;const currentOwner=this.handlers.ownership.getCurrentOwner(data.apiPath);if(currentOwner?.moduleID!==data.moduleID){this.handlers.ownership.register({moduleID:data.moduleID,apiPath:data.apiPath,value:implValue,source:data.source,filePath:data.filePath,collisionMode})}})}}_registerLazyWrapper(){this._totalLazyCount++;this._unmaterializedLazyCount++;if(this.config?.debug?.materialize){this.debug("materialize",{key:"DEBUG_MODE_LAZY_WRAPPER_REGISTERED",total:this._totalLazyCount,unmaterialized:this._unmaterializedLazyCount})}}_onWrapperMaterialized(){this._unmaterializedLazyCount--;if(this.config?.debug?.materialize){this.debug("materialize",{key:"DEBUG_MODE_LAZY_WRAPPER_MATERIALIZED",total:this._totalLazyCount,unmaterialized:this._unmaterializedLazyCount,percentage:this._totalLazyCount>0?(this._totalLazyCount-this._unmaterializedLazyCount)/this._totalLazyCount*100:100})}if(this._unmaterializedLazyCount===0&&!this._materializationComplete){this._materializationComplete=true;if(this.config?.debug?.materialize){this.debug("materialize",{key:"DEBUG_MODE_ALL_LAZY_WRAPPERS_MATERIALIZED",total:this._totalLazyCount})}const waiters=this._materializationWaiters.splice(0);for(const resolve of waiters){resolve()}if(this.config?.tracking?.materialization&&!this._materializationCompleteEmitted){this._materializationCompleteEmitted=true;if(this.handlers?.lifecycle){this.handlers.lifecycle.emit("materialized:complete",{total:this._totalLazyCount,timestamp:Date.now()})}}}}_captureEnvSnapshot(envConfig){const rawInclude=envConfig?.include;const include=Array.isArray(rawInclude)?rawInclude.filter(key=>typeof key==="string"):null;const useAllowlist=include!==null&&include.length>0;const raw=useAllowlist?include.reduce((acc,key)=>{if(Object.prototype.hasOwnProperty.call(process.env,key)){acc[key]=process.env[key]}return acc},Object.create(null)):{...process.env};return Object.freeze(raw)}async load(config={},preservedInstanceID=null){this.config=config;this.envTarget=config.platform==="browser"||config.platform!=="node"&&config.manifest!=null?"browser":"node";if(!this.envSnapshot){this.envSnapshot=this.envTarget==="browser"?Object.freeze(Object.create(null)):this._captureEnvSnapshot(config.env)}this.debugLogger=new SlothletDebug(config);await this._initializeComponents();registerInstance(this);this._setupLifecycleSubscribers();this.config=this.helpers.config.transformConfig(config);if(this.config?.i18n?.language){initI18n({language:this.config.i18n.language})}this.debugLogger=new SlothletDebug(this.config);this.instanceID=preservedInstanceID||this.helpers.utilities.generateId();this.reference=this.config.reference;this.context=this.config.context;this.contextManager=getContextManager(this.envTarget==="browser"?"live":this.config.runtime);setApiContextChecker(()=>{const ctx=this.contextManager.tryGetContext();return!!(ctx&&ctx.self)});let store;if(preservedInstanceID&&this.contextManager.instances.has(preservedInstanceID)){this.contextManager.cleanup(preservedInstanceID);store=this.contextManager.initialize(this.instanceID,this.config)}else{store=this.contextManager.initialize(this.instanceID,this.config)}enableEventEmitterPatching();if(typeof this.contextManager.registerEventEmitterContextChecker==="function"){this.contextManager.registerEventEmitterContextChecker()}const baseModuleId=`base_${this.helpers.utilities.generateId().substring(0,8)}`;const baseApi=await this.builders.builder.buildAPI({dir:this.config.dir,mode:this.config.mode,moduleID:baseModuleId});this.api=baseApi;const apiWithBuiltins=await this.buildFinalAPI(this.api);if(this.handlers.apiCacheManager){this.handlers.apiCacheManager.set(baseModuleId,{endpoint:".",moduleID:baseModuleId,api:this.api,folderPath:this.config.dir,mode:this.config.mode,sanitizeOptions:this.config.sanitize||{},collisionMode:this.config.collision?.api||"merge",config:{...this.config},timestamp:Date.now()})}this.injectRuntimeMetadataFunctions(apiWithBuiltins);if(this.config.metadata&&typeof this.config.metadata==="object"){for(const[key,value]of Object.entries(this.config.metadata)){this.handlers.metadata.setGlobalMetadata(key,value)}this.handlers.metadata.registerUserMetadata(baseModuleId,this.config.metadata)}if(this.handlers.ownership){this.handlers.ownership.registerSubtree(apiWithBuiltins,baseModuleId,"");this.handlers.ownership.setModuleEndpoint(baseModuleId,".")}if(!this.boundApi){const isCallable=typeof this.api==="function"||this.api&&typeof this.api.default==="function";const proxyTarget=isCallable?function(){}:{};this.boundApi=new Proxy(proxyTarget,{get:(target,prop)=>this.api?this.api[prop]:void 0,set:(target,prop,value)=>{if(this.api){this.api[prop]=value}return true},has:(target,prop)=>this.api?prop in this.api:false,ownKeys:____target=>this.api?Reflect.ownKeys(this.api):[],deleteProperty:(target,prop)=>this.api?delete this.api[prop]:true,apply:(target,thisArg,args)=>this.api?Reflect.apply(this.api,thisArg,args):void 0,construct:(target,args)=>this.api?Reflect.construct(this.api,args):{},getOwnPropertyDescriptor:(target,prop)=>{if(isCallable&&prop==="prototype"){return Object.getOwnPropertyDescriptor(target,prop)}if(this.api&&prop in this.api){const desc=Object.getOwnPropertyDescriptor(this.api,prop);if(desc){return{...desc,configurable:true}}}return void 0}})}store.self=this.boundApi;store.context=this.context||{};store.slothlet=this;if(this.reference&&typeof this.reference==="object"){Object.assign(this.boundApi,this.reference)}this.isLoaded=true;return this.boundApi}async reload(options={}){const{keepInstanceID=false}=options;if(!this.config?.dir){throw new SlothletError("INVALID_CONFIG_NOT_LOADED",{operation:"reload",validationError:true})}const operationHistory=this.handlers.apiManager?.state?.operationHistory?[...this.handlers.apiManager.state.operationHistory]:[];await this._clearModuleCaches();const oldInstanceID=this.instanceID;if(!keepInstanceID){this.instanceID=`${oldInstanceID}_reload_${Date.now()}`;if(isNode&&this._typescriptCacheDirs?.size){await Promise.allSettled([...this._typescriptCacheDirs].map(dir=>fsp.rm(dir,{recursive:true,force:true})));this._typescriptCacheDirs.clear()}}const savedMetadataState=this.handlers.metadata?.exportUserState?.();const savedHooks=this.handlers.hookManager?.exportHooks?.();await this.load(this.config,this.instanceID);if(savedMetadataState&&this.handlers.metadata){this.handlers.metadata.importUserState(savedMetadataState)}if(savedHooks?.length&&this.handlers.hookManager){this.handlers.hookManager.importHooks(savedHooks)}for(const[,store]of this.contextManager.instances){if(store.parentInstanceID===oldInstanceID){store.parentInstanceID=this.instanceID}}if(oldInstanceID&&oldInstanceID!==this.instanceID&&this.contextManager.instances?.has(oldInstanceID)){this.contextManager.cleanup(oldInstanceID)}for(const operation of operationHistory){if(operation.type==="add"){await this.handlers.apiManager.addApiComponent({apiPath:operation.apiPath,folderPath:operation.folderPath,options:{...operation.options||{},recordHistory:false},moduleID:`replay_${this.helpers.utilities.generateId().substring(0,8)}`,versionConfig:operation.versionConfig||null})}else if(operation.type==="remove"){await this.handlers.apiManager.removeApiComponent(operation.apiPath,{recordHistory:false})}else if(operation.type==="addPermissionRule"){if(this.handlers.permissionManager){this.handlers.permissionManager.addRule(operation.rule,operation.ownerModuleID,operation.ruleId)}}else if(operation.type==="removePermissionRule"){if(this.handlers.permissionManager){this.handlers.permissionManager.removeRule(operation.ruleId,operation.callerModuleID)}}}return this.boundApi}async _clearModuleCaches(){if(!isNode)return;const targetDir=this.config.dir;const require2=createRequire(import.meta.url);const absoluteTargetDir=path.resolve(targetDir);for(const key of Object.keys(require2.cache)){if(key.startsWith(absoluteTargetDir)){delete require2.cache[key]}}}injectRuntimeMetadataFunctions(api){if(!api.slothlet?.metadata){return}const metadataHandler=this.handlers.metadata;api.slothlet.metadata.get=async function slothlet_metadata_get_runtime(path2){return metadataHandler.get(path2)};api.slothlet.metadata.self=function slothlet_metadata_self_runtime(){return metadataHandler.self()};api.slothlet.metadata.caller=function slothlet_metadata_caller_runtime(){return metadataHandler.caller()}}async _drainInFlightLoads(){if(!this.api)return;const pending=[];const seen=new Set;const collect=(obj,depth=0)=>{const objType=typeof obj;if(!obj||objType!=="object"&&objType!=="function"||depth>15||seen.has(obj))return;seen.add(obj);try{if(obj.__isVersionDispatcher===true)return;const wrapper=resolveWrapper(obj);if(wrapper){const mat=wrapper.____slothletInternal.materializationPromise;if(mat)pending.push(mat);for(const key of Object.keys(wrapper)){if(!key.startsWith("____"))collect(wrapper[key],depth+1)}return}for(const key of Object.keys(obj)){collect(obj[key],depth+1)}}catch{}};for(const key of Object.keys(this.api)){collect(this.api[key])}if(pending.length>0){await Promise.allSettled(pending)}}async shutdown(){if(!this.isLoaded){return}await this._drainInFlightLoads();disableEventEmitterPatching();cleanupEventEmitterResources();if(this.instanceID&&this.contextManager){this.contextManager.cleanup(this.instanceID)}if(this.handlers.ownership){this.handlers.ownership.clear()}this.handlers.versionManager?.shutdown();await this.handlers.permissionManager?.shutdown();if(isNode&&this._typescriptCacheDirs?.size){await Promise.allSettled([...this._typescriptCacheDirs].map(dir=>fsp.rm(dir,{recursive:true,force:true})));this._typescriptCacheDirs.clear()}this.isLoaded=false}debug(code,context={}){if(this.debugLogger){this.debugLogger.log(code,context)}}getAPI(){if(!this.isLoaded){throw new SlothletError("INVALID_CONFIG_NOT_LOADED",{operation:"getAPI"},null,{validationError:true})}return this.boundApi}getDiagnostics(){return{instanceID:this.instanceID,isLoaded:this.isLoaded,config:this.config,context:this.contextManager?.getDiagnostics()||null,ownership:this.handlers.ownership?.getDiagnostics()||null}}getOwnership(){if(!this.handlers.ownership){return null}return this.handlers.ownership.getDiagnostics()}buildFinalAPI(userApi){return this.builders.apiBuilder.buildFinalAPI(userApi)}}async function slothlet(config){const instance=new Slothlet;const api=await instance.load(config);return api}var stdin_default=slothlet;export{stdin_default as default,slothlet};
17
+ import{isNode,fs,fsp,path,url,createRequire}from"@cldmv/slothlet/helpers/platform";import{getContextManager}from"@cldmv/slothlet/factories/context";import{SlothletError,SlothletWarning,SlothletDebug}from"@cldmv/slothlet/errors";import{registerInstance}from"@cldmv/slothlet/handlers/lifecycle-token";import{resolveWrapper}from"@cldmv/slothlet/handlers/unified-wrapper";import{initI18n}from"@cldmv/slothlet/i18n";import{enableEventEmitterPatching,disableEventEmitterPatching,cleanupEventEmitterResources,setApiContextChecker}from"@cldmv/slothlet/helpers/eventemitter-context";class Slothlet{static RESERVED_ROOT_KEYS=["slothlet","shutdown","destroy"];static SKIP_PROPS=["__metadata","__type","_materialize","_impl","____slothletInternal"];constructor(){this.SlothletError=SlothletError;this.SlothletWarning=SlothletWarning;this.debugLogger=null;this.instanceID=null;this.config=null;this.envTarget="node";this.api=null;this.boundApi=null;this.contextManager=null;this.isLoaded=false;this.reference=null;this.context=null;this.envSnapshot=null;this._totalLazyCount=0;this._unmaterializedLazyCount=0;this._materializationComplete=false;this._materializationWaiters=[];this._materializationCompleteEmitted=false;this.componentCategories=["helpers","handlers","builders","processors","modes"];for(const category of this.componentCategories){this[category]={}}}async _initializeComponents(){if(this.envTarget==="browser"){await this._initializeComponentsBrowser();return}const baseDir=path.join(path.dirname(url.fileURLToPath(import.meta.url)),"lib");for(const category of this.componentCategories){const categoryDir=path.join(baseDir,category);const files=fs.readdirSync(categoryDir).filter(f=>f.endsWith(".mjs"));for(const file of files){const filePath=path.join(categoryDir,file);try{const module=await import(url.pathToFileURL(filePath).href);const classExports=Object.values(module).filter(exp=>typeof exp==="function"&&exp.slothletProperty);for(const ClassExport of classExports){const propName=ClassExport.slothletProperty;this[category][propName]=new ClassExport(this);if(this.config?.debug?.initialization){this.debug("initialization",{key:"DEBUG_MODE_COMPONENT_INITIALIZED",component:ClassExport.name,category,propertyName:propName})}}}catch(error){throw new this.SlothletError("MODULE_IMPORT_FAILED",{modulePath:filePath},error)}}}}async _initializeComponentsBrowser(){const BROWSER_COMPONENT_SPECIFIERS=["@cldmv/slothlet/builders/api-assignment","@cldmv/slothlet/builders/api_builder","@cldmv/slothlet/builders/builder","@cldmv/slothlet/builders/modes-processor","@cldmv/slothlet/handlers/api-cache-manager","@cldmv/slothlet/handlers/api-manager","@cldmv/slothlet/handlers/hook-manager","@cldmv/slothlet/handlers/lifecycle","@cldmv/slothlet/handlers/materialize-manager","@cldmv/slothlet/handlers/metadata","@cldmv/slothlet/handlers/module-manager","@cldmv/slothlet/handlers/ownership","@cldmv/slothlet/handlers/permission-manager","@cldmv/slothlet/handlers/version-manager","@cldmv/slothlet/helpers/config","@cldmv/slothlet/helpers/hint-detector","@cldmv/slothlet/helpers/modes-utils","@cldmv/slothlet/helpers/resolve-from-caller","@cldmv/slothlet/helpers/sanitize","@cldmv/slothlet/helpers/utilities","@cldmv/slothlet/modes/eager","@cldmv/slothlet/modes/lazy","@cldmv/slothlet/processors/flatten","@cldmv/slothlet/processors/loader"];for(const specifier of BROWSER_COMPONENT_SPECIFIERS){const parts=specifier.split("/");const category=parts[2];const module=await import(specifier);const classExports=Object.values(module).filter(exp=>typeof exp==="function"&&exp.slothletProperty);for(const ClassExport of classExports){const propName=ClassExport.slothletProperty;this[category][propName]=new ClassExport(this)}}}_setupLifecycleSubscribers(){if(!this.handlers.lifecycle){return}if(this.handlers.metadata){this.handlers.lifecycle.subscribe("impl:created",(data,token)=>{this.handlers.metadata.tagSystemMetadata(data.impl,{filePath:data.filePath,apiPath:data.apiPath,moduleID:data.moduleID,sourceFolder:data.sourceFolder},token)});this.handlers.lifecycle.subscribe("impl:changed",(data,token)=>{this.handlers.metadata.tagSystemMetadata(data.impl,{filePath:data.filePath,apiPath:data.apiPath,moduleID:data.moduleID,sourceFolder:data.sourceFolder},token)});this.handlers.lifecycle.subscribe("impl:removed",data=>{if(data.apiPath){const rootSegment=data.apiPath.split(".")[0];this.handlers.metadata.removeUserMetadataByApiPath(rootSegment)}})}if(this.handlers.ownership){this.handlers.lifecycle.subscribe("impl:created",data=>{const collisionMode=this.config?.collision?.api||"merge";const implValue=data.wrapper?.__impl??data.impl;this.handlers.ownership.register({moduleID:data.moduleID,apiPath:data.apiPath,value:implValue,source:data.source,filePath:data.filePath,collisionMode})});this.handlers.lifecycle.subscribe("impl:changed",data=>{const collisionMode=this.config?.collision?.api||"merge";const implValue=data.wrapper?.__impl??data.impl;const currentOwner=this.handlers.ownership.getCurrentOwner(data.apiPath);if(currentOwner?.moduleID!==data.moduleID){this.handlers.ownership.register({moduleID:data.moduleID,apiPath:data.apiPath,value:implValue,source:data.source,filePath:data.filePath,collisionMode})}})}}_registerLazyWrapper(){this._totalLazyCount++;this._unmaterializedLazyCount++;if(this.config?.debug?.materialize){this.debug("materialize",{key:"DEBUG_MODE_LAZY_WRAPPER_REGISTERED",total:this._totalLazyCount,unmaterialized:this._unmaterializedLazyCount})}}_onWrapperMaterialized(){this._unmaterializedLazyCount--;if(this.config?.debug?.materialize){this.debug("materialize",{key:"DEBUG_MODE_LAZY_WRAPPER_MATERIALIZED",total:this._totalLazyCount,unmaterialized:this._unmaterializedLazyCount,percentage:this._totalLazyCount>0?(this._totalLazyCount-this._unmaterializedLazyCount)/this._totalLazyCount*100:100})}if(this._unmaterializedLazyCount===0&&!this._materializationComplete){this._materializationComplete=true;if(this.config?.debug?.materialize){this.debug("materialize",{key:"DEBUG_MODE_ALL_LAZY_WRAPPERS_MATERIALIZED",total:this._totalLazyCount})}const waiters=this._materializationWaiters.splice(0);for(const resolve of waiters){resolve()}if(this.config?.tracking?.materialization&&!this._materializationCompleteEmitted){this._materializationCompleteEmitted=true;if(this.handlers?.lifecycle){this.handlers.lifecycle.emit("materialized:complete",{total:this._totalLazyCount,timestamp:Date.now()})}}}}_captureEnvSnapshot(envConfig){const rawInclude=envConfig?.include;const include=Array.isArray(rawInclude)?rawInclude.filter(key=>typeof key==="string"):null;const useAllowlist=include!==null&&include.length>0;const raw=useAllowlist?include.reduce((acc,key)=>{if(Object.prototype.hasOwnProperty.call(process.env,key)){acc[key]=process.env[key]}return acc},Object.create(null)):{...process.env};return Object.freeze(raw)}async load(config={},preservedInstanceID=null){this.config=config;this.envTarget=config.platform==="browser"||config.platform!=="node"&&config.manifest!=null?"browser":"node";if(!this.envSnapshot){this.envSnapshot=this.envTarget==="browser"?Object.freeze(Object.create(null)):this._captureEnvSnapshot(config.env)}this.debugLogger=new SlothletDebug(config);await this._initializeComponents();registerInstance(this);this._setupLifecycleSubscribers();this.config=this.helpers.config.transformConfig(config);if(this.config?.i18n?.language){initI18n({language:this.config.i18n.language})}this.debugLogger=new SlothletDebug(this.config);this.instanceID=preservedInstanceID||this.helpers.utilities.generateId();this.reference=this.config.reference;this.context=this.config.context;this.contextManager=getContextManager(this.envTarget==="browser"?"live":this.config.runtime);setApiContextChecker(()=>{const ctx=this.contextManager.tryGetContext();return!!(ctx&&ctx.self)});let store;if(preservedInstanceID&&this.contextManager.instances.has(preservedInstanceID)){this.contextManager.cleanup(preservedInstanceID);store=this.contextManager.initialize(this.instanceID,this.config)}else{store=this.contextManager.initialize(this.instanceID,this.config)}enableEventEmitterPatching();if(typeof this.contextManager.registerEventEmitterContextChecker==="function"){this.contextManager.registerEventEmitterContextChecker()}const baseModuleId=`base_${this.helpers.utilities.generateId().substring(0,8)}`;if(this.config.scanHiddenFolders!==void 0&&!this.config.silent){new this.SlothletWarning("CONFIG_SCAN_HIDDEN_FOLDERS_DEPRECATED",{option:"scanHiddenFolders"})}const baseApi=await this.builders.builder.buildAPI({dir:this.config.dir,mode:this.config.mode,moduleID:baseModuleId,hidden:this.config.hidden??null,scanHiddenFolders:this.config.scanHiddenFolders===true});this.api=baseApi;const apiWithBuiltins=await this.buildFinalAPI(this.api);if(this.handlers.apiCacheManager){this.handlers.apiCacheManager.set(baseModuleId,{endpoint:".",moduleID:baseModuleId,api:this.api,folderPath:this.config.dir,mode:this.config.mode,sanitizeOptions:this.config.sanitize||{},collisionMode:this.config.collision?.api||"merge",config:{...this.config},timestamp:Date.now()})}this.injectRuntimeMetadataFunctions(apiWithBuiltins);if(this.config.metadata&&typeof this.config.metadata==="object"){for(const[key,value]of Object.entries(this.config.metadata)){this.handlers.metadata.setGlobalMetadata(key,value)}this.handlers.metadata.registerUserMetadata(baseModuleId,this.config.metadata)}if(this.handlers.ownership){this.handlers.ownership.registerSubtree(apiWithBuiltins,baseModuleId,"");this.handlers.ownership.setModuleEndpoint(baseModuleId,".")}if(!this.boundApi){const isCallable=typeof this.api==="function"||this.api&&typeof this.api.default==="function";const proxyTarget=isCallable?function(){}:{};this.boundApi=new Proxy(proxyTarget,{get:(target,prop)=>this.api?this.api[prop]:void 0,set:(target,prop,value)=>{if(this.api){this.api[prop]=value}return true},has:(target,prop)=>this.api?prop in this.api:false,ownKeys:____target=>this.api?Reflect.ownKeys(this.api):[],deleteProperty:(target,prop)=>this.api?delete this.api[prop]:true,apply:(target,thisArg,args)=>this.api?Reflect.apply(this.api,thisArg,args):void 0,construct:(target,args)=>this.api?Reflect.construct(this.api,args):{},getOwnPropertyDescriptor:(target,prop)=>{if(isCallable&&prop==="prototype"){return Object.getOwnPropertyDescriptor(target,prop)}if(this.api&&prop in this.api){const desc=Object.getOwnPropertyDescriptor(this.api,prop);if(desc){return{...desc,configurable:true}}}return void 0}})}store.self=this.boundApi;store.context=this.context||{};store.slothlet=this;if(this.reference&&typeof this.reference==="object"){Object.assign(this.boundApi,this.reference)}this.isLoaded=true;return this.boundApi}async reload(options={}){const{keepInstanceID=false}=options;if(!this.config?.dir){throw new SlothletError("INVALID_CONFIG_NOT_LOADED",{operation:"reload",validationError:true})}const operationHistory=this.handlers.apiManager?.state?.operationHistory?[...this.handlers.apiManager.state.operationHistory]:[];await this._clearModuleCaches();const oldInstanceID=this.instanceID;if(!keepInstanceID){this.instanceID=`${oldInstanceID}_reload_${Date.now()}`;if(isNode&&this._typescriptCacheDirs?.size){await Promise.allSettled([...this._typescriptCacheDirs].map(dir=>fsp.rm(dir,{recursive:true,force:true})));this._typescriptCacheDirs.clear()}}const savedMetadataState=this.handlers.metadata?.exportUserState?.();const savedHooks=this.handlers.hookManager?.exportHooks?.();await this.load(this.config,this.instanceID);if(savedMetadataState&&this.handlers.metadata){this.handlers.metadata.importUserState(savedMetadataState)}if(savedHooks?.length&&this.handlers.hookManager){this.handlers.hookManager.importHooks(savedHooks)}for(const[,store]of this.contextManager.instances){if(store.parentInstanceID===oldInstanceID){store.parentInstanceID=this.instanceID}}if(oldInstanceID&&oldInstanceID!==this.instanceID&&this.contextManager.instances?.has(oldInstanceID)){this.contextManager.cleanup(oldInstanceID)}for(const operation of operationHistory){if(operation.type==="add"){await this.handlers.apiManager.addApiComponent({apiPath:operation.apiPath,folderPath:operation.folderPath,options:{...operation.options||{},recordHistory:false},moduleID:`replay_${this.helpers.utilities.generateId().substring(0,8)}`,versionConfig:operation.versionConfig||null})}else if(operation.type==="remove"){await this.handlers.apiManager.removeApiComponent(operation.apiPath,{recordHistory:false})}else if(operation.type==="addPermissionRule"){if(this.handlers.permissionManager){this.handlers.permissionManager.addRule(operation.rule,operation.ownerModuleID,operation.ruleId)}}else{if(operation.type==="removePermissionRule"){if(this.handlers.permissionManager){this.handlers.permissionManager.removeRule(operation.ruleId,operation.callerModuleID)}}}}return this.boundApi}async _clearModuleCaches(){if(!isNode)return;const targetDir=this.config.dir;const require2=createRequire(import.meta.url);const absoluteTargetDir=path.resolve(targetDir);for(const key of Object.keys(require2.cache)){if(key.startsWith(absoluteTargetDir)){delete require2.cache[key]}}}injectRuntimeMetadataFunctions(api){if(!api.slothlet?.metadata){return}const metadataHandler=this.handlers.metadata;api.slothlet.metadata.get=async function slothlet_metadata_get_runtime(path2){return metadataHandler.get(path2)};api.slothlet.metadata.self=function slothlet_metadata_self_runtime(){return metadataHandler.self()};api.slothlet.metadata.caller=function slothlet_metadata_caller_runtime(){return metadataHandler.caller()}}async _drainInFlightLoads(){if(!this.api)return;const pending=[];const seen=new Set;const collect=(obj,depth=0)=>{const objType=typeof obj;if(!obj||objType!=="object"&&objType!=="function"||depth>15||seen.has(obj))return;seen.add(obj);try{if(obj.__isVersionDispatcher===true)return;const wrapper=resolveWrapper(obj);if(wrapper){const mat=wrapper.____slothletInternal.materializationPromise;if(mat)pending.push(mat);for(const key of Object.keys(wrapper)){if(!key.startsWith("____"))collect(wrapper[key],depth+1)}return}for(const key of Object.keys(obj)){collect(obj[key],depth+1)}}catch{}};for(const key of Object.keys(this.api)){collect(this.api[key])}if(pending.length>0){await Promise.allSettled(pending)}}async shutdown(){if(!this.isLoaded){return}await this._drainInFlightLoads();disableEventEmitterPatching();cleanupEventEmitterResources();if(this.instanceID&&this.contextManager){this.contextManager.cleanup(this.instanceID)}if(this.handlers.ownership){this.handlers.ownership.clear()}this.handlers.versionManager?.shutdown();await this.handlers.permissionManager?.shutdown();if(isNode&&this._typescriptCacheDirs?.size){await Promise.allSettled([...this._typescriptCacheDirs].map(dir=>fsp.rm(dir,{recursive:true,force:true})));this._typescriptCacheDirs.clear()}this.isLoaded=false}debug(code,context={}){if(this.debugLogger){this.debugLogger.log(code,context)}}getAPI(){if(!this.isLoaded){throw new SlothletError("INVALID_CONFIG_NOT_LOADED",{operation:"getAPI"},null,{validationError:true})}return this.boundApi}getDiagnostics(){return{instanceID:this.instanceID,isLoaded:this.isLoaded,config:this.config,context:this.contextManager?.getDiagnostics()||null,ownership:this.handlers.ownership?.getDiagnostics()||null}}getOwnership(){if(!this.handlers.ownership){return null}return this.handlers.ownership.getDiagnostics()}buildFinalAPI(userApi){return this.builders.apiBuilder.buildFinalAPI(userApi)}}async function slothlet(config){const instance=new Slothlet;const api=await instance.load(config);return api}var stdin_default=slothlet;export{stdin_default as default,slothlet};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cldmv/slothlet",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "moduleVersions": {
5
5
  "lazy": "3.0.0",
6
6
  "eager": "3.0.0",
@@ -15,7 +15,12 @@
15
15
  },
16
16
  "exports": {
17
17
  ".": {
18
- "types": "./types/index.d.mts",
18
+ "slothlet-dev": {
19
+ "types": "./types/index.d.mts",
20
+ "import": "./index.mjs",
21
+ "require": "./index.cjs"
22
+ },
23
+ "types": "./types/stub/index.d.mts",
19
24
  "import": "./index.mjs",
20
25
  "require": "./index.cjs"
21
26
  },
@@ -25,11 +30,15 @@
25
30
  "types": "./types/src/lib/typegen/typegen.d.mts",
26
31
  "import": "./src/lib/typegen/typegen.mjs"
27
32
  },
28
- "types": "./types/dist/lib/typegen/typegen.d.mts",
33
+ "types": "./types/stub/lib/typegen/typegen.d.mts",
29
34
  "import": "./dist/lib/typegen/typegen.mjs"
30
35
  },
31
36
  "./devcheck": {
32
- "types": "./types/devcheck.d.mts",
37
+ "slothlet-dev": {
38
+ "types": "./types/devcheck.d.mts",
39
+ "import": "./devcheck.mjs"
40
+ },
41
+ "types": "./types/stub/devcheck.d.mts",
33
42
  "import": "./devcheck.mjs"
34
43
  },
35
44
  "./slothlet": {
@@ -37,7 +46,7 @@
37
46
  "types": "./types/src/slothlet.d.mts",
38
47
  "import": "./src/slothlet.mjs"
39
48
  },
40
- "types": "./types/dist/slothlet.d.mts",
49
+ "types": "./types/stub/slothlet.d.mts",
41
50
  "import": "./dist/slothlet.mjs"
42
51
  },
43
52
  "./runtime": {
@@ -45,7 +54,7 @@
45
54
  "types": "./types/src/lib/runtime/runtime.d.mts",
46
55
  "import": "./src/lib/runtime/runtime.mjs"
47
56
  },
48
- "types": "./types/dist/lib/runtime/runtime.d.mts",
57
+ "types": "./types/stub/lib/runtime/runtime.d.mts",
49
58
  "import": "./dist/lib/runtime/runtime.mjs"
50
59
  },
51
60
  "./runtime/async": {
@@ -53,7 +62,7 @@
53
62
  "types": "./types/src/lib/runtime/runtime-asynclocalstorage.d.mts",
54
63
  "import": "./src/lib/runtime/runtime-asynclocalstorage.mjs"
55
64
  },
56
- "types": "./types/dist/lib/runtime/runtime-asynclocalstorage.d.mts",
65
+ "types": "./types/stub/lib/runtime/runtime-asynclocalstorage.d.mts",
57
66
  "import": "./dist/lib/runtime/runtime-asynclocalstorage.mjs"
58
67
  },
59
68
  "./runtime/live": {
@@ -61,7 +70,7 @@
61
70
  "types": "./types/src/lib/runtime/runtime-livebindings.d.mts",
62
71
  "import": "./src/lib/runtime/runtime-livebindings.mjs"
63
72
  },
64
- "types": "./types/dist/lib/runtime/runtime-livebindings.d.mts",
73
+ "types": "./types/stub/lib/runtime/runtime-livebindings.d.mts",
65
74
  "import": "./dist/lib/runtime/runtime-livebindings.mjs"
66
75
  },
67
76
  "./helpers/*": {
@@ -69,7 +78,7 @@
69
78
  "types": "./types/src/lib/helpers/*.d.mts",
70
79
  "import": "./src/lib/helpers/*.mjs"
71
80
  },
72
- "types": "./types/dist/lib/helpers/*.d.mts",
81
+ "types": "./types/stub/lib/helpers/*.d.mts",
73
82
  "import": "./dist/lib/helpers/*.mjs"
74
83
  },
75
84
  "./modes/*": {
@@ -77,7 +86,7 @@
77
86
  "types": "./types/src/lib/modes/*.d.mts",
78
87
  "import": "./src/lib/modes/*.mjs"
79
88
  },
80
- "types": "./types/dist/lib/modes/*.d.mts",
89
+ "types": "./types/stub/lib/modes/*.d.mts",
81
90
  "import": "./dist/lib/modes/*.mjs"
82
91
  },
83
92
  "./builders/*": {
@@ -85,7 +94,7 @@
85
94
  "types": "./types/src/lib/builders/*.d.mts",
86
95
  "import": "./src/lib/builders/*.mjs"
87
96
  },
88
- "types": "./types/dist/lib/builders/*.d.mts",
97
+ "types": "./types/stub/lib/builders/*.d.mts",
89
98
  "import": "./dist/lib/builders/*.mjs"
90
99
  },
91
100
  "./handlers/*": {
@@ -93,7 +102,7 @@
93
102
  "types": "./types/src/lib/handlers/*.d.mts",
94
103
  "import": "./src/lib/handlers/*.mjs"
95
104
  },
96
- "types": "./types/dist/lib/handlers/*.d.mts",
105
+ "types": "./types/stub/lib/handlers/*.d.mts",
97
106
  "import": "./dist/lib/handlers/*.mjs"
98
107
  },
99
108
  "./processors/*": {
@@ -101,7 +110,7 @@
101
110
  "types": "./types/src/lib/processors/*.d.mts",
102
111
  "import": "./src/lib/processors/*.mjs"
103
112
  },
104
- "types": "./types/dist/lib/processors/*.d.mts",
113
+ "types": "./types/stub/lib/processors/*.d.mts",
105
114
  "import": "./dist/lib/processors/*.mjs"
106
115
  },
107
116
  "./factories/*": {
@@ -109,7 +118,7 @@
109
118
  "types": "./types/src/lib/factories/*.d.mts",
110
119
  "import": "./src/lib/factories/*.mjs"
111
120
  },
112
- "types": "./types/dist/lib/factories/*.d.mts",
121
+ "types": "./types/stub/lib/factories/*.d.mts",
113
122
  "import": "./dist/lib/factories/*.mjs"
114
123
  },
115
124
  "./errors": {
@@ -117,7 +126,7 @@
117
126
  "types": "./types/src/lib/errors.d.mts",
118
127
  "import": "./src/lib/errors.mjs"
119
128
  },
120
- "types": "./types/dist/lib/errors.d.mts",
129
+ "types": "./types/stub/lib/errors.d.mts",
121
130
  "import": "./dist/lib/errors.mjs"
122
131
  },
123
132
  "./i18n": {
@@ -125,7 +134,7 @@
125
134
  "types": "./types/src/lib/i18n/translations.d.mts",
126
135
  "import": "./src/lib/i18n/translations.mjs"
127
136
  },
128
- "types": "./types/dist/lib/i18n/translations.d.mts",
137
+ "types": "./types/stub/lib/i18n/translations.d.mts",
129
138
  "import": "./dist/lib/i18n/translations.mjs"
130
139
  },
131
140
  "./i18n/language/*": {
@@ -134,16 +143,21 @@
134
143
  },
135
144
  "./schemas/slothlet.module.schema.json": "./schemas/slothlet.module.schema.json"
136
145
  },
137
- "types": "./types/index.d.mts",
146
+ "types": "./types/stub/index.d.mts",
138
147
  "scripts": {
139
148
  "precommit": "node tools/dev/precommit-validation.mjs",
140
149
  "debug": "node tests/debug-slothlet.mjs",
141
150
  "i18n:check": "node tools/ci/check-i18n-languages.mjs",
142
151
  "vitest": "node tests/vitests/run-all-vitest.mjs --workers 8",
143
152
  "baseline": "npm run vitest -- --baseline",
144
- "coverage": "npm run vitest -- --coverage-quiet",
145
- "ci:coverage": "npm run coverage",
153
+ "coverage:node": "npm run vitest -- --coverage-quiet",
154
+ "precoverage:browser": "npx playwright install chromium",
155
+ "coverage:browser": "node --conditions=slothlet-dev node_modules/vitest/vitest.mjs run --config .configs/vitest.browser.config.mjs --coverage",
156
+ "coverage:merge": "node tools/coverage/merge-browser-coverage.mjs",
157
+ "coverage": "npm run coverage:node && npm run coverage:browser && npm run coverage:merge",
146
158
  "coverage:analyze": "node tools/coverage/analyze-coverage.mjs",
159
+ "coverage:all": "npm run coverage && npm run coverage:analyze",
160
+ "ci:coverage": "npm run coverage",
147
161
  "test": "npm run test:pre-build",
148
162
  "test:pre-build": "node tests/test-conditional.mjs",
149
163
  "test:post-build": "npm run test:types",
@@ -151,9 +165,11 @@
151
165
  "test:node": "node tests/run-all-tests.mjs",
152
166
  "test:all": "node tests/test-conditional.mjs && npm run test:node",
153
167
  "test:types": "node tests/validate-typescript.mjs",
154
- "ci:test:types": "npm run build:dist && npm run build:types && npm run test:types",
168
+ "test:typestubs": "node tests/validate-typestubs.mjs",
169
+ "ci:test:types": "npm run build:dist && npm run build:types && npm run build:typestubs && npm run test:types && npm run test:typestubs",
155
170
  "test:performance": "node tests/performance/performance-benchmark-aggregated.mjs",
156
171
  "test:performance-simple": "node tests/performance/performance-benchmark.mjs",
172
+ "pretest:browser": "npx playwright install chromium",
157
173
  "test:browser": "node --conditions=slothlet-dev tests/browser/playwright-smoke.mjs",
158
174
  "lint": "eslint --config .configs/eslint.config.mjs .",
159
175
  "inspect": "node tools/dev/inspect-api-structure.mjs",
@@ -165,17 +181,19 @@
165
181
  "format": "prettier --write . --config .configs/.prettierrc",
166
182
  "format:check": "prettier --check . --config .configs/.prettierrc",
167
183
  "build": "npm run build:dev",
168
- "build:ci": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run test:types && npm run build:prepend-license && npm run ci:cleanup-src",
169
- "build:dev": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run test:types && npm run build:prepend-license",
170
- "build:dev:test": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run test:types && npm run build:prepend-license && npm run build:cleanup",
171
- "build:unsafe": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run test:types && npm run build:prepend-license",
184
+ "build:ci": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run build:typestubs && npm run test:types && npm run test:typestubs && npm run build:prepend-license && npm run ci:cleanup-src",
185
+ "build:dev": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run build:typestubs && npm run test:types && npm run test:typestubs && npm run build:prepend-license",
186
+ "build:dev:test": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run build:typestubs && npm run test:types && npm run test:typestubs && npm run build:prepend-license && npm run build:cleanup",
187
+ "build:unsafe": "npm run build:cleanup && npm run build:dist && npm run build:minify && npm run build:types && npm run build:exports && npm run build:typestubs && npm run test:types && npm run test:typestubs && npm run build:prepend-license",
172
188
  "ci:cleanup-src": "node tools/ci/ci-cleanup-src.mjs",
173
189
  "build:cleanup": "shx rm -rf types && shx rm -rf dist",
174
190
  "build:dist": "shx mkdir -p dist && node tools/build/build-dist.mjs && shx rm -rf dist/**/*.backup",
175
191
  "build:minify": "node tools/build/minify-dist.mjs",
176
- "build:types": "npx tsc -p .configs/tsconfig.dts.jsonc",
192
+ "build:types": "shx rm -rf types && npx tsc -p .configs/tsconfig.dts.jsonc",
177
193
  "build:exports": "node tools/build/build-exports.mjs",
194
+ "build:typestubs": "node tools/build/build-typestubs.mjs",
178
195
  "build:prepend-license": "node tools/build/prepend-license.mjs dist",
196
+ "build:subpackages": "node tools/build/build-subpackages.mjs",
179
197
  "prepublish-check": "npm run build && npm pack && node tools/build/prepublish-check.mjs",
180
198
  "docs:build": "npm run docs:build:slothlet && npm run docs:build:api-tests",
181
199
  "docs:build:slothlet": "jsdoc2md -g grouped -m dl --no-cache --separators -c \".configs/jsdoc.config.json\" --helper \"docs/generated/helpers.cjs\" --template \"docs/generated/template.hbs\" \"src/{slothlet.mjs,lib/**/**/*.mjs}\" > docs/generated/API.md",
@@ -272,10 +290,18 @@
272
290
  },
273
291
  "type": "module",
274
292
  "peerDependencies": {
293
+ "@cldmv/slothlet-i18n": "^3.11.0",
294
+ "@cldmv/slothlet-types": "^3.11.0",
275
295
  "esbuild": "^0.28.0",
276
296
  "typescript": "^6.0.3"
277
297
  },
278
298
  "peerDependenciesMeta": {
299
+ "@cldmv/slothlet-i18n": {
300
+ "optional": true
301
+ },
302
+ "@cldmv/slothlet-types": {
303
+ "optional": true
304
+ },
279
305
  "esbuild": {
280
306
  "optional": true
281
307
  },
@@ -291,7 +317,9 @@
291
317
  "@eslint/json": "^2.0.0",
292
318
  "@eslint/markdown": "^8.0.1",
293
319
  "@types/node": "^25.6.0",
294
- "@vitest/coverage-v8": "^4.1.5",
320
+ "@vitest/browser": "^4.1.8",
321
+ "@vitest/browser-playwright": "^4.1.8",
322
+ "@vitest/coverage-v8": "^4.1.8",
295
323
  "acorn": "^8.16.0",
296
324
  "chalk": "^5.6.2",
297
325
  "chokidar": "^5.0.0",
@@ -308,7 +336,7 @@
308
336
  "prettier": "^3.8.3",
309
337
  "shx": "^0.4.0",
310
338
  "typescript": "^6.0.3",
311
- "vitest": "^4.1.5"
339
+ "vitest": "^4.1.8"
312
340
  },
313
341
  "optionalDependencies": {
314
342
  "@rolldown/binding-linux-x64-gnu": "1.0.3"
@@ -324,17 +352,16 @@
324
352
  "publishConfig": {
325
353
  "access": "public"
326
354
  },
327
- "prepack": "npm run build:ci",
328
355
  "files": [
329
356
  "index.mjs",
330
357
  "index.cjs",
331
358
  "README.md",
332
359
  "REFERENCE.md",
333
360
  "LICENSE",
334
- "types/dist/",
335
- "types/index.d.mts",
336
- "types/index.d.mts.map",
361
+ "types/stub/",
337
362
  "dist/",
363
+ "!dist/lib/i18n/languages/*.json",
364
+ "dist/lib/i18n/languages/en-us.json",
338
365
  "bin/",
339
366
  "schemas/"
340
367
  ],
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export {};
@@ -0,0 +1,4 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types";
4
+ export { default } from "@cldmv/slothlet-types";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/builders/api-assignment";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/builders/api_builder";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/builders/builder";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/builders/modes-processor";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/errors";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/factories/component-base";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/factories/context";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/api-cache-manager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/api-manager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/context-async";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/context-live";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/hook-manager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/lifecycle-token";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/lifecycle";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/materialize-manager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/metadata";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/module-manager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/ownership";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/permission-manager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/unified-wrapper";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/handlers/version-manager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/class-instance-wrapper";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/config";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/eventemitter-context";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/generate-manifest";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/hint-detector";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/manifest-resolver";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/modes-utils";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/module-discovery";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/module-manifest-validator";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/module-sort";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/pattern-matcher";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/platform";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/resolve-from-caller";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/sanitize";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/helpers/utilities";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/i18n";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/modes/eager";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/modes/lazy";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/processors/flatten";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/processors/loader";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/processors/type-generator";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/processors/typescript";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/runtime/async";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/runtime/live";
@@ -0,0 +1,3 @@
1
+ // AUTO-GENERATED by tools/build/build-typestubs.mjs — do not edit.
2
+ // Re-exports the real declarations from @cldmv/slothlet-types (install it for TypeScript support).
3
+ export * from "@cldmv/slothlet-types/runtime";