New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@atelier-wb/vite-plugin-svelte

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atelier-wb/vite-plugin-svelte - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "@atelier-wb/vite-plugin-svelte",
"version": "0.2.0",
"version": "0.2.1",
"description": "Vite plugin to process your svelte components",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -29,3 +29,3 @@ const { resolve } = require('path')

path: './atelier',
url: '/atelier',
url: '/',
toolRegexp: '\\.tools\\.svelte+$',

@@ -35,3 +35,3 @@ workframeHtml: resolve(__dirname, 'workframe.html'),

bundled: true,
publicDirs: []
publicDir: []
}

@@ -82,3 +82,6 @@

}
const hasTrailingUrl = options.url.endsWith('/')
const hasTrailingSlash = options.url.endsWith('/')
const workframeUrl = `${options.url}${hasTrailingSlash ? '' : '/'}${
options.workframeId
}`

@@ -97,8 +100,10 @@ const toolRegexp = new RegExp(options.toolRegexp, 'i')

}
const serves = [
const statics = [
uiPath,
...(Array.isArray(options.publicDir)
? options.publicDir
: [options.publicDir])
].map(dir => sirv(dir, { etag: true }))
: [options.publicDir]
).filter(Boolean)
]
const serves = statics.map(dir => sirv(dir, { etag: true }))

@@ -114,3 +119,3 @@ // configure a middleware for serving Atelier

createReadStream(options.workframeHtml).pipe(res)
} else if (!hasTrailingUrl && req.originalUrl === options.url) {
} else if (!hasTrailingSlash && req.originalUrl === options.url) {
// append trailing slash to allows resolving <script /> with relative sources

@@ -136,3 +141,3 @@ res.statusCode = 301

if (toolRegexp.test(normalizePath(path)) || stats?.isDirectory()) {
server.watcher.emit('change', `${options.url}/${options.workframeId}`)
server.watcher.emit('change', workframeUrl)
}

@@ -148,3 +153,3 @@ }

resolveId(id) {
if (id === options.workframeId) {
if (id === workframeUrl) {
return id

@@ -155,6 +160,3 @@ }

async load(id) {
if (
id ===
`${options.url}${hasTrailingUrl ? '' : '/'}${options.workframeId}`
) {
if (id === workframeUrl) {
return buildWorkframe(

@@ -161,0 +163,0 @@ await findTools(options.path, toolRegexp),

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