@guren/server 2.15.0 → 2.16.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.
- package/dist/{DocsViewerServiceProvider-qFCaeiUv.js → DocsViewerServiceProvider-D2cuVgtN.js} +7 -12
- package/dist/{Hash-C8aejmi8.js → Hash-D2DFd8xX.js} +7 -57
- package/dist/{HttpException-BkS3euNG.js → HttpException-BlQ2yEmT.js} +2 -79
- package/dist/{Job-BVT813DO.js → Job-DxQK8h3P.js} +24 -179
- package/dist/{McpServiceProvider-BawsYjgN.js → McpServiceProvider-nNcbCIQX.js} +11 -20
- package/dist/{Random-DbIJ22KQ.js → Random-S0OvCuR8.js} +9 -106
- package/dist/agent/AgentApprovalRequested.d.ts +11 -39
- package/dist/agent/approval.d.ts +76 -187
- package/dist/agent/audit-emitter.d.ts +16 -44
- package/dist/agent/audit.d.ts +20 -56
- package/dist/agent/derive.d.ts +32 -66
- package/dist/agent/dispatch.d.ts +38 -90
- package/dist/agent/events.d.ts +11 -19
- package/dist/agent/meta-tools.d.ts +18 -46
- package/dist/agent/public.d.ts +6 -25
- package/dist/agent/public.js +1 -1
- package/dist/agent/redact.d.ts +16 -38
- package/dist/agent/scopes.d.ts +23 -69
- package/dist/auth/AuthManager.d.ts +19 -40
- package/dist/auth/AuthenticatableModel.d.ts +2 -2
- package/dist/auth/SessionGuard.d.ts +0 -1
- package/dist/auth/TokenGuard.d.ts +6 -26
- package/dist/auth/api-token.d.ts +16 -148
- package/dist/auth/context.d.ts +5 -10
- package/dist/auth/email-verification.d.ts +29 -127
- package/dist/auth/index.js +1 -1
- package/dist/auth/oauth/index.d.ts +35 -57
- package/dist/auth/password/DefaultHasher.d.ts +5 -14
- package/dist/auth/password/PasswordHasher.d.ts +5 -13
- package/dist/auth/password/hash-format.d.ts +5 -13
- package/dist/auth/password-reset.d.ts +16 -42
- package/dist/auth/providers/ModelUserProvider.d.ts +3 -4
- package/dist/auth/providers/UserProvider.d.ts +4 -4
- package/dist/auth/signed-token.d.ts +18 -0
- package/dist/auth/types.d.ts +9 -32
- package/dist/auth/utils.d.ts +6 -27
- package/dist/{auth-DkYoAPVn.js → auth-CbdPH4Cd.js} +169 -502
- package/dist/authorization/Gate.d.ts +9 -145
- package/dist/authorization/Policy.d.ts +6 -53
- package/dist/authorization/index.js +1 -1
- package/dist/authorization/middleware.d.ts +16 -62
- package/dist/authorization/types.d.ts +8 -64
- package/dist/{authorization-CdfbCj8J.js → authorization-CdEWZZw3.js} +44 -309
- package/dist/broadcasting/BroadcastManager.d.ts +29 -149
- package/dist/broadcasting/channels/Channel.d.ts +1 -19
- package/dist/broadcasting/channels/PresenceChannel.d.ts +1 -55
- package/dist/broadcasting/channels/PrivateChannel.d.ts +1 -23
- package/dist/broadcasting/drivers/MemoryDriver.d.ts +18 -70
- package/dist/broadcasting/drivers/RedisDriver.d.ts +3 -80
- package/dist/broadcasting/drivers/index.d.ts +1 -1
- package/dist/broadcasting/index.d.ts +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/broadcasting/types.d.ts +7 -88
- package/dist/{broadcasting-BwodCA4q.js → broadcasting-B5RzB0A2.js} +87 -414
- package/dist/cache/CacheManager.d.ts +8 -62
- package/dist/cache/TaggedCache.d.ts +2 -35
- package/dist/cache/index.js +1 -1
- package/dist/cache/stores/FileStore.d.ts +2 -36
- package/dist/cache/stores/MemoryStore.d.ts +2 -26
- package/dist/cache/stores/RedisStore.d.ts +1 -29
- package/dist/cache/types.d.ts +21 -128
- package/dist/{cache-BYnZf2FR.js → cache-BOOIr324.js} +19 -198
- package/dist/client-C4TEr_Dd.js +9 -0
- package/dist/console/Command.d.ts +17 -126
- package/dist/console/ConsoleKernel.d.ts +2 -74
- package/dist/console/Input.d.ts +5 -113
- package/dist/console/Output.d.ts +3 -99
- package/dist/console/types.d.ts +3 -33
- package/dist/container/Container.d.ts +12 -103
- package/dist/container/ServiceProvider.d.ts +17 -61
- package/dist/container/bindings.d.ts +5 -26
- package/dist/container/defineModule.d.ts +16 -54
- package/dist/container/definePlugin.d.ts +12 -45
- package/dist/container/types.d.ts +2 -34
- package/dist/context-CXk_umpT.js +21 -0
- package/dist/database/Factory.d.ts +4 -57
- package/dist/database/Seeder.d.ts +8 -46
- package/dist/database/SeederRunner.d.ts +3 -33
- package/dist/database/types.d.ts +3 -24
- package/dist/discovery/AutoDiscovery.d.ts +10 -82
- package/dist/{dispatch-erOS9epZ.js → dispatch-BAwzftws.js} +32 -79
- package/dist/docs-viewer/DocsViewerServiceProvider.d.ts +2 -5
- package/dist/docs-viewer/endpoint.d.ts +5 -11
- package/dist/encryption/Encrypter.d.ts +5 -71
- package/dist/encryption/Hash.d.ts +7 -57
- package/dist/encryption/Random.d.ts +6 -99
- package/dist/encryption/index.js +3 -3
- package/dist/encryption/types.d.ts +10 -72
- package/dist/{encryption-D99Vmls3.js → encryption-uwP3Di4D.js} +9 -78
- package/dist/{endpoint-D6GIqOpe.js → endpoint-BXipU2Jj.js} +6 -12
- package/dist/endpoint-Dsw3Acvq.js +26 -0
- package/dist/errors/ExceptionHandler.d.ts +3 -90
- package/dist/errors/HttpException.d.ts +2 -79
- package/dist/errors/debug-page.d.ts +3 -17
- package/dist/errors/error-page.d.ts +1 -0
- package/dist/errors/exceptions/AuthenticationException.d.ts +2 -24
- package/dist/errors/exceptions/AuthorizationException.d.ts +1 -24
- package/dist/errors/exceptions/MethodNotAllowedException.d.ts +1 -23
- package/dist/errors/exceptions/NotFoundHttpException.d.ts +1 -27
- package/dist/errors/exceptions/ValidationException.d.ts +2 -43
- package/dist/errors/types.d.ts +1 -25
- package/dist/{errors-BgeOl_DC.js → errors-JpkcCjjn.js} +3 -41
- package/dist/events/Event.d.ts +1 -28
- package/dist/events/EventManager.d.ts +5 -107
- package/dist/events/Listener.d.ts +7 -55
- package/dist/events/builtin.d.ts +0 -24
- package/dist/events/index.js +1 -1
- package/dist/events/types.d.ts +4 -22
- package/dist/{events-aIH_bWRx.js → events-DOmAHDeP.js} +11 -191
- package/dist/facades/index.d.ts +2 -14
- package/dist/health/HealthCheck.d.ts +0 -24
- package/dist/health/HealthManager.d.ts +0 -36
- package/dist/health/checks/CacheCheck.d.ts +2 -17
- package/dist/health/checks/CustomCheck.d.ts +0 -9
- package/dist/health/checks/DatabaseCheck.d.ts +2 -17
- package/dist/health/checks/MemoryCheck.d.ts +3 -12
- package/dist/health/checks/RedisCheck.d.ts +1 -13
- package/dist/health/checks/StorageCheck.d.ts +2 -17
- package/dist/health/index.js +1 -1
- package/dist/health/types.d.ts +4 -24
- package/dist/{health-VWdWXRwh.js → health-DQSvUplL.js} +1 -76
- package/dist/hot-disposables-B5BXqaIH.js +167 -0
- package/dist/hot-reload/hot-disposables.d.ts +22 -74
- package/dist/hot-reload/testing.d.ts +4 -9
- package/dist/http/Application.d.ts +62 -208
- package/dist/http/FormRequest.d.ts +4 -55
- package/dist/http/dev-assets.d.ts +13 -31
- package/dist/http/dev-banner.d.ts +2 -5
- package/dist/http/inertia-assets.d.ts +3 -6
- package/dist/http/middleware/capabilities.d.ts +27 -50
- package/dist/http/middleware/cors.d.ts +4 -29
- package/dist/http/middleware/csp.d.ts +2 -25
- package/dist/http/middleware/csrf.d.ts +20 -95
- package/dist/http/middleware/detect-locale.d.ts +7 -27
- package/dist/http/middleware/force-https.d.ts +6 -24
- package/dist/http/middleware/host-authorization.d.ts +2 -12
- package/dist/http/middleware/loopback-guard.d.ts +15 -33
- package/dist/http/middleware/rate-limit.d.ts +29 -126
- package/dist/http/middleware/redirect-safety.d.ts +2 -20
- package/dist/http/middleware/request-id.d.ts +1 -14
- package/dist/http/middleware/request-logging.d.ts +2 -13
- package/dist/http/middleware/response-headers.d.ts +5 -13
- package/dist/http/middleware/security-headers.d.ts +2 -16
- package/dist/http/middleware/session.d.ts +15 -34
- package/dist/http/middleware/validation-errors-cookie.d.ts +7 -18
- package/dist/http/middleware/validation.d.ts +8 -63
- package/dist/http/public-assets.d.ts +11 -7
- package/dist/http/request.d.ts +32 -118
- package/dist/http/resources/CursorPaginator.d.ts +5 -64
- package/dist/http/resources/Paginator.d.ts +7 -84
- package/dist/http/resources/Resource.d.ts +9 -65
- package/dist/http/resources/ResourceCollection.d.ts +5 -39
- package/dist/http/resources/types.d.ts +10 -30
- package/dist/http/static-documents.d.ts +10 -20
- package/dist/http/validation/Validator.d.ts +25 -85
- package/dist/http/validation/rules.d.ts +48 -147
- package/dist/http/validation/types.d.ts +16 -61
- package/dist/http/vite-assets.d.ts +5 -28
- package/dist/http/vite-dev-server.d.ts +6 -9
- package/dist/http/vite-manifest.d.ts +19 -33
- package/dist/i18n/I18nManager.d.ts +12 -78
- package/dist/i18n/Translator.d.ts +3 -54
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/loaders/JsonLoader.d.ts +4 -31
- package/dist/i18n/loaders/MemoryLoader.d.ts +1 -21
- package/dist/i18n/pluralization.d.ts +4 -13
- package/dist/i18n/types.d.ts +17 -69
- package/dist/{i18n-mcWi7LCd.js → i18n-Cg1aajRP.js} +31 -225
- package/dist/index.d.ts +2 -1
- package/dist/index.js +714 -3011
- package/dist/internal/agent-preflight.d.ts +9 -21
- package/dist/internal/request.d.ts +6 -19
- package/dist/internal/request.js +1 -1
- package/dist/internal/route-path.d.ts +9 -21
- package/dist/internal/route-path.js +9 -21
- package/dist/internal/zod-compat.d.ts +55 -122
- package/dist/internal/zod-compat.js +39 -70
- package/dist/internal/zod-json-schema.d.ts +18 -54
- package/dist/internal/zod-json-schema.js +46 -123
- package/dist/jsx-runtime.d.ts +3 -8
- package/dist/lambda/index.d.ts +17 -79
- package/dist/lambda/index.js +11 -59
- package/dist/logging/LogManager.d.ts +1 -51
- package/dist/logging/Logger.d.ts +8 -47
- package/dist/logging/channels/ConsoleChannel.d.ts +1 -3
- package/dist/logging/channels/DailyFileChannel.d.ts +1 -3
- package/dist/logging/channels/FileChannel.d.ts +1 -3
- package/dist/logging/daily-file-path.d.ts +7 -16
- package/dist/logging/index.js +1 -1
- package/dist/logging/types.d.ts +13 -45
- package/dist/{logging-B-kngi3q.js → logging-zOY1XCtq.js} +52 -141
- package/dist/{loopback-guard-D0Kc7-xc.js → loopback-guard-DT9gHF0F.js} +41 -92
- package/dist/mail/Mail.d.ts +10 -106
- package/dist/mail/MailManager.d.ts +2 -60
- package/dist/mail/index.js +1 -1
- package/dist/mail/transports/LogTransport.d.ts +1 -4
- package/dist/mail/transports/MemoryTransport.d.ts +1 -63
- package/dist/mail/transports/ResendTransport.d.ts +1 -23
- package/dist/mail/transports/SmtpTransport.d.ts +1 -31
- package/dist/mail/types.d.ts +28 -150
- package/dist/{mail-DfEfSQEr.js → mail-76DWy9lj.js} +31 -289
- package/dist/mcp/McpServiceProvider.d.ts +4 -10
- package/dist/mcp/create-mcp-server.d.ts +25 -57
- package/dist/mcp/endpoint.d.ts +12 -36
- package/dist/mcp/index.js +1 -1
- package/dist/mvc/Controller.d.ts +46 -227
- package/dist/mvc/Router.d.ts +50 -129
- package/dist/mvc/inertia/InertiaEngine.d.ts +18 -48
- package/dist/mvc/inertia/shared.d.ts +6 -19
- package/dist/mvc/mount-route.d.ts +2 -6
- package/dist/mvc/view.d.ts +1 -2
- package/dist/notifications/Notification.d.ts +8 -75
- package/dist/notifications/NotificationManager.d.ts +15 -88
- package/dist/notifications/channels/DatabaseChannel.d.ts +1 -41
- package/dist/notifications/channels/MailChannel.d.ts +2 -31
- package/dist/notifications/channels/MemoryChannel.d.ts +2 -62
- package/dist/notifications/channels/SlackChannel.d.ts +3 -48
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/notifiable-type.d.ts +3 -6
- package/dist/notifications/registry.d.ts +8 -27
- package/dist/notifications/types.d.ts +16 -53
- package/dist/{notifications-BGqmUNZ8.js → notifications-okWFs9ly.js} +37 -335
- package/dist/providers/AuthServiceProvider.d.ts +1 -3
- package/dist/providers/AuthorizationServiceProvider.d.ts +2 -3
- package/dist/providers/BroadcastServiceProvider.d.ts +1 -3
- package/dist/providers/CacheServiceProvider.d.ts +1 -3
- package/dist/providers/EncryptionServiceProvider.d.ts +1 -3
- package/dist/providers/ErrorServiceProvider.d.ts +1 -4
- package/dist/providers/EventServiceProvider.d.ts +1 -3
- package/dist/providers/HealthServiceProvider.d.ts +1 -3
- package/dist/providers/I18nServiceProvider.d.ts +6 -10
- package/dist/providers/InertiaServiceProvider.d.ts +1 -4
- package/dist/providers/LogServiceProvider.d.ts +1 -3
- package/dist/providers/MailServiceProvider.d.ts +1 -3
- package/dist/providers/NotificationServiceProvider.d.ts +1 -3
- package/dist/providers/OAuthServiceProvider.d.ts +1 -3
- package/dist/providers/QueueServiceProvider.d.ts +1 -3
- package/dist/providers/SchedulingServiceProvider.d.ts +1 -3
- package/dist/providers/StorageServiceProvider.d.ts +1 -3
- package/dist/queue/FailedJobReporter.d.ts +1 -24
- package/dist/queue/Job.d.ts +12 -99
- package/dist/queue/QueueManager.d.ts +6 -57
- package/dist/queue/Worker.d.ts +4 -65
- package/dist/queue/drivers/MemoryDriver.d.ts +3 -44
- package/dist/queue/drivers/RedisDriver.d.ts +7 -65
- package/dist/queue/drivers/SqsDriver.d.ts +6 -57
- package/dist/queue/drivers/SyncDriver.d.ts +10 -13
- package/dist/queue/index.js +2 -2
- package/dist/queue/types.d.ts +10 -92
- package/dist/{queue-CXrRK85G.js → queue-CcXCjuJI.js} +32 -260
- package/dist/redis/RedisApiTokenStore.d.ts +4 -56
- package/dist/redis/RedisEmailVerificationStore.d.ts +4 -37
- package/dist/redis/RedisOAuthStateStore.d.ts +2 -10
- package/dist/redis/RedisPasswordResetStore.d.ts +4 -37
- package/dist/redis/RedisRateLimitStore.d.ts +16 -49
- package/dist/redis/RedisSessionStore.d.ts +3 -44
- package/dist/redis/client.d.ts +2 -32
- package/dist/redis/index.js +47 -232
- package/dist/redis/redis-values.d.ts +6 -12
- package/dist/redis/scan-keys.d.ts +1 -4
- package/dist/request-CLOYytGP.js +68 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +50 -92
- package/dist/scheduling/CronParser.d.ts +0 -29
- package/dist/scheduling/Schedule.d.ts +1 -153
- package/dist/scheduling/ScheduledTask.d.ts +0 -31
- package/dist/scheduling/Scheduler.d.ts +0 -70
- package/dist/scheduling/index.js +1 -1
- package/dist/scheduling/types.d.ts +4 -65
- package/dist/{scheduling-CPiEdtQd.js → scheduling-C6tcOtUl.js} +2 -287
- package/dist/storage/StorageManager.d.ts +0 -48
- package/dist/storage/drivers/LocalDriver.d.ts +1 -25
- package/dist/storage/drivers/MemoryDriver.d.ts +5 -35
- package/dist/storage/drivers/S3Driver.d.ts +6 -36
- package/dist/storage/drivers/s3-acl.d.ts +5 -10
- package/dist/storage/index.js +1 -1
- package/dist/storage/types.d.ts +27 -265
- package/dist/{storage-TLD9t0Q2.js → storage-BB59f07j.js} +17 -157
- package/dist/support/contained-path.d.ts +10 -20
- package/dist/support/error-polyfill.d.ts +4 -6
- package/dist/support/expiry.d.ts +17 -33
- package/dist/support/expiry.js +17 -33
- package/dist/support/import-map.d.ts +3 -7
- package/dist/support/inertia-defaults.d.ts +5 -10
- package/dist/support/redirect-target.d.ts +4 -6
- package/dist/support/stack-frames.d.ts +11 -50
- package/dist/support/trim-slashes.d.ts +4 -7
- package/dist/support/warn-once.d.ts +2 -6
- package/dist/{trim-slashes-ZJ_VsY5s.js → trim-slashes-BLY9hKAa.js} +4 -7
- package/dist/{vite-manifest-w_RSOvQW.js → vite-manifest-CTQp-SOo.js} +34 -58
- package/package.json +2 -2
- package/dist/client-Dd7vLcqp.js +0 -27
- package/dist/context-DoD0c7J_.js +0 -26
- package/dist/endpoint-D-20PiHY.js +0 -46
- package/dist/hot-disposables-WsTX2ySN.js +0 -281
- package/dist/request-CVQwpu2J.js +0 -129
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the CacheManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the CacheManager as a singleton in the container. */
|
|
5
3
|
export declare class CacheServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the Encrypter as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the Encrypter as a singleton in the container. */
|
|
5
3
|
export declare class EncryptionServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the ExceptionHandler as a singleton in the container
|
|
4
|
-
* and attaches it as global error-handling middleware.
|
|
5
|
-
*/
|
|
2
|
+
/** Binds the ExceptionHandler singleton and attaches it as global error middleware. */
|
|
6
3
|
export declare class ErrorServiceProvider extends ServiceProvider {
|
|
7
4
|
register(): void;
|
|
8
5
|
boot(): void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the EventManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the EventManager as a singleton in the container. */
|
|
5
3
|
export declare class EventServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the HealthManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the HealthManager as a singleton in the container. */
|
|
5
3
|
export declare class HealthServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
2
|
import { type TranslationMessages } from '../i18n/index.js';
|
|
3
3
|
/**
|
|
4
|
-
* Shape of the `_i18n` Inertia shared prop
|
|
5
|
-
*
|
|
6
|
-
* `useTranslation()` hook consumes this.
|
|
4
|
+
* Shape of the `_i18n` Inertia shared prop (unless `i18n.share` is `false`),
|
|
5
|
+
* consumed by the client-side `useTranslation()` hook.
|
|
7
6
|
*/
|
|
8
7
|
export interface InertiaI18nProps {
|
|
9
8
|
locale: string;
|
|
@@ -11,13 +10,10 @@ export interface InertiaI18nProps {
|
|
|
11
10
|
messages: Record<string, TranslationMessages>;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
* Binds the I18nManager as a singleton
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* preloads every supported locale during boot, and shares the request locale
|
|
19
|
-
* and its messages with Inertia pages as the `_i18n` prop (unless
|
|
20
|
-
* `i18n.share` is `false`).
|
|
13
|
+
* Binds the I18nManager as a singleton. With `createApp({ i18n })` it also
|
|
14
|
+
* mounts locale detection (unless `i18n.detect` is `false`), preloads every
|
|
15
|
+
* supported locale at boot, and shares the request locale and its messages with
|
|
16
|
+
* Inertia pages as `_i18n` (unless `i18n.share` is `false`).
|
|
21
17
|
*/
|
|
22
18
|
export declare class I18nServiceProvider extends ServiceProvider {
|
|
23
19
|
register(): void;
|
|
@@ -6,10 +6,7 @@ import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
|
6
6
|
export declare class InertiaServiceProvider extends ServiceProvider {
|
|
7
7
|
register(): void;
|
|
8
8
|
boot(): void;
|
|
9
|
-
/**
|
|
10
|
-
* Register a custom renderer for ValidationException on Inertia requests.
|
|
11
|
-
* Non-Inertia requests fall through to the default JSON 422 response.
|
|
12
|
-
*/
|
|
9
|
+
/** ValidationException on Inertia requests; others fall through to JSON 422. */
|
|
13
10
|
private registerValidationRenderer;
|
|
14
11
|
/**
|
|
15
12
|
* Auto-inject flashed `errors` into shared props. Scoped to this app's
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the LogManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the LogManager as a singleton in the container. */
|
|
5
3
|
export declare class LogServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the MailManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the MailManager as a singleton in the container. */
|
|
5
3
|
export declare class MailServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the NotificationManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the NotificationManager as a singleton in the container. */
|
|
5
3
|
export declare class NotificationServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
boot(): void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds OAuthManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds OAuthManager as a singleton in the container. */
|
|
5
3
|
export declare class OAuthServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the QueueManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the QueueManager as a singleton in the container. */
|
|
5
3
|
export declare class QueueServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the Scheduler as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the Scheduler as a singleton in the container. */
|
|
5
3
|
export declare class SchedulingServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ServiceProvider } from '../container/ServiceProvider.js';
|
|
2
|
-
/**
|
|
3
|
-
* Binds the StorageManager as a singleton in the container.
|
|
4
|
-
*/
|
|
2
|
+
/** Binds the StorageManager as a singleton in the container. */
|
|
5
3
|
export declare class StorageServiceProvider extends ServiceProvider {
|
|
6
4
|
register(): void;
|
|
7
5
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Information about a failed queue job.
|
|
3
|
-
*/
|
|
4
1
|
export interface FailedJobInfo {
|
|
5
2
|
jobName: string;
|
|
6
3
|
queue: string;
|
|
@@ -10,31 +7,11 @@ export interface FailedJobInfo {
|
|
|
10
7
|
error: Error;
|
|
11
8
|
failedAt: Date;
|
|
12
9
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Handler function invoked when a job fails.
|
|
15
|
-
*/
|
|
16
10
|
export type FailedJobHandler = (info: FailedJobInfo) => void | Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Configurable reporter for failed queue jobs.
|
|
19
|
-
*
|
|
20
|
-
* Registered by default in QueueServiceProvider to log failures.
|
|
21
|
-
* Can be extended with custom handlers (e.g., Sentry, Slack notifications).
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const reporter = new FailedJobReporter()
|
|
26
|
-
*
|
|
27
|
-
* // Add a custom handler alongside the default logger
|
|
28
|
-
* reporter.onFailure(async (info) => {
|
|
29
|
-
* await sendToSentry(info.error)
|
|
30
|
-
* })
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
11
|
+
/** Registered by default in QueueServiceProvider; extend with custom handlers. */
|
|
33
12
|
export declare class FailedJobReporter {
|
|
34
13
|
private handlers;
|
|
35
14
|
constructor();
|
|
36
|
-
/** Add a custom handler for failed jobs. */
|
|
37
15
|
onFailure(handler: FailedJobHandler): this;
|
|
38
|
-
/** Report a job failure to all registered handlers. */
|
|
39
16
|
report(info: FailedJobInfo): Promise<void>;
|
|
40
17
|
}
|
package/dist/queue/Job.d.ts
CHANGED
|
@@ -1,104 +1,34 @@
|
|
|
1
1
|
import type { QueueDriver, JobOptions } from './types.js';
|
|
2
2
|
import type { ServiceBindings } from '../container/bindings.js';
|
|
3
|
-
/**
|
|
4
|
-
* Set the global queue driver.
|
|
5
|
-
*/
|
|
6
3
|
export declare function setQueueDriver(driver: QueueDriver): void;
|
|
7
|
-
/**
|
|
8
|
-
* Get the global queue driver.
|
|
9
|
-
*/
|
|
10
4
|
export declare function getQueueDriver(): QueueDriver | null;
|
|
11
|
-
/**
|
|
12
|
-
* Base class for defining jobs.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* class SendWelcomeEmailJob extends Job<{ userId: string }> {
|
|
17
|
-
* static queue = 'emails'
|
|
18
|
-
* static maxAttempts = 5
|
|
19
|
-
*
|
|
20
|
-
* async handle({ userId }: { userId: string }): Promise<void> {
|
|
21
|
-
* const user = await User.find(userId)
|
|
22
|
-
* await mail.to(user.email).template(WelcomeEmail, user).send()
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* async failed({ userId }: { userId: string }, error: Error): Promise<void> {
|
|
26
|
-
* console.error(`Failed to send welcome email to user ${userId}:`, error)
|
|
27
|
-
* }
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* // Dispatch the job
|
|
31
|
-
* await SendWelcomeEmailJob.dispatch({ userId: '123' })
|
|
32
|
-
*
|
|
33
|
-
* // Dispatch with delay
|
|
34
|
-
* await SendWelcomeEmailJob.dispatchAfter(60000, { userId: '123' })
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
5
|
export declare abstract class Job<T = unknown> {
|
|
38
6
|
/**
|
|
39
|
-
* Stable wire name
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* from it. When omitted the class name is used, which breaks if a bundler
|
|
43
|
-
* mangles identifiers or if the class is later renamed while messages are
|
|
44
|
-
* still in flight. Set it to pin the name across both.
|
|
45
|
-
*
|
|
7
|
+
* Stable wire name: queued messages record it and the worker resolves the
|
|
8
|
+
* class back from it. Defaults to the class name, which breaks under
|
|
9
|
+
* identifier mangling or a rename with messages still in flight.
|
|
46
10
|
* @default the class name
|
|
47
11
|
*/
|
|
48
12
|
static jobName?: string;
|
|
49
|
-
/**
|
|
50
|
-
* The queue this job should be dispatched to.
|
|
51
|
-
* @default 'default'
|
|
52
|
-
*/
|
|
13
|
+
/** @default 'default' */
|
|
53
14
|
static queue: string;
|
|
54
|
-
/**
|
|
55
|
-
* Maximum number of times the job should be attempted.
|
|
56
|
-
* @default 3
|
|
57
|
-
*/
|
|
15
|
+
/** @default 3 */
|
|
58
16
|
static maxAttempts: number;
|
|
59
17
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* - 'linear': attempt * 1000ms (1s, 2s, 3s, 4s, ...)
|
|
63
|
-
* - number: fixed delay in milliseconds
|
|
18
|
+
* 'exponential' = 2^attempt * 1000ms, 'linear' = attempt * 1000ms, a number
|
|
19
|
+
* is a fixed delay in milliseconds.
|
|
64
20
|
* @default 'exponential'
|
|
65
21
|
*/
|
|
66
22
|
static backoff: 'exponential' | 'linear' | number;
|
|
67
23
|
protected make<K extends keyof ServiceBindings>(key: K): ServiceBindings[K];
|
|
68
24
|
protected make<TService>(key: string): TService;
|
|
69
|
-
/**
|
|
70
|
-
* Handle the job.
|
|
71
|
-
* Override this method to define job logic.
|
|
72
|
-
*/
|
|
73
25
|
abstract handle(payload: T): void | Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Called when the job fails permanently (after all retries exhausted).
|
|
76
|
-
* Override this method to handle failures.
|
|
77
|
-
*/
|
|
26
|
+
/** Called once retries are exhausted. */
|
|
78
27
|
failed?(payload: T, error: Error): void | Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Dispatch the job to the queue.
|
|
81
|
-
*
|
|
82
|
-
* @param payload - Job payload data
|
|
83
|
-
* @param options - Optional dispatch options
|
|
84
|
-
*/
|
|
85
28
|
static dispatch<T>(this: JobClass<T>, payload: T, options?: JobOptions): Promise<string>;
|
|
86
|
-
/**
|
|
87
|
-
* Dispatch the job after a delay.
|
|
88
|
-
*
|
|
89
|
-
* @param delayMs - Delay in milliseconds
|
|
90
|
-
* @param payload - Job payload data
|
|
91
|
-
* @param options - Optional dispatch options (delay is overridden)
|
|
92
|
-
*/
|
|
93
29
|
static dispatchAfter<T>(this: JobClass<T>, delayMs: number, payload: T, options?: Omit<JobOptions, 'delay'>): Promise<string>;
|
|
94
|
-
/**
|
|
95
|
-
* Calculate the retry delay based on backoff strategy.
|
|
96
|
-
*/
|
|
97
30
|
static calculateRetryDelay(attempts: number): number;
|
|
98
31
|
}
|
|
99
|
-
/**
|
|
100
|
-
* Job class constructor type.
|
|
101
|
-
*/
|
|
102
32
|
export interface JobClass<T = unknown> {
|
|
103
33
|
new (): Job<T>;
|
|
104
34
|
name: string;
|
|
@@ -111,30 +41,13 @@ export interface JobClass<T = unknown> {
|
|
|
111
41
|
calculateRetryDelay(attempts: number): number;
|
|
112
42
|
}
|
|
113
43
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* or bundling with identifier mangling does not orphan queued messages.
|
|
118
|
-
*
|
|
119
|
-
* Only an *own* `jobName` counts. Static members are inherited, so reading it
|
|
120
|
-
* off the prototype chain would make every subclass of a pinned job claim its
|
|
121
|
-
* parent's identity and overwrite it in the registry. A subclass that wants a
|
|
122
|
-
* pinned name declares its own.
|
|
44
|
+
* Only an *own* `jobName` counts: statics are inherited, so reading the
|
|
45
|
+
* prototype chain would make every subclass of a pinned job claim its
|
|
46
|
+
* parent's identity and overwrite it in the registry.
|
|
123
47
|
*/
|
|
124
48
|
export declare function resolveJobName(jobClass: Pick<JobClass, 'name' | 'jobName'>): string;
|
|
125
|
-
/**
|
|
126
|
-
* Register a job class for the worker to use.
|
|
127
|
-
*/
|
|
128
49
|
export declare function registerJob<T>(jobClass: JobClass<T>): void;
|
|
129
|
-
/**
|
|
130
|
-
* Get a registered job class by name.
|
|
131
|
-
*/
|
|
132
50
|
export declare function getJob(name: string): JobClass | undefined;
|
|
133
|
-
/**
|
|
134
|
-
* Get all registered job classes.
|
|
135
|
-
*/
|
|
136
51
|
export declare function getRegisteredJobs(): Map<string, JobClass>;
|
|
137
|
-
/**
|
|
138
|
-
* Clear all registered jobs (for testing).
|
|
139
|
-
*/
|
|
52
|
+
/** Testing only. */
|
|
140
53
|
export declare function clearJobRegistry(): void;
|
|
@@ -1,79 +1,28 @@
|
|
|
1
1
|
import type { QueueDriver } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Queue driver factory function.
|
|
4
|
-
*/
|
|
5
2
|
export type QueueDriverFactory = () => QueueDriver;
|
|
6
|
-
/**
|
|
7
|
-
* Queue configuration.
|
|
8
|
-
*/
|
|
9
3
|
export interface QueueConfig {
|
|
10
|
-
/**
|
|
11
|
-
* Default driver name.
|
|
12
|
-
* @default 'memory'
|
|
13
|
-
*/
|
|
4
|
+
/** @default 'memory' */
|
|
14
5
|
default?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Driver configurations.
|
|
17
|
-
*/
|
|
18
6
|
drivers?: Record<string, QueueDriverFactory>;
|
|
19
7
|
}
|
|
20
8
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { QueueManager, MemoryDriver, RedisDriver } from '@guren/server/queue'
|
|
26
|
-
* import { createRedisClient } from '@guren/server/redis'
|
|
27
|
-
*
|
|
28
|
-
* const redis = createRedisClient({ url: process.env.REDIS_URL })
|
|
29
|
-
*
|
|
30
|
-
* const queueManager = new QueueManager({
|
|
31
|
-
* default: 'redis',
|
|
32
|
-
* drivers: {
|
|
33
|
-
* memory: () => new MemoryDriver(),
|
|
34
|
-
* redis: () => new RedisDriver(redis),
|
|
35
|
-
* }
|
|
36
|
-
* })
|
|
37
|
-
*
|
|
38
|
-
* // Use the default driver
|
|
39
|
-
* const driver = queueManager.driver()
|
|
40
|
-
*
|
|
41
|
-
* // Use a specific driver
|
|
42
|
-
* const memoryDriver = queueManager.driver('memory')
|
|
43
|
-
* ```
|
|
9
|
+
* Resolves queue drivers by name from the configured factories; `driver()` with
|
|
10
|
+
* no name returns the default and publishes it as the global driver.
|
|
44
11
|
*/
|
|
45
12
|
export declare class QueueManager {
|
|
46
|
-
private
|
|
13
|
+
private defaultDriver;
|
|
47
14
|
private readonly driverFactories;
|
|
48
15
|
private readonly resolvedDrivers;
|
|
49
16
|
constructor(config?: QueueConfig);
|
|
50
|
-
/**
|
|
51
|
-
* Get a queue driver by name.
|
|
52
|
-
* Returns the default driver if no name is specified.
|
|
53
|
-
*/
|
|
54
17
|
driver(name?: string): QueueDriver;
|
|
55
|
-
/**
|
|
56
|
-
* Register a custom driver factory.
|
|
57
|
-
*/
|
|
58
18
|
registerDriver(name: string, factory: QueueDriverFactory): void;
|
|
59
|
-
/**
|
|
60
|
-
* Check if a driver is registered.
|
|
61
|
-
*/
|
|
62
19
|
hasDriver(name: string): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Get the default driver name.
|
|
65
|
-
*/
|
|
66
20
|
getDefaultDriverName(): string;
|
|
67
|
-
/**
|
|
68
|
-
* Get all registered driver names.
|
|
69
|
-
*/
|
|
70
21
|
getDriverNames(): string[];
|
|
71
22
|
/**
|
|
72
|
-
*
|
|
23
|
+
* After this, `driver()` with no name, `getDefaultDriverName()`, and
|
|
24
|
+
* `Job.dispatch()` all use the new driver.
|
|
73
25
|
*/
|
|
74
26
|
setDefaultDriver(name: string): void;
|
|
75
27
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Create a queue manager with default configuration.
|
|
78
|
-
*/
|
|
79
28
|
export declare function createQueueManager(config?: QueueConfig): QueueManager;
|
package/dist/queue/Worker.d.ts
CHANGED
|
@@ -1,46 +1,14 @@
|
|
|
1
1
|
import type { QueueDriver, QueuedJob, WorkerOptions } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Worker events.
|
|
4
|
-
*/
|
|
5
2
|
export interface WorkerEvents {
|
|
6
|
-
/**
|
|
7
|
-
* Emitted when a job is processed successfully.
|
|
8
|
-
*/
|
|
9
3
|
jobProcessed?: (job: QueuedJob) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Emitted when a job fails (but may retry).
|
|
12
|
-
*/
|
|
4
|
+
/** Emitted on a failure that may still retry. */
|
|
13
5
|
jobFailed?: (job: QueuedJob, error: Error, willRetry: boolean) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Emitted when the worker starts.
|
|
16
|
-
*/
|
|
17
6
|
workerStarted?: () => void;
|
|
18
|
-
/**
|
|
19
|
-
* Emitted when the worker stops.
|
|
20
|
-
*/
|
|
21
7
|
workerStopped?: () => void;
|
|
22
8
|
}
|
|
23
9
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* import { Worker, MemoryDriver, setQueueDriver } from '@guren/server/queue'
|
|
29
|
-
*
|
|
30
|
-
* const driver = new MemoryDriver()
|
|
31
|
-
* setQueueDriver(driver)
|
|
32
|
-
*
|
|
33
|
-
* const worker = new Worker(driver, {
|
|
34
|
-
* queues: ['default', 'emails'],
|
|
35
|
-
* sleep: 1000,
|
|
36
|
-
* })
|
|
37
|
-
*
|
|
38
|
-
* // Start processing
|
|
39
|
-
* await worker.start()
|
|
40
|
-
*
|
|
41
|
-
* // Stop gracefully
|
|
42
|
-
* await worker.stop()
|
|
43
|
-
* ```
|
|
10
|
+
* Pulls jobs off a driver's queues in priority order and runs each under a
|
|
11
|
+
* timeout, retrying through `driver.release()`.
|
|
44
12
|
*/
|
|
45
13
|
export declare class Worker {
|
|
46
14
|
private readonly driver;
|
|
@@ -56,44 +24,15 @@ export declare class Worker {
|
|
|
56
24
|
private readonly stopWhenEmpty;
|
|
57
25
|
private currentJob;
|
|
58
26
|
constructor(driver: QueueDriver, options?: WorkerOptions, events?: WorkerEvents);
|
|
59
|
-
/**
|
|
60
|
-
* Start the worker.
|
|
61
|
-
*/
|
|
62
27
|
start(): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Stop the worker gracefully.
|
|
65
|
-
*/
|
|
66
28
|
stop(): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Check if the worker is running.
|
|
69
|
-
*/
|
|
70
29
|
isRunning(): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Get the number of processed jobs.
|
|
73
|
-
*/
|
|
74
30
|
getProcessedJobsCount(): number;
|
|
75
|
-
/**
|
|
76
|
-
* Get the next available job from the queues.
|
|
77
|
-
*/
|
|
78
31
|
private getNextJob;
|
|
79
|
-
/**
|
|
80
|
-
* Process a single job.
|
|
81
|
-
*/
|
|
82
32
|
private processJob;
|
|
83
|
-
/**
|
|
84
|
-
* Handle a failed job.
|
|
85
|
-
*/
|
|
86
33
|
private handleFailedJob;
|
|
87
|
-
/**
|
|
88
|
-
* Execute a function with a timeout.
|
|
89
|
-
*/
|
|
90
34
|
private executeWithTimeout;
|
|
91
|
-
/**
|
|
92
|
-
* Sleep for a given number of milliseconds.
|
|
93
|
-
*/
|
|
94
35
|
private sleepMs;
|
|
95
36
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Process a single job (for testing or one-off execution).
|
|
98
|
-
*/
|
|
37
|
+
/** Process one job without a running worker, for tests and one-off execution. */
|
|
99
38
|
export declare function processJob(driver: QueueDriver, queue?: string): Promise<boolean>;
|
|
@@ -1,60 +1,19 @@
|
|
|
1
1
|
import type { QueueDriver, QueuedJob, FailedJob } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* In-memory queue driver for development and testing.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```ts
|
|
7
|
-
* import { MemoryDriver, setQueueDriver } from '@guren/server/queue'
|
|
8
|
-
*
|
|
9
|
-
* const driver = new MemoryDriver()
|
|
10
|
-
* setQueueDriver(driver)
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
2
|
+
/** In-memory queue driver for development and testing. */
|
|
13
3
|
export declare class MemoryDriver implements QueueDriver {
|
|
14
4
|
private jobs;
|
|
15
5
|
private failedJobs;
|
|
16
|
-
/**
|
|
17
|
-
* Push a job onto the queue.
|
|
18
|
-
*/
|
|
19
6
|
push(job: QueuedJob): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Pop the next available job from the queue.
|
|
22
|
-
*/
|
|
23
7
|
pop(queue: string): Promise<QueuedJob | null>;
|
|
24
|
-
/**
|
|
25
|
-
* Release a job back onto the queue.
|
|
26
|
-
*/
|
|
27
8
|
release(job: QueuedJob, delayMs?: number): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Delete a job from the queue.
|
|
30
|
-
*/
|
|
31
9
|
delete(jobId: string): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Mark a job as failed.
|
|
34
|
-
*/
|
|
35
10
|
fail(job: QueuedJob, error: Error): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Get the number of jobs in a queue.
|
|
38
|
-
*/
|
|
39
11
|
size(queue: string): Promise<number>;
|
|
40
|
-
/**
|
|
41
|
-
* Get failed jobs.
|
|
42
|
-
*/
|
|
43
12
|
getFailedJobs(queue?: string): Promise<FailedJob[]>;
|
|
44
|
-
/**
|
|
45
|
-
* Retry a failed job.
|
|
46
|
-
*/
|
|
47
13
|
retryFailedJob(jobId: string): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Delete a failed job.
|
|
50
|
-
*/
|
|
51
14
|
deleteFailedJob(jobId: string): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Clear all jobs (for testing).
|
|
54
|
-
*/
|
|
15
|
+
/** Testing only. */
|
|
55
16
|
clear(): Promise<void>;
|
|
56
|
-
/**
|
|
57
|
-
* Get all pending jobs (for testing/debugging).
|
|
58
|
-
*/
|
|
17
|
+
/** Testing/debugging only. */
|
|
59
18
|
getPendingJobs(queue?: string): QueuedJob[];
|
|
60
19
|
}
|