pronghorn 0.1.0
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/LICENSE +13 -0
- package/README.md +137 -0
- package/dist/core/app.d.ts +34 -0
- package/dist/core/autoload.d.ts +5 -0
- package/dist/core/hooks.d.ts +2 -0
- package/dist/core/loader.d.ts +1 -0
- package/dist/core/middleware.d.ts +2 -0
- package/dist/core/router.d.ts +12 -0
- package/dist/core/types.d.ts +61 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +16758 -0
- package/dist/lib/http-error.d.ts +9 -0
- package/dist/lib/jwt.d.ts +2 -0
- package/dist/middlewares/cors.middleware.d.ts +4 -0
- package/dist/middlewares/error.middleware.d.ts +4 -0
- package/dist/middlewares/jwt-auth.middleware.d.ts +5 -0
- package/dist/middlewares/logger.middleware.d.ts +4 -0
- package/dist/middlewares/rate-limit.middleware.d.ts +2 -0
- package/dist/middlewares/require-auth.middleware.d.ts +4 -0
- package/dist/middlewares/validate.middleware.d.ts +6 -0
- package/dist/plugins/ejs.plugin.d.ts +6 -0
- package/dist/plugins/prisma.plugin.d.ts +5 -0
- package/dist/plugins/static.plugin.d.ts +5 -0
- package/package.json +35 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class HttpError extends Error {
|
|
2
|
+
status: number;
|
|
3
|
+
details?: unknown;
|
|
4
|
+
constructor(status: number, message: string, details?: unknown);
|
|
5
|
+
}
|
|
6
|
+
export declare const badRequest: (message: string, details?: unknown) => HttpError;
|
|
7
|
+
export declare const unauthorized: (message?: string) => HttpError;
|
|
8
|
+
export declare const forbidden: (message?: string) => HttpError;
|
|
9
|
+
export declare const notFound: (message?: string) => HttpError;
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pronghorn",
|
|
3
|
+
"description": "Pronghorn is a fast, lightweight, TypeScript-first backend framework built for Bun. Like its namesake, it's designed for speed and agility, with a clean API, zero-config setup, and a modular plugin system. Pronghorn brings together the simplicity of Express and the performance-first mindset of Fastify, giving developers a streamlined way to build modern, scalable applications.",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"bun": ">=1.3.0"
|
|
8
|
+
},
|
|
9
|
+
"os": ["darwin", "linux", "win32"],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"files": ["dist", "README.md", "LICENSE"],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "bun build ./src/index.ts --outdir dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
20
|
+
"preinstall": "node -e \"if(!process.env.npm_config_user_agent?.includes('bun/')){console.error('\\n✖ Pronghorn requires Bun.\\nInstall Bun: https://bun.sh\\n');process.exit(1)}\"",
|
|
21
|
+
"prepublishOnly": "bun run build"
|
|
22
|
+
},
|
|
23
|
+
"keywords": ["bun", "framwork", "backend", "http", "pronghorn", "nolly"],
|
|
24
|
+
"license": "WTFPL",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"ejs": "^6.0.1",
|
|
27
|
+
"jose": "^6.2.3",
|
|
28
|
+
"zod": "^4.4.3"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/bun": "^1.3.14",
|
|
32
|
+
"@types/ejs": "^3.1.5",
|
|
33
|
+
"typescript": "^7.0.2"
|
|
34
|
+
}
|
|
35
|
+
}
|