mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: lint
This commit is contained in:
parent
43edba8cb8
commit
cc889bda4f
48 changed files with 64 additions and 62 deletions
1
.github/workflows/nodejs.yml
vendored
1
.github/workflows/nodejs.yml
vendored
|
|
@ -9,7 +9,6 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version:
|
node-version:
|
||||||
- 20.x
|
|
||||||
- 22.x
|
- 22.x
|
||||||
- 24.x
|
- 24.x
|
||||||
- 25.x
|
- 25.x
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@
|
||||||
},
|
},
|
||||||
"vim.js": {
|
"vim.js": {
|
||||||
"merge-duplicate-functions": "off"
|
"merge-duplicate-functions": "off"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"nodejs/declare": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const devtool = isDev ? 'eval' : 'source-map';
|
||||||
const notEmpty = (a) => a;
|
const notEmpty = (a) => a;
|
||||||
const clean = (array) => array.filter(notEmpty);
|
const clean = (array) => array.filter(notEmpty);
|
||||||
|
|
||||||
const noParse = (a) => /\.spec\.js$/.test(a);
|
const noParse = (a) => a.endsWith('.spec.js');
|
||||||
const options = {
|
const options = {
|
||||||
babelrc: true,
|
babelrc: true,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import {createRequire} from 'node:module';
|
import {createRequire} from 'node:module';
|
||||||
import {promisify} from 'node:util';
|
import {promisify} from 'node:util';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import {createSimport} from 'simport';
|
import {createSimport} from 'simport';
|
||||||
import parse from 'yargs-parser';
|
import parse from 'yargs-parser';
|
||||||
import exit from '../server/exit.js';
|
import exit from '../server/exit.js';
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import {promisify} from 'node:util';
|
import {promisify} from 'node:util';
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import {createSimport} from 'simport';
|
import {createSimport} from 'simport';
|
||||||
import minor from 'minor';
|
import minor from 'minor';
|
||||||
import _place from 'place';
|
import _place from 'place';
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ const Emitify = require('emitify');
|
||||||
const inherits = require('inherits');
|
const inherits = require('inherits');
|
||||||
const rendy = require('rendy');
|
const rendy = require('rendy');
|
||||||
const load = require('load.js');
|
const load = require('load.js');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const {addSlashToEnd} = require('format-io');
|
const {addSlashToEnd} = require('format-io');
|
||||||
const pascalCase = require('just-pascal-case');
|
const pascalCase = require('just-pascal-case');
|
||||||
const currify = require('currify');
|
const currify = require('currify');
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ module.exports.isCurrentIsDir = (currentFile) => {
|
||||||
const path = DOM.getCurrentPath(current);
|
const path = DOM.getCurrentPath(current);
|
||||||
const fileType = DOM.getCurrentType(current);
|
const fileType = DOM.getCurrentType(current);
|
||||||
|
|
||||||
const isZip = /\.zip$/.test(path);
|
const isZip = path.endsWith('.zip');
|
||||||
const isDir = /^directory(-link)?/.test(fileType);
|
const isDir = /^directory(-link)?/.test(fileType);
|
||||||
|
|
||||||
return isDir || isZip;
|
return isDir || isZip;
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,7 @@ function getDOM(overrides = {}) {
|
||||||
getByDataName = stub(),
|
getByDataName = stub(),
|
||||||
isContainClass = stub(),
|
isContainClass = stub(),
|
||||||
getCurrentType = stub(),
|
getCurrentType = stub(),
|
||||||
getCurrentPath = stub(),
|
getCurrentPath = stub().returns(''),
|
||||||
} = overrides;
|
} = overrides;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
alert,
|
alert,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
const test = require('supertape');
|
const test = require('supertape');
|
||||||
const {create} = require('auto-globals');
|
const {create} = require('auto-globals');
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
|
|
||||||
const {isContainClass} = require('./dom-tree');
|
const {isContainClass} = require('./dom-tree');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
const rendy = require('rendy');
|
const rendy = require('rendy');
|
||||||
const itype = require('itype');
|
const itype = require('itype');
|
||||||
const load = require('load.js');
|
const load = require('load.js');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
const {findObjByNameInArr} = require('../../common/util');
|
const {findObjByNameInArr} = require('../../common/util');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
const {encode} = require('../../common/entity');
|
const {encode} = require('../../common/entity');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
const exec = require('execon');
|
const exec = require('execon');
|
||||||
const itype = require('itype');
|
const itype = require('itype');
|
||||||
const currify = require('currify');
|
const currify = require('currify');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const clipboard = require('@cloudcmd/clipboard');
|
const clipboard = require('@cloudcmd/clipboard');
|
||||||
|
|
||||||
const getRange = require('./get-range');
|
const getRange = require('./get-range');
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/* global CloudCmd */
|
/* global CloudCmd */
|
||||||
const exec = require('execon');
|
const exec = require('execon');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const loadJS = require('load.js').js;
|
const loadJS = require('load.js').js;
|
||||||
|
|
||||||
const pascalCase = require('just-pascal-case');
|
const pascalCase = require('just-pascal-case');
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const currify = require('currify');
|
||||||
const wraptile = require('wraptile');
|
const wraptile = require('wraptile');
|
||||||
const squad = require('squad');
|
const squad = require('squad');
|
||||||
const {promisify} = require('es6-promisify');
|
const {promisify} = require('es6-promisify');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const load = require('load.js');
|
const load = require('load.js');
|
||||||
const createElement = require('@cloudcmd/create-element');
|
const createElement = require('@cloudcmd/create-element');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
const montag = require('montag');
|
const montag = require('montag');
|
||||||
|
|
||||||
const {promisify} = require('es6-promisify');
|
const {promisify} = require('es6-promisify');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const createElement = require('@cloudcmd/create-element');
|
const createElement = require('@cloudcmd/create-element');
|
||||||
const load = require('load.js');
|
const load = require('load.js');
|
||||||
const {MAX_FILE_SIZE: maxSize} = require('../../common/cloudfunc');
|
const {MAX_FILE_SIZE: maxSize} = require('../../common/cloudfunc');
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ CloudCmd.Konsole = exports;
|
||||||
|
|
||||||
const exec = require('execon');
|
const exec = require('execon');
|
||||||
const currify = require('currify');
|
const currify = require('currify');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const loadJS = require('load.js').js;
|
const loadJS = require('load.js').js;
|
||||||
const createElement = require('@cloudcmd/create-element');
|
const createElement = require('@cloudcmd/create-element');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const wraptile = require('wraptile');
|
||||||
const {promisify} = require('es6-promisify');
|
const {promisify} = require('es6-promisify');
|
||||||
const exec = require('execon');
|
const exec = require('execon');
|
||||||
const load = require('load.js');
|
const load = require('load.js');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
const {encode} = require('../../../common/entity');
|
const {encode} = require('../../../common/entity');
|
||||||
const removeExtension = require('./remove-extension');
|
const removeExtension = require('./remove-extension');
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ module.exports = (name) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
function getExtension(name) {
|
function getExtension(name) {
|
||||||
if (/\.tar\.gz$/.test(name))
|
if (name.endsWith('.tar.gz'))
|
||||||
return '.tar.gz';
|
return '.tar.gz';
|
||||||
|
|
||||||
if (/\.tar\.bz2$/.test(name))
|
if (name.endsWith('.tar.bz2'))
|
||||||
return '.tar.bz2';
|
return '.tar.bz2';
|
||||||
|
|
||||||
return getExt(name);
|
return getExt(name);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/* global CloudCmd, gritty */
|
/* global CloudCmd, gritty */
|
||||||
const {promisify} = require('es6-promisify');
|
const {promisify} = require('es6-promisify');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const fullstore = require('fullstore');
|
const fullstore = require('fullstore');
|
||||||
|
|
||||||
require('../../css/terminal.css');
|
require('../../css/terminal.css');
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/* global CloudCmd */
|
/* global CloudCmd */
|
||||||
/* global gritty */
|
/* global gritty */
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
require('../../css/terminal.css');
|
require('../../css/terminal.css');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ const wraptile = require('wraptile');
|
||||||
const fullstore = require('fullstore');
|
const fullstore = require('fullstore');
|
||||||
const load = require('load.js');
|
const load = require('load.js');
|
||||||
const createElement = require('@cloudcmd/create-element');
|
const createElement = require('@cloudcmd/create-element');
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const {codeFrameColumns} = require('@babel/code-frame');
|
const {codeFrameColumns} = require('@babel/code-frame');
|
||||||
|
|
||||||
const Images = require('../../dom/images');
|
const Images = require('../../dom/images');
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const testRegExp = currify((name, reg) => reg.test(name));
|
||||||
const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i');
|
const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i');
|
||||||
|
|
||||||
const isPDF = (a) => /\.pdf$/i.test(a);
|
const isPDF = (a) => /\.pdf$/i.test(a);
|
||||||
const isHTML = (a) => /\.html$/.test(a);
|
const isHTML = (a) => a.endsWith('.html');
|
||||||
const isMarkdown = (a) => /.\.md$/.test(a);
|
const isMarkdown = (a) => /.\.md$/.test(a);
|
||||||
|
|
||||||
module.exports = (name) => {
|
module.exports = (name) => {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ require('../../../css/view.css');
|
||||||
const rendy = require('rendy');
|
const rendy = require('rendy');
|
||||||
const currify = require('currify');
|
const currify = require('currify');
|
||||||
const wraptile = require('wraptile');
|
const wraptile = require('wraptile');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const load = require('load.js');
|
const load = require('load.js');
|
||||||
|
|
||||||
const modal = require('@cloudcmd/modal');
|
const modal = require('@cloudcmd/modal');
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ const testRegExp = currify((name, reg) => reg.test(name));
|
||||||
const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i');
|
const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i');
|
||||||
|
|
||||||
const isPDF = (a) => /\.pdf$/i.test(a);
|
const isPDF = (a) => /\.pdf$/i.test(a);
|
||||||
const isHTML = (a) => /\.html$/.test(a);
|
const isHTML = (a) => a.endsWith('.html');
|
||||||
const isMarkdown = (a) => /.\.md$/.test(a);
|
const isMarkdown = (a) => /.\.md$/.test(a);
|
||||||
|
|
||||||
module.exports.getType = async (path) => {
|
module.exports.getType = async (path) => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
module.exports.registerSW = registerSW;
|
module.exports.registerSW = registerSW;
|
||||||
module.exports.unregisterSW = unregisterSW;
|
module.exports.unregisterSW = unregisterSW;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const tape = require('supertape');
|
||||||
|
|
||||||
const stub = require('@cloudcmd/stub');
|
const stub = require('@cloudcmd/stub');
|
||||||
|
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
const {reRequire} = require('mock-require');
|
const {reRequire} = require('mock-require');
|
||||||
const test = autoGlobals(tape);
|
const test = autoGlobals(tape);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
const process = require('node:process');
|
const process = require('node:process');
|
||||||
const codegen = require('codegen.macro');
|
const codegen = require('codegen.macro');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const currify = require('currify');
|
const currify = require('currify');
|
||||||
|
|
||||||
const isDev = process.env.NODE_ENV === 'development';
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const {test, stub} = require('supertape');
|
const {test, stub} = require('supertape');
|
||||||
|
|
||||||
const {btoa, atob} = require('./base64');
|
const {btoa, atob} = require('./base64');
|
||||||
|
|
||||||
test('btoa: browser', (t) => {
|
test('btoa: browser', (t) => {
|
||||||
const btoaOriginal = global.btoa;
|
const btoaOriginal = globalThis.btoa;
|
||||||
const btoaStub = stub();
|
const btoaStub = stub();
|
||||||
const str = 'hello';
|
const str = 'hello';
|
||||||
|
|
||||||
global.btoa = btoaStub;
|
globalThis.btoa = btoaStub;
|
||||||
|
|
||||||
btoa(str);
|
btoa(str);
|
||||||
global.btoa = btoaOriginal;
|
globalThis.btoa = btoaOriginal;
|
||||||
|
|
||||||
t.calledWith(btoaStub, [str], 'should call global.btoa');
|
t.calledWith(btoaStub, [str], 'should call globalThis.btoa');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -29,18 +28,18 @@ test('btoa: node', (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('atob: browser', (t) => {
|
test('atob: browser', (t) => {
|
||||||
const atobOriginal = global.atob;
|
const atobOriginal = globalThis.atob;
|
||||||
const atobStub = stub();
|
const atobStub = stub();
|
||||||
|
|
||||||
const str = 'hello';
|
const str = 'hello';
|
||||||
|
|
||||||
global.atob = atobStub;
|
globalThis.atob = atobStub;
|
||||||
|
|
||||||
atob(str);
|
atob(str);
|
||||||
|
|
||||||
global.atob = atobOriginal;
|
globalThis.atob = atobOriginal;
|
||||||
|
|
||||||
t.calledWith(atobStub, [str], 'should call global.btoa');
|
t.calledWith(atobStub, [str], 'should call globalThis.btoa');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const {promisify} = require('node:util');
|
const {promisify} = require('node:util');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
const {test, stub} = require('supertape');
|
const {test, stub} = require('supertape');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const test = require('supertape');
|
const test = require('supertape');
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
|
|
||||||
const datetime = require('./datetime');
|
const datetime = require('./datetime');
|
||||||
|
|
||||||
|
|
@ -16,11 +16,11 @@ test('common: datetime', (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('common: datetime: no arg', (t) => {
|
test('common: datetime: no arg', (t) => {
|
||||||
const {Date} = global;
|
const {Date} = globalThis;
|
||||||
|
|
||||||
let called = false;
|
let called = false;
|
||||||
|
|
||||||
global.Date = class extends Date {
|
globalThis.Date = class extends Date {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
called = true;
|
called = true;
|
||||||
|
|
@ -29,7 +29,7 @@ test('common: datetime: no arg', (t) => {
|
||||||
|
|
||||||
datetime();
|
datetime();
|
||||||
|
|
||||||
global.Date = Date;
|
globalThis.Date = Date;
|
||||||
|
|
||||||
t.ok(called, 'should call new Date');
|
t.ok(called, 'should call new Date');
|
||||||
t.end();
|
t.end();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const all = Promise.all.bind(Promise);
|
const all = Promise.all.bind(Promise);
|
||||||
|
|
||||||
module.exports = async (a) => {
|
module.exports = async (a) => {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
const test = require('supertape');
|
const test = require('supertape');
|
||||||
const {reRequire} = require('mock-require');
|
const {reRequire} = require('mock-require');
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
const Util = require('./util');
|
const Util = require('./util');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|
@ -119,13 +119,13 @@ test('util: escapeRegExp', (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('util: scope', (t) => {
|
test('util: scope', (t) => {
|
||||||
global.window = {};
|
globalThis.window = {};
|
||||||
|
|
||||||
reRequire('./util');
|
reRequire('./util');
|
||||||
|
|
||||||
t.pass('should set window in scope');
|
t.pass('should set window in scope');
|
||||||
|
|
||||||
delete global.window;
|
delete globalThis.window;
|
||||||
|
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ const {homedir} = require('node:os');
|
||||||
const currify = require('currify');
|
const currify = require('currify');
|
||||||
|
|
||||||
const wraptile = require('wraptile');
|
const wraptile = require('wraptile');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const pullout = require('pullout');
|
const pullout = require('pullout');
|
||||||
const ponse = require('ponse');
|
const ponse = require('ponse');
|
||||||
const jonny = require('jonny');
|
const jonny = require('jonny');
|
||||||
const jju = require('jju');
|
const jju = require('jju');
|
||||||
const writejson = require('writejson');
|
const writejson = require('writejson');
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
const criton = require('criton');
|
const criton = require('criton');
|
||||||
const exit = require(`${DIR_SERVER}exit`);
|
const exit = require(`${DIR_SERVER}exit`);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import {promisify} from 'node:util';
|
import {promisify} from 'node:util';
|
||||||
import test from 'supertape';
|
import test from 'supertape';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import {connect} from '../../test/before.mjs';
|
import {connect} from '../../test/before.mjs';
|
||||||
import {createConfigManager} from '../cloudcmd.mjs';
|
import {createConfigManager} from '../cloudcmd.mjs';
|
||||||
import {distributeImport} from './import.mjs';
|
import {distributeImport} from './import.mjs';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import {join} from 'node:path';
|
import {join} from 'node:path';
|
||||||
import {promisify} from 'node:util';
|
import {promisify} from 'node:util';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import test from 'supertape';
|
import test from 'supertape';
|
||||||
import serveOnce from 'serve-once';
|
import serveOnce from 'serve-once';
|
||||||
import markdown from './index.js';
|
import markdown from './index.js';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const test = require('supertape');
|
const test = require('supertape');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
_formatMsg,
|
_formatMsg,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import rendy from 'rendy';
|
||||||
import format from 'format-io';
|
import format from 'format-io';
|
||||||
import currify from 'currify';
|
import currify from 'currify';
|
||||||
import wraptile from 'wraptile';
|
import wraptile from 'wraptile';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import once from 'once';
|
import once from 'once';
|
||||||
import pipe from 'pipe-io';
|
import pipe from 'pipe-io';
|
||||||
import {contentType} from 'mime-types';
|
import {contentType} from 'mime-types';
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import path, {dirname} from 'node:path';
|
||||||
import {fileURLToPath} from 'node:url';
|
import {fileURLToPath} from 'node:url';
|
||||||
import {Readable} from 'node:stream';
|
import {Readable} from 'node:stream';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import {test, stub} from 'supertape';
|
import {test, stub} from 'supertape';
|
||||||
import serveOnce from 'serve-once';
|
import serveOnce from 'serve-once';
|
||||||
import cloudcmd from './cloudcmd.mjs';
|
import cloudcmd from './cloudcmd.mjs';
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import {promisify} from 'node:util';
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import currify from 'currify';
|
import currify from 'currify';
|
||||||
import squad from 'squad';
|
import squad from 'squad';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import opn from 'open';
|
import opn from 'open';
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import {Server} from 'socket.io';
|
import {Server} from 'socket.io';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
|
|
||||||
const noop = (req, res, next) => {
|
const noop = (req, res, next) => {
|
||||||
next && next();
|
next && next();
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import {homedir} from 'node:os';
|
||||||
import {readFile as _readFile} from 'node:fs/promises';
|
import {readFile as _readFile} from 'node:fs/promises';
|
||||||
import {join} from 'node:path';
|
import {join} from 'node:path';
|
||||||
import montag from 'montag';
|
import montag from 'montag';
|
||||||
import tryToCatch from 'try-to-catch';
|
import {tryToCatch} from 'try-to-catch';
|
||||||
import currify from 'currify';
|
import currify from 'currify';
|
||||||
import {putout, codeframe} from 'putout';
|
import {putout, codeframe} from 'putout';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {statSync as _statSync} from 'node:fs';
|
import {statSync as _statSync} from 'node:fs';
|
||||||
import tryCatch from 'try-catch';
|
import {tryCatch} from 'try-catch';
|
||||||
import _exit from './exit.js';
|
import _exit from './exit.js';
|
||||||
import {getColumns as _getColumns} from './columns.mjs';
|
import {getColumns as _getColumns} from './columns.mjs';
|
||||||
import {getThemes as _getThemes} from './theme.mjs';
|
import {getThemes as _getThemes} from './theme.mjs';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import {test, stub} from 'supertape';
|
import {test, stub} from 'supertape';
|
||||||
import tryCatch from 'try-catch';
|
import {tryCatch} from 'try-catch';
|
||||||
import * as validate from './validate.mjs';
|
import * as validate from './validate.mjs';
|
||||||
import cloudcmd from './cloudcmd.mjs';
|
import cloudcmd from './cloudcmd.mjs';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
const autoGlobals = require('auto-globals');
|
const autoGlobals = require('auto-globals');
|
||||||
const stub = require('@cloudcmd/stub');
|
const stub = require('@cloudcmd/stub');
|
||||||
const tryToCatch = require('try-to-catch');
|
const {tryToCatch} = require('try-to-catch');
|
||||||
const wraptile = require('wraptile');
|
const wraptile = require('wraptile');
|
||||||
const defaultMenu = require('./user-menu');
|
const defaultMenu = require('./user-menu');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
const fs = require('node:fs');
|
const fs = require('node:fs');
|
||||||
|
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
const test = require('supertape');
|
const test = require('supertape');
|
||||||
const readFilesSync = require('@cloudcmd/read-files-sync');
|
const readFilesSync = require('@cloudcmd/read-files-sync');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const test = require('supertape');
|
const test = require('supertape');
|
||||||
const tryCatch = require('try-catch');
|
const {tryCatch} = require('try-catch');
|
||||||
|
|
||||||
const showConfig = require('../../server/show-config');
|
const showConfig = require('../../server/show-config');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import {Buffer} from 'node:buffer';
|
||||||
import serveOnce from 'serve-once';
|
import serveOnce from 'serve-once';
|
||||||
import test from 'supertape';
|
import test from 'supertape';
|
||||||
import criton from 'criton';
|
import criton from 'criton';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue