feature: cloudcmd: rendy v5.0.0

This commit is contained in:
coderiaser 2026-02-18 19:21:47 +02:00
parent cdeb40d191
commit 7ef134f46f
9 changed files with 41 additions and 9 deletions

View file

@ -6,7 +6,7 @@ import {tryToCatch} from 'try-to-catch';
import {createSimport} from 'simport';
import minor from 'minor';
import _place from 'place';
import rendy from 'rendy';
import {rendy} from 'rendy';
import shortdate from 'shortdate';
const simport = createSimport(import.meta.url);

View file

@ -1,7 +1,7 @@
import process from 'node:process';
import Emitify from 'emitify';
import inherits from 'inherits';
import rendy from 'rendy';
import {rendy} from 'rendy';
import load from 'load.js';
import {tryToCatch} from 'try-to-catch';
import {addSlashToEnd} from 'format-io';

View file

@ -1,6 +1,6 @@
/* global CloudCmd */
import {callbackify} from 'node:util';
import rendy from 'rendy';
import {rendy} from 'rendy';
import itype from 'itype';
import * as load from 'load.js';
import {tryToCatch} from 'try-to-catch';

View file

@ -1,6 +1,6 @@
/* global CloudCmd, DOM, io */
import '../../../css/config.css';
import rendy from 'rendy';
import {rendy} from 'rendy';
import currify from 'currify';
import wraptile from 'wraptile';
import squad from 'squad';

View file

@ -1,5 +1,5 @@
import '#css/view.css';
import rendy from 'rendy';
import {rendy} from 'rendy';
import currify from 'currify';
import wraptile from 'wraptile';
import {tryToCatch} from 'try-to-catch';

View file

@ -1,4 +1,4 @@
import rendy from 'rendy';
import {rendy} from 'rendy';
import currify from 'currify';
import store from 'fullstore';
import {encode} from '#common/entity';
@ -128,7 +128,6 @@ export const buildFromJSON = (params) => {
const json = params.data;
const path = encode(json.path);
const {files} = json;
/*

View file

@ -172,6 +172,39 @@ test('cloudfunc: buildFromJSON: showDotFiles: false', (t) => {
t.end();
});
test('cloudfunc: buildFromJSON: showDotFiles: false', (t) => {
const data = {
path: '/media/',
files: [{
date: '30.08.2016',
mode: 'rwx rwx rwx',
name: '{{}}',
owner: 'root',
size: '7b',
type: 'file',
}],
};
const html = buildFromJSON({
prefix: '',
template,
data,
showDotFiles: false,
});
const $ = cheerio.load(html);
const el = $('[data-name="js-file-JTdCJTdCJTdEJTdE"]');
const result = el
.find('[data-name="js-name"]')
.text();
const expected = '{{}}';
t.equal(result, expected);
t.end();
});
test('cloudfunc: _getDataName', (t) => {
const result = _getDataName('s');
const expected = 'data-name="js-file-cw==" ';

View file

@ -132,7 +132,7 @@
"pullout": "^5.0.0",
"putout": "^42.0.5",
"redzip": "^4.0.0",
"rendy": "^4.1.3",
"rendy": "^5.0.0",
"restafary": "^13.0.1",
"restbox": "^4.0.0",
"shortdate": "^2.0.0",

View file

@ -2,7 +2,7 @@ import {createRequire} from 'node:module';
import {extname} from 'node:path';
import * as _win32 from 'win32';
import ponse from 'ponse';
import rendy from 'rendy';
import {rendy} from 'rendy';
import format from 'format-io';
import currify from 'currify';
import wraptile from 'wraptile';