@trebired/code-server-kit 0.1.0 → 0.3.0
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/CHANGELOG.md +20 -0
- package/README.md +318 -82
- package/dist/errors.d.ts +37 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +73 -7
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/launch.d.ts +2 -3
- package/dist/launch.d.ts.map +1 -1
- package/dist/launch.js +15 -223
- package/dist/launch.js.map +1 -1
- package/dist/logging.d.ts +5 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +11 -0
- package/dist/logging.js.map +1 -0
- package/dist/plan.d.ts +15 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +355 -0
- package/dist/plan.js.map +1 -0
- package/dist/profile.d.ts +8 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +107 -0
- package/dist/profile.js.map +1 -0
- package/dist/proxy.d.ts +6 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +92 -0
- package/dist/proxy.js.map +1 -0
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +42 -4
- package/dist/readiness.js.map +1 -1
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +3 -1
- package/dist/resolve.js.map +1 -1
- package/dist/session.d.ts +11 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +888 -0
- package/dist/session.js.map +1 -0
- package/dist/spec.d.ts +7 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/spec.js +64 -0
- package/dist/spec.js.map +1 -0
- package/dist/systemd.d.ts +17 -0
- package/dist/systemd.d.ts.map +1 -0
- package/dist/systemd.js +254 -0
- package/dist/systemd.js.map +1 -0
- package/dist/types.d.ts +300 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/plan.js
ADDED
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import net from "node:net";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { CodeServerBinaryNotFoundError, CodeServerInvalidConfigurationError, CodeServerLaunchPlanningError, CodeServerPortAllocationError, } from "./errors.js";
|
|
5
|
+
import { resolveCodeServerInstallation } from "./resolve.js";
|
|
6
|
+
const DEFAULT_BIND_HOST = "127.0.0.1";
|
|
7
|
+
const DIRECT_LAUNCH_ACCESS = fs.constants.X_OK;
|
|
8
|
+
async function createCodeServerLaunchPlan(options) {
|
|
9
|
+
try {
|
|
10
|
+
const installation = options.installation ?? resolveCodeServerInstallation({
|
|
11
|
+
resolveFrom: options.resolveFrom,
|
|
12
|
+
});
|
|
13
|
+
const launchMode = normalizeLaunchMode(options.launchMode, installation);
|
|
14
|
+
const { extensionsDir, userDataDir } = resolveLaunchDirectories(options);
|
|
15
|
+
const binding = await resolveLaunchBinding(options);
|
|
16
|
+
const workspacePath = options.workspacePath ? path.resolve(options.workspacePath) : null;
|
|
17
|
+
const trustedOrigins = normalizeTrustedOrigins(options.trustedOrigins);
|
|
18
|
+
const cwd = path.resolve(options.cwd ?? installation.packageRoot);
|
|
19
|
+
const env = {
|
|
20
|
+
...(options.env ?? {}),
|
|
21
|
+
};
|
|
22
|
+
const cliArgs = buildCodeServerArgs({
|
|
23
|
+
bindAddr: binding.bindAddr,
|
|
24
|
+
extensionsDir,
|
|
25
|
+
trustedOrigins,
|
|
26
|
+
userDataDir,
|
|
27
|
+
workspacePath,
|
|
28
|
+
});
|
|
29
|
+
if (launchMode === "direct") {
|
|
30
|
+
assertDirectLaunchAvailable(installation.entryPoint);
|
|
31
|
+
}
|
|
32
|
+
const supportBindings = buildSupportBindings(installation);
|
|
33
|
+
const recommendedReadablePaths = uniquePaths([
|
|
34
|
+
installation.packageRoot,
|
|
35
|
+
installation.entryPoint,
|
|
36
|
+
installation.supportRoot,
|
|
37
|
+
workspacePath,
|
|
38
|
+
]);
|
|
39
|
+
const recommendedWritablePaths = uniquePaths([
|
|
40
|
+
userDataDir,
|
|
41
|
+
extensionsDir,
|
|
42
|
+
]);
|
|
43
|
+
return launchMode === "node"
|
|
44
|
+
? {
|
|
45
|
+
args: [installation.entryPoint, ...cliArgs],
|
|
46
|
+
bindAddr: binding.bindAddr,
|
|
47
|
+
codeServerPackageRoot: installation.packageRoot,
|
|
48
|
+
command: normalizeNodeCommand(options.nodeCommand),
|
|
49
|
+
cwd,
|
|
50
|
+
entryKind: installation.entryKind,
|
|
51
|
+
entryPoint: installation.entryPoint,
|
|
52
|
+
env,
|
|
53
|
+
extensionsDir,
|
|
54
|
+
host: binding.host,
|
|
55
|
+
installation,
|
|
56
|
+
launchMode,
|
|
57
|
+
port: binding.port,
|
|
58
|
+
recommendedReadablePaths,
|
|
59
|
+
recommendedWritablePaths,
|
|
60
|
+
supportBindings,
|
|
61
|
+
supportRoot: installation.supportRoot,
|
|
62
|
+
trustedOrigins,
|
|
63
|
+
userDataDir,
|
|
64
|
+
workspacePath,
|
|
65
|
+
}
|
|
66
|
+
: {
|
|
67
|
+
args: cliArgs,
|
|
68
|
+
bindAddr: binding.bindAddr,
|
|
69
|
+
codeServerPackageRoot: installation.packageRoot,
|
|
70
|
+
command: installation.entryPoint,
|
|
71
|
+
cwd,
|
|
72
|
+
entryKind: installation.entryKind,
|
|
73
|
+
entryPoint: installation.entryPoint,
|
|
74
|
+
env,
|
|
75
|
+
extensionsDir,
|
|
76
|
+
host: binding.host,
|
|
77
|
+
installation,
|
|
78
|
+
launchMode,
|
|
79
|
+
port: binding.port,
|
|
80
|
+
recommendedReadablePaths,
|
|
81
|
+
recommendedWritablePaths,
|
|
82
|
+
supportBindings,
|
|
83
|
+
supportRoot: installation.supportRoot,
|
|
84
|
+
trustedOrigins,
|
|
85
|
+
userDataDir,
|
|
86
|
+
workspacePath,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (error instanceof CodeServerLaunchPlanningError || error instanceof CodeServerInvalidConfigurationError) {
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
if (error instanceof Error && "code" in error) {
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
throw new CodeServerLaunchPlanningError("Could not create a code-server launch plan.", {
|
|
97
|
+
cause: error instanceof Error ? error.message : String(error),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async function createCodeServerLaunch(options) {
|
|
102
|
+
return await createCodeServerLaunchPlan(options);
|
|
103
|
+
}
|
|
104
|
+
function buildCodeServerArgs(options) {
|
|
105
|
+
const args = [
|
|
106
|
+
"--auth",
|
|
107
|
+
"none",
|
|
108
|
+
"--bind-addr",
|
|
109
|
+
options.bindAddr,
|
|
110
|
+
"--disable-telemetry",
|
|
111
|
+
"--disable-update-check",
|
|
112
|
+
"--disable-workspace-trust",
|
|
113
|
+
"--disable-getting-started-override",
|
|
114
|
+
"--user-data-dir",
|
|
115
|
+
options.userDataDir,
|
|
116
|
+
"--extensions-dir",
|
|
117
|
+
options.extensionsDir,
|
|
118
|
+
];
|
|
119
|
+
for (const origin of options.trustedOrigins) {
|
|
120
|
+
args.push("--trusted-origins", origin);
|
|
121
|
+
}
|
|
122
|
+
if (options.workspacePath) {
|
|
123
|
+
args.push(options.workspacePath);
|
|
124
|
+
}
|
|
125
|
+
return args;
|
|
126
|
+
}
|
|
127
|
+
function buildCodeServerLaunchSpec(plan) {
|
|
128
|
+
const bindings = uniqueBindings([
|
|
129
|
+
{
|
|
130
|
+
access: "read",
|
|
131
|
+
hostPath: plan.installation.packageRoot,
|
|
132
|
+
mountPath: plan.installation.packageRoot,
|
|
133
|
+
reason: "code-server package root",
|
|
134
|
+
},
|
|
135
|
+
...plan.supportBindings,
|
|
136
|
+
...plan.recommendedWritablePaths.map((value) => ({
|
|
137
|
+
access: "write",
|
|
138
|
+
hostPath: value,
|
|
139
|
+
mountPath: value,
|
|
140
|
+
reason: value === plan.userDataDir
|
|
141
|
+
? "code-server user data"
|
|
142
|
+
: value === plan.extensionsDir
|
|
143
|
+
? "code-server extensions"
|
|
144
|
+
: "code-server writable path",
|
|
145
|
+
})),
|
|
146
|
+
]);
|
|
147
|
+
return {
|
|
148
|
+
args: [...plan.args],
|
|
149
|
+
bindings,
|
|
150
|
+
command: plan.command,
|
|
151
|
+
cwd: plan.cwd,
|
|
152
|
+
env: {
|
|
153
|
+
...plan.env,
|
|
154
|
+
},
|
|
155
|
+
readablePaths: [...plan.recommendedReadablePaths],
|
|
156
|
+
writablePaths: [...plan.recommendedWritablePaths],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function normalizeTrustedOrigins(value) {
|
|
160
|
+
const normalized = [];
|
|
161
|
+
for (const raw of value ?? []) {
|
|
162
|
+
if (typeof raw !== "string")
|
|
163
|
+
continue;
|
|
164
|
+
const trimmed = raw.trim();
|
|
165
|
+
if (!trimmed)
|
|
166
|
+
continue;
|
|
167
|
+
let origin;
|
|
168
|
+
try {
|
|
169
|
+
origin = new URL(trimmed).origin;
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
throw new CodeServerInvalidConfigurationError("trustedOrigins entries must be absolute origins.", {
|
|
173
|
+
value: trimmed,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (origin === "null") {
|
|
177
|
+
throw new CodeServerInvalidConfigurationError("trustedOrigins entries must resolve to normal HTTP or HTTPS origins.", {
|
|
178
|
+
value: trimmed,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
if (!normalized.includes(origin)) {
|
|
182
|
+
normalized.push(origin);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return normalized;
|
|
186
|
+
}
|
|
187
|
+
function resolveLaunchDirectories(options) {
|
|
188
|
+
const dataRoot = options.dataRoot ? path.resolve(options.dataRoot) : null;
|
|
189
|
+
const userDataDir = options.userDataDir
|
|
190
|
+
? path.resolve(options.userDataDir)
|
|
191
|
+
: dataRoot
|
|
192
|
+
? path.join(dataRoot, "user-data")
|
|
193
|
+
: null;
|
|
194
|
+
const extensionsDir = options.extensionsDir
|
|
195
|
+
? path.resolve(options.extensionsDir)
|
|
196
|
+
: dataRoot
|
|
197
|
+
? path.join(dataRoot, "extensions")
|
|
198
|
+
: null;
|
|
199
|
+
if (!userDataDir || !extensionsDir) {
|
|
200
|
+
throw new CodeServerInvalidConfigurationError("createCodeServerLaunchPlan requires userDataDir and extensionsDir, or a shared dataRoot.");
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
extensionsDir,
|
|
204
|
+
userDataDir,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
async function resolveLaunchBinding(options) {
|
|
208
|
+
if (options.bindAddr && (options.host || options.port !== undefined)) {
|
|
209
|
+
throw new CodeServerInvalidConfigurationError("Pass either bindAddr or host/port to createCodeServerLaunchPlan, not both.");
|
|
210
|
+
}
|
|
211
|
+
if (options.bindAddr) {
|
|
212
|
+
const parsed = parseBindAddr(options.bindAddr);
|
|
213
|
+
const port = parsed.port === 0 ? await allocatePort(parsed.host) : parsed.port;
|
|
214
|
+
return {
|
|
215
|
+
bindAddr: formatBindAddr(parsed.host, port),
|
|
216
|
+
host: parsed.host,
|
|
217
|
+
port,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
const host = normalizeHost(options.host);
|
|
221
|
+
const port = options.port == null || options.port === 0
|
|
222
|
+
? await allocatePort(host)
|
|
223
|
+
: normalizePort(options.port);
|
|
224
|
+
return {
|
|
225
|
+
bindAddr: formatBindAddr(host, port),
|
|
226
|
+
host,
|
|
227
|
+
port,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function normalizeLaunchMode(requested, installation) {
|
|
231
|
+
if (requested === "direct" || requested === "node") {
|
|
232
|
+
return requested;
|
|
233
|
+
}
|
|
234
|
+
return installation.entryKind === "executable" ? "direct" : "node";
|
|
235
|
+
}
|
|
236
|
+
function normalizeNodeCommand(value) {
|
|
237
|
+
const normalized = typeof value === "string" ? value.trim() : "";
|
|
238
|
+
return normalized || process.execPath;
|
|
239
|
+
}
|
|
240
|
+
function normalizeHost(value) {
|
|
241
|
+
const normalized = typeof value === "string" ? value.trim() : "";
|
|
242
|
+
return normalized || DEFAULT_BIND_HOST;
|
|
243
|
+
}
|
|
244
|
+
function normalizePort(value) {
|
|
245
|
+
if (!Number.isInteger(value) || value < 0 || value > 65535) {
|
|
246
|
+
throw new CodeServerInvalidConfigurationError("Port must be an integer between 0 and 65535.", {
|
|
247
|
+
value,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return value;
|
|
251
|
+
}
|
|
252
|
+
function parseBindAddr(bindAddr) {
|
|
253
|
+
const normalized = bindAddr.trim();
|
|
254
|
+
const ipv6Match = /^\[(.+)\]:(\d+)$/.exec(normalized);
|
|
255
|
+
if (ipv6Match) {
|
|
256
|
+
return {
|
|
257
|
+
host: ipv6Match[1],
|
|
258
|
+
port: normalizePort(Number(ipv6Match[2])),
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
const lastColonIndex = normalized.lastIndexOf(":");
|
|
262
|
+
if (lastColonIndex <= 0) {
|
|
263
|
+
throw new CodeServerInvalidConfigurationError("bindAddr must use host:port or [host]:port format.", {
|
|
264
|
+
bindAddr,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
host: normalized.slice(0, lastColonIndex),
|
|
269
|
+
port: normalizePort(Number(normalized.slice(lastColonIndex + 1))),
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function formatBindAddr(host, port) {
|
|
273
|
+
return host.includes(":")
|
|
274
|
+
? `[${host}]:${port}`
|
|
275
|
+
: `${host}:${port}`;
|
|
276
|
+
}
|
|
277
|
+
async function allocatePort(host) {
|
|
278
|
+
return await new Promise((resolve, reject) => {
|
|
279
|
+
const server = net.createServer();
|
|
280
|
+
server.once("error", (error) => {
|
|
281
|
+
reject(new CodeServerPortAllocationError("Could not allocate a code-server TCP port.", {
|
|
282
|
+
cause: error instanceof Error ? error.message : String(error),
|
|
283
|
+
host,
|
|
284
|
+
}));
|
|
285
|
+
});
|
|
286
|
+
server.listen(0, host, () => {
|
|
287
|
+
const address = server.address();
|
|
288
|
+
if (!address || typeof address === "string") {
|
|
289
|
+
server.close();
|
|
290
|
+
reject(new CodeServerPortAllocationError("Could not determine the allocated code-server TCP port.", {
|
|
291
|
+
host,
|
|
292
|
+
}));
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
server.close((error) => {
|
|
296
|
+
if (error) {
|
|
297
|
+
reject(new CodeServerPortAllocationError("Could not release the allocated code-server TCP port.", {
|
|
298
|
+
cause: error.message,
|
|
299
|
+
host,
|
|
300
|
+
port: address.port,
|
|
301
|
+
}));
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
resolve(address.port);
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function assertDirectLaunchAvailable(entryPoint) {
|
|
310
|
+
try {
|
|
311
|
+
fs.accessSync(entryPoint, DIRECT_LAUNCH_ACCESS);
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
throw new CodeServerBinaryNotFoundError("Resolved code-server entrypoint is not directly executable.", {
|
|
315
|
+
cause: error instanceof Error ? error.message : String(error),
|
|
316
|
+
entryPoint,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
function buildSupportBindings(installation) {
|
|
321
|
+
if (!installation.supportRoot)
|
|
322
|
+
return [];
|
|
323
|
+
return [{
|
|
324
|
+
access: "read",
|
|
325
|
+
hostPath: installation.supportRoot,
|
|
326
|
+
mountPath: installation.supportRoot,
|
|
327
|
+
reason: "code-server support root",
|
|
328
|
+
}];
|
|
329
|
+
}
|
|
330
|
+
function uniquePaths(values) {
|
|
331
|
+
const normalized = [];
|
|
332
|
+
for (const value of values) {
|
|
333
|
+
if (typeof value !== "string")
|
|
334
|
+
continue;
|
|
335
|
+
const nextValue = path.resolve(value);
|
|
336
|
+
if (!normalized.includes(nextValue)) {
|
|
337
|
+
normalized.push(nextValue);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return normalized;
|
|
341
|
+
}
|
|
342
|
+
function uniqueBindings(values) {
|
|
343
|
+
const bindings = [];
|
|
344
|
+
const seen = new Set();
|
|
345
|
+
for (const value of values) {
|
|
346
|
+
const key = `${value.access}:${value.hostPath}:${value.mountPath}`;
|
|
347
|
+
if (seen.has(key))
|
|
348
|
+
continue;
|
|
349
|
+
seen.add(key);
|
|
350
|
+
bindings.push(value);
|
|
351
|
+
}
|
|
352
|
+
return bindings;
|
|
353
|
+
}
|
|
354
|
+
export { allocatePort, buildCodeServerArgs, buildCodeServerLaunchSpec, createCodeServerLaunch, createCodeServerLaunchPlan, normalizeTrustedOrigins, };
|
|
355
|
+
//# sourceMappingURL=plan.js.map
|
package/dist/plan.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,6BAA6B,EAC7B,mCAAmC,EACnC,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAW7D,MAAM,iBAAiB,GAAG,WAAW,CAAC;AACtC,MAAM,oBAAoB,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC;AAE/C,KAAK,UAAU,0BAA0B,CAAC,OAA0C;IAClF,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,6BAA6B,CAAC;YACzE,WAAW,EAAE,OAAO,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,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,cAAc,CAAC,MAA+B;IACrD,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAC7C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAE/B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACnE,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAC5B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,GACxB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CodeServerProfileItem, CodeServerProfilePathMap, CodeServerProfileSyncPlan, CodeServerProfileSyncResult, CreateCodeServerProfileSyncPlanOptions, SyncCodeServerProfileOptions } from "./types.js";
|
|
2
|
+
declare const DEFAULT_CODE_SERVER_PROFILE_PATHS: CodeServerProfilePathMap;
|
|
3
|
+
declare const DEFAULT_CODE_SERVER_PROFILE_ITEMS: CodeServerProfileItem[];
|
|
4
|
+
declare function createCodeServerProfileSyncPlan(options: CreateCodeServerProfileSyncPlanOptions): CodeServerProfileSyncPlan;
|
|
5
|
+
declare function syncCodeServerProfile(options: SyncCodeServerProfileOptions): Promise<CodeServerProfileSyncResult>;
|
|
6
|
+
declare function resolveCodeServerProfilePathMap(overrides?: Partial<CodeServerProfilePathMap>): CodeServerProfilePathMap;
|
|
7
|
+
export { DEFAULT_CODE_SERVER_PROFILE_ITEMS, DEFAULT_CODE_SERVER_PROFILE_PATHS, createCodeServerProfileSyncPlan, resolveCodeServerProfilePathMap, syncCodeServerProfile, };
|
|
8
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EAExB,yBAAyB,EACzB,2BAA2B,EAC3B,sCAAsC,EACtC,4BAA4B,EAC7B,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,iCAAiC,EAAE,wBAMxC,CAAC;AAEF,QAAA,MAAM,iCAAiC,EAAE,qBAAqB,EAM7D,CAAC;AAEF,iBAAS,+BAA+B,CAAC,OAAO,EAAE,sCAAsC,GAAG,yBAAyB,CAYnH;AAED,iBAAe,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAwChH;AAED,iBAAS,+BAA+B,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAEhH;AAkDD,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,+BAA+B,EAC/B,+BAA+B,EAC/B,qBAAqB,GACtB,CAAC"}
|
package/dist/profile.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
const DEFAULT_CODE_SERVER_PROFILE_PATHS = {
|
|
4
|
+
"extensions": "extensions",
|
|
5
|
+
"extensions.json": "User/extensions.json",
|
|
6
|
+
"keybindings.json": "User/keybindings.json",
|
|
7
|
+
"settings.json": "User/settings.json",
|
|
8
|
+
"snippets": "User/snippets",
|
|
9
|
+
};
|
|
10
|
+
const DEFAULT_CODE_SERVER_PROFILE_ITEMS = [
|
|
11
|
+
"settings.json",
|
|
12
|
+
"extensions.json",
|
|
13
|
+
"keybindings.json",
|
|
14
|
+
"snippets",
|
|
15
|
+
"extensions",
|
|
16
|
+
];
|
|
17
|
+
function createCodeServerProfileSyncPlan(options) {
|
|
18
|
+
const sourceDir = path.resolve(options.sourceDir);
|
|
19
|
+
const targetDir = path.resolve(options.targetDir);
|
|
20
|
+
const items = normalizeProfileItems(options.items);
|
|
21
|
+
const pathMap = resolveProfilePathMap(options.pathMap);
|
|
22
|
+
return {
|
|
23
|
+
entries: items.map((item) => createProfileSyncEntry(item, sourceDir, targetDir, pathMap[item])),
|
|
24
|
+
items,
|
|
25
|
+
sourceDir,
|
|
26
|
+
targetDir,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
async function syncCodeServerProfile(options) {
|
|
30
|
+
const plan = createCodeServerProfileSyncPlan(options);
|
|
31
|
+
const copied = [];
|
|
32
|
+
const skipped = [];
|
|
33
|
+
const skipMissing = options.skipMissing ?? true;
|
|
34
|
+
const skipUnreadable = options.skipUnreadable ?? true;
|
|
35
|
+
for (const entry of plan.entries) {
|
|
36
|
+
try {
|
|
37
|
+
await fs.promises.mkdir(path.dirname(entry.targetPath), { recursive: true });
|
|
38
|
+
await fs.promises.cp(entry.sourcePath, entry.targetPath, {
|
|
39
|
+
force: true,
|
|
40
|
+
recursive: entry.kind === "directory",
|
|
41
|
+
});
|
|
42
|
+
copied.push(entry);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (isMissingError(error) && skipMissing) {
|
|
46
|
+
skipped.push({
|
|
47
|
+
entry,
|
|
48
|
+
reason: "missing_source",
|
|
49
|
+
});
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (isUnreadableError(error) && skipUnreadable) {
|
|
53
|
+
skipped.push({
|
|
54
|
+
entry,
|
|
55
|
+
reason: "unreadable_source",
|
|
56
|
+
});
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
copied,
|
|
64
|
+
skipped,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function resolveCodeServerProfilePathMap(overrides) {
|
|
68
|
+
return resolveProfilePathMap(overrides);
|
|
69
|
+
}
|
|
70
|
+
function normalizeProfileItems(items) {
|
|
71
|
+
const normalized = [];
|
|
72
|
+
for (const item of items ?? DEFAULT_CODE_SERVER_PROFILE_ITEMS) {
|
|
73
|
+
if (!normalized.includes(item)) {
|
|
74
|
+
normalized.push(item);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return normalized;
|
|
78
|
+
}
|
|
79
|
+
function resolveProfilePathMap(overrides) {
|
|
80
|
+
return {
|
|
81
|
+
...DEFAULT_CODE_SERVER_PROFILE_PATHS,
|
|
82
|
+
...(overrides ?? {}),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function createProfileSyncEntry(item, sourceDir, targetDir, relativePath) {
|
|
86
|
+
const kind = item === "snippets" || item === "extensions"
|
|
87
|
+
? "directory"
|
|
88
|
+
: "file";
|
|
89
|
+
return {
|
|
90
|
+
item,
|
|
91
|
+
kind,
|
|
92
|
+
relativePath,
|
|
93
|
+
sourcePath: path.join(sourceDir, relativePath),
|
|
94
|
+
targetPath: path.join(targetDir, relativePath),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function isMissingError(error) {
|
|
98
|
+
return typeof error === "object" && error != null && "code" in error && String(error.code) === "ENOENT";
|
|
99
|
+
}
|
|
100
|
+
function isUnreadableError(error) {
|
|
101
|
+
if (typeof error !== "object" || error == null || !("code" in error))
|
|
102
|
+
return false;
|
|
103
|
+
const code = String(error.code);
|
|
104
|
+
return code === "EACCES" || code === "EPERM";
|
|
105
|
+
}
|
|
106
|
+
export { DEFAULT_CODE_SERVER_PROFILE_ITEMS, DEFAULT_CODE_SERVER_PROFILE_PATHS, createCodeServerProfileSyncPlan, resolveCodeServerProfilePathMap, syncCodeServerProfile, };
|
|
107
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","s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,CAAC"}
|
package/dist/proxy.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BuildForwardedHeadersOptions, CodeServerHtmlResponseOptions } from "./types.js";
|
|
2
|
+
declare function buildForwardedHeaders(options: BuildForwardedHeadersOptions): Record<string, string>;
|
|
3
|
+
declare function isCodeServerHtmlResponse(options: CodeServerHtmlResponseOptions): boolean;
|
|
4
|
+
declare function normalizeTrustedOrigin(value: string): string;
|
|
5
|
+
export { buildForwardedHeaders, isCodeServerHtmlResponse, normalizeTrustedOrigin, };
|
|
6
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAE9F,iBAAS,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoB5F;AAED,iBAAS,wBAAwB,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CASjF;AAED,iBAAS,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAYrD;AAmDD,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,GACvB,CAAC"}
|
package/dist/proxy.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { CodeServerInvalidConfigurationError } from "./errors.js";
|
|
2
|
+
function buildForwardedHeaders(options) {
|
|
3
|
+
const headers = {};
|
|
4
|
+
const host = normalizeOptionalString(options.forwardedHost ?? options.host);
|
|
5
|
+
const proto = normalizeOptionalString(options.forwardedProto ?? options.proto);
|
|
6
|
+
const port = normalizeOptionalString(options.port == null ? undefined : String(options.port));
|
|
7
|
+
const forwardedFor = normalizeForwardedFor(options.forwardedFor);
|
|
8
|
+
if (host)
|
|
9
|
+
headers["x-forwarded-host"] = host;
|
|
10
|
+
if (proto)
|
|
11
|
+
headers["x-forwarded-proto"] = proto;
|
|
12
|
+
if (port)
|
|
13
|
+
headers["x-forwarded-port"] = port;
|
|
14
|
+
if (forwardedFor)
|
|
15
|
+
headers["x-forwarded-for"] = forwardedFor;
|
|
16
|
+
if (proto && host) {
|
|
17
|
+
const authority = port && !host.includes(":") && port !== defaultPortForProto(proto)
|
|
18
|
+
? `${host}:${port}`
|
|
19
|
+
: host;
|
|
20
|
+
headers["forwarded"] = `proto=${proto};host=${authority}`;
|
|
21
|
+
}
|
|
22
|
+
return headers;
|
|
23
|
+
}
|
|
24
|
+
function isCodeServerHtmlResponse(options) {
|
|
25
|
+
const method = normalizeOptionalString(options.method)?.toUpperCase();
|
|
26
|
+
if (method === "HEAD")
|
|
27
|
+
return false;
|
|
28
|
+
const statusCode = options.statusCode ?? 200;
|
|
29
|
+
if (statusCode < 200 || statusCode >= 300)
|
|
30
|
+
return false;
|
|
31
|
+
const contentType = normalizeContentType(options);
|
|
32
|
+
return contentType.startsWith("text/html") || contentType.startsWith("application/xhtml+xml");
|
|
33
|
+
}
|
|
34
|
+
function normalizeTrustedOrigin(value) {
|
|
35
|
+
try {
|
|
36
|
+
const origin = new URL(value).origin;
|
|
37
|
+
if (origin === "null") {
|
|
38
|
+
throw new Error("null-origin");
|
|
39
|
+
}
|
|
40
|
+
return origin;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
throw new CodeServerInvalidConfigurationError("Trusted origin values must be absolute origins.", {
|
|
44
|
+
value,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function normalizeContentType(options) {
|
|
49
|
+
if (typeof options.contentType === "string") {
|
|
50
|
+
return options.contentType.toLowerCase();
|
|
51
|
+
}
|
|
52
|
+
const headers = options.headers;
|
|
53
|
+
if (!headers)
|
|
54
|
+
return "";
|
|
55
|
+
if (typeof Headers !== "undefined" && headers instanceof Headers) {
|
|
56
|
+
return String(headers.get("content-type") || "").toLowerCase();
|
|
57
|
+
}
|
|
58
|
+
const headerValue = headers["content-type"] ?? headers["Content-Type"];
|
|
59
|
+
if (Array.isArray(headerValue)) {
|
|
60
|
+
return String(headerValue[0] || "").toLowerCase();
|
|
61
|
+
}
|
|
62
|
+
return typeof headerValue === "string"
|
|
63
|
+
? headerValue.toLowerCase()
|
|
64
|
+
: "";
|
|
65
|
+
}
|
|
66
|
+
function normalizeForwardedFor(value) {
|
|
67
|
+
if (typeof value === "string") {
|
|
68
|
+
const normalized = value.trim();
|
|
69
|
+
return normalized || null;
|
|
70
|
+
}
|
|
71
|
+
if (!Array.isArray(value))
|
|
72
|
+
return null;
|
|
73
|
+
const values = value
|
|
74
|
+
.map((item) => typeof item === "string" ? item.trim() : "")
|
|
75
|
+
.filter(Boolean);
|
|
76
|
+
return values.length ? values.join(", ") : null;
|
|
77
|
+
}
|
|
78
|
+
function defaultPortForProto(value) {
|
|
79
|
+
if (value === "http")
|
|
80
|
+
return "80";
|
|
81
|
+
if (value === "https")
|
|
82
|
+
return "443";
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function normalizeOptionalString(value) {
|
|
86
|
+
if (typeof value !== "string")
|
|
87
|
+
return null;
|
|
88
|
+
const normalized = value.trim();
|
|
89
|
+
return normalized ? normalized : null;
|
|
90
|
+
}
|
|
91
|
+
export { buildForwardedHeaders, isCodeServerHtmlResponse, normalizeTrustedOrigin, };
|
|
92
|
+
//# sourceMappingURL=proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AAGlE,SAAS,qBAAqB,CAAC,OAAqC;IAClE,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,MAAM,IAAI,GAAG,uBAAuB,CAAC,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC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sB,GACvB,CAAC"}
|
package/dist/readiness.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAGV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAOpB,iBAAe,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA+DrG;AAmGD,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|