MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / redactDatabaseUrl

Function redactDatabaseUrl

packages/cli/src/actions/proxy.ts:185–199  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

183}
184
185function redactDatabaseUrl(url: string): string {
186 try {
187 const parsedUrl = new URL(url);
188 if (parsedUrl.password) {
189 parsedUrl.password = '***';
190 }
191 if (parsedUrl.username) {
192 parsedUrl.username = '***';
193 }
194 return parsedUrl.toString();
195 } catch {
196 // If URL parsing fails, return the original
197 return url;
198 }
199}
200
201async function createDialect(provider: string, databaseUrl: string, outputPath: string) {
202 switch (provider) {

Callers 1

createDialectFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected