@guren/server 1.3.0 → 1.5.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/{Application-DImeY-VW.d.ts → Application-Bi-olFMF.d.ts} +387 -18
- package/dist/{AuthManager-BU8ZvenF.d.ts → AuthManager-C84xF5ks.d.ts} +1 -1
- package/dist/{BroadcastManager-CGWl9rUO.d.ts → BroadcastManager-D8KoJxiV.d.ts} +21 -0
- package/dist/{CacheManager-BkvHEOZX.d.ts → CacheManager-BmDzUKrF.d.ts} +17 -0
- package/dist/ConsoleKernel-D0dkFt6u.d.ts +101 -0
- package/dist/{McpServiceProvider-RNTDHZAZ.js → McpServiceProvider-TZWQWXCT.js} +2 -2
- package/dist/{Scheduler-BstvSca7.d.ts → Scheduler-pZiT8i57.d.ts} +2 -0
- package/dist/{api-token-CB12xnVg.d.ts → api-token-COQHXyM_.d.ts} +68 -1
- package/dist/auth/index.d.ts +5 -5
- package/dist/auth/index.js +1 -1
- package/dist/authorization/index.js +2 -2
- package/dist/broadcasting/index.d.ts +2 -2
- package/dist/broadcasting/index.js +2 -1
- package/dist/cache/index.d.ts +2 -2
- package/dist/cache/index.js +2 -1
- package/dist/{chunk-EGU5KB7V.js → chunk-4SBGSJNT.js} +31 -1
- package/dist/{chunk-CSDKWLFD.js → chunk-5AD7LYWO.js} +111 -35
- package/dist/{chunk-THSX7OOR.js → chunk-63SKW5PS.js} +3 -0
- package/dist/{chunk-R2TCP7D7.js → chunk-6J6B5KOB.js} +18 -2
- package/dist/{chunk-VY2JPS6V.js → chunk-AUXQISW5.js} +83 -11
- package/dist/chunk-DCYKSYAT.js +63 -0
- package/dist/{chunk-ZRBLZY3M.js → chunk-FZD2AKJI.js} +1 -1
- package/dist/{chunk-HKQSAFSN.js → chunk-MC752CQT.js} +15 -0
- package/dist/{chunk-J753UWAY.js → chunk-NQCZQAJL.js} +93 -28
- package/dist/{chunk-STZUODC3.js → chunk-NYQGAWDN.js} +44 -1
- package/dist/{chunk-EDRGAM6G.js → chunk-RNXTRWKL.js} +2 -1
- package/dist/{chunk-CSP7W3WY.js → chunk-SHYRVOMJ.js} +2 -2
- package/dist/{chunk-44F7JQ7I.js → chunk-XMQZENBP.js} +35 -1
- package/dist/{chunk-WJJ5CTNI.js → chunk-Z3HXKWI6.js} +2 -2
- package/dist/{client-CKXJLsTe.d.ts → client-BQwF2b9Y.d.ts} +7 -0
- package/dist/{email-verification-D9u7krkn.d.ts → email-verification-H_WlpsVH.d.ts} +1 -1
- package/dist/{errors-JOOPDDQ6.js → errors-PUNHAFL2.js} +1 -1
- package/dist/index.d.ts +35 -17
- package/dist/index.js +329 -132
- package/dist/lambda/index.d.ts +7 -7
- package/dist/lambda/index.js +1 -1
- package/dist/mail/index.js +3 -3
- package/dist/mcp/index.d.ts +53 -19
- package/dist/mcp/index.js +2 -2
- package/dist/notifications/index.d.ts +57 -8
- package/dist/notifications/index.js +11 -3
- package/dist/queue/index.d.ts +7 -7
- package/dist/queue/index.js +4 -2
- package/dist/redis/index.d.ts +11 -21
- package/dist/redis/index.js +42 -6
- package/dist/runtime/index.d.ts +7 -7
- package/dist/runtime/index.js +1 -1
- package/dist/scheduling/index.d.ts +2 -2
- package/dist/scheduling/index.js +2 -1
- package/package.json +2 -2
- package/dist/ConsoleKernel-COKndy_V.d.ts +0 -207
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { E as ErrorResponse,
|
|
2
|
-
export { A as Application,
|
|
1
|
+
import { E as ErrorResponse, a as Container, e as ServiceProviderConstructor, S as ServiceProvider, I as InputInterface, P as ParsedSignature, f as OptionDefinition, g as CommandInstance, O as OutputInterface, h as ServiceBindings, Q as QueueManager, N as NotificationManager } from './Application-Bi-olFMF.js';
|
|
2
|
+
export { A as Application, i as ApplicationListenOptions, j as ApplicationOptions, k as ArgumentDefinition, m as AuthPayload, n as AuthPluginOptions, o as CSRF_FORM_FIELD, p as CSRF_HEADER_NAME, q as CSRF_TOKEN_KEY, C as CommandClass, b as ConsoleKernelOptions, r as ContainerProvider, t as ContextualBinding, u as ContextualBindingBuilder, v as ContextualNeedsBuilder, w as Controller, x as ControllerInertiaProps, y as CsrfOptions, z as DatabaseChannelOptions, B as DatabaseNotification, F as ExceptionClass, H as ExceptionHandler, J as ExceptionHandlerOptions, K as ExceptionRenderer, L as ExceptionReporter, M as FailedJob, R as GurenModule, T as HostAuthorizationOptions, U as HstsOptions, V as InertiaDocumentContext, W as InertiaDocumentOptions, X as InertiaOptions, Y as InertiaPagePayload, Z as InertiaResponse, _ as InertiaSharedProps, $ as InertiaSsrContext, a0 as InertiaSsrOptions, a1 as InertiaSsrRenderer, a2 as InertiaSsrResult, a3 as InferInertiaProps, a4 as Job, a5 as JobClass, a6 as JobFailureHandler, a7 as JobHandler, a8 as JobOptions, a9 as ModuleDefinition, aa as Notifiable, ab as Notification, ac as NotificationAttachment, ad as NotificationChannel, ae as NotificationChannelFactory, af as NotificationClass, ag as NotificationMailMessage, ah as NotificationManagerOptions, ai as ProgressInterface, aj as PromptInterface, ak as ProviderManager, al as QueueConfig, am as QueueDriver, an as QueueDriverFactory, ao as QueuedJob, ap as RendererRegistration, aq as ResolvedSharedInertiaProps, ar as ResourceRouteOptions, as as RouteBuilder, at as RouteContractOptions, au as RouteDefinition, av as RouteOpenApiMetadata, aw as RouteResourceAction, ax as Router, ay as ScheduledCommand, az as SecurityHeadersOptions, aA as SentNotification, aB as ServiceBinding, aC as ServiceClass, aD as ServiceFactory, aE as ServiceProviderClass, aF as ServiceProviderOptions, aG as SharedInertiaPropsResolver, aH as SlackAttachment, aI as SlackBlock, aJ as SlackMessage, aK as VALIDATED_DATA_KEY, aL as ValidateRequestOptions, aM as ValidationSchema, aN as WorkerOptions, aO as abort, aP as abortIf, aQ as abortUnless, aR as clearJobRegistry, aS as createApp, aT as createContainer, aU as createCsrfMiddleware, aV as createExceptionHandler, aW as createHostAuthorizationMiddleware, aX as createNotificationManager, aY as createQueueManager, aZ as createSecurityHeaders, a_ as csrfField, a$ as defineModule, b0 as formatValidationErrors, b1 as getContainer, b2 as getCsrfToken, b3 as getExceptionHandler, b4 as getInertiaSharedPropsResolver, b5 as getJob, b6 as getNotificationManager, b7 as getQueueDriver, b8 as getRegisteredJobs, b9 as getValidatedData, ba as inertia, bb as mountModuleRoutes, bc as parseRequestPayload, bd as registerJob, be as resolve, bf as resolveJobName, bg as setContainer, bh as setExceptionHandler, bi as setInertiaDocument, bj as setInertiaSharedProps, bk as setInertiaSsrRenderer, bl as setNotificationManager, bm as setQueueDriver, bn as shareInertiaProps, bo as validate, bp as validateRequest, bq as validateRequestWith, br as validateSafe, bs as verifyCsrfToken } from './Application-Bi-olFMF.js';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Context, MiddlewareHandler } from 'hono';
|
|
5
5
|
export { Context } from 'hono';
|
|
6
|
-
import { P as PasswordHasher } from './AuthManager-
|
|
7
|
-
export { A as AuthManager, B as BaseUserProvider, M as ModelUserProvider } from './AuthManager-
|
|
6
|
+
import { P as PasswordHasher } from './AuthManager-C84xF5ks.js';
|
|
7
|
+
export { A as AuthManager, B as BaseUserProvider, M as ModelUserProvider } from './AuthManager-C84xF5ks.js';
|
|
8
8
|
export { AuthenticatableModel, NodeHasher, ScryptHasher, SessionGuard } from './auth/index.js';
|
|
9
|
-
export { b as EmailVerificationConfig, a as EmailVerificationToken, c as EmailVerificationTokenResult, E as EmailVerificationTokenStore, M as MemoryEmailVerificationStore, d as MemoryPasswordResetStore, e as PasswordResetConfig, f as PasswordResetTokenResult, P as PasswordResetTokenStore, g as buildPasswordResetUrl, h as buildVerificationUrl, i as completeEmailVerification, j as completePasswordReset, k as createEmailVerificationToken, l as createPasswordResetToken, m as isEmailVerified, p as parsePasswordResetUrl, n as parseVerificationUrl, r as requireVerifiedEmail, v as verifyEmailToken, o as verifyPasswordResetToken } from './email-verification-
|
|
10
|
-
import { g as AuthContext } from './api-token-
|
|
11
|
-
export { m as API_TOKEN_KEY, j as ApiToken, i as ApiTokenStore, a as AuthCredentials, c as AuthManagerOptions, A as Authenticatable, B as BearerTokenMiddlewareOptions, n as CreateApiTokenOptions, o as CreateApiTokenResult, D as DefaultSanitizedKeys, e as Guard, d as GuardContext, G as GuardFactory, M as MemoryApiTokenStore, p as MemoryOAuthStateStore, q as MemorySessionStore, r as OAuthAuthorizeOptions, s as OAuthCallbackPayload, l as OAuthManager,
|
|
9
|
+
export { b as EmailVerificationConfig, a as EmailVerificationToken, c as EmailVerificationTokenResult, E as EmailVerificationTokenStore, M as MemoryEmailVerificationStore, d as MemoryPasswordResetStore, e as PasswordResetConfig, f as PasswordResetTokenResult, P as PasswordResetTokenStore, g as buildPasswordResetUrl, h as buildVerificationUrl, i as completeEmailVerification, j as completePasswordReset, k as createEmailVerificationToken, l as createPasswordResetToken, m as isEmailVerified, p as parsePasswordResetUrl, n as parseVerificationUrl, r as requireVerifiedEmail, v as verifyEmailToken, o as verifyPasswordResetToken } from './email-verification-H_WlpsVH.js';
|
|
10
|
+
import { g as AuthContext } from './api-token-COQHXyM_.js';
|
|
11
|
+
export { m as API_TOKEN_KEY, j as ApiToken, i as ApiTokenStore, a as AuthCredentials, c as AuthManagerOptions, A as Authenticatable, B as BearerTokenMiddlewareOptions, n as CreateApiTokenOptions, o as CreateApiTokenResult, D as DefaultSanitizedKeys, e as Guard, d as GuardContext, G as GuardFactory, M as MemoryApiTokenStore, p as MemoryOAuthStateStore, q as MemorySessionStore, r as OAuthAuthorizeOptions, s as OAuthCallbackPayload, t as OAuthFallbackEmail, l as OAuthManager, u as OAuthManagerOptions, v as OAuthProviderConfig, w as OAuthProviderFactoryInput, x as OAuthStateConfig, k as OAuthStatePayload, O as OAuthStateStore, y as OAuthTokenResult, z as OAuthUserProfile, P as ProviderFactory, E as Sanitized, F as Session, h as SessionData, S as SessionStore, U as UserProvider, H as buildOAuthAuthorizeUrl, I as buildOAuthRedirectUrl, J as createApiToken, K as createBearerTokenMiddleware, L as createDiscordOAuthProviderConfig, N as createGitHubOAuthProviderConfig, Q as createGoogleOAuthProviderConfig, R as createOAuthManager, T as createOAuthState, V as createSessionMiddleware, W as exchangeOAuthCode, X as fetchOAuthUserProfile, Y as getApiToken, Z as getApiTokenOrFail, _ as getSessionFromContext, $ as getUserApiTokens, a0 as parseApiToken, a1 as parseOAuthRedirectUrl, a2 as revokeAllApiTokens, a3 as revokeApiToken, a4 as sanitizeOAuthRedirect, a5 as tokenCan, a6 as tokenCanAll, a7 as tokenCanAny, a8 as verifyApiToken, a9 as verifyOAuthState } from './api-token-COQHXyM_.js';
|
|
12
12
|
export { M as Middleware, d as defineMiddleware, j as jsonResponse } from './index-9_Jzj5jo.js';
|
|
13
13
|
import { E as EventManager } from './EventManager-CmIoLt7r.js';
|
|
14
14
|
export { a as Event, b as EventClass, c as EventListener, d as EventSubscription, L as ListenerOptions, R as RegisteredListener, e as createEventManager } from './EventManager-CmIoLt7r.js';
|
|
@@ -17,14 +17,14 @@ export { FailedJobHandler, FailedJobInfo, FailedJobReporter, MemoryDriver, Memor
|
|
|
17
17
|
import { M as MailManager } from './MailManager-DpMvYiP9.js';
|
|
18
18
|
export { a as MailAddress, b as MailAttachment, c as MailConfig, d as MailMessage, e as MailTransport, f as MailTransportConfig, g as MailTransportFactory, h as MemoryTransportOptions, R as ResendTransportOptions, S as SendResult, i as SmtpTransportOptions, j as createMailManager } from './MailManager-DpMvYiP9.js';
|
|
19
19
|
export { LogTransport, Mail, MemoryTransport, ResendTransport, SmtpTransport, getMailManager, mail, setMailManager } from './mail/index.js';
|
|
20
|
-
import { C as CacheManager } from './CacheManager-
|
|
21
|
-
export { a as CacheConfig, b as CacheStore, c as CacheStoreFactory, d as createCacheManager } from './CacheManager-
|
|
20
|
+
import { C as CacheManager } from './CacheManager-BmDzUKrF.js';
|
|
21
|
+
export { a as CacheConfig, b as CacheStore, c as CacheStoreFactory, d as createCacheManager } from './CacheManager-BmDzUKrF.js';
|
|
22
22
|
export { FileStore as FileCacheStore, MemoryStore as MemoryCacheStore, RedisStore as RedisCacheStore, TaggedCache } from './cache/index.js';
|
|
23
23
|
import { S as StorageManager } from './StorageManager-oZTHqaza.js';
|
|
24
24
|
export { D as DiskConfig, F as FileMetadata, P as PutOptions, a as StorageConfig, b as StorageDriver, c as StorageDriverFactory, d as createStorageManager } from './StorageManager-oZTHqaza.js';
|
|
25
25
|
export { LocalDriver as LocalStorageDriver, MemoryDriver as MemoryStorageDriver, S3Driver } from './storage/index.js';
|
|
26
|
-
import { S as Scheduler } from './Scheduler-
|
|
27
|
-
export { P as ParsedCron, a as PendingSchedule, b as Schedule, J as ScheduledJobClass, c as ScheduledTask, d as SchedulerOptions, T as TaskCallback, e as TaskDefinition, f as createScheduler } from './Scheduler-
|
|
26
|
+
import { S as Scheduler } from './Scheduler-pZiT8i57.js';
|
|
27
|
+
export { P as ParsedCron, a as PendingSchedule, b as Schedule, J as ScheduledJobClass, c as ScheduledTask, d as SchedulerOptions, T as TaskCallback, e as TaskDefinition, f as createScheduler } from './Scheduler-pZiT8i57.js';
|
|
28
28
|
export { getNextOccurrence, getNextOccurrences, isDue, isDueInTimezone, matchesCron, parseCron, toTimezone } from './scheduling/index.js';
|
|
29
29
|
import { L as LogManager } from './LogManager-7mxnkaPM.js';
|
|
30
30
|
export { C as ConsoleChannelConfig, D as DailyFileChannelConfig, F as FileChannelConfig, a as LOG_LEVEL_PRIORITY, b as LogChannel, c as LogChannelConfig, d as LogChannelFactory, e as LogConfig, f as LogContext, g as LogEntry, h as LogFormatter, i as LogLevel, j as Logger, k as LoggerOptions, S as StackChannelConfig, l as createLogManager, m as filterSensitiveData, n as getLogManager, s as setLogManager } from './LogManager-7mxnkaPM.js';
|
|
@@ -34,18 +34,17 @@ export { a as I18nConfig, P as PluralizationRule, R as ReplacementValues, b as T
|
|
|
34
34
|
export { JsonLoader, MemoryLoader, getPluralizationRule, pluralizationRules, selectPluralForm } from './i18n/index.js';
|
|
35
35
|
export { C as CheckResult, a as HealthCheck, b as HealthCheckOptions, H as HealthManager, c as HealthMiddlewareOptions, d as HealthReport, e as HealthStatus, f as createHealthManager } from './HealthManager-DUyMIzsZ.js';
|
|
36
36
|
export { CacheCheck, CacheCheckOptions, CacheStoreInterface, CustomCheck, CustomCheckCallback, DatabaseCheck, DatabaseCheckOptions, DatabaseConnection, MemoryCheck, MemoryCheckOptions, RedisCheck, RedisCheckOptions, RedisClient, StorageCheck, StorageCheckOptions, StorageDriverInterface, customCheck } from './health/index.js';
|
|
37
|
-
export { DatabaseChannel, MailChannel, MailChannelOptions, MemoryChannel, SlackChannel, SlackChannelOptions } from './notifications/index.js';
|
|
38
|
-
import { B as BroadcastManager } from './BroadcastManager-
|
|
39
|
-
export { A as AuthMiddlewareOptions, a as BroadcastDriver, b as BroadcastDriverFactory, c as BroadcastEvent, d as BroadcastManagerOptions, e as BroadcastableEvent, C as Channel, f as ChannelAuthorizer, g as ChannelRegistration, P as PresenceBroadcastDriver, h as PresenceChannel, i as PresenceChannelAuthorizer, j as PresenceMember, k as PrivateChannel, S as SSEClient, l as SSEMiddlewareOptions, W as WebSocketClient, m as createBroadcastManager, n as getBroadcastManager, s as setBroadcastManager } from './BroadcastManager-
|
|
37
|
+
export { DatabaseChannel, MailChannel, MailChannelOptions, MemoryChannel, NotificationConstructor, SlackChannel, SlackChannelOptions, clearNotificationRegistry, getNotification, registerNotification, resolveNotifiableType } from './notifications/index.js';
|
|
38
|
+
import { B as BroadcastManager } from './BroadcastManager-D8KoJxiV.js';
|
|
39
|
+
export { A as AuthMiddlewareOptions, a as BroadcastDriver, b as BroadcastDriverFactory, c as BroadcastEvent, d as BroadcastManagerOptions, e as BroadcastableEvent, C as Channel, f as ChannelAuthorizer, g as ChannelRegistration, P as PresenceBroadcastDriver, h as PresenceChannel, i as PresenceChannelAuthorizer, j as PresenceMember, k as PrivateChannel, S as SSEClient, l as SSEMiddlewareOptions, W as WebSocketClient, m as createBroadcastManager, n as getBroadcastManager, s as setBroadcastManager } from './BroadcastManager-D8KoJxiV.js';
|
|
40
40
|
export { RedisClient as BroadcastRedisClient, RedisDriverOptions as BroadcastRedisDriverOptions, MemoryDriver as MemoryBroadcastDriver, RedisDriver as RedisBroadcastDriver, createTypedBroadcaster } from './broadcasting/index.js';
|
|
41
|
-
import { I as InputInterface, P as ParsedSignature, O as OptionDefinition, a as CommandInstance, b as OutputInterface } from './ConsoleKernel-COKndy_V.js';
|
|
42
|
-
export { A as ArgumentDefinition, c as CommandClass, C as ConsoleKernel, d as ConsoleKernelOptions, e as ProgressInterface, f as PromptInterface, S as ScheduledCommand, g as createConsoleKernel } from './ConsoleKernel-COKndy_V.js';
|
|
43
41
|
import * as readline from 'readline';
|
|
42
|
+
export { C as ConsoleKernel, c as createConsoleKernel } from './ConsoleKernel-D0dkFt6u.js';
|
|
44
43
|
export { R as AuthResponse, A as AuthUser, a as AuthorizationResponse, b as AuthorizeOptions, G as Gate, c as GateCallback, d as GateDefinition, e as GateOptions, P as PolicyClass, f as PolicyInterface, g as PolicyMethod, h as PolicyRegistration, i as ResourceAction, j as ResponseBuilder, k as authorizeAbility, l as can, m as cannot, n as createGate, o as defineGate, p as getGate, s as setGate } from './Gate-CynjZCtS.js';
|
|
45
44
|
export { AuthorizedContext, Policy, authorizeAllMiddleware, authorizeMiddleware, authorizeResourceMiddleware, definePolicy, withAuthorization } from './authorization/index.js';
|
|
46
45
|
export { A as AppKeyring, D as DecryptOptions, a as EncryptOptions, b as EncryptedPayload, E as Encrypter, c as EncrypterConfig, H as HashAlgorithm, d as HmacOptions, P as PasswordHashOptions, R as RandomStringOptions, e as createEncrypter, f as decrypt, g as deriveAppKey, h as deriveAppKeyring, i as encrypt, j as generateAppKey, k as generateKey, l as getAppKeyringFromEnv, m as getEncrypter, n as normalizeAppKey, p as parseAppKey, o as parsePreviousAppKeys, s as setEncrypter } from './app-key-CsBfRC_Q.js';
|
|
47
46
|
export { MessageSigner, SignMessageOptions, SignedMessageClaims, SignedUrlOptions, VerifySignedMessageOptions, VerifySignedUrlOptions, check as checkHash, generateOtp, generatePassword, generateSlug, hash, hashPassword, hmac, md5, needsRehash, pick, random, randomBase64, randomBase64Url, randomHex, randomInt, randomString, sample, secureCompare, sha256, sha512, shuffle, signUrl, urlSafeToken, uuid, verifyHmac, verifyPassword, verifySignedUrl } from './encryption/index.js';
|
|
48
|
-
export { M as MemoryRateLimitStore, a as RateLimitEntry, d as RateLimitInfo, e as RateLimitOptions, R as RateLimitStore, S as SlidingWindowRateLimitStore, f as createRateLimitMiddleware, c as createRedisClient, g as getRateLimitInfo, r as resetRateLimit } from './client-
|
|
47
|
+
export { M as MemoryRateLimitStore, a as RateLimitEntry, d as RateLimitInfo, e as RateLimitOptions, R as RateLimitStore, S as SlidingWindowRateLimitStore, f as createRateLimitMiddleware, c as createRedisClient, g as getRateLimitInfo, r as resetRateLimit } from './client-BQwF2b9Y.js';
|
|
49
48
|
import 'vite';
|
|
50
49
|
import '@guren/orm';
|
|
51
50
|
import 'ioredis';
|
|
@@ -758,6 +757,7 @@ declare class I18nServiceProvider extends ServiceProvider {
|
|
|
758
757
|
*/
|
|
759
758
|
declare class NotificationServiceProvider extends ServiceProvider {
|
|
760
759
|
register(): void;
|
|
760
|
+
boot(): void;
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
/**
|
|
@@ -1974,6 +1974,18 @@ declare function cursorPaginate<T>(items: T[], perPage: number, hasMore: boolean
|
|
|
1974
1974
|
* - `{--option=default}` - Option with default value
|
|
1975
1975
|
* - `{-o|--option}` - Option with shortcut
|
|
1976
1976
|
* - `{--option=*}` - Array option
|
|
1977
|
+
* - `{argument : Description}` - Argument with a description
|
|
1978
|
+
* - `{--option= : Description}` - Option with a description
|
|
1979
|
+
*
|
|
1980
|
+
* A description is separated from the token by a colon with whitespace on at
|
|
1981
|
+
* least one side, so it may contain spaces and colons freely. Requiring that
|
|
1982
|
+
* whitespace keeps colons inside default values (`{--url=https://example.com}`)
|
|
1983
|
+
* out of descriptions.
|
|
1984
|
+
*
|
|
1985
|
+
* A colon with no whitespace at all (`{argument:Description}`) is accepted for
|
|
1986
|
+
* a single-word description, but only on a token carrying no other marker:
|
|
1987
|
+
* `{argument?}`, `{argument*}` and `{--option=default}` must use the spaced
|
|
1988
|
+
* form, since their markers are stripped before that fallback runs.
|
|
1977
1989
|
*
|
|
1978
1990
|
* @example
|
|
1979
1991
|
* ```typescript
|
|
@@ -1986,6 +1998,10 @@ declare function cursorPaginate<T>(items: T[], perPage: number, hasMore: boolean
|
|
|
1986
1998
|
* // { name: 'role', requiresValue: true, defaultValue: 'user' }
|
|
1987
1999
|
* // ]
|
|
1988
2000
|
* // }
|
|
2001
|
+
*
|
|
2002
|
+
* parseSignature('users:create {name : The full name} {--admin : Grant admin rights}')
|
|
2003
|
+
* // => arguments[0].description === 'The full name'
|
|
2004
|
+
* // options[0].description === 'Grant admin rights'
|
|
1989
2005
|
* ```
|
|
1990
2006
|
*/
|
|
1991
2007
|
declare function parseSignature(signature: string): ParsedSignature;
|
|
@@ -2103,6 +2119,8 @@ declare abstract class Command implements CommandInstance {
|
|
|
2103
2119
|
/**
|
|
2104
2120
|
* The command signature.
|
|
2105
2121
|
* Format: 'command:name {arg} {--option}'
|
|
2122
|
+
* Tokens may carry a description: 'command:name {arg : What it is}'
|
|
2123
|
+
* See `parseSignature` for the full grammar.
|
|
2106
2124
|
*/
|
|
2107
2125
|
static signature: string;
|
|
2108
2126
|
/**
|