@sqrzro/server 2.0.0-bz.12 → 2.0.0-bz.14
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/auth.d.ts +1 -1
- package/auth.js +1 -1
- package/cache.d.ts +1 -1
- package/cache.js +1 -1
- package/dist/auth/AuthService.d.ts +14 -0
- package/dist/auth/AuthService.js +135 -0
- package/dist/auth/ClientService.d.ts +11 -0
- package/dist/auth/ClientService.js +47 -0
- package/dist/auth/LoginRequest.d.ts +4 -0
- package/dist/auth/LoginRequest.js +8 -0
- package/dist/auth/MFARequest.d.ts +4 -0
- package/dist/auth/MFARequest.js +9 -0
- package/dist/auth/MFAService.d.ts +6 -0
- package/dist/auth/MFAService.js +105 -0
- package/dist/auth/PasswordRequest.d.ts +4 -0
- package/dist/auth/PasswordRequest.js +12 -0
- package/dist/auth/PasswordResetRequest.d.ts +4 -0
- package/dist/auth/PasswordResetRequest.js +13 -0
- package/dist/auth/PasswordService.d.ts +8 -0
- package/dist/auth/PasswordService.js +54 -0
- package/dist/auth/SessionService.d.ts +42 -0
- package/dist/auth/SessionService.js +127 -0
- package/dist/auth/index.d.ts +6 -0
- package/dist/auth/index.js +6 -0
- package/dist/auth/interfaces.d.ts +20 -0
- package/dist/auth/interfaces.js +1 -0
- package/dist/cache/CacheService.d.ts +2 -0
- package/dist/cache/CacheService.js +14 -0
- package/dist/cache/index.d.ts +1 -0
- package/dist/cache/index.js +1 -0
- package/dist/database/DatabaseService.d.ts +7 -0
- package/dist/database/DatabaseService.js +12 -0
- package/dist/{schema.d.ts → database/schema.d.ts} +34 -38
- package/dist/database/schema.js +42 -0
- package/dist/forms/FormService.d.ts +16 -0
- package/dist/forms/FormService.js +78 -0
- package/dist/forms/ImageService.d.ts +7 -0
- package/dist/forms/ImageService.js +19 -0
- package/dist/forms/ValidationError.d.ts +4 -0
- package/dist/forms/ValidationError.js +7 -0
- package/dist/forms/ValidationService.d.ts +20 -0
- package/dist/forms/ValidationService.js +59 -0
- package/dist/forms/index.d.ts +3 -0
- package/dist/forms/index.js +3 -0
- package/dist/forms/lang.d.ts +2 -0
- package/dist/forms/lang.js +115 -0
- package/dist/{lists.d.ts → lists/ListService.d.ts} +3 -5
- package/dist/lists/ListService.js +28 -0
- package/dist/lists/index.d.ts +1 -0
- package/dist/lists/index.js +1 -0
- package/dist/mail/MailService.d.ts +12 -0
- package/dist/mail/MailService.js +55 -0
- package/dist/mail/index.d.ts +1 -0
- package/dist/mail/index.js +1 -0
- package/dist/middleware.d.ts +3 -5
- package/dist/middleware.js +22 -58
- package/dist/{url.d.ts → url/URLService.d.ts} +2 -4
- package/dist/url/URLService.js +48 -0
- package/dist/url/index.d.ts +1 -0
- package/dist/url/index.js +1 -0
- package/forms.d.ts +1 -1
- package/forms.js +1 -1
- package/lists.d.ts +1 -1
- package/lists.js +1 -1
- package/mail.d.ts +1 -1
- package/mail.js +1 -1
- package/middleware.d.ts +1 -1
- package/middleware.js +1 -1
- package/package.json +2 -2
- package/schema.d.ts +1 -1
- package/schema.js +1 -1
- package/url.d.ts +1 -1
- package/url.js +1 -1
- package/dist/auth.d.ts +0 -100
- package/dist/auth.js +0 -891
- package/dist/cache.d.ts +0 -4
- package/dist/cache.js +0 -46
- package/dist/forms.d.ts +0 -46
- package/dist/forms.js +0 -327
- package/dist/lists.js +0 -61
- package/dist/mail.d.ts +0 -12
- package/dist/mail.js +0 -97
- package/dist/schema.js +0 -77
- package/dist/url.js +0 -56
package/dist/url.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/url/index.ts
|
|
20
|
-
var url_exports = {};
|
|
21
|
-
__export(url_exports, {
|
|
22
|
-
getOrigin: () => getOrigin,
|
|
23
|
-
getURL: () => getURL
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(url_exports);
|
|
26
|
-
|
|
27
|
-
// src/url/URLService.ts
|
|
28
|
-
var import_headers = require("next/headers");
|
|
29
|
-
function getOrigin() {
|
|
30
|
-
const origin = (0, import_headers.headers)().get("x-origin");
|
|
31
|
-
if (origin) {
|
|
32
|
-
return origin;
|
|
33
|
-
}
|
|
34
|
-
const proto = (0, import_headers.headers)().get("x-forwarded-proto");
|
|
35
|
-
const host = (0, import_headers.headers)().get("x-forwarded-host");
|
|
36
|
-
if (proto && host) {
|
|
37
|
-
return `${proto}://${host}`;
|
|
38
|
-
}
|
|
39
|
-
throw new Error("No origin could be determined");
|
|
40
|
-
}
|
|
41
|
-
function getURL(pathname) {
|
|
42
|
-
const origin = getOrigin();
|
|
43
|
-
if (!pathname) {
|
|
44
|
-
return origin;
|
|
45
|
-
}
|
|
46
|
-
const isSecure = origin.startsWith("https://");
|
|
47
|
-
const protocol = isSecure ? "https://" : "http://";
|
|
48
|
-
const originWithoutProtocol = origin.replace(/^https?:\/\//u, "");
|
|
49
|
-
const cleanURL = `${originWithoutProtocol}/${pathname}`.replace(/\/+/gu, "/");
|
|
50
|
-
return `${protocol}${cleanURL}`;
|
|
51
|
-
}
|
|
52
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
-
0 && (module.exports = {
|
|
54
|
-
getOrigin,
|
|
55
|
-
getURL
|
|
56
|
-
});
|