diff options
Diffstat (limited to 'src/server/DashSession/Session/utilities/session_config.ts')
| -rw-r--r-- | src/server/DashSession/Session/utilities/session_config.ts | 104 | 
1 files changed, 52 insertions, 52 deletions
diff --git a/src/server/DashSession/Session/utilities/session_config.ts b/src/server/DashSession/Session/utilities/session_config.ts index 266759929..b42c1a3c7 100644 --- a/src/server/DashSession/Session/utilities/session_config.ts +++ b/src/server/DashSession/Session/utilities/session_config.ts @@ -1,85 +1,85 @@ -import { Schema } from "jsonschema"; -import { yellow, red, cyan, green, blue, magenta, Color, grey, gray, white, black } from "colors"; +import { Schema } from 'jsonschema'; +import { yellow, red, cyan, green, blue, magenta, Color, grey, gray, white, black } from 'colors';  const colorPattern = /black|red|green|yellow|blue|magenta|cyan|white|gray|grey/;  const identifierProperties: Schema = { -    type: "object", +    type: 'object',      properties: {          text: { -            type: "string", -            minLength: 1 +            type: 'string', +            minLength: 1,          },          color: { -            type: "string", -            pattern: colorPattern -        } -    } +            type: 'string', +            pattern: colorPattern, +        }, +    },  };  const portProperties: Schema = { -    type: "number", +    type: 'number',      minimum: 443, -    maximum: 65535 +    maximum: 65535,  };  export const configurationSchema: Schema = { -    id: "/configuration", -    type: "object", +    id: '/configuration', +    type: 'object',      properties: { -        showServerOutput: { type: "boolean" }, +        showServerOutput: { type: 'boolean' },          ports: { -            type: "object", +            type: 'object',              properties: {                  server: portProperties, -                socket: portProperties +                socket: portProperties,              }, -            required: ["server"], -            additionalProperties: true +            required: ['server'], +            additionalProperties: true,          },          identifiers: { -            type: "object", +            type: 'object',              properties: {                  master: identifierProperties,                  worker: identifierProperties, -                exec: identifierProperties -            } +                exec: identifierProperties, +            },          },          polling: { -            type: "object", +            type: 'object',              additionalProperties: false,              properties: {                  intervalSeconds: { -                    type: "number", +                    type: 'number',                      minimum: 1, -                    maximum: 86400 +                    maximum: 86400,                  },                  route: { -                    type: "string", -                    pattern: /\/[a-zA-Z]*/g +                    type: 'string', +                    pattern: /\/[a-zA-Z]*/g,                  },                  failureTolerance: { -                    type: "number", +                    type: 'number',                      minimum: 0, -                } -            } +                }, +            },          }, -    } +    },  }; -type ColorLabel = "yellow" | "red" | "cyan" | "green" | "blue" | "magenta" | "grey" | "gray" | "white" | "black"; +type ColorLabel = 'yellow' | 'red' | 'cyan' | 'green' | 'blue' | 'magenta' | 'grey' | 'gray' | 'white' | 'black';  export const colorMapping: Map<ColorLabel, Color> = new Map([ -    ["yellow", yellow], -    ["red", red], -    ["cyan", cyan], -    ["green", green], -    ["blue", blue], -    ["magenta", magenta], -    ["grey", grey], -    ["gray", gray], -    ["white", white], -    ["black", black] +    ['yellow', yellow], +    ['red', red], +    ['cyan', cyan], +    ['green', green], +    ['blue', blue], +    ['magenta', magenta], +    ['grey', grey], +    ['gray', gray], +    ['white', white], +    ['black', black],  ]);  interface Identifier { @@ -108,22 +108,22 @@ export const defaultConfig: Configuration = {      showServerOutput: false,      identifiers: {          master: { -            text: "__monitor__", -            color: "yellow" +            text: '__monitor__', +            color: 'yellow',          },          worker: { -            text: "__server__", -            color: "magenta" +            text: '__server__', +            color: 'magenta',          },          exec: { -            text: "__exec__", -            color: "green" -        } +            text: '__exec__', +            color: 'green', +        },      },      ports: { server: 1050 },      polling: { -        route: "/", +        route: '/',          intervalSeconds: 30, -        failureTolerance: 0 -    } -};
\ No newline at end of file +        failureTolerance: 0, +    }, +};  | 
