File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @zenstackhq/proxy" ,
3- "version" : " 0.2.3 " ,
3+ "version" : " 0.2.4 " ,
44 "description" : " A CLI tool to run an Express server that proxies CRUD requests to a ZenStack backend" ,
55 "main" : " index.js" ,
66 "publishConfig" : {
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ function loadPrismaConfig(schemaDir: string): string | null {
7575 const config = configFn ( env )
7676 return config ?. datasource ?. url
7777 } catch ( error ) {
78- if ( error instanceof Error && error . message . includes ( 'Environment variable' ) ) {
78+ if ( error instanceof Error ) {
7979 throw error
8080 }
8181 console . warn ( `Warning: Failed to parse prisma.config.ts: ${ error } ` )
@@ -132,6 +132,9 @@ function parseDatasource(
132132 const urlFn = new Function ( 'env' , `return ${ urlValueStr } ` )
133133 url = urlFn ( env )
134134 } catch ( evalError ) {
135+ if ( evalError instanceof CliError ) {
136+ throw evalError
137+ }
135138 throw new CliError (
136139 'Could not evaluate datasource url from schema, you could provide it via -d option.'
137140 )
@@ -141,7 +144,7 @@ function parseDatasource(
141144 // If still no URL found, throw error
142145 if ( url == null ) {
143146 throw new CliError (
144- 'No datasource URL found. For Prisma 7, ensure prisma.config.ts exists with datasource configuration, or provide the URL via -d option.'
147+ 'No datasource URL found. For Prisma 7, ensure prisma.config.ts exists with datasource configuration or directly provide the URL via -d option.'
145148 )
146149 }
147150 }
You can’t perform that action at this time.
0 commit comments