cloudcmd 19.4.0 → 19.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +11 -0
- package/HELP.md +3 -1
- package/README.md +1 -1
- package/bun.lock +4498 -0
- package/common/cloudfunc.js +1 -2
- package/common/entity.js +2 -0
- package/dist/cloudcmd.common.js +160 -87
- package/dist/cloudcmd.common.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist-dev/cloudcmd.common.js +29 -18
- package/dist-dev/sw.js +1 -1
- package/package.json +3 -3
- package/server/cloudcmd.js +1 -1
- package/server/route.js +1 -1
package/common/cloudfunc.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import rendy from 'rendy';
|
|
1
|
+
import {rendy} from 'rendy';
|
|
2
2
|
import currify from 'currify';
|
|
3
3
|
import store from 'fullstore';
|
|
4
4
|
import {encode} from '#common/entity';
|
|
@@ -128,7 +128,6 @@ export const buildFromJSON = (params) => {
|
|
|
128
128
|
const json = params.data;
|
|
129
129
|
|
|
130
130
|
const path = encode(json.path);
|
|
131
|
-
|
|
132
131
|
const {files} = json;
|
|
133
132
|
|
|
134
133
|
/*
|
package/common/entity.js
CHANGED
package/dist/cloudcmd.common.js
CHANGED
|
@@ -5988,75 +5988,6 @@ Philip.prototype._find = function(entries, fn) {
|
|
|
5988
5988
|
};
|
|
5989
5989
|
|
|
5990
5990
|
|
|
5991
|
-
/***/ },
|
|
5992
|
-
|
|
5993
|
-
/***/ 6686
|
|
5994
|
-
(module) {
|
|
5995
|
-
|
|
5996
|
-
"use strict";
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
const isString = (a) => typeof a === 'string';
|
|
6000
|
-
const constant = (a) => () => a;
|
|
6001
|
-
const {keys} = Object;
|
|
6002
|
-
|
|
6003
|
-
module.exports = (template, values, modifiers) => {
|
|
6004
|
-
check(template, values);
|
|
6005
|
-
|
|
6006
|
-
let result = template;
|
|
6007
|
-
|
|
6008
|
-
const names = !modifiers ? keys(values) : template.match(/{{(.*?)}}/g);
|
|
6009
|
-
|
|
6010
|
-
for (const key of names) {
|
|
6011
|
-
const [parsedKey, value] = parseValue(key, values, modifiers);
|
|
6012
|
-
const str = constant(value);
|
|
6013
|
-
|
|
6014
|
-
while (result.includes(parsedKey))
|
|
6015
|
-
result = result.replace(parsedKey, str);
|
|
6016
|
-
}
|
|
6017
|
-
|
|
6018
|
-
if (result.includes('{{'))
|
|
6019
|
-
result = result.replace(/{{.*?}}/g, '');
|
|
6020
|
-
|
|
6021
|
-
return result;
|
|
6022
|
-
};
|
|
6023
|
-
|
|
6024
|
-
function check(template, values) {
|
|
6025
|
-
if (!isString(template))
|
|
6026
|
-
throw Error('template should be a string!');
|
|
6027
|
-
|
|
6028
|
-
if (typeof values !== 'object')
|
|
6029
|
-
throw Error('values should be an object!');
|
|
6030
|
-
}
|
|
6031
|
-
|
|
6032
|
-
function parseValue(key, values, modifiers) {
|
|
6033
|
-
if (!modifiers)
|
|
6034
|
-
return [
|
|
6035
|
-
`{{ ${key} }}`,
|
|
6036
|
-
values[key],
|
|
6037
|
-
];
|
|
6038
|
-
|
|
6039
|
-
const preparedKey = key
|
|
6040
|
-
.replaceAll('{{', '')
|
|
6041
|
-
.replaceAll('}}', '')
|
|
6042
|
-
.replaceAll(' ', '');
|
|
6043
|
-
|
|
6044
|
-
const value = values[preparedKey] || '';
|
|
6045
|
-
|
|
6046
|
-
if (!preparedKey.includes('|'))
|
|
6047
|
-
return [key, value];
|
|
6048
|
-
|
|
6049
|
-
const [name, modifierName] = preparedKey.split('|');
|
|
6050
|
-
const fn = modifiers[modifierName];
|
|
6051
|
-
const currentValue = values[name];
|
|
6052
|
-
|
|
6053
|
-
if (!fn)
|
|
6054
|
-
return [key, currentValue];
|
|
6055
|
-
|
|
6056
|
-
return [key, fn(currentValue)];
|
|
6057
|
-
}
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
5991
|
/***/ },
|
|
6061
5992
|
|
|
6062
5993
|
/***/ 6727
|
|
@@ -6065,7 +5996,7 @@ function parseValue(key, values, modifiers) {
|
|
|
6065
5996
|
"use strict";
|
|
6066
5997
|
|
|
6067
5998
|
|
|
6068
|
-
const rendy = __webpack_require__(
|
|
5999
|
+
const rendy = __webpack_require__(7442);
|
|
6069
6000
|
const TEMPLATE = __webpack_require__(4002);
|
|
6070
6001
|
|
|
6071
6002
|
const isObj = (a) => typeof a === 'object';
|
|
@@ -6447,6 +6378,75 @@ module.exports.ITEM = '<li data-name="js-menu-item" class="menu-item{{ className
|
|
|
6447
6378
|
'</li>';
|
|
6448
6379
|
|
|
6449
6380
|
|
|
6381
|
+
/***/ },
|
|
6382
|
+
|
|
6383
|
+
/***/ 7442
|
|
6384
|
+
(module) {
|
|
6385
|
+
|
|
6386
|
+
"use strict";
|
|
6387
|
+
|
|
6388
|
+
|
|
6389
|
+
const isString = (a) => typeof a === 'string';
|
|
6390
|
+
const constant = (a) => () => a;
|
|
6391
|
+
const {keys} = Object;
|
|
6392
|
+
|
|
6393
|
+
module.exports = (template, values, modifiers) => {
|
|
6394
|
+
check(template, values);
|
|
6395
|
+
|
|
6396
|
+
let result = template;
|
|
6397
|
+
|
|
6398
|
+
const names = !modifiers ? keys(values) : template.match(/{{(.*?)}}/g);
|
|
6399
|
+
|
|
6400
|
+
for (const key of names) {
|
|
6401
|
+
const [parsedKey, value] = parseValue(key, values, modifiers);
|
|
6402
|
+
const str = constant(value);
|
|
6403
|
+
|
|
6404
|
+
while (result.includes(parsedKey))
|
|
6405
|
+
result = result.replace(parsedKey, str);
|
|
6406
|
+
}
|
|
6407
|
+
|
|
6408
|
+
if (result.includes('{{'))
|
|
6409
|
+
result = result.replace(/{{.*?}}/g, '');
|
|
6410
|
+
|
|
6411
|
+
return result;
|
|
6412
|
+
};
|
|
6413
|
+
|
|
6414
|
+
function check(template, values) {
|
|
6415
|
+
if (!isString(template))
|
|
6416
|
+
throw Error('template should be a string!');
|
|
6417
|
+
|
|
6418
|
+
if (typeof values !== 'object')
|
|
6419
|
+
throw Error('values should be an object!');
|
|
6420
|
+
}
|
|
6421
|
+
|
|
6422
|
+
function parseValue(key, values, modifiers) {
|
|
6423
|
+
if (!modifiers)
|
|
6424
|
+
return [
|
|
6425
|
+
`{{ ${key} }}`,
|
|
6426
|
+
values[key],
|
|
6427
|
+
];
|
|
6428
|
+
|
|
6429
|
+
const preparedKey = key
|
|
6430
|
+
.replaceAll('{{', '')
|
|
6431
|
+
.replaceAll('}}', '')
|
|
6432
|
+
.replaceAll(' ', '');
|
|
6433
|
+
|
|
6434
|
+
const value = values[preparedKey] || '';
|
|
6435
|
+
|
|
6436
|
+
if (!preparedKey.includes('|'))
|
|
6437
|
+
return [key, value];
|
|
6438
|
+
|
|
6439
|
+
const [name, modifierName] = preparedKey.split('|');
|
|
6440
|
+
const fn = modifiers[modifierName];
|
|
6441
|
+
const currentValue = values[name];
|
|
6442
|
+
|
|
6443
|
+
if (!fn)
|
|
6444
|
+
return [key, currentValue];
|
|
6445
|
+
|
|
6446
|
+
return [key, fn(currentValue)];
|
|
6447
|
+
}
|
|
6448
|
+
|
|
6449
|
+
|
|
6450
6450
|
/***/ },
|
|
6451
6451
|
|
|
6452
6452
|
/***/ 8530
|
|
@@ -6573,7 +6573,7 @@ var emitify = __webpack_require__(7411);
|
|
|
6573
6573
|
// EXTERNAL MODULE: ./node_modules/inherits/inherits_browser.js
|
|
6574
6574
|
var inherits_browser = __webpack_require__(6698);
|
|
6575
6575
|
// EXTERNAL MODULE: ./node_modules/rendy/lib/rendy.js
|
|
6576
|
-
var rendy = __webpack_require__(
|
|
6576
|
+
var rendy = __webpack_require__(4492);
|
|
6577
6577
|
// EXTERNAL MODULE: ./node_modules/format-io/lib/format.js
|
|
6578
6578
|
var format = __webpack_require__(1730);
|
|
6579
6579
|
// EXTERNAL MODULE: ./node_modules/just-pascal-case/index.mjs
|
|
@@ -7665,7 +7665,7 @@ function CloudCmdProto({
|
|
|
7665
7665
|
const position = DOM.getPanelPosition(panel);
|
|
7666
7666
|
const sort = CloudCmd.sort[position];
|
|
7667
7667
|
const order = CloudCmd.order[position];
|
|
7668
|
-
const query = rendy('?sort={{ sort }}&order={{ order }}', {
|
|
7668
|
+
const query = (0,rendy/* rendy */.n)('?sort={{ sort }}&order={{ order }}', {
|
|
7669
7669
|
sort,
|
|
7670
7670
|
order
|
|
7671
7671
|
});
|
|
@@ -9737,7 +9737,7 @@ var buffer = __webpack_require__(2710);
|
|
|
9737
9737
|
// EXTERNAL MODULE: ./node_modules/util/util.js
|
|
9738
9738
|
var util_util = __webpack_require__(537);
|
|
9739
9739
|
// EXTERNAL MODULE: ./node_modules/rendy/lib/rendy.js
|
|
9740
|
-
var rendy = __webpack_require__(
|
|
9740
|
+
var rendy = __webpack_require__(4492);
|
|
9741
9741
|
// EXTERNAL MODULE: ./node_modules/itype/lib/itype.js
|
|
9742
9742
|
var itype = __webpack_require__(2515);
|
|
9743
9743
|
// EXTERNAL MODULE: ./node_modules/load.js/lib/load.js
|
|
@@ -9780,7 +9780,7 @@ const loadRemote = (0,util_util.callbackify)(async (name, options) => {
|
|
|
9780
9780
|
}
|
|
9781
9781
|
const localURL = local.map(url => prefix + url);
|
|
9782
9782
|
const remoteURL = remoteTmpls.map(tmpl => {
|
|
9783
|
-
return rendy(tmpl, {
|
|
9783
|
+
return (0,rendy/* rendy */.n)(tmpl, {
|
|
9784
9784
|
version
|
|
9785
9785
|
});
|
|
9786
9786
|
});
|
|
@@ -11236,7 +11236,7 @@ function hide() {}
|
|
|
11236
11236
|
// UNUSED EXPORTS: hide, init, show
|
|
11237
11237
|
|
|
11238
11238
|
// EXTERNAL MODULE: ./node_modules/rendy/lib/rendy.js
|
|
11239
|
-
var rendy = __webpack_require__(
|
|
11239
|
+
var rendy = __webpack_require__(4492);
|
|
11240
11240
|
// EXTERNAL MODULE: ./node_modules/currify/lib/currify.js
|
|
11241
11241
|
var currify = __webpack_require__(4299);
|
|
11242
11242
|
// EXTERNAL MODULE: ./node_modules/wraptile/lib/wraptile.js
|
|
@@ -11425,7 +11425,7 @@ async function fillTemplate() {
|
|
|
11425
11425
|
obj[`${columns}-selected`] = 'selected';
|
|
11426
11426
|
obj[`${theme}-selected`] = 'selected';
|
|
11427
11427
|
obj.configAuth = configAuth ? '' : 'hidden';
|
|
11428
|
-
const innerHTML = rendy(Template, obj);
|
|
11428
|
+
const innerHTML = (0,rendy/* rendy */.n)(Template, obj);
|
|
11429
11429
|
Element = create_element('form', {
|
|
11430
11430
|
className: 'config',
|
|
11431
11431
|
innerHTML
|
|
@@ -13860,7 +13860,7 @@ __webpack_require__.d(modal_namespaceObject, {
|
|
|
13860
13860
|
});
|
|
13861
13861
|
|
|
13862
13862
|
// EXTERNAL MODULE: ./node_modules/rendy/lib/rendy.js
|
|
13863
|
-
var rendy = __webpack_require__(
|
|
13863
|
+
var rendy = __webpack_require__(4492);
|
|
13864
13864
|
// EXTERNAL MODULE: ./node_modules/currify/lib/currify.js
|
|
13865
13865
|
var currify = __webpack_require__(4299);
|
|
13866
13866
|
// EXTERNAL MODULE: ./node_modules/wraptile/lib/wraptile.js
|
|
@@ -14440,7 +14440,7 @@ async function getMediaElement(src) {
|
|
|
14440
14440
|
if (!TemplateAudio) TemplateAudio = template;
|
|
14441
14441
|
const is = isAudio(name);
|
|
14442
14442
|
const type = is ? 'audio' : 'video';
|
|
14443
|
-
const innerHTML = rendy(TemplateAudio, {
|
|
14443
|
+
const innerHTML = (0,rendy/* rendy */.n)(TemplateAudio, {
|
|
14444
14444
|
src,
|
|
14445
14445
|
type,
|
|
14446
14446
|
name
|
|
@@ -14509,7 +14509,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14509
14509
|
/* harmony export */ getPathLink: () => (/* binding */ getPathLink),
|
|
14510
14510
|
/* harmony export */ getTitle: () => (/* binding */ getTitle)
|
|
14511
14511
|
/* harmony export */ });
|
|
14512
|
-
|
|
14512
|
+
if (858 == __webpack_require__.j) {
|
|
14513
|
+
/* harmony import */ var rendy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4492);
|
|
14514
|
+
}
|
|
14513
14515
|
/* harmony import */ var currify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4299);
|
|
14514
14516
|
/* harmony import */ var fullstore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8328);
|
|
14515
14517
|
/* harmony import */ var _common_entity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(634);
|
|
@@ -14577,7 +14579,7 @@ function getPathLink(url, prefix, template) {
|
|
|
14577
14579
|
continue;
|
|
14578
14580
|
}
|
|
14579
14581
|
const slash = i ? '/' : '';
|
|
14580
|
-
lines.push(rendy__WEBPACK_IMPORTED_MODULE_0__(template, {
|
|
14582
|
+
lines.push((0,rendy__WEBPACK_IMPORTED_MODULE_0__/* .rendy */ .n)(template, {
|
|
14581
14583
|
path,
|
|
14582
14584
|
name,
|
|
14583
14585
|
slash,
|
|
@@ -14617,7 +14619,7 @@ const buildFromJSON = params => {
|
|
|
14617
14619
|
* со всеми подкаталогами
|
|
14618
14620
|
*/
|
|
14619
14621
|
const htmlPath = getPathLink(path, prefix, template.pathLink);
|
|
14620
|
-
let fileTable = rendy__WEBPACK_IMPORTED_MODULE_0__(template.path, {
|
|
14622
|
+
let fileTable = (0,rendy__WEBPACK_IMPORTED_MODULE_0__/* .rendy */ .n)(template.path, {
|
|
14621
14623
|
link: prefix + FS + path,
|
|
14622
14624
|
fullPath: path,
|
|
14623
14625
|
path: htmlPath
|
|
@@ -14628,7 +14630,7 @@ const buildFromJSON = params => {
|
|
|
14628
14630
|
const name = getFieldName('name');
|
|
14629
14631
|
const size = getFieldName('size');
|
|
14630
14632
|
const date = getFieldName('date');
|
|
14631
|
-
const header = rendy__WEBPACK_IMPORTED_MODULE_0__(templateFile, {
|
|
14633
|
+
const header = (0,rendy__WEBPACK_IMPORTED_MODULE_0__/* .rendy */ .n)(templateFile, {
|
|
14632
14634
|
tag: 'div',
|
|
14633
14635
|
attribute: 'data-name="js-fm-header" ',
|
|
14634
14636
|
className: 'fm-header',
|
|
@@ -14648,7 +14650,7 @@ const buildFromJSON = params => {
|
|
|
14648
14650
|
if (path !== '/') {
|
|
14649
14651
|
const dotDot = getDotDot(path);
|
|
14650
14652
|
const link = prefix + FS + dotDot;
|
|
14651
|
-
const linkResult = rendy__WEBPACK_IMPORTED_MODULE_0__(template.link, {
|
|
14653
|
+
const linkResult = (0,rendy__WEBPACK_IMPORTED_MODULE_0__/* .rendy */ .n)(template.link, {
|
|
14652
14654
|
link,
|
|
14653
14655
|
title: '..',
|
|
14654
14656
|
name: '..'
|
|
@@ -14657,7 +14659,7 @@ const buildFromJSON = params => {
|
|
|
14657
14659
|
const attribute = `draggable="true" ${dataName}`;
|
|
14658
14660
|
|
|
14659
14661
|
/* Сохраняем путь к каталогу верхнего уровня*/
|
|
14660
|
-
fileTable += rendy__WEBPACK_IMPORTED_MODULE_0__(template.file, {
|
|
14662
|
+
fileTable += (0,rendy__WEBPACK_IMPORTED_MODULE_0__/* .rendy */ .n)(template.file, {
|
|
14661
14663
|
tag: 'li',
|
|
14662
14664
|
attribute,
|
|
14663
14665
|
className: '',
|
|
@@ -14681,7 +14683,7 @@ const buildFromJSON = params => {
|
|
|
14681
14683
|
owner,
|
|
14682
14684
|
size
|
|
14683
14685
|
} = file;
|
|
14684
|
-
const linkResult = rendy__WEBPACK_IMPORTED_MODULE_0__(templateLink, {
|
|
14686
|
+
const linkResult = (0,rendy__WEBPACK_IMPORTED_MODULE_0__/* .rendy */ .n)(templateLink, {
|
|
14685
14687
|
link,
|
|
14686
14688
|
title: name,
|
|
14687
14689
|
name,
|
|
@@ -14689,7 +14691,7 @@ const buildFromJSON = params => {
|
|
|
14689
14691
|
});
|
|
14690
14692
|
const dataName = _getDataName(file.name);
|
|
14691
14693
|
const attribute = `draggable="true" ${dataName}`;
|
|
14692
|
-
return rendy__WEBPACK_IMPORTED_MODULE_0__(templateFile, {
|
|
14694
|
+
return (0,rendy__WEBPACK_IMPORTED_MODULE_0__/* .rendy */ .n)(templateFile, {
|
|
14693
14695
|
tag: 'li',
|
|
14694
14696
|
attribute,
|
|
14695
14697
|
className: '',
|
|
@@ -14750,7 +14752,9 @@ function getDotDot(path) {
|
|
|
14750
14752
|
const Entities = {
|
|
14751
14753
|
'<': '<',
|
|
14752
14754
|
'>': '>',
|
|
14753
|
-
'"': '"'
|
|
14755
|
+
'"': '"',
|
|
14756
|
+
'{': '{',
|
|
14757
|
+
'}': '}'
|
|
14754
14758
|
};
|
|
14755
14759
|
const keys = Object.keys(Entities);
|
|
14756
14760
|
const encode = str => {
|
|
@@ -14987,6 +14991,75 @@ function pascalCase(str) {
|
|
|
14987
14991
|
|
|
14988
14992
|
|
|
14989
14993
|
|
|
14994
|
+
/***/ },
|
|
14995
|
+
|
|
14996
|
+
/***/ 4492
|
|
14997
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
14998
|
+
|
|
14999
|
+
"use strict";
|
|
15000
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15001
|
+
/* harmony export */ n: () => (/* binding */ rendy)
|
|
15002
|
+
/* harmony export */ });
|
|
15003
|
+
const isString = (a) => typeof a === 'string';
|
|
15004
|
+
const constant = (a) => () => a;
|
|
15005
|
+
const {keys} = Object;
|
|
15006
|
+
|
|
15007
|
+
const rendy = (template, values, modifiers) => {
|
|
15008
|
+
check(template, values);
|
|
15009
|
+
|
|
15010
|
+
let result = template;
|
|
15011
|
+
const names = !modifiers ? keys(values) : template.match(/{{(.*?)}}/g);
|
|
15012
|
+
|
|
15013
|
+
for (const key of names) {
|
|
15014
|
+
const [parsedKey, value] = parseValue(key, values, modifiers);
|
|
15015
|
+
const str = constant(value);
|
|
15016
|
+
|
|
15017
|
+
while (result.includes(parsedKey))
|
|
15018
|
+
result = result.replace(parsedKey, str);
|
|
15019
|
+
}
|
|
15020
|
+
|
|
15021
|
+
if (result.includes('{{'))
|
|
15022
|
+
result = result.replace(/{{.*?}}/g, '');
|
|
15023
|
+
|
|
15024
|
+
return result;
|
|
15025
|
+
};
|
|
15026
|
+
|
|
15027
|
+
function check(template, values) {
|
|
15028
|
+
if (!isString(template))
|
|
15029
|
+
throw Error('template should be a string!');
|
|
15030
|
+
|
|
15031
|
+
if (typeof values !== 'object')
|
|
15032
|
+
throw Error('values should be an object!');
|
|
15033
|
+
}
|
|
15034
|
+
|
|
15035
|
+
function parseValue(key, values, modifiers) {
|
|
15036
|
+
if (!modifiers)
|
|
15037
|
+
return [
|
|
15038
|
+
`{{ ${key} }}`,
|
|
15039
|
+
values[key],
|
|
15040
|
+
];
|
|
15041
|
+
|
|
15042
|
+
const preparedKey = key
|
|
15043
|
+
.replaceAll('{{', '')
|
|
15044
|
+
.replaceAll('}}', '')
|
|
15045
|
+
.replaceAll(' ', '');
|
|
15046
|
+
|
|
15047
|
+
const value = values[preparedKey] || '';
|
|
15048
|
+
|
|
15049
|
+
if (!preparedKey.includes('|'))
|
|
15050
|
+
return [key, value];
|
|
15051
|
+
|
|
15052
|
+
const [name, modifierName] = preparedKey.split('|');
|
|
15053
|
+
const fn = modifiers[modifierName];
|
|
15054
|
+
const currentValue = values[name];
|
|
15055
|
+
|
|
15056
|
+
if (!fn)
|
|
15057
|
+
return [key, currentValue];
|
|
15058
|
+
|
|
15059
|
+
return [key, fn(currentValue)];
|
|
15060
|
+
}
|
|
15061
|
+
|
|
15062
|
+
|
|
14990
15063
|
/***/ },
|
|
14991
15064
|
|
|
14992
15065
|
/***/ 980
|