@sveltejs/adapter-netlify 1.0.0-next.72 → 1.0.0-next.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/files/edge.js CHANGED
@@ -4,18 +4,24 @@ import { manifest, prerendered } from 'MANIFEST';
4
4
  const server = new Server(manifest);
5
5
  const prefix = `/${manifest.appDir}/`;
6
6
 
7
+ const initialized = server.init({
8
+ // @ts-ignore
9
+ env: Deno.env.toObject()
10
+ });
11
+
7
12
  /**
8
13
  * @param { Request } request
9
14
  * @param { any } context
10
15
  * @returns { Promise<Response> }
11
16
  */
12
- export default function handler(request, context) {
17
+ export default async function handler(request, context) {
13
18
  if (is_static_file(request)) {
14
19
  // Static files can skip the handler
15
20
  // TODO can we serve _app/immutable files with an immutable cache header?
16
21
  return;
17
22
  }
18
23
 
24
+ await initialized;
19
25
  return server.respond(request, {
20
26
  platform: { context },
21
27
  getClientAddress() {
package/index.js CHANGED
@@ -211,7 +211,7 @@ async function generate_lambda_functions({ builder, publish, split, esm }) {
211
211
  writeFileSync(`.netlify/functions-internal/${name}.js`, fn);
212
212
 
213
213
  redirects.push(`${pattern} /.netlify/functions/${name} 200`);
214
- redirects.push(`${pattern}/__data.json /.netlify/functions/${name} 200`);
214
+ redirects.push(`${pattern}/__data.js /.netlify/functions/${name} 200`);
215
215
  }
216
216
  };
217
217
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/adapter-netlify",
3
- "version": "1.0.0-next.72",
3
+ "version": "1.0.0-next.75",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -33,7 +33,7 @@
33
33
  "@rollup/plugin-commonjs": "^22.0.1",
34
34
  "@rollup/plugin-json": "^4.1.0",
35
35
  "@rollup/plugin-node-resolve": "^13.3.0",
36
- "@sveltejs/kit": "1.0.0-next.433",
36
+ "@sveltejs/kit": "1.0.0-next.447",
37
37
  "@types/node": "^16.11.36",
38
38
  "@types/set-cookie-parser": "^2.4.2",
39
39
  "rimraf": "^3.0.2",