mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 08:39:40 +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
71
uload/scripts/test-pocketbase.js
Normal file
71
uload/scripts/test-pocketbase.js
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
import PocketBase from 'pocketbase';
|
||||
|
||||
const POCKETBASE_URL = process.env.PUBLIC_POCKETBASE_URL || 'http://localhost:8090';
|
||||
|
||||
console.log('Testing PocketBase connection...');
|
||||
console.log('URL:', POCKETBASE_URL);
|
||||
|
||||
const pb = new PocketBase(POCKETBASE_URL);
|
||||
|
||||
async function testConnection() {
|
||||
try {
|
||||
// Test 1: Check health endpoint
|
||||
const health = await pb.health.check();
|
||||
console.log('✓ Health check passed:', health);
|
||||
|
||||
// Test 2: List collections
|
||||
const collections = await pb.collections.getList();
|
||||
console.log(
|
||||
'✓ Collections found:',
|
||||
collections.items.map((c) => c.name)
|
||||
);
|
||||
|
||||
// Test 3: Check users collection
|
||||
const usersCollection = await pb.collections.getOne('users');
|
||||
console.log('✓ Users collection schema:', {
|
||||
name: usersCollection.name,
|
||||
fields: usersCollection.schema.map((f) => ({
|
||||
name: f.name,
|
||||
type: f.type,
|
||||
required: f.required
|
||||
}))
|
||||
});
|
||||
|
||||
// Test 4: Try to list users (might fail due to permissions)
|
||||
try {
|
||||
const users = await pb.collection('users').getList(1, 1);
|
||||
console.log('✓ Can list users:', users.totalItems, 'total users');
|
||||
} catch (e) {
|
||||
console.log('⚠ Cannot list users (probably permission issue):', e.message);
|
||||
}
|
||||
|
||||
// Test 5: Test registration endpoint
|
||||
console.log('\nTesting registration capability...');
|
||||
const testEmail = `test${Date.now()}@example.com`;
|
||||
try {
|
||||
const result = await pb.collection('users').create({
|
||||
email: testEmail,
|
||||
password: 'Test123456!',
|
||||
passwordConfirm: 'Test123456!',
|
||||
username: `testuser${Date.now()}`
|
||||
});
|
||||
console.log('✓ Registration test successful, user created:', result.id);
|
||||
// Clean up test user
|
||||
await pb.collection('users').delete(result.id);
|
||||
console.log('✓ Test user cleaned up');
|
||||
} catch (e) {
|
||||
console.error('✗ Registration failed:', e.response || e.message);
|
||||
if (e.response?.data) {
|
||||
console.error('Error details:', JSON.stringify(e.response.data, null, 2));
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('✗ Connection failed:', error.message);
|
||||
if (error.response) {
|
||||
console.error('Response:', error.response);
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
testConnection();
|
||||
Loading…
Add table
Add a link
Reference in a new issue