@naru-pub/dev 0.0.0-stage → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export * from "./index.js";
@@ -0,0 +1,7 @@
1
+ import {
2
+ startNaru
3
+ } from "./chunk-K7ZVYKB2.mjs";
4
+ import "./chunk-CQFKRWOD.mjs";
5
+ export {
6
+ startNaru
7
+ };
@@ -0,0 +1,52 @@
1
+ # Written by naru-dev/scripts/build-worker.mjs; naru-dev serves it
2
+ # with --directory-path site-objects=<state>/worker/v3/do and
3
+ # sdk-files=<the SDK's files>.
4
+ using Workerd = import "/workerd/workerd.capnp";
5
+
6
+ const config :Workerd.Config = (
7
+ services = [
8
+ (name = "main", worker = .worker),
9
+ # The SDK's committed files (control-plane/public/sdk), at /sdk/.
10
+ (name = "sdk-files", disk = ()),
11
+ # Each site's SQLite database. Override with --directory-path.
12
+ (name = "site-objects", disk = (writable = true)),
13
+ # R2 is public; the control plane, for requests with a token, is local.
14
+ (name = "network", network = (allow = ["public", "local"], tlsOptions = (trustBrowserCas = true))),
15
+ ],
16
+ sockets = [
17
+ (name = "http", address = "127.0.0.1:8787", http = (), service = "main"),
18
+ ],
19
+ # The most V8 keeps for JavaScript objects (MB), in the one isolate every
20
+ # site's object and the Worker share: past it V8 aborts workerd, and
21
+ # launchd starts it again. ArrayBuffers and SQLite are not counted; the
22
+ # mini's watchdog (~/Git/infra, naru-sdk-watchdog) kills workerd past 4 GB
23
+ # in all. See README.md, "Memory".
24
+ v8Flags = ["--max-old-space-size=2048"],
25
+ );
26
+
27
+ const worker :Workerd.Worker = (
28
+ compatibilityDate = "2026-10-01",
29
+ compatibilityFlags = ["nodejs_compat"],
30
+ modules = [
31
+ (name = "seoul.js", esModule = embed "seoul.js"),
32
+ (name = "05f16b7a30ddbe6e522bc3300013f93b30366682-metered.wasm", wasm = embed "05f16b7a30ddbe6e522bc3300013f93b30366682-metered.wasm"),
33
+ ],
34
+ bindings = [
35
+ (name = "SITES", durableObjectNamespace = "SiteData"),
36
+ (name = "SDK_FILES", service = "sdk-files"),
37
+ (name = "PLATFORM_DOMAIN", text = "naru.pub"),
38
+ (name = "SITE_MONTHLY_REQUESTS", text = "5000000"),
39
+ # No edge cache here: each visitor's read is a local SQLite query.
40
+ (name = "EDGE_CACHE", text = "off"),
41
+ (name = "TEST_OPERATIONS", text = "1"),
42
+ (name = "SITE_READS_PER_MINUTE", text = "100000"),
43
+ (name = "EDGE_WORKER_SECRET", fromEnvironment = "EDGE_WORKER_SECRET"),
44
+ (name = "PASSTHROUGH_ORIGIN", fromEnvironment = "PASSTHROUGH_ORIGIN"),
45
+ (name = "SITE_BUCKET_URL", fromEnvironment = "SITE_BUCKET_URL"),
46
+ ],
47
+ durableObjectNamespaces = [
48
+ (className = "SiteData", uniqueKey = "naru-edge-SiteData", enableSql = true),
49
+ ],
50
+ durableObjectStorage = (localDisk = "site-objects"),
51
+ globalOutbound = "network",
52
+ );