tlc-claude-code 1.4.6 → 1.4.8
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 +7 -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,21 @@ services:
|
|
|
101
101
|
working_dir: /project
|
|
102
102
|
command: >
|
|
103
103
|
sh -c "
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
echo 'Installing TLC...' &&
|
|
105
|
+
npm install -g tlc-claude-code@latest &&
|
|
106
|
+
TLC_DIR=/usr/local/lib/node_modules/tlc-claude-code &&
|
|
107
|
+
echo 'TLC installed at:' $$TLC_DIR &&
|
|
108
|
+
ls -la $$TLC_DIR/server/ &&
|
|
109
|
+
cd /project && node $$TLC_DIR/server/index.js --proxy-only --skip-db
|
|
107
110
|
"
|
|
108
111
|
environment:
|
|
109
112
|
- TLC_PORT=3147
|
|
110
113
|
- TLC_PROXY_ONLY=true
|
|
111
114
|
- TLC_APP_PORT=5001
|
|
115
|
+
- TLC_AUTH=false
|
|
112
116
|
ports:
|
|
113
117
|
- "${DASHBOARD_PORT:-3147}:3147"
|
|
114
118
|
volumes:
|
|
115
|
-
- ./server:/tlc/server
|
|
116
119
|
- ..:/project
|
|
117
120
|
depends_on:
|
|
118
121
|
- 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);
|