@deneb-ui/cli 2.0.21 → 2.0.23
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/README.md +62 -114
- package/bin/index.js +101 -207
- package/package.json +20 -5
- package/src/arc/__fixtures__/next-app-basic/package.json +10 -0
- package/src/arc/__fixtures__/next-app-basic/src/app/globals.css +3 -0
- package/src/arc/__fixtures__/next-app-basic/src/app/layout.tsx +9 -0
- package/src/arc/__fixtures__/next-app-basic/src/app/page.tsx +11 -0
- package/src/arc/__fixtures__/next-app-basic/src/components/Header.tsx +13 -0
- package/src/arc/__fixtures__/next-app-basic/src/components/Hero.tsx +12 -0
- package/src/arc/__fixtures__/next-app-basic/src/components/PromoBanner.tsx +10 -0
- package/src/arc/__fixtures__/next-app-basic/tsconfig.json +12 -0
- package/src/arc/__fixtures__/next-app-storefront/components.json +14 -0
- package/src/arc/__fixtures__/next-app-storefront/package.json +22 -0
- package/src/arc/__fixtures__/next-app-storefront/src/app/about/page.tsx +13 -0
- package/src/arc/__fixtures__/next-app-storefront/src/app/globals.css +5 -0
- package/src/arc/__fixtures__/next-app-storefront/src/app/layout.tsx +19 -0
- package/src/arc/__fixtures__/next-app-storefront/src/app/page.tsx +13 -0
- package/src/arc/__fixtures__/next-app-storefront/src/components/Features.tsx +31 -0
- package/src/arc/__fixtures__/next-app-storefront/src/components/Hero.tsx +45 -0
- package/src/arc/__fixtures__/next-app-storefront/src/components/ProductGrid.tsx +49 -0
- package/src/arc/__fixtures__/next-app-storefront/src/components/SiteFooter.tsx +22 -0
- package/src/arc/__fixtures__/next-app-storefront/src/components/SiteHeader.tsx +21 -0
- package/src/arc/__fixtures__/next-app-storefront/src/components/ui/button.tsx +36 -0
- package/src/arc/__fixtures__/next-app-storefront/tsconfig.json +15 -0
- package/src/arc/__fixtures__/next-pages-basic/package.json +10 -0
- package/src/arc/__fixtures__/next-pages-basic/pages/_app.jsx +5 -0
- package/src/arc/__fixtures__/next-pages-basic/pages/contact.jsx +9 -0
- package/src/arc/__fixtures__/next-pages-basic/pages/index.jsx +11 -0
- package/src/arc/__fixtures__/next-pages-basic/styles/globals.css +9 -0
- package/src/arc/__tests__/arc.test.cjs +458 -0
- package/src/arc/adapters.cjs +184 -0
- package/src/arc/ast.cjs +323 -0
- package/src/arc/field-paths.cjs +165 -0
- package/src/arc/fivora-contract.cjs +521 -0
- package/src/arc/fs-utils.cjs +170 -0
- package/src/arc/index.cjs +628 -0
- package/src/arc/learning.cjs +185 -0
- package/src/arc/manifest.cjs +421 -0
- package/src/arc/next-config.cjs +279 -0
- package/src/arc/planner.cjs +227 -0
- package/src/arc/printer.cjs +153 -0
- package/src/arc/recipes-v2.cjs +49 -0
- package/src/arc/scanner.cjs +613 -0
- package/src/arc/semantic.cjs +651 -0
- package/src/arc/transformer.cjs +646 -0
- package/src/arc/validator.cjs +173 -0
- package/src/arc/version.cjs +22 -0
- package/src/recipes/cosmetics-beauty-store.json +1097 -0
- package/src/recipes/electronics-gadgets-store.json +1080 -0
- package/src/recipes/fashion-apparel-store.json +1074 -0
- package/src/tools/deneb-doctor.cjs +646 -0
- package/src/tools/recipe-engine.cjs +30 -0
- package/src/tools/template-converter.cjs +19 -6
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
const fs = require('fs');
|
|
13
13
|
const path = require('path');
|
|
14
|
-
const { matchRecipeForProject, saveRecipeFromProject } = require('./recipe-engine.cjs');
|
|
14
|
+
const { matchRecipeForProject, saveRecipeFromProject, getRecipeByName } = require('./recipe-engine.cjs');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* 1. Detect CSS and Component Frameworks
|
|
@@ -885,7 +885,7 @@ function generateTemplateData(projectDir, projectName, detectedPages, extractedB
|
|
|
885
885
|
/**
|
|
886
886
|
* Main Conversion Pipeline
|
|
887
887
|
*/
|
|
888
|
-
function runUniversalTemplateConversion(projectDir, projectName, detectedPages) {
|
|
888
|
+
function runUniversalTemplateConversion(projectDir, projectName, detectedPages, options = {}) {
|
|
889
889
|
console.log(`\n🔍 Analyzing existing UI and CSS frameworks in project...`);
|
|
890
890
|
const detection = detectProjectFrameworks(projectDir);
|
|
891
891
|
for (const framework of detection.detected) {
|
|
@@ -894,10 +894,22 @@ function runUniversalTemplateConversion(projectDir, projectName, detectedPages)
|
|
|
894
894
|
|
|
895
895
|
const allSourceFiles = findSourceFiles(projectDir);
|
|
896
896
|
|
|
897
|
-
// Match optimal recipe (or
|
|
898
|
-
|
|
899
|
-
if (
|
|
900
|
-
|
|
897
|
+
// Match optimal recipe (either explicitly specified by --recipe flag or auto-detected by signatures)
|
|
898
|
+
let matchedRecipe = null;
|
|
899
|
+
if (options.recipeName && typeof getRecipeByName === 'function') {
|
|
900
|
+
matchedRecipe = getRecipeByName(options.recipeName, projectDir);
|
|
901
|
+
if (matchedRecipe) {
|
|
902
|
+
console.log(` \x1b[35m🎯 Selected Recipe:\x1b[0m ${matchedRecipe.label} (${matchedRecipe.name})`);
|
|
903
|
+
} else {
|
|
904
|
+
console.log(` \x1b[33m⚠ Recipe "${options.recipeName}" not found. Falling back to signature detection...\x1b[0m`);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
if (!matchedRecipe) {
|
|
909
|
+
matchedRecipe = matchRecipeForProject(projectDir, detection.pkg, allSourceFiles);
|
|
910
|
+
if (matchedRecipe) {
|
|
911
|
+
console.log(` \x1b[35m🎯 Matched Recipe:\x1b[0m ${matchedRecipe.label} (${matchedRecipe.name})`);
|
|
912
|
+
}
|
|
901
913
|
}
|
|
902
914
|
|
|
903
915
|
const backupDir = createBackup(projectDir);
|
|
@@ -973,4 +985,5 @@ module.exports = {
|
|
|
973
985
|
generateTemplateData,
|
|
974
986
|
runUniversalTemplateConversion,
|
|
975
987
|
saveRecipeFromProject,
|
|
988
|
+
getRecipeByName,
|
|
976
989
|
};
|