@vinxi/listhen
Advanced tools
Comparing version 1.5.5 to 1.5.6
import * as citty from 'citty'; | ||
import { ParsedArgs } from 'citty'; | ||
import { L as ListenOptions } from './shared/listhen.10ba2b37.js'; | ||
import { L as ListenOptions } from './shared/listhen.994822d6.js'; | ||
import 'node:http'; | ||
@@ -5,0 +5,0 @@ import 'node:https'; |
import { RequestListener } from 'node:http'; | ||
import { L as ListenOptions, a as Listener } from './shared/listhen.10ba2b37.js'; | ||
export { C as Certificate, G as GetURLOptions, H as HTTPSOptions, b as ListenURL, S as ShowURLOptions } from './shared/listhen.10ba2b37.js'; | ||
import { L as ListenOptions, a as Listener, H as HTTPSOptions, C as Certificate } from './shared/listhen.994822d6.js'; | ||
export { G as GetURLOptions, b as ListenURL, S as ShowURLOptions } from './shared/listhen.994822d6.js'; | ||
import { ConsolaInstance } from 'consola'; | ||
import * as h3 from 'h3'; | ||
import forge from 'node-forge'; | ||
import 'node:https'; | ||
@@ -39,2 +40,123 @@ import 'node:net'; | ||
export { type DevServerOptions, ListenOptions, Listener, type WatchOptions, createDevServer, listen, listenAndWatch }; | ||
interface CertificateOptions { | ||
validityDays: number; | ||
subject: forge.pki.CertificateField[]; | ||
issuer: forge.pki.CertificateField[]; | ||
extensions: any[]; | ||
} | ||
interface CommonCertificateOptions { | ||
commonName?: string; | ||
countryCode?: string; | ||
state?: string; | ||
locality?: string; | ||
organization?: string; | ||
organizationalUnit?: string; | ||
emailAddress?: string; | ||
domains?: string[]; | ||
} | ||
interface SigningOptions { | ||
signingKey?: string; | ||
signingKeyCert?: string; | ||
signingKeyPassphrase?: string; | ||
} | ||
interface TLSCertOptions extends CommonCertificateOptions, SigningOptions { | ||
bits?: number; | ||
validityDays?: number; | ||
passphrase?: string; | ||
} | ||
declare function resolveCertificate(options: HTTPSOptions): Promise<Certificate>; | ||
declare function generateCertificates(options: TLSCertOptions): Promise<{ | ||
cert: Certificate; | ||
ca: Certificate; | ||
}>; | ||
declare function resolveCert(options: HTTPSOptions): Promise<Certificate>; | ||
declare function resolvePfx(options: HTTPSOptions): Promise<forge.pkcs12.Pkcs12Pfx>; | ||
declare function createCertificateInfo(options: CommonCertificateOptions): { | ||
attributes: { | ||
name: string; | ||
value: string; | ||
}[]; | ||
extensions: ({ | ||
name: string; | ||
cA: boolean; | ||
critical: boolean; | ||
digitalSignature?: undefined; | ||
keyEncipherment?: undefined; | ||
serverAuth?: undefined; | ||
clientAuth?: undefined; | ||
altNames?: undefined; | ||
} | { | ||
name: string; | ||
digitalSignature: boolean; | ||
keyEncipherment: boolean; | ||
critical: boolean; | ||
cA?: undefined; | ||
serverAuth?: undefined; | ||
clientAuth?: undefined; | ||
altNames?: undefined; | ||
} | { | ||
name: string; | ||
serverAuth: boolean; | ||
clientAuth: boolean; | ||
cA?: undefined; | ||
critical?: undefined; | ||
digitalSignature?: undefined; | ||
keyEncipherment?: undefined; | ||
altNames?: undefined; | ||
} | { | ||
name: string; | ||
altNames: ({ | ||
type: number; | ||
ip: string; | ||
value?: undefined; | ||
} | { | ||
type: number; | ||
value: string; | ||
ip?: undefined; | ||
})[]; | ||
cA?: undefined; | ||
critical?: undefined; | ||
digitalSignature?: undefined; | ||
keyEncipherment?: undefined; | ||
serverAuth?: undefined; | ||
clientAuth?: undefined; | ||
})[]; | ||
}; | ||
declare function createCaInfo(options: TLSCertOptions): { | ||
attributes: { | ||
name: string; | ||
value: string; | ||
}[]; | ||
extensions: ({ | ||
name: string; | ||
cA: boolean; | ||
critical: boolean; | ||
keyCertSign?: undefined; | ||
} | { | ||
name: string; | ||
keyCertSign: boolean; | ||
critical: boolean; | ||
cA?: undefined; | ||
})[]; | ||
}; | ||
declare function generateTLSCert(options: TLSCertOptions): Promise<Certificate>; | ||
declare function generateCACert(options?: TLSCertOptions): Promise<Certificate>; | ||
declare function signCertificate(options: SigningOptions, cert: forge.pki.Certificate): void; | ||
declare function createCertificateFromKeyPair(keyPair: forge.pki.KeyPair, options: CertificateOptions): forge.pki.Certificate; | ||
declare function generateKeyPair(bits?: number): Promise<forge.pki.KeyPair>; | ||
declare function generateCert(options: TLSCertOptions & CertificateOptions): Promise<Certificate>; | ||
declare const _private: { | ||
generateCert: typeof generateCert; | ||
generateKeyPair: typeof generateKeyPair; | ||
generateCACert: typeof generateCACert; | ||
generateTLSCert: typeof generateTLSCert; | ||
createCaInfo: typeof createCaInfo; | ||
createCertificateInfo: typeof createCertificateInfo; | ||
signCertificate: typeof signCertificate; | ||
createCertificateFromKeyPair: typeof createCertificateFromKeyPair; | ||
resolveCert: typeof resolveCert; | ||
resolvePfx: typeof resolvePfx; | ||
generateCertificates: typeof generateCertificates; | ||
}; | ||
export { Certificate, type CertificateOptions, type CommonCertificateOptions, type DevServerOptions, HTTPSOptions, ListenOptions, Listener, type SigningOptions, type TLSCertOptions, type WatchOptions, _private, createDevServer, listen, listenAndWatch, resolveCertificate }; |
{ | ||
"name": "@vinxi/listhen", | ||
"version": "1.5.5", | ||
"version": "1.5.6", | ||
"description": "👂 Elegant HTTP Listener", | ||
@@ -37,3 +37,3 @@ "repository": "unjs/listhen", | ||
"listhen": "node ./scripts/listhen.mjs", | ||
"play": "node ./scripts/listhen.mjs -w ./playground", | ||
"play": "node ./scripts/listhen.mjs --ws -w ./playground", | ||
"release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags", | ||
@@ -45,32 +45,32 @@ "test": "pnpm lint && vitest run --coverage" | ||
"@parcel/watcher-wasm": "2.3.0", | ||
"citty": "^0.1.4", | ||
"clipboardy": "^3.0.0", | ||
"citty": "^0.1.5", | ||
"clipboardy": "^4.0.0", | ||
"consola": "^3.2.3", | ||
"defu": "^6.1.2", | ||
"get-port-please": "^3.1.1", | ||
"h3": "^1.8.1", | ||
"defu": "^6.1.4", | ||
"get-port-please": "^3.1.2", | ||
"h3": "^1.10.0", | ||
"http-shutdown": "^1.2.2", | ||
"jiti": "^1.20.0", | ||
"mlly": "^1.4.2", | ||
"jiti": "^1.21.0", | ||
"mlly": "^1.5.0", | ||
"node-forge": "^1.3.1", | ||
"pathe": "^1.1.1", | ||
"std-env": "^3.4.3", | ||
"ufo": "^1.3.0", | ||
"untun": "^0.1.2", | ||
"pathe": "^1.1.2", | ||
"std-env": "^3.7.0", | ||
"ufo": "^1.3.2", | ||
"untun": "^0.1.3", | ||
"uqr": "^0.1.2" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.6.3", | ||
"@types/node-forge": "^1.3.5", | ||
"@vitest/coverage-v8": "^0.34.4", | ||
"@types/node": "^20.11.0", | ||
"@types/node-forge": "^1.3.11", | ||
"@vitest/coverage-v8": "^1.2.0", | ||
"changelogen": "^0.5.5", | ||
"eslint": "^8.49.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-unjs": "^0.2.1", | ||
"ip-regex": "^5.0.0", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2", | ||
"prettier": "^3.2.2", | ||
"typescript": "^5.3.3", | ||
"unbuild": "^2.0.0", | ||
"vitest": "^0.34.4" | ||
"vitest": "^1.2.0" | ||
}, | ||
"packageManager": "pnpm@8.7.4" | ||
"packageManager": "pnpm@8.14.1" | ||
} |
@@ -60,3 +60,3 @@ # 👂 listhen | ||
app.use("/", () => "Hello world!"); | ||
app.use("/", eventHandler(() => "Hello world!")); | ||
``` | ||
@@ -63,0 +63,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
181726
4636
+ Addedclipboardy@4.0.0(transitive)
+ Addedexeca@8.0.1(transitive)
+ Addedget-stream@8.0.1(transitive)
+ Addedhuman-signals@5.0.0(transitive)
+ Addedis-docker@3.0.0(transitive)
+ Addedis-inside-container@1.0.0(transitive)
+ Addedis-stream@3.0.0(transitive)
+ Addedis-wsl@3.1.0(transitive)
+ Addedis64bit@2.0.0(transitive)
+ Addedmimic-fn@4.0.0(transitive)
+ Addednpm-run-path@5.3.0(transitive)
+ Addedonetime@6.0.0(transitive)
+ Addedpath-key@4.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstrip-final-newline@3.0.0(transitive)
+ Addedsystem-architecture@0.1.0(transitive)
- Removedarch@2.2.0(transitive)
- Removedclipboardy@3.0.0(transitive)
- Removedexeca@5.1.1(transitive)
- Removedget-stream@6.0.1(transitive)
- Removedhuman-signals@2.1.0(transitive)
- Removedis-docker@2.2.1(transitive)
- Removedis-stream@2.0.1(transitive)
- Removedis-wsl@2.2.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removednpm-run-path@4.0.1(transitive)
- Removedonetime@5.1.2(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstrip-final-newline@2.0.0(transitive)
Updatedcitty@^0.1.5
Updatedclipboardy@^4.0.0
Updateddefu@^6.1.4
Updatedget-port-please@^3.1.2
Updatedh3@^1.10.0
Updatedjiti@^1.21.0
Updatedmlly@^1.5.0
Updatedpathe@^1.1.2
Updatedstd-env@^3.7.0
Updatedufo@^1.3.2
Updateduntun@^0.1.3