File tree 6 files changed +48
-54
lines changed
6 files changed +48
-54
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ export async function defineConfig(
87
87
const { preset : configDeploymentPreset , ...serverOptions } =
88
88
serverSchema . parse ( opts . server || { } )
89
89
90
- const deploymentPreset = checkDeploymentPresetInput ( configDeploymentPreset )
90
+ const deploymentPreset = checkDeploymentPresetInput (
91
+ configDeploymentPreset || 'node-server' ,
92
+ )
91
93
const tsr = setTsrDefaults ( opts . tsr )
92
94
const tsrConfig = getConfig ( tsr )
93
95
Original file line number Diff line number Diff line change @@ -80,23 +80,19 @@ const testedDeploymentPresets: Array<DeploymentPreset> = [
80
80
'node-server' ,
81
81
]
82
82
83
- export function checkDeploymentPresetInput (
84
- preset ?: string ,
85
- ) : DeploymentPreset | undefined {
86
- if ( preset ) {
87
- if ( ! vinxiDeploymentPresets . includes ( preset as any ) ) {
88
- console . warn (
89
- `Invalid deployment preset "${ preset } ". Available presets are: ${ vinxiDeploymentPresets
90
- . map ( ( p ) => `"${ p } "` )
91
- . join ( ', ' ) } .`,
92
- )
93
- }
94
-
95
- if ( ! testedDeploymentPresets . includes ( preset as any ) ) {
96
- console . warn (
97
- `The deployment preset '${ preset } ' is not fully supported yet and may not work as expected.` ,
98
- )
99
- }
83
+ export function checkDeploymentPresetInput ( preset : string ) : DeploymentPreset {
84
+ if ( ! vinxiDeploymentPresets . includes ( preset as any ) ) {
85
+ console . warn (
86
+ `Invalid deployment preset "${ preset } ". Available presets are: ${ vinxiDeploymentPresets
87
+ . map ( ( p ) => `"${ p } "` )
88
+ . join ( ', ' ) } .`,
89
+ )
90
+ }
91
+
92
+ if ( ! testedDeploymentPresets . includes ( preset as any ) ) {
93
+ console . warn (
94
+ `The deployment preset '${ preset } ' is not fully supported yet and may not work as expected.` ,
95
+ )
100
96
}
101
97
102
98
return preset
Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ export async function defineConfig(
87
87
const { preset : configDeploymentPreset , ...serverOptions } =
88
88
serverSchema . parse ( opts . server || { } )
89
89
90
- const deploymentPreset = checkDeploymentPresetInput ( configDeploymentPreset )
90
+ const deploymentPreset = checkDeploymentPresetInput (
91
+ configDeploymentPreset || 'node-server' ,
92
+ )
91
93
const tsr = setTsrDefaults ( opts . tsr )
92
94
const tsrConfig = getConfig ( tsr )
93
95
Original file line number Diff line number Diff line change @@ -80,23 +80,19 @@ const testedDeploymentPresets: Array<DeploymentPreset> = [
80
80
'node-server' ,
81
81
]
82
82
83
- export function checkDeploymentPresetInput (
84
- preset ?: string ,
85
- ) : DeploymentPreset | undefined {
86
- if ( preset ) {
87
- if ( ! vinxiDeploymentPresets . includes ( preset as any ) ) {
88
- console . warn (
89
- `Invalid deployment preset "${ preset } ". Available presets are: ${ vinxiDeploymentPresets
90
- . map ( ( p ) => `"${ p } "` )
91
- . join ( ', ' ) } .`,
92
- )
93
- }
94
-
95
- if ( ! testedDeploymentPresets . includes ( preset as any ) ) {
96
- console . warn (
97
- `The deployment preset '${ preset } ' is not fully supported yet and may not work as expected.` ,
98
- )
99
- }
83
+ export function checkDeploymentPresetInput ( preset : string ) : DeploymentPreset {
84
+ if ( ! vinxiDeploymentPresets . includes ( preset as any ) ) {
85
+ console . warn (
86
+ `Invalid deployment preset "${ preset } ". Available presets are: ${ vinxiDeploymentPresets
87
+ . map ( ( p ) => `"${ p } "` )
88
+ . join ( ', ' ) } .`,
89
+ )
90
+ }
91
+
92
+ if ( ! testedDeploymentPresets . includes ( preset as any ) ) {
93
+ console . warn (
94
+ `The deployment preset '${ preset } ' is not fully supported yet and may not work as expected.` ,
95
+ )
100
96
}
101
97
102
98
return preset
Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ export async function defineConfig(
87
87
const { preset : configDeploymentPreset , ...serverOptions } =
88
88
serverSchema . parse ( opts . server || { } )
89
89
90
- const deploymentPreset = checkDeploymentPresetInput ( configDeploymentPreset )
90
+ const deploymentPreset = checkDeploymentPresetInput (
91
+ configDeploymentPreset || 'node-server' ,
92
+ )
91
93
const tsr = setTsrDefaults ( opts . tsr )
92
94
const tsrConfig = getConfig ( tsr )
93
95
Original file line number Diff line number Diff line change @@ -80,23 +80,19 @@ const testedDeploymentPresets: Array<DeploymentPreset> = [
80
80
'node-server' ,
81
81
]
82
82
83
- export function checkDeploymentPresetInput (
84
- preset ?: string ,
85
- ) : DeploymentPreset | undefined {
86
- if ( preset ) {
87
- if ( ! vinxiDeploymentPresets . includes ( preset as any ) ) {
88
- console . warn (
89
- `Invalid deployment preset "${ preset } ". Available presets are: ${ vinxiDeploymentPresets
90
- . map ( ( p ) => `"${ p } "` )
91
- . join ( ', ' ) } .`,
92
- )
93
- }
94
-
95
- if ( ! testedDeploymentPresets . includes ( preset as any ) ) {
96
- console . warn (
97
- `The deployment preset '${ preset } ' is not fully supported yet and may not work as expected.` ,
98
- )
99
- }
83
+ export function checkDeploymentPresetInput ( preset : string ) : DeploymentPreset {
84
+ if ( ! vinxiDeploymentPresets . includes ( preset as any ) ) {
85
+ console . warn (
86
+ `Invalid deployment preset "${ preset } ". Available presets are: ${ vinxiDeploymentPresets
87
+ . map ( ( p ) => `"${ p } "` )
88
+ . join ( ', ' ) } .`,
89
+ )
90
+ }
91
+
92
+ if ( ! testedDeploymentPresets . includes ( preset as any ) ) {
93
+ console . warn (
94
+ `The deployment preset '${ preset } ' is not fully supported yet and may not work as expected.` ,
95
+ )
100
96
}
101
97
102
98
return preset
You can’t perform that action at this time.
0 commit comments