Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sveltejs/adapter-cloudflare-workers

Package Overview
Dependencies
Maintainers
4
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/adapter-cloudflare-workers - npm Package Compare versions

Comparing version 1.0.0-next.33 to 1.0.0-next.34

11

files/entry.d.ts

@@ -1,3 +0,3 @@

declare module 'APP' {
export { App } from '@sveltejs/kit';
declare module 'SERVER' {
export { Server } from '@sveltejs/kit';
}

@@ -11,1 +11,8 @@

}
declare abstract class FetchEvent extends Event {
readonly request: Request;
respondWith(promise: Response | Promise<Response>): void;
passThroughOnException(): void;
waitUntil(promise: Promise<any>): void;
}

6

files/entry.js

@@ -1,6 +0,6 @@

import { App } from 'APP';
import { Server } from 'SERVER';
import { manifest, prerendered } from 'MANIFEST';
import { getAssetFromKV } from '@cloudflare/kv-asset-handler';
const app = new App(manifest);
const server = new Server(manifest);

@@ -53,3 +53,3 @@ const prefix = `/${manifest.appDir}/`;

try {
return await app.render(request);
return await server.respond(request);
} catch (e) {

@@ -56,0 +56,0 @@ return new Response('Error rendering route:' + (e.message || e.toString()), { status: 500 });

@@ -16,3 +16,6 @@ import { existsSync, readFileSync, writeFileSync } from 'fs';

const bucket = site.bucket;
// @ts-ignore
const { bucket } = site;
// @ts-ignore
const entrypoint = site['entry-point'] || 'workers-site';

@@ -27,5 +30,3 @@

builder.log.info('Prerendering static pages...');
const { paths } = await builder.prerender({
dest: bucket
});
const prerendered = await builder.prerender({ dest: bucket });

@@ -44,3 +45,3 @@ builder.log.info('Installing worker dependencies...');

replace: {
APP: `${relativePath}/app.js`,
SERVER: `${relativePath}/index.js`,
MANIFEST: './manifest.js'

@@ -54,3 +55,3 @@ }

relativePath
})};\n\nexport const prerendered = new Set(${JSON.stringify(paths)});\n`
})};\n\nexport const prerendered = new Set(${JSON.stringify(prerendered.paths)});\n`
);

@@ -87,2 +88,3 @@

// @ts-ignore
if (!wrangler_config.site || !wrangler_config.site.bucket) {

@@ -89,0 +91,0 @@ throw new Error(

{
"name": "@sveltejs/adapter-cloudflare-workers",
"version": "1.0.0-next.33",
"version": "1.0.0-next.34",
"repository": {

@@ -30,4 +30,3 @@ "type": "git",

"@cloudflare/kv-asset-handler": "^0.2.0",
"@cloudflare/workers-types": "^3.3.0",
"@sveltejs/kit": "1.0.0-next.266"
"@sveltejs/kit": "1.0.0-next.280"
},

@@ -34,0 +33,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc