cloudflare-htmx
Advanced tools
Comparing version
@@ -15,3 +15,8 @@ const HEADERS = { headers: { 'content-type': 'text/html;charset=UTF-8' } }; | ||
const url = new URL(request.url); | ||
if (url.pathname.match(/\.[^/]+$/)) { | ||
const method = request.method; | ||
if ( | ||
url.pathname.match(/\.[^/]+$/) || | ||
method !== 'GET' || | ||
url.pathname.match(/_[^/]+$/) | ||
) { | ||
return next(); | ||
@@ -18,0 +23,0 @@ } |
#!/usr/bin/env node | ||
console.log('Installing HTMX...'); | ||
const fs = require('fs-extra'); | ||
const path = require('path'); | ||
console.log('Copying template files...'); | ||
const sourceDir = path.join(__dirname, 'templates', 'basic'); | ||
fs.copy(sourceDir, process.cwd()) | ||
.then(() => console.log('Template files copied successfully!')) | ||
.catch((err) => console.error(err)); |
{ | ||
"name": "cloudflare-htmx", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "HTMX library for Cloudflare Pages", | ||
@@ -31,3 +31,6 @@ "main": "index.ts", | ||
}, | ||
"homepage": "https://github.com/stukennedy/cloudflare-htmx#readme" | ||
"homepage": "https://github.com/stukennedy/cloudflare-htmx#readme", | ||
"dependencies": { | ||
"fs-extra": "^11.1.1" | ||
} | ||
} |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1124217
28.15%45
18.42%22984
59.79%1
Infinity%1
Infinity%4
100%+ Added
+ Added
+ Added
+ Added
+ Added