vela 0.13.4 → 0.14.0
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 +1 -0
- package/dist/bin.js +893 -666
- package/dist/bin.js.map +4 -4
- package/package.json +3 -3
- package/templates/minimal/package.template.json +1 -1
- package/templates/minimal/src/lib/site.template.ts +12 -0
- package/templates/minimal/src/routes/(public)/+page.svelte +3 -4
- package/templates/minimal/src/routes/(public)/root-layout.svelte +6 -2
- package/templates/minimal/src/routes/+layout.server.ts +9 -6
- package/templates/minimal/src/routes/+layout.svelte +2 -1
- package/templates/static/src/lib/site.template.ts +5 -4
- package/templates/static/src/routes/(public)/+page.svelte +3 -4
- package/templates/static/src/routes/(public)/root-layout.svelte +6 -2
- package/templates/static/src/routes/+layout.svelte +2 -1
- package/templates/static/src/routes/+layout.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vela",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI for creating and updating SvelteKit projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@clack/prompts": "^1.7.0",
|
|
38
38
|
"@faker-js/faker": "^10.6.0",
|
|
39
|
-
"@velastack/patterns": "^0.
|
|
39
|
+
"@velastack/patterns": "^0.3.0",
|
|
40
40
|
"@velastack/pocketbase-codegen": "^0.1.0",
|
|
41
41
|
"annotate-json-schema": "^0.1.0",
|
|
42
42
|
"commander": "^13.1.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"package-manager-detector": "^1.8.0",
|
|
50
50
|
"picocolors": "^1.1.1",
|
|
51
51
|
"pocketbase": "^0.28.0",
|
|
52
|
-
"pocketbase-server": "^0.40.5-beta.
|
|
52
|
+
"pocketbase-server": "^0.40.5-beta.2",
|
|
53
53
|
"stripe": "^19.3.0",
|
|
54
54
|
"svelte": "^5.56.10",
|
|
55
55
|
"tar": "^7.5.22",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Site-wide metadata, and the one place the app's name and public URL live.
|
|
3
|
+
*
|
|
4
|
+
* Set `url` to where the site is deployed: canonical links, Open Graph images
|
|
5
|
+
* and feeds are built from it, including in prerendered pages. With a backend,
|
|
6
|
+
* `vela dev` and `vela deploy` copy `name` into PocketBase's application name
|
|
7
|
+
* for the emails it sends, so change it here rather than in the admin panel.
|
|
8
|
+
*/
|
|
9
|
+
export const site = {
|
|
10
|
+
name: '~APP_NAME~',
|
|
11
|
+
url: '~SITE_URL~'
|
|
12
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import favicon from '$lib/assets/favicon.svg';
|
|
3
|
-
|
|
4
|
-
let { data } = $props();
|
|
3
|
+
import { site } from '$lib/site';
|
|
5
4
|
</script>
|
|
6
5
|
|
|
7
6
|
<main class="flex-1">
|
|
@@ -13,11 +12,11 @@
|
|
|
13
12
|
>
|
|
14
13
|
<img src={favicon} alt="logo" class="size-4" />
|
|
15
14
|
</span>
|
|
16
|
-
{
|
|
15
|
+
{site.name}
|
|
17
16
|
</a>
|
|
18
17
|
|
|
19
18
|
<h1 class="mt-6 text-4xl font-semibold tracking-tight sm:text-5xl">
|
|
20
|
-
{
|
|
19
|
+
{site.name} is running on VelaStack
|
|
21
20
|
</h1>
|
|
22
21
|
<p class="text-muted-foreground mt-4 text-lg">
|
|
23
22
|
A SvelteKit app with a PocketBase backend already migrated behind it, and types synced from
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
2
3
|
import favicon from '$lib/assets/favicon.svg';
|
|
4
|
+
import { site } from '$lib/site';
|
|
3
5
|
|
|
4
6
|
import { toggleMode } from 'mode-watcher';
|
|
5
7
|
import * as Navbar from '$lib/components/ui/navbar';
|
|
6
8
|
import { Button } from '$lib/components/ui/button';
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
// Layout data is passed through for navbar items a feature adds; enable auth
|
|
11
|
+
// reads the signed-in user from it.
|
|
12
|
+
let { children }: { children?: Snippet; data?: any } = $props();
|
|
9
13
|
</script>
|
|
10
14
|
|
|
11
15
|
<div class="min-h-dvh grid grid-rows-[max-content_1fr_max-content] root-layout">
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
>
|
|
34
38
|
<p class="text-muted-foreground text-sm">
|
|
35
39
|
© {new Date().getFullYear()}
|
|
36
|
-
{
|
|
40
|
+
{site.name}. All rights reserved.
|
|
37
41
|
</p>
|
|
38
42
|
<nav class="flex items-center gap-4 text-sm">
|
|
39
43
|
<Button onclick={toggleMode} variant="ghost" size="icon">
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { loadFlash } from 'sveltekit-flash-message/server';
|
|
2
2
|
import { defineBaseMetaTags } from 'svelte-meta-tags';
|
|
3
|
+
import { site } from '$lib/site';
|
|
3
4
|
|
|
4
|
-
export const load = loadFlash(async ({
|
|
5
|
-
|
|
5
|
+
export const load = loadFlash(async ({ url }) => {
|
|
6
|
+
// Built from `site.url`, not `url.origin`: every deployment and every
|
|
7
|
+
// prerendered page (where the origin is SvelteKit's placeholder host) should
|
|
8
|
+
// point at the one address the site is published under.
|
|
9
|
+
const canonical = new URL(url.pathname, site.url).href;
|
|
6
10
|
|
|
7
11
|
const baseTags = defineBaseMetaTags({
|
|
8
12
|
title: '',
|
|
9
|
-
titleTemplate: `%s | ${
|
|
13
|
+
titleTemplate: `%s | ${site.name}`,
|
|
10
14
|
description: '',
|
|
11
15
|
canonical,
|
|
12
16
|
openGraph: {
|
|
@@ -14,8 +18,8 @@ export const load = loadFlash(async ({ locals, url }) => {
|
|
|
14
18
|
url: canonical,
|
|
15
19
|
images: [
|
|
16
20
|
{
|
|
17
|
-
url: `${
|
|
18
|
-
alt:
|
|
21
|
+
url: `${site.url}/og.jpg`,
|
|
22
|
+
alt: site.name,
|
|
19
23
|
width: 1200,
|
|
20
24
|
height: 630
|
|
21
25
|
}
|
|
@@ -24,7 +28,6 @@ export const load = loadFlash(async ({ locals, url }) => {
|
|
|
24
28
|
});
|
|
25
29
|
|
|
26
30
|
return {
|
|
27
|
-
meta: locals.meta,
|
|
28
31
|
...baseTags
|
|
29
32
|
};
|
|
30
33
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import '../app.css';
|
|
3
3
|
|
|
4
4
|
import favicon from '$lib/assets/favicon.svg';
|
|
5
|
+
import { site } from '$lib/site';
|
|
5
6
|
|
|
6
7
|
import { ModeWatcher } from 'mode-watcher';
|
|
7
8
|
import { getFlash } from 'sveltekit-flash-message';
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
</script>
|
|
28
29
|
|
|
29
30
|
<svelte:head>
|
|
30
|
-
<title>{
|
|
31
|
+
<title>{site.name}</title>
|
|
31
32
|
<link rel="icon" href={favicon} />
|
|
32
33
|
</svelte:head>
|
|
33
34
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Site-wide metadata.
|
|
2
|
+
* Site-wide metadata, and the one place the app's name and public URL live.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Set `url` to where the site is deployed: canonical links, Open Graph images
|
|
5
|
+
* and feeds are built from it, including in prerendered pages. With a backend,
|
|
6
|
+
* `vela dev` and `vela deploy` copy `name` into PocketBase's application name
|
|
7
|
+
* for the emails it sends, so change it here rather than in the admin panel.
|
|
7
8
|
*/
|
|
8
9
|
export const site = {
|
|
9
10
|
name: '~APP_NAME~',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import favicon from '$lib/assets/favicon.svg';
|
|
3
|
-
|
|
4
|
-
let { data } = $props();
|
|
3
|
+
import { site } from '$lib/site';
|
|
5
4
|
</script>
|
|
6
5
|
|
|
7
6
|
<main class="flex-1">
|
|
@@ -13,11 +12,11 @@
|
|
|
13
12
|
>
|
|
14
13
|
<img src={favicon} alt="logo" class="size-4" />
|
|
15
14
|
</span>
|
|
16
|
-
{
|
|
15
|
+
{site.name}
|
|
17
16
|
</a>
|
|
18
17
|
|
|
19
18
|
<h1 class="mt-6 text-4xl font-semibold tracking-tight sm:text-5xl">
|
|
20
|
-
{
|
|
19
|
+
{site.name} is running on VelaStack
|
|
21
20
|
</h1>
|
|
22
21
|
<p class="text-muted-foreground mt-4 text-lg">
|
|
23
22
|
A SvelteKit site that prerenders to static HTML, so there is no server to run and nothing to
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
2
3
|
import favicon from '$lib/assets/favicon.svg';
|
|
4
|
+
import { site } from '$lib/site';
|
|
3
5
|
|
|
4
6
|
import { toggleMode } from 'mode-watcher';
|
|
5
7
|
import * as Navbar from '$lib/components/ui/navbar';
|
|
6
8
|
import { Button } from '$lib/components/ui/button';
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
// Layout data is passed through for navbar items a feature adds; enable auth
|
|
11
|
+
// reads the signed-in user from it.
|
|
12
|
+
let { children }: { children?: Snippet; data?: any } = $props();
|
|
9
13
|
</script>
|
|
10
14
|
|
|
11
15
|
<div class="min-h-dvh grid grid-rows-[max-content_1fr_max-content] root-layout">
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
>
|
|
34
38
|
<p class="text-muted-foreground text-sm">
|
|
35
39
|
© {new Date().getFullYear()}
|
|
36
|
-
{
|
|
40
|
+
{site.name}. All rights reserved.
|
|
37
41
|
</p>
|
|
38
42
|
<nav class="flex items-center gap-4 text-sm">
|
|
39
43
|
<Button onclick={toggleMode} variant="ghost" size="icon">
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import '../app.css';
|
|
3
3
|
|
|
4
4
|
import favicon from '$lib/assets/favicon.svg';
|
|
5
|
+
import { site } from '$lib/site';
|
|
5
6
|
|
|
6
7
|
import { ModeWatcher } from 'mode-watcher';
|
|
7
8
|
import { page } from '$app/state';
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
</script>
|
|
15
16
|
|
|
16
17
|
<svelte:head>
|
|
17
|
-
<title>{
|
|
18
|
+
<title>{site.name}</title>
|
|
18
19
|
<link rel="icon" href={favicon} />
|
|
19
20
|
</svelte:head>
|
|
20
21
|
|