guardian-risk-express 0.1.0 → 0.1.1

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/dist/index.cjs CHANGED
@@ -15,5 +15,3 @@ function fromRequest(_req, guardian) {
15
15
 
16
16
  exports.expressPlugin = expressPlugin;
17
17
  exports.fromRequest = fromRequest;
18
- //# sourceMappingURL=index.cjs.map
19
- //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -12,5 +12,3 @@ function fromRequest(_req, guardian) {
12
12
  }
13
13
 
14
14
  export { expressPlugin, fromRequest };
15
- //# sourceMappingURL=index.js.map
16
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-risk-express",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Express middleware plugin for guardian-risk — adds request signals",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -20,7 +20,10 @@
20
20
  },
21
21
  "sideEffects": false,
22
22
  "files": [
23
- "dist",
23
+ "dist/index.js",
24
+ "dist/index.cjs",
25
+ "dist/index.d.ts",
26
+ "dist/index.d.cts",
24
27
  "README.md",
25
28
  "LICENSE"
26
29
  ],
@@ -35,6 +38,7 @@
35
38
  "risk",
36
39
  "security"
37
40
  ],
41
+ "author": "himanshuusinghh",
38
42
  "license": "MIT",
39
43
  "repository": {
40
44
  "type": "git",
@@ -45,6 +49,7 @@
45
49
  "bugs": {
46
50
  "url": "https://github.com/himanshu6306singh/guardian-risk/issues"
47
51
  },
52
+ "security": "https://github.com/himanshu6306singh/guardian-risk/security/policy",
48
53
  "publishConfig": {
49
54
  "access": "public"
50
55
  },
@@ -60,7 +65,7 @@
60
65
  "devDependencies": {
61
66
  "tsup": "^8.3.5",
62
67
  "typescript": "^5.7.2",
63
- "guardian-risk": "0.2.0"
68
+ "guardian-risk": "0.2.1"
64
69
  },
65
70
  "scripts": {
66
71
  "build": "tsup",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAeO,SAAS,aAAA,CAAc,OAAA,GAAgC,EAAC,EAAW;AACxE,EAAA,MAAM,EAAE,UAAA,GAAa,KAAA,EAAM,GAAI,OAAA;AAE/B,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,uBAAA;AAAA,IACN,QAAQ,SAAA,EAAW;AACZ,IAEP;AAAA,GACF;AACF;AAKO,SAAS,WAAA,CACd,MACA,QAAA,EACkC;AAClC,EAAA,OAAO,SACJ,MAAA,CAAO,eAAA,EAAiB,SAAS,CAAA,CACjC,MAAA,CAAO,iBAAiB,MAAM,CAAA;AACnC","file":"index.cjs","sourcesContent":["import type { Plugin } from 'guardian-risk';\n\n/** Options for the Express plugin (stub). */\nexport interface ExpressPluginOptions {\n /** Trust X-Forwarded-* headers when reading client IP. */\n readonly trustProxy?: boolean;\n}\n\n/**\n * Express plugin for guardian-risk.\n *\n * @stub This plugin is a stub. Future versions will read Express requests\n * and add signals such as `clientIp`, `userAgent`, `requestMethod`, and\n * `requestsPerMinute`.\n */\nexport function expressPlugin(options: ExpressPluginOptions = {}): Plugin {\n const { trustProxy = false } = options;\n\n return {\n name: 'guardian-risk-express',\n install(_guardian) {\n void trustProxy;\n // Stub: middleware will attach signals from req before analyze()\n },\n };\n}\n\n/**\n * @stub Future middleware that enriches a Guardian instance from an Express request.\n */\nexport function fromRequest(\n _req: unknown,\n guardian: import('guardian-risk').Guardian,\n): import('guardian-risk').Guardian {\n return guardian\n .signal('requestSource', 'express')\n .signal('expressPlugin', 'stub');\n}\n"]}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAeO,SAAS,aAAA,CAAc,OAAA,GAAgC,EAAC,EAAW;AACxE,EAAA,MAAM,EAAE,UAAA,GAAa,KAAA,EAAM,GAAI,OAAA;AAE/B,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,uBAAA;AAAA,IACN,QAAQ,SAAA,EAAW;AACZ,IAEP;AAAA,GACF;AACF;AAKO,SAAS,WAAA,CACd,MACA,QAAA,EACkC;AAClC,EAAA,OAAO,SACJ,MAAA,CAAO,eAAA,EAAiB,SAAS,CAAA,CACjC,MAAA,CAAO,iBAAiB,MAAM,CAAA;AACnC","file":"index.js","sourcesContent":["import type { Plugin } from 'guardian-risk';\n\n/** Options for the Express plugin (stub). */\nexport interface ExpressPluginOptions {\n /** Trust X-Forwarded-* headers when reading client IP. */\n readonly trustProxy?: boolean;\n}\n\n/**\n * Express plugin for guardian-risk.\n *\n * @stub This plugin is a stub. Future versions will read Express requests\n * and add signals such as `clientIp`, `userAgent`, `requestMethod`, and\n * `requestsPerMinute`.\n */\nexport function expressPlugin(options: ExpressPluginOptions = {}): Plugin {\n const { trustProxy = false } = options;\n\n return {\n name: 'guardian-risk-express',\n install(_guardian) {\n void trustProxy;\n // Stub: middleware will attach signals from req before analyze()\n },\n };\n}\n\n/**\n * @stub Future middleware that enriches a Guardian instance from an Express request.\n */\nexport function fromRequest(\n _req: unknown,\n guardian: import('guardian-risk').Guardian,\n): import('guardian-risk').Guardian {\n return guardian\n .signal('requestSource', 'express')\n .signal('expressPlugin', 'stub');\n}\n"]}