You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

cloudflare-htmx

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudflare-htmx - npm Package Compare versions

Comparing version

to
1.0.2

templates/basic/functions/_middleware.ts

7

index.ts

@@ -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));

7

package.json
{
"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"
}
}