bunbase 0.0.9
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 +21 -0
- package/README.md +25 -0
- package/dist/cli/index.js +1530 -0
- package/dist/index.d.ts +543 -0
- package/dist/index.js +164 -0
- package/dist/shared/chunk-k195ahh5.js +79 -0
- package/package.json +86 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
|
+
|
|
20
|
+
// src/config/loader.ts
|
|
21
|
+
function loadConfig() {
|
|
22
|
+
return Promise.resolve({});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// src/config/index.ts
|
|
26
|
+
function defineConfig(config) {
|
|
27
|
+
return config;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// src/utils/errors.ts
|
|
31
|
+
class GravityError extends Error {
|
|
32
|
+
code;
|
|
33
|
+
status;
|
|
34
|
+
constructor(message, code, status) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.code = code;
|
|
37
|
+
this.status = status;
|
|
38
|
+
this.name = this.constructor.name;
|
|
39
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
class NotFoundError extends GravityError {
|
|
44
|
+
constructor(message = "Resource not found") {
|
|
45
|
+
super(message, "NOT_FOUND", 404);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
class UnauthorizedError extends GravityError {
|
|
50
|
+
constructor(message = "Unauthorized") {
|
|
51
|
+
super(message, "UNAUTHORIZED", 401);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
class ForbiddenError extends GravityError {
|
|
56
|
+
constructor(message = "Forbidden") {
|
|
57
|
+
super(message, "FORBIDDEN", 403);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
class BadRequestError extends GravityError {
|
|
62
|
+
constructor(message = "Bad Request") {
|
|
63
|
+
super(message, "BAD_REQUEST", 400);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class InternalServerError extends GravityError {
|
|
68
|
+
constructor(message = "Internal Server Error") {
|
|
69
|
+
super(message, "INTERNAL_SERVER_ERROR", 500);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class NonRetriableError extends GravityError {
|
|
74
|
+
constructor(message) {
|
|
75
|
+
super(message, "NON_RETRIABLE_ERROR", 500);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { __toESM, __commonJS, loadConfig, defineConfig, GravityError, NotFoundError, UnauthorizedError, ForbiddenError, BadRequestError, InternalServerError, NonRetriableError };
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bunbase",
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"description": "A framework for building scalable applications",
|
|
5
|
+
"homepage": "https://github.com/alihussnainrb/gravity#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/alihussnainrb/gravity/issues"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"bin": {
|
|
14
|
+
"gravity": "./dist/cli/index.js"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"./cli": "./dist/cli/index.js",
|
|
24
|
+
"./db": {
|
|
25
|
+
"import": {
|
|
26
|
+
"types": "./dist/db/index.d.ts",
|
|
27
|
+
"default": "./dist/db/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"./logger": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/logger/index.d.ts",
|
|
33
|
+
"default": "./dist/logger/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"module": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"files": [
|
|
41
|
+
"dist"
|
|
42
|
+
],
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/alihussnainrb/gravity.git"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "bunup",
|
|
49
|
+
"dev": "bunup --watch",
|
|
50
|
+
"lint": "biome check .",
|
|
51
|
+
"lint:fix": "biome check --write .",
|
|
52
|
+
"prerelease": "bun run build",
|
|
53
|
+
"release": "bumpp --commit --push --tag",
|
|
54
|
+
"test": "bun test",
|
|
55
|
+
"test:coverage": "bun test --coverage",
|
|
56
|
+
"test:watch": "bun test --watch",
|
|
57
|
+
"type-check": "tsc --noEmit"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@biomejs/biome": "^2.3.14",
|
|
61
|
+
"@types/bun": "^1.3.8",
|
|
62
|
+
"@types/commander": "^2.12.5",
|
|
63
|
+
"bumpp": "^10.4.1",
|
|
64
|
+
"bunup": "^0.16.23",
|
|
65
|
+
"typescript": "^5.9.3"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"typescript": ">=4.5.0"
|
|
69
|
+
},
|
|
70
|
+
"peerDependenciesMeta": {
|
|
71
|
+
"typescript": {
|
|
72
|
+
"optional": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"type": "module",
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@sinclair/typebox-codegen": "^0.11.1",
|
|
78
|
+
"chokidar": "^5.0.0",
|
|
79
|
+
"commander": "^14.0.3",
|
|
80
|
+
"cronbake": "^0.4.0",
|
|
81
|
+
"glob": "^13.0.1",
|
|
82
|
+
"inquirer": "^13.2.2",
|
|
83
|
+
"is-unicode-supported": "^2.1.0",
|
|
84
|
+
"typebox": "^1.0.81"
|
|
85
|
+
}
|
|
86
|
+
}
|