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.
21 lines
582 B
JavaScript
21 lines
582 B
JavaScript
function getProxyCode(options, isSSR) {
|
|
const stringifiedFSPath = JSON.stringify(options.fsPath);
|
|
return `
|
|
new Proxy(${JSON.stringify(options)}, {
|
|
get(target, name, receiver) {
|
|
if (name === 'clone') {
|
|
return structuredClone(target);
|
|
}
|
|
if (name === 'fsPath') {
|
|
return ${stringifiedFSPath};
|
|
}
|
|
${!isSSR ? `if (target[name] !== undefined && globalThis.astroAsset) globalThis.astroAsset?.referencedImages.add(${stringifiedFSPath});` : ""}
|
|
return target[name];
|
|
}
|
|
})
|
|
`;
|
|
}
|
|
export {
|
|
getProxyCode
|
|
};
|