@batijs/cli 0.0.24 → 0.0.25
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 +3 -3
- package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/edgedb/{package-N7DN6762.js → package-NAEM3YOJ.js} +1 -1
- package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +124 -124
- package/dist/boilerplates/@batijs/express/{package-MQDB4QVK.js → package-VWSKNQQS.js} +1 -1
- package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +88 -88
- package/dist/boilerplates/@batijs/hattip/{package-ZHZMC652.js → package-PAHNC63I.js} +1 -1
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/prisma/{package-3DP6BNRZ.js → package-42T5MPMS.js} +1 -1
- package/dist/boilerplates/@batijs/shared/files/package.json +2 -2
- package/dist/boilerplates/@batijs/shared/files/tsconfig.json +18 -18
- package/dist/boilerplates/@batijs/shared/files/vite.config.ts +5 -5
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/solid/files/assets/logo.svg +36 -36
- package/dist/boilerplates/@batijs/solid/files/components/Link.tsx +14 -14
- package/dist/boilerplates/@batijs/solid/files/layouts/HeadDefault.tsx +22 -22
- package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +87 -87
- package/dist/boilerplates/@batijs/solid/files/layouts/style.css +29 -29
- package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +13 -13
- package/dist/boilerplates/@batijs/solid/files/pages/_error/+Page.tsx +18 -18
- package/dist/boilerplates/@batijs/solid/files/pages/index/+Page.tsx +21 -21
- package/dist/boilerplates/@batijs/solid/files/pages/index/Counter.tsx +18 -18
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+Page.tsx +14 -14
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/@id/+onBeforeRender.ts +27 -27
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/filterMovieData.ts +11 -11
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+Page.tsx +22 -22
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/index/+onBeforeRender.ts +80 -80
- package/dist/boilerplates/@batijs/solid/files/pages/star-wars/types.ts +13 -13
- package/dist/boilerplates/@batijs/solid/{package-6HR5REIL.js → package-DVZ6BETH.js} +1 -1
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/tailwindcss/files/layouts/tailwind.css +2 -2
- package/dist/boilerplates/@batijs/tailwindcss/files/postcss.config.js +6 -6
- package/dist/boilerplates/@batijs/tailwindcss/files/tailwind.config.js +8 -8
- package/dist/boilerplates/@batijs/tailwindcss/{package-G265GCGU.js → package-7CSFX2AA.js} +1 -1
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/telefunc/{package-JYH3G3DH.js → package-42IE3DIX.js} +1 -1
- package/dist/index.js +12 -5
- package/package.json +9 -6
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="175" height="175" fill="none" version="1.1" viewBox="0 0 175 175" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
3
|
-
<metadata>
|
|
4
|
-
<rdf:RDF>
|
|
5
|
-
<cc:Work rdf:about="">
|
|
6
|
-
<dc:format>image/svg+xml</dc:format>
|
|
7
|
-
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
|
8
|
-
<dc:title/>
|
|
9
|
-
</cc:Work>
|
|
10
|
-
</rdf:RDF>
|
|
11
|
-
</metadata>
|
|
12
|
-
<defs>
|
|
13
|
-
<linearGradient id="linearGradient880" x1="108.64" x2="115.51" y1="88.726" y2="136.2" gradientTransform="matrix(1.0498 0 0 1.0498 -2.9171 -2.9658)" gradientUnits="userSpaceOnUse">
|
|
14
|
-
<stop stop-color="#ffea83" offset="0"/>
|
|
15
|
-
<stop stop-color="#FFDD35" offset=".083333"/>
|
|
16
|
-
<stop stop-color="#FFA800" offset="1"/>
|
|
17
|
-
</linearGradient>
|
|
18
|
-
<linearGradient id="paint2_linear" x1="48.975" x2="61.299" y1="3.9232" y2="158.04" gradientTransform="translate(-2.832e-5)" gradientUnits="userSpaceOnUse">
|
|
19
|
-
<stop stop-color="#FFEA83" offset="0"/>
|
|
20
|
-
<stop stop-color="#FFDD35" offset=".083333"/>
|
|
21
|
-
<stop stop-color="#FFA800" offset="1"/>
|
|
22
|
-
</linearGradient>
|
|
23
|
-
<linearGradient id="paint0_linear-6" x1="-1.4492" x2="116.62" y1="-5.8123" y2="137.08" gradientTransform="translate(-2.832e-5)" gradientUnits="userSpaceOnUse">
|
|
24
|
-
<stop stop-color="#41D1FF" offset="0"/>
|
|
25
|
-
<stop stop-color="#BD34FE" offset="1"/>
|
|
26
|
-
</linearGradient>
|
|
27
|
-
</defs>
|
|
28
|
-
<circle cx="87.5" cy="87.5" r="87.5" fill="#c4c4c4"/>
|
|
29
|
-
<circle cx="87.5" cy="87.5" r="87.5" fill="url(#paint0_linear-6)"/>
|
|
30
|
-
<g transform="translate(632.92 54.355)" fill="#d38787" stroke-width="1.0614">
|
|
31
|
-
<path d="m-549.75 68.457c-5.7533-3.1217-6.1166-5.2295-6.1166-35.489 0-30.458 0.35464-32.448 6.3339-35.54 3.9943-2.0655 24.279-2.2805 26.735-0.28333 0.89718 0.72974 6.7203 6.6637 12.94 13.187l11.309 11.86v19.575c0 18.473-0.12956 19.74-2.3011 22.5-4.0223 5.1136-7.558 5.8565-27.65 5.8099-14.15-0.03287-19.008-0.40294-21.25-1.6191zm42.473-6.3594c2.27-1.59 2.359-2.2909 2.359-18.575v-16.923h-6.9521c-12.443 0-16.4-4.0845-16.4-16.93v-7.4828h-8.9464c-6.7178 0-9.3619 0.41549-10.614 1.668-2.5031 2.5031-2.5031 55.724 0 58.228 2.4502 2.4502 37.058 2.4636 40.553 0.01609zm-1.8867-42.165c0-0.16422-2.8659-3.1346-6.3686-6.6008l-6.3686-6.3022v4.9328c0 6.3185 1.8955 8.2687 8.0366 8.2687 2.5854 0 4.7007-0.13434 4.7007-0.29859zm-57.57 44.279c-5.6185-3.0486-6.1166-5.593-6.1166-31.243 0-18.891 0.31331-24.063 1.6101-26.571 1.809-3.4981 6.5048-6.3339 10.489-6.3339 2.4847 0 2.5814 0.19984 1.541 3.1843-0.61054 1.7514-1.7457 3.1843-2.5226 3.1843-0.77686 0-2.1631 0.75059-3.0805 1.668-2.4923 2.4923-2.4923 47.244 0 49.736 0.91739 0.9174 2.3036 1.668 3.0805 1.668 0.77688 0 1.912 1.4329 2.5226 3.1843 1.0562 3.0298 0.97108 3.1822-1.7537 3.1418-1.575-0.02331-4.1713-0.75194-5.7694-1.6191zm-16.983-4.2458c-5.4392-2.9512-6.1166-5.9415-6.1166-26.997 0-15.096 0.345-19.878 1.6101-22.325 1.7476-3.3796 6.4758-6.3339 10.137-6.3339 1.8666 0 2.1789 0.44955 1.6594 2.3882-0.35184 1.3135-0.64655 2.7465-0.65453 3.1843-8e-3 0.43784-0.69682 0.79608-1.5308 0.79608-0.83399 0-2.2669 0.75059-3.1843 1.668-2.4767 2.4767-2.4767 38.768 0 41.244 0.91741 0.91739 2.2946 1.668 3.0605 1.668 1.196 0 2.6402 2.995 2.6871 5.5726 0.0241 1.3294-4.5804 0.80962-7.6676-0.8655z" style="mix-blend-mode:lighten"/>
|
|
32
|
-
<path d="m-552.2 68.911c-5.7533-3.1217-6.1166-5.2295-6.1166-35.489 0-30.458 0.35463-32.448 6.3339-35.54 3.9943-2.0655 24.279-2.2805 26.735-0.28333 0.89718 0.72974 6.7203 6.6637 12.94 13.187l11.309 11.86v19.575c0 18.473-0.12957 19.74-2.3011 22.5-4.0223 5.1136-7.558 5.8565-27.65 5.8099-14.15-0.03287-19.008-0.40294-21.25-1.6191zm42.473-6.3594c2.27-1.59 2.359-2.2909 2.359-18.575v-16.923h-6.952c-12.443 0-16.4-4.0845-16.4-16.93v-7.4828h-8.9464c-6.7179 0-9.3619 0.41549-10.614 1.668-2.5031 2.5031-2.5031 55.724 0 58.228 2.4502 2.4502 37.058 2.4636 40.553 0.01609zm-1.8867-42.165c0-0.16422-2.8659-3.1346-6.3686-6.6008l-6.3686-6.3022v4.9328c0 6.3185 1.8955 8.2688 8.0366 8.2688 2.5854 0 4.7007-0.13434 4.7007-0.29859zm-57.57 44.279c-5.6185-3.0486-6.1166-5.593-6.1166-31.243 0-18.891 0.31331-24.063 1.6101-26.571 1.809-3.4981 6.5048-6.3339 10.489-6.3339 2.4847 0 2.5814 0.19984 1.541 3.1843-0.61054 1.7514-1.7457 3.1843-2.5226 3.1843-0.77687 0-2.1631 0.75059-3.0805 1.668-2.4923 2.4923-2.4923 47.244 0 49.736 0.91741 0.91739 2.3036 1.668 3.0805 1.668 0.77686 0 1.912 1.4329 2.5226 3.1843 1.0562 3.0298 0.97107 3.1822-1.7537 3.1418-1.575-0.02331-4.1713-0.75194-5.7694-1.6191zm-16.983-4.2458c-5.4392-2.9512-6.1166-5.9415-6.1166-26.997 0-15.096 0.34502-19.878 1.6101-22.325 1.7476-3.3796 6.4758-6.3339 10.137-6.3339 1.8666 0 2.1789 0.44955 1.6594 2.3882-0.35182 1.3135-0.64653 2.7465-0.65452 3.1843-8e-3 0.43784-0.69683 0.79608-1.5308 0.79608-0.83397 0-2.2669 0.75059-3.1843 1.668-2.4767 2.4767-2.4767 38.768 0 41.245 0.9174 0.91739 2.2946 1.668 3.0605 1.668 1.196 0 2.6402 2.995 2.6871 5.5726 0.0241 1.3294-4.5804 0.80962-7.6676-0.8655z" fill-opacity=".47466" style="mix-blend-mode:lighten"/>
|
|
33
|
-
</g>
|
|
34
|
-
<path d="m128.48 88.913-24.027 4.6784c-0.39475 0.07685-0.68766 0.40944-0.71076 0.80849l-1.4782 24.805c-0.0347 0.58371 0.50497 1.0372 1.0792 0.90602l6.6886-1.5338c0.62676-0.14383 1.1916 0.40419 1.0635 1.0299l-1.9874 9.6702c-0.13438 0.65091 0.48084 1.2073 1.1202 1.0142l4.1322-1.2472c0.64041-0.19317 1.2556 0.36535 1.1202 1.0162l-3.158 15.191c-0.19842 0.95011 1.074 1.4677 1.6042 0.653l0.35485-0.54382 19.578-38.827c0.32755-0.64985-0.23727-1.391-0.95641-1.2535l-6.8849 1.3207c-0.6467 0.12389-1.1979-0.47453-1.0152-1.1034l4.4944-15.482c0.18266-0.63012-0.36955-1.2295-1.0173-1.1034z" fill="url(#linearGradient880)" stroke-width="1.0498"/>
|
|
35
|
-
<rect x="3" y="3" width="169" height="169" rx="84.5" stroke="url(#paint2_linear)" stroke-width="6" style="mix-blend-mode:soft-light"/>
|
|
36
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="175" height="175" fill="none" version="1.1" viewBox="0 0 175 175" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
3
|
+
<metadata>
|
|
4
|
+
<rdf:RDF>
|
|
5
|
+
<cc:Work rdf:about="">
|
|
6
|
+
<dc:format>image/svg+xml</dc:format>
|
|
7
|
+
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
|
8
|
+
<dc:title/>
|
|
9
|
+
</cc:Work>
|
|
10
|
+
</rdf:RDF>
|
|
11
|
+
</metadata>
|
|
12
|
+
<defs>
|
|
13
|
+
<linearGradient id="linearGradient880" x1="108.64" x2="115.51" y1="88.726" y2="136.2" gradientTransform="matrix(1.0498 0 0 1.0498 -2.9171 -2.9658)" gradientUnits="userSpaceOnUse">
|
|
14
|
+
<stop stop-color="#ffea83" offset="0"/>
|
|
15
|
+
<stop stop-color="#FFDD35" offset=".083333"/>
|
|
16
|
+
<stop stop-color="#FFA800" offset="1"/>
|
|
17
|
+
</linearGradient>
|
|
18
|
+
<linearGradient id="paint2_linear" x1="48.975" x2="61.299" y1="3.9232" y2="158.04" gradientTransform="translate(-2.832e-5)" gradientUnits="userSpaceOnUse">
|
|
19
|
+
<stop stop-color="#FFEA83" offset="0"/>
|
|
20
|
+
<stop stop-color="#FFDD35" offset=".083333"/>
|
|
21
|
+
<stop stop-color="#FFA800" offset="1"/>
|
|
22
|
+
</linearGradient>
|
|
23
|
+
<linearGradient id="paint0_linear-6" x1="-1.4492" x2="116.62" y1="-5.8123" y2="137.08" gradientTransform="translate(-2.832e-5)" gradientUnits="userSpaceOnUse">
|
|
24
|
+
<stop stop-color="#41D1FF" offset="0"/>
|
|
25
|
+
<stop stop-color="#BD34FE" offset="1"/>
|
|
26
|
+
</linearGradient>
|
|
27
|
+
</defs>
|
|
28
|
+
<circle cx="87.5" cy="87.5" r="87.5" fill="#c4c4c4"/>
|
|
29
|
+
<circle cx="87.5" cy="87.5" r="87.5" fill="url(#paint0_linear-6)"/>
|
|
30
|
+
<g transform="translate(632.92 54.355)" fill="#d38787" stroke-width="1.0614">
|
|
31
|
+
<path d="m-549.75 68.457c-5.7533-3.1217-6.1166-5.2295-6.1166-35.489 0-30.458 0.35464-32.448 6.3339-35.54 3.9943-2.0655 24.279-2.2805 26.735-0.28333 0.89718 0.72974 6.7203 6.6637 12.94 13.187l11.309 11.86v19.575c0 18.473-0.12956 19.74-2.3011 22.5-4.0223 5.1136-7.558 5.8565-27.65 5.8099-14.15-0.03287-19.008-0.40294-21.25-1.6191zm42.473-6.3594c2.27-1.59 2.359-2.2909 2.359-18.575v-16.923h-6.9521c-12.443 0-16.4-4.0845-16.4-16.93v-7.4828h-8.9464c-6.7178 0-9.3619 0.41549-10.614 1.668-2.5031 2.5031-2.5031 55.724 0 58.228 2.4502 2.4502 37.058 2.4636 40.553 0.01609zm-1.8867-42.165c0-0.16422-2.8659-3.1346-6.3686-6.6008l-6.3686-6.3022v4.9328c0 6.3185 1.8955 8.2687 8.0366 8.2687 2.5854 0 4.7007-0.13434 4.7007-0.29859zm-57.57 44.279c-5.6185-3.0486-6.1166-5.593-6.1166-31.243 0-18.891 0.31331-24.063 1.6101-26.571 1.809-3.4981 6.5048-6.3339 10.489-6.3339 2.4847 0 2.5814 0.19984 1.541 3.1843-0.61054 1.7514-1.7457 3.1843-2.5226 3.1843-0.77686 0-2.1631 0.75059-3.0805 1.668-2.4923 2.4923-2.4923 47.244 0 49.736 0.91739 0.9174 2.3036 1.668 3.0805 1.668 0.77688 0 1.912 1.4329 2.5226 3.1843 1.0562 3.0298 0.97108 3.1822-1.7537 3.1418-1.575-0.02331-4.1713-0.75194-5.7694-1.6191zm-16.983-4.2458c-5.4392-2.9512-6.1166-5.9415-6.1166-26.997 0-15.096 0.345-19.878 1.6101-22.325 1.7476-3.3796 6.4758-6.3339 10.137-6.3339 1.8666 0 2.1789 0.44955 1.6594 2.3882-0.35184 1.3135-0.64655 2.7465-0.65453 3.1843-8e-3 0.43784-0.69682 0.79608-1.5308 0.79608-0.83399 0-2.2669 0.75059-3.1843 1.668-2.4767 2.4767-2.4767 38.768 0 41.244 0.91741 0.91739 2.2946 1.668 3.0605 1.668 1.196 0 2.6402 2.995 2.6871 5.5726 0.0241 1.3294-4.5804 0.80962-7.6676-0.8655z" style="mix-blend-mode:lighten"/>
|
|
32
|
+
<path d="m-552.2 68.911c-5.7533-3.1217-6.1166-5.2295-6.1166-35.489 0-30.458 0.35463-32.448 6.3339-35.54 3.9943-2.0655 24.279-2.2805 26.735-0.28333 0.89718 0.72974 6.7203 6.6637 12.94 13.187l11.309 11.86v19.575c0 18.473-0.12957 19.74-2.3011 22.5-4.0223 5.1136-7.558 5.8565-27.65 5.8099-14.15-0.03287-19.008-0.40294-21.25-1.6191zm42.473-6.3594c2.27-1.59 2.359-2.2909 2.359-18.575v-16.923h-6.952c-12.443 0-16.4-4.0845-16.4-16.93v-7.4828h-8.9464c-6.7179 0-9.3619 0.41549-10.614 1.668-2.5031 2.5031-2.5031 55.724 0 58.228 2.4502 2.4502 37.058 2.4636 40.553 0.01609zm-1.8867-42.165c0-0.16422-2.8659-3.1346-6.3686-6.6008l-6.3686-6.3022v4.9328c0 6.3185 1.8955 8.2688 8.0366 8.2688 2.5854 0 4.7007-0.13434 4.7007-0.29859zm-57.57 44.279c-5.6185-3.0486-6.1166-5.593-6.1166-31.243 0-18.891 0.31331-24.063 1.6101-26.571 1.809-3.4981 6.5048-6.3339 10.489-6.3339 2.4847 0 2.5814 0.19984 1.541 3.1843-0.61054 1.7514-1.7457 3.1843-2.5226 3.1843-0.77687 0-2.1631 0.75059-3.0805 1.668-2.4923 2.4923-2.4923 47.244 0 49.736 0.91741 0.91739 2.3036 1.668 3.0805 1.668 0.77686 0 1.912 1.4329 2.5226 3.1843 1.0562 3.0298 0.97107 3.1822-1.7537 3.1418-1.575-0.02331-4.1713-0.75194-5.7694-1.6191zm-16.983-4.2458c-5.4392-2.9512-6.1166-5.9415-6.1166-26.997 0-15.096 0.34502-19.878 1.6101-22.325 1.7476-3.3796 6.4758-6.3339 10.137-6.3339 1.8666 0 2.1789 0.44955 1.6594 2.3882-0.35182 1.3135-0.64653 2.7465-0.65452 3.1843-8e-3 0.43784-0.69683 0.79608-1.5308 0.79608-0.83397 0-2.2669 0.75059-3.1843 1.668-2.4767 2.4767-2.4767 38.768 0 41.245 0.9174 0.91739 2.2946 1.668 3.0605 1.668 1.196 0 2.6402 2.995 2.6871 5.5726 0.0241 1.3294-4.5804 0.80962-7.6676-0.8655z" fill-opacity=".47466" style="mix-blend-mode:lighten"/>
|
|
33
|
+
</g>
|
|
34
|
+
<path d="m128.48 88.913-24.027 4.6784c-0.39475 0.07685-0.68766 0.40944-0.71076 0.80849l-1.4782 24.805c-0.0347 0.58371 0.50497 1.0372 1.0792 0.90602l6.6886-1.5338c0.62676-0.14383 1.1916 0.40419 1.0635 1.0299l-1.9874 9.6702c-0.13438 0.65091 0.48084 1.2073 1.1202 1.0142l4.1322-1.2472c0.64041-0.19317 1.2556 0.36535 1.1202 1.0162l-3.158 15.191c-0.19842 0.95011 1.074 1.4677 1.6042 0.653l0.35485-0.54382 19.578-38.827c0.32755-0.64985-0.23727-1.391-0.95641-1.2535l-6.8849 1.3207c-0.6467 0.12389-1.1979-0.47453-1.0152-1.1034l4.4944-15.482c0.18266-0.63012-0.36955-1.2295-1.0173-1.1034z" fill="url(#linearGradient880)" stroke-width="1.0498"/>
|
|
35
|
+
<rect x="3" y="3" width="169" height="169" rx="84.5" stroke="url(#paint2_linear)" stroke-width="6" style="mix-blend-mode:soft-light"/>
|
|
36
|
+
</svg>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { createMemo } from "solid-js";
|
|
2
|
-
import { usePageContext } from "vike-solid/usePageContext";
|
|
3
|
-
|
|
4
|
-
export function Link(props: { href: string; children: string }) {
|
|
5
|
-
const pageContext = usePageContext();
|
|
6
|
-
const isActive = createMemo(() =>
|
|
7
|
-
props.href === "/" ? pageContext.urlPathname === props.href : pageContext.urlPathname.startsWith(props.href)
|
|
8
|
-
);
|
|
9
|
-
return (
|
|
10
|
-
<a href={props.href} class={isActive() ? "is-active" : undefined}>
|
|
11
|
-
{props.children}
|
|
12
|
-
</a>
|
|
13
|
-
);
|
|
14
|
-
}
|
|
1
|
+
import { createMemo } from "solid-js";
|
|
2
|
+
import { usePageContext } from "vike-solid/usePageContext";
|
|
3
|
+
|
|
4
|
+
export function Link(props: { href: string; children: string }) {
|
|
5
|
+
const pageContext = usePageContext();
|
|
6
|
+
const isActive = createMemo(() =>
|
|
7
|
+
props.href === "/" ? pageContext.urlPathname === props.href : pageContext.urlPathname.startsWith(props.href)
|
|
8
|
+
);
|
|
9
|
+
return (
|
|
10
|
+
<a href={props.href} class={isActive() ? "is-active" : undefined}>
|
|
11
|
+
{props.children}
|
|
12
|
+
</a>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
// Default <head> (can be overriden by pages)
|
|
2
|
-
|
|
3
|
-
import logoUrl from "../assets/logo.svg";
|
|
4
|
-
|
|
5
|
-
export default function HeadDefault() {
|
|
6
|
-
if (import.meta.BATI_MODULES?.includes("analytics:plausible.io")) {
|
|
7
|
-
return (
|
|
8
|
-
<>
|
|
9
|
-
<link rel="icon" href={logoUrl} />
|
|
10
|
-
{/* See https://plausible.io/docs/plausible-script */}
|
|
11
|
-
{/* TODO: update data-domain */}
|
|
12
|
-
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>
|
|
13
|
-
</>
|
|
14
|
-
);
|
|
15
|
-
} else {
|
|
16
|
-
return (
|
|
17
|
-
<>
|
|
18
|
-
<link rel="icon" href={logoUrl} />
|
|
19
|
-
</>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
// Default <head> (can be overriden by pages)
|
|
2
|
+
|
|
3
|
+
import logoUrl from "../assets/logo.svg";
|
|
4
|
+
|
|
5
|
+
export default function HeadDefault() {
|
|
6
|
+
if (import.meta.BATI_MODULES?.includes("analytics:plausible.io")) {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<link rel="icon" href={logoUrl} />
|
|
10
|
+
{/* See https://plausible.io/docs/plausible-script */}
|
|
11
|
+
{/* TODO: update data-domain */}
|
|
12
|
+
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>
|
|
13
|
+
</>
|
|
14
|
+
);
|
|
15
|
+
} else {
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<link rel="icon" href={logoUrl} />
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import "./style.css";
|
|
2
|
-
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
3
|
-
import "./tailwind.css";
|
|
4
|
-
import logoUrl from "../assets/logo.svg";
|
|
5
|
-
import { Link } from "../components/Link";
|
|
6
|
-
import type { JSX } from "solid-js";
|
|
7
|
-
|
|
8
|
-
export default function LayoutDefault(props: { children?: JSX.Element }) {
|
|
9
|
-
return (
|
|
10
|
-
<div
|
|
11
|
-
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
12
|
-
class="flex max-w-5xl m-auto"
|
|
13
|
-
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
14
|
-
style={{
|
|
15
|
-
display: "flex",
|
|
16
|
-
"max-width": "900px",
|
|
17
|
-
margin: "auto",
|
|
18
|
-
}}
|
|
19
|
-
>
|
|
20
|
-
<Sidebar>
|
|
21
|
-
<Logo />
|
|
22
|
-
<Link href="/">Welcome</Link>
|
|
23
|
-
<Link href="/star-wars">Data Fetching</Link>
|
|
24
|
-
</Sidebar>
|
|
25
|
-
<Content>{props.children}</Content>
|
|
26
|
-
</div>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function Sidebar(props: { children: JSX.Element }) {
|
|
31
|
-
return (
|
|
32
|
-
<div
|
|
33
|
-
id="sidebar"
|
|
34
|
-
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
35
|
-
class="p-5 flex flex-col shrink-0 border-r-2 border-r-gray-200"
|
|
36
|
-
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
37
|
-
style={{
|
|
38
|
-
padding: "20px",
|
|
39
|
-
"flex-shrink": 0,
|
|
40
|
-
display: "flex",
|
|
41
|
-
"flex-direction": "column",
|
|
42
|
-
"line-height": "1.8em",
|
|
43
|
-
"border-right": "2px solid #eee",
|
|
44
|
-
}}
|
|
45
|
-
>
|
|
46
|
-
{props.children}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function Content(props: { children: JSX.Element }) {
|
|
52
|
-
return (
|
|
53
|
-
<div id="page-container">
|
|
54
|
-
<div
|
|
55
|
-
id="page-content"
|
|
56
|
-
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
57
|
-
class="p-5 pb-12 min-h-screen"
|
|
58
|
-
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
59
|
-
style={{
|
|
60
|
-
padding: "20px",
|
|
61
|
-
"padding-bottom": "50px",
|
|
62
|
-
"min-height": "100vh",
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
{props.children}
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function Logo() {
|
|
72
|
-
return (
|
|
73
|
-
<div
|
|
74
|
-
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
75
|
-
class="p-5 mb-2"
|
|
76
|
-
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
77
|
-
style={{
|
|
78
|
-
"margin-top": "20px",
|
|
79
|
-
"margin-bottom": "10px",
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
<a href="/">
|
|
83
|
-
<img src={logoUrl} height={64} width={64} />
|
|
84
|
-
</a>
|
|
85
|
-
</div>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
1
|
+
import "./style.css";
|
|
2
|
+
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
3
|
+
import "./tailwind.css";
|
|
4
|
+
import logoUrl from "../assets/logo.svg";
|
|
5
|
+
import { Link } from "../components/Link";
|
|
6
|
+
import type { JSX } from "solid-js";
|
|
7
|
+
|
|
8
|
+
export default function LayoutDefault(props: { children?: JSX.Element }) {
|
|
9
|
+
return (
|
|
10
|
+
<div
|
|
11
|
+
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
12
|
+
class="flex max-w-5xl m-auto"
|
|
13
|
+
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
14
|
+
style={{
|
|
15
|
+
display: "flex",
|
|
16
|
+
"max-width": "900px",
|
|
17
|
+
margin: "auto",
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
<Sidebar>
|
|
21
|
+
<Logo />
|
|
22
|
+
<Link href="/">Welcome</Link>
|
|
23
|
+
<Link href="/star-wars">Data Fetching</Link>
|
|
24
|
+
</Sidebar>
|
|
25
|
+
<Content>{props.children}</Content>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function Sidebar(props: { children: JSX.Element }) {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
id="sidebar"
|
|
34
|
+
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
35
|
+
class="p-5 flex flex-col shrink-0 border-r-2 border-r-gray-200"
|
|
36
|
+
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
37
|
+
style={{
|
|
38
|
+
padding: "20px",
|
|
39
|
+
"flex-shrink": 0,
|
|
40
|
+
display: "flex",
|
|
41
|
+
"flex-direction": "column",
|
|
42
|
+
"line-height": "1.8em",
|
|
43
|
+
"border-right": "2px solid #eee",
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
{props.children}
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function Content(props: { children: JSX.Element }) {
|
|
52
|
+
return (
|
|
53
|
+
<div id="page-container">
|
|
54
|
+
<div
|
|
55
|
+
id="page-content"
|
|
56
|
+
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
57
|
+
class="p-5 pb-12 min-h-screen"
|
|
58
|
+
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
59
|
+
style={{
|
|
60
|
+
padding: "20px",
|
|
61
|
+
"padding-bottom": "50px",
|
|
62
|
+
"min-height": "100vh",
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
{props.children}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function Logo() {
|
|
72
|
+
return (
|
|
73
|
+
<div
|
|
74
|
+
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
75
|
+
class="p-5 mb-2"
|
|
76
|
+
//# !import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
77
|
+
style={{
|
|
78
|
+
"margin-top": "20px",
|
|
79
|
+
"margin-bottom": "10px",
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
<a href="/">
|
|
83
|
+
<img src={logoUrl} height={64} width={64} />
|
|
84
|
+
</a>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/* Links */
|
|
2
|
-
a {
|
|
3
|
-
text-decoration: none;
|
|
4
|
-
}
|
|
5
|
-
#sidebar a {
|
|
6
|
-
padding: 2px 10px;
|
|
7
|
-
margin-left: -10px;
|
|
8
|
-
}
|
|
9
|
-
#sidebar a.is-active {
|
|
10
|
-
background-color: #eee;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/* Reset */
|
|
14
|
-
body {
|
|
15
|
-
margin: 0;
|
|
16
|
-
font-family: sans-serif;
|
|
17
|
-
}
|
|
18
|
-
* {
|
|
19
|
-
box-sizing: border-box;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/* Page Transition Anmiation */
|
|
23
|
-
#page-content {
|
|
24
|
-
opacity: 1;
|
|
25
|
-
transition: opacity 0.3s ease-in-out;
|
|
26
|
-
}
|
|
27
|
-
body.page-is-transitioning #page-content {
|
|
28
|
-
opacity: 0;
|
|
29
|
-
}
|
|
1
|
+
/* Links */
|
|
2
|
+
a {
|
|
3
|
+
text-decoration: none;
|
|
4
|
+
}
|
|
5
|
+
#sidebar a {
|
|
6
|
+
padding: 2px 10px;
|
|
7
|
+
margin-left: -10px;
|
|
8
|
+
}
|
|
9
|
+
#sidebar a.is-active {
|
|
10
|
+
background-color: #eee;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Reset */
|
|
14
|
+
body {
|
|
15
|
+
margin: 0;
|
|
16
|
+
font-family: sans-serif;
|
|
17
|
+
}
|
|
18
|
+
* {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Page Transition Anmiation */
|
|
23
|
+
#page-content {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
transition: opacity 0.3s ease-in-out;
|
|
26
|
+
}
|
|
27
|
+
body.page-is-transitioning #page-content {
|
|
28
|
+
opacity: 0;
|
|
29
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Config } from "vike-solid";
|
|
2
|
-
import Layout from "../layouts/LayoutDefault";
|
|
3
|
-
import Head from "../layouts/HeadDefault";
|
|
4
|
-
|
|
5
|
-
// Default config (can be overriden by pages)
|
|
6
|
-
export default {
|
|
7
|
-
Layout,
|
|
8
|
-
Head,
|
|
9
|
-
// <title>
|
|
10
|
-
title: "My Vike App",
|
|
11
|
-
// <meta name="description">
|
|
12
|
-
description: "Demo showcasing Vike",
|
|
13
|
-
} satisfies Config;
|
|
1
|
+
import type { Config } from "vike-solid";
|
|
2
|
+
import Layout from "../layouts/LayoutDefault";
|
|
3
|
+
import Head from "../layouts/HeadDefault";
|
|
4
|
+
|
|
5
|
+
// Default config (can be overriden by pages)
|
|
6
|
+
export default {
|
|
7
|
+
Layout,
|
|
8
|
+
Head,
|
|
9
|
+
// <title>
|
|
10
|
+
title: "My Vike App",
|
|
11
|
+
// <meta name="description">
|
|
12
|
+
description: "Demo showcasing Vike",
|
|
13
|
+
} satisfies Config;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export default function Page(props: { is404: boolean; errorInfo?: string }) {
|
|
2
|
-
if (props.is404) {
|
|
3
|
-
return (
|
|
4
|
-
<>
|
|
5
|
-
<h1>404 Page Not Found</h1>
|
|
6
|
-
<p>This page could not be found.</p>
|
|
7
|
-
<p>{props.errorInfo}</p>
|
|
8
|
-
</>
|
|
9
|
-
);
|
|
10
|
-
} else {
|
|
11
|
-
return (
|
|
12
|
-
<>
|
|
13
|
-
<h1>500 Internal Server Error</h1>
|
|
14
|
-
<p>Something went wrong.</p>
|
|
15
|
-
</>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
export default function Page(props: { is404: boolean; errorInfo?: string }) {
|
|
2
|
+
if (props.is404) {
|
|
3
|
+
return (
|
|
4
|
+
<>
|
|
5
|
+
<h1>404 Page Not Found</h1>
|
|
6
|
+
<p>This page could not be found.</p>
|
|
7
|
+
<p>{props.errorInfo}</p>
|
|
8
|
+
</>
|
|
9
|
+
);
|
|
10
|
+
} else {
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<h1>500 Internal Server Error</h1>
|
|
14
|
+
<p>Something went wrong.</p>
|
|
15
|
+
</>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Counter } from "./Counter";
|
|
2
|
-
|
|
3
|
-
export default function Page() {
|
|
4
|
-
return (
|
|
5
|
-
<>
|
|
6
|
-
<h1
|
|
7
|
-
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
8
|
-
class="font-bold text-3xl pb-4"
|
|
9
|
-
>
|
|
10
|
-
My Vike app
|
|
11
|
-
</h1>
|
|
12
|
-
This page is:
|
|
13
|
-
<ul>
|
|
14
|
-
<li>Rendered to HTML.</li>
|
|
15
|
-
<li>
|
|
16
|
-
Interactive. <Counter />
|
|
17
|
-
</li>
|
|
18
|
-
</ul>
|
|
19
|
-
</>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
1
|
+
import { Counter } from "./Counter";
|
|
2
|
+
|
|
3
|
+
export default function Page() {
|
|
4
|
+
return (
|
|
5
|
+
<>
|
|
6
|
+
<h1
|
|
7
|
+
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
8
|
+
class="font-bold text-3xl pb-4"
|
|
9
|
+
>
|
|
10
|
+
My Vike app
|
|
11
|
+
</h1>
|
|
12
|
+
This page is:
|
|
13
|
+
<ul>
|
|
14
|
+
<li>Rendered to HTML.</li>
|
|
15
|
+
<li>
|
|
16
|
+
Interactive. <Counter />
|
|
17
|
+
</li>
|
|
18
|
+
</ul>
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { createSignal } from "solid-js";
|
|
2
|
-
|
|
3
|
-
export { Counter };
|
|
4
|
-
|
|
5
|
-
function Counter() {
|
|
6
|
-
const [count, setCount] = createSignal(0);
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<button
|
|
10
|
-
type="button"
|
|
11
|
-
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
12
|
-
class="inline-block border border-black rounded bg-gray-200 px-2 py-1 text-xs font-medium uppercase leading-normal"
|
|
13
|
-
onClick={() => setCount((count) => count + 1)}
|
|
14
|
-
>
|
|
15
|
-
Counter {count()}
|
|
16
|
-
</button>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
1
|
+
import { createSignal } from "solid-js";
|
|
2
|
+
|
|
3
|
+
export { Counter };
|
|
4
|
+
|
|
5
|
+
function Counter() {
|
|
6
|
+
const [count, setCount] = createSignal(0);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<button
|
|
10
|
+
type="button"
|
|
11
|
+
//# import.meta.BATI_MODULES?.includes("uikit:tailwindcss")
|
|
12
|
+
class="inline-block border border-black rounded bg-gray-200 px-2 py-1 text-xs font-medium uppercase leading-normal"
|
|
13
|
+
onClick={() => setCount((count) => count + 1)}
|
|
14
|
+
>
|
|
15
|
+
Counter {count()}
|
|
16
|
+
</button>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { MovieDetails } from "../types";
|
|
2
|
-
|
|
3
|
-
export default function Page(props: { movie: MovieDetails }) {
|
|
4
|
-
return (
|
|
5
|
-
<>
|
|
6
|
-
<h1>{props.movie.title}</h1>
|
|
7
|
-
Release Date: {props.movie.release_date}
|
|
8
|
-
<br />
|
|
9
|
-
Director: {props.movie.director}
|
|
10
|
-
<br />
|
|
11
|
-
Producer: {props.movie.producer}
|
|
12
|
-
</>
|
|
13
|
-
);
|
|
14
|
-
}
|
|
1
|
+
import type { MovieDetails } from "../types";
|
|
2
|
+
|
|
3
|
+
export default function Page(props: { movie: MovieDetails }) {
|
|
4
|
+
return (
|
|
5
|
+
<>
|
|
6
|
+
<h1>{props.movie.title}</h1>
|
|
7
|
+
Release Date: {props.movie.release_date}
|
|
8
|
+
<br />
|
|
9
|
+
Director: {props.movie.director}
|
|
10
|
+
<br />
|
|
11
|
+
Producer: {props.movie.producer}
|
|
12
|
+
</>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export default onBeforeRender;
|
|
2
|
-
|
|
3
|
-
import fetch from "cross-fetch";
|
|
4
|
-
import { filterMovieData } from "../filterMovieData";
|
|
5
|
-
import type { PageContextBuiltIn } from "vike-solid";
|
|
6
|
-
import type { MovieDetails } from "../types";
|
|
7
|
-
|
|
8
|
-
async function onBeforeRender(pageContext: PageContextBuiltIn) {
|
|
9
|
-
const response = await fetch(`https://star-wars.brillout.com/api/films/${pageContext.routeParams.id}.json`);
|
|
10
|
-
let movie = (await response.json()) as MovieDetails;
|
|
11
|
-
|
|
12
|
-
// We remove data we don't need because we pass `pageContext.movie` to
|
|
13
|
-
// the client; we want to minimize what is sent over the network.
|
|
14
|
-
movie = filterMovieData(movie);
|
|
15
|
-
|
|
16
|
-
const { title } = movie;
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
pageContext: {
|
|
20
|
-
pageProps: {
|
|
21
|
-
movie,
|
|
22
|
-
},
|
|
23
|
-
// The page's <title>
|
|
24
|
-
title,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
}
|
|
1
|
+
export default onBeforeRender;
|
|
2
|
+
|
|
3
|
+
import fetch from "cross-fetch";
|
|
4
|
+
import { filterMovieData } from "../filterMovieData";
|
|
5
|
+
import type { PageContextBuiltIn } from "vike-solid";
|
|
6
|
+
import type { MovieDetails } from "../types";
|
|
7
|
+
|
|
8
|
+
async function onBeforeRender(pageContext: PageContextBuiltIn) {
|
|
9
|
+
const response = await fetch(`https://star-wars.brillout.com/api/films/${pageContext.routeParams.id}.json`);
|
|
10
|
+
let movie = (await response.json()) as MovieDetails;
|
|
11
|
+
|
|
12
|
+
// We remove data we don't need because we pass `pageContext.movie` to
|
|
13
|
+
// the client; we want to minimize what is sent over the network.
|
|
14
|
+
movie = filterMovieData(movie);
|
|
15
|
+
|
|
16
|
+
const { title } = movie;
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
pageContext: {
|
|
20
|
+
pageProps: {
|
|
21
|
+
movie,
|
|
22
|
+
},
|
|
23
|
+
// The page's <title>
|
|
24
|
+
title,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { MovieDetails } from "./types";
|
|
2
|
-
|
|
3
|
-
export { filterMovieData };
|
|
4
|
-
|
|
5
|
-
function filterMovieData(
|
|
6
|
-
movie: MovieDetails & Record<string, unknown>
|
|
7
|
-
): MovieDetails {
|
|
8
|
-
const { id, title, release_date, director, producer } = movie;
|
|
9
|
-
movie = { id, title, release_date, director, producer };
|
|
10
|
-
return movie;
|
|
11
|
-
}
|
|
1
|
+
import type { MovieDetails } from "./types";
|
|
2
|
+
|
|
3
|
+
export { filterMovieData };
|
|
4
|
+
|
|
5
|
+
function filterMovieData(
|
|
6
|
+
movie: MovieDetails & Record<string, unknown>
|
|
7
|
+
): MovieDetails {
|
|
8
|
+
const { id, title, release_date, director, producer } = movie;
|
|
9
|
+
movie = { id, title, release_date, director, producer };
|
|
10
|
+
return movie;
|
|
11
|
+
}
|