create-fornix 0.0.5 → 0.0.6
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.
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2869,11 +2869,11 @@ function intentToMutableConfig(intent) {
|
|
|
2869
2869
|
});
|
|
2870
2870
|
}
|
|
2871
2871
|
function filterBlocksToRegistry(config, registry) {
|
|
2872
|
-
const registryBlockNames = new Set(registry.blocks.map((b) => b.name));
|
|
2872
|
+
const registryBlockNames = new Set(Object.values(registry.blocks).map((b) => b.name));
|
|
2873
2873
|
config.blocks = config.blocks.filter((b) => registryBlockNames.has(b.name));
|
|
2874
2874
|
}
|
|
2875
2875
|
function addRecommendedBlocks(intent, config, registry) {
|
|
2876
|
-
const registryBlockNames = new Set(registry.blocks.map((b) => b.name));
|
|
2876
|
+
const registryBlockNames = new Set(Object.values(registry.blocks).map((b) => b.name));
|
|
2877
2877
|
for (const recommendation of intent.recommendedBlocks) {
|
|
2878
2878
|
if (recommendation.confidence >= BLOCK_CONFIDENCE_THRESHOLD && registryBlockNames.has(recommendation.blockName) && !config.blocks.some((b) => b.name === recommendation.blockName)) {
|
|
2879
2879
|
config.blocks.push({
|
|
@@ -2930,7 +2930,7 @@ function findBestPalette(intent, palettes) {
|
|
|
2930
2930
|
}
|
|
2931
2931
|
function generateContent(intent, config, registry) {
|
|
2932
2932
|
const selectedBlockNames = new Set(config.blocks.map((b) => b.name));
|
|
2933
|
-
const blocksWithContent = registry.blocks.filter(
|
|
2933
|
+
const blocksWithContent = Object.values(registry.blocks).filter(
|
|
2934
2934
|
(b) => selectedBlockNames.has(b.name) && b.ai?.contentSlots && Object.keys(b.ai.contentSlots).length > 0
|
|
2935
2935
|
);
|
|
2936
2936
|
if (blocksWithContent.length === 0) {
|
|
@@ -3614,7 +3614,7 @@ async function runAIMode(args2, manifests, allPalettes) {
|
|
|
3614
3614
|
return;
|
|
3615
3615
|
}
|
|
3616
3616
|
const registry = {
|
|
3617
|
-
blocks:
|
|
3617
|
+
blocks: manifests,
|
|
3618
3618
|
palettes: [...allPalettes]
|
|
3619
3619
|
};
|
|
3620
3620
|
const projectDir = resolve2(String(args2.dir ?? "."));
|
|
@@ -3660,7 +3660,7 @@ async function runAIMode(args2, manifests, allPalettes) {
|
|
|
3660
3660
|
!((args2.git ?? true) === true)
|
|
3661
3661
|
);
|
|
3662
3662
|
}
|
|
3663
|
-
function runFlagDrivenMode(args2, manifests, allPalettes) {
|
|
3663
|
+
async function runFlagDrivenMode(args2, manifests, allPalettes) {
|
|
3664
3664
|
const projectDir = resolve2(String(args2.dir ?? "."));
|
|
3665
3665
|
const projectName = basename2(projectDir);
|
|
3666
3666
|
const nameResult = validateProjectName(projectName);
|