@devframes/plugin-code-server 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{constants-DTS2klFC.d.mts → constants-DbOzymwM.d.mts} +0 -2
- package/dist/node/cli.d.mts +1 -3
- package/dist/node/cli.mjs +2 -3
- package/dist/node/constants.d.mts +1 -1
- package/dist/node/constants.mjs +1 -2
- package/dist/node/index.d.mts +1 -3
- package/dist/node/index.mjs +1 -1
- package/dist/node/rpc/index.d.mts +2 -4
- package/dist/node/rpc/index.mjs +1 -2
- package/dist/node/setup.d.mts +0 -14
- package/dist/node/setup.mjs +5 -9
- package/dist/node/types.d.mts +1 -3
- package/dist/node/vite.d.mts +1 -3
- package/dist/node/vite.mjs +2 -3
- package/dist/{node-DX8KVFBn.mjs → node-DNNKZQB1.mjs} +3 -5
- package/dist/{rpc-Df9IRgPd.mjs → rpc-CCOvDvNT.mjs} +5 -10
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/node/constants.d.ts
|
|
2
1
|
/** Stable devframe id for the code-server plugin. */
|
|
3
2
|
declare const PLUGIN_ID = "devframes_plugin_code-server";
|
|
4
3
|
/**
|
|
@@ -32,5 +31,4 @@ declare const TERMINAL_SESSION_ICON = "ph:code-duotone";
|
|
|
32
31
|
* exact cookie the server reads.
|
|
33
32
|
*/
|
|
34
33
|
declare function getCookieSessionName(suffix?: string): string;
|
|
35
|
-
//#endregion
|
|
36
34
|
export { SESSION_COOKIE_BASE as a, TERMINAL_SESSION_TITLE as c, PLUGIN_ID as i, getCookieSessionName as l, DEFAULT_PORT as n, STATE_KEY as o, DEFAULT_START_TIMEOUT as r, TERMINAL_SESSION_ICON as s, DEFAULT_CODE_SERVER_PORT as t };
|
package/dist/node/cli.d.mts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { CodeServerOptions } from "./types.mjs";
|
|
2
2
|
import { CacHandle, CreateCacOptions } from "devframe/adapters/cac";
|
|
3
|
-
//#region src/node/cli.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Build a standalone CLI for the code-server panel, exposing `dev` / `build` /
|
|
6
5
|
* `mcp` subcommands, backed by {@link createCodeServerDevframe}. Used by the package
|
|
7
6
|
* `bin` (`devframe-code-server`).
|
|
8
7
|
*/
|
|
9
|
-
export declare function createCodeServerCli(options?: CodeServerOptions, cliOptions?: CreateCacOptions): CacHandle;
|
|
10
|
-
//#endregion
|
|
8
|
+
export declare function createCodeServerCli(options?: CodeServerOptions, cliOptions?: CreateCacOptions): CacHandle;
|
package/dist/node/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createCodeServerDevframe } from "../node-
|
|
1
|
+
import { t as createCodeServerDevframe } from "../node-DNNKZQB1.mjs";
|
|
2
2
|
import { createCac } from "devframe/adapters/cac";
|
|
3
|
-
|
|
3
|
+
// src/node/cli.ts
|
|
4
4
|
/**
|
|
5
5
|
* Build a standalone CLI for the code-server panel, exposing `dev` / `build` /
|
|
6
6
|
* `mcp` subcommands, backed by {@link createCodeServerDevframe}. Used by the package
|
|
@@ -9,5 +9,4 @@ import { createCac } from "devframe/adapters/cac";
|
|
|
9
9
|
function createCodeServerCli(options = {}, cliOptions = {}) {
|
|
10
10
|
return createCac(createCodeServerDevframe(options), cliOptions);
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { createCodeServerCli };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SESSION_COOKIE_BASE, c as TERMINAL_SESSION_TITLE, i as PLUGIN_ID, l as getCookieSessionName, n as DEFAULT_PORT, o as STATE_KEY, r as DEFAULT_START_TIMEOUT, s as TERMINAL_SESSION_ICON, t as DEFAULT_CODE_SERVER_PORT } from "../constants-
|
|
1
|
+
import { a as SESSION_COOKIE_BASE, c as TERMINAL_SESSION_TITLE, i as PLUGIN_ID, l as getCookieSessionName, n as DEFAULT_PORT, o as STATE_KEY, r as DEFAULT_START_TIMEOUT, s as TERMINAL_SESSION_ICON, t as DEFAULT_CODE_SERVER_PORT } from "../constants-DbOzymwM.mjs";
|
|
2
2
|
export { DEFAULT_CODE_SERVER_PORT, DEFAULT_PORT, DEFAULT_START_TIMEOUT, PLUGIN_ID, SESSION_COOKIE_BASE, STATE_KEY, TERMINAL_SESSION_ICON, TERMINAL_SESSION_TITLE, getCookieSessionName };
|
package/dist/node/constants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/node/constants.ts
|
|
2
2
|
/** Stable devframe id for the code-server plugin. */
|
|
3
3
|
const PLUGIN_ID = "devframes_plugin_code-server";
|
|
4
4
|
/**
|
|
@@ -34,5 +34,4 @@ const TERMINAL_SESSION_ICON = "ph:code-duotone";
|
|
|
34
34
|
function getCookieSessionName(suffix) {
|
|
35
35
|
return suffix ? `${SESSION_COOKIE_BASE}-${suffix.replace(/[^a-z0-9-]/gi, "-")}` : SESSION_COOKIE_BASE;
|
|
36
36
|
}
|
|
37
|
-
//#endregion
|
|
38
37
|
export { DEFAULT_CODE_SERVER_PORT, DEFAULT_PORT, DEFAULT_START_TIMEOUT, PLUGIN_ID, SESSION_COOKIE_BASE, STATE_KEY, TERMINAL_SESSION_ICON, TERMINAL_SESSION_TITLE, getCookieSessionName };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CodeServerBackend, CodeServerConnect, CodeServerDetection, CodeServerLogin, CodeServerMode, CodeServerOptions, CodeServerServerInfo, CodeServerSharedState, CodeServerStartRequest, CodeServerStartResult, CodeServerStatus, CodeServerStatusResult, CodeServerTunnelOptions } from "./types.mjs";
|
|
2
|
-
import { i as PLUGIN_ID, l as getCookieSessionName, n as DEFAULT_PORT, o as STATE_KEY, t as DEFAULT_CODE_SERVER_PORT } from "../constants-
|
|
2
|
+
import { i as PLUGIN_ID, l as getCookieSessionName, n as DEFAULT_PORT, o as STATE_KEY, t as DEFAULT_CODE_SERVER_PORT } from "../constants-DbOzymwM.mjs";
|
|
3
3
|
import { DevframeDefinition } from "devframe";
|
|
4
|
-
//#region src/node/index.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Build a {@link DevframeDefinition} for the code-server panel. The same
|
|
7
6
|
* definition runs standalone (`createCac`), mounts into a Vite host
|
|
@@ -19,5 +18,4 @@ import { DevframeDefinition } from "devframe";
|
|
|
19
18
|
* ```
|
|
20
19
|
*/
|
|
21
20
|
export declare function createCodeServerDevframe(options?: CodeServerOptions): DevframeDefinition;
|
|
22
|
-
//#endregion
|
|
23
21
|
export { type CodeServerBackend, type CodeServerConnect, type CodeServerDetection, type CodeServerLogin, type CodeServerMode, type CodeServerOptions, type CodeServerServerInfo, type CodeServerSharedState, type CodeServerStartRequest, type CodeServerStartResult, type CodeServerStatus, type CodeServerStatusResult, type CodeServerTunnelOptions, DEFAULT_CODE_SERVER_PORT, DEFAULT_PORT, PLUGIN_ID, STATE_KEY, createCodeServerDevframe as default, getCookieSessionName };
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createCodeServerDevframe } from "../node-
|
|
1
|
+
import { t as createCodeServerDevframe } from "../node-DNNKZQB1.mjs";
|
|
2
2
|
import { DEFAULT_CODE_SERVER_PORT, DEFAULT_PORT, PLUGIN_ID, STATE_KEY, getCookieSessionName } from "./constants.mjs";
|
|
3
3
|
export { DEFAULT_CODE_SERVER_PORT, DEFAULT_PORT, PLUGIN_ID, STATE_KEY, createCodeServerDevframe, createCodeServerDevframe as default, getCookieSessionName };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { CodeServerDetection, CodeServerSharedState, CodeServerStartRequest, CodeServerStatusResult } from "../types.mjs";
|
|
2
1
|
import "../index.mjs";
|
|
2
|
+
import { CodeServerDetection, CodeServerSharedState, CodeServerStartRequest, CodeServerStatusResult } from "../types.mjs";
|
|
3
3
|
import { RpcDefinitionsToFunctions } from "devframe/rpc";
|
|
4
|
-
//#region src/node/rpc/index.d.ts
|
|
5
4
|
export declare const serverFunctions: readonly [import("devframe/rpc").RpcFunctionDefinitionWithoutSchemas<"devframes:plugin:code-server:detect", "query", [], Promise<CodeServerDetection>, undefined, undefined, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithoutSchemas<"devframes:plugin:code-server:status", "query", [], CodeServerStatusResult, undefined, undefined, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithoutSchemas<"devframes:plugin:code-server:start", "action", [req?: CodeServerStartRequest | undefined], Promise<CodeServerStatusResult>, undefined, undefined, import("devframe").DevframeNodeContext>, import("devframe/rpc").RpcFunctionDefinitionWithoutSchemas<"devframes:plugin:code-server:stop", "action", [], CodeServerStatusResult, undefined, undefined, import("devframe").DevframeNodeContext>];
|
|
6
5
|
declare module 'devframe' {
|
|
7
6
|
interface DevframeRpcServerFunctions extends RpcDefinitionsToFunctions<typeof serverFunctions> {}
|
|
8
7
|
interface DevframeRpcSharedStates {
|
|
9
8
|
'devframes:plugin:code-server:state': CodeServerSharedState;
|
|
10
9
|
}
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
10
|
+
}
|
package/dist/node/rpc/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { serverFunctions };
|
|
1
|
+
export { t as serverFunctions } from "../../rpc-CCOvDvNT.mjs";
|
package/dist/node/setup.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CodeServerBackend, CodeServerConnect, CodeServerDetection, CodeServerLogin, CodeServerMode, CodeServerOptions, CodeServerStartRequest, CodeServerStartResult, CodeServerStatusResult } from "./types.mjs";
|
|
2
2
|
import { DevframeNodeContext } from "devframe";
|
|
3
|
-
//#region src/node/supervisor.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Owns the lifecycle of a single editor child process. Resolves a launch
|
|
6
5
|
* {@link CodeServerProfile} (Coder `code-server`, Microsoft `code serve-web`,
|
|
@@ -144,8 +143,6 @@ export declare class CodeServerSupervisor {
|
|
|
144
143
|
private waitForReady;
|
|
145
144
|
private registerCleanup;
|
|
146
145
|
}
|
|
147
|
-
//#endregion
|
|
148
|
-
//#region src/node/backends.d.ts
|
|
149
146
|
/**
|
|
150
147
|
* The internal launch profile the supervisor drives. One of three "kinds":
|
|
151
148
|
* the two local {@link CodeServerBackend}s plus the `code tunnel` profile
|
|
@@ -198,12 +195,8 @@ interface CodeServerProfile {
|
|
|
198
195
|
}
|
|
199
196
|
/** Resolve the launch profile for a mode + backend. */
|
|
200
197
|
export declare function resolveProfile(mode: CodeServerMode, backend: CodeServerBackend): CodeServerProfile;
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region src/node/context.d.ts
|
|
203
198
|
export declare function setCodeServerSupervisor(ctx: DevframeNodeContext, supervisor: CodeServerSupervisor): void;
|
|
204
199
|
export declare function getCodeServerSupervisor(ctx: DevframeNodeContext): CodeServerSupervisor;
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region src/node/detect.d.ts
|
|
207
200
|
interface DetectCodeServerResult {
|
|
208
201
|
installed: boolean;
|
|
209
202
|
version?: string;
|
|
@@ -222,8 +215,6 @@ interface DetectCodeServerResult {
|
|
|
222
215
|
* from leaking into the reported version.
|
|
223
216
|
*/
|
|
224
217
|
export declare function detectCodeServer(bin?: string, timeoutMs?: number): Promise<DetectCodeServerResult>;
|
|
225
|
-
//#endregion
|
|
226
|
-
//#region ../../node_modules/.pnpm/nostics@1.3.0/node_modules/nostics/dist/diagnostic-C0zzcNxA.d.mts
|
|
227
218
|
//#region src/utils.d.ts
|
|
228
219
|
/**
|
|
229
220
|
* A value of type T, or a function that resolves T from a single params object.
|
|
@@ -494,8 +485,6 @@ type ExtractSingleReporterOptions<Reporter> = Reporter extends ((diagnostic: Dia
|
|
|
494
485
|
* has required keys.
|
|
495
486
|
*/
|
|
496
487
|
type ExtractReportersOptions<Reporters extends readonly any[]> = Reporters extends readonly [infer First, ...infer Rest] ? ExtractSingleReporterOptions<First> & ExtractReportersOptions<Rest> : unknown;
|
|
497
|
-
//#endregion
|
|
498
|
-
//#region src/node/diagnostics.d.ts
|
|
499
488
|
/**
|
|
500
489
|
* Structured diagnostics for the code-server plugin. Uses the plugin's own
|
|
501
490
|
* `DP_CODE_SERVER_` prefix per the built-in plugin convention, keeping it
|
|
@@ -540,8 +529,6 @@ export declare const diagnostics: Diagnostics<{
|
|
|
540
529
|
}, readonly [(d: Diagnostic, { method }?: {
|
|
541
530
|
method?: "log" | "warn" | "error";
|
|
542
531
|
}) => void], never>;
|
|
543
|
-
//#endregion
|
|
544
|
-
//#region src/node/setup.d.ts
|
|
545
532
|
/**
|
|
546
533
|
* Wire the code-server subsystem onto a devframe node context: create the
|
|
547
534
|
* {@link CodeServerSupervisor}, run the initial binary detection, publish
|
|
@@ -552,5 +539,4 @@ export declare const diagnostics: Diagnostics<{
|
|
|
552
539
|
* on the core `ctx.rpc` shared-state surface, not on the hub.
|
|
553
540
|
*/
|
|
554
541
|
export declare function setupCodeServer(ctx: DevframeNodeContext, options?: CodeServerOptions): Promise<CodeServerSupervisor>;
|
|
555
|
-
//#endregion
|
|
556
542
|
export type { CodeServerProfile, CodeServerProfileKind };
|
package/dist/node/setup.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { i as diagnostics, n as getCodeServerSupervisor, r as setCodeServerSupervisor, t as serverFunctions } from "../rpc-CCOvDvNT.mjs";
|
|
1
2
|
import { DEFAULT_CODE_SERVER_PORT, PLUGIN_ID, STATE_KEY, TERMINAL_SESSION_ICON, TERMINAL_SESSION_TITLE, getCookieSessionName } from "./constants.mjs";
|
|
2
|
-
import { i as diagnostics, n as getCodeServerSupervisor, r as setCodeServerSupervisor, t as serverFunctions } from "../rpc-Df9IRgPd.mjs";
|
|
3
3
|
import { execSync, spawn } from "node:child_process";
|
|
4
4
|
import { createHash, randomBytes } from "node:crypto";
|
|
5
5
|
import { request } from "node:http";
|
|
6
6
|
import { hostname } from "node:os";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
import { getPort } from "devframe/utils/get-port";
|
|
9
|
-
|
|
9
|
+
// src/node/backends.ts
|
|
10
10
|
const sha256 = (value) => createHash("sha256").update(value).digest("hex");
|
|
11
11
|
/** Coder's open-source `code-server`, with password auth + session cookie handoff. */
|
|
12
12
|
const codeServerProfile = {
|
|
@@ -109,8 +109,7 @@ const AUTO_DETECT_ORDER = ["code-server", "ms-code-serve-web"];
|
|
|
109
109
|
function resolveProfile(mode, backend) {
|
|
110
110
|
return mode === "tunnel" ? tunnelProfile : LOCAL_PROFILES[backend];
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
//#region src/node/detect.ts
|
|
112
|
+
// src/node/detect.ts
|
|
114
113
|
/**
|
|
115
114
|
* Probe the host for a usable code-server binary by running
|
|
116
115
|
* `<bin> --version`. Resolves to `installed: false` when the binary is
|
|
@@ -184,8 +183,7 @@ function detectCodeServer(bin = "code-server", timeoutMs = 5e3) {
|
|
|
184
183
|
});
|
|
185
184
|
});
|
|
186
185
|
}
|
|
187
|
-
|
|
188
|
-
//#region src/node/supervisor.ts
|
|
186
|
+
// src/node/supervisor.ts
|
|
189
187
|
/** Recent output lines retained for surfacing startup failures. */
|
|
190
188
|
const LOG_BUFFER_LINES = 200;
|
|
191
189
|
/** Interval between readiness probes. */
|
|
@@ -792,8 +790,7 @@ function probeHealth(port, path) {
|
|
|
792
790
|
req.end();
|
|
793
791
|
});
|
|
794
792
|
}
|
|
795
|
-
|
|
796
|
-
//#region src/node/setup.ts
|
|
793
|
+
// src/node/setup.ts
|
|
797
794
|
/**
|
|
798
795
|
* Wire the code-server subsystem onto a devframe node context: create the
|
|
799
796
|
* {@link CodeServerSupervisor}, run the initial binary detection, publish
|
|
@@ -811,5 +808,4 @@ async function setupCodeServer(ctx, options = {}) {
|
|
|
811
808
|
if (options.startOnBoot) supervisor.start().catch(() => {});
|
|
812
809
|
return supervisor;
|
|
813
810
|
}
|
|
814
|
-
//#endregion
|
|
815
811
|
export { CodeServerSupervisor, detectCodeServer, diagnostics, getCodeServerSupervisor, resolveProfile, setCodeServerSupervisor, setupCodeServer };
|
package/dist/node/types.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/node/types.d.ts
|
|
2
1
|
/** Lifecycle state of the managed editor process. */
|
|
3
2
|
export type CodeServerStatus = 'stopped' | 'starting' | 'running' | 'error';
|
|
4
3
|
/**
|
|
@@ -190,5 +189,4 @@ export interface CodeServerTunnelOptions {
|
|
|
190
189
|
* `vscode.dev/tunnel/<name>` URL. Defaults to the device hostname.
|
|
191
190
|
*/
|
|
192
191
|
name?: string;
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
192
|
+
}
|
package/dist/node/vite.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CodeServerOptions } from "./types.mjs";
|
|
2
2
|
import { DevframeViteBridgeOptions, DevframeVitePlugin } from "@devframes/vite/single";
|
|
3
|
-
//#region src/node/vite.d.ts
|
|
4
3
|
export interface CodeServerViteOptions extends CodeServerOptions {
|
|
5
4
|
/** Forwarded to the underlying `devframeViteBridge`/`devframeVitePlugin` (mount base, etc.). */
|
|
6
5
|
vite?: DevframeViteBridgeOptions;
|
|
@@ -12,5 +11,4 @@ export interface CodeServerViteOptions extends CodeServerOptions {
|
|
|
12
11
|
* the bundled SPA at the mount base. The bridge is listed first so its
|
|
13
12
|
* `__connection.json` route is matched ahead of the SPA fallback.
|
|
14
13
|
*/
|
|
15
|
-
export declare function codeServerVite(options?: CodeServerViteOptions): DevframeVitePlugin[];
|
|
16
|
-
//#endregion
|
|
14
|
+
export declare function codeServerVite(options?: CodeServerViteOptions): DevframeVitePlugin[];
|
package/dist/node/vite.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createCodeServerDevframe } from "../node-
|
|
1
|
+
import { t as createCodeServerDevframe } from "../node-DNNKZQB1.mjs";
|
|
2
2
|
import { devframeViteBridge, devframeVitePlugin } from "@devframes/vite/single";
|
|
3
|
-
|
|
3
|
+
// src/node/vite.ts
|
|
4
4
|
/**
|
|
5
5
|
* Mount the code-server launcher into an existing Vite dev server. Returns two
|
|
6
6
|
* plugins: a bridge that starts the devframe RPC + WebSocket server (so the
|
|
@@ -13,5 +13,4 @@ function codeServerVite(options = {}) {
|
|
|
13
13
|
const definition = createCodeServerDevframe(codeServerOptions);
|
|
14
14
|
return [devframeViteBridge(definition, vite), devframeVitePlugin(definition, { base: vite?.base })];
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { codeServerVite };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { PLUGIN_ID } from "./node/constants.mjs";
|
|
2
2
|
import { defineDevframe } from "devframe";
|
|
3
|
-
|
|
3
|
+
// package.json
|
|
4
4
|
var name = "@devframes/plugin-code-server";
|
|
5
|
-
var version = "1.3.
|
|
5
|
+
var version = "1.3.2";
|
|
6
6
|
var description = "Devframe plugin that runs VS Code in the browser as an embedded editor panel.";
|
|
7
7
|
var homepage = "https://github.com/devframes/devframe#readme";
|
|
8
|
-
|
|
9
|
-
//#region src/node/index.ts
|
|
8
|
+
// src/node/index.ts
|
|
10
9
|
const remoteAssets = {
|
|
11
10
|
package: `${name}--assets`,
|
|
12
11
|
version
|
|
@@ -68,5 +67,4 @@ function createCodeServerDevframe(options = {}) {
|
|
|
68
67
|
}
|
|
69
68
|
});
|
|
70
69
|
}
|
|
71
|
-
//#endregion
|
|
72
70
|
export { createCodeServerDevframe as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineRpcFunction } from "devframe";
|
|
2
2
|
import { defineDiagnostics } from "devframe/utils/nostics";
|
|
3
|
-
|
|
3
|
+
// src/node/diagnostics.ts
|
|
4
4
|
/**
|
|
5
5
|
* Structured diagnostics for the code-server plugin. Uses the plugin's own
|
|
6
6
|
* `DP_CODE_SERVER_` prefix per the built-in plugin convention, keeping it
|
|
@@ -32,8 +32,7 @@ const diagnostics = defineDiagnostics({
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
-
|
|
36
|
-
//#region src/node/context.ts
|
|
35
|
+
// src/node/context.ts
|
|
37
36
|
const supervisors = /* @__PURE__ */ new WeakMap();
|
|
38
37
|
function setCodeServerSupervisor(ctx, supervisor) {
|
|
39
38
|
supervisors.set(ctx, supervisor);
|
|
@@ -43,8 +42,7 @@ function getCodeServerSupervisor(ctx) {
|
|
|
43
42
|
if (!supervisor) throw diagnostics.DP_CODE_SERVER_0004({});
|
|
44
43
|
return supervisor;
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
//#region src/node/rpc/functions/detect.ts
|
|
45
|
+
// src/node/rpc/functions/detect.ts
|
|
48
46
|
const detect = defineRpcFunction({
|
|
49
47
|
name: "devframes:plugin:code-server:detect",
|
|
50
48
|
type: "query",
|
|
@@ -55,8 +53,7 @@ const detect = defineRpcFunction({
|
|
|
55
53
|
},
|
|
56
54
|
setup: (ctx) => ({ handler: () => getCodeServerSupervisor(ctx).detect() })
|
|
57
55
|
});
|
|
58
|
-
|
|
59
|
-
//#region src/node/rpc/functions/start.ts
|
|
56
|
+
// src/node/rpc/functions/start.ts
|
|
60
57
|
const start = defineRpcFunction({
|
|
61
58
|
name: "devframes:plugin:code-server:start",
|
|
62
59
|
type: "action",
|
|
@@ -67,8 +64,7 @@ const start = defineRpcFunction({
|
|
|
67
64
|
},
|
|
68
65
|
setup: (ctx) => ({ handler: (req = {}) => getCodeServerSupervisor(ctx).start(req) })
|
|
69
66
|
});
|
|
70
|
-
|
|
71
|
-
//#region src/node/rpc/index.ts
|
|
67
|
+
// src/node/rpc/index.ts
|
|
72
68
|
const serverFunctions = [
|
|
73
69
|
detect,
|
|
74
70
|
defineRpcFunction({
|
|
@@ -89,5 +85,4 @@ const serverFunctions = [
|
|
|
89
85
|
setup: (ctx) => ({ handler: () => getCodeServerSupervisor(ctx).stop() })
|
|
90
86
|
})
|
|
91
87
|
];
|
|
92
|
-
//#endregion
|
|
93
88
|
export { diagnostics as i, getCodeServerSupervisor as n, setCodeServerSupervisor as r, serverFunctions as t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/plugin-code-server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"description": "Devframe plugin that runs VS Code in the browser as an embedded editor panel.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@devframes/plugin-code-server--assets": "1.3.
|
|
43
|
-
"devframe": "1.3.
|
|
42
|
+
"@devframes/plugin-code-server--assets": "1.3.2",
|
|
43
|
+
"devframe": "1.3.2",
|
|
44
44
|
"vite": "^8.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
@@ -52,25 +52,25 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@devframes/vite": "1.3.
|
|
55
|
+
"@devframes/vite": "1.3.2",
|
|
56
56
|
"cac": "^7.1.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@antfu/design": "^0.6.0",
|
|
60
|
-
"@devframes/plugin-code-server--assets": "1.3.
|
|
60
|
+
"@devframes/plugin-code-server--assets": "1.3.2",
|
|
61
61
|
"@iconify-json/ph": "^1.2.2",
|
|
62
|
-
"@storybook/addon-docs": "^10.6.
|
|
63
|
-
"@storybook/vue3-vite": "^10.6.
|
|
64
|
-
"@types/node": "^26.6.
|
|
62
|
+
"@storybook/addon-docs": "^10.6.5",
|
|
63
|
+
"@storybook/vue3-vite": "^10.6.5",
|
|
64
|
+
"@types/node": "^26.6.6",
|
|
65
65
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
66
66
|
"colorjs.io": "^0.7.1",
|
|
67
|
-
"devframe": "1.3.
|
|
68
|
-
"h3": "^2.0.
|
|
67
|
+
"devframe": "1.3.2",
|
|
68
|
+
"h3": "^2.0.8",
|
|
69
69
|
"pathe": "^2.0.3",
|
|
70
|
-
"storybook": "^10.6.
|
|
71
|
-
"tsdown": "0.23.
|
|
72
|
-
"unocss": "^66.
|
|
73
|
-
"vite": "^8.3.
|
|
70
|
+
"storybook": "^10.6.5",
|
|
71
|
+
"tsdown": "^0.23.4",
|
|
72
|
+
"unocss": "^66.12.0",
|
|
73
|
+
"vite": "^8.3.5",
|
|
74
74
|
"vitest": "^5.0.5",
|
|
75
75
|
"vue": "^3.5.44"
|
|
76
76
|
},
|