✅ Complete Astro migration - PDPA compliant website
- Migrated all pages from Next.js to Astro - Added PDPA-compliant Privacy Policy (Thai) - Added PDPA-compliant Terms & Conditions (Thai) - Added Cookie Policy with disclosure (Thai) - Implemented cookie consent banner (client-side) - Integrated Umami Analytics placeholder - Blog system with 3 posts - Optimized Docker configuration for production - Static site build (184KB, 11 pages) - Ready for Easypanel deployment Backup: /Users/kunthawatgreethong/Gitea/dealplustech-backup-nextjs-20260309.tar.gz
This commit is contained in:
46
dealplustech-astro/node_modules/@libsql/hrana-client/lib-esm/sql.js
generated
vendored
Normal file
46
dealplustech-astro/node_modules/@libsql/hrana-client/lib-esm/sql.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import { ClientError, ClosedError, MisuseError } from "./errors.js";
|
||||
/** Text of an SQL statement cached on the server. */
|
||||
export class Sql {
|
||||
#owner;
|
||||
#sqlId;
|
||||
#closed;
|
||||
/** @private */
|
||||
constructor(owner, sqlId) {
|
||||
this.#owner = owner;
|
||||
this.#sqlId = sqlId;
|
||||
this.#closed = undefined;
|
||||
}
|
||||
/** @private */
|
||||
_getSqlId(owner) {
|
||||
if (this.#owner !== owner) {
|
||||
throw new MisuseError("Attempted to use SQL text opened with other object");
|
||||
}
|
||||
else if (this.#closed !== undefined) {
|
||||
throw new ClosedError("SQL text is closed", this.#closed);
|
||||
}
|
||||
return this.#sqlId;
|
||||
}
|
||||
/** Remove the SQL text from the server, releasing resouces. */
|
||||
close() {
|
||||
this._setClosed(new ClientError("SQL text was manually closed"));
|
||||
}
|
||||
/** @private */
|
||||
_setClosed(error) {
|
||||
if (this.#closed === undefined) {
|
||||
this.#closed = error;
|
||||
this.#owner._closeSql(this.#sqlId);
|
||||
}
|
||||
}
|
||||
/** True if the SQL text is closed (removed from the server). */
|
||||
get closed() {
|
||||
return this.#closed !== undefined;
|
||||
}
|
||||
}
|
||||
export function sqlToProto(owner, sql) {
|
||||
if (sql instanceof Sql) {
|
||||
return { sqlId: sql._getSqlId(owner) };
|
||||
}
|
||||
else {
|
||||
return { sql: "" + sql };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user