@sveltejs/adapter-netlify 1.0.0-next.45 → 1.0.0-next.46

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/README.md CHANGED
@@ -52,7 +52,7 @@ During compilation, redirect rules are automatically appended to your `_redirect
52
52
  ### Using Netlify Forms
53
53
 
54
54
  1. Create your Netlify HTML form as described [here](https://docs.netlify.com/forms/setup/#html-forms), e.g. as `/routes/contact.svelte`. (Don't forget to add the hidden `form-name` input element!)
55
- 2. Netlify's build bot parses your HTML files at deploy time, which means your form must be [prerendered](https://kit.svelte.dev/docs#page-options-prerender) as HTML. You can either add `export const prerender = true` to your `contact.svelte` to prerender just that page or set the `kit.prerender.force: true` option to prerender all pages.
55
+ 2. Netlify's build bot parses your HTML files at deploy time, which means your form must be [prerendered](https://kit.svelte.dev/docs/page-options#prerender) as HTML. You can either add `export const prerender = true` to your `contact.svelte` to prerender just that page or set the `kit.prerender.force: true` option to prerender all pages.
56
56
  3. If your Netlify form has a [custom success message](https://docs.netlify.com/forms/setup/#success-messages) like `<form netlify ... action="/success">` then ensure the corresponding `/routes/success.svelte` exists and is prerendered.
57
57
 
58
58
  ### Using Netlify Functions
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('./shims.js');
6
- var _0APP = require('0APP');
6
+ var _0SERVER = require('0SERVER');
7
7
  require('node:http');
8
8
  require('node:https');
9
9
  require('node:zlib');
@@ -17,10 +17,10 @@ require('net');
17
17
  * @returns {import('@netlify/functions').Handler}
18
18
  */
19
19
  function init(manifest) {
20
- const app = new _0APP.App(manifest);
20
+ const server = new _0SERVER.Server(manifest);
21
21
 
22
22
  return async (event) => {
23
- const rendered = await app.render(to_request(event));
23
+ const rendered = await server.respond(to_request(event));
24
24
 
25
25
  const partial_response = {
26
26
  statusCode: rendered.status,
@@ -1,5 +1,5 @@
1
1
  import './shims.js';
2
- import { App } from '0APP';
2
+ import { Server } from '0SERVER';
3
3
  import 'node:http';
4
4
  import 'node:https';
5
5
  import 'node:zlib';
@@ -13,10 +13,10 @@ import 'net';
13
13
  * @returns {import('@netlify/functions').Handler}
14
14
  */
15
15
  function init(manifest) {
16
- const app = new App(manifest);
16
+ const server = new Server(manifest);
17
17
 
18
18
  return async (event) => {
19
- const rendered = await app.render(to_request(event));
19
+ const rendered = await server.respond(to_request(event));
20
20
 
21
21
  const partial_response = {
22
22
  statusCode: rendered.status,
package/index.js CHANGED
@@ -51,7 +51,7 @@ export default function ({ split = false } = {}) {
51
51
  const redirects = [];
52
52
 
53
53
  const replace = {
54
- '0APP': './server/app.js' // digit prefix prevents CJS build from using this as a variable name, which would also get replaced
54
+ '0SERVER': './server/index.js' // digit prefix prevents CJS build from using this as a variable name, which would also get replaced
55
55
  };
56
56
 
57
57
  if (esm) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/adapter-netlify",
3
- "version": "1.0.0-next.45",
3
+ "version": "1.0.0-next.46",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -27,11 +27,11 @@
27
27
  "tiny-glob": "^0.2.9"
28
28
  },
29
29
  "devDependencies": {
30
- "@netlify/functions": "^0.11.0",
30
+ "@netlify/functions": "^1.0.0",
31
31
  "@rollup/plugin-commonjs": "^21.0.0",
32
32
  "@rollup/plugin-json": "^4.1.0",
33
33
  "@rollup/plugin-node-resolve": "^13.0.5",
34
- "@sveltejs/kit": "1.0.0-next.262",
34
+ "@sveltejs/kit": "1.0.0-next.280",
35
35
  "rimraf": "^3.0.2",
36
36
  "rollup": "^2.58.0"
37
37
  },