mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 13:19:39 +02:00
feat: integrate uload and picture, unify package naming
- Add uload project with apps/web structure
- Reorganize from flat to monorepo structure
- Remove PocketBase binary and local data
- Update to pnpm and @uload/web namespace
- Add picture project to monorepo
- Remove embedded git repository
- Unify all package names to @{project}/{app} schema:
- @maerchenzauber/* (was @storyteller/*)
- @manacore/* (was manacore-*, manacore)
- @manadeck/* (was web, backend, manadeck)
- @memoro/* (was memoro-web, landing, memoro)
- @picture/* (already unified)
- @uload/web
- Add convenient dev scripts for all apps:
- pnpm dev:{project}:web
- pnpm dev:{project}:landing
- pnpm dev:{project}:mobile
- pnpm dev:{project}:backend
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c6c4c5a552
commit
c712a2504a
1031 changed files with 189301 additions and 290 deletions
59
uload/scripts/setup-test-user.mjs
Normal file
59
uload/scripts/setup-test-user.mjs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('https://pb.ulo.ad');
|
||||
|
||||
async function createTestUser() {
|
||||
const email = 'test@example.com';
|
||||
const password = 'test123456';
|
||||
const randomId = Math.random().toString(36).substring(2, 17);
|
||||
|
||||
console.log('Creating test user...');
|
||||
console.log('Email:', email);
|
||||
console.log('Password:', password);
|
||||
|
||||
try {
|
||||
// First check if user already exists
|
||||
const existing = await pb.collection('users').getList(1, 1, {
|
||||
filter: `email = "${email}"`
|
||||
});
|
||||
|
||||
if (existing.items.length > 0) {
|
||||
console.log('✅ Test user already exists!');
|
||||
console.log('ID:', existing.items[0].id);
|
||||
|
||||
// Try to login
|
||||
try {
|
||||
await pb.collection('users').authWithPassword(email, password);
|
||||
console.log('✅ Login successful with existing user!');
|
||||
} catch (err) {
|
||||
console.log('⚠️ User exists but password might be different');
|
||||
}
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
// User doesn't exist, continue to create
|
||||
}
|
||||
|
||||
try {
|
||||
const userData = {
|
||||
id: randomId,
|
||||
email: email,
|
||||
password: password,
|
||||
passwordConfirm: password,
|
||||
emailVisibility: true,
|
||||
username: 'testuser'
|
||||
};
|
||||
|
||||
const newUser = await pb.collection('users').create(userData);
|
||||
console.log('✅ Test user created successfully!');
|
||||
console.log('ID:', newUser.id);
|
||||
|
||||
// Verify login works
|
||||
const authData = await pb.collection('users').authWithPassword(email, password);
|
||||
console.log('✅ Login verified! Token:', authData.token.substring(0, 20) + '...');
|
||||
} catch (err) {
|
||||
console.error('❌ Failed to create test user:', err.response || err);
|
||||
}
|
||||
}
|
||||
|
||||
createTestUser().catch(console.error);
|
||||
Loading…
Add table
Add a link
Reference in a new issue