Archived
1
0

refactor: add cookie.ts to lib/vscode

This commit is contained in:
Joe Previte 2021-03-17 16:08:25 -07:00
parent 9f790fd2f3
commit 5cec6208d0
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24
3 changed files with 5 additions and 4 deletions

View File

@ -0,0 +1,3 @@
export enum Cookie {
Key = "key",
}

View File

@ -40,6 +40,7 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys'; import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
import { ICommandService } from 'vs/platform/commands/common/commands'; import { ICommandService } from 'vs/platform/commands/common/commands';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { Cookie } from 'vs/server/common/cookie';
export abstract class MenubarControl extends Disposable { export abstract class MenubarControl extends Disposable {

View File

@ -3,14 +3,11 @@ import { promises as fs } from "fs"
import { RateLimiter as Limiter } from "limiter" import { RateLimiter as Limiter } from "limiter"
import * as path from "path" import * as path from "path"
import safeCompare from "safe-compare" import safeCompare from "safe-compare"
import { Cookie } from "../../../lib/vscode/src/vs/server/common/cookie"
import { rootPath } from "../constants" import { rootPath } from "../constants"
import { authenticated, getCookieDomain, redirect, replaceTemplates } from "../http" import { authenticated, getCookieDomain, redirect, replaceTemplates } from "../http"
import { hash, humanPath } from "../util" import { hash, humanPath } from "../util"
export enum Cookie {
Key = "key",
}
// RateLimiter wraps around the limiter library for logins. // RateLimiter wraps around the limiter library for logins.
// It allows 2 logins every minute and 12 logins every hour. // It allows 2 logins every minute and 12 logins every hour.
class RateLimiter { class RateLimiter {