@dartix-software-solutions/create-fullstack-app 2.0.4 → 2.0.7

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "../chunk-5JQGY4TN.js";
4
+ } from "../chunk-QVS4DSIH.js";
5
5
 
6
6
  // src/bin/create-fullstack-app.ts
7
7
  main().catch((error) => {
@@ -2646,6 +2646,9 @@ import fs2 from "fs";
2646
2646
 
2647
2647
  // src/generator/handlebars-helpers.ts
2648
2648
  function registerHandlebarsHelpers(hbs) {
2649
+ hbs.registerHelper("lbrace", function() {
2650
+ return "{";
2651
+ });
2649
2652
  hbs.registerHelper("eq", function(a, b) {
2650
2653
  return a === b;
2651
2654
  });
@@ -2791,13 +2794,17 @@ function ensureHelpers() {
2791
2794
  }
2792
2795
  }
2793
2796
  var templateCache = /* @__PURE__ */ new Map();
2797
+ function protectJsxObjectLiterals(source) {
2798
+ return source.replace(/=\{\{/g, "={{{lbrace}}");
2799
+ }
2794
2800
  function renderTemplate(templatePath, context) {
2795
2801
  ensureHelpers();
2796
2802
  try {
2797
2803
  let compiledTemplate = templateCache.get(templatePath);
2798
2804
  if (!compiledTemplate) {
2799
2805
  const templateSource = fs2.readFileSync(templatePath, "utf-8");
2800
- compiledTemplate = Handlebars.compile(templateSource, {
2806
+ const safeSource = protectJsxObjectLiterals(templateSource);
2807
+ compiledTemplate = Handlebars.compile(safeSource, {
2801
2808
  noEscape: true,
2802
2809
  strict: false
2803
2810
  });
@@ -18,7 +18,7 @@ export default async function DashboardPage() {
18
18
  <div>
19
19
  <h1>Dashboard</h1>
20
20
  <p>You are signed in.</p>
21
- <pre style={{ fontSize: 12 }}>{decodeURIComponent(token.value)}</pre>
21
+ <pre>{decodeURIComponent(token.value)}</pre>
22
22
  <form action={signOut}>
23
23
  <button type="submit">Sign out</button>
24
24
  </form>
@@ -13,7 +13,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
13
13
  <html lang="en">
14
14
  <body>
15
15
  <Navbar />
16
- <main style={{ padding: '1rem 1.5rem', minHeight: '60vh' }}>{children}</main>
16
+ <main>{children}</main>
17
17
  <Footer />
18
18
  </body>
19
19
  </html>
@@ -1,6 +1,6 @@
1
1
  export function Footer() {
2
2
  return (
3
- <footer style={{ borderTop: '1px solid #e5e7eb', padding: '1rem 1.5rem', fontSize: 14 }}>
3
+ <footer>
4
4
  <small>© {new Date().getFullYear()} {{projectName}}</small>
5
5
  </footer>
6
6
  );
@@ -1,6 +1,6 @@
1
1
  export function LoadingSpinner({ label = 'Loading…' }: { label?: string }) {
2
2
  return (
3
- <div role="status" aria-live="polite" style={{ padding: '2rem', textAlign: 'center' }}>
3
+ <div role="status" aria-live="polite">
4
4
  <span>{label}</span>
5
5
  </div>
6
6
  );
@@ -3,17 +3,9 @@ import { appName } from '@/lib/config';
3
3
 
4
4
  export function Navbar() {
5
5
  return (
6
- <header
7
- style={{
8
- borderBottom: '1px solid #e5e7eb',
9
- padding: '0.75rem 1.5rem',
10
- display: 'flex',
11
- alignItems: 'center',
12
- gap: '1rem',
13
- }}
14
- >
6
+ <header>
15
7
  <strong>{appName}</strong>
16
- <nav style={{ display: 'flex', gap: '1rem' }}>
8
+ <nav>
17
9
  <Link href="/">Home</Link>
18
10
  <Link href="/about">About</Link>
19
11
  {{#if hasAuth}}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  main
3
- } from "./chunk-5JQGY4TN.js";
3
+ } from "./chunk-QVS4DSIH.js";
4
4
  export {
5
5
  main
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartix-software-solutions/create-fullstack-app",
3
- "version": "2.0.4",
3
+ "version": "2.0.7",
4
4
  "description": "CLI tool to scaffold full-stack applications with pluggable architecture",
5
5
  "type": "module",
6
6
  "bin": {