tlc-claude-code 1.4.6 → 1.4.7
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/docker-compose.dev.yml +4 -4
- package/package.json +1 -1
- package/server/index.js +1 -2
- package/server/lib/auth-system.js +9 -5
package/docker-compose.dev.yml
CHANGED
|
@@ -101,18 +101,18 @@ services:
|
|
|
101
101
|
working_dir: /project
|
|
102
102
|
command: >
|
|
103
103
|
sh -c "
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
cd /project && node /
|
|
104
|
+
npm install -g tlc-claude-code &&
|
|
105
|
+
TLC_DIR=$$(npm root -g)/tlc-claude-code &&
|
|
106
|
+
cd /project && node $$TLC_DIR/server/index.js --proxy-only
|
|
107
107
|
"
|
|
108
108
|
environment:
|
|
109
109
|
- TLC_PORT=3147
|
|
110
110
|
- TLC_PROXY_ONLY=true
|
|
111
111
|
- TLC_APP_PORT=5001
|
|
112
|
+
- TLC_AUTH=false
|
|
112
113
|
ports:
|
|
113
114
|
- "${DASHBOARD_PORT:-3147}:3147"
|
|
114
115
|
volumes:
|
|
115
|
-
- ./server:/tlc/server
|
|
116
116
|
- ..:/project
|
|
117
117
|
depends_on:
|
|
118
118
|
- app
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -91,10 +91,9 @@ async function initializeAuth() {
|
|
|
91
91
|
password: adminPassword,
|
|
92
92
|
name: 'Admin',
|
|
93
93
|
role: 'admin',
|
|
94
|
-
});
|
|
94
|
+
}, { skipValidation: true }); // Dev tool - allow simple passwords
|
|
95
95
|
console.log(`[TLC] Admin user initialized: ${adminEmail}`);
|
|
96
96
|
} catch (e) {
|
|
97
|
-
// User may already exist
|
|
98
97
|
if (!e.message.includes('already registered')) {
|
|
99
98
|
console.error('[TLC] Failed to create admin user:', e.message);
|
|
100
99
|
}
|
|
@@ -318,8 +318,9 @@ function createUserStore() {
|
|
|
318
318
|
|
|
319
319
|
return {
|
|
320
320
|
// User methods
|
|
321
|
-
async createUser(data) {
|
|
322
|
-
|
|
321
|
+
async createUser(data, options = {}) {
|
|
322
|
+
// Skip email validation for dev setup (allows plain usernames)
|
|
323
|
+
if (!options.skipValidation && !validateEmail(data.email) && data.email.includes('@')) {
|
|
323
324
|
throw new Error('Invalid email format');
|
|
324
325
|
}
|
|
325
326
|
|
|
@@ -331,9 +332,12 @@ function createUserStore() {
|
|
|
331
332
|
throw new Error('Email already registered');
|
|
332
333
|
}
|
|
333
334
|
|
|
334
|
-
|
|
335
|
-
if (!
|
|
336
|
-
|
|
335
|
+
// Skip password validation for dev/config-based setup
|
|
336
|
+
if (!options.skipValidation) {
|
|
337
|
+
const passwordValidation = validatePassword(data.password);
|
|
338
|
+
if (!passwordValidation.valid) {
|
|
339
|
+
throw new Error(passwordValidation.errors.join(', '));
|
|
340
|
+
}
|
|
337
341
|
}
|
|
338
342
|
|
|
339
343
|
const user = createUser(data);
|