@ruvyxa/adapter-deno 1.1.2 → 1.1.4

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.
package/README.md CHANGED
@@ -34,3 +34,21 @@ Build with `ruvyxa build`, copy `.ruvyxa/deploy/deno/`, then run:
34
34
  ```bash
35
35
  deno run -A --no-prompt server/index.mjs
36
36
  ```
37
+
38
+ ## Client identity behind a proxy
39
+
40
+ The generated server believes `X-Forwarded-For` and `X-Real-IP` only from a connection whose peer is
41
+ loopback or listed in `security.trustedProxyIps`. From any other peer both headers are dropped
42
+ before the request is routed, because nothing in front of the server overwrote them and one caller
43
+ rotating a value would otherwise collect a fresh bucket per request from the built-in `rate`
44
+ middleware, the server-action rate limiter, and the action replay quota.
45
+
46
+ Behind a reverse proxy that is not on the same host — nginx or Traefik in another container, an
47
+ ingress controller, a service mesh — list its address or range, or every visitor is counted as one
48
+ client:
49
+
50
+ ```ts
51
+ export default config({
52
+ security: { trustedProxyIps: ['10.0.0.0/8'] },
53
+ })
54
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAA+B,MAAM,cAAc,CAAA;AAQxE,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wEAAwE;AACxE,wBAAgB,IAAI,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAoD9D;eAEc,IAAI"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAA+B,MAAM,cAAc,CAAA;AAQxE,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wEAAwE;AACxE,wBAAgB,IAAI,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAgE9D;eAEc,IAAI"}
package/dist/index.js CHANGED
@@ -43,7 +43,19 @@ export function deno(options = {}) {
43
43
  contents: '# Ruvyxa Deno deployment\n\n' +
44
44
  'Run the self-contained server (no Ruvyxa CLI dependency):\n\n' +
45
45
  '```bash\ndeno run -A --no-prompt server/index.mjs\n```\n\n' +
46
- 'Run this command from the copied `deploy/deno/` directory. `PORT` defaults to 3000 and `HOST` to 0.0.0.0.\n',
46
+ 'Run this command from the copied `deploy/deno/` directory. `PORT` defaults to 3000 and `HOST` to 0.0.0.0.\n\n' +
47
+ '## Deno Deploy\n\n' +
48
+ 'Deno Deploy has no framework preset for Ruvyxa, so set the build\n' +
49
+ 'configuration yourself. Use a **dynamic** runtime and give it this\n' +
50
+ 'entrypoint, relative to the repository root:\n\n' +
51
+ '```\n.ruvyxa/deploy/deno/server/index.mjs\n```\n\n' +
52
+ 'The build detects Deno Deploy through `DENO_DEPLOY`, so no adapter\n' +
53
+ 'needs naming in `ruvyxa.config.ts`. `PORT` is supplied by the platform.\n\n' +
54
+ 'Do not put a `deno.json` in this directory. It would make the directory\n' +
55
+ "Deno's own configuration scope, and that scope declares no dependencies —\n" +
56
+ 'so the npm packages a server-components render reaches for at request\n' +
57
+ 'time stop resolving and every such route answers 500. Without one, Deno\n' +
58
+ 'walks up to the project and resolves them.\n',
47
59
  },
48
60
  ],
49
61
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,cAAc,CAAA;AAOrB,wEAAwE;AACxE,MAAM,UAAU,IAAI,CAAC,OAAO,GAAuB,EAAE;IACnD,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,C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BACT;wBACE,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,oBAAoB;wBAC1B,aAAa,EAAE,sBAAsB,CAAC;4BACpC,OAAO,EAAE,MAAM;4BACf,aAAa,EAAE,kBAAkB,CAAC,GAAG,CAAC;yBACvC,CAAC;qBACH;oBACD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE;oBACnE;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,uBAAuB;wBAC7B,QAAQ,EACN,mMAAmM;4BACnM,6DAA6D;qBAChE;oBACD;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,uBAAuB;wBAC7B,QAAQ,EACN,8BAA8B;4BAC9B,+DAA+D;4BAC/D,4DAA4D;4BAC5D,+GAA+G;4BAC/G,oBAAoB;4BACpB,oEAAoE;4BACpE,sEAAsE;4BACtE,kDAAkD;4BAClD,oDAAoD;4BACpD,sEAAsE;4BACtE,6EAA6E;4BAC7E,2EAA2E;4BAC3E,6EAA6E;4BAC7E,yEAAyE;4BACzE,2EAA2E;4BAC3E,8CAA8C;qBACjD;iBACF;aACF,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAED,eAAe,IAAI,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruvyxa/adapter-deno",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Self-host Ruvyxa applications on the Deno runtime.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  "dependencies": {
60
- "@ruvyxa/core": "^1.1.2"
60
+ "@ruvyxa/core": "^1.1.4"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "tsc -p tsconfig.json",
package/src/index.ts CHANGED
@@ -58,7 +58,19 @@ export function deno(options: DenoAdapterOptions = {}): Adapter {
58
58
  '# Ruvyxa Deno deployment\n\n' +
59
59
  'Run the self-contained server (no Ruvyxa CLI dependency):\n\n' +
60
60
  '```bash\ndeno run -A --no-prompt server/index.mjs\n```\n\n' +
61
- 'Run this command from the copied `deploy/deno/` directory. `PORT` defaults to 3000 and `HOST` to 0.0.0.0.\n',
61
+ 'Run this command from the copied `deploy/deno/` directory. `PORT` defaults to 3000 and `HOST` to 0.0.0.0.\n\n' +
62
+ '## Deno Deploy\n\n' +
63
+ 'Deno Deploy has no framework preset for Ruvyxa, so set the build\n' +
64
+ 'configuration yourself. Use a **dynamic** runtime and give it this\n' +
65
+ 'entrypoint, relative to the repository root:\n\n' +
66
+ '```\n.ruvyxa/deploy/deno/server/index.mjs\n```\n\n' +
67
+ 'The build detects Deno Deploy through `DENO_DEPLOY`, so no adapter\n' +
68
+ 'needs naming in `ruvyxa.config.ts`. `PORT` is supplied by the platform.\n\n' +
69
+ 'Do not put a `deno.json` in this directory. It would make the directory\n' +
70
+ "Deno's own configuration scope, and that scope declares no dependencies —\n" +
71
+ 'so the npm packages a server-components render reaches for at request\n' +
72
+ 'time stop resolving and every such route answers 500. Without one, Deno\n' +
73
+ 'walks up to the project and resolves them.\n',
62
74
  },
63
75
  ],
64
76
  }