vela 0.15.11 → 0.15.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vela",
3
- "version": "0.15.11",
3
+ "version": "0.15.13",
4
4
  "type": "module",
5
5
  "description": "A CLI for creating and updating SvelteKit projects",
6
6
  "license": "MIT",
@@ -39,6 +39,8 @@
39
39
  "@faker-js/faker": "^10.6.0",
40
40
  "@velastack/patterns": "^0.4.2",
41
41
  "@velastack/pocketbase-codegen": "^0.1.0",
42
+ "@velastack/schema": "^0.3.0",
43
+ "@velastack/schema-ui": "^0.3.1",
42
44
  "annotate-json-schema": "^0.1.1",
43
45
  "commander": "^15.0.0",
44
46
  "cross-spawn": "^7.0.6",
@@ -28,7 +28,7 @@
28
28
 
29
29
  <div class="mt-8 flex items-center justify-center gap-3">
30
30
  <a
31
- href="https://docs.velastack.dev"
31
+ href="https://velastack.dev/docs"
32
32
  class="bg-primary text-primary-foreground inline-flex items-center rounded-md px-5 py-2.5"
33
33
  >
34
34
  Read the docs
@@ -8,7 +8,12 @@ const pb = new PocketBase(process.env.POCKETBASE_URL!) as App.Locals['pb'];
8
8
 
9
9
  const testUserPassword = 'password';
10
10
 
11
- async function authenticateUser(agent: Agent, user: { email: string }) {
11
+ async function authenticateUser(agent: Agent, user: { email?: string }) {
12
+ // Logs in with the password, so it needs the email (made optional by
13
+ // enable-whatsapp, for accounts that sign in with a phone number).
14
+ if (!user.email) {
15
+ throw new Error('authenticateUser needs a user with an email');
16
+ }
12
17
  await agent.post('/login').type('form').send({
13
18
  type: 'password',
14
19
  email: user.email,
@@ -31,13 +36,14 @@ beforeEach(async (context: TestContext) => {
31
36
  context.agent = supertest.agent(process.env.VITE_TEST_URL!) as TestContext['agent'];
32
37
  context.admin = admin;
33
38
  context.pb = pb;
39
+ const email = `test-${Math.random().toString(36).slice(2)}@example.com`;
34
40
  context.user = await context.admin.collection('users').create({
35
- email: `test-${Math.random().toString(36).slice(2)}@example.com`,
41
+ email,
36
42
  password: testUserPassword,
37
43
  passwordConfirm: testUserPassword
38
44
  });
39
45
  context.agent.authenticateUser = () => authenticateUser(context.agent, context.user);
40
- await context.pb.collection('users').authWithPassword(context.user.email, testUserPassword);
46
+ await context.pb.collection('users').authWithPassword(email, testUserPassword);
41
47
  });
42
48
 
43
49
  afterEach(async (context: TestContext) => {
@@ -1,6 +1,6 @@
1
1
  [Unit]
2
2
  Description=vela PocketBase %i
3
- Documentation=https://docs.velastack.dev
3
+ Documentation=https://velastack.dev/docs
4
4
  After=network-online.target
5
5
  Wants=network-online.target
6
6
 
@@ -1,6 +1,6 @@
1
1
  [Unit]
2
2
  Description=vela app %i
3
- Documentation=https://docs.velastack.dev
3
+ Documentation=https://velastack.dev/docs
4
4
  After=network-online.target vela-pb@%i.service
5
5
  Wants=network-online.target
6
6
 
@@ -28,7 +28,7 @@
28
28
 
29
29
  <div class="mt-8 flex items-center justify-center gap-3">
30
30
  <a
31
- href="https://docs.velastack.dev"
31
+ href="https://velastack.dev/docs"
32
32
  class="bg-primary text-primary-foreground inline-flex items-center rounded-md px-5 py-2.5"
33
33
  >
34
34
  Read the docs