do not require opts
This commit is contained in:
parent
33017d7ea6
commit
8d00309193
1 changed files with 4 additions and 3 deletions
|
@ -8,9 +8,10 @@ import type { CreateBasicEnvironmentArgs, Environment } from '../core/render/env
|
||||||
export class AstroContainer {
|
export class AstroContainer {
|
||||||
env: Environment;
|
env: Environment;
|
||||||
|
|
||||||
constructor(opts: Pick<CreateBasicEnvironmentArgs, 'mode'|'renderers'|'site'>) {
|
constructor(opts: Pick<CreateBasicEnvironmentArgs, 'renderers'|'site'>) {
|
||||||
this.env = createBasicEnvironment({
|
this.env = createBasicEnvironment({
|
||||||
...opts,
|
...opts,
|
||||||
|
mode: 'production',
|
||||||
logging: { dest: nodeLogDestination, level: 'error' },
|
logging: { dest: nodeLogDestination, level: 'error' },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -23,11 +24,11 @@ export class AstroContainer {
|
||||||
params = {},
|
params = {},
|
||||||
slots = {},
|
slots = {},
|
||||||
}: {
|
}: {
|
||||||
props: Record<string | number | symbol, any>,
|
props?: Record<string | number | symbol, any>,
|
||||||
slots?: Record<string, any>
|
slots?: Record<string, any>
|
||||||
params?: Record<string, any>,
|
params?: Record<string, any>,
|
||||||
request?: Request,
|
request?: Request,
|
||||||
}
|
} = {}
|
||||||
) {
|
) {
|
||||||
const { env } = this;
|
const { env } = this;
|
||||||
const ctx = createRenderContext({ request })
|
const ctx = createRenderContext({ request })
|
||||||
|
|
Loading…
Reference in a new issue