create-brainerce-store 1.27.4 → 1.27.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.
Files changed (32) hide show
  1. package/dist/index.js +12 -1
  2. package/messages/en.json +382 -378
  3. package/messages/he.json +382 -378
  4. package/package.json +46 -46
  5. package/templates/nextjs/base/next.config.ts +31 -31
  6. package/templates/nextjs/base/src/app/account/page.tsx +1 -1
  7. package/templates/nextjs/base/src/app/auth/callback/page.tsx +2 -1
  8. package/templates/nextjs/base/src/app/cart/page.tsx +1 -1
  9. package/templates/nextjs/base/src/app/checkout/page.tsx +973 -972
  10. package/templates/nextjs/base/src/app/forgot-password/page.tsx +1 -1
  11. package/templates/nextjs/base/src/app/layout.tsx.ejs +6 -5
  12. package/templates/nextjs/base/src/app/login/page.tsx +1 -2
  13. package/templates/nextjs/base/src/app/order-confirmation/page.tsx +271 -271
  14. package/templates/nextjs/base/src/app/page.tsx +1 -1
  15. package/templates/nextjs/base/src/app/payment-complete/page.tsx +59 -59
  16. package/templates/nextjs/base/src/app/products/[slug]/product-client-section.tsx +27 -12
  17. package/templates/nextjs/base/src/app/products/page.tsx +8 -3
  18. package/templates/nextjs/base/src/app/register/page.tsx +1 -2
  19. package/templates/nextjs/base/src/app/reset-password/page.tsx +1 -2
  20. package/templates/nextjs/base/src/app/verify-email/page.tsx +1 -2
  21. package/templates/nextjs/base/src/components/auth/login-form.tsx +1 -1
  22. package/templates/nextjs/base/src/components/checkout/custom-fields-step.tsx +258 -184
  23. package/templates/nextjs/base/src/components/checkout/payment-step.tsx +592 -592
  24. package/templates/nextjs/base/src/components/layout/footer.tsx +1 -1
  25. package/templates/nextjs/base/src/components/layout/header.tsx +1 -2
  26. package/templates/nextjs/base/src/components/products/product-card.tsx +1 -2
  27. package/templates/nextjs/base/src/components/products/recommendation-section.tsx +1 -1
  28. package/templates/nextjs/base/src/lib/navigation.tsx.ejs +60 -0
  29. package/templates/nextjs/themes/luxury/globals.css +399 -399
  30. package/templates/nextjs/themes/luxury/theme.json +23 -23
  31. package/templates/nextjs/themes/playful/globals.css +400 -400
  32. package/templates/nextjs/themes/playful/theme.json +23 -23
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var require_package = __commonJS({
31
31
  "package.json"(exports2, module2) {
32
32
  module2.exports = {
33
33
  name: "create-brainerce-store",
34
- version: "1.27.4",
34
+ version: "1.27.6",
35
35
  description: "Scaffold a production-ready e-commerce storefront connected to Brainerce",
36
36
  bin: {
37
37
  "create-brainerce-store": "dist/index.js"
@@ -351,6 +351,17 @@ async function scaffold(options) {
351
351
  import_path.default.join(targetMessages, `${options.language}.json`)
352
352
  );
353
353
  }
354
+ if (isMultiLocale) {
355
+ const appDir = import_path.default.join(targetDir, "src", "app");
356
+ const localeDir = import_path.default.join(appDir, "[locale]");
357
+ await import_fs_extra.default.ensureDir(localeDir);
358
+ const keepInAppRoot = /* @__PURE__ */ new Set(["globals.css", "robots.ts", "sitemap.ts", "api", ".well-known"]);
359
+ const appEntries = await import_fs_extra.default.readdir(appDir, { withFileTypes: true });
360
+ for (const entry of appEntries) {
361
+ if (keepInAppRoot.has(entry.name) || entry.name === "[locale]") continue;
362
+ await import_fs_extra.default.move(import_path.default.join(appDir, entry.name), import_path.default.join(localeDir, entry.name));
363
+ }
364
+ }
354
365
  if (await import_fs_extra.default.pathExists(themeDir)) {
355
366
  const themeCss = import_path.default.join(themeDir, "globals.css");
356
367
  if (await import_fs_extra.default.pathExists(themeCss)) {