@tstdl/base 0.92.44 → 0.92.48

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 (97) hide show
  1. package/ai/ai-file.service.d.ts +3 -3
  2. package/ai/ai.service.d.ts +4 -4
  3. package/api/client/client.js +1 -0
  4. package/api/server/gateway.js +1 -1
  5. package/application/application.d.ts +1 -2
  6. package/authentication/client/api.client.d.ts +3 -3
  7. package/authentication/server/mongo/mongo-authentication-credentials.repository.js +1 -1
  8. package/authentication/server/mongo/mongo-authentication-session.repository.js +1 -1
  9. package/browser/browser-context-controller.js +1 -1
  10. package/browser/browser-controller.d.ts +1 -2
  11. package/browser/browser.service.d.ts +1 -2
  12. package/database/mongo/classes.d.ts +1 -2
  13. package/distributed-loop/distributed-loop.js +1 -1
  14. package/document-management/models/document-property-value.model.d.ts +1 -1
  15. package/document-management/models/document-request-template.d.ts +2 -2
  16. package/document-management/models/document-request.model.js +1 -0
  17. package/document-management/models/service-models/document.view-model.d.ts +1 -1
  18. package/document-management/server/services/document-management.service.d.ts +5 -5
  19. package/document-management/server/services/document-management.service.js +1 -1
  20. package/eslint.config.js +69 -0
  21. package/examples/reflection/basic.d.ts +1 -1
  22. package/examples/reflection/basic.js +2 -2
  23. package/http/client/adapters/undici.adapter.js +1 -1
  24. package/http/client/http-client.js +1 -1
  25. package/image-service/imgproxy/imgproxy-image-service.js +1 -1
  26. package/key-value-store/key-value.store.js +1 -0
  27. package/key-value-store/mongo/mongo-key-value.repository.js +1 -1
  28. package/lock/lock.js +1 -0
  29. package/lock/mongo/lock.js +3 -4
  30. package/lock/mongo/mongo-lock-repository.js +1 -1
  31. package/lock/provider.js +1 -0
  32. package/logger/logger.js +1 -0
  33. package/mail/mail.client.js +1 -0
  34. package/mail/repositories/mongo/mongo-mail-log.repository.js +1 -1
  35. package/message-bus/message-bus.js +1 -0
  36. package/migration/mongo/migration-state-repository.js +1 -1
  37. package/module/modules/web-server.module.d.ts +1 -2
  38. package/object-storage/object-storage.js +1 -0
  39. package/openid-connect/mongo-oidc-state.repository.js +1 -1
  40. package/orm/entity.d.ts +4 -3
  41. package/orm/entity.js +1 -1
  42. package/orm/query.d.ts +2 -1
  43. package/orm/server/database.d.ts +2 -2
  44. package/orm/server/drizzle/schema-converter.d.ts +10 -11
  45. package/orm/server/drizzle/schema-converter.js +1 -1
  46. package/orm/server/repository.d.ts +9 -8
  47. package/orm/server/repository.js +1 -0
  48. package/orm/types.d.ts +19 -23
  49. package/orm/types.js +0 -1
  50. package/package.json +7 -10
  51. package/pdf/pdf.service.js +1 -1
  52. package/queue/mongo/mongo-job.repository.js +1 -1
  53. package/queue/mongo/queue.provider.js +1 -0
  54. package/queue/queue.d.ts +1 -2
  55. package/schema/schemas/literal.d.ts +2 -2
  56. package/search-index/elastic/config.d.ts +1 -2
  57. package/serializer/serializer.js +2 -2
  58. package/signals/implementation/to-signal.d.ts +2 -2
  59. package/signals/implementation/writable-signal.d.ts +3 -3
  60. package/signals/implementation/writable-signal.js +0 -1
  61. package/templates/providers/file.template-provider.d.ts +1 -2
  62. package/templates/resolvers/file.template-resolver.d.ts +1 -1
  63. package/templates/resolvers/file.template-resolver.js +1 -0
  64. package/templates/resolvers/jsx.template-resolver.d.ts +1 -1
  65. package/text/localization.service.d.ts +2 -4
  66. package/tsconfig.json +6 -10
  67. package/tsconfig.server.json +1 -1
  68. package/types/index.d.ts +2 -0
  69. package/types/index.js +1 -0
  70. package/types/tagged.d.ts +16 -0
  71. package/types/tagged.js +1 -0
  72. package/types.d.ts +6 -10
  73. package/utils/async-iterable-helpers/multiplex.js +1 -2
  74. package/utils/benchmark.js +1 -1
  75. package/utils/comparison.js +0 -1
  76. package/utils/cryptography.d.ts +2 -4
  77. package/utils/event-loop.js +1 -2
  78. package/utils/iterable-helpers/first-or-default.js +0 -1
  79. package/utils/iterable-helpers/first.js +0 -1
  80. package/utils/iterable-helpers/group-to-map.js +1 -1
  81. package/utils/iterable-helpers/last-or-default.js +1 -1
  82. package/utils/object/merge.js +2 -2
  83. package/utils/object/object.d.ts +2 -2
  84. package/utils/periodic-reporter.js +1 -2
  85. package/utils/reflection.js +1 -1
  86. package/utils/repl.d.ts +1 -1
  87. package/utils/repl.js +0 -1
  88. package/utils/set.js +0 -1
  89. package/utils/stream/slice.js +2 -2
  90. package/utils/stream/stream-reader.js +0 -1
  91. package/utils/stream/to-bytes-stream.js +2 -2
  92. package/utils/string/snake-case.js +1 -1
  93. package/utils/timing.js +2 -2
  94. package/utils/type-guards.js +0 -1
  95. package/utils/units.js +0 -1
  96. package/utils/z-base32.js +0 -1
  97. package/.eslintrc.json +0 -281
@@ -6,7 +6,6 @@ import { concatArrayBufferViews } from '../binary.js';
6
6
  import { isDefined, isReadableStream } from '../type-guards.js';
7
7
  import { getReadableStreamFromIterable, getReadableStreamIterable } from './readable-stream-adapter.js';
8
8
  import { toBytesStream } from './to-bytes-stream.js';
9
- // eslint-disable-next-line max-statements
10
9
  export async function readBinaryStream(iterableOrStream, { length, onLengthExceed = 'error', onLengthSubceed = 'error' } = {}) {
11
10
  const stream = isReadableStream(iterableOrStream)
12
11
  ? isDefined(length)
@@ -5,7 +5,7 @@ export function toBytesStream(stream, options) {
5
5
  let byobReader;
6
6
  return new ReadableStream({
7
7
  type: 'bytes',
8
- autoAllocateChunkSize: 100 * kibibyte, // eslint-disable-line @typescript-eslint/no-magic-numbers
8
+ autoAllocateChunkSize: 100 * kibibyte,
9
9
  start() {
10
10
  byobReader = stream.getReader({ mode: 'byob' });
11
11
  },
@@ -50,7 +50,7 @@ export function toBytesStream(stream, options) {
50
50
  controller.byobRequest?.respond(0);
51
51
  return;
52
52
  }
53
- buffer = readResult.value; // eslint-disable-line require-atomic-updates
53
+ buffer = readResult.value;
54
54
  }
55
55
  if (!isByobRequest) {
56
56
  controller.enqueue(buffer);
@@ -1,4 +1,4 @@
1
- const pattern = /(?=[A-Z])/u; // eslint-disable-line prefer-named-capture-group
1
+ const pattern = /(?=[A-Z])/u;
2
2
  export function toSnakeCase(value) {
3
3
  return value.split(pattern).join('_').toLowerCase();
4
4
  }
package/utils/timing.js CHANGED
@@ -21,8 +21,8 @@ export async function timeoutUntil(timestamp) {
21
21
  /** Timeout for specified duration */
22
22
  export async function cancelableTimeout(milliseconds, cancelSignal) {
23
23
  return firstValueFrom(race([
24
- timer(milliseconds).pipe(map(() => false)), // eslint-disable-line @typescript-eslint/no-unsafe-argument
25
- cancelSignal.set$.pipe(map(() => true)) // eslint-disable-line @typescript-eslint/no-unsafe-argument
24
+ timer(milliseconds).pipe(map(() => false)),
25
+ cancelSignal.set$.pipe(map(() => true))
26
26
  ]));
27
27
  }
28
28
  /** Timeout until specified time */
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-unsafe-function-type */
2
2
  /* eslint-disable @typescript-eslint/no-invalid-void-type */
3
- /* eslint-disable @typescript-eslint/no-unnecessary-type-parameters */
4
3
  import { supportsBlob, supportsReadableStream } from '../supports.js';
5
4
  import { AssertionError } from '../errors/assertion.error.js';
6
5
  export function assert(condition, message = 'assertion failed') {
package/utils/units.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-magic-numbers */
2
1
  /* Data sizes */
3
2
  export const kilobyte = 1000;
4
3
  export const megabyte = 1000 * kilobyte;
package/utils/z-base32.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-magic-numbers */
2
1
  import { Alphabet } from './alphabet.js';
3
2
  import { toUint8Array } from './binary.js';
4
3
  const alphabet = Alphabet.ZBase32;
package/.eslintrc.json DELETED
@@ -1,281 +0,0 @@
1
- {
2
- "root": true,
3
- "env": {
4
- "browser": true,
5
- "es2022": true,
6
- "worker": true
7
- },
8
- "extends": [
9
- "eslint:all",
10
- "plugin:@typescript-eslint/all",
11
- "plugin:import/recommended",
12
- "plugin:import/typescript",
13
- "plugin:@stylistic/disable-legacy"
14
- ],
15
- "settings": {
16
- "import/resolver": {
17
- "typescript": true
18
- }
19
- },
20
- "parser": "@typescript-eslint/parser",
21
- "parserOptions": {
22
- "ecmaVersion": "latest",
23
- "sourceType": "module",
24
- "project": true
25
- },
26
- "plugins": ["@stylistic"],
27
- "rules": {
28
- "camelcase": "off",
29
- "capitalized-comments": ["warn", "always", { "ignorePattern": "noop" }],
30
- "class-methods-use-this": "off",
31
- "complexity": "off",
32
- "consistent-type-definitions": "off",
33
- "eqeqeq": "off",
34
- "explicit-function-return-type": "off",
35
- "explicit-member-accessibility": "off",
36
- "func-style": ["warn", "declaration", { "allowArrowFunctions": true }],
37
- "id-length": "off",
38
- "init-declarations": "off",
39
- "line-comment-position": "off",
40
- "max-classes-per-file": "off",
41
- "max-lines-per-function": ["warn", { "max": 100, "skipBlankLines": true, "skipComments": true }],
42
- "max-lines": "off",
43
- "max-params": "off",
44
- "max-statements": "off",
45
- "new-cap": "off",
46
- "no-await-in-loop": "off",
47
- "no-bitwise": "off",
48
- "no-case-declarations": ["warn"],
49
- "no-confusing-void-expression": "off",
50
- "no-constant-condition": ["warn", { "checkLoops": false }],
51
- "no-continue": "off",
52
- "no-duplicate-imports": "off",
53
- "no-empty-interface": "off",
54
- "no-explicit-any": "off",
55
- "no-inferrable-types": "off",
56
- "no-inline-comments": "off",
57
- "no-magic-numbers": "off",
58
- "no-negated-condition": ["warn"],
59
- "no-nested-ternary": "off",
60
- "no-plusplus": "off",
61
- "no-promise-executor-return": "off",
62
- "no-restricted-imports": "off",
63
- "no-ternary": "off",
64
- "no-undefined": "off",
65
- "no-underscore-dangle": "off",
66
- "no-unnecessary-condition": "off",
67
- "no-unused-vars": "off",
68
- "no-use-before-define": "off",
69
- "no-void": ["warn", { "allowAsStatement": true }],
70
- "one-var": ["warn", "never"],
71
- "prefer-arrow-callback": ["warn"],
72
- "prefer-destructuring": "off",
73
- "prefer-named-capture-group": ["warn"],
74
- "restrict-template-expressions": "off",
75
- "sort-imports": ["off", { "ignoreCase": true }],
76
- "sort-keys": "off",
77
- "sort-type-constituents": "off",
78
-
79
- "@typescript-eslint/class-methods-use-this": ["warn", { "ignoreOverrideMethods": true, "ignoreClassesThatImplementAnInterface": true }],
80
- "@typescript-eslint/consistent-type-definitions": "off",
81
- "@typescript-eslint/consistent-type-imports": ["warn", { "prefer": "type-imports", "fixStyle": "inline-type-imports", "disallowTypeAnnotations": false }],
82
- "@typescript-eslint/explicit-function-return-type": ["warn", { "allowExpressions": true, "allowFunctionsWithoutTypeParameters": true }],
83
- "@typescript-eslint/explicit-member-accessibility": ["warn", { "accessibility": "no-public" }],
84
- "@typescript-eslint/init-declarations": "off",
85
- "@typescript-eslint/max-params": ["warn", { "max": 5 }],
86
- "@typescript-eslint/no-confusing-void-expression": ["warn", { "ignoreArrowShorthand": true, "ignoreVoidOperator": true }],
87
- "@typescript-eslint/no-empty-interface": ["warn", { "allowSingleExtends": true }],
88
- "@typescript-eslint/no-explicit-any": "off",
89
- "@typescript-eslint/no-inferrable-types": ["warn", { "ignoreParameters": true, "ignoreProperties": true }],
90
- "@typescript-eslint/no-invalid-void-type": ["warn", { "allowInGenericTypeArguments": true }],
91
- "@typescript-eslint/no-magic-numbers": ["warn", { "ignoreEnums": true, "ignoreNumericLiteralTypes": true, "ignoreReadonlyClassProperties": true, "ignoreArrayIndexes": true, "ignoreTypeIndexes": true, "ignore": [0, 1, 2, 4, 8, 16, 32, 64, 128, 192, 255, 256, 512, 1024, 2048, 4096, 8192] }],
92
- "@typescript-eslint/no-restricted-imports": ["warn"],
93
- "@typescript-eslint/no-unnecessary-condition": ["warn", { "allowConstantLoopConditions": true }],
94
- "@typescript-eslint/no-unsafe-assignment": "off",
95
- "@typescript-eslint/no-unsafe-type-assertion": "off",
96
- "@typescript-eslint/no-unused-vars": ["warn", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
97
- "@typescript-eslint/no-use-before-define": "off",
98
- "@typescript-eslint/prefer-destructuring": "off",
99
- "@typescript-eslint/restrict-template-expressions": ["warn", { "allowNumber": true, "allowBoolean": true, "allowNullish": true }],
100
- "@typescript-eslint/sort-type-constituents": "off",
101
- "@typescript-eslint/method-signature-style": "off",
102
-
103
- /* deprecated */
104
- "@typescript-eslint/no-non-null-assertion": "off",
105
- "@typescript-eslint/prefer-readonly-parameter-types": "off",
106
- "@typescript-eslint/explicit-module-boundary-types": "off",
107
-
108
- "@stylistic/brace-style": ["warn", "stroustrup", { "allowSingleLine": true }],
109
- "@stylistic/explicit-module-boundary-types": "off",
110
- "@stylistic/newline-per-chained-call": "off",
111
- "@stylistic/no-extra-parens": "off",
112
- "@stylistic/no-extraneous-class": "off",
113
- "@stylistic/no-non-null-assertion": "off",
114
- "@stylistic/no-type-alias": "off",
115
- "@stylistic/no-unused-vars-experimental": "off",
116
- "@stylistic/no-useless-constructor": "off",
117
- "@stylistic/prefer-readonly-parameter-types": ["off", { "checkParameterProperties": false }],
118
- "@stylistic/sort-type-union-intersection-members": "off",
119
- "@stylistic/space-before-function-paren": ["warn", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
120
- "@stylistic/typedef": "off",
121
-
122
- "import/consistent-type-specifier-style": ["off", "prefer-inline"],
123
- "import/newline-after-import": ["warn"],
124
- "import/no-absolute-path": ["warn"],
125
- "import/no-anonymous-default-export": ["warn"],
126
- "import/no-duplicates": ["warn", { "prefer-inline": true }],
127
- "import/no-empty-named-blocks": ["warn"],
128
- "import/no-extraneous-dependencies": ["off", { "devDependencies": false, "includeTypes": true }],
129
- "import/no-mutable-exports": ["warn"],
130
- "import/no-named-default": ["warn"],
131
- "import/no-nodejs-modules": ["warn"],
132
- "import/no-self-import": ["warn"],
133
- "import/no-unassigned-import": ["warn"],
134
- "import/no-useless-path-segments": ["warn"],
135
-
136
- /** misc */
137
- "@stylistic/lines-around-comment": ["warn", { "allowClassStart": true, "allowTypeStart": true }],
138
- "@stylistic/array-bracket-newline": ["warn", "consistent"],
139
- "@stylistic/array-element-newline": ["warn", "consistent"],
140
- "@stylistic/dot-location": ["warn", "property"],
141
- "@stylistic/function-call-argument-newline": ["warn", "consistent"],
142
- "@stylistic/function-paren-newline": ["warn", "consistent"],
143
- "@stylistic/linebreak-style": ["warn", "unix"],
144
- "@stylistic/lines-between-class-members": ["warn", "always", { "exceptAfterSingleLine": true }],
145
- "@stylistic/object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }],
146
- "@stylistic/operator-linebreak": ["warn", "before"],
147
- "@stylistic/padded-blocks": ["warn", "never"],
148
- "@stylistic/quote-props": ["warn", "consistent-as-needed"],
149
- "@stylistic/quotes": ["warn", "single"],
150
- "@stylistic/semi": ["warn", "always"],
151
- "@stylistic/multiline-ternary": ["warn", "always-multiline"],
152
- "@stylistic/generator-star-spacing": ["warn", {
153
- "named": "before",
154
- "anonymous": "neither",
155
- "method": "before"
156
- }],
157
- "@stylistic/indent": "off",
158
- "@stylistic/max-len": "off",
159
- "@stylistic/object-curly-spacing": ["warn", "always"],
160
-
161
- "@stylistic/member-delimiter-style": ["warn", {
162
- "multiline": {
163
- "delimiter": "comma",
164
- "requireLast": false
165
- },
166
- "singleline": {
167
- "delimiter": "comma",
168
- "requireLast": false
169
- },
170
- "overrides": {
171
- "interface": {
172
- "multiline": {
173
- "delimiter": "semi",
174
- "requireLast": true
175
- }
176
- }
177
- }
178
- }],
179
-
180
- "@typescript-eslint/naming-convention": [
181
- "warn",
182
- {
183
- "selector": "default",
184
- "format": ["camelCase"],
185
- "leadingUnderscore": "allowSingleOrDouble"
186
- },
187
- {
188
- "selector": "enumMember",
189
- "format": ["PascalCase"]
190
- },
191
- {
192
- "selector": "typeLike",
193
- "format": ["PascalCase"]
194
- }
195
- ],
196
-
197
- "@typescript-eslint/member-ordering": ["warn", {
198
- "default": [
199
- // Index signature
200
- "signature",
201
- "call-signature",
202
-
203
- // Fields
204
- "#private-static-field",
205
- "private-static-field",
206
- "protected-static-field",
207
- "public-static-field",
208
-
209
- /*
210
- "private-decorated-field",
211
- "protected-decorated-field",
212
- "public-decorated-field",
213
- */
214
-
215
- "#private-instance-field",
216
- "private-instance-field",
217
- "protected-instance-field",
218
- "public-instance-field",
219
-
220
- "protected-abstract-field",
221
- "public-abstract-field",
222
-
223
- "#private-field",
224
- "private-field",
225
- "protected-field",
226
- "public-field",
227
-
228
- "static-field",
229
- "instance-field",
230
- "abstract-field",
231
-
232
- // "decorated-field",
233
-
234
- "field",
235
-
236
- // Static initialization
237
- "static-initialization",
238
-
239
- // Constructors
240
- "public-constructor",
241
- "protected-constructor",
242
- "private-constructor",
243
-
244
- "constructor",
245
-
246
- // Methods
247
- "public-static-method",
248
- "protected-static-method",
249
- "private-static-method",
250
- "#private-static-method",
251
-
252
- /*
253
- "public-decorated-method",
254
- "protected-decorated-method",
255
- "private-decorated-method",
256
- */
257
-
258
- "public-instance-method",
259
- "protected-instance-method",
260
- "private-instance-method",
261
- "#private-instance-method",
262
-
263
- "public-abstract-method",
264
- "protected-abstract-method",
265
-
266
- "public-method",
267
- "protected-method",
268
- "private-method",
269
- "#private-method",
270
-
271
- "static-method",
272
- "instance-method",
273
- "abstract-method",
274
-
275
- // "decorated-method",
276
-
277
- "method"
278
- ]
279
- }]
280
- }
281
- }