diff --git a/apps/data-service/src/services/proxy.service.ts b/apps/data-service/src/services/proxy.service.ts index 23f2cee..a15966e 100644 --- a/apps/data-service/src/services/proxy.service.ts +++ b/apps/data-service/src/services/proxy.service.ts @@ -240,7 +240,11 @@ export class ProxyService { for (const proxy of proxies) { const key = this.getProxyKey(proxy); const data: ProxyData = { - ...proxy, + protocol: proxy.protocol, + host: proxy.host, + port: proxy.port, + username: proxy.username, + password: proxy.password, addedAt: new Date(), lastChecked: null, isWorking: null, diff --git a/apps/data-service/tsconfig.json b/apps/data-service/tsconfig.json new file mode 100644 index 0000000..9c66731 --- /dev/null +++ b/apps/data-service/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist", + "rootDir": "./src", + "declaration": true + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "dist", + "node_modules", + "**/*.test.ts", + "**/*.spec.ts" + ], +} diff --git a/libs/http-client/src/types.ts b/libs/http-client/src/types.ts index 208cc81..654d106 100644 --- a/libs/http-client/src/types.ts +++ b/libs/http-client/src/types.ts @@ -95,9 +95,9 @@ export function validateProxyConfig(config: unknown): ProxyConfig { const proxy = config as Record; - // Validate type - if (!proxy.type || !['http', 'https', 'socks4', 'socks5'].includes(proxy.type as string)) { - throw new Error('Proxy type must be one of: http, https, socks4, socks5'); + // Validate protocol + if (!proxy.protocol || !['http', 'https', 'socks4', 'socks5'].includes(proxy.protocol as string)) { + throw new Error('Proxy protocol must be one of: http, https, socks4, socks5'); } // Validate host