feat: Upgrade to Astro with full PDPA compliance
PDPA Features: ✅ Cookie consent banner ✅ Consent logging API ✅ Admin dashboard ✅ Privacy Policy ✅ Terms & Conditions Technical: ✅ Astro 5.x + Tailwind v4 ✅ Docker on port 80 ✅ SQLite database ✅ 15 pages built Ready for Easypanel deployment.
This commit is contained in:
60
node_modules/@libsql/core/lib-cjs/util.js
generated
vendored
Normal file
60
node_modules/@libsql/core/lib-cjs/util.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ResultSetImpl = exports.transactionModeToBegin = exports.supportedUrlLink = void 0;
|
||||
const js_base64_1 = require("js-base64");
|
||||
exports.supportedUrlLink = "https://github.com/libsql/libsql-client-ts#supported-urls";
|
||||
function transactionModeToBegin(mode) {
|
||||
if (mode === "write") {
|
||||
return "BEGIN IMMEDIATE";
|
||||
}
|
||||
else if (mode === "read") {
|
||||
return "BEGIN TRANSACTION READONLY";
|
||||
}
|
||||
else if (mode === "deferred") {
|
||||
return "BEGIN DEFERRED";
|
||||
}
|
||||
else {
|
||||
throw RangeError('Unknown transaction mode, supported values are "write", "read" and "deferred"');
|
||||
}
|
||||
}
|
||||
exports.transactionModeToBegin = transactionModeToBegin;
|
||||
class ResultSetImpl {
|
||||
columns;
|
||||
columnTypes;
|
||||
rows;
|
||||
rowsAffected;
|
||||
lastInsertRowid;
|
||||
constructor(columns, columnTypes, rows, rowsAffected, lastInsertRowid) {
|
||||
this.columns = columns;
|
||||
this.columnTypes = columnTypes;
|
||||
this.rows = rows;
|
||||
this.rowsAffected = rowsAffected;
|
||||
this.lastInsertRowid = lastInsertRowid;
|
||||
}
|
||||
toJSON() {
|
||||
return {
|
||||
columns: this.columns,
|
||||
columnTypes: this.columnTypes,
|
||||
rows: this.rows.map(rowToJson),
|
||||
rowsAffected: this.rowsAffected,
|
||||
lastInsertRowid: this.lastInsertRowid !== undefined
|
||||
? "" + this.lastInsertRowid
|
||||
: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
exports.ResultSetImpl = ResultSetImpl;
|
||||
function rowToJson(row) {
|
||||
return Array.prototype.map.call(row, valueToJson);
|
||||
}
|
||||
function valueToJson(value) {
|
||||
if (typeof value === "bigint") {
|
||||
return "" + value;
|
||||
}
|
||||
else if (value instanceof ArrayBuffer) {
|
||||
return js_base64_1.Base64.fromUint8Array(new Uint8Array(value));
|
||||
}
|
||||
else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user