refactor: move tmpdir into src/node/constants
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { logger } from "@coder/logger"
|
||||
import { JSONSchemaForNPMPackageJsonFiles } from "@schemastore/package"
|
||||
import * as os from "os"
|
||||
import * as path from "path"
|
||||
|
||||
export function getPackageJson(relativePath: string): JSONSchemaForNPMPackageJsonFiles {
|
||||
@ -18,3 +19,4 @@ const pkg = getPackageJson("../../package.json")
|
||||
export const version = pkg.version || "development"
|
||||
export const commit = pkg.commit || "development"
|
||||
export const rootPath = path.resolve(__dirname, "../..")
|
||||
export const tmpdir = path.join(os.tmpdir(), "code-server")
|
||||
|
@ -4,7 +4,8 @@ import * as path from "path"
|
||||
import * as tls from "tls"
|
||||
import { Emitter } from "../common/emitter"
|
||||
import { generateUuid } from "../common/util"
|
||||
import { canConnect, tmpdir } from "./util"
|
||||
import { tmpdir } from "./constants"
|
||||
import { canConnect } from "./util"
|
||||
|
||||
/**
|
||||
* Provides a way to proxy a TLS socket. Can be used when you need to pass a
|
||||
|
@ -8,8 +8,6 @@ import * as path from "path"
|
||||
import * as util from "util"
|
||||
import xdgBasedir from "xdg-basedir"
|
||||
|
||||
export const tmpdir = path.join(os.tmpdir(), "code-server")
|
||||
|
||||
interface Paths {
|
||||
data: string
|
||||
config: string
|
||||
|
Reference in New Issue
Block a user