mirror of
https://github.com/coder/code-server.git
synced 2026-05-07 21:07:26 +02:00
Make flags additive and clean up docs
This means that you have to turn on features now instead of disabling them like auth and https. In addition: - Allow multiple options for auth (only password for now). - Combine the install docs since they had many commonalities and - generally simplified them (hopefully not too much). - Move all example configs into docs/examples.
This commit is contained in:
@@ -12,6 +12,8 @@ import { extname } from "vs/base/common/path";
|
||||
import { URITransformer, IRawURITransformer } from "vs/base/common/uriIpc";
|
||||
import { mkdirp } from "vs/base/node/pfs";
|
||||
|
||||
import { AuthType } from "vs/server/src/server";
|
||||
|
||||
export const tmpdir = path.join(os.tmpdir(), "code-server");
|
||||
|
||||
export const generateCertificate = async (): Promise<{ cert: string, certKey: string }> => {
|
||||
@@ -108,3 +110,8 @@ export const unpackExecutables = async (): Promise<void> => {
|
||||
await util.promisify(fs.chmod)(destination, "755");
|
||||
}
|
||||
};
|
||||
|
||||
export const buildAllowedMessage = (t: typeof AuthType): string => {
|
||||
const values = <string[]>Object.keys(t).map((k) => t[k]);
|
||||
return `Allowed value${values.length === 1 ? " is" : "s are"} ${values.map((t) => `'${t}'`).join(",")}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user