lakutata 2.0.1 → 2.0.2

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 (45) hide show
  1. package/com/database.d.ts +4 -4
  2. package/com/docker.d.ts +5 -4
  3. package/com/entrypoint.cjs +13 -11
  4. package/com/entrypoint.d.ts +13 -8
  5. package/com/entrypoint.mjs +2 -2
  6. package/com/logger.d.ts +3 -3
  7. package/decorator/asst.d.ts +2 -2
  8. package/decorator/ctrl.d.ts +5 -5
  9. package/decorator/di.d.ts +5 -5
  10. package/decorator/dto.d.ts +5 -5
  11. package/decorator/orm.d.ts +3 -3
  12. package/helper.d.ts +2 -2
  13. package/lakutata.cjs +16 -18
  14. package/lakutata.d.ts +12 -16
  15. package/lakutata.mjs +2 -2
  16. package/orm.d.ts +4 -4
  17. package/orm.mjs +30 -30
  18. package/package.json +1 -1
  19. package/src/components/entrypoint/Entrypoint.cjs +1 -1
  20. package/src/components/entrypoint/Entrypoint.mjs +1 -1
  21. package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.cjs +34 -0
  22. package/src/components/entrypoint/exceptions/ControllerActionNotFoundException.mjs +28 -0
  23. package/src/decorators/orm/Column.cjs +14 -14
  24. package/src/decorators/orm/Column.mjs +2 -2
  25. package/src/decorators/orm/PrimaryColumn.cjs +1 -1
  26. package/src/decorators/orm/PrimaryColumn.mjs +2 -2
  27. package/src/lib/core/Application.cjs +1 -1
  28. package/src/lib/core/Application.mjs +1 -1
  29. package/vendor/Package.14.cjs +20 -18
  30. package/vendor/Package.14.mjs +17 -19
  31. package/vendor/TypeDef.1.d.ts +274 -489
  32. package/vendor/TypeDef.10.d.ts +5 -6
  33. package/vendor/TypeDef.11.d.ts +4 -104
  34. package/vendor/TypeDef.12.d.ts +96 -60
  35. package/vendor/TypeDef.13.d.ts +71 -0
  36. package/vendor/TypeDef.2.d.ts +489 -948
  37. package/vendor/TypeDef.3.d.ts +662 -18813
  38. package/vendor/TypeDef.4.d.ts +18176 -3169
  39. package/vendor/TypeDef.5.d.ts +4093 -12
  40. package/vendor/TypeDef.6.d.ts +11 -2
  41. package/vendor/TypeDef.7.d.ts +20 -2
  42. package/vendor/TypeDef.8.d.ts +2 -5
  43. package/vendor/TypeDef.9.d.ts +2 -294
  44. package/src/exceptions/ControllerActionNotFoundException.cjs +0 -34
  45. package/src/exceptions/ControllerActionNotFoundException.mjs +0 -28
@@ -1,3 +1,12 @@
1
- type ActionPattern<T extends Record<string, any> = {}> = Record<string, any> & T;
1
+ interface IPatRun {
2
+ add(pattern: Record<string, any>, obj: any): void;
3
+ remove(pattern: Record<string, any>): void;
4
+ find(subject: Record<string, any>, exact?: boolean): any;
5
+ list(partialPattern?: Record<string, any>): {
6
+ match: Record<string, any>;
7
+ data: any;
8
+ }[];
9
+ toJSON(): string;
10
+ }
2
11
 
3
- export type { ActionPattern as A };
12
+ export type { IPatRun as I };
@@ -1,3 +1,21 @@
1
- type MethodDecorator<ClassPrototype, Method, Property = string | symbol> = (target: ClassPrototype, propertyKey: Property, descriptor: TypedPropertyDescriptor<Method>) => TypedPropertyDescriptor<Method> | void;
1
+ /**
2
+ * 异常抽象类
3
+ */
4
+ declare abstract class Exception extends Error {
5
+ abstract errno: number | string;
6
+ readonly appId: string;
7
+ readonly appName: string;
8
+ readonly errMsg: string;
9
+ readonly err: string;
10
+ constructor(template: string, data: unknown[] | Record<string, any>);
11
+ constructor(message: string);
12
+ constructor(error: Error);
13
+ constructor();
14
+ /**
15
+ * 获取错误名称
16
+ * @returns {string}
17
+ */
18
+ get name(): string;
19
+ }
2
20
 
3
- export type { MethodDecorator as M };
21
+ export { Exception as E };
@@ -1,6 +1,3 @@
1
- interface IConstructor<T = any> {
2
- new (...args: any[]): T;
3
- [prop: string]: any;
4
- }
1
+ type ActionPattern<T extends Record<string, any> = {}> = Record<string, any> & T;
5
2
 
6
- export type { IConstructor as I };
3
+ export type { ActionPattern as A };
@@ -1,295 +1,3 @@
1
- import './TypeDef.1.js';
1
+ type MethodDecorator<ClassPrototype, Method, Property = string | symbol> = (target: ClassPrototype, propertyKey: Property, descriptor: TypedPropertyDescriptor<Method>) => TypedPropertyDescriptor<Method> | void;
2
2
 
3
- /**
4
- * 异常抽象类
5
- */
6
- declare abstract class Exception extends Error {
7
- abstract errno: number | string;
8
- readonly appId: string;
9
- readonly appName: string;
10
- readonly errMsg: string;
11
- readonly err: string;
12
- constructor(template: string, data: unknown[] | Record<string, any>);
13
- constructor(message: string);
14
- constructor(error: Error);
15
- constructor();
16
- /**
17
- * 获取错误名称
18
- * @returns {string}
19
- */
20
- get name(): string;
21
- }
22
-
23
- declare namespace UnitOfTime {
24
- type Base = ('year' | 'years' | 'y' | 'month' | 'months' | 'M' | 'week' | 'weeks' | 'w' | 'day' | 'days' | 'd' | 'hour' | 'hours' | 'h' | 'minute' | 'minutes' | 'm' | 'second' | 'seconds' | 's' | 'millisecond' | 'milliseconds' | 'ms');
25
- type _quarter = 'quarter' | 'quarters' | 'Q';
26
- type _isoWeek = 'isoWeek' | 'isoWeeks' | 'W';
27
- type _date = 'date' | 'dates' | 'D';
28
- type DurationConstructor = Base | _quarter;
29
- type DurationAs = Base;
30
- type StartOf = Base | _quarter | _isoWeek | _date | null;
31
- type Diff = Base | _quarter;
32
- type MomentConstructor = Base | _date;
33
- type All = Base | _quarter | _isoWeek | _date | 'weekYear' | 'weekYears' | 'gg' | 'isoWeekYear' | 'isoWeekYears' | 'GG' | 'dayOfYear' | 'dayOfYears' | 'DDD' | 'weekday' | 'weekdays' | 'e' | 'isoWeekday' | 'isoWeekdays' | 'E';
34
- }
35
- type TimeInput = Time | Date | string | number | (number | string)[] | null;
36
- type TimeObject = {
37
- years: number;
38
- months: number;
39
- date: number;
40
- hours: number;
41
- minutes: number;
42
- seconds: number;
43
- milliseconds: number;
44
- };
45
- /**
46
- * Time class
47
- */
48
- declare class Time extends Date {
49
- #private;
50
- /**
51
- * Constructor
52
- * @param inp
53
- */
54
- constructor(inp?: TimeInput);
55
- /**
56
- * Get all timezone names
57
- */
58
- static timezones(): string[];
59
- /**
60
- * Returns the maximum value for a given instance (farthest into the future)
61
- * @param times
62
- */
63
- static max(...times: Time[]): Time;
64
- /**
65
- * Returns the minimum value (most distant past) of the given instance
66
- * @param times
67
- */
68
- static min(...times: Time[]): Time;
69
- /**
70
- * Update the current instance internal timestamp and return the current instance
71
- * @param time
72
- * @protected
73
- */
74
- protected updateTimestamp(time: number): this;
75
- /**
76
- * Get time zone offset
77
- */
78
- getTimezoneOffset(): number;
79
- /**
80
- * Get or set time zone
81
- */
82
- timezone(): string | undefined;
83
- timezone(tz: string): this;
84
- /**
85
- * Get or set the number of milliseconds
86
- */
87
- milliseconds(): number;
88
- milliseconds(value: number): this;
89
- /**
90
- * Get or set seconds
91
- */
92
- seconds(): number;
93
- seconds(value: number): this;
94
- /**
95
- * Get or set minutes
96
- */
97
- minutes(): number;
98
- minutes(value: number): this;
99
- /**
100
- * Get or set the hour
101
- */
102
- hours(): number;
103
- hours(value: number): this;
104
- /**
105
- * Get or set the day of the month
106
- * Accepts numbers from 1 to 31. If out of range it will bubble up to months
107
- */
108
- date(): number;
109
- date(value: number): this;
110
- /**
111
- * Set to get or set the day of the week
112
- */
113
- weekday(): number;
114
- weekday(value: number): this;
115
- /**
116
- * Get or set the ISO day of the week, 1 is Monday, 7 is Sunday
117
- */
118
- isoWeekday(): number;
119
- isoWeekday(value: number): this;
120
- /**
121
- * Get or set the day of the year
122
- * Accepts numbers from 1 to 366. If out of range it will bubble up to the year
123
- */
124
- dayOfYear(): number;
125
- dayOfYear(value: number): this;
126
- /**
127
- * Gets or sets the week of the year
128
- */
129
- weeks(): number;
130
- weeks(value: number): this;
131
- /**
132
- * Gets or sets the ISO week of the year
133
- */
134
- isoWeeks(): number;
135
- isoWeeks(value: number): this;
136
- /**
137
- * Get or set the month
138
- * Accepts numbers from 0 to 11. If out of range it will bubble up to the year
139
- */
140
- month(): number;
141
- month(value: number): this;
142
- /**
143
- * Gets or sets the quarter (1 to 4)
144
- */
145
- quarters(): number;
146
- quarters(value: number): this;
147
- /**
148
- * Get or set the year
149
- * Accepts numbers from -270,000 to 270,000
150
- */
151
- year(): number;
152
- year(value: number): this;
153
- /**
154
- * Gets or sets the week of the year in ISO time
155
- */
156
- isoWeekYear(): number;
157
- isoWeekYear(value: number): this;
158
- /**
159
- * Gets the week number based on the locale of the current instance's year
160
- */
161
- weeksInYear(): number;
162
- /**
163
- * Get the week number of the year where the current instance is located based on the week number
164
- */
165
- isoWeeksInYear(): number;
166
- /**
167
- * Universal getter (Depends on input unit)
168
- * @param unit
169
- */
170
- get(unit: UnitOfTime.All): number;
171
- /**
172
- * Universal setter (Depends on input unit)
173
- * @param unit
174
- * @param value
175
- */
176
- set(unit: UnitOfTime.All, value: number): this;
177
- /**
178
- * Increase time
179
- * @param amount
180
- * @param unit
181
- */
182
- add(amount: number, unit: UnitOfTime.DurationConstructor): this;
183
- /**
184
- * Minus time
185
- * @param amount
186
- * @param unit
187
- */
188
- subtract(amount: number, unit: UnitOfTime.DurationConstructor): this;
189
- /**
190
- * Set to the start of a time unit
191
- * @param unit
192
- */
193
- startOf(unit: UnitOfTime.StartOf): this;
194
- /**
195
- * Set to the end of the time unit
196
- * @param unit
197
- */
198
- endOf(unit: UnitOfTime.StartOf): this;
199
- /**
200
- * Format output time string
201
- */
202
- format(): string;
203
- format(format: string): string;
204
- /**
205
- * Get time difference
206
- * @param inp
207
- * @param unit
208
- * @param precise
209
- */
210
- diff(inp: TimeInput, unit?: UnitOfTime.Diff, precise?: boolean): number;
211
- /**
212
- * Outputs a Unix timestamp (number of seconds since the Unix epoch)
213
- */
214
- unix(): number;
215
- /**
216
- * Get the number of days in the current month
217
- */
218
- daysInMonth(): number;
219
- /**
220
- * This will return an array that reflects the parameters in new Date()
221
- */
222
- toArray(): [number, number, number, number, number, number, number];
223
- /**
224
- * Returns an object containing the year, month, day of the month, hour, minute, second, and millisecond
225
- */
226
- toObject(): TimeObject;
227
- /**
228
- * To string
229
- */
230
- toString(): string;
231
- /**
232
- * To time string
233
- */
234
- toTimeString(): string;
235
- /**
236
- * To UTC string
237
- */
238
- toUTCString(): string;
239
- /**
240
- * To date string
241
- */
242
- toDateString(): string;
243
- /**
244
- * Return ISO format time string
245
- */
246
- toISOString(): string;
247
- /**
248
- * Is current time before input time
249
- * @param inp
250
- * @param granularity
251
- */
252
- isBefore(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
253
- /**
254
- * Is current time same with input time
255
- * @param inp
256
- * @param granularity
257
- */
258
- isSame(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
259
- /**
260
- * Is current time after input time
261
- * @param inp
262
- * @param granularity
263
- */
264
- isAfter(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
265
- /**
266
- * Is current time same or before input time
267
- * @param inp
268
- * @param granularity
269
- */
270
- isSameOrBefore(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
271
- /**
272
- * Is current time same or after input time
273
- * @param inp
274
- * @param granularity
275
- */
276
- isSameOrAfter(inp?: TimeInput, granularity?: UnitOfTime.StartOf): boolean;
277
- /**
278
- * Is current time between two input times
279
- * @param a
280
- * @param b
281
- * @param granularity
282
- * @param inclusivity
283
- */
284
- isBetween(a: TimeInput, b: TimeInput, granularity?: UnitOfTime.StartOf, inclusivity?: '()' | '[)' | '(]' | '[]'): boolean;
285
- /**
286
- * Check current time instance is leap year
287
- */
288
- isLeapYear(): boolean;
289
- /**
290
- * Clone a time instance
291
- */
292
- clone(): Time;
293
- }
294
-
295
- export { Exception as E, Time as T };
3
+ export type { MethodDecorator as M };
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, {
4
- value: "Module"
5
- });
6
-
7
- const e = require("../lib/base/abstracts/Exception.cjs");
8
-
9
- require("../lib/base/internal/BasicInfo.cjs");
10
-
11
- require("../lib/helpers/As.cjs");
12
-
13
- require("../../vendor/Package.7.cjs");
14
-
15
- require("../../vendor/Package.5.cjs");
16
-
17
- require("../../vendor/Package.8.cjs");
18
-
19
- require("../lib/base/internal/ThrowWarning.cjs");
20
-
21
- require("../lib/helpers/Templating.cjs");
22
-
23
- require("../lib/base/internal/CamelCase.cjs");
24
-
25
- require("../lib/helpers/NoCase.cjs");
26
-
27
- class ControllerActionNotFoundException extends e.Exception {
28
- constructor() {
29
- super(...arguments);
30
- this.errno = "E_CONTROLLER_ACTION_NOT_FOUND";
31
- }
32
- }
33
-
34
- exports.ControllerActionNotFoundException = ControllerActionNotFoundException;
@@ -1,28 +0,0 @@
1
- import { Exception as o } from "../lib/base/abstracts/Exception.mjs";
2
-
3
- import "../lib/base/internal/BasicInfo.mjs";
4
-
5
- import "../lib/helpers/As.mjs";
6
-
7
- import "../../vendor/Package.7.mjs";
8
-
9
- import "../../vendor/Package.5.mjs";
10
-
11
- import "../../vendor/Package.8.mjs";
12
-
13
- import "../lib/base/internal/ThrowWarning.mjs";
14
-
15
- import "../lib/helpers/Templating.mjs";
16
-
17
- import "../lib/base/internal/CamelCase.mjs";
18
-
19
- import "../lib/helpers/NoCase.mjs";
20
-
21
- class ControllerActionNotFoundException extends o {
22
- constructor() {
23
- super(...arguments);
24
- this.errno = "E_CONTROLLER_ACTION_NOT_FOUND";
25
- }
26
- }
27
-
28
- export { ControllerActionNotFoundException };