Skip to content

Commit 5fb5763

Browse files
committed
refactor: Remove std/hash from vendor/ and Organize scrapbox-userscript-websocket roughly
1 parent c34e418 commit 5fb5763

File tree

25 files changed

+54
-362
lines changed

25 files changed

+54
-362
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// this file is copied from https://cdn.esm.sh/v54/socket.io-client@4.2.0/build/index.d.ts
2-
import { ManagerOptions } from "./manager.ts";
3-
import { Socket, SocketOptions } from "./socket.ts";
2+
import type { ManagerOptions } from "./manager.ts";
3+
import type { Socket, SocketOptions } from "./socket.ts";
44
/**
55
* Looks up an existing `Manager` for multiplexing.
66
* If the user summons:
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// this file is copied from https://cdn.esm.sh/v54/socket.io-client@4.2.0/build/manager.d.ts
22
// deno-lint-ignore-file no-explicit-any camelcase ban-types
3-
import { Socket, SocketOptions } from "./socket.ts";
4-
import { Packet } from "./parser.ts";
3+
import type { Socket, SocketOptions } from "./socket.ts";
4+
import type { Packet } from "./parser.ts";
55
import {
6-
DefaultEventsMap,
7-
EventsMap,
6+
type DefaultEventsMap,
7+
type EventsMap,
88
StrictEventEmitter,
99
} from "./typed-events.ts";
1010
interface EngineOptions {
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// deno-lint-ignore-file no-explicit-any camelcase
22
// this file is copied from https://cdn.esm.sh/v54/socket.io-client@4.2.0/build/socket.d.ts
3-
import { Packet } from "./parser.ts";
4-
import { Manager } from "./manager.ts";
3+
import type { Packet } from "./parser.ts";
4+
import type { Manager } from "./manager.ts";
55
import {
6-
DefaultEventsMap,
7-
EventNames,
8-
EventParams,
9-
EventsMap,
6+
type DefaultEventsMap,
7+
type EventNames,
8+
type EventParams,
9+
type EventsMap,
1010
StrictEventEmitter,
1111
} from "./typed-events.ts";
1212
export interface SocketOptions {

browser/websocket/applyCommit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CommitNotification } from "../../deps/socket.ts";
1+
import type { CommitNotification } from "./websocket-types.ts";
22
import type { Page } from "@cosense/types/rest";
33
import { getUnixTimeFromId } from "./id.ts";
44
type Line = Page["lines"][number];

browser/websocket/diffToChanges.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
DeleteChange,
55
InsertChange,
66
UpdateChange,
7-
} from "../../deps/socket.ts";
7+
} from "./websocket-types.ts";
88
import { createNewLineId } from "./id.ts";
99

1010
type Options = {

browser/websocket/listen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import {
1010
type Socket,
1111
socketIO,
1212
wrap,
13-
} from "../../deps/socket.ts";
13+
} from "./wrap.ts";
1414
import type { HTTPError } from "../../rest/responseIntoResult.ts";
1515
import type { AbortError, NetworkError } from "../../rest/robustFetch.ts";
1616
import { getProjectId } from "./pull.ts";
1717
import { connect, disconnect } from "./socket.ts";
1818
export type {
1919
ProjectUpdatesStreamCommit,
2020
ProjectUpdatesStreamEvent,
21-
} from "../../deps/socket.ts";
21+
} from "./websocket-types.ts";
2222

2323
export interface ListenStreamOptions {
2424
socket?: Socket;

browser/websocket/makeChanges.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { diffToChanges } from "./diffToChanges.ts";
22
import type { Page } from "@cosense/types/rest";
3-
import type { Change } from "../../deps/socket.ts";
3+
import type { Change } from "./websocket-types.ts";
44
import { findMetadata, getHelpfeels } from "./findMetadata.ts";
55
import { isSameArray } from "./isSameArray.ts";
66

0 commit comments

Comments
 (0)