@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.
- package/dist/bin/create-fullstack-app.js +1 -1
- package/dist/{chunk-5JQGY4TN.js → chunk-QVS4DSIH.js} +8 -1
- package/dist/frontends/web/next/templates/app/dashboard/page.tsx.hbs +1 -1
- package/dist/frontends/web/next/templates/app/layout.tsx.hbs +1 -1
- package/dist/frontends/web/next/templates/components/Footer.tsx.hbs +1 -1
- package/dist/frontends/web/next/templates/components/LoadingSpinner.tsx.hbs +1 -1
- package/dist/frontends/web/next/templates/components/Navbar.tsx.hbs +2 -10
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
|
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
|
|
16
|
+
<main>{children}</main>
|
|
17
17
|
<Footer />
|
|
18
18
|
</body>
|
|
19
19
|
</html>
|
|
@@ -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
|
|
8
|
+
<nav>
|
|
17
9
|
<Link href="/">Home</Link>
|
|
18
10
|
<Link href="/about">About</Link>
|
|
19
11
|
{{#if hasAuth}}
|
package/dist/index.js
CHANGED