-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into client-address
- Loading branch information
Showing
29 changed files
with
199 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Allow adapter.adapt to be synchronous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Make `manifest.mimeTypes` part of the public API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Allow routes with the same name as fallback components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
load hooks after server initialisation, to ensure `prerendering` is correct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Return 404 when fetching missing data during prerender |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/adapter-auto': patch | ||
--- | ||
|
||
Select adapter immediately |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'create-svelte': patch | ||
--- | ||
|
||
[fix] check for app.d.ts rather than global.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,52 @@ | ||
import { adapters } from './adapters.js'; | ||
|
||
/** @type {import('.')} **/ | ||
export default function () { | ||
return { | ||
name: '@sveltejs/adapter-auto', | ||
/** @type {import('./index')} */ | ||
let fn; | ||
|
||
for (const candidate of adapters) { | ||
if (candidate.test()) { | ||
/** @type {{ default: () => import('@sveltejs/kit').Adapter }} */ | ||
let module; | ||
|
||
async adapt(builder) { | ||
for (const candidate of adapters) { | ||
if (candidate.test()) { | ||
builder.log.info(`Detected environment: ${candidate.name}. Using ${candidate.module}`); | ||
|
||
let module; | ||
|
||
try { | ||
module = await import(candidate.module); | ||
} catch (error) { | ||
if ( | ||
error.code === 'ERR_MODULE_NOT_FOUND' && | ||
error.message.startsWith(`Cannot find package '${candidate.module}'`) | ||
) { | ||
throw new Error( | ||
`It looks like ${candidate.module} is not installed. Please install it and try building your project again.` | ||
); | ||
} | ||
|
||
throw error; | ||
try { | ||
module = await import(candidate.module); | ||
|
||
fn = () => { | ||
const adapter = module.default(); | ||
return { | ||
...adapter, | ||
adapt: (builder) => { | ||
builder.log.info(`Detected environment: ${candidate.name}. Using ${candidate.module}`); | ||
return adapter.adapt(builder); | ||
} | ||
}; | ||
}; | ||
|
||
const adapter = module.default(); | ||
return adapter.adapt(builder); | ||
} | ||
break; | ||
} catch (error) { | ||
if ( | ||
error.code === 'ERR_MODULE_NOT_FOUND' && | ||
error.message.startsWith(`Cannot find package '${candidate.module}'`) | ||
) { | ||
throw new Error( | ||
`It looks like ${candidate.module} is not installed. Please install it and try building your project again.` | ||
); | ||
} | ||
|
||
throw error; | ||
} | ||
} | ||
} | ||
|
||
if (!fn) { | ||
fn = () => ({ | ||
name: '@sveltejs/adapter-auto', | ||
adapt: (builder) => { | ||
builder.log.warn( | ||
'Could not detect a supported production environment. See https://kit.svelte.dev/docs/adapters to learn how to configure your app to run on the platform of your choosing' | ||
); | ||
} | ||
}; | ||
}); | ||
} | ||
|
||
export default fn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.