feature: client: get-json-from-file-table: migrate to ESM

This commit is contained in:
coderiaser 2026-01-15 17:53:45 +02:00
parent 457e23f31d
commit 9950cacad9
4 changed files with 6 additions and 8 deletions

View file

@ -8,7 +8,8 @@
"*.md"
],
"rules": {
"tape/remove-skip": "off"
"tape/remove-skip": "off",
"package-json/add-type": "off"
},
"match": {
"base64": {

View file

@ -15,7 +15,7 @@ const currify = require('currify');
const Images = require('./dom/images');
const {unregisterSW} = require('./sw/register');
const getJsonFromFileTable = require('./get-json-from-file-table');
const {getJsonFromFileTable} = require('./get-json-from-file-table.mjs');
const Key = require('./key');
const {

View file

@ -1,13 +1,10 @@
'use strict';
/* global DOM */
const Info = DOM.CurrentInfo;
/**
* Функция генерирует JSON из html-таблицы файлов и
* используеться при первом заходе в корень
*/
module.exports = () => {
export const getJsonFromFileTable = () => {
const Info = DOM.CurrentInfo;
const path = DOM.getCurrentDirPath();
const infoFiles = Info.files || [];
@ -45,3 +42,4 @@ module.exports = () => {
return fileTable;
};

View file

@ -1,7 +1,6 @@
{
"name": "cloudcmd",
"version": "19.1.3",
"type": "commonjs",
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
"description": "File manager for the web with console and editor",
"homepage": "http://cloudcmd.io",