@xrystal/core 3.51.5 → 3.52.0

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 (121) hide show
  1. package/README.md +35 -1
  2. package/package.json +1 -1
  3. package/x/bin/commands/create.mjs +44 -0
  4. package/x/bin/commands/projects.mjs +53 -0
  5. package/x/bin/commands/sync.mjs +49 -1
  6. package/x/bin/commands/tmp.mjs +1 -1
  7. package/x/bin/helpers/.generated/.generated-from +2 -0
  8. package/x/bin/helpers/.generated/seed-from-tmp.mjs +25 -31
  9. package/x/bin/helpers/.generated/tmp-schema.mjs +156 -96
  10. package/x/bin/helpers/.generated/workspace.mjs +402 -0
  11. package/x/bin/helpers/.generated/xrystal-home-registry.mjs +310 -0
  12. package/x/bin/helpers/build-config.mjs +3 -2
  13. package/x/bin/helpers/cli-help.mjs +3 -1
  14. package/x/bin/helpers/project-artifacts.mjs +9 -0
  15. package/x/bin/helpers/tmp-config.mjs +13 -12
  16. package/x/bin/helpers/tmp-layout.mjs +28 -52
  17. package/x/bin/helpers/tmp-schema.mjs +9 -3
  18. package/x/bin/helpers/workspace-resolve.mjs +11 -0
  19. package/x/bin/helpers/workspace-scaffold.mjs +23 -0
  20. package/x/bin/helpers/xrystal-registry.mjs +13 -0
  21. package/x/bin/main-cli.js +2 -0
  22. package/x/dist/index.js +5 -1
  23. package/x/dist/loader/clients/index.js +22 -1
  24. package/x/dist/loader/configs/index.js +97 -1
  25. package/x/dist/loader/controller/index.js +267 -1
  26. package/x/dist/loader/dto/index.js +92 -1
  27. package/x/dist/loader/events/index.js +39 -1
  28. package/x/dist/loader/index.js +13 -1
  29. package/x/dist/loader/kafka/index.js +142 -1
  30. package/x/dist/loader/kafka/resolve-ssl.js +23 -1
  31. package/x/dist/loader/localizations/index.js +46 -1
  32. package/x/dist/loader/logger/index.js +229 -2
  33. package/x/dist/loader/mongo/index.js +52 -1
  34. package/x/dist/loader/mongo/resolve-connect.js +16 -1
  35. package/x/dist/loader/redis/index.js +57 -1
  36. package/x/dist/loader/redis/resolve-socket.js +31 -1
  37. package/x/dist/loader/registry/index.js +1 -1
  38. package/x/dist/loader/service/index.js +7 -1
  39. package/x/dist/loader/system/index.js +26 -1
  40. package/x/dist/project/index.js +51 -1
  41. package/x/dist/utils/constants/defaults.json +3 -1
  42. package/x/dist/utils/constants/index.d.ts +1 -0
  43. package/x/dist/utils/constants/index.js +42 -1
  44. package/x/dist/utils/constants/package-root.js +6 -1
  45. package/x/dist/utils/helpers/configs/index.js +1 -1
  46. package/x/dist/utils/helpers/context/controller-store.js +12 -1
  47. package/x/dist/utils/helpers/context/index.js +24 -1
  48. package/x/dist/utils/helpers/core/handlebars-resolve.js +15 -1
  49. package/x/dist/utils/helpers/core/index.js +46 -1
  50. package/x/dist/utils/helpers/core/paths.js +78 -1
  51. package/x/dist/utils/helpers/core/tmp-layout.d.ts +4 -4
  52. package/x/dist/utils/helpers/core/tmp-layout.js +229 -1
  53. package/x/dist/utils/helpers/date/index.js +48 -1
  54. package/x/dist/utils/helpers/dispatch/index.js +53 -1
  55. package/x/dist/utils/helpers/dto/index.js +10 -1
  56. package/x/dist/utils/helpers/filters/index.js +44 -1
  57. package/x/dist/utils/helpers/framework/index.js +18 -1
  58. package/x/dist/utils/helpers/handlers/adapters.js +41 -1
  59. package/x/dist/utils/helpers/handlers/execute.js +82 -1
  60. package/x/dist/utils/helpers/handlers/index.js +31 -1
  61. package/x/dist/utils/helpers/hash/crypto.js +22 -1
  62. package/x/dist/utils/helpers/id/index.js +24 -1
  63. package/x/dist/utils/helpers/index.d.ts +1 -0
  64. package/x/dist/utils/helpers/index.js +28 -1
  65. package/x/dist/utils/helpers/ip/index.js +21 -1
  66. package/x/dist/utils/helpers/is/index.js +35 -1
  67. package/x/dist/utils/helpers/kafka-loader-options/index.js +14 -1
  68. package/x/dist/utils/helpers/locales/index.js +82 -1
  69. package/x/dist/utils/helpers/logger-layer/index.js +33 -1
  70. package/x/dist/utils/helpers/math/index.js +14 -1
  71. package/x/dist/utils/helpers/middleware/index.js +36 -1
  72. package/x/dist/utils/helpers/node-env/index.js +20 -1
  73. package/x/dist/utils/helpers/objects/index.js +55 -1
  74. package/x/dist/utils/helpers/path/index.js +5 -1
  75. package/x/dist/utils/helpers/path/resolve-alias-path.d.ts +1 -1
  76. package/x/dist/utils/helpers/path/resolve-alias-path.js +62 -1
  77. package/x/dist/utils/helpers/protocol/index.d.ts +1 -1
  78. package/x/dist/utils/helpers/protocol/index.js +100 -1
  79. package/x/dist/utils/helpers/protocol/options.js +13 -1
  80. package/x/dist/utils/helpers/regex/checkSpecialRegexControl.js +3 -1
  81. package/x/dist/utils/helpers/registry/index.d.ts +6 -0
  82. package/x/dist/utils/helpers/registry/index.js +103 -1
  83. package/x/dist/utils/helpers/runtime/dto-access.js +5 -1
  84. package/x/dist/utils/helpers/runtime/dto-types.js +1 -1
  85. package/x/dist/utils/helpers/runtime/index.js +2 -1
  86. package/x/dist/utils/helpers/runtime/shutdown.js +36 -1
  87. package/x/dist/utils/helpers/state/index.js +185 -1
  88. package/x/dist/utils/helpers/state/props-from-tmp.js +46 -1
  89. package/x/dist/utils/helpers/state/request-key-guard.js +43 -1
  90. package/x/dist/utils/helpers/state/scopes.js +69 -1
  91. package/x/dist/utils/helpers/string/index.js +9 -1
  92. package/x/dist/utils/helpers/timer/index.js +5 -1
  93. package/x/dist/utils/helpers/tmp/index.d.ts +2 -2
  94. package/x/dist/utils/helpers/tmp/index.js +8 -1
  95. package/x/dist/utils/helpers/tmp/loader-tmp-sync.js +14 -1
  96. package/x/dist/utils/helpers/tmp/path-normalize.js +27 -1
  97. package/x/dist/utils/helpers/tmp/runtime-tmp.js +42 -1
  98. package/x/dist/utils/helpers/tmp/seed-from-tmp.d.ts +2 -2
  99. package/x/dist/utils/helpers/tmp/seed-from-tmp.js +62 -1
  100. package/x/dist/utils/helpers/tmp/tmp-interpolate.js +22 -1
  101. package/x/dist/utils/helpers/tmp/tmp-loader.js +56 -1
  102. package/x/dist/utils/helpers/tmp/tmp-schema.d.ts +35 -23
  103. package/x/dist/utils/helpers/tmp/tmp-schema.js +211 -1
  104. package/x/dist/utils/helpers/tmp/tmp-watch.js +23 -1
  105. package/x/dist/utils/helpers/tmp/toolchain-heal.js +157 -2
  106. package/x/dist/utils/helpers/validates/index.js +20 -1
  107. package/x/dist/utils/helpers/workspace/index.d.ts +42 -0
  108. package/x/dist/utils/helpers/workspace/index.js +222 -0
  109. package/x/dist/utils/helpers/xrystal-home/registry.d.ts +32 -0
  110. package/x/dist/utils/helpers/xrystal-home/registry.js +92 -0
  111. package/x/dist/utils/index.js +3 -1
  112. package/x/dist/utils/models/classes/class.clients.js +142 -1
  113. package/x/dist/utils/models/classes/class.interfaces.js +10 -1
  114. package/x/dist/utils/models/classes/class.service-locator.js +16 -1
  115. package/x/dist/utils/models/classes/class.tmp-file-loader.js +61 -1
  116. package/x/dist/utils/models/classes/class.x.js +181 -1
  117. package/x/dist/utils/models/enums/index.d.ts +9 -1
  118. package/x/dist/utils/models/enums/index.js +169 -1
  119. package/x/dist/utils/models/index.js +9 -1
  120. package/x/dist/utils/models/types/index.js +2 -1
  121. package/x/tmp.yml +7 -50
@@ -1 +1,181 @@
1
- var __filename="/Volumes/MAC/Desktop/software/xrystal/-xrystal-core/x/dist/utils/models/classes/class.x.js";import{createContainer as V,asClass as K,asValue as j,InjectionMode as N,listModules as X,Lifetime as Z}from"awilix";import R from"node:path";import{pathToFileURL as x}from"node:url";import C from"../../../utils/constants/defaults.json" with { type: 'json' };export const xSymbol=Symbol.for(`${C.packageName}/di-container`);class T{checkRegistration(q,A){return!!q.registrations[A]}}class U extends T{container;initializedNames=new Set;loadedPaths=new Set;registeredClasses=new Set;isInitializing=!1;constructor(){super();this.container=V({injectionMode:N.PROXY,strict:!0})}getName(q){if(typeof q==="string")return q.charAt(0).toLowerCase()+q.slice(1);if(typeof q==="function"&&q.name)return q.name.charAt(0).toLowerCase()+q.name.slice(1);return""}async load(q,A={}){const{verbose:H=!1,exclude:$=[],lifetime:E=Z.SINGLETON}=A,B=process.cwd(),G=(Array.isArray(q)?q:[q]).map((Q)=>{return(R.isAbsolute(Q)?Q:R.resolve(B,Q)).replace(/\\/g,"/").toLowerCase()});let O=[];try{O=X(G)}catch(Q){return this}for(const Q of O){const Y=Q.path.replace(/\\/g,"/").toLowerCase();if(this.loadedPaths.has(Y))continue;if(Y===__filename.replace(/\\/g,"/").toLowerCase()||Y.endsWith(".d.ts"))continue;try{const F=await import(x(Q.path).href);let J=F.default;if(!J)J=Object.values(F).find((W)=>typeof W==="function"&&!!W.prototype&&!!W.name);if(typeof J==="function"&&!!J.prototype&&!!J.name){if(this.registeredClasses.has(J))continue;const W=this.getName(J);if(W&&!this.checkRegistration(this.container,W)){this.container.register({[W]:K(J).setLifetime(E)});this.loadedPaths.add(Y);this.registeredClasses.add(J)}}}catch(w){if(H)console.error("[DI] Load Error:",w.message)}}return this}register(q,A=Z.SINGLETON){const H=this.getName(q);if(!H||this.registeredClasses.has(q))return this;if(this.checkRegistration(this.container,H))return this;this.container.register({[H]:K(q).setLifetime(A)});this.registeredClasses.add(q);return this}registerInstance(q,A){if(!q)return this;const H=this.getName(q);this.container.register({[H]:j(A)});return this}async initialize(q,A=!1){if(this.isInitializing)return this;this.isInitializing=!0;try{const H=q?Array.isArray(q)?q:[q]:[];for(const E of H){const B=this.getName(E.service);if(!B||this.initializedNames.has(B))continue;const G=this.container.registrations[B];if(!G||G.lifetime!==Z.SINGLETON)continue;try{const O=this.container.cradle[B];if(O&&typeof O.onInit==="function")await O.onInit(E.props||{});this.initializedNames.add(B)}catch(O){if(A)console.error(`[DI] Priority onInit Failed (${B}):`,O.message)}}const $=Object.keys(this.container.registrations);for(const E of $){if(this.initializedNames.has(E))continue;if(this.container.registrations[E].lifetime!==Z.SINGLETON)continue;try{const G=this.container.cradle[E];if(G&&typeof G.onInit==="function")await G.onInit({});this.initializedNames.add(E)}catch(G){if(A)console.error(`[DI] Auto onInit Failed (${E}):`,G.message)}}for(const E of this.initializedNames)try{const B=this.container.cradle[E];if(B&&typeof B.onAfterInit==="function")await B.onAfterInit()}catch(B){if(A)console.error(`[DI] onAfterInit Failed (${E}):`,B.message)}}finally{this.isInitializing=!1}return this}get(q){const A=this.getName(q);return this.container.resolve(A)}async shutdown(){for(const q of this.initializedNames)try{const A=this.container.cradle[q];if(A&&typeof A.onDispose==="function")await A.onDispose()}catch(A){console.error(`[DI] onDispose Failed (${q})`)}await this.container.dispose()}get cradle(){return this.container.cradle}}const _=globalThis;if(!_[xSymbol])_[xSymbol]=new U;export default _[xSymbol];
1
+ import { createContainer, asClass, asValue, InjectionMode, listModules, Lifetime } from 'awilix';
2
+ import path from 'node:path';
3
+ import { pathToFileURL } from 'node:url';
4
+ import defaults from '../../../utils/constants/defaults.json' with { type: 'json' };
5
+ export const xSymbol = Symbol.for(`${defaults.packageName}/di-container`);
6
+ class X {
7
+ checkRegistration(container, name) {
8
+ return !!container.registrations[name];
9
+ }
10
+ }
11
+ class DIM extends X {
12
+ container;
13
+ initializedNames = new Set();
14
+ loadedPaths = new Set();
15
+ registeredClasses = new Set();
16
+ isInitializing = false;
17
+ constructor() {
18
+ super();
19
+ this.container = createContainer({
20
+ injectionMode: InjectionMode.PROXY,
21
+ strict: true
22
+ });
23
+ }
24
+ getName(target) {
25
+ if (typeof target === 'string')
26
+ return target.charAt(0).toLowerCase() + target.slice(1);
27
+ if (typeof target === 'function' && target.name)
28
+ return target.name.charAt(0).toLowerCase() + target.name.slice(1);
29
+ return '';
30
+ }
31
+ async load(patterns, options = {}) {
32
+ const { verbose = false, exclude = [], lifetime = Lifetime.SINGLETON } = options;
33
+ const cwd = process.cwd();
34
+ const resolvedPatterns = (Array.isArray(patterns) ? patterns : [patterns]).map(p => {
35
+ const resolved = path.isAbsolute(p) ? p : path.resolve(cwd, p);
36
+ return resolved.replace(/\\/g, '/').toLowerCase();
37
+ });
38
+ let modules = [];
39
+ try {
40
+ modules = listModules(resolvedPatterns);
41
+ }
42
+ catch (err) {
43
+ return this;
44
+ }
45
+ for (const m of modules) {
46
+ const normalizedMPath = m.path.replace(/\\/g, '/').toLowerCase();
47
+ if (this.loadedPaths.has(normalizedMPath))
48
+ continue;
49
+ if (normalizedMPath === __filename.replace(/\\/g, '/').toLowerCase() || normalizedMPath.endsWith('.d.ts'))
50
+ continue;
51
+ try {
52
+ const fileUrl = pathToFileURL(m.path).href;
53
+ const loaded = await import(fileUrl);
54
+ let dependency = loaded.default;
55
+ if (!dependency) {
56
+ dependency = Object.values(loaded).find(val => typeof val === 'function' && !!val.prototype && !!val.name);
57
+ }
58
+ if (typeof dependency === 'function' && !!dependency.prototype && !!dependency.name) {
59
+ if (this.registeredClasses.has(dependency))
60
+ continue;
61
+ const name = this.getName(dependency);
62
+ if (name && !this.checkRegistration(this.container, name)) {
63
+ this.container.register({
64
+ [name]: asClass(dependency).setLifetime(lifetime)
65
+ });
66
+ this.loadedPaths.add(normalizedMPath);
67
+ this.registeredClasses.add(dependency);
68
+ }
69
+ }
70
+ }
71
+ catch (err) {
72
+ if (verbose)
73
+ console.error(`[DI] Load Error:`, err.message);
74
+ }
75
+ }
76
+ return this;
77
+ }
78
+ register(Dependency, lifetime = Lifetime.SINGLETON) {
79
+ const name = this.getName(Dependency);
80
+ if (!name || this.registeredClasses.has(Dependency))
81
+ return this;
82
+ if (this.checkRegistration(this.container, name))
83
+ return this;
84
+ this.container.register({ [name]: asClass(Dependency).setLifetime(lifetime) });
85
+ this.registeredClasses.add(Dependency);
86
+ return this;
87
+ }
88
+ registerInstance(name, instance) {
89
+ if (!name)
90
+ return this;
91
+ const formattedName = this.getName(name);
92
+ this.container.register({ [formattedName]: asValue(instance) });
93
+ return this;
94
+ }
95
+ async initialize(input, verbose = false) {
96
+ if (this.isInitializing)
97
+ return this;
98
+ this.isInitializing = true;
99
+ try {
100
+ const inputList = input ? (Array.isArray(input) ? input : [input]) : [];
101
+ for (const item of inputList) {
102
+ const name = this.getName(item.service);
103
+ if (!name || this.initializedNames.has(name))
104
+ continue;
105
+ const reg = this.container.registrations[name];
106
+ if (!reg || reg.lifetime !== Lifetime.SINGLETON)
107
+ continue;
108
+ try {
109
+ const instance = this.container.cradle[name];
110
+ if (instance && typeof instance.onInit === 'function') {
111
+ await instance.onInit(item.props || {});
112
+ }
113
+ this.initializedNames.add(name);
114
+ }
115
+ catch (err) {
116
+ if (verbose)
117
+ console.error(`[DI] Priority onInit Failed (${name}):`, err.message);
118
+ }
119
+ }
120
+ const allKeys = Object.keys(this.container.registrations);
121
+ for (const key of allKeys) {
122
+ if (this.initializedNames.has(key))
123
+ continue;
124
+ const reg = this.container.registrations[key];
125
+ if (reg.lifetime !== Lifetime.SINGLETON)
126
+ continue;
127
+ try {
128
+ const instance = this.container.cradle[key];
129
+ if (instance && typeof instance.onInit === 'function') {
130
+ await instance.onInit({});
131
+ }
132
+ this.initializedNames.add(key);
133
+ }
134
+ catch (err) {
135
+ if (verbose)
136
+ console.error(`[DI] Auto onInit Failed (${key}):`, err.message);
137
+ }
138
+ }
139
+ for (const name of this.initializedNames) {
140
+ try {
141
+ const instance = this.container.cradle[name];
142
+ if (instance && typeof instance.onAfterInit === 'function') {
143
+ await instance.onAfterInit();
144
+ }
145
+ }
146
+ catch (err) {
147
+ if (verbose)
148
+ console.error(`[DI] onAfterInit Failed (${name}):`, err.message);
149
+ }
150
+ }
151
+ }
152
+ finally {
153
+ this.isInitializing = false;
154
+ }
155
+ return this;
156
+ }
157
+ get(target) {
158
+ const resolveName = this.getName(target);
159
+ return this.container.resolve(resolveName);
160
+ }
161
+ async shutdown() {
162
+ for (const name of this.initializedNames) {
163
+ try {
164
+ const instance = this.container.cradle[name];
165
+ if (instance && typeof instance.onDispose === 'function') {
166
+ await instance.onDispose();
167
+ }
168
+ }
169
+ catch (err) {
170
+ console.error(`[DI] onDispose Failed (${name})`);
171
+ }
172
+ }
173
+ await this.container.dispose();
174
+ }
175
+ get cradle() { return this.container.cradle; }
176
+ }
177
+ const globalStore = globalThis;
178
+ if (!globalStore[xSymbol]) {
179
+ globalStore[xSymbol] = new DIM();
180
+ }
181
+ export default globalStore[xSymbol];
@@ -16,7 +16,15 @@ export declare enum FrameworkEnum {
16
16
  NODE = "node",
17
17
  FETCH = "fetch",
18
18
  WEBSOCKET = "websocket",
19
- SOCKETIO = "socketio"
19
+ SOCKETIO = "socketio",
20
+ NEXT = "next",
21
+ ANGULAR = "angular",
22
+ NESTJS = "nestjs"
23
+ }
24
+ export declare enum GlobalTypeEnum {
25
+ WORKSPACE = "workspace",
26
+ API_SERVICE = "api-service",
27
+ FRONTEND = "frontend"
20
28
  }
21
29
  export declare enum RuntimeEnum {
22
30
  BUN = "bun",
@@ -1 +1,169 @@
1
- export var NodeEnvEnum;(function(N){N.DEV="dev";N.TEST="test";N.PROD="prod"})(NodeEnvEnum||(NodeEnvEnum={}));export var ProtocolEnum;(function(N){N.HTTP="http";N.HTTPS="https";N.WEBSOCKET="ws";N.SOCKETIO="socketio";N.NONE="none"})(ProtocolEnum||(ProtocolEnum={}));export var FrameworkEnum;(function(N){N.EXPRESS="express";N.ELYSIA="elysia";N.NODE="node";N.FETCH="fetch";N.WEBSOCKET="websocket";N.SOCKETIO="socketio"})(FrameworkEnum||(FrameworkEnum={}));export var RuntimeEnum;(function(N){N.BUN="bun";N.NODE="node"})(RuntimeEnum||(RuntimeEnum={}));export var BundlerEnum;(function(N){N.AUTO="auto";N.BUN="bun";N.TSC="tsc";N.ESBUILD="esbuild"})(BundlerEnum||(BundlerEnum={}));export var PolarityTypeEnum;(function(N){N[N.NOTR=0]="NOTR";N[N.POSITIVE=1]="POSITIVE";N[N.NEGATIVE=-1]="NEGATIVE"})(PolarityTypeEnum||(PolarityTypeEnum={}));export var LoggerLayerEnum;(function(N){N[N.CRITICAL=0]="CRITICAL";N[N.ERROR=1]="ERROR";N[N.WARN=2]="WARN";N[N.INFO=3]="INFO";N[N.HTTP=4]="HTTP";N[N.DEBUG=5]="DEBUG"})(LoggerLayerEnum||(LoggerLayerEnum={}));export var CountryCodeEnum;(function(N){N.EN="en";N.TR="tr"})(CountryCodeEnum||(CountryCodeEnum={}));export var CurrencyCodeEnum;(function(N){N.USD="usd";N.EUR="eur";N.TRY="try"})(CurrencyCodeEnum||(CurrencyCodeEnum={}));export var HttpMethodEnum;(function(N){N.POST="post";N.GET="get";N.PUT="put";N.DELETE="delete"})(HttpMethodEnum||(HttpMethodEnum={}));export var ContentTypeEnum;(function(N){N.applicationJson="application/json";N.applicationXWwwFormUrlencoded="application/x-www-form-urlencoded"})(ContentTypeEnum||(ContentTypeEnum={}));export var DeviceStatusEnum;(function(N){N[N.PENDING=0]="PENDING";N[N.OFFLINE=1]="OFFLINE";N[N.ONLINE=2]="ONLINE";N[N.CONNECTING=3]="CONNECTING";N[N.CONNECTED=4]="CONNECTED"})(DeviceStatusEnum||(DeviceStatusEnum={}));export var DevicePlatformEnum;(function(N){N.WEB="web";N.NATIVE="native";N.OTHER="other"})(DevicePlatformEnum||(DevicePlatformEnum={}));export var DeviceOSEnum;(function(N){N.ANDROID="android";N.IOS="ios";N.WINDOWS="windows";N.MACOS="macos";N.MACOSX="macosx";N.OTHER="other"})(DeviceOSEnum||(DeviceOSEnum={}));export var PriorityEnum;(function(N){N[N.HIGH=0]="HIGH";N[N.MEDIUM=1]="MEDIUM";N[N.LOW=2]="LOW"})(PriorityEnum||(PriorityEnum={}));export var PrivacyEnum;(function(N){N[N.PRIVATE=0]="PRIVATE";N[N.PUBLIC=1]="PUBLIC";N[N.ONLY_FRIENDS=2]="ONLY_FRIENDS"})(PrivacyEnum||(PrivacyEnum={}));export var TimezoneEnum;(function(N){N.UTC="UTC";N.EtcUTC="Etc/UTC";N.EtcGMT="Etc/GMT"})(TimezoneEnum||(TimezoneEnum={}));export var ModeEnum;(function(N){N.MONOLITIC="monolitic";N.MICRO_SERVICE="micro_service"})(ModeEnum||(ModeEnum={}));export var TokensEnum;(function(N){N.INTERNAL_API_TOKEN="internal_api_key";N.CSRF_TOKEN="csrf_token";N.ACCESS_TOKEN="access_token";N.REFRESH_TOKEN="refresh_token";N.REFERENCE_TOKEN="reference_token";N.PERSONAL_ACCESS_TOKEN="personal_access_token"})(TokensEnum||(TokensEnum={}));export var CoreClientsEnum;(function(N){N.BASE_API_CLIENT="base_client_name";N.SOAP_API_CLIENT="soap_api_client"})(CoreClientsEnum||(CoreClientsEnum={}));export var GStoreScopeEnum;(function(N){N.GLOBAL="global";N.RUN="run";N.CONTROLLER="controller"})(GStoreScopeEnum||(GStoreScopeEnum={}));export var EndpointResourceEnum;(function(N){N.EXAMPLE="example";N.FULL="full";N.SYSTEM="system";N.CLIENTS="clients";N.AUTH="auth";N.ACCOUNTS="accounts";N.USERS="users";N.TRANSACTIONS="transactions";N.NOTIFICATIONS="notifications";N.ADDRESSES="addresses";N.PAYMENTS="payments";N.COMMISSIONS_AND_TAXES="commissions-and-taxes";N.SUPPORTS="supports";N.INVOICES="invoices";N.FILES="files";N.TOKENS="tokens";N.WEBHOOKS="webhooks";N.OTHERS="others"})(EndpointResourceEnum||(EndpointResourceEnum={}));
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"] = "socketio";
13
+ ProtocolEnum["NONE"] = "none";
14
+ })(ProtocolEnum || (ProtocolEnum = {}));
15
+ export var FrameworkEnum;
16
+ (function (FrameworkEnum) {
17
+ FrameworkEnum["EXPRESS"] = "express";
18
+ FrameworkEnum["ELYSIA"] = "elysia";
19
+ FrameworkEnum["NODE"] = "node";
20
+ FrameworkEnum["FETCH"] = "fetch";
21
+ FrameworkEnum["WEBSOCKET"] = "websocket";
22
+ FrameworkEnum["SOCKETIO"] = "socketio";
23
+ FrameworkEnum["NEXT"] = "next";
24
+ FrameworkEnum["ANGULAR"] = "angular";
25
+ FrameworkEnum["NESTJS"] = "nestjs";
26
+ })(FrameworkEnum || (FrameworkEnum = {}));
27
+ export var GlobalTypeEnum;
28
+ (function (GlobalTypeEnum) {
29
+ GlobalTypeEnum["WORKSPACE"] = "workspace";
30
+ GlobalTypeEnum["API_SERVICE"] = "api-service";
31
+ GlobalTypeEnum["FRONTEND"] = "frontend";
32
+ })(GlobalTypeEnum || (GlobalTypeEnum = {}));
33
+ export var RuntimeEnum;
34
+ (function (RuntimeEnum) {
35
+ RuntimeEnum["BUN"] = "bun";
36
+ RuntimeEnum["NODE"] = "node";
37
+ })(RuntimeEnum || (RuntimeEnum = {}));
38
+ export var BundlerEnum;
39
+ (function (BundlerEnum) {
40
+ BundlerEnum["AUTO"] = "auto";
41
+ BundlerEnum["BUN"] = "bun";
42
+ BundlerEnum["TSC"] = "tsc";
43
+ BundlerEnum["ESBUILD"] = "esbuild";
44
+ })(BundlerEnum || (BundlerEnum = {}));
45
+ export var PolarityTypeEnum;
46
+ (function (PolarityTypeEnum) {
47
+ PolarityTypeEnum[PolarityTypeEnum["NOTR"] = 0] = "NOTR";
48
+ PolarityTypeEnum[PolarityTypeEnum["POSITIVE"] = 1] = "POSITIVE";
49
+ PolarityTypeEnum[PolarityTypeEnum["NEGATIVE"] = -1] = "NEGATIVE";
50
+ })(PolarityTypeEnum || (PolarityTypeEnum = {}));
51
+ export var LoggerLayerEnum;
52
+ (function (LoggerLayerEnum) {
53
+ LoggerLayerEnum[LoggerLayerEnum["CRITICAL"] = 0] = "CRITICAL";
54
+ LoggerLayerEnum[LoggerLayerEnum["ERROR"] = 1] = "ERROR";
55
+ LoggerLayerEnum[LoggerLayerEnum["WARN"] = 2] = "WARN";
56
+ LoggerLayerEnum[LoggerLayerEnum["INFO"] = 3] = "INFO";
57
+ LoggerLayerEnum[LoggerLayerEnum["HTTP"] = 4] = "HTTP";
58
+ LoggerLayerEnum[LoggerLayerEnum["DEBUG"] = 5] = "DEBUG";
59
+ })(LoggerLayerEnum || (LoggerLayerEnum = {}));
60
+ export var CountryCodeEnum;
61
+ (function (CountryCodeEnum) {
62
+ CountryCodeEnum["EN"] = "en";
63
+ CountryCodeEnum["TR"] = "tr";
64
+ })(CountryCodeEnum || (CountryCodeEnum = {}));
65
+ export var CurrencyCodeEnum;
66
+ (function (CurrencyCodeEnum) {
67
+ CurrencyCodeEnum["USD"] = "usd";
68
+ CurrencyCodeEnum["EUR"] = "eur";
69
+ CurrencyCodeEnum["TRY"] = "try";
70
+ })(CurrencyCodeEnum || (CurrencyCodeEnum = {}));
71
+ export var HttpMethodEnum;
72
+ (function (HttpMethodEnum) {
73
+ HttpMethodEnum["POST"] = "post";
74
+ HttpMethodEnum["GET"] = "get";
75
+ HttpMethodEnum["PUT"] = "put";
76
+ HttpMethodEnum["DELETE"] = "delete";
77
+ })(HttpMethodEnum || (HttpMethodEnum = {}));
78
+ export var ContentTypeEnum;
79
+ (function (ContentTypeEnum) {
80
+ ContentTypeEnum["applicationJson"] = "application/json";
81
+ ContentTypeEnum["applicationXWwwFormUrlencoded"] = "application/x-www-form-urlencoded";
82
+ })(ContentTypeEnum || (ContentTypeEnum = {}));
83
+ export var DeviceStatusEnum;
84
+ (function (DeviceStatusEnum) {
85
+ DeviceStatusEnum[DeviceStatusEnum["PENDING"] = 0] = "PENDING";
86
+ DeviceStatusEnum[DeviceStatusEnum["OFFLINE"] = 1] = "OFFLINE";
87
+ DeviceStatusEnum[DeviceStatusEnum["ONLINE"] = 2] = "ONLINE";
88
+ DeviceStatusEnum[DeviceStatusEnum["CONNECTING"] = 3] = "CONNECTING";
89
+ DeviceStatusEnum[DeviceStatusEnum["CONNECTED"] = 4] = "CONNECTED";
90
+ })(DeviceStatusEnum || (DeviceStatusEnum = {}));
91
+ export var DevicePlatformEnum;
92
+ (function (DevicePlatformEnum) {
93
+ DevicePlatformEnum["WEB"] = "web";
94
+ DevicePlatformEnum["NATIVE"] = "native";
95
+ DevicePlatformEnum["OTHER"] = "other";
96
+ })(DevicePlatformEnum || (DevicePlatformEnum = {}));
97
+ export var DeviceOSEnum;
98
+ (function (DeviceOSEnum) {
99
+ DeviceOSEnum["ANDROID"] = "android";
100
+ DeviceOSEnum["IOS"] = "ios";
101
+ DeviceOSEnum["WINDOWS"] = "windows";
102
+ DeviceOSEnum["MACOS"] = "macos";
103
+ DeviceOSEnum["MACOSX"] = "macosx";
104
+ DeviceOSEnum["OTHER"] = "other";
105
+ })(DeviceOSEnum || (DeviceOSEnum = {}));
106
+ export var PriorityEnum;
107
+ (function (PriorityEnum) {
108
+ PriorityEnum[PriorityEnum["HIGH"] = 0] = "HIGH";
109
+ PriorityEnum[PriorityEnum["MEDIUM"] = 1] = "MEDIUM";
110
+ PriorityEnum[PriorityEnum["LOW"] = 2] = "LOW";
111
+ })(PriorityEnum || (PriorityEnum = {}));
112
+ export var PrivacyEnum;
113
+ (function (PrivacyEnum) {
114
+ PrivacyEnum[PrivacyEnum["PRIVATE"] = 0] = "PRIVATE";
115
+ PrivacyEnum[PrivacyEnum["PUBLIC"] = 1] = "PUBLIC";
116
+ PrivacyEnum[PrivacyEnum["ONLY_FRIENDS"] = 2] = "ONLY_FRIENDS";
117
+ })(PrivacyEnum || (PrivacyEnum = {}));
118
+ export var TimezoneEnum;
119
+ (function (TimezoneEnum) {
120
+ TimezoneEnum["UTC"] = "UTC";
121
+ TimezoneEnum["EtcUTC"] = "Etc/UTC";
122
+ TimezoneEnum["EtcGMT"] = "Etc/GMT";
123
+ })(TimezoneEnum || (TimezoneEnum = {}));
124
+ export var ModeEnum;
125
+ (function (ModeEnum) {
126
+ ModeEnum["MONOLITIC"] = "monolitic";
127
+ ModeEnum["MICRO_SERVICE"] = "micro_service";
128
+ })(ModeEnum || (ModeEnum = {}));
129
+ export var TokensEnum;
130
+ (function (TokensEnum) {
131
+ TokensEnum["INTERNAL_API_TOKEN"] = "internal_api_key";
132
+ TokensEnum["CSRF_TOKEN"] = "csrf_token";
133
+ TokensEnum["ACCESS_TOKEN"] = "access_token";
134
+ TokensEnum["REFRESH_TOKEN"] = "refresh_token";
135
+ TokensEnum["REFERENCE_TOKEN"] = "reference_token";
136
+ TokensEnum["PERSONAL_ACCESS_TOKEN"] = "personal_access_token";
137
+ })(TokensEnum || (TokensEnum = {}));
138
+ export var CoreClientsEnum;
139
+ (function (CoreClientsEnum) {
140
+ CoreClientsEnum["BASE_API_CLIENT"] = "base_client_name";
141
+ CoreClientsEnum["SOAP_API_CLIENT"] = "soap_api_client";
142
+ })(CoreClientsEnum || (CoreClientsEnum = {}));
143
+ export var GStoreScopeEnum;
144
+ (function (GStoreScopeEnum) {
145
+ GStoreScopeEnum["GLOBAL"] = "global";
146
+ GStoreScopeEnum["RUN"] = "run";
147
+ GStoreScopeEnum["CONTROLLER"] = "controller";
148
+ })(GStoreScopeEnum || (GStoreScopeEnum = {}));
149
+ export var EndpointResourceEnum;
150
+ (function (EndpointResourceEnum) {
151
+ EndpointResourceEnum["EXAMPLE"] = "example";
152
+ EndpointResourceEnum["FULL"] = "full";
153
+ EndpointResourceEnum["SYSTEM"] = "system";
154
+ EndpointResourceEnum["CLIENTS"] = "clients";
155
+ EndpointResourceEnum["AUTH"] = "auth";
156
+ EndpointResourceEnum["ACCOUNTS"] = "accounts";
157
+ EndpointResourceEnum["USERS"] = "users";
158
+ EndpointResourceEnum["TRANSACTIONS"] = "transactions";
159
+ EndpointResourceEnum["NOTIFICATIONS"] = "notifications";
160
+ EndpointResourceEnum["ADDRESSES"] = "addresses";
161
+ EndpointResourceEnum["PAYMENTS"] = "payments";
162
+ EndpointResourceEnum["COMMISSIONS_AND_TAXES"] = "commissions-and-taxes";
163
+ EndpointResourceEnum["SUPPORTS"] = "supports";
164
+ EndpointResourceEnum["INVOICES"] = "invoices";
165
+ EndpointResourceEnum["FILES"] = "files";
166
+ EndpointResourceEnum["TOKENS"] = "tokens";
167
+ EndpointResourceEnum["WEBHOOKS"] = "webhooks";
168
+ EndpointResourceEnum["OTHERS"] = "others";
169
+ })(EndpointResourceEnum || (EndpointResourceEnum = {}));
@@ -1 +1,9 @@
1
- import _ from"lodash";import x from "../../utils/models/classes/class.x.js";import locator from "../../utils/models/classes/class.service-locator.js";export*from "../../utils/models/classes/class.tmp-file-loader.js";export*from "../../utils/models/classes/class.interfaces.js";export*from "../../utils/models/classes/class.clients.js";export*from "../../utils/models/types/index.js";export*from "../../utils/models/enums/index.js";export{x,locator,_};
1
+ import _ from 'lodash';
2
+ import x from '../../utils/models/classes/class.x.js';
3
+ import locator from '../../utils/models/classes/class.service-locator.js';
4
+ export * from '../../utils/models/classes/class.tmp-file-loader.js';
5
+ export * from '../../utils/models/classes/class.interfaces.js';
6
+ export * from '../../utils/models/classes/class.clients.js';
7
+ export * from '../../utils/models/types/index.js';
8
+ export * from '../../utils/models/enums/index.js';
9
+ export { x, locator, _ };
@@ -1 +1,2 @@
1
- export{};
1
+ export {};
2
+ /** Ambient module shims: `@xrystal/dto/*`, `qs` — see `./shims.d.ts` */
package/x/tmp.yml CHANGED
@@ -3,67 +3,24 @@ project:
3
3
 
4
4
  configs:
5
5
  global:
6
+ type: api-service
6
7
  runtime: bun
7
- vars:
8
- xry: xry
9
-
10
- service:
11
- name: "{{xry}}-service"
12
8
  framework: elysia
13
-
14
9
  paths:
15
10
  root: ./x
11
+ tmp: tmp.yml
16
12
  source: ./source
17
13
  special:
18
14
  tests: tests
19
15
  environments: environments
20
16
  dist: dist
21
-
22
- protocols:
23
- - http
24
- - ws
25
-
26
- loaders:
27
- configs:
28
- loadPath: '@/utils/helpers/configs/index'
29
-
30
- system:
31
- gStore:
32
- options:
33
- bootstrap: true
34
- autoCreateProps: true
35
- vars:
36
- test: false
37
-
38
- kafka:
39
- options:
40
- enabled: true
41
- queueLogEnabled: true
42
-
43
- loggers:
44
- loadPath: logs
45
- logLevel: debug
46
- queueLogLevel: warn
47
-
48
- localization:
49
- loadPath: assets/langs
50
- fallbackLang: en
51
- preloadLangs:
52
- - en
53
- - tr
54
-
55
- dto:
56
- withDefaultHeaders: true
57
-
58
- controller:
59
-
17
+ vars:
18
+ xry: xry
60
19
  build:
61
20
  bundler: auto
62
- typecheck: true
63
- minify: true
64
-
65
- core:
66
- tmp:
21
+ typecheck: false
22
+ tscLenient: true
23
+ options:
67
24
  fileWatchIntervalMs: 500
68
25
 
69
26
  end: