Skip to content

Commit 5cec620

Browse files
committed
refactor: add cookie.ts to lib/vscode
1 parent 9f790fd commit 5cec620

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export enum Cookie {
2+
Key = "key",
3+
}

lib/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.ts

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
4040
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
4141
import { ICommandService } from 'vs/platform/commands/common/commands';
4242
import { ILogService } from 'vs/platform/log/common/log';
43+
import { Cookie } from 'vs/server/common/cookie';
4344

4445
export abstract class MenubarControl extends Disposable {
4546

src/node/routes/login.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ import { promises as fs } from "fs"
33
import { RateLimiter as Limiter } from "limiter"
44
import * as path from "path"
55
import safeCompare from "safe-compare"
6+
import { Cookie } from "../../../lib/vscode/src/vs/server/common/cookie"
67
import { rootPath } from "../constants"
78
import { authenticated, getCookieDomain, redirect, replaceTemplates } from "../http"
89
import { hash, humanPath } from "../util"
910

10-
export enum Cookie {
11-
Key = "key",
12-
}
13-
1411
// RateLimiter wraps around the limiter library for logins.
1512
// It allows 2 logins every minute and 12 logins every hour.
1613
class RateLimiter {

0 commit comments

Comments
 (0)