chore: lint

This commit is contained in:
coderiaser 2026-03-17 20:43:43 +02:00
parent b28a070a28
commit 5c19ddba61
14 changed files with 33 additions and 8 deletions

View file

@ -51,6 +51,7 @@ export default cloudcmd;
export function cloudcmd(params) {
const p = params || {};
const options = p.config || {};
const config = p.configManager || createConfig({
configPath,
});

View file

@ -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));

View file

@ -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,

View file

@ -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,

View file

@ -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 = `$$$'&quot;`;
const path = '/';
const files = [{
name,
}];

View file

@ -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));

View file

@ -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('');