@tstdl/base 0.92.144 → 0.92.147
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.
- package/ai/ai-file.service.d.ts +29 -1
- package/ai/ai-file.service.js +66 -23
- package/ai/ai-session.d.ts +28 -1
- package/ai/ai-session.js +27 -0
- package/ai/ai.service.d.ts +89 -5
- package/ai/ai.service.js +130 -27
- package/ai/functions.d.ts +7 -1
- package/ai/functions.js +7 -1
- package/ai/module.d.ts +8 -0
- package/ai/module.js +4 -0
- package/ai/types.d.ts +115 -2
- package/ai/types.js +16 -0
- package/api/client/client.d.ts +1 -1
- package/api/client/client.js +1 -1
- package/api/default-error-handlers.d.ts +1 -1
- package/api/index.d.ts +1 -9
- package/api/index.js +1 -9
- package/api/response.d.ts +1 -1
- package/api/server/api-controller.d.ts +1 -1
- package/api/server/error-handler.d.ts +1 -1
- package/api/server/gateway.d.ts +1 -5
- package/api/server/gateway.js +0 -4
- package/api/server/middlewares/catch-error.middleware.d.ts +1 -1
- package/api/server/module.d.ts +1 -1
- package/api/types.d.ts +1 -1
- package/application/application.d.ts +1 -1
- package/authentication/authentication.api.d.ts +36 -1
- package/authentication/authentication.api.js +28 -0
- package/authentication/client/api.client.d.ts +14 -1
- package/authentication/client/api.client.js +13 -0
- package/authentication/client/authentication.service.d.ts +104 -1
- package/authentication/client/authentication.service.js +103 -0
- package/authentication/client/http-client.middleware.d.ts +5 -0
- package/authentication/client/http-client.middleware.js +6 -2
- package/authentication/client/module.d.ts +20 -1
- package/authentication/client/module.js +6 -1
- package/authentication/client/tokens.d.ts +6 -0
- package/authentication/client/tokens.js +6 -0
- package/authentication/models/authentication-credentials.model.d.ts +6 -0
- package/authentication/models/authentication-credentials.model.js +6 -0
- package/authentication/models/authentication-session.model.d.ts +6 -0
- package/authentication/models/authentication-session.model.js +6 -0
- package/authentication/models/init-secret-reset-data.model.d.ts +10 -1
- package/authentication/models/init-secret-reset-data.model.js +10 -1
- package/authentication/models/token-payload-base.model.d.ts +24 -4
- package/authentication/models/token-payload-base.model.js +24 -4
- package/authentication/models/token.model.d.ts +33 -2
- package/authentication/server/authentication-ancillary.service.d.ts +27 -4
- package/authentication/server/authentication-ancillary.service.js +7 -0
- package/authentication/server/authentication-api-request-token.provider.d.ts +3 -0
- package/authentication/server/authentication-api-request-token.provider.js +3 -0
- package/authentication/server/authentication-secret-requirements.validator.d.ts +37 -0
- package/authentication/server/authentication-secret-requirements.validator.js +22 -0
- package/authentication/server/authentication.api-controller.d.ts +66 -1
- package/authentication/server/authentication.api-controller.js +65 -0
- package/authentication/server/authentication.service.d.ts +191 -11
- package/authentication/server/authentication.service.js +157 -8
- package/authentication/server/helper.d.ts +44 -5
- package/authentication/server/helper.js +43 -4
- package/authentication/server/module.d.ts +23 -1
- package/authentication/server/module.js +23 -1
- package/browser/browser-context-controller.d.ts +1 -1
- package/browser/browser-controller.d.ts +1 -1
- package/browser/browser-controller.js +1 -1
- package/browser/element-controller.d.ts +1 -1
- package/browser/locator-controller.d.ts +1 -1
- package/context/context.d.ts +1 -1
- package/data-structures/context-data-map.d.ts +1 -1
- package/database/mongo/mongo-base.repository.d.ts +1 -1
- package/database/mongo/types.d.ts +1 -1
- package/database/query.d.ts +1 -1
- package/document-management/models/document-assignment-task.model.js +1 -0
- package/document-management/models/document-management-table.d.ts +1 -1
- package/document-management/models/document-validation-definition.model.d.ts +1 -1
- package/document-management/models/document-validation-execution.model.js +1 -0
- package/document-management/models/document-workflow.model.js +3 -2
- package/document-management/server/api/document-management.api.d.ts +1 -1
- package/document-management/server/api/document-management.api.js +3 -3
- package/document-management/server/drizzle/{0000_parallel_mantis.sql → 0000_ordinary_pretty_boy.sql} +6 -3
- package/document-management/server/drizzle/meta/0000_snapshot.json +27 -2
- package/document-management/server/drizzle/meta/_journal.json +2 -2
- package/document-management/server/schemas.d.ts +1 -1
- package/document-management/server/services/document-collection.service.d.ts +2 -2
- package/document-management/server/services/document-management-ai.service.js +7 -5
- package/document-management/server/services/document-management-ancillary.service.d.ts +1 -1
- package/document-management/server/services/document-management-observation.service.d.ts +1 -1
- package/document-management/server/services/document-management.service.d.ts +1 -1
- package/document-management/server/services/document-management.service.js +1 -1
- package/document-management/server/services/document-property.service.d.ts +3 -3
- package/document-management/server/services/document-request.service.d.ts +2 -2
- package/document-management/server/services/document-request.service.js +1 -1
- package/document-management/server/services/document-tag.service.js +1 -1
- package/document-management/server/services/document-validation.service.d.ts +2 -2
- package/document-management/server/services/document-validation.service.js +2 -2
- package/document-management/server/services/document-workflow.service.d.ts +2 -2
- package/document-management/server/services/document-workflow.service.js +4 -4
- package/document-management/server/services/document.service.d.ts +1 -1
- package/document-management/server/services/singleton.d.ts +1 -1
- package/document-management/server/validators/ai-validation-executor.js +4 -4
- package/document-management/server/validators/single-document-validation-executor.js +1 -1
- package/document-management/server/validators/validator.d.ts +1 -1
- package/document-management/service-models/document-management.view-model.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-assignment.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-category.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-collection.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-request.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-type.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-requests-template-data.model.d.ts +1 -1
- package/dom/file-select-dialog.d.ts +1 -1
- package/enumeration/enumeration.d.ts +1 -1
- package/errors/custom.error.d.ts +3 -0
- package/errors/custom.error.js +0 -1
- package/errors/errors.localization.d.ts +1 -1
- package/errors/not-supported.error.d.ts +1 -1
- package/{formats.js → formats/formats.js} +3 -3
- package/formats/index.d.ts +1 -0
- package/formats/index.js +1 -0
- package/http/client/http-client-request.d.ts +1 -1
- package/http/client/http-client-response.d.ts +1 -1
- package/http/client/http-client.d.ts +1 -1
- package/http/client/module.d.ts +1 -1
- package/http/http-body.d.ts +1 -1
- package/http/http-value-map.d.ts +1 -1
- package/http/http.error.d.ts +1 -1
- package/http/server/http-server-request.d.ts +1 -1
- package/http/server/http-server-response.d.ts +1 -1
- package/http/types.d.ts +1 -1
- package/http/utils.d.ts +1 -1
- package/injector/decorators.d.ts +4 -4
- package/injector/index.d.ts +1 -1
- package/injector/index.js +1 -1
- package/injector/injector.d.ts +10 -1
- package/injector/injector.js +6 -0
- package/injector/interfaces.d.ts +1 -1
- package/injector/provider.d.ts +1 -1
- package/injector/resolution.d.ts +10 -5
- package/injector/resolve-chain.d.ts +2 -2
- package/injector/resolve-chain.js +1 -1
- package/injector/resolve.error.js +1 -1
- package/injector/token.d.ts +8 -1
- package/injector/token.js +7 -0
- package/injector/types.d.ts +1 -1
- package/key-value-store/key-value-store.provider.d.ts +2 -2
- package/key-value-store/key-value.store.d.ts +2 -2
- package/key-value-store/mongo/mongo-key-value-store.provider.d.ts +1 -1
- package/key-value-store/mongo/mongo-key-value.store.d.ts +1 -1
- package/key-value-store/postgres/key-value-store.service.d.ts +1 -1
- package/mail/mail.service.d.ts +1 -1
- package/mail/models/mail-data.model.d.ts +1 -1
- package/mail/models/mail-template.model.d.ts +1 -1
- package/mail/module.d.ts +1 -1
- package/module/index.d.ts +0 -1
- package/module/index.js +0 -1
- package/module/module-base.d.ts +1 -1
- package/module/module-metric-reporter.js +1 -1
- package/module/module.d.ts +1 -1
- package/module/modules/function.module.js +1 -1
- package/object-storage/object.d.ts +1 -1
- package/openid-connect/mongo-oidc-state.repository.d.ts +1 -1
- package/openid-connect/oidc.service.d.ts +1 -1
- package/orm/decorators.d.ts +2 -2
- package/orm/entity.d.ts +1 -1
- package/orm/index.d.ts +3 -3
- package/orm/index.js +3 -3
- package/orm/query.d.ts +1 -1
- package/orm/repository.types.d.ts +1 -1
- package/orm/schemas/json.d.ts +1 -1
- package/orm/server/database-schema.d.ts +1 -1
- package/orm/server/drizzle/schema-converter.d.ts +1 -1
- package/orm/server/repository.d.ts +1 -1
- package/orm/server/transaction.d.ts +1 -1
- package/orm/server/transactional.d.ts +3 -3
- package/orm/server/types.d.ts +1 -1
- package/orm/types.d.ts +1 -1
- package/package.json +24 -21
- package/queue/mongo/job.d.ts +1 -1
- package/queue/mongo/queue.js +31 -31
- package/queue/postgres/job.model.d.ts +1 -1
- package/queue/postgres/queue.d.ts +1 -1
- package/queue/postgres/queue.provider.d.ts +1 -1
- package/queue/provider.d.ts +1 -1
- package/reflection/decorators.d.ts +1 -1
- package/reflection/registry.d.ts +1 -1
- package/reflection/types.d.ts +1 -1
- package/reflection/utils.d.ts +1 -1
- package/rpc/model.d.ts +1 -1
- package/rxjs-utils/retry-backoff.js +2 -2
- package/schema/converters/openapi-converter.d.ts +1 -1
- package/schema/decorators/schema.d.ts +1 -1
- package/schema/decorators/utils.d.ts +1 -1
- package/schema/schema.d.ts +1 -1
- package/schema/schema.error.d.ts +1 -1
- package/schema/schemas/array.d.ts +1 -1
- package/schema/schemas/enumeration.d.ts +1 -1
- package/schema/schemas/function.d.ts +1 -1
- package/schema/schemas/instance.d.ts +1 -1
- package/schema/schemas/nullable.d.ts +1 -1
- package/schema/schemas/number.d.ts +1 -1
- package/schema/schemas/object.d.ts +1 -1
- package/schema/schemas/one-or-many.d.ts +1 -1
- package/schema/schemas/optional.d.ts +1 -1
- package/schema/schemas/simple.d.ts +1 -1
- package/search-index/elastic/model/index-mapping.d.ts +1 -1
- package/search-index/elastic/search-index.js +3 -4
- package/search-index/memory/memory-search-index.d.ts +1 -1
- package/search-index/memory/memory-search-index.js +1 -1
- package/serializer/handlers/binary.d.ts +1 -1
- package/serializer/serializable.d.ts +1 -1
- package/serializer/types.d.ts +1 -1
- package/templates/module.d.ts +1 -1
- package/templates/renderers/handlebars.template-renderer.d.ts +1 -1
- package/templates/renderers/jsx.template-renderer.d.ts +1 -1
- package/templates/renderers/mjml.template-renderer.d.ts +1 -1
- package/templates/renderers/string.template-renderer.d.ts +1 -1
- package/templates/resolvers/file.template-resolver.d.ts +1 -1
- package/templates/resolvers/jsx.template-resolver.d.ts +1 -1
- package/templates/resolvers/string.template-resolver.d.ts +1 -1
- package/templates/template.model.d.ts +1 -1
- package/templates/template.renderer.d.ts +1 -1
- package/templates/template.service.d.ts +1 -1
- package/text/dynamic-text.model.d.ts +1 -1
- package/text/localization.service.d.ts +1 -1
- package/types/geo-json.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/tagged.d.ts +1 -1
- package/{types.d.ts → types/types.d.ts} +2 -1
- package/utils/async-hook/async-hook.d.ts +109 -0
- package/utils/async-hook/async-hook.js +77 -3
- package/utils/backoff.d.ts +125 -43
- package/utils/backoff.js +140 -65
- package/utils/base64.d.ts +1 -1
- package/utils/base64.js +1 -2
- package/utils/binary.d.ts +1 -1
- package/utils/comparison.d.ts +5 -5
- package/utils/comparison.js +5 -3
- package/utils/cryptography.d.ts +1 -1
- package/utils/encoding.d.ts +1 -1
- package/utils/enum.d.ts +1 -1
- package/utils/equals.d.ts +1 -1
- package/utils/format-error.d.ts +1 -1
- package/utils/function/class.d.ts +1 -1
- package/utils/function/memoize.d.ts +1 -1
- package/utils/helpers.d.ts +1 -1
- package/utils/helpers.js +2 -2
- package/utils/jwt.d.ts +3 -3
- package/utils/merge.d.ts +1 -1
- package/utils/middleware.js +3 -3
- package/utils/object/decycle.d.ts +1 -1
- package/utils/object/forward-ref.d.ts +1 -1
- package/utils/object/lazy-property.d.ts +1 -1
- package/utils/object/object.d.ts +1 -1
- package/utils/object/property-name.d.ts +1 -1
- package/utils/patch-worker.d.ts +1 -1
- package/utils/reactive-value-to-signal.d.ts +1 -1
- package/utils/reflection.d.ts +1 -1
- package/utils/repl.d.ts +1 -1
- package/utils/singleton.d.ts +1 -1
- package/utils/stream/size-limited-stream.d.ts +1 -1
- package/utils/type/extends.d.ts +1 -1
- package/utils/type-guards.d.ts +1 -1
- package/utils/url-builder.d.ts +1 -1
- package/utils/z-base32.d.ts +1 -1
- package/module/utils.d.ts +0 -4
- package/module/utils.js +0 -21
- /package/{formats.d.ts → formats/formats.d.ts} +0 -0
- /package/{types.js → types/types.js} +0 -0
- /package/{web-types.d.ts → types/web-types.d.ts} +0 -0
- /package/{web-types.js → types/web-types.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Resolvable, resolveArgumentType } from '../injector/interfaces.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Record } from '../types/index.js';
|
|
3
3
|
/** Key value store module */
|
|
4
4
|
export type KeyValueStoreArgument = string;
|
|
5
|
-
export declare abstract class KeyValueStore<KV extends
|
|
5
|
+
export declare abstract class KeyValueStore<KV extends Record<string>> implements Resolvable<KeyValueStoreArgument> {
|
|
6
6
|
readonly module: string;
|
|
7
7
|
readonly [resolveArgumentType]: KeyValueStoreArgument;
|
|
8
8
|
constructor(module: string);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { KeyValueStore, KeyValueStoreProvider } from '../../key-value-store/index.js';
|
|
2
|
-
import type { StringMap } from '../../types.js';
|
|
2
|
+
import type { StringMap } from '../../types/index.js';
|
|
3
3
|
import { MongoKeyValueRepository } from './mongo-key-value.repository.js';
|
|
4
4
|
export declare class MongoKeyValueStoreProvider implements KeyValueStoreProvider {
|
|
5
5
|
private readonly keyValueRepository;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyValueStore } from '../../key-value-store/index.js';
|
|
2
|
-
import type { StringMap } from '../../types.js';
|
|
2
|
+
import type { StringMap } from '../../types/index.js';
|
|
3
3
|
import { MongoKeyValueRepository } from './mongo-key-value.repository.js';
|
|
4
4
|
export declare class MongoKeyValueStore<KV extends StringMap> extends KeyValueStore<KV> {
|
|
5
5
|
private readonly keyValueRepository;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type resolveArgumentType } from '../../injector/index.js';
|
|
2
2
|
import { Transactional } from '../../orm/server/index.js';
|
|
3
|
-
import type { Record } from '../../types.js';
|
|
3
|
+
import type { Record } from '../../types/index.js';
|
|
4
4
|
import { KeyValueStore, type KeyValueStoreArgument } from '../key-value.store.js';
|
|
5
5
|
export declare class PostgresKeyValueStore<KV extends Record<string, unknown>> extends Transactional implements KeyValueStore<KV> {
|
|
6
6
|
#private;
|
package/mail/mail.service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../types.js';
|
|
1
|
+
import type { TypedOmit } from '../types/index.js';
|
|
2
2
|
import { MailClientConfig } from './mail.client.js';
|
|
3
3
|
import { type MailData, type MailSendResult, type MailTemplate } from './models/index.js';
|
|
4
4
|
export declare class MailService {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Template, TemplateField } from '../../templates/template.model.js';
|
|
2
|
-
import type { Record } from '../../types.js';
|
|
2
|
+
import type { Record } from '../../types/index.js';
|
|
3
3
|
export type MailTemplate<Context extends Record = any> = Template<{
|
|
4
4
|
subject: false;
|
|
5
5
|
html: false;
|
package/mail/module.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DatabaseConfig } from '../orm/server/index.js';
|
|
2
|
-
import type { Type } from '../types.js';
|
|
2
|
+
import type { Type } from '../types/index.js';
|
|
3
3
|
import { MailClient, MailClientConfig } from './mail.client.js';
|
|
4
4
|
import type { DefaultMailData } from './models/index.js';
|
|
5
5
|
export declare class MailModuleConfig {
|
package/module/index.d.ts
CHANGED
package/module/index.js
CHANGED
package/module/module-base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CancellationSignal } from '../cancellation/index.js';
|
|
2
2
|
import { CancellationToken } from '../cancellation/index.js';
|
|
3
|
-
import type { StringMap } from '../types.js';
|
|
3
|
+
import type { StringMap } from '../types/index.js';
|
|
4
4
|
import type { Module, ModuleMetric } from './module.js';
|
|
5
5
|
import { ModuleState } from './module.js';
|
|
6
6
|
export declare abstract class ModuleBase implements Module {
|
package/module/module.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Collection, MongoEntityRepository } from '../database/mongo/index.js';
|
|
|
3
3
|
import type { Resolvable } from '../injector/index.js';
|
|
4
4
|
import { resolveArgumentType } from '../injector/index.js';
|
|
5
5
|
import { Logger } from '../logger/index.js';
|
|
6
|
-
import type { TypedOmit } from '../types.js';
|
|
6
|
+
import type { TypedOmit } from '../types/index.js';
|
|
7
7
|
import type { OidcState } from './oidc-state.model.js';
|
|
8
8
|
import { OidcStateRepository } from './oidc-state.repository.js';
|
|
9
9
|
export type MongoOidcState = TypedOmit<OidcState, 'expiration'> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '../http/client/index.js';
|
|
2
|
-
import type { Record } from '../types.js';
|
|
2
|
+
import type { Record } from '../types/index.js';
|
|
3
3
|
import { OidcConfigurationService } from './oidc-configuration.service.js';
|
|
4
4
|
import type { OidcState } from './oidc-state.model.js';
|
|
5
5
|
import { OidcStateRepository } from './oidc-state.repository.js';
|
package/orm/decorators.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { SQL } from 'drizzle-orm';
|
|
6
6
|
import type { LiteralUnion } from 'type-fest';
|
|
7
|
-
import type { AbstractConstructor, TypedOmit } from '../types.js';
|
|
7
|
+
import type { AbstractConstructor, TypedOmit } from '../types/index.js';
|
|
8
8
|
import type { AnyEntity, Entity, EntityType, EntityWithoutMetadata } from './entity.js';
|
|
9
9
|
import type { Query } from './query.js';
|
|
10
10
|
import type { TargetColumnPaths } from './repository.types.js';
|
|
@@ -121,7 +121,7 @@ export declare function createColumnDecorator(data?: OrmColumnReflectionData): P
|
|
|
121
121
|
* @param data - The ORM reflection data to add.
|
|
122
122
|
* @returns A class or property decorator.
|
|
123
123
|
*/
|
|
124
|
-
export declare function createTableAndColumnDecorator(data?: OrmColumnReflectionData):
|
|
124
|
+
export declare function createTableAndColumnDecorator(data?: OrmColumnReflectionData): PropertyDecorator & ClassDecorator;
|
|
125
125
|
/**
|
|
126
126
|
* Decorator to specify ORM column options.
|
|
127
127
|
* @param options - Column configuration options.
|
package/orm/entity.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Type } from '../types.js';
|
|
1
|
+
import type { Type } from '../types/index.js';
|
|
2
2
|
import { Embedded, type HasDefault, type IsPrimaryKey, Json, Timestamp, Uuid } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Represents the type (constructor) of an entity, potentially holding an entity name.
|
package/orm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* {@include ./README.md}
|
|
3
|
+
*
|
|
4
|
+
* @module ORM
|
|
5
5
|
*/
|
|
6
6
|
export * from './data-types/index.js';
|
|
7
7
|
export * from './entity.js';
|
package/orm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* {@include ./README.md}
|
|
3
|
+
*
|
|
4
|
+
* @module ORM
|
|
5
5
|
*/
|
|
6
6
|
export * from './data-types/index.js';
|
|
7
7
|
export * from './entity.js';
|
package/orm/query.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Supports logical operators, comparison operators, and specialized queries like text search and geospatial queries.
|
|
5
5
|
*/
|
|
6
6
|
import type { SQLWrapper } from 'drizzle-orm';
|
|
7
|
-
import type { Flatten, Record } from '../types.js';
|
|
7
|
+
import type { Flatten, Record } from '../types/index.js';
|
|
8
8
|
import type { Geometry } from '../types/geo-json.js';
|
|
9
9
|
import type { UntaggedDeep } from '../types/tagged.js';
|
|
10
10
|
/** Represents a logical query combining multiple sub-queries (e.g., $and, $or, $nor). */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Defines types used by ORM repositories for operations like loading, updating, and creating entities.
|
|
4
4
|
* Includes types for ordering, loading options, and entity data structures for create/update operations.
|
|
5
5
|
*/
|
|
6
|
-
import type { Paths, Record, TypedOmit } from '../types.js';
|
|
6
|
+
import type { Paths, Record, TypedOmit } from '../types/index.js';
|
|
7
7
|
import type { UntaggedDeep } from '../types/tagged.js';
|
|
8
8
|
import type { SQL, SQLWrapper } from 'drizzle-orm';
|
|
9
9
|
import type { PartialDeep } from 'type-fest';
|
package/orm/schemas/json.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JsonPath } from '../../json-path/json-path.js';
|
|
2
2
|
import { type Decorator } from '../../reflection/index.js';
|
|
3
3
|
import { Schema, type SchemaDecoratorOptions, type SchemaTestable, type SchemaTestOptions, type SchemaTestResult } from '../../schema/index.js';
|
|
4
|
-
import type { TypedOmit } from '../../types.js';
|
|
4
|
+
import type { TypedOmit } from '../../types/index.js';
|
|
5
5
|
export type JsonSchemaOptions<T> = {
|
|
6
6
|
schema?: SchemaTestable<T>;
|
|
7
7
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* within a specific PostgreSQL schema.
|
|
5
5
|
*/
|
|
6
6
|
import type { PgEnum } from 'drizzle-orm/pg-core';
|
|
7
|
-
import type { Enumeration, EnumerationValue, UnionToTuple } from '../../types.js';
|
|
7
|
+
import type { Enumeration, EnumerationValue, UnionToTuple } from '../../types/index.js';
|
|
8
8
|
import type { EntityType } from '../entity.js';
|
|
9
9
|
import type { PgTableFromType } from './types.js';
|
|
10
10
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PgEnum, type PgSchema, type PgTableWithColumns } from 'drizzle-orm/pg-core';
|
|
2
|
-
import type { AbstractConstructor, Enumeration } from '../../../types.js';
|
|
2
|
+
import type { AbstractConstructor, Enumeration } from '../../../types/index.js';
|
|
3
3
|
import type { EntityType } from '../../entity.js';
|
|
4
4
|
import type { ColumnDefinition, ColumnDefinitionsMap, PgTableFromType } from '../types.js';
|
|
5
5
|
type ConverterContext = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SQL } from 'drizzle-orm';
|
|
2
2
|
import type { PgColumn, PgInsertValue, PgUpdateSetSource } from 'drizzle-orm/pg-core';
|
|
3
3
|
import { type Resolvable, resolveArgumentType } from '../../injector/interfaces.js';
|
|
4
|
-
import type { DeepPartial, OneOrMany, Paths, Type } from '../../types.js';
|
|
4
|
+
import type { DeepPartial, OneOrMany, Paths, Type } from '../../types/index.js';
|
|
5
5
|
import type { UntaggedDeep } from '../../types/index.js';
|
|
6
6
|
import { Entity, type EntityMetadataAttributes, type EntityType, type EntityWithoutMetadata } from '../entity.js';
|
|
7
7
|
import type { Query } from '../query.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PgTransaction as DrizzlePgTransaction, type PgQueryResultHKT, type PgTransactionConfig } from 'drizzle-orm/pg-core';
|
|
2
2
|
import { DeferredPromise } from '../../promise/deferred-promise.js';
|
|
3
|
-
import type { Record } from '../../types.js';
|
|
3
|
+
import type { Record } from '../../types/index.js';
|
|
4
4
|
import type { Database } from './database.js';
|
|
5
5
|
export type PgTransaction = DrizzlePgTransaction<PgQueryResultHKT, Record, Record>;
|
|
6
6
|
export { DrizzlePgTransaction };
|
|
@@ -15,9 +15,9 @@ type TransactionalContext<ContextData = unknown> = {
|
|
|
15
15
|
data: ContextData;
|
|
16
16
|
};
|
|
17
17
|
declare const getCurrentTransactionalContext: {
|
|
18
|
-
(required: true, debugFn: import("../../types.js").Function): TransactionalContext<unknown>;
|
|
19
|
-
(required?: false, debugFn?: import("../../types.js").Function): TransactionalContext<unknown> | null;
|
|
20
|
-
(required: boolean, debugFn: import("../../types.js").Function): TransactionalContext<unknown> | null;
|
|
18
|
+
(required: true, debugFn: import("../../types/index.js").Function): TransactionalContext<unknown>;
|
|
19
|
+
(required?: false, debugFn?: import("../../types/index.js").Function): TransactionalContext<unknown> | null;
|
|
20
|
+
(required: boolean, debugFn: import("../../types/index.js").Function): TransactionalContext<unknown> | null;
|
|
21
21
|
}, runInTransactionalContext: <ReturnT>(context: TransactionalContext<unknown>, fn: () => ReturnT) => ReturnT, isInTransactionalContext: () => boolean;
|
|
22
22
|
export { getCurrentTransactionalContext, isInTransactionalContext, runInTransactionalContext };
|
|
23
23
|
export declare abstract class Transactional<ContextData = unknown> {
|
package/orm/server/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { PgColumnBuilder, PgTableWithColumns } from 'drizzle-orm/pg-core';
|
|
|
3
3
|
import type { CamelCase, ConditionalPick, SnakeCase } from 'type-fest';
|
|
4
4
|
import type { JsonPath } from '../../json-path/json-path.js';
|
|
5
5
|
import type { Record } from '../../schema/index.js';
|
|
6
|
-
import type { UnionToIntersection } from '../../types.js';
|
|
6
|
+
import type { UnionToIntersection } from '../../types/index.js';
|
|
7
7
|
import type { Tagged } from '../../types/index.js';
|
|
8
8
|
import type { OrmColumnReflectionData } from '../decorators.js';
|
|
9
9
|
import type { EntityType } from '../entity.js';
|
package/orm/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type { $Type, HasDefault as DrizzleHasDefault, IsPrimaryKey as DrizzleIsPrimaryKey } from 'drizzle-orm';
|
|
8
8
|
import type { boolean, doublePrecision, integer, jsonb, PgColumnBuilder, PgColumnBuilderBase, PgEnumColumnBuilderInitial, text, uuid } from 'drizzle-orm/pg-core';
|
|
9
9
|
import { Array, Integer } from '../schema/index.js';
|
|
10
|
-
import type { AbstractConstructor, EnumerationObject, EnumerationValue, ObjectLiteral, UnionToTuple } from '../types.js';
|
|
10
|
+
import type { AbstractConstructor, EnumerationObject, EnumerationValue, ObjectLiteral, UnionToTuple } from '../types/index.js';
|
|
11
11
|
import type { GetTagMetadata, HasTag, Tagged, UnwrapTagged } from '../types/index.js';
|
|
12
12
|
import type { bytea, numericDate, timestamp } from './data-types/index.js';
|
|
13
13
|
import { Check, Column, Embedded, Encrypted, Index, PrimaryKey, References, Table, Unique } from './decorators.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.92.
|
|
3
|
+
"version": "0.92.147",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"generate:migration:mail": "drizzle-kit generate --config dist/mail/drizzle.config.js",
|
|
24
24
|
"generate:migration:queue": "drizzle-kit generate --config dist/queue/postgres/drizzle.config.js",
|
|
25
25
|
"generate:migration:key-value-store": "drizzle-kit generate --config dist/key-value-store/postgres/drizzle.config.js",
|
|
26
|
+
"generate:readmes": "deno run --allow-run=repomix --allow-read=source --allow-write=source --allow-net=generativelanguage.googleapis.com --allow-env=GEMINI_API_KEY generate-readmes.ts",
|
|
27
|
+
"generate:readmes:new-only": "npm run generate:readmes -- --skip-existing",
|
|
26
28
|
"copy:orm": "npm run copy:orm:document-management && npm run copy:orm:authentication && npm run copy:orm:mail && npm run copy:orm:queue && npm run copy:orm:key-value-store",
|
|
27
29
|
"copy:orm:document-management": "rm -rf ./dist/document-management/server/drizzle && cp -r ./source/document-management/server/drizzle ./dist/document-management/server/",
|
|
28
30
|
"copy:orm:authentication": "rm -rf ./dist/authentication/server/drizzle && cp -r ./source/authentication/server/drizzle ./dist/authentication/server/",
|
|
@@ -35,14 +37,11 @@
|
|
|
35
37
|
"./eslint.config.js": "./eslint.config.js",
|
|
36
38
|
".": "./index.js",
|
|
37
39
|
"./environment": "./environment.js",
|
|
38
|
-
"./formats": "./formats.js",
|
|
39
40
|
"./interfaces": "./interfaces.js",
|
|
40
41
|
"./polyfills": "./polyfills.js",
|
|
41
42
|
"./process-shutdown": "./process-shutdown.js",
|
|
42
43
|
"./supports": "./supports.js",
|
|
43
44
|
"./tokens": "./tokens.js",
|
|
44
|
-
"./types": "./types.js",
|
|
45
|
-
"./web-types": "./web-types.js",
|
|
46
45
|
"./ai": "./ai/index.js",
|
|
47
46
|
"./api": "./api/index.js",
|
|
48
47
|
"./api/client": "./api/client/index.js",
|
|
@@ -68,6 +67,7 @@
|
|
|
68
67
|
"./errors": "./errors/index.js",
|
|
69
68
|
"./file": "./file/index.js",
|
|
70
69
|
"./file/server": "./file/server/index.js",
|
|
70
|
+
"./formats": "./formats/index.js",
|
|
71
71
|
"./function": "./function/index.js",
|
|
72
72
|
"./http": "./http/index.js",
|
|
73
73
|
"./http/node": "./http/server/node/index.js",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"./theme": "./theme/index.js",
|
|
125
125
|
"./theme/adapters": "./theme/adapters/index.js",
|
|
126
126
|
"./threading": "./threading/index.js",
|
|
127
|
-
"./types
|
|
127
|
+
"./types": "./types/index.js",
|
|
128
128
|
"./utils": "./utils/index.js",
|
|
129
129
|
"./utils/array": "./utils/array/index.js",
|
|
130
130
|
"./utils/async-hook": "./utils/async-hook/index.js",
|
|
@@ -139,16 +139,16 @@
|
|
|
139
139
|
"dependencies": {
|
|
140
140
|
"disposablestack": "^1.1",
|
|
141
141
|
"jsondiffpatch": "^0.7",
|
|
142
|
-
"luxon": "^3.
|
|
142
|
+
"luxon": "^3.7",
|
|
143
143
|
"reflect-metadata": "^0.2",
|
|
144
144
|
"rxjs": "^7.8",
|
|
145
|
-
"ts-pattern": "^5.
|
|
145
|
+
"ts-pattern": "^5.8",
|
|
146
146
|
"type-fest": "4.37"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
|
-
"@elastic/elasticsearch": "^9.
|
|
150
|
-
"@google-cloud/storage": "7.16",
|
|
151
|
-
"@google/genai": "^1.
|
|
149
|
+
"@elastic/elasticsearch": "^9.1",
|
|
150
|
+
"@google-cloud/storage": "^7.16",
|
|
151
|
+
"@google/genai": "^1.14",
|
|
152
152
|
"@tstdl/angular": "^0.92",
|
|
153
153
|
"@zxcvbn-ts/core": "^3.0",
|
|
154
154
|
"@zxcvbn-ts/language-common": "^3.0",
|
|
@@ -160,14 +160,14 @@
|
|
|
160
160
|
"handlebars": "^4.7",
|
|
161
161
|
"minio": "^8.0",
|
|
162
162
|
"mjml": "^4.15",
|
|
163
|
-
"mongodb": "^6.
|
|
163
|
+
"mongodb": "^6.18",
|
|
164
164
|
"nodemailer": "^7.0",
|
|
165
165
|
"pg": "^8.16",
|
|
166
|
-
"playwright": "^1.
|
|
167
|
-
"preact": "^10.
|
|
166
|
+
"playwright": "^1.54",
|
|
167
|
+
"preact": "^10.27",
|
|
168
168
|
"preact-render-to-string": "^6.5",
|
|
169
169
|
"sharp": "^0.34",
|
|
170
|
-
"undici": "^7.
|
|
170
|
+
"undici": "^7.13",
|
|
171
171
|
"urlpattern-polyfill": "^10.1"
|
|
172
172
|
},
|
|
173
173
|
"peerDependenciesMeta": {
|
|
@@ -176,23 +176,26 @@
|
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
"devDependencies": {
|
|
179
|
-
"@stylistic/eslint-plugin": "
|
|
179
|
+
"@stylistic/eslint-plugin": "5.2",
|
|
180
180
|
"@types/chroma-js": "2.4",
|
|
181
181
|
"@types/koa__router": "12.0",
|
|
182
|
-
"@types/luxon": "3.
|
|
182
|
+
"@types/luxon": "3.7",
|
|
183
183
|
"@types/minio": "7.1",
|
|
184
184
|
"@types/mjml": "4.7",
|
|
185
185
|
"@types/node": "24",
|
|
186
186
|
"@types/nodemailer": "6.4",
|
|
187
187
|
"@types/pg": "8.15",
|
|
188
|
-
"concurrently": "9.
|
|
188
|
+
"concurrently": "9.2",
|
|
189
189
|
"drizzle-kit": "0.31",
|
|
190
|
-
"eslint": "9.
|
|
191
|
-
"globals": "16.
|
|
190
|
+
"eslint": "9.33",
|
|
191
|
+
"globals": "16.3",
|
|
192
|
+
"repomix": "1.3",
|
|
192
193
|
"tsc-alias": "1.8",
|
|
193
|
-
"typedoc-
|
|
194
|
+
"typedoc-github-wiki-theme": "2.1",
|
|
195
|
+
"typedoc-plugin-markdown": "4.8",
|
|
196
|
+
"typedoc-plugin-missing-exports": "4.1",
|
|
194
197
|
"typescript": "5.8",
|
|
195
|
-
"typescript-eslint": "8.
|
|
198
|
+
"typescript-eslint": "8.39"
|
|
196
199
|
},
|
|
197
200
|
"overrides": {
|
|
198
201
|
"drizzle-kit": {
|
package/queue/mongo/job.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Entity, NewEntity } from '../../database/index.js';
|
|
2
2
|
import type { Job } from '../../queue/index.js';
|
|
3
|
-
import type { TypedOmit } from '../../types.js';
|
|
3
|
+
import type { TypedOmit } from '../../types/index.js';
|
|
4
4
|
export type MongoJob<T = unknown> = Entity & TypedOmit<Job<T>, 'id'> & {
|
|
5
5
|
queue: string;
|
|
6
6
|
jobId: string;
|
package/queue/mongo/queue.js
CHANGED
|
@@ -30,7 +30,7 @@ const backoffOptions = {
|
|
|
30
30
|
strategy: 'exponential',
|
|
31
31
|
initialDelay: 100,
|
|
32
32
|
increase: 2,
|
|
33
|
-
maximumDelay: 5000
|
|
33
|
+
maximumDelay: 5000,
|
|
34
34
|
};
|
|
35
35
|
let MongoQueue = class MongoQueue extends Queue {
|
|
36
36
|
repository;
|
|
@@ -59,7 +59,7 @@ let MongoQueue = class MongoQueue extends Queue {
|
|
|
59
59
|
enqueueTimestamp: currentTimestamp(),
|
|
60
60
|
tries: 0,
|
|
61
61
|
lastDequeueTimestamp: 0,
|
|
62
|
-
batch: null
|
|
62
|
+
batch: null,
|
|
63
63
|
};
|
|
64
64
|
const job = (uniqueTag == undefined)
|
|
65
65
|
? await this.repository.insert(newJob)
|
|
@@ -81,7 +81,7 @@ let MongoQueue = class MongoQueue extends Queue {
|
|
|
81
81
|
enqueueTimestamp: now,
|
|
82
82
|
tries: 0,
|
|
83
83
|
lastDequeueTimestamp: 0,
|
|
84
|
-
batch: null
|
|
84
|
+
batch: null,
|
|
85
85
|
};
|
|
86
86
|
switch (options?.uniqueTag) {
|
|
87
87
|
case undefined:
|
|
@@ -100,7 +100,7 @@ let MongoQueue = class MongoQueue extends Queue {
|
|
|
100
100
|
const [nonUniqueJobs] = await Promise.all([
|
|
101
101
|
(nonUnique.length > 0) ? this.repository.insertMany(nonUnique) : [],
|
|
102
102
|
(keepOld.length > 0) ? this.repository.bulkInsertWithUniqueTagStrategy(keepOld, UniqueTagStrategy.KeepOld) : undefined,
|
|
103
|
-
(takeNew.length > 0) ? this.repository.bulkInsertWithUniqueTagStrategy(takeNew, UniqueTagStrategy.TakeNew) : undefined
|
|
103
|
+
(takeNew.length > 0) ? this.repository.bulkInsertWithUniqueTagStrategy(takeNew, UniqueTagStrategy.TakeNew) : undefined,
|
|
104
104
|
]);
|
|
105
105
|
if (options?.returnJobs == true) {
|
|
106
106
|
const keepOldTags = keepOld.map((job) => job.tag);
|
|
@@ -111,19 +111,19 @@ let MongoQueue = class MongoQueue extends Queue {
|
|
|
111
111
|
return undefined;
|
|
112
112
|
}
|
|
113
113
|
async has(id) {
|
|
114
|
-
return this.repository.hasByFilter({ queue: this.queueKey, jobId: id });
|
|
114
|
+
return await this.repository.hasByFilter({ queue: this.queueKey, jobId: id });
|
|
115
115
|
}
|
|
116
116
|
async countByTag(tag) {
|
|
117
|
-
return this.repository.countByFilter({ queue: this.queueKey, tag });
|
|
117
|
+
return await this.repository.countByFilter({ queue: this.queueKey, tag });
|
|
118
118
|
}
|
|
119
119
|
async get(id) {
|
|
120
|
-
return this.repository.tryLoadByFilter({ queue: this.queueKey, jobId: id });
|
|
120
|
+
return await this.repository.tryLoadByFilter({ queue: this.queueKey, jobId: id });
|
|
121
121
|
}
|
|
122
122
|
async getByTag(tag) {
|
|
123
|
-
return this.repository.loadManyByFilter({ queue: this.queueKey, tag });
|
|
123
|
+
return await this.repository.loadManyByFilter({ queue: this.queueKey, tag });
|
|
124
124
|
}
|
|
125
125
|
async getByTags(tags) {
|
|
126
|
-
return this.repository.loadManyByFilter({ queue: this.queueKey, tag: { $in: tags } });
|
|
126
|
+
return await this.repository.loadManyByFilter({ queue: this.queueKey, tag: { $in: tags } });
|
|
127
127
|
}
|
|
128
128
|
async cancel(id) {
|
|
129
129
|
await this.repository.deleteByFilter({ queue: this.queueKey, jobId: id });
|
|
@@ -145,8 +145,8 @@ let MongoQueue = class MongoQueue extends Queue {
|
|
|
145
145
|
priority: 1,
|
|
146
146
|
enqueueTimestamp: 1,
|
|
147
147
|
lastDequeueTimestamp: 1,
|
|
148
|
-
tries: 1
|
|
149
|
-
}
|
|
148
|
+
tries: 1,
|
|
149
|
+
},
|
|
150
150
|
});
|
|
151
151
|
return isUndefined(job) ? undefined : toModelJob(job);
|
|
152
152
|
}
|
|
@@ -161,8 +161,8 @@ let MongoQueue = class MongoQueue extends Queue {
|
|
|
161
161
|
[priorityProperty]: 1,
|
|
162
162
|
[enqueueTimestampProperty]: 1,
|
|
163
163
|
[lastDequeueTimestampProperty]: 1,
|
|
164
|
-
[triesProperty]: 1
|
|
165
|
-
}
|
|
164
|
+
[triesProperty]: 1,
|
|
165
|
+
},
|
|
166
166
|
},
|
|
167
167
|
{ $limit: count },
|
|
168
168
|
{
|
|
@@ -173,47 +173,47 @@ let MongoQueue = class MongoQueue extends Queue {
|
|
|
173
173
|
$set: {
|
|
174
174
|
[triesProperty]: { $add: [`$${triesProperty}`, 1] },
|
|
175
175
|
[lastDequeueTimestampProperty]: currentTimestamp(),
|
|
176
|
-
[batchProperty]: batch
|
|
177
|
-
}
|
|
178
|
-
}
|
|
176
|
+
[batchProperty]: batch,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
179
|
],
|
|
180
|
-
whenNotMatched: 'discard'
|
|
181
|
-
}
|
|
182
|
-
}
|
|
180
|
+
whenNotMatched: 'discard',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
183
|
]).next();
|
|
184
184
|
});
|
|
185
185
|
const jobs = await this.repository.loadManyByFilter({ queue: this.queueKey, batch });
|
|
186
186
|
return jobs.map(toModelJob);
|
|
187
187
|
}
|
|
188
188
|
async acknowledge(job) {
|
|
189
|
-
return this.cancel(job.id);
|
|
189
|
+
return await this.cancel(job.id);
|
|
190
190
|
}
|
|
191
191
|
async acknowledgeMany(jobs) {
|
|
192
192
|
const jobIds = jobs.map((job) => job.id);
|
|
193
|
-
return this.cancelMany(jobIds);
|
|
193
|
+
return await this.cancelMany(jobIds);
|
|
194
194
|
}
|
|
195
195
|
async *getConsumer(cancellationSignal) {
|
|
196
196
|
const continueToken = CancellationToken.from(this.messageBus.allMessages$);
|
|
197
|
-
for await (const backoff of backoffGenerator(backoffOptions, cancellationSignal)) {
|
|
197
|
+
for await (const backoff of backoffGenerator({ ...backoffOptions, cancellationSignal })) {
|
|
198
198
|
const job = await this.dequeue();
|
|
199
199
|
if (job != undefined) {
|
|
200
200
|
yield job;
|
|
201
201
|
}
|
|
202
202
|
else {
|
|
203
|
-
backoff(continueToken);
|
|
203
|
+
backoff({ continueToken });
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
continueToken.complete();
|
|
207
207
|
}
|
|
208
208
|
async *getBatchConsumer(size, cancellationSignal) {
|
|
209
209
|
const continueToken = CancellationToken.from(this.messageBus.allMessages$);
|
|
210
|
-
for await (const backoff of backoffGenerator(backoffOptions, cancellationSignal)) {
|
|
210
|
+
for await (const backoff of backoffGenerator({ ...backoffOptions, cancellationSignal })) {
|
|
211
211
|
const jobs = await this.dequeueMany(size);
|
|
212
212
|
if (jobs.length > 0) {
|
|
213
213
|
yield jobs;
|
|
214
214
|
}
|
|
215
215
|
else {
|
|
216
|
-
backoff(continueToken);
|
|
216
|
+
backoff({ continueToken });
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
continueToken.complete();
|
|
@@ -229,8 +229,8 @@ MongoQueue = __decorate([
|
|
|
229
229
|
return provider.get(argument, defaultQueueConfig);
|
|
230
230
|
}
|
|
231
231
|
return provider.get(argument.name, { ...defaultQueueConfig, ...argument });
|
|
232
|
-
}
|
|
233
|
-
}
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
234
|
}),
|
|
235
235
|
__metadata("design:paramtypes", [MongoJobRepository, Lock, MessageBusProvider, String, Object])
|
|
236
236
|
], MongoQueue);
|
|
@@ -243,7 +243,7 @@ function toModelJob(mongoJob) {
|
|
|
243
243
|
data: mongoJob.data,
|
|
244
244
|
enqueueTimestamp: mongoJob.enqueueTimestamp,
|
|
245
245
|
lastDequeueTimestamp: mongoJob.lastDequeueTimestamp,
|
|
246
|
-
tries: mongoJob.tries
|
|
246
|
+
tries: mongoJob.tries,
|
|
247
247
|
};
|
|
248
248
|
return job;
|
|
249
249
|
}
|
|
@@ -253,14 +253,14 @@ function getDequeueFindParameters(queueKey, maxTries, processTimeout, batch = nu
|
|
|
253
253
|
const filter = {
|
|
254
254
|
queue: queueKey,
|
|
255
255
|
tries: { $lt: maxTries },
|
|
256
|
-
lastDequeueTimestamp: { $lte: maximumLastDequeueTimestamp }
|
|
256
|
+
lastDequeueTimestamp: { $lte: maximumLastDequeueTimestamp },
|
|
257
257
|
};
|
|
258
258
|
const update = {
|
|
259
259
|
$inc: { tries: 1 },
|
|
260
260
|
$set: {
|
|
261
261
|
lastDequeueTimestamp: now,
|
|
262
|
-
batch
|
|
263
|
-
}
|
|
262
|
+
batch,
|
|
263
|
+
},
|
|
264
264
|
};
|
|
265
265
|
return { filter, update };
|
|
266
266
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EntityWithoutMetadata } from '../../orm/entity.js';
|
|
2
2
|
import { Integer, Json, Timestamp } from '../../orm/index.js';
|
|
3
|
-
import type { ObjectLiteral } from '../../types.js';
|
|
3
|
+
import type { ObjectLiteral } from '../../types/index.js';
|
|
4
4
|
import type { Job } from '../queue.js';
|
|
5
5
|
export declare class PostgresJob<T extends ObjectLiteral = ObjectLiteral> extends EntityWithoutMetadata implements Job<T> {
|
|
6
6
|
queue: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CancellationSignal } from '../../cancellation/index.js';
|
|
2
|
-
import type { ObjectLiteral } from '../../types.js';
|
|
2
|
+
import type { ObjectLiteral } from '../../types/index.js';
|
|
3
3
|
import { Queue, type EnqueueManyItem, type EnqueueManyOptions, type EnqueueOneOptions, type Job, type JobTag } from '../queue.js';
|
|
4
4
|
export declare class PostgresQueue<T extends ObjectLiteral> extends Queue<T> {
|
|
5
5
|
#private;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueueProvider, type QueueConfig } from '../../queue/index.js';
|
|
2
|
-
import type { ObjectLiteral } from '../../types.js';
|
|
2
|
+
import type { ObjectLiteral } from '../../types/index.js';
|
|
3
3
|
import { PostgresQueue } from './queue.js';
|
|
4
4
|
export declare class PostgresQueueProvider extends QueueProvider {
|
|
5
5
|
#private;
|