mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
chore: lint
This commit is contained in:
parent
b28a070a28
commit
5c19ddba61
14 changed files with 33 additions and 8 deletions
|
|
@ -51,6 +51,7 @@ export default cloudcmd;
|
|||
export function cloudcmd(params) {
|
||||
const p = params || {};
|
||||
const options = p.config || {};
|
||||
|
||||
const config = p.configManager || createConfig({
|
||||
configPath,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ export const getColumns = ({isDev = _isDev()} = {}) => {
|
|||
const readFilesSyncMemo = nanomemoize((isDev) => {
|
||||
const dist = getDist(isDev);
|
||||
const columnsDir = path.join(__dirname, '..', dist, 'columns');
|
||||
|
||||
const names = fs
|
||||
.readdirSync(columnsDir)
|
||||
.filter(not(isMap));
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ function get(manage, request, response) {
|
|||
async function patch(manage, request, response) {
|
||||
const name = 'config.json';
|
||||
const cache = false;
|
||||
|
||||
const options = {
|
||||
name,
|
||||
request,
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ export const _getReadDir = getReadDir;
|
|||
async function route({config, options, request, response}) {
|
||||
const name = ponse.getPathName(request);
|
||||
const gzip = true;
|
||||
|
||||
const p = {
|
||||
request,
|
||||
response,
|
||||
|
|
|
|||
|
|
@ -243,6 +243,7 @@ test('cloudcmd: route: sendIndex: encode', async (t) => {
|
|||
test('cloudcmd: route: sendIndex: encode: not encoded', async (t) => {
|
||||
const name = '"><svg onload=alert(3);>';
|
||||
const path = '/';
|
||||
|
||||
const files = [{
|
||||
name,
|
||||
}];
|
||||
|
|
@ -276,6 +277,7 @@ test('cloudcmd: route: sendIndex: encode: not encoded', async (t) => {
|
|||
test('cloudcmd: route: sendIndex: ddos: render', async (t) => {
|
||||
const name = `$$$'"`;
|
||||
const path = '/';
|
||||
|
||||
const files = [{
|
||||
name,
|
||||
}];
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export const getThemes = ({isDev = _isDev()} = {}) => {
|
|||
const readFilesSyncMemo = nanomemoize((isDev) => {
|
||||
const dist = getDist(isDev);
|
||||
const themesDir = path.join(__dirname, '..', dist, 'themes');
|
||||
|
||||
const names = fs
|
||||
.readdirSync(themesDir)
|
||||
.filter(not(isMap));
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ export const columns = (type, overrides = {}) => {
|
|||
} = overrides;
|
||||
|
||||
const addQuotes = (a) => `"${a}"`;
|
||||
|
||||
const all = Object
|
||||
.keys(getColumns())
|
||||
.concat('');
|
||||
|
|
@ -75,6 +76,7 @@ export const theme = (type, overrides = {}) => {
|
|||
} = overrides;
|
||||
|
||||
const addQuotes = (a) => `"${a}"`;
|
||||
|
||||
const all = Object
|
||||
.keys(getThemes())
|
||||
.concat('');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue