@xrystal/core 3.3.7 → 3.4.3

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 (81) hide show
  1. package/bin/main-cli.js +71 -152
  2. package/package.json +11 -56
  3. package/source/project/index.d.ts +5 -6
  4. package/source/project/index.js +46 -77
  5. package/source/utils/constants/index.js +1 -1
  6. package/source/utils/models/classes/class.tmp-file-loader.d.ts +3 -6
  7. package/source/utils/models/classes/class.tmp-file-loader.js +23 -23
  8. package/x/dist/index.d.ts +2 -0
  9. package/x/dist/index.js +8 -0
  10. package/x/dist/loader/configs/index.d.ts +13 -0
  11. package/x/dist/loader/configs/index.js +17 -0
  12. package/x/dist/loader/events/index.d.ts +6 -0
  13. package/x/dist/loader/events/index.js +25 -0
  14. package/x/dist/loader/index.d.ts +6 -0
  15. package/x/dist/loader/index.js +6 -0
  16. package/x/dist/loader/localizations/index.d.ts +14 -0
  17. package/x/dist/loader/localizations/index.js +32 -0
  18. package/x/dist/loader/logger/index.d.ts +23 -0
  19. package/x/dist/loader/logger/index.js +126 -0
  20. package/x/dist/loader/system/index.d.ts +8 -0
  21. package/x/dist/loader/system/index.js +14 -0
  22. package/x/dist/project/index.d.ts +6 -0
  23. package/x/dist/project/index.js +63 -0
  24. package/x/dist/utils/constants/index.d.ts +8 -0
  25. package/x/dist/utils/constants/index.js +10 -0
  26. package/x/dist/utils/helpers/date/index.d.ts +16 -0
  27. package/x/dist/utils/helpers/date/index.js +48 -0
  28. package/x/dist/utils/helpers/filters/index.d.ts +17 -0
  29. package/x/dist/utils/helpers/filters/index.js +44 -0
  30. package/x/dist/utils/helpers/hash/crypto.d.ts +3 -0
  31. package/x/dist/utils/helpers/hash/crypto.js +22 -0
  32. package/x/dist/utils/helpers/id/index.d.ts +13 -0
  33. package/x/dist/utils/helpers/id/index.js +24 -0
  34. package/x/dist/utils/helpers/index.d.ts +16 -0
  35. package/x/dist/utils/helpers/index.js +16 -0
  36. package/x/dist/utils/helpers/ip/index.d.ts +1 -0
  37. package/x/dist/utils/helpers/ip/index.js +3 -0
  38. package/x/dist/utils/helpers/is/index.d.ts +11 -0
  39. package/x/dist/utils/helpers/is/index.js +35 -0
  40. package/x/dist/utils/helpers/locales/index.d.ts +52 -0
  41. package/x/dist/utils/helpers/locales/index.js +161 -0
  42. package/x/dist/utils/helpers/locales copy/index.d.ts +52 -0
  43. package/x/dist/utils/helpers/locales copy/index.js +161 -0
  44. package/x/dist/utils/helpers/math/index.d.ts +2 -0
  45. package/x/dist/utils/helpers/math/index.js +14 -0
  46. package/x/dist/utils/helpers/objects/index.d.ts +1 -0
  47. package/x/dist/utils/helpers/objects/index.js +55 -0
  48. package/x/dist/utils/helpers/path/index.d.ts +2 -0
  49. package/x/dist/utils/helpers/path/index.js +4 -0
  50. package/x/dist/utils/helpers/regex/checkSpecialRegexControl.d.ts +1 -0
  51. package/x/dist/utils/helpers/regex/checkSpecialRegexControl.js +3 -0
  52. package/x/dist/utils/helpers/string/index.d.ts +1 -0
  53. package/x/dist/utils/helpers/string/index.js +9 -0
  54. package/x/dist/utils/helpers/timer/index.d.ts +3 -0
  55. package/x/dist/utils/helpers/timer/index.js +5 -0
  56. package/x/dist/utils/helpers/tmp/index.d.ts +8 -0
  57. package/x/dist/utils/helpers/tmp/index.js +109 -0
  58. package/x/dist/utils/helpers/validates/index.d.ts +5 -0
  59. package/x/dist/utils/helpers/validates/index.js +20 -0
  60. package/x/dist/utils/index.d.ts +3 -0
  61. package/x/dist/utils/index.js +3 -0
  62. package/x/dist/utils/models/classes/class.controller.d.ts +121 -0
  63. package/x/dist/utils/models/classes/class.controller.js +421 -0
  64. package/x/dist/utils/models/classes/class.response.d.ts +17 -0
  65. package/x/dist/utils/models/classes/class.response.js +37 -0
  66. package/x/dist/utils/models/classes/class.services.d.ts +129 -0
  67. package/x/dist/utils/models/classes/class.services.js +344 -0
  68. package/x/dist/utils/models/classes/class.tmp-file-loader.d.ts +8 -0
  69. package/x/dist/utils/models/classes/class.tmp-file-loader.js +38 -0
  70. package/x/dist/utils/models/classes/class.x.d.ts +12 -0
  71. package/x/dist/utils/models/classes/class.x.js +16 -0
  72. package/x/dist/utils/models/enums/index.d.ts +117 -0
  73. package/x/dist/utils/models/enums/index.js +133 -0
  74. package/x/dist/utils/models/index.d.ts +8 -0
  75. package/x/dist/utils/models/index.js +8 -0
  76. package/x/dist/utils/models/types/index.d.ts +3 -0
  77. package/x/dist/utils/models/types/index.js +2 -0
  78. package/x/docker/Dockerfile +24 -0
  79. package/x/logs/critical/2025-11-30_critical.log +0 -0
  80. package/x/logs/error/2025-11-30_error.log +0 -0
  81. package/x/tmp.yml +0 -1
@@ -0,0 +1,117 @@
1
+ export declare enum NodeEnvEnum {
2
+ DEV = "dev",
3
+ TEST = "test",
4
+ PROD = "prod"
5
+ }
6
+ export declare enum ProtocolEnum {
7
+ HTTP = "http",
8
+ HTTPS = "https",
9
+ WEBSOCKET = "ws",
10
+ SOCKETIO = "ws",
11
+ NONE = "none"
12
+ }
13
+ export declare enum PolarityTypeEnum {
14
+ NOTR = 0,
15
+ POSITIVE = 1,
16
+ NEGATIVE = -1
17
+ }
18
+ export declare enum LoggerLayerEnum {
19
+ CRITICAL = 0,
20
+ ERROR = 1,
21
+ INFO = 2,
22
+ HTTP = 4,
23
+ DEBUG = 5
24
+ }
25
+ export declare enum CountryCodeEnum {
26
+ EN = "en",
27
+ TR = "tr"
28
+ }
29
+ export declare enum CurrencyCodeEnum {
30
+ USD = "usd",
31
+ EUR = "eur",
32
+ TRY = "try"
33
+ }
34
+ export declare enum HttpMethodEnum {
35
+ POST = "post",
36
+ GET = "get",
37
+ PUT = "put",
38
+ DELETE = "delete"
39
+ }
40
+ export declare enum ContentTypeEnum {
41
+ applicationJson = "application/json",
42
+ applicationXWwwFormUrlencoded = "application/x-www-form-urlencoded"
43
+ }
44
+ export declare enum DevicePlatformEnum {
45
+ WEB = "web",
46
+ NATIVE = "native",
47
+ OTHER = "other"
48
+ }
49
+ export declare enum DeviceOSEnum {
50
+ ANDROID = "android",
51
+ IOS = "ios",
52
+ WINDOWS = "windows",
53
+ MACOS = "macos",
54
+ MACOSX = "macosx",
55
+ OTHER = "other"
56
+ }
57
+ export declare enum PriorityEnum {
58
+ HIGH = 0,
59
+ MEDIUM = 1,
60
+ LOW = 2
61
+ }
62
+ export declare enum PrivacyEnum {
63
+ PRIVATE = 0,
64
+ PUBLIC = 1,
65
+ ONLY_FRIENDS = 2
66
+ }
67
+ export declare enum TimezoneEnum {
68
+ UTC = "UTC",
69
+ EtcUTC = "Etc/UTC",
70
+ EtcGMT = "Etc/GMT"
71
+ }
72
+ export declare enum TokensEnum {
73
+ CSRF_TOKEN = "csrf_token",
74
+ ACCESS_TOKEN = "access_token",
75
+ REFRESH_TOKEN = "refresh_token",
76
+ REFERENCE_TOKEN = "reference_token",
77
+ PERSONAL_ACCESS_TOKEN = "personal_access_token"
78
+ }
79
+ export declare enum EndpointResourceEnum {
80
+ EXAMPLE = "example",
81
+ FULL = "full",
82
+ SYSTEM = "system",
83
+ CLIENTS = "clients",
84
+ AUTH = "auth",
85
+ ACCOUNTS = "accounts",
86
+ USERS = "users",
87
+ TRANSACTIONS = "transactions",
88
+ NOTIFICATIONS = "notifications",
89
+ ADDRESSES = "addresses",
90
+ PAYMENTS = "payments",
91
+ COMMISSIONS_AND_TAXES = "commissions-and-taxes",
92
+ SUPPORTS = "supports",
93
+ INVOICES = "invoices",
94
+ FILES = "files",
95
+ TOKENS = "tokens",
96
+ WEBHOOKS = "webhooks",
97
+ OTHERS = "others"
98
+ }
99
+ export declare enum SupportFileExtensionsEnum {
100
+ 'HTML' = "html",
101
+ 'EJS' = "ejs",
102
+ 'HBS' = "hbs",
103
+ "TS" = "",
104
+ "JS" = ".js",
105
+ "TSX" = "x",
106
+ "JSX" = ".jsx",
107
+ "TTF" = ".ttf",
108
+ "EOT" = ".eot",
109
+ "OTF" = ".otf",
110
+ "SVG" = ".svg",
111
+ "PNG" = ".png",
112
+ "WOFF" = ".woff",
113
+ "WOFF2" = ".woff2",
114
+ "CSS" = ".css",
115
+ "SCSS" = ".scss",
116
+ "SASS" = ".sass"
117
+ }
@@ -0,0 +1,133 @@
1
+ export var NodeEnvEnum;
2
+ (function (NodeEnvEnum) {
3
+ NodeEnvEnum["DEV"] = "dev";
4
+ NodeEnvEnum["TEST"] = "test";
5
+ NodeEnvEnum["PROD"] = "prod";
6
+ })(NodeEnvEnum || (NodeEnvEnum = {}));
7
+ export var ProtocolEnum;
8
+ (function (ProtocolEnum) {
9
+ ProtocolEnum["HTTP"] = "http";
10
+ ProtocolEnum["HTTPS"] = "https";
11
+ ProtocolEnum["WEBSOCKET"] = "ws";
12
+ ProtocolEnum["SOCKETIO"] = "ws";
13
+ ProtocolEnum["NONE"] = "none";
14
+ })(ProtocolEnum || (ProtocolEnum = {}));
15
+ export var PolarityTypeEnum;
16
+ (function (PolarityTypeEnum) {
17
+ PolarityTypeEnum[PolarityTypeEnum["NOTR"] = 0] = "NOTR";
18
+ PolarityTypeEnum[PolarityTypeEnum["POSITIVE"] = 1] = "POSITIVE";
19
+ PolarityTypeEnum[PolarityTypeEnum["NEGATIVE"] = -1] = "NEGATIVE";
20
+ })(PolarityTypeEnum || (PolarityTypeEnum = {}));
21
+ export var LoggerLayerEnum;
22
+ (function (LoggerLayerEnum) {
23
+ LoggerLayerEnum[LoggerLayerEnum["CRITICAL"] = 0] = "CRITICAL";
24
+ LoggerLayerEnum[LoggerLayerEnum["ERROR"] = 1] = "ERROR";
25
+ LoggerLayerEnum[LoggerLayerEnum["INFO"] = 2] = "INFO";
26
+ LoggerLayerEnum[LoggerLayerEnum["HTTP"] = 4] = "HTTP";
27
+ LoggerLayerEnum[LoggerLayerEnum["DEBUG"] = 5] = "DEBUG";
28
+ })(LoggerLayerEnum || (LoggerLayerEnum = {}));
29
+ export var CountryCodeEnum;
30
+ (function (CountryCodeEnum) {
31
+ CountryCodeEnum["EN"] = "en";
32
+ CountryCodeEnum["TR"] = "tr";
33
+ })(CountryCodeEnum || (CountryCodeEnum = {}));
34
+ export var CurrencyCodeEnum;
35
+ (function (CurrencyCodeEnum) {
36
+ CurrencyCodeEnum["USD"] = "usd";
37
+ CurrencyCodeEnum["EUR"] = "eur";
38
+ CurrencyCodeEnum["TRY"] = "try";
39
+ })(CurrencyCodeEnum || (CurrencyCodeEnum = {}));
40
+ export var HttpMethodEnum;
41
+ (function (HttpMethodEnum) {
42
+ HttpMethodEnum["POST"] = "post";
43
+ HttpMethodEnum["GET"] = "get";
44
+ HttpMethodEnum["PUT"] = "put";
45
+ HttpMethodEnum["DELETE"] = "delete";
46
+ })(HttpMethodEnum || (HttpMethodEnum = {}));
47
+ export var ContentTypeEnum;
48
+ (function (ContentTypeEnum) {
49
+ ContentTypeEnum["applicationJson"] = "application/json";
50
+ ContentTypeEnum["applicationXWwwFormUrlencoded"] = "application/x-www-form-urlencoded";
51
+ })(ContentTypeEnum || (ContentTypeEnum = {}));
52
+ export var DevicePlatformEnum;
53
+ (function (DevicePlatformEnum) {
54
+ DevicePlatformEnum["WEB"] = "web";
55
+ DevicePlatformEnum["NATIVE"] = "native";
56
+ DevicePlatformEnum["OTHER"] = "other";
57
+ })(DevicePlatformEnum || (DevicePlatformEnum = {}));
58
+ export var DeviceOSEnum;
59
+ (function (DeviceOSEnum) {
60
+ DeviceOSEnum["ANDROID"] = "android";
61
+ DeviceOSEnum["IOS"] = "ios";
62
+ DeviceOSEnum["WINDOWS"] = "windows";
63
+ DeviceOSEnum["MACOS"] = "macos";
64
+ DeviceOSEnum["MACOSX"] = "macosx";
65
+ DeviceOSEnum["OTHER"] = "other";
66
+ })(DeviceOSEnum || (DeviceOSEnum = {}));
67
+ export var PriorityEnum;
68
+ (function (PriorityEnum) {
69
+ PriorityEnum[PriorityEnum["HIGH"] = 0] = "HIGH";
70
+ PriorityEnum[PriorityEnum["MEDIUM"] = 1] = "MEDIUM";
71
+ PriorityEnum[PriorityEnum["LOW"] = 2] = "LOW";
72
+ })(PriorityEnum || (PriorityEnum = {}));
73
+ export var PrivacyEnum;
74
+ (function (PrivacyEnum) {
75
+ PrivacyEnum[PrivacyEnum["PRIVATE"] = 0] = "PRIVATE";
76
+ PrivacyEnum[PrivacyEnum["PUBLIC"] = 1] = "PUBLIC";
77
+ PrivacyEnum[PrivacyEnum["ONLY_FRIENDS"] = 2] = "ONLY_FRIENDS";
78
+ })(PrivacyEnum || (PrivacyEnum = {}));
79
+ export var TimezoneEnum;
80
+ (function (TimezoneEnum) {
81
+ TimezoneEnum["UTC"] = "UTC";
82
+ TimezoneEnum["EtcUTC"] = "Etc/UTC";
83
+ TimezoneEnum["EtcGMT"] = "Etc/GMT";
84
+ })(TimezoneEnum || (TimezoneEnum = {}));
85
+ export var TokensEnum;
86
+ (function (TokensEnum) {
87
+ TokensEnum["CSRF_TOKEN"] = "csrf_token";
88
+ TokensEnum["ACCESS_TOKEN"] = "access_token";
89
+ TokensEnum["REFRESH_TOKEN"] = "refresh_token";
90
+ TokensEnum["REFERENCE_TOKEN"] = "reference_token";
91
+ TokensEnum["PERSONAL_ACCESS_TOKEN"] = "personal_access_token";
92
+ })(TokensEnum || (TokensEnum = {}));
93
+ export var EndpointResourceEnum;
94
+ (function (EndpointResourceEnum) {
95
+ EndpointResourceEnum["EXAMPLE"] = "example";
96
+ EndpointResourceEnum["FULL"] = "full";
97
+ EndpointResourceEnum["SYSTEM"] = "system";
98
+ EndpointResourceEnum["CLIENTS"] = "clients";
99
+ EndpointResourceEnum["AUTH"] = "auth";
100
+ EndpointResourceEnum["ACCOUNTS"] = "accounts";
101
+ EndpointResourceEnum["USERS"] = "users";
102
+ EndpointResourceEnum["TRANSACTIONS"] = "transactions";
103
+ EndpointResourceEnum["NOTIFICATIONS"] = "notifications";
104
+ EndpointResourceEnum["ADDRESSES"] = "addresses";
105
+ EndpointResourceEnum["PAYMENTS"] = "payments";
106
+ EndpointResourceEnum["COMMISSIONS_AND_TAXES"] = "commissions-and-taxes";
107
+ EndpointResourceEnum["SUPPORTS"] = "supports";
108
+ EndpointResourceEnum["INVOICES"] = "invoices";
109
+ EndpointResourceEnum["FILES"] = "files";
110
+ EndpointResourceEnum["TOKENS"] = "tokens";
111
+ EndpointResourceEnum["WEBHOOKS"] = "webhooks";
112
+ EndpointResourceEnum["OTHERS"] = "others";
113
+ })(EndpointResourceEnum || (EndpointResourceEnum = {}));
114
+ export var SupportFileExtensionsEnum;
115
+ (function (SupportFileExtensionsEnum) {
116
+ SupportFileExtensionsEnum["HTML"] = "html";
117
+ SupportFileExtensionsEnum["EJS"] = "ejs";
118
+ SupportFileExtensionsEnum["HBS"] = "hbs";
119
+ SupportFileExtensionsEnum["TS"] = "";
120
+ SupportFileExtensionsEnum["JS"] = ".js";
121
+ SupportFileExtensionsEnum["TSX"] = "x";
122
+ SupportFileExtensionsEnum["JSX"] = ".jsx";
123
+ SupportFileExtensionsEnum["TTF"] = ".ttf";
124
+ SupportFileExtensionsEnum["EOT"] = ".eot";
125
+ SupportFileExtensionsEnum["OTF"] = ".otf";
126
+ SupportFileExtensionsEnum["SVG"] = ".svg";
127
+ SupportFileExtensionsEnum["PNG"] = ".png";
128
+ SupportFileExtensionsEnum["WOFF"] = ".woff";
129
+ SupportFileExtensionsEnum["WOFF2"] = ".woff2";
130
+ SupportFileExtensionsEnum["CSS"] = ".css";
131
+ SupportFileExtensionsEnum["SCSS"] = ".scss";
132
+ SupportFileExtensionsEnum["SASS"] = ".sass";
133
+ })(SupportFileExtensionsEnum || (SupportFileExtensionsEnum = {}));
@@ -0,0 +1,8 @@
1
+ import x, { X } from './classes/class.x';
2
+ export * from './classes/class.tmp-file-loader';
3
+ export * from './classes/class.controller';
4
+ export * from './classes/class.response';
5
+ export * from './classes/class.services';
6
+ export * from './types';
7
+ export * from './enums';
8
+ export { x, X };
@@ -0,0 +1,8 @@
1
+ import x, { X } from './classes/class.x';
2
+ export * from './classes/class.tmp-file-loader';
3
+ export * from './classes/class.controller';
4
+ export * from './classes/class.response';
5
+ export * from './classes/class.services';
6
+ export * from './types';
7
+ export * from './enums';
8
+ export { x, X };
@@ -0,0 +1,3 @@
1
+ export interface ICustomError extends Error {
2
+ status?: number;
3
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //end
@@ -0,0 +1,24 @@
1
+ FROM oven/bun:1.1-alpine AS builder
2
+
3
+ WORKDIR /app
4
+
5
+ COPY package.json bun.lockb* ./
6
+ RUN bun install --frozen-lockfile
7
+
8
+ COPY . .
9
+
10
+ RUN bun run build:prod
11
+
12
+ FROM oven/bun:1.1-alpine
13
+
14
+ ENV NODE_ENV=production
15
+
16
+ WORKDIR /lib/xrystal-core
17
+
18
+ COPY --from=builder /app/source ./source
19
+ COPY --from=builder /app/bin ./bin
20
+ COPY --from=builder /app/x ./x
21
+ COPY --from=builder /app/package.json ./package.json
22
+ COPY --from=builder /app/bun.lockb* ./
23
+
24
+ RUN bun install --production
File without changes
File without changes
package/x/tmp.yml CHANGED
@@ -8,7 +8,6 @@ configs:
8
8
  loaders:
9
9
  configs:
10
10
  envLoadPath: environments
11
- #globalEnvFileName: glabalExample # Default: global
12
11
 
13
12
  loggers:
14
13
  loadPath: logs