vela 0.15.12 → 0.16.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 +5 -4
- package/dist/bin.js +1854 -1355
- package/dist/bin.js.map +4 -4
- package/package.json +2 -2
- package/templates/minimal/src/routes/(public)/+page.svelte +1 -1
- package/templates/minimal/test/setup.ts +9 -3
- package/templates/server/systemd/vela-pb@.service +1 -1
- package/templates/server/systemd/vela-web@.service +1 -1
- package/templates/static/src/routes/(public)/+page.svelte +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vela",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A CLI for creating and updating SvelteKit projects",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@clack/prompts": "^1.7.0",
|
|
39
39
|
"@faker-js/faker": "^10.6.0",
|
|
40
|
-
"@velastack/patterns": "^0.
|
|
40
|
+
"@velastack/patterns": "^0.5.0",
|
|
41
41
|
"@velastack/pocketbase-codegen": "^0.1.0",
|
|
42
42
|
"@velastack/schema": "^0.3.0",
|
|
43
43
|
"@velastack/schema-ui": "^0.3.1",
|
|
@@ -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
|
|
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
|
|
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(
|
|
46
|
+
await context.pb.collection('users').authWithPassword(email, testUserPassword);
|
|
41
47
|
});
|
|
42
48
|
|
|
43
49
|
afterEach(async (context: TestContext) => {
|