@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.
Files changed (84) hide show
  1. package/auth.d.ts +1 -1
  2. package/auth.js +1 -1
  3. package/cache.d.ts +1 -1
  4. package/cache.js +1 -1
  5. package/dist/auth/AuthService.d.ts +14 -0
  6. package/dist/auth/AuthService.js +135 -0
  7. package/dist/auth/ClientService.d.ts +11 -0
  8. package/dist/auth/ClientService.js +47 -0
  9. package/dist/auth/LoginRequest.d.ts +4 -0
  10. package/dist/auth/LoginRequest.js +8 -0
  11. package/dist/auth/MFARequest.d.ts +4 -0
  12. package/dist/auth/MFARequest.js +9 -0
  13. package/dist/auth/MFAService.d.ts +6 -0
  14. package/dist/auth/MFAService.js +105 -0
  15. package/dist/auth/PasswordRequest.d.ts +4 -0
  16. package/dist/auth/PasswordRequest.js +12 -0
  17. package/dist/auth/PasswordResetRequest.d.ts +4 -0
  18. package/dist/auth/PasswordResetRequest.js +13 -0
  19. package/dist/auth/PasswordService.d.ts +8 -0
  20. package/dist/auth/PasswordService.js +54 -0
  21. package/dist/auth/SessionService.d.ts +42 -0
  22. package/dist/auth/SessionService.js +127 -0
  23. package/dist/auth/index.d.ts +6 -0
  24. package/dist/auth/index.js +6 -0
  25. package/dist/auth/interfaces.d.ts +20 -0
  26. package/dist/auth/interfaces.js +1 -0
  27. package/dist/cache/CacheService.d.ts +2 -0
  28. package/dist/cache/CacheService.js +14 -0
  29. package/dist/cache/index.d.ts +1 -0
  30. package/dist/cache/index.js +1 -0
  31. package/dist/database/DatabaseService.d.ts +7 -0
  32. package/dist/database/DatabaseService.js +12 -0
  33. package/dist/{schema.d.ts → database/schema.d.ts} +34 -38
  34. package/dist/database/schema.js +42 -0
  35. package/dist/forms/FormService.d.ts +16 -0
  36. package/dist/forms/FormService.js +78 -0
  37. package/dist/forms/ImageService.d.ts +7 -0
  38. package/dist/forms/ImageService.js +19 -0
  39. package/dist/forms/ValidationError.d.ts +4 -0
  40. package/dist/forms/ValidationError.js +7 -0
  41. package/dist/forms/ValidationService.d.ts +20 -0
  42. package/dist/forms/ValidationService.js +59 -0
  43. package/dist/forms/index.d.ts +3 -0
  44. package/dist/forms/index.js +3 -0
  45. package/dist/forms/lang.d.ts +2 -0
  46. package/dist/forms/lang.js +115 -0
  47. package/dist/{lists.d.ts → lists/ListService.d.ts} +3 -5
  48. package/dist/lists/ListService.js +28 -0
  49. package/dist/lists/index.d.ts +1 -0
  50. package/dist/lists/index.js +1 -0
  51. package/dist/mail/MailService.d.ts +12 -0
  52. package/dist/mail/MailService.js +55 -0
  53. package/dist/mail/index.d.ts +1 -0
  54. package/dist/mail/index.js +1 -0
  55. package/dist/middleware.d.ts +3 -5
  56. package/dist/middleware.js +22 -58
  57. package/dist/{url.d.ts → url/URLService.d.ts} +2 -4
  58. package/dist/url/URLService.js +48 -0
  59. package/dist/url/index.d.ts +1 -0
  60. package/dist/url/index.js +1 -0
  61. package/forms.d.ts +1 -1
  62. package/forms.js +1 -1
  63. package/lists.d.ts +1 -1
  64. package/lists.js +1 -1
  65. package/mail.d.ts +1 -1
  66. package/mail.js +1 -1
  67. package/middleware.d.ts +1 -1
  68. package/middleware.js +1 -1
  69. package/package.json +2 -2
  70. package/schema.d.ts +1 -1
  71. package/schema.js +1 -1
  72. package/url.d.ts +1 -1
  73. package/url.js +1 -1
  74. package/dist/auth.d.ts +0 -100
  75. package/dist/auth.js +0 -891
  76. package/dist/cache.d.ts +0 -4
  77. package/dist/cache.js +0 -46
  78. package/dist/forms.d.ts +0 -46
  79. package/dist/forms.js +0 -327
  80. package/dist/lists.js +0 -61
  81. package/dist/mail.d.ts +0 -12
  82. package/dist/mail.js +0 -97
  83. package/dist/schema.js +0 -77
  84. 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
- });