@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.
Files changed (53) hide show
  1. package/README.md +62 -114
  2. package/bin/index.js +101 -207
  3. package/package.json +20 -5
  4. package/src/arc/__fixtures__/next-app-basic/package.json +10 -0
  5. package/src/arc/__fixtures__/next-app-basic/src/app/globals.css +3 -0
  6. package/src/arc/__fixtures__/next-app-basic/src/app/layout.tsx +9 -0
  7. package/src/arc/__fixtures__/next-app-basic/src/app/page.tsx +11 -0
  8. package/src/arc/__fixtures__/next-app-basic/src/components/Header.tsx +13 -0
  9. package/src/arc/__fixtures__/next-app-basic/src/components/Hero.tsx +12 -0
  10. package/src/arc/__fixtures__/next-app-basic/src/components/PromoBanner.tsx +10 -0
  11. package/src/arc/__fixtures__/next-app-basic/tsconfig.json +12 -0
  12. package/src/arc/__fixtures__/next-app-storefront/components.json +14 -0
  13. package/src/arc/__fixtures__/next-app-storefront/package.json +22 -0
  14. package/src/arc/__fixtures__/next-app-storefront/src/app/about/page.tsx +13 -0
  15. package/src/arc/__fixtures__/next-app-storefront/src/app/globals.css +5 -0
  16. package/src/arc/__fixtures__/next-app-storefront/src/app/layout.tsx +19 -0
  17. package/src/arc/__fixtures__/next-app-storefront/src/app/page.tsx +13 -0
  18. package/src/arc/__fixtures__/next-app-storefront/src/components/Features.tsx +31 -0
  19. package/src/arc/__fixtures__/next-app-storefront/src/components/Hero.tsx +45 -0
  20. package/src/arc/__fixtures__/next-app-storefront/src/components/ProductGrid.tsx +49 -0
  21. package/src/arc/__fixtures__/next-app-storefront/src/components/SiteFooter.tsx +22 -0
  22. package/src/arc/__fixtures__/next-app-storefront/src/components/SiteHeader.tsx +21 -0
  23. package/src/arc/__fixtures__/next-app-storefront/src/components/ui/button.tsx +36 -0
  24. package/src/arc/__fixtures__/next-app-storefront/tsconfig.json +15 -0
  25. package/src/arc/__fixtures__/next-pages-basic/package.json +10 -0
  26. package/src/arc/__fixtures__/next-pages-basic/pages/_app.jsx +5 -0
  27. package/src/arc/__fixtures__/next-pages-basic/pages/contact.jsx +9 -0
  28. package/src/arc/__fixtures__/next-pages-basic/pages/index.jsx +11 -0
  29. package/src/arc/__fixtures__/next-pages-basic/styles/globals.css +9 -0
  30. package/src/arc/__tests__/arc.test.cjs +458 -0
  31. package/src/arc/adapters.cjs +184 -0
  32. package/src/arc/ast.cjs +323 -0
  33. package/src/arc/field-paths.cjs +165 -0
  34. package/src/arc/fivora-contract.cjs +521 -0
  35. package/src/arc/fs-utils.cjs +170 -0
  36. package/src/arc/index.cjs +628 -0
  37. package/src/arc/learning.cjs +185 -0
  38. package/src/arc/manifest.cjs +421 -0
  39. package/src/arc/next-config.cjs +279 -0
  40. package/src/arc/planner.cjs +227 -0
  41. package/src/arc/printer.cjs +153 -0
  42. package/src/arc/recipes-v2.cjs +49 -0
  43. package/src/arc/scanner.cjs +613 -0
  44. package/src/arc/semantic.cjs +651 -0
  45. package/src/arc/transformer.cjs +646 -0
  46. package/src/arc/validator.cjs +173 -0
  47. package/src/arc/version.cjs +22 -0
  48. package/src/recipes/cosmetics-beauty-store.json +1097 -0
  49. package/src/recipes/electronics-gadgets-store.json +1080 -0
  50. package/src/recipes/fashion-apparel-store.json +1074 -0
  51. package/src/tools/deneb-doctor.cjs +646 -0
  52. package/src/tools/recipe-engine.cjs +30 -0
  53. 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 custom saved fixes)
898
- const matchedRecipe = matchRecipeForProject(projectDir, detection.pkg, allSourceFiles);
899
- if (matchedRecipe) {
900
- console.log(` \x1b[35m🎯 Matched Recipe:\x1b[0m ${matchedRecipe.label} (${matchedRecipe.name})`);
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
  };