gemi 0.4.16 → 0.4.18
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/app/index.js +19 -1334
- package/dist/auth/adapters/prisma.d.ts +1 -1
- package/dist/auth/adapters/prisma.d.ts.map +1 -1
- package/dist/auth/adapters/types.d.ts +2 -2
- package/dist/auth/adapters/types.d.ts.map +1 -1
- package/dist/chunk-21e105fb2b3d36d7.js +799 -0
- package/dist/chunk-7afdc0ba5afe109a.js +21 -0
- package/dist/chunk-970e033f764e29fc.js +19 -0
- package/dist/chunk-fa40971555060604.js +81 -0
- package/dist/email/index.js +15 -13910
- package/dist/facades/index.js +8 -99
- package/dist/http/index.js +8 -99
- package/dist/kernel/index.js +37 -594
- package/dist/server/index.js +48 -1106
- package/dist/vite/index.js +4 -21
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {createRequire} from "node:module";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
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
|
+
var __require = createRequire(import.meta.url);
|
|
20
|
+
|
|
21
|
+
export { __toESM, __commonJS, __require };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
10
|
+
if (!__hasOwnProp.call(to, key))
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: () => mod[key],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
18
|
+
|
|
19
|
+
export { __toESM, __commonJS };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// http/Error.ts
|
|
2
|
+
var GEMI_REQUEST_BREAKER_ERROR = "GEMI_REQUEST_BREAKER_ERROR";
|
|
3
|
+
|
|
4
|
+
class RequestBreakerError extends Error {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
}
|
|
8
|
+
kind = GEMI_REQUEST_BREAKER_ERROR;
|
|
9
|
+
payload = { api: {}, view: {} };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// http/requestContext.ts
|
|
13
|
+
import {AsyncLocalStorage} from "async_hooks";
|
|
14
|
+
|
|
15
|
+
// http/Cookie.ts
|
|
16
|
+
class Cookie {
|
|
17
|
+
name;
|
|
18
|
+
value;
|
|
19
|
+
options;
|
|
20
|
+
constructor(name, value, options = {}) {
|
|
21
|
+
this.name = name;
|
|
22
|
+
this.value = value;
|
|
23
|
+
this.options = options;
|
|
24
|
+
}
|
|
25
|
+
toString() {
|
|
26
|
+
return [
|
|
27
|
+
`${this.name}=${this.value}`,
|
|
28
|
+
this.options.maxAge ? `Max-Age=${this.options.maxAge}` : "",
|
|
29
|
+
this.options.httpOnly ? "HttpOnly" : "",
|
|
30
|
+
this.options.secure ? "Secure" : "",
|
|
31
|
+
this.options.sameSite ? `SameSite=${this.options.sameSite}` : "SameSite=Strict",
|
|
32
|
+
this.options.path ? `Path=${this.options.path}` : "Path=/",
|
|
33
|
+
this.options.domain ? `Domain=${this.options.domain}` : "",
|
|
34
|
+
this.options.expires ? `Expires=${this.options.expires.toUTCString()}` : "",
|
|
35
|
+
this.options.partitioned ? "Partitioned" : ""
|
|
36
|
+
].filter((i) => i !== "").join("; ");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// http/requestContext.ts
|
|
41
|
+
var requestContext = new AsyncLocalStorage;
|
|
42
|
+
|
|
43
|
+
class Store {
|
|
44
|
+
cookies = new Set;
|
|
45
|
+
user = null;
|
|
46
|
+
req = null;
|
|
47
|
+
constructor() {
|
|
48
|
+
}
|
|
49
|
+
setCookie(name, value, options = {}) {
|
|
50
|
+
this.cookies.add(new Cookie(name, value, options));
|
|
51
|
+
}
|
|
52
|
+
setUser(user) {
|
|
53
|
+
this.user = user;
|
|
54
|
+
}
|
|
55
|
+
setRequest(req) {
|
|
56
|
+
this.req = req;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
class RequestContext {
|
|
61
|
+
static getStore() {
|
|
62
|
+
return requestContext.getStore();
|
|
63
|
+
}
|
|
64
|
+
static setRequest(req) {
|
|
65
|
+
requestContext.getStore().req = req;
|
|
66
|
+
}
|
|
67
|
+
static async run(fn) {
|
|
68
|
+
return requestContext.run(new Store, fn);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// kernel/context.ts
|
|
73
|
+
import {AsyncLocalStorage as AsyncLocalStorage2} from "async_hooks";
|
|
74
|
+
var kernelContext = new AsyncLocalStorage2;
|
|
75
|
+
|
|
76
|
+
// kernel/KernelContext.ts
|
|
77
|
+
class KernelContext {
|
|
78
|
+
static getStore = () => kernelContext.getStore();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { GEMI_REQUEST_BREAKER_ERROR, RequestBreakerError, RequestContext, kernelContext, KernelContext };
|