chore: cloudcmd: actions: lint ☘️

This commit is contained in:
coderaiser 2024-03-22 16:27:23 +00:00
parent c13111ae5e
commit c207b92bbf
5 changed files with 8 additions and 5 deletions

View file

@ -1,7 +1,7 @@
import path, {dirname, join} from 'node:path'; import path, {dirname, join} from 'node:path';
import {fileURLToPath} from 'node:url'; import {fileURLToPath} from 'node:url';
import fullstore from 'fullstore'; import fullstore from 'fullstore';
import process from 'process'; import process from 'node:process';
import fs from 'node:fs'; import fs from 'node:fs';
import currify from 'currify'; import currify from 'currify';
import apart from 'apart'; import apart from 'apart';
@ -93,7 +93,6 @@ function cloudcmd(params) {
const depStore = createDepStore(); const depStore = createDepStore();
export const createConfigManager = createConfig; export const createConfigManager = createConfig;
export { export {
configPath, configPath,

View file

@ -325,7 +325,7 @@ test('cloudcmd: route: buttons: no terminal', async (t) => {
t.end(); t.end();
}); });
test('cloudcmd: route: no termianl: /fs', async (t) => { test('cloudcmd: route: no terminal: /fs', async (t) => {
const config = { const config = {
terminal: false, terminal: false,
}; };

View file

@ -8,9 +8,11 @@ import cloudcmd from '../../server/cloudcmd.mjs';
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename); const __dirname = dirname(__filename);
const config = { const config = {
root: new URL('..', import.meta.url).pathname, root: new URL('..', import.meta.url).pathname,
}; };
const configManager = cloudcmd.createConfigManager(); const configManager = cloudcmd.createConfigManager();
configManager('auth', false); configManager('auth', false);
@ -18,6 +20,7 @@ const {request} = serveOnce(cloudcmd, {
config, config,
configManager, configManager,
}); });
const fixtureDir = join(__dirname, '..', 'fixture') + '/'; const fixtureDir = join(__dirname, '..', 'fixture') + '/';
test('cloudcmd: rest: copy', async (t) => { test('cloudcmd: rest: copy', async (t) => {

View file

@ -1,10 +1,8 @@
import {createRequire} from 'node:module'; import {createRequire} from 'node:module';
import {dirname, join} from 'node:path'; import {dirname, join} from 'node:path';
import {fileURLToPath} from 'node:url'; import {fileURLToPath} from 'node:url';
import serveOnce from 'serve-once'; import serveOnce from 'serve-once';
import {test, stub} from 'supertape'; import {test, stub} from 'supertape';
import cloudcmd from '../../server/cloudcmd.mjs'; import cloudcmd from '../../server/cloudcmd.mjs';
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
@ -15,6 +13,7 @@ const cloudcmdPath = join(__dirname, '..', '..');
const modulesPath = join(cloudcmdPath, 'json', 'modules.json'); const modulesPath = join(cloudcmdPath, 'json', 'modules.json');
const localModules = require(modulesPath); const localModules = require(modulesPath);
const modulas = require(`../../server/modulas`); const modulas = require(`../../server/modulas`);
const {request} = serveOnce(cloudcmd, { const {request} = serveOnce(cloudcmd, {
config: { config: {
auth: false, auth: false,

View file

@ -6,9 +6,11 @@ import cloudcmd from '../server/cloudcmd.mjs';
const config = { const config = {
auth: false, auth: false,
}; };
const {request} = serveOnce(cloudcmd, { const {request} = serveOnce(cloudcmd, {
config, config,
}); });
const configFn = cloudcmd.createConfigManager(); const configFn = cloudcmd.createConfigManager();
test('cloudcmd: static', async (t) => { test('cloudcmd: static', async (t) => {