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:
Asher
2019-07-23 15:38:00 -05:00
parent 7b7f5b542e
commit fd55139c82
24 changed files with 329 additions and 571 deletions

View File

@@ -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(",")}`;
};