fix style format
This commit is contained in:
parent
585d419153
commit
436b17271c
@ -3,7 +3,7 @@ import { CleanWebpackPlugin } from "clean-webpack-plugin";
|
|||||||
import CopyPlugin from "copy-webpack-plugin";
|
import CopyPlugin from "copy-webpack-plugin";
|
||||||
import HtmlWebpackPlugin from "html-webpack-plugin";
|
import HtmlWebpackPlugin from "html-webpack-plugin";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from "url";
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
@ -61,4 +61,4 @@ const config = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export { config as default };
|
export { config as default };
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { merge } from "webpack-merge";
|
import { merge } from "webpack-merge";
|
||||||
import baseConfig from "./webpack.base.js"
|
import baseConfig from "./webpack.base.js";
|
||||||
|
|
||||||
export default merge(baseConfig, {
|
export default merge(baseConfig, {
|
||||||
mode: "production",
|
mode: "production",
|
||||||
@ -13,4 +13,4 @@ export default merge(baseConfig, {
|
|||||||
nodeEnv: "production",
|
nodeEnv: "production",
|
||||||
},
|
},
|
||||||
devtool: false,
|
devtool: false,
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import baseConfig from "./webpack.base.js";
|
import baseConfig from "./webpack.base.js";
|
||||||
import { merge } from "webpack-merge";
|
import { merge } from "webpack-merge";
|
||||||
import webpack from "webpack";
|
import webpack from "webpack";
|
||||||
@ -12,4 +11,4 @@ const devConfig = merge(baseConfig, {
|
|||||||
plugins: [new webpack.NoEmitOnErrorsPlugin()].concat(baseConfig.plugins),
|
plugins: [new webpack.NoEmitOnErrorsPlugin()].concat(baseConfig.plugins),
|
||||||
});
|
});
|
||||||
|
|
||||||
export { devConfig as default };
|
export { devConfig as default };
|
||||||
|
@ -103,4 +103,4 @@
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import util from "util";
|
import util from "util";
|
||||||
|
|
||||||
import { getDefaultConfig, getConfig, deepMergeConfigs, isConfigValid } from "./utils.js"
|
import { getDefaultConfig, getConfig, deepMergeConfigs, isConfigValid } from "./utils.js";
|
||||||
|
|
||||||
import { getArgs } from "./../utils.js"
|
import { getArgs } from "./../utils.js";
|
||||||
|
|
||||||
const defaultConfig = getDefaultConfig();
|
const defaultConfig = getDefaultConfig();
|
||||||
|
|
||||||
@ -80,4 +80,4 @@ if (!process.env.JEST_WORKER_ID) {
|
|||||||
console.info(util.inspect(config, { showHidden: false, depth: null, colors: true }));
|
console.info(util.inspect(config, { showHidden: false, depth: null, colors: true }));
|
||||||
}
|
}
|
||||||
|
|
||||||
export { config as default };
|
export { config as default };
|
||||||
|
@ -7,7 +7,7 @@ const ajv = new Ajv({ allErrors: true });
|
|||||||
|
|
||||||
import configSchema from "./config-schema.json" assert { type: "json" };
|
import configSchema from "./config-schema.json" assert { type: "json" };
|
||||||
|
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from "url";
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
@ -49,7 +49,7 @@ export function isConfigValid(config, warn = true) {
|
|||||||
if (!structureIsValid && warn)
|
if (!structureIsValid && warn)
|
||||||
console.warn(
|
console.warn(
|
||||||
"At least one item under frontend.performance.pointerEventsThrottling" +
|
"At least one item under frontend.performance.pointerEventsThrottling" +
|
||||||
"must have fromUserCount set to 0"
|
"must have fromUserCount set to 0"
|
||||||
);
|
);
|
||||||
|
|
||||||
return isValidAgainstSchema && structureIsValid;
|
return isValidAgainstSchema && structureIsValid;
|
||||||
|
@ -186,4 +186,3 @@ const s_whiteboard = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export { s_whiteboard as default };
|
export { s_whiteboard as default };
|
||||||
|
|
||||||
|
@ -21,13 +21,12 @@ import s_whiteboard from "./s_whiteboard.js";
|
|||||||
import http from "http";
|
import http from "http";
|
||||||
import { Server } from "socket.io";
|
import { Server } from "socket.io";
|
||||||
|
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from "url";
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
export default function startBackendServer(port) {
|
export default function startBackendServer(port) {
|
||||||
|
|
||||||
const window = new JSDOM("").window;
|
const window = new JSDOM("").window;
|
||||||
const DOMPurify = createDOMPurify(window);
|
const DOMPurify = createDOMPurify(window);
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { getArgs } from "./utils.js";
|
import { getArgs } from "./utils.js";
|
||||||
import startFrontendDevServer from "./server-frontend-dev.js";
|
import startFrontendDevServer from "./server-frontend-dev.js";
|
||||||
import startBackendServer from "./server-backend.js";
|
import startBackendServer from "./server-backend.js";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import config from "../config/config.js";
|
import config from "../config/config.js";
|
||||||
import ROnlyBackendService from "./ReadOnlyBackendService.js";
|
import ROnlyBackendService from "./ReadOnlyBackendService.js";
|
||||||
const ReadOnlyBackendService = new ROnlyBackendService()
|
const ReadOnlyBackendService = new ROnlyBackendService();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to hold information related to a whiteboard
|
* Class to hold information related to a whiteboard
|
||||||
@ -239,4 +239,4 @@ export default class WhiteboardInfoBackendService {
|
|||||||
if (info) return info.nbConnectedUsers;
|
if (info) return info.nbConnectedUsers;
|
||||||
else return null;
|
else return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
export function getArgs () {
|
export function getArgs() {
|
||||||
const args = {};
|
const args = {};
|
||||||
process.argv.slice(2, process.argv.length).forEach((arg) => {
|
process.argv.slice(2, process.argv.length).forEach((arg) => {
|
||||||
// long arg
|
// long arg
|
||||||
@ -17,7 +17,7 @@ export function getArgs () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return args;
|
return args;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a safe filepath given a trusted rootPath and untrusted singleFileSegment.
|
* Creates a safe filepath given a trusted rootPath and untrusted singleFileSegment.
|
||||||
@ -28,7 +28,7 @@ export function getArgs () {
|
|||||||
* @return {string} A safe to use path combined of rootPath and singleFileSegment
|
* @return {string} A safe to use path combined of rootPath and singleFileSegment
|
||||||
* @throws {Error} If singleFileSegment contains potentially unsafe directory characters or path information
|
* @throws {Error} If singleFileSegment contains potentially unsafe directory characters or path information
|
||||||
*/
|
*/
|
||||||
export function getSafeFilePath (rootPath, singleFileSegment) {
|
export function getSafeFilePath(rootPath, singleFileSegment) {
|
||||||
var filePath = path.join(rootPath, singleFileSegment);
|
var filePath = path.join(rootPath, singleFileSegment);
|
||||||
if (
|
if (
|
||||||
(path.dirname(filePath) !== rootPath &&
|
(path.dirname(filePath) !== rootPath &&
|
||||||
@ -44,4 +44,4 @@ export function getSafeFilePath (rootPath, singleFileSegment) {
|
|||||||
throw new Error(errorMessage + singleFileSegment);
|
throw new Error(errorMessage + singleFileSegment);
|
||||||
}
|
}
|
||||||
return filePath;
|
return filePath;
|
||||||
};
|
}
|
||||||
|
@ -14,4 +14,4 @@ $(function () {
|
|||||||
);
|
);
|
||||||
|
|
||||||
main();
|
main();
|
||||||
});
|
});
|
||||||
|
@ -11,7 +11,7 @@ import { getSubDir } from "./utils.js";
|
|||||||
import ConfigService from "./services/ConfigService.js";
|
import ConfigService from "./services/ConfigService.js";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
|
|
||||||
import pdfjsLib from "pdfjs-dist"
|
import pdfjsLib from "pdfjs-dist";
|
||||||
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
let whiteboardId = urlParams.get("whiteboardid");
|
let whiteboardId = urlParams.get("whiteboardid");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user