Merge branch 'main' into patch-1
This commit is contained in:
commit
0d584cd5e1
|
@ -25,12 +25,6 @@ main() {
|
|||
rsync README.md "$RELEASE_PATH"
|
||||
rsync LICENSE.txt "$RELEASE_PATH"
|
||||
rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH"
|
||||
|
||||
# code-server exports types which can be imported and used by plugins. Those
|
||||
# types import ipc.d.ts but it isn't included in the final vscode build so
|
||||
# we'll copy it ourselves here.
|
||||
mkdir -p "$RELEASE_PATH/lib/vscode/src/vs/server"
|
||||
rsync ./lib/vscode/src/vs/server/ipc.d.ts "$RELEASE_PATH/lib/vscode/src/vs/server"
|
||||
}
|
||||
|
||||
bundle_code_server() {
|
||||
|
|
|
@ -16,5 +16,6 @@
|
|||
**/extensions/markdown-language-features/notebook-out/**
|
||||
**/extensions/typescript-basics/test/colorize-fixtures/**
|
||||
**/extensions/**/dist/**
|
||||
# This is a code-server code symlink.
|
||||
# These are code-server code symlinks.
|
||||
src/vs/base/node/proxy_agent.ts
|
||||
src/vs/ipc.d.ts
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../../../typings/ipc.d.ts
|
|
@ -1,5 +1,6 @@
|
|||
import * as path from 'vs/base/common/path';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Options } from 'vs/ipc';
|
||||
import { localize } from 'vs/nls';
|
||||
import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
|
@ -11,7 +12,6 @@ import { Registry } from 'vs/platform/registry/common/platform';
|
|||
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { TelemetryChannelClient } from 'vs/server/common/telemetry';
|
||||
import { Options } from 'vs/server/ipc.d';
|
||||
import 'vs/workbench/contrib/localizations/browser/localizations.contribution';
|
||||
import { LocalizationsService } from 'vs/workbench/services/localizations/electron-sandbox/localizationsService';
|
||||
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { field } from '@coder/logger';
|
||||
import { setUnexpectedErrorHandler } from 'vs/base/common/errors';
|
||||
import { CodeServerMessage, VscodeMessage } from 'vs/server/ipc';
|
||||
import * as proxyAgent from 'vs/base/node/proxy_agent';
|
||||
import { CodeServerMessage, VscodeMessage } from 'vs/ipc';
|
||||
import { logger } from 'vs/server/node/logger';
|
||||
import { enableCustomMarketplace } from 'vs/server/node/marketplace';
|
||||
import { Vscode } from 'vs/server/node/server';
|
||||
import * as proxyAgent from 'vs/base/node/proxy_agent';
|
||||
|
||||
setUnexpectedErrorHandler((error) => logger.warn(error instanceof Error ? error.message : error));
|
||||
enableCustomMarketplace();
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
/**
|
||||
* External interfaces for integration into code-server over IPC. No vs imports
|
||||
* should be made in this file.
|
||||
*/
|
||||
export interface Options {
|
||||
base: string
|
||||
disableTelemetry: boolean
|
||||
disableUpdateCheck: boolean
|
||||
}
|
||||
|
||||
export interface InitMessage {
|
||||
type: "init"
|
||||
id: string
|
||||
options: VscodeOptions
|
||||
}
|
||||
|
||||
export type Query = { [key: string]: string | string[] | undefined | Query | Query[] }
|
||||
|
||||
export interface SocketMessage {
|
||||
type: "socket"
|
||||
query: Query
|
||||
permessageDeflate: boolean
|
||||
}
|
||||
|
||||
export interface CliMessage {
|
||||
type: "cli"
|
||||
args: Args
|
||||
}
|
||||
|
||||
export interface OpenCommandPipeArgs {
|
||||
type: "open"
|
||||
fileURIs?: string[]
|
||||
folderURIs: string[]
|
||||
forceNewWindow?: boolean
|
||||
diffMode?: boolean
|
||||
addMode?: boolean
|
||||
gotoLineMode?: boolean
|
||||
forceReuseWindow?: boolean
|
||||
waitMarkerFilePath?: string
|
||||
}
|
||||
|
||||
export type CodeServerMessage = InitMessage | SocketMessage | CliMessage
|
||||
|
||||
export interface ReadyMessage {
|
||||
type: "ready"
|
||||
}
|
||||
|
||||
export interface OptionsMessage {
|
||||
id: string
|
||||
type: "options"
|
||||
options: WorkbenchOptions
|
||||
}
|
||||
|
||||
export type VscodeMessage = ReadyMessage | OptionsMessage
|
||||
|
||||
export interface StartPath {
|
||||
url: string
|
||||
workspace: boolean
|
||||
}
|
||||
|
||||
export interface Args {
|
||||
"user-data-dir"?: string
|
||||
|
||||
"enable-proposed-api"?: string[]
|
||||
"extensions-dir"?: string
|
||||
"builtin-extensions-dir"?: string
|
||||
"extra-extensions-dir"?: string[]
|
||||
"extra-builtin-extensions-dir"?: string[]
|
||||
"ignore-last-opened"?: boolean
|
||||
|
||||
locale?: string
|
||||
|
||||
log?: string
|
||||
verbose?: boolean
|
||||
|
||||
_: string[]
|
||||
}
|
||||
|
||||
export interface VscodeOptions {
|
||||
readonly args: Args
|
||||
readonly remoteAuthority: string
|
||||
readonly startPath?: StartPath
|
||||
}
|
||||
|
||||
export interface VscodeOptionsMessage extends VscodeOptions {
|
||||
readonly id: string
|
||||
}
|
||||
|
||||
export interface UriComponents {
|
||||
readonly scheme: string
|
||||
readonly authority: string
|
||||
readonly path: string
|
||||
readonly query: string
|
||||
readonly fragment: string
|
||||
}
|
||||
|
||||
export interface NLSConfiguration {
|
||||
locale: string
|
||||
availableLanguages: {
|
||||
[key: string]: string
|
||||
}
|
||||
pseudo?: boolean
|
||||
_languagePackSupport?: boolean
|
||||
}
|
||||
|
||||
export interface WorkbenchOptions {
|
||||
readonly workbenchWebConfiguration: {
|
||||
readonly remoteAuthority?: string
|
||||
readonly folderUri?: UriComponents
|
||||
readonly workspaceUri?: UriComponents
|
||||
readonly logLevel?: number
|
||||
readonly workspaceProvider?: {
|
||||
payload: [["userDataPath", string], ["enableProposedApi", string]]
|
||||
}
|
||||
}
|
||||
readonly remoteUserDataUri: UriComponents
|
||||
readonly productConfiguration: {
|
||||
codeServerVersion?: string
|
||||
readonly extensionsGallery?: {
|
||||
readonly serviceUrl: string
|
||||
readonly itemUrl: string
|
||||
readonly controlUrl: string
|
||||
readonly recommendationsUrl: string
|
||||
}
|
||||
}
|
||||
readonly nlsConfiguration: NLSConfiguration
|
||||
readonly commit: string
|
||||
}
|
||||
|
||||
export interface WorkbenchOptionsMessage {
|
||||
id: string
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import { field } from '@coder/logger';
|
||||
import { release } from 'os';
|
||||
import * as fs from 'fs';
|
||||
import * as net from 'net';
|
||||
import { release } from 'os';
|
||||
import * as path from 'path';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
|
@ -10,6 +10,7 @@ import { getMachineId } from 'vs/base/node/id';
|
|||
import { ClientConnectionEvent, IPCServer, IServerChannel, ProxyChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { LogsDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner';
|
||||
import { main } from 'vs/code/node/cliProcessMain';
|
||||
import { Query, VscodeOptions, WorkbenchOptions } from 'vs/ipc';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ConfigurationService } from 'vs/platform/configuration/common/configurationService';
|
||||
import { ExtensionHostDebugBroadcastChannel } from 'vs/platform/debug/common/extensionHostDebugIpc';
|
||||
|
@ -40,14 +41,13 @@ import { IRequestService } from 'vs/platform/request/common/request';
|
|||
import { RequestChannel } from 'vs/platform/request/common/requestIpc';
|
||||
import { RequestService } from 'vs/platform/request/node/requestService';
|
||||
import ErrorTelemetry from 'vs/platform/telemetry/browser/errorTelemetry';
|
||||
import { resolveCommonProperties } from 'vs/platform/telemetry/common/commonProperties';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { TelemetryLogAppender } from 'vs/platform/telemetry/common/telemetryLogAppender';
|
||||
import { TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
|
||||
import { combinedAppender, NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppender';
|
||||
import { resolveCommonProperties } from 'vs/platform/telemetry/common/commonProperties';
|
||||
import { TelemetryChannel } from 'vs/server/common/telemetry';
|
||||
import { Query, VscodeOptions, WorkbenchOptions } from 'vs/server/ipc';
|
||||
import { ExtensionEnvironmentChannel, FileProviderChannel, TerminalProviderChannel } from 'vs/server/node/channel';
|
||||
import { Connection, ExtensionHostConnection, ManagementConnection } from 'vs/server/node/connection';
|
||||
import { TelemetryClient } from 'vs/server/node/insights';
|
||||
|
|
|
@ -3,7 +3,7 @@ import { promises as fs } from "fs"
|
|||
import yaml from "js-yaml"
|
||||
import * as os from "os"
|
||||
import * as path from "path"
|
||||
import { Args as VsArgs } from "../../lib/vscode/src/vs/server/ipc"
|
||||
import { Args as VsArgs } from "../../typings/ipc"
|
||||
import { canConnect, generateCertificate, generatePassword, humanPath, paths } from "./util"
|
||||
|
||||
export enum AuthType {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { field, logger } from "@coder/logger"
|
|||
import * as cp from "child_process"
|
||||
import http from "http"
|
||||
import * as path from "path"
|
||||
import { CliMessage, OpenCommandPipeArgs } from "../../lib/vscode/src/vs/server/ipc"
|
||||
import { CliMessage, OpenCommandPipeArgs } from "../../typings/ipc"
|
||||
import { plural } from "../common/util"
|
||||
import { createApp, ensureAddress } from "./app"
|
||||
import {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { logger } from "@coder/logger"
|
|||
import * as cp from "child_process"
|
||||
import * as net from "net"
|
||||
import * as path from "path"
|
||||
import * as ipc from "../../lib/vscode/src/vs/server/ipc"
|
||||
import * as ipc from "../../typings/ipc"
|
||||
import { arrayify, generateUuid } from "../common/util"
|
||||
import { rootPath } from "./constants"
|
||||
import { settings } from "./settings"
|
||||
|
|
|
@ -0,0 +1,135 @@
|
|||
/**
|
||||
* External interfaces for integration into code-server over IPC.
|
||||
* This file exists in two locations:
|
||||
* - typings/ipc.d.ts
|
||||
* - lib/vscode/src/typings/ipc.d.ts
|
||||
* The second is a symlink to the first.
|
||||
*/
|
||||
export interface Options {
|
||||
base: string
|
||||
disableTelemetry: boolean
|
||||
disableUpdateCheck: boolean
|
||||
}
|
||||
|
||||
export interface InitMessage {
|
||||
type: "init"
|
||||
id: string
|
||||
options: VscodeOptions
|
||||
}
|
||||
|
||||
export type Query = { [key: string]: string | string[] | undefined | Query | Query[] }
|
||||
|
||||
export interface SocketMessage {
|
||||
type: "socket"
|
||||
query: Query
|
||||
permessageDeflate: boolean
|
||||
}
|
||||
|
||||
export interface CliMessage {
|
||||
type: "cli"
|
||||
args: Args
|
||||
}
|
||||
|
||||
export interface OpenCommandPipeArgs {
|
||||
type: "open"
|
||||
fileURIs?: string[]
|
||||
folderURIs: string[]
|
||||
forceNewWindow?: boolean
|
||||
diffMode?: boolean
|
||||
addMode?: boolean
|
||||
gotoLineMode?: boolean
|
||||
forceReuseWindow?: boolean
|
||||
waitMarkerFilePath?: string
|
||||
}
|
||||
|
||||
export type CodeServerMessage = InitMessage | SocketMessage | CliMessage
|
||||
|
||||
export interface ReadyMessage {
|
||||
type: "ready"
|
||||
}
|
||||
|
||||
export interface OptionsMessage {
|
||||
id: string
|
||||
type: "options"
|
||||
options: WorkbenchOptions
|
||||
}
|
||||
|
||||
export type VscodeMessage = ReadyMessage | OptionsMessage
|
||||
|
||||
export interface StartPath {
|
||||
url: string
|
||||
workspace: boolean
|
||||
}
|
||||
|
||||
export interface Args {
|
||||
"user-data-dir"?: string
|
||||
|
||||
"enable-proposed-api"?: string[]
|
||||
"extensions-dir"?: string
|
||||
"builtin-extensions-dir"?: string
|
||||
"extra-extensions-dir"?: string[]
|
||||
"extra-builtin-extensions-dir"?: string[]
|
||||
"ignore-last-opened"?: boolean
|
||||
|
||||
locale?: string
|
||||
|
||||
log?: string
|
||||
verbose?: boolean
|
||||
|
||||
_: string[]
|
||||
}
|
||||
|
||||
export interface VscodeOptions {
|
||||
readonly args: Args
|
||||
readonly remoteAuthority: string
|
||||
readonly startPath?: StartPath
|
||||
}
|
||||
|
||||
export interface VscodeOptionsMessage extends VscodeOptions {
|
||||
readonly id: string
|
||||
}
|
||||
|
||||
export interface UriComponents {
|
||||
readonly scheme: string
|
||||
readonly authority: string
|
||||
readonly path: string
|
||||
readonly query: string
|
||||
readonly fragment: string
|
||||
}
|
||||
|
||||
export interface NLSConfiguration {
|
||||
locale: string
|
||||
availableLanguages: {
|
||||
[key: string]: string
|
||||
}
|
||||
pseudo?: boolean
|
||||
_languagePackSupport?: boolean
|
||||
}
|
||||
|
||||
export interface WorkbenchOptions {
|
||||
readonly workbenchWebConfiguration: {
|
||||
readonly remoteAuthority?: string
|
||||
readonly folderUri?: UriComponents
|
||||
readonly workspaceUri?: UriComponents
|
||||
readonly logLevel?: number
|
||||
readonly workspaceProvider?: {
|
||||
payload: [["userDataPath", string], ["enableProposedApi", string]]
|
||||
}
|
||||
}
|
||||
readonly remoteUserDataUri: UriComponents
|
||||
readonly productConfiguration: {
|
||||
codeServerVersion?: string
|
||||
readonly extensionsGallery?: {
|
||||
readonly serviceUrl: string
|
||||
readonly itemUrl: string
|
||||
readonly controlUrl: string
|
||||
readonly recommendationsUrl: string
|
||||
}
|
||||
}
|
||||
readonly nlsConfiguration: NLSConfiguration
|
||||
readonly commit: string
|
||||
}
|
||||
|
||||
export interface WorkbenchOptionsMessage {
|
||||
id: string
|
||||
}
|
Loading…
Reference in New Issue