Skip to content
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
2 changes: 1 addition & 1 deletion browser/websocket/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect, disconnect } from "./socket.ts";
import { getProjectId, getUserId } from "./id.ts";
import { makeChanges } from "./makeChanges.ts";
import { HeadData, pull } from "./pull.ts";
import type { Line } from "../../deps/scrapbox.ts";
import type { Line } from "../../deps/scrapbox-rest.ts";
import { pushCommit, pushWithRetry } from "./_fetch.ts";

export interface PatchOptions {
Expand Down
2 changes: 1 addition & 1 deletion browser/websocket/pull.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Line } from "../../deps/scrapbox.ts";
import type { Line } from "../../deps/scrapbox-rest.ts";
import { getPage } from "../../rest/pages.ts";

export interface HeadData {
Expand Down
24 changes: 24 additions & 0 deletions deps/scrapbox-rest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export type {
BadRequestError,
BaseLine as Line,
ErrorLike,
ExportedData,
GuestUser,
ImportedData,
InvalidURLError,
MemberProject,
MemberUser,
NoQueryError,
NotFoundError,
NotLoggedInError,
NotMemberError,
NotMemberProject,
NotPrivilegeError,
Page,
PageList,
ProjectSearchResult,
SearchedTitle,
SearchResult,
SessionError,
TweetInfo,
} from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.3/rest.ts";
25 changes: 1 addition & 24 deletions deps/scrapbox.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
export type {
BadRequestError,
BaseLine as Line,
ErrorLike,
ExportedData,
GuestUser,
ImportedData,
InvalidURLError,
MemberProject,
MemberUser,
NoQueryError,
NotFoundError,
NotLoggedInError,
NotMemberError,
NotMemberProject,
NotPrivilegeError,
Page,
PageList,
ProjectSearchResult,
SearchedTitle,
SearchResult,
SessionError,
TweetInfo,
} from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.3/rest.ts";
export type {
Line,
Scrapbox,
} from "https://raw.githubusercontent.com/scrapbox-jp/types/0.3.3/userscript.ts";
export type {
Expand Down
2 changes: 1 addition & 1 deletion is.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ErrorLike } from "./deps/scrapbox.ts";
import type { ErrorLike } from "./deps/scrapbox-rest.ts";
// These code are based on https://deno.land/x/unknownutil@v1.1.0/is.ts

export const isNone = (value: unknown): value is undefined | null =>
Expand Down
2 changes: 1 addition & 1 deletion rest/getGyazoToken.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NotLoggedInError } from "../deps/scrapbox.ts";
import type { NotLoggedInError } from "../deps/scrapbox-rest.ts";
import { cookie } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/getTweetInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
InvalidURLError,
SessionError,
TweetInfo,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie, getCSRFToken } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/getWebPageTitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
BadRequestError,
InvalidURLError,
SessionError,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie, getCSRFToken } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
NotFoundError,
NotLoggedInError,
SearchedTitle,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/page-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
NotFoundError,
NotLoggedInError,
NotPrivilegeError,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie, getCSRFToken } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
NotMemberError,
Page,
PageList,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/profile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GuestUser, MemberUser } from "../deps/scrapbox.ts";
import type { GuestUser, MemberUser } from "../deps/scrapbox-rest.ts";
import { cookie } from "./auth.ts";
import { BaseOptions, setDefaults } from "./util.ts";
import { UnexpectedResponseError } from "./error.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
NotLoggedInError,
NotMemberError,
NotMemberProject,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/replaceLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
NotFoundError,
NotLoggedInError,
NotMemberError,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie, getCSRFToken } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down
2 changes: 1 addition & 1 deletion rest/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
NotMemberError,
ProjectSearchResult,
SearchResult,
} from "../deps/scrapbox.ts";
} from "../deps/scrapbox-rest.ts";
import { cookie } from "./auth.ts";
import { UnexpectedResponseError } from "./error.ts";
import { tryToErrorLike } from "../is.ts";
Expand Down