Skip to content

Commit

Permalink
chore: add check:docs task (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Jan 5, 2024
1 parent 34b8fb3 commit 6765426
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"demo": "deno run --allow-net --env --allow-env --unstable --watch demo.ts",
"check:license": "deno run -A tools/check_license.ts",
"check:types": "deno check --unstable **/*.ts",
"check": "deno task check:license --check && deno task check:types",
"check:docs": "deno doc --lint mod.ts",
"check": "deno task check:license --check && deno task check:types && deno task check:docs",
"test": "DENO_KV_PATH=:memory: deno test --unstable --allow-env --allow-read --allow-run --parallel --trace-ops --coverage --doc",
"coverage": "deno coverage coverage",
"ok": "deno fmt --check && deno lint && deno task check && deno task test",
Expand Down
5 changes: 5 additions & 0 deletions lib/create_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { handleCallback } from "./handle_callback.ts";
import { signIn, type SignInOptions } from "./sign_in.ts";
import { signOut } from "./sign_out.ts";

/** Options for {@linkcode createHelpers}. */
export interface CreateHelpersOptions {
/**
* Options for overwriting the default cookie options throughout each of the
* helpers.
*/
cookieOptions?: Partial<Cookie>;
}

Expand Down
1 change: 1 addition & 0 deletions lib/get_session_id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { getSessionIdCookie } from "./_http.ts";
import { isSiteSession } from "./_kv.ts";

/** Options for {@linkcode getSessionId}. */
export interface GetSessionIdOptions {
/**
* The name of the cookie in the request. This must match the cookie name
Expand Down
1 change: 1 addition & 0 deletions lib/handle_callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from "./_http.ts";
import { getAndDeleteOAuthSession, setSiteSession } from "./_kv.ts";

/** Options for {@linkcode handleCallback}. */
export interface HandleCallbackOptions {
/** Overwrites cookie properties set in the response. These must match the
* cookie properties used in {@linkcode getSessionId} and
Expand Down
1 change: 1 addition & 0 deletions lib/sign_in.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
} from "./_http.ts";
import { setOAuthSession } from "./_kv.ts";

/** Options for {@linkcode signIn}. */
export interface SignInOptions {
/** URL parameters that are appended to the authorization URI, if defined. */
urlParams?: Record<string, string>;
Expand Down
1 change: 1 addition & 0 deletions lib/sign_out.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from "./_http.ts";
import { deleteSiteSession } from "./_kv.ts";

/** Options for {@linkcode signOut}. */
export interface SignOutOptions {
/**
* Overwrites cookie properties set in the response. These must match the
Expand Down
2 changes: 1 addition & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
export type { OAuth2ClientConfig } from "../deps.ts";
export type { Cookie, OAuth2ClientConfig, Tokens } from "../deps.ts";

0 comments on commit 6765426

Please sign in to comment.