Coralite v0.29.2 Released
Coralite v0.29.2 is now available. This release introduces support for asynchronous execution in plugin client helpers, refactors the script manager to enable these operations, and refines our framework architecture documentation with strict development directives.
Asynchronous Plugin Client Helpers #
Plugins can now perform asynchronous operations during the initial phase of client helper execution. The ScriptManager (specifically getHelpersContent and getHelpers) has been updated to handle cases where phase1 returns a Promise. The compilation process awaits these helper promises internally, mapping the resolved values back into a synchronous execution structure during phase2 (such as helpers.refs()) to maintain backwards compatibility.
// Example of an asynchronous plugin helper configuration
const myAsyncHelper = {
phase1: async (instance) => {
const config = await fetchConfiguration(instance);
return { config };
},
phase2: (helpers) => {
// helpers.config is resolved and available synchronously here
return `console.log("Config loaded:", ${JSON.stringify(helpers.config)});`;
}
};
Refined Architectural Documentation #
We have updated the llms.txt file to clarify Coralite's hybrid model and enforce development directives for AI-assisted tools:
- No Hydration Patterns: Prohibits React, Vue, Lit, or vanilla boilerplate hydration techniques, strictly enforcing the use of
defineComponentand SSR-only logic. - Imperative Mounting: Explicitly documents requirements for instantiating client-side Web Components via
document.createElement()within theclient.scriptscope. - Architecture Docs Refinement: Removes references to legacy standalone components and clarifies the hybrid boundaries between declarative SSR elements and imperative Web Components.
Breaking Changes #
- CLI Flag Update: The short flag for the components directory argument in the CLI has been corrected from
-tto-c.
How to Upgrade #
To upgrade to the latest version, update your project dependencies:
npm install coralite@0.29.2
npm install coralite-scripts@0.29.2
