Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/react-start-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ export async function defineConfig(
const { preset: configDeploymentPreset, ...serverOptions } =
serverSchema.parse(opts.server || {})

const deploymentPreset = checkDeploymentPresetInput(
configDeploymentPreset || 'node-server',
)
const deploymentPreset = checkDeploymentPresetInput(configDeploymentPreset)
const tsr = setTsrDefaults(opts.tsr)
const tsrConfig = getConfig(tsr)

Expand Down
30 changes: 17 additions & 13 deletions packages/react-start-config/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,23 @@ const testedDeploymentPresets: Array<DeploymentPreset> = [
'node-server',
]

export function checkDeploymentPresetInput(preset: string): DeploymentPreset {
if (!vinxiDeploymentPresets.includes(preset as any)) {
console.warn(
`Invalid deployment preset "${preset}". Available presets are: ${vinxiDeploymentPresets
.map((p) => `"${p}"`)
.join(', ')}.`,
)
}

if (!testedDeploymentPresets.includes(preset as any)) {
console.warn(
`The deployment preset '${preset}' is not fully supported yet and may not work as expected.`,
)
export function checkDeploymentPresetInput(
preset?: string,
): DeploymentPreset | undefined {
if (preset) {
if (!vinxiDeploymentPresets.includes(preset as any)) {
console.warn(
`Invalid deployment preset "${preset}". Available presets are: ${vinxiDeploymentPresets
.map((p) => `"${p}"`)
.join(', ')}.`,
)
}

if (!testedDeploymentPresets.includes(preset as any)) {
console.warn(
`The deployment preset '${preset}' is not fully supported yet and may not work as expected.`,
)
}
}

return preset
Expand Down
4 changes: 1 addition & 3 deletions packages/solid-start-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ export async function defineConfig(
const { preset: configDeploymentPreset, ...serverOptions } =
serverSchema.parse(opts.server || {})

const deploymentPreset = checkDeploymentPresetInput(
configDeploymentPreset || 'node-server',
)
const deploymentPreset = checkDeploymentPresetInput(configDeploymentPreset)
const tsr = setTsrDefaults(opts.tsr)
const tsrConfig = getConfig(tsr)

Expand Down
30 changes: 17 additions & 13 deletions packages/solid-start-config/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,23 @@ const testedDeploymentPresets: Array<DeploymentPreset> = [
'node-server',
]

export function checkDeploymentPresetInput(preset: string): DeploymentPreset {
if (!vinxiDeploymentPresets.includes(preset as any)) {
console.warn(
`Invalid deployment preset "${preset}". Available presets are: ${vinxiDeploymentPresets
.map((p) => `"${p}"`)
.join(', ')}.`,
)
}

if (!testedDeploymentPresets.includes(preset as any)) {
console.warn(
`The deployment preset '${preset}' is not fully supported yet and may not work as expected.`,
)
export function checkDeploymentPresetInput(
preset?: string,
): DeploymentPreset | undefined {
if (preset) {
if (!vinxiDeploymentPresets.includes(preset as any)) {
console.warn(
`Invalid deployment preset "${preset}". Available presets are: ${vinxiDeploymentPresets
.map((p) => `"${p}"`)
.join(', ')}.`,
)
}

if (!testedDeploymentPresets.includes(preset as any)) {
console.warn(
`The deployment preset '${preset}' is not fully supported yet and may not work as expected.`,
)
}
}

return preset
Expand Down
4 changes: 1 addition & 3 deletions packages/start-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ export async function defineConfig(
const { preset: configDeploymentPreset, ...serverOptions } =
serverSchema.parse(opts.server || {})

const deploymentPreset = checkDeploymentPresetInput(
configDeploymentPreset || 'node-server',
)
const deploymentPreset = checkDeploymentPresetInput(configDeploymentPreset)
const tsr = setTsrDefaults(opts.tsr)
const tsrConfig = getConfig(tsr)

Expand Down
30 changes: 17 additions & 13 deletions packages/start-config/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,23 @@ const testedDeploymentPresets: Array<DeploymentPreset> = [
'node-server',
]

export function checkDeploymentPresetInput(preset: string): DeploymentPreset {
if (!vinxiDeploymentPresets.includes(preset as any)) {
console.warn(
`Invalid deployment preset "${preset}". Available presets are: ${vinxiDeploymentPresets
.map((p) => `"${p}"`)
.join(', ')}.`,
)
}

if (!testedDeploymentPresets.includes(preset as any)) {
console.warn(
`The deployment preset '${preset}' is not fully supported yet and may not work as expected.`,
)
export function checkDeploymentPresetInput(
preset?: string,
): DeploymentPreset | undefined {
if (preset) {
if (!vinxiDeploymentPresets.includes(preset as any)) {
console.warn(
`Invalid deployment preset "${preset}". Available presets are: ${vinxiDeploymentPresets
.map((p) => `"${p}"`)
.join(', ')}.`,
)
}

if (!testedDeploymentPresets.includes(preset as any)) {
console.warn(
`The deployment preset '${preset}' is not fully supported yet and may not work as expected.`,
)
}
}

return preset
Expand Down
Loading