mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-11-04 10:40:20 +00:00
Preserve linked and unknown encrypted fields in Web edits, reject stale and concurrent saves, and support official bulk delete and restore methods while retaining legacy routes. Add 20 offline compatibility regressions and update undici to 8.10.2. Verified 51 tests, TypeScript checks, locale validation, Web build and Worker deployment dry run. The unpatched braces advisory remains visible.
16 lines
616 B
JavaScript
16 lines
616 B
JavaScript
import { registerHooks } from 'node:module';
|
|
|
|
// Vite injects this build constant into modules shared with Web draft helpers.
|
|
globalThis.__NODEWARDEN_DEMO__ = false;
|
|
|
|
// Tests exercise routes and storage without running Cloudflare Durable Objects.
|
|
registerHooks({
|
|
resolve(specifier, context, nextResolve) {
|
|
if (specifier === 'cloudflare:workers') {
|
|
const source = 'export class DurableObject {} export function waitUntil(p) { p.catch(() => {}); }';
|
|
return { url: 'data:text/javascript,' + encodeURIComponent(source), shortCircuit: true };
|
|
}
|
|
return nextResolve(specifier, context);
|
|
},
|
|
});
|