@lunora/server 0.0.0 → 1.0.0-alpha.10

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.
Files changed (45) hide show
  1. package/LICENSE.md +105 -0
  2. package/README.md +134 -9
  3. package/__assets__/package-og.svg +14 -0
  4. package/dist/data-model.d.mts +416 -0
  5. package/dist/data-model.d.ts +416 -0
  6. package/dist/data-model.mjs +1 -0
  7. package/dist/drizzle.d.mts +1 -0
  8. package/dist/drizzle.d.ts +1 -0
  9. package/dist/drizzle.mjs +1 -0
  10. package/dist/index.d.mts +1985 -0
  11. package/dist/index.d.ts +1985 -0
  12. package/dist/index.mjs +28 -0
  13. package/dist/packem_shared/LunoraEnvError-DjFkpkSP.mjs +187 -0
  14. package/dist/packem_shared/LunoraError-DN7Zhhvu.mjs +54 -0
  15. package/dist/packem_shared/PRESENCE_DEFAULT_TTL_MS-D8viLY1S.mjs +114 -0
  16. package/dist/packem_shared/asBucketStorage-Cnxd9y2q.mjs +11 -0
  17. package/dist/packem_shared/bindOrm-Ce57S3N9.mjs +128 -0
  18. package/dist/packem_shared/buildRlsReadRegistry-1jexWrb3.mjs +107 -0
  19. package/dist/packem_shared/composePluginMiddleware-Ck5_TUO8.mjs +100 -0
  20. package/dist/packem_shared/createPolicyDsl-De67zPDS.mjs +29 -0
  21. package/dist/packem_shared/createSecrets-TsIP9lOa.mjs +55 -0
  22. package/dist/packem_shared/defineAggregateIndex-ZdyU78gh.mjs +291 -0
  23. package/dist/packem_shared/defineMigration-CAJLr6fx.mjs +8 -0
  24. package/dist/packem_shared/defineMutator-EIXAWhs9.mjs +11 -0
  25. package/dist/packem_shared/defineShape-CJ27Wx7o.mjs +17 -0
  26. package/dist/packem_shared/defineStorageRule-qu0mpilX.mjs +20 -0
  27. package/dist/packem_shared/functions-Di9FUNkf.mjs +5 -0
  28. package/dist/packem_shared/httpAction-FLwfsePg.mjs +340 -0
  29. package/dist/packem_shared/initLunora-lxwHTEV3.mjs +100 -0
  30. package/dist/packem_shared/mask-BV_jNzsN.mjs +211 -0
  31. package/dist/packem_shared/onConnect-CIPXKPyw.mjs +13 -0
  32. package/dist/packem_shared/policy-tag-DvpVH2tv.mjs +13 -0
  33. package/dist/packem_shared/protectPublic-BjFkQ_Or.mjs +15 -0
  34. package/dist/packem_shared/rls-2Jhd0uev.mjs +569 -0
  35. package/dist/packem_shared/run-middleware-CYQOuoV6.mjs +18 -0
  36. package/dist/packem_shared/storageRules-Cje6Woea.mjs +88 -0
  37. package/dist/packem_shared/types.d-BDY0FYHK.d.ts +135 -0
  38. package/dist/packem_shared/types.d-DmvyEMD6.d.mts +135 -0
  39. package/dist/rls/testing.d.mts +63 -0
  40. package/dist/rls/testing.d.ts +63 -0
  41. package/dist/rls/testing.mjs +49 -0
  42. package/dist/types.d.mts +1157 -0
  43. package/dist/types.d.ts +1157 -0
  44. package/dist/types.mjs +31 -0
  45. package/package.json +59 -17
package/dist/types.mjs ADDED
@@ -0,0 +1,31 @@
1
+ const namespaceCache = /* @__PURE__ */ new Map();
2
+ const anyApi = /* @__PURE__ */ new Proxy(
3
+ {},
4
+ {
5
+ get(_target, namespace) {
6
+ const cached = namespaceCache.get(namespace);
7
+ if (cached) {
8
+ return cached;
9
+ }
10
+ const refCache = /* @__PURE__ */ new Map();
11
+ const nsProxy = /* @__PURE__ */ new Proxy(
12
+ {},
13
+ {
14
+ get(_inner, functionName) {
15
+ const cachedRef = refCache.get(functionName);
16
+ if (cachedRef) {
17
+ return cachedRef;
18
+ }
19
+ const ref = { __lunoraRef: `${String(namespace)}:${String(functionName)}` };
20
+ refCache.set(functionName, ref);
21
+ return ref;
22
+ }
23
+ }
24
+ );
25
+ namespaceCache.set(namespace, nsProxy);
26
+ return nsProxy;
27
+ }
28
+ }
29
+ );
30
+
31
+ export { anyApi };
package/package.json CHANGED
@@ -1,31 +1,73 @@
1
1
  {
2
2
  "name": "@lunora/server",
3
- "version": "0.0.0",
3
+ "version": "1.0.0-alpha.10",
4
4
  "description": "Server primitives for Lunora: defineSchema, defineTable, query, mutation, and action",
5
- "license": "FSL-1.1-Apache-2.0",
5
+ "keywords": [
6
+ "backend",
7
+ "cloudflare",
8
+ "durable-objects",
9
+ "lunora",
10
+ "mutation",
11
+ "query",
12
+ "schema",
13
+ "workers"
14
+ ],
6
15
  "homepage": "https://lunora.sh",
16
+ "bugs": "https://github.com/anolilab/lunora/issues",
17
+ "license": "FSL-1.1-Apache-2.0",
18
+ "author": {
19
+ "name": "Daniel Bannert",
20
+ "email": "d.bannert@anolilab.de"
21
+ },
7
22
  "repository": {
8
23
  "type": "git",
9
24
  "url": "git+https://github.com/anolilab/lunora.git",
10
25
  "directory": "packages/server"
11
26
  },
12
- "bugs": {
13
- "url": "https://github.com/anolilab/lunora/issues"
14
- },
15
- "keywords": [
16
- "lunora",
17
- "cloudflare",
18
- "workers",
19
- "durable-objects",
20
- "schema",
21
- "query",
22
- "mutation",
23
- "backend"
27
+ "files": [
28
+ "./dist",
29
+ "README.md",
30
+ "LICENSE.md",
31
+ "__assets__"
24
32
  ],
33
+ "type": "module",
34
+ "sideEffects": false,
35
+ "main": "./dist/index.mjs",
36
+ "module": "./dist/index.mjs",
37
+ "types": "./dist/index.d.ts",
38
+ "exports": {
39
+ ".": {
40
+ "types": "./dist/index.d.ts",
41
+ "import": "./dist/index.mjs"
42
+ },
43
+ "./types": {
44
+ "types": "./dist/types.d.ts",
45
+ "import": "./dist/types.mjs"
46
+ },
47
+ "./drizzle": {
48
+ "types": "./dist/drizzle.d.ts",
49
+ "import": "./dist/drizzle.mjs"
50
+ },
51
+ "./data-model": {
52
+ "types": "./dist/data-model.d.ts",
53
+ "import": "./dist/data-model.mjs"
54
+ },
55
+ "./rls/testing": {
56
+ "types": "./dist/rls/testing.d.ts",
57
+ "import": "./dist/rls/testing.mjs"
58
+ },
59
+ "./package.json": "./package.json"
60
+ },
25
61
  "publishConfig": {
26
62
  "access": "public"
27
63
  },
28
- "files": [
29
- "README.md"
30
- ]
64
+ "dependencies": {
65
+ "@lunora/scheduler": "1.0.0-alpha.4",
66
+ "@lunora/values": "1.0.0-alpha.3",
67
+ "drizzle-orm": "^0.45.2",
68
+ "hono": "^4.12.27"
69
+ },
70
+ "engines": {
71
+ "node": "^22.15.0 || >=24.11.0"
72
+ }
31
73
  }