feat: Add complete PDPA compliance pages

- Admin dashboard (/admin/consent-logs) with password auth
- Consent API (/api/consent) with SQLite + IP hashing
- Privacy Policy (Thai) - PDPA Section 36 compliant
- Terms & Conditions (Thai) - 9 standard clauses
- .env.example template with Umami placeholder

All pages preserve current design system.
This commit is contained in:
Kunthawat
2026-03-10 21:28:23 +07:00
parent e98b9f2bff
commit b2e427791b
3282 changed files with 302503 additions and 435 deletions

View File

@@ -0,0 +1,16 @@
# `@libsql/isomorphic-ws`
This package provides `WebSocket` on Node (using `ws`) and in Deno and Cloudflare Workers (using the native `WebSocket`). Supports both CommonJS and ES modules.
```javascript
import { WebSocket } from "@libsql/isomorphic-ws";
const ws = new WebSocket("ws://localhost:8080");
ws.onopen = (event) => {
ws.send("Hello");
};
ws.onmessage = (event) => {
console.log(event.data);
ws.close();
};
```

View File

@@ -0,0 +1,2 @@
import WebSocket from "ws";
export { WebSocket };

View File

@@ -0,0 +1,3 @@
"use strict";
const { WebSocket } = require("ws");
module.exports = { WebSocket };

View File

@@ -0,0 +1,2 @@
import { WebSocket } from "ws";
export { WebSocket };

View File

@@ -0,0 +1,43 @@
{
"name": "@libsql/isomorphic-ws",
"version": "0.1.5",
"keywords": ["ws", "websocket", "isomorphic", "node", "deno", "workers"],
"description": "Isomorphic WebSockets in Node, Bun, Deno and Cloudflare Workers",
"repository": {
"type": "git",
"url": "https://github.com/libsql/isomorphic-ts.git",
"directory": "isomorphic-ws"
},
"homepage": "https://github.com/libsql/isomorphic-ts/tree/main/isomorphic-ws",
"authors": [
"Jan Špaček <honza@chiselstrike.com>"
],
"license": "MIT",
"main": "node.cjs",
"types": "index.d.ts",
"exports": {
".": {
"import": {
"bun": "./web.mjs",
"deno": "./web.mjs",
"workerd": "./web.mjs",
"node": "./node.mjs",
"default": "./web.mjs"
},
"require": {
"bun": "./web.cjs",
"deno": "./web.cjs",
"workerd": "./web.cjs",
"node": "./node.cjs",
"default": "./web.cjs"
}
}
},
"files": ["*.mjs", "*.cjs", "*.js", "*.d.ts"],
"dependencies": {
"ws": "^8.13.0",
"@types/ws": "^8.5.4"
}
}

View File

@@ -0,0 +1,12 @@
"use strict";
var _WebSocket;
if (typeof WebSocket !== "undefined") {
_WebSocket = WebSocket;
} else if (typeof global !== "undefined") {
_WebSocket = global.WebSocket;
} else if (typeof window !== "undefined") {
_WebSocket = window.WebSocket;
} else if (typeof self !== "undefined") {
_WebSocket = self.WebSocket;
}
module.exports = { WebSocket: _WebSocket };

View File

@@ -0,0 +1,11 @@
let _WebSocket;
if (typeof WebSocket !== "undefined") {
_WebSocket = WebSocket;
} else if (typeof global !== "undefined") {
_WebSocket = global.WebSocket;
} else if (typeof window !== "undefined") {
_WebSocket = window.WebSocket;
} else if (typeof self !== "undefined") {
_WebSocket = self.WebSocket;
}
export { _WebSocket as WebSocket };