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

@sveltejs/adapter-node

Package Overview
Dependencies
Maintainers
3
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/adapter-node - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

8

CHANGELOG.md
# @sveltejs/adapter-node
## 0.0.15
### Patch Changes
- b475ed4: Overhaul adapter API - fixes #166
- Updated dependencies [b475ed4]
- @sveltejs/app-utils@0.0.18
## 0.0.14

@@ -4,0 +12,0 @@

45

index.js

@@ -0,42 +1,17 @@

'use strict';
const fs = require('fs');
const { prerender } = require('@sveltejs/app-utils/renderer');
const { copy } = require('@sveltejs/app-utils/files');
module.exports = async function adapter({
dir,
manifest,
log
}) {
module.exports = async function adapter(builder) {
const out = 'build'; // TODO implement adapter options
copy(`${dir}/client`, `${out}/assets/_app`, file => file[0] !== '.');
copy(`${dir}/server`, out);
copy(`${__dirname}/server.js`, `${out}/index.js`);
copy(`${dir}/client.json`, `${out}/client.json`);
copy('src/app.html', `${out}/app.html`);
builder.copy_server_files(out);
builder.copy_client_files(`${out}/assets/_app`);
log.minor('Prerendering static pages...');
fs.copyFileSync(`${__dirname}/files/server.js`, `${out}/index.js`);
await prerender({
dir,
out: `${out}/prerendered`,
assets: `${out}/assets`,
manifest,
log
builder.log.info('Prerendering static pages...');
await builder.prerender({
dest: `${out}/prerendered`
});
// generate manifest
const written_manifest = `module.exports = {
layout: ${JSON.stringify(manifest.layout)},
error: ${JSON.stringify(manifest.error)},
components: ${JSON.stringify(manifest.components)},
pages: [
${manifest.pages.map(page => `{ pattern: ${page.pattern}, parts: ${JSON.stringify(page.parts)} }`).join(',\n\t\t\t')}
],
endpoints: [
${manifest.endpoints.map(route => `{ name: '${route.name}', pattern: ${route.pattern}, file: '${route.file}', params: ${JSON.stringify(route.params)} }`).join(',\n\t\t\t')}
]
};`.replace(/^\t/gm, '');
fs.writeFileSync(`${out}/manifest.js`, written_manifest);
};
};
{
"name": "@sveltejs/adapter-node",
"version": "0.0.14",
"version": "0.0.15",
"main": "index.js",

@@ -11,8 +11,9 @@ "files": [

"build": "rollup -c",
"lint": "eslint --ignore-pattern node_modules/ '**/*.{ts,js,svelte}'",
"prepare": "npm run build",
"lint": "eslint --ignore-pattern node_modules/ \"**/*.{ts,js,svelte}\" && npm run check-format",
"format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore",
"check-format": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
"prepublishOnly": "npm run build"
},
"dependencies": {
"@sveltejs/app-utils": "0.0.17"
"@sveltejs/app-utils": "0.0.18"
},

@@ -19,0 +20,0 @@ "devDependencies": {

@@ -5,2 +5,2 @@ # adapter-node

This is very experimental; the adapter API isn't at all fleshed out, and things will definitely change.
This is very experimental; the adapter API isn't at all fleshed out, and things will definitely change.
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