Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update outdated links in JSDoc #3089

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class Context<
/**
* `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.
*
* @see {@link https://hono.dev/api/context#env}
* @see {@link https://hono.dev/docs/api/context#env}
*
* @example
* ```ts
Expand All @@ -258,7 +258,7 @@ export class Context<
/**
* `.error` can get the error object from the middleware if the Handler throws an error.
*
* @see {@link https://hono.dev/api/context#error}
* @see {@link https://hono.dev/docs/api/context#error}
*
* @example
* ```ts
Expand Down Expand Up @@ -311,7 +311,7 @@ export class Context<
}

/**
* @see {@link https://hono.dev/api/context#event}
* @see {@link https://hono.dev/docs/api/context#event}
* The FetchEvent associated with the current request.
*
* @throws Will throw an error if the context does not have a FetchEvent.
Expand All @@ -325,7 +325,7 @@ export class Context<
}

/**
* @see {@link https://hono.dev/api/context#executionctx}
* @see {@link https://hono.dev/docs/api/context#executionctx}
* The ExecutionContext associated with the current request.
*
* @throws Will throw an error if the context does not have an ExecutionContext.
Expand All @@ -339,7 +339,7 @@ export class Context<
}

/**
* @see {@link https://hono.dev/api/context#res}
* @see {@link https://hono.dev/docs/api/context#res}
* The Response object for the current request.
*/
get res(): Response {
Expand Down Expand Up @@ -375,7 +375,7 @@ export class Context<
/**
* `.render()` can create a response within a layout.
*
* @see {@link https://hono.dev/api/context#render-setrenderer}
* @see {@link https://hono.dev/docs/api/context#render-setrenderer}
*
* @example
* ```ts
Expand Down Expand Up @@ -413,7 +413,7 @@ export class Context<
/**
* `.setRenderer()` can set the layout in the custom middleware.
*
* @see {@link https://hono.dev/api/context#render-setrenderer}
* @see {@link https://hono.dev/docs/api/context#render-setrenderer}
*
* @example
* ```tsx
Expand All @@ -438,7 +438,7 @@ export class Context<
/**
* `.header()` can set headers.
*
* @see {@link https://hono.dev/api/context#body}
* @see {@link https://hono.dev/docs/api/context#body}
*
* @example
* ```ts
Expand Down Expand Up @@ -498,7 +498,7 @@ export class Context<
/**
* `.set()` can set the value specified by the key.
*
* @see {@link https://hono.dev/api/context#set-get}
* @see {@link https://hono.dev/docs/api/context#set-get}
*
* @example
* ```ts
Expand All @@ -517,7 +517,7 @@ export class Context<
/**
* `.get()` can use the value specified by the key.
*
* @see {@link https://hono.dev/api/context#set-get}
* @see {@link https://hono.dev/docs/api/context#set-get}
*
* @example
* ```ts
Expand All @@ -534,7 +534,7 @@ export class Context<
/**
* `.var` can access the value of a variable.
*
* @see {@link https://hono.dev/api/context#var}
* @see {@link https://hono.dev/docs/api/context#var}
*
* @example
* ```ts
Expand Down Expand Up @@ -620,7 +620,7 @@ export class Context<
* You can set headers with `.header()` and set HTTP status code with `.status`.
* This can also be set in `.text()`, `.json()` and so on.
*
* @see {@link https://hono.dev/api/context#body}
* @see {@link https://hono.dev/docs/api/context#body}
*
* @example
* ```ts
Expand Down Expand Up @@ -649,7 +649,7 @@ export class Context<
/**
* `.text()` can render text as `Content-Type:text/plain`.
*
* @see {@link https://hono.dev/api/context#text}
* @see {@link https://hono.dev/docs/api/context#text}
*
* @example
* ```ts
Expand Down Expand Up @@ -682,7 +682,7 @@ export class Context<
/**
* `.json()` can render JSON as `Content-Type:application/json`.
*
* @see {@link https://hono.dev/api/context#json}
* @see {@link https://hono.dev/docs/api/context#json}
*
* @example
* ```ts
Expand Down Expand Up @@ -739,7 +739,7 @@ export class Context<
/**
* `.redirect()` can Redirect, default status code is 302.
*
* @see {@link https://hono.dev/api/context#redirect}
* @see {@link https://hono.dev/docs/api/context#redirect}
*
* @example
* ```ts
Expand All @@ -763,7 +763,7 @@ export class Context<
/**
* `.notFound()` can return the Not Found Response.
*
* @see {@link https://hono.dev/api/context#notfound}
* @see {@link https://hono.dev/docs/api/context#notfound}
*
* @example
* ```ts
Expand Down
22 changes: 11 additions & 11 deletions src/hono-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ export type HonoOptions<E extends Env> = {
/**
* `strict` option specifies whether to distinguish whether the last path is a directory or not.
*
* @see {@link https://hono.dev/api/hono#strict-mode}
* @see {@link https://hono.dev/docs/api/hono#strict-mode}
*
* @default true
*/
strict?: boolean
/**
* `router` option specifices which router to use.
*
* @see {@link https://hono.dev/api/hono#router-option}
* @see {@link https://hono.dev/docs/api/hono#router-option}
*
* @example
* ```ts
Expand All @@ -70,7 +70,7 @@ export type HonoOptions<E extends Env> = {
/**
* `getPath` can handle the host header value.
*
* @see {@link https://hono.dev/api/routing#routing-with-host-header-value}
* @see {@link https://hono.dev/docs/api/routing#routing-with-host-header-value}
*
* @example
* ```ts
Expand Down Expand Up @@ -189,7 +189,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
/**
* `.route()` allows grouping other Hono instance in routes.
*
* @see {@link https://hono.dev/api/routing#grouping}
* @see {@link https://hono.dev/docs/api/routing#grouping}
*
* @param {string} path - base Path
* @param {Hono} app - other Hono instance
Expand Down Expand Up @@ -232,7 +232,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
/**
* `.basePath()` allows base paths to be specified.
*
* @see {@link https://hono.dev/api/routing#base-path}
* @see {@link https://hono.dev/docs/api/routing#base-path}
*
* @param {string} path - base Path
* @returns {Hono} changed Hono instance
Expand All @@ -251,7 +251,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
/**
* `.onError()` handles an error and returns a customized Response.
*
* @see {@link https://hono.dev/api/hono#error-handling}
* @see {@link https://hono.dev/docs/api/hono#error-handling}
*
* @param {ErrorHandler} handler - request Handler for error
* @returns {Hono} changed Hono instance
Expand All @@ -272,7 +272,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
/**
* `.notFound()` allows you to customize a Not Found Response.
*
* @see {@link https://hono.dev/api/hono#not-found}
* @see {@link https://hono.dev/docs/api/hono#not-found}
*
* @param {NotFoundHandler} handler - request handler for not-found
* @returns {Hono} changed Hono instance
Expand All @@ -292,7 +292,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
/**
* `.mount()` allows you to mount applications built with other frameworks into your Hono application.
*
* @see {@link https://hono.dev/api/hono#mount}
* @see {@link https://hono.dev/docs/api/hono#mount}
*
* @param {string} path - base Path
* @param {Function} applicationHandler - other Request Handler
Expand Down Expand Up @@ -458,7 +458,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
/**
* `.fetch()` will be entry point of your app.
*
* @see {@link https://hono.dev/api/hono#fetch}
* @see {@link https://hono.dev/docs/api/hono#fetch}
*
* @param {Request} request - request Object of request
* @param {Env} Env - env Object
Expand All @@ -484,7 +484,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
* expect(res.status).toBe(200)
* })
* ```
* @see https://hono.dev/api/hono#request
* @see https://hono.dev/docs/api/hono#request
*/
request = (
input: RequestInfo | URL,
Expand All @@ -507,7 +507,7 @@ class Hono<E extends Env = Env, S extends Schema = {}, BasePath extends string =
/**
* `.fire()` automatically adds a global fetch event listener.
* This can be useful for environments that adhere to the Service Worker API, such as non-ES module Cloudflare Workers.
* @see https://hono.dev/api/hono#fire
* @see https://hono.dev/docs/api/hono#fire
* @see https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
* @see https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/
*/
Expand Down
2 changes: 1 addition & 1 deletion src/http-exception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type HTTPExceptionOptions = {
/**
* `HTTPException` must be used when a fatal error such as authentication failure occurs.
*
* @see {@link https://hono.dev/api/exception}
* @see {@link https://hono.dev/docs/api/exception}
*
* @param {StatusCode} status - status code of HTTPException
* @param {HTTPExceptionOptions} options - options of HTTPException
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/basic-auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type BasicAuthOptions =
/**
* Basic Auth Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/basic-auth}
* @see {@link https://hono.dev/docs/middleware/builtin/basic-auth}
*
* @param {BasicAuthOptions} options - The options for the basic authentication middleware.
* @param {string} options.username - The username for authentication.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/bearer-auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type BearerAuthOptions =
/**
* Bearer Auth Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/bearer-auth}
* @see {@link https://hono.dev/docs/middleware/builtin/bearer-auth}
*
* @param {BearerAuthOptions} options - The options for the bearer authentication middleware.
* @param {string | string[]} [options.token] - The string or array of strings to validate the incoming bearer token against.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/body-limit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BodyLimitError extends Error {
/**
* Body Limit Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/body-limit}
* @see {@link https://hono.dev/docs/middleware/builtin/body-limit}
*
* @param {BodyLimitOptions} options - The options for the body limit middleware.
* @param {number} options.maxSize - The maximum body size allowed.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/cache/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { MiddlewareHandler } from '../../types'
/**
* Cache Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/cache}
* @see {@link https://hono.dev/docs/middleware/builtin/cache}
*
* @param {Object} options - The options for the cache middleware.
* @param {string | Function} options.cacheName - The name of the cache. Can be used to store multiple caches with different identifiers.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/compress/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface CompressionOptions {
/**
* Compress Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/compress}
* @see {@link https://hono.dev/docs/middleware/builtin/compress}
*
* @param {CompressionOptions} [options] - The options for the compress middleware.
* @param {'gzip' | 'deflate'} [options.encoding] - The compression scheme to allow for response compression. Either 'gzip' or 'deflate'. If not defined, both are allowed and will be used based on the Accept-Encoding header. 'gzip' is prioritized if this option is not provided and the client provides both in the Accept-Encoding header.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/cors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type CORSOptions = {
/**
* CORS Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/cors}
* @see {@link https://hono.dev/docs/middleware/builtin/cors}
*
* @param {CORSOptions} [options] - The options for the CORS middleware.
* @param {string | string[] | ((origin: string, c: Context) => string | undefined | null)} [options.origin='*'] - The value of "Access-Control-Allow-Origin" CORS header.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/csrf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const isRequestedByFormElementRe =
/**
* CSRF Protection Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/csrf}
* @see {@link https://hono.dev/docs/middleware/builtin/csrf}
*
* @param {CSRFOptions} [options] - The options for the CSRF protection middleware.
* @param {string|string[]|(origin: string, context: Context) => boolean} [options.origin] - Specify origins.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/etag/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function etagMatches(etag: string, ifNoneMatch: string | null) {
/**
* ETag Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/etag}
* @see {@link https://hono.dev/docs/middleware/builtin/etag}
*
* @param {ETagOptions} [options] - The options for the ETag middleware.
* @param {boolean} [options.weak=false] - Define using or not using a weak validation. If true is set, then `W/` is added to the prefix of the value.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/jsx-renderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const createRenderer =
/**
* JSX Renderer Middleware for hono.
*
* @see {@link{https://hono.dev/middleware/builtin/jsx-renderer}}
* @see {@link{https://hono.dev/docs/middleware/builtin/jsx-renderer}}
*
* @param {ComponentWithChildren} [component] - The component to render, which can accept children and props.
* @param {RendererOptions} [options] - The options for the JSX renderer middleware.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/jwt/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type JwtVariables = {
/**
* JWT Auth Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/jwt}
* @see {@link https://hono.dev/docs/middleware/builtin/jwt}
*
* @param {object} options - The options for the JWT middleware.
* @param {string} [options.secret] - A value of your secret key.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function log(
/**
* Logger Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/logger}
* @see {@link https://hono.dev/docs/middleware/builtin/logger}
*
* @param {PrintFunc} [fn=console.log] - Optional function for customized logging behavior.
* @returns {MiddlewareHandler} The middleware handler function.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/method-override/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const DEFAULT_METHOD_FORM_NAME = '_method'
/**
* Method Override Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/method-override}
* @see {@link https://hono.dev/docs/middleware/builtin/method-override}
*
* @param {MethodOverrideOptions} options - The options for the method override middleware.
* @param {Hono} options.app - The instance of Hono is used in your application.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/pretty-json/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type prettyOptions = {
/**
* Pretty JSON Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/pretty-json}
* @see {@link https://hono.dev/docs/middleware/builtin/pretty-json}
*
* @param {prettyOptions} [options] - The options for the pretty JSON middleware.
* @param {number} [options.space=2] - Number of spaces for indentation.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/secure-headers/secure-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const NONCE: ContentSecurityPolicyOptionHandler = (ctx) => {
/**
* Secure Headers Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/secure-headers}
* @see {@link https://hono.dev/docs/middleware/builtin/secure-headers}
*
* @param {Partial<SecureHeadersOptions>} [customOptions] - The options for the secure headers middleware.
* @param {ContentSecurityPolicyOptions} [customOptions.contentSecurityPolicy] - Settings for the Content-Security-Policy header.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/timing/timing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const getTime = (): number => {
/**
* Server-Timing Middleware for Hono.
*
* @see {@link https://hono.dev/middleware/builtin/timing}
* @see {@link https://hono.dev/docs/middleware/builtin/timing}
*
* @param {TimingOptions} [config] - The options for the timing middleware.
* @param {boolean} [config.total=true] - Show the total response time.
Expand Down
Loading