volter 0.0.15 → 0.0.16

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 (2) hide show
  1. package/package.json +1 -1
  2. package/utils.ts +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volter",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Secure, lightweight, and user-friendly modern JavaScript toolchain optimized for performance and minimalism.",
5
5
  "main": "index.ts",
6
6
  "module": "index.ts",
package/utils.ts CHANGED
@@ -2,6 +2,15 @@ import { privateDecrypt, publicEncrypt, randomInt } from "node:crypto"
2
2
  import os from "node:os"
3
3
  import chalk from "chalk"
4
4
  import cuid2 from "@paralleldrive/cuid2"
5
+ import { generateKeyPairSync } from "node:crypto"
6
+ import z from "zod"
7
+ import type { SocketAddress } from "node:net"
8
+
9
+ declare global {
10
+ interface Request {
11
+ ip: SocketAddress
12
+ }
13
+ }
5
14
 
6
15
  export const pin = z.string().min(6).max(6).regex(/\d{6}/)
7
16
 
@@ -102,9 +111,6 @@ export function listAdapters(): Adapter[] {
102
111
  return results
103
112
  }
104
113
 
105
- import { generateKeyPairSync } from "node:crypto"
106
- import z from "zod"
107
-
108
114
  type KeyPair = {
109
115
  public: string
110
116
  private: string