mol_key 0.0.1451 → 0.0.1453
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/node.test.js +158 -164
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.test.js
CHANGED
|
@@ -140,133 +140,24 @@ var $;
|
|
|
140
140
|
$.$mol_fail_hidden = $mol_fail_hidden;
|
|
141
141
|
})($ || ($ = {}));
|
|
142
142
|
|
|
143
|
-
;
|
|
144
|
-
"use strict";
|
|
145
|
-
var $node = new Proxy({ require }, {
|
|
146
|
-
get(target, name, wrapper) {
|
|
147
|
-
if (target[name])
|
|
148
|
-
return target[name];
|
|
149
|
-
const $$ = $;
|
|
150
|
-
if ($$.$node_internal_check(name, target))
|
|
151
|
-
return target.require(name);
|
|
152
|
-
if (name[0] === '.')
|
|
153
|
-
return target.require(name);
|
|
154
|
-
try {
|
|
155
|
-
target.require.resolve(name);
|
|
156
|
-
}
|
|
157
|
-
catch {
|
|
158
|
-
try {
|
|
159
|
-
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', name);
|
|
160
|
-
}
|
|
161
|
-
catch (e) {
|
|
162
|
-
if ($$.$mol_promise_like(e))
|
|
163
|
-
$$.$mol_fail_hidden(e);
|
|
164
|
-
}
|
|
165
|
-
try {
|
|
166
|
-
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', '@types/' + name);
|
|
167
|
-
}
|
|
168
|
-
catch (e) {
|
|
169
|
-
if ($$.$mol_promise_like(e))
|
|
170
|
-
$$.$mol_fail_hidden(e);
|
|
171
|
-
$$.$mol_fail_log(e);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
return target.require(name);
|
|
175
|
-
},
|
|
176
|
-
set(target, name, value) {
|
|
177
|
-
target[name] = value;
|
|
178
|
-
return true;
|
|
179
|
-
},
|
|
180
|
-
});
|
|
181
|
-
const cache = new Map();
|
|
182
|
-
require = (req => Object.assign(function require(name) {
|
|
183
|
-
return $node[name];
|
|
184
|
-
}, req))(require);
|
|
185
|
-
|
|
186
|
-
;
|
|
187
|
-
"use strict";
|
|
188
|
-
var $;
|
|
189
|
-
(function ($) {
|
|
190
|
-
$.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
|
|
191
|
-
})($ || ($ = {}));
|
|
192
|
-
|
|
193
|
-
;
|
|
194
|
-
"use strict";
|
|
195
|
-
var $;
|
|
196
|
-
(function ($) {
|
|
197
|
-
$.$mol_dom = $mol_dom_context;
|
|
198
|
-
})($ || ($ = {}));
|
|
199
|
-
|
|
200
143
|
;
|
|
201
144
|
"use strict";
|
|
202
145
|
var $;
|
|
203
146
|
(function ($) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
|
-
if (nextNode == view) {
|
|
217
|
-
nextNode = nextNode.nextSibling;
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
if (node_set.has(nextNode)) {
|
|
222
|
-
el.insertBefore(view, nextNode);
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
const nn = nextNode.nextSibling;
|
|
227
|
-
el.removeChild(nextNode);
|
|
228
|
-
nextNode = nn;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
if (nextNode && nextNode.nodeName === '#text') {
|
|
235
|
-
const str = String(view);
|
|
236
|
-
if (nextNode.nodeValue !== str)
|
|
237
|
-
nextNode.nodeValue = str;
|
|
238
|
-
nextNode = nextNode.nextSibling;
|
|
239
|
-
}
|
|
240
|
-
else {
|
|
241
|
-
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
242
|
-
el.insertBefore(textNode, nextNode);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
while (nextNode) {
|
|
247
|
-
const currNode = nextNode;
|
|
248
|
-
nextNode = currNode.nextSibling;
|
|
249
|
-
el.removeChild(currNode);
|
|
250
|
-
}
|
|
147
|
+
const catched = new WeakSet();
|
|
148
|
+
function $mol_fail_catch(error) {
|
|
149
|
+
if (typeof error !== 'object')
|
|
150
|
+
return false;
|
|
151
|
+
if ($mol_promise_like(error))
|
|
152
|
+
$mol_fail_hidden(error);
|
|
153
|
+
if (catched.has(error))
|
|
154
|
+
return false;
|
|
155
|
+
catched.add(error);
|
|
156
|
+
return true;
|
|
251
157
|
}
|
|
252
|
-
$.$
|
|
158
|
+
$.$mol_fail_catch = $mol_fail_catch;
|
|
253
159
|
})($ || ($ = {}));
|
|
254
160
|
|
|
255
|
-
;
|
|
256
|
-
"use strict";
|
|
257
|
-
|
|
258
|
-
;
|
|
259
|
-
"use strict";
|
|
260
|
-
|
|
261
|
-
;
|
|
262
|
-
"use strict";
|
|
263
|
-
|
|
264
|
-
;
|
|
265
|
-
"use strict";
|
|
266
|
-
|
|
267
|
-
;
|
|
268
|
-
"use strict";
|
|
269
|
-
|
|
270
161
|
;
|
|
271
162
|
"use strict";
|
|
272
163
|
var $;
|
|
@@ -669,13 +560,87 @@ var $;
|
|
|
669
560
|
"use strict";
|
|
670
561
|
var $;
|
|
671
562
|
(function ($) {
|
|
672
|
-
function $
|
|
673
|
-
|
|
674
|
-
|
|
563
|
+
function $mol_try(handler) {
|
|
564
|
+
try {
|
|
565
|
+
return handler();
|
|
566
|
+
}
|
|
567
|
+
catch (error) {
|
|
568
|
+
return error;
|
|
569
|
+
}
|
|
675
570
|
}
|
|
676
|
-
$.$
|
|
571
|
+
$.$mol_try = $mol_try;
|
|
572
|
+
})($ || ($ = {}));
|
|
573
|
+
|
|
574
|
+
;
|
|
575
|
+
"use strict";
|
|
576
|
+
var $;
|
|
577
|
+
(function ($) {
|
|
578
|
+
$mol_test({
|
|
579
|
+
'return result without errors'() {
|
|
580
|
+
$mol_assert_equal($mol_try(() => false), false);
|
|
581
|
+
},
|
|
582
|
+
});
|
|
583
|
+
})($ || ($ = {}));
|
|
584
|
+
|
|
585
|
+
;
|
|
586
|
+
"use strict";
|
|
587
|
+
var $;
|
|
588
|
+
(function ($) {
|
|
589
|
+
function $mol_fail_log(error) {
|
|
590
|
+
if ($mol_promise_like(error))
|
|
591
|
+
return false;
|
|
592
|
+
if (!$mol_fail_catch(error))
|
|
593
|
+
return false;
|
|
594
|
+
$mol_try(() => { $mol_fail_hidden(error); });
|
|
595
|
+
return true;
|
|
596
|
+
}
|
|
597
|
+
$.$mol_fail_log = $mol_fail_log;
|
|
598
|
+
})($ || ($ = {}));
|
|
599
|
+
|
|
600
|
+
;
|
|
601
|
+
"use strict";
|
|
602
|
+
var $;
|
|
603
|
+
(function ($_1) {
|
|
604
|
+
$mol_test_mocks.push($ => $.$mol_fail_log = () => false);
|
|
677
605
|
})($ || ($ = {}));
|
|
678
606
|
|
|
607
|
+
;
|
|
608
|
+
"use strict";
|
|
609
|
+
var $node = new Proxy({ require }, {
|
|
610
|
+
get(target, name, wrapper) {
|
|
611
|
+
if (target[name])
|
|
612
|
+
return target[name];
|
|
613
|
+
const $$ = $;
|
|
614
|
+
if ($$.$node_internal_check(name, target))
|
|
615
|
+
return target.require(name);
|
|
616
|
+
if (name[0] === '.')
|
|
617
|
+
return target.require(name);
|
|
618
|
+
try {
|
|
619
|
+
target.require.resolve(name);
|
|
620
|
+
}
|
|
621
|
+
catch {
|
|
622
|
+
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', name);
|
|
623
|
+
try {
|
|
624
|
+
$$.$mol_exec('.', 'npm', 'install', '--omit=dev', '@types/' + name);
|
|
625
|
+
}
|
|
626
|
+
catch (e) {
|
|
627
|
+
if ($$.$mol_promise_like(e))
|
|
628
|
+
$$.$mol_fail_hidden(e);
|
|
629
|
+
$$.$mol_fail_log(e);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
return target.require(name);
|
|
633
|
+
},
|
|
634
|
+
set(target, name, value) {
|
|
635
|
+
target[name] = value;
|
|
636
|
+
return true;
|
|
637
|
+
},
|
|
638
|
+
});
|
|
639
|
+
const cache = new Map();
|
|
640
|
+
require = (req => Object.assign(function require(name) {
|
|
641
|
+
return $node[name];
|
|
642
|
+
}, req))(require);
|
|
643
|
+
|
|
679
644
|
;
|
|
680
645
|
"use strict";
|
|
681
646
|
var $;
|
|
@@ -864,6 +829,15 @@ var $;
|
|
|
864
829
|
;
|
|
865
830
|
"use strict";
|
|
866
831
|
|
|
832
|
+
;
|
|
833
|
+
"use strict";
|
|
834
|
+
|
|
835
|
+
;
|
|
836
|
+
"use strict";
|
|
837
|
+
|
|
838
|
+
;
|
|
839
|
+
"use strict";
|
|
840
|
+
|
|
867
841
|
;
|
|
868
842
|
"use strict";
|
|
869
843
|
var $;
|
|
@@ -3224,66 +3198,86 @@ var $;
|
|
|
3224
3198
|
"use strict";
|
|
3225
3199
|
var $;
|
|
3226
3200
|
(function ($) {
|
|
3227
|
-
|
|
3228
|
-
function $mol_fail_catch(error) {
|
|
3229
|
-
if (typeof error !== 'object')
|
|
3230
|
-
return false;
|
|
3231
|
-
if ($mol_promise_like(error))
|
|
3232
|
-
$mol_fail_hidden(error);
|
|
3233
|
-
if (catched.has(error))
|
|
3234
|
-
return false;
|
|
3235
|
-
catched.add(error);
|
|
3236
|
-
return true;
|
|
3237
|
-
}
|
|
3238
|
-
$.$mol_fail_catch = $mol_fail_catch;
|
|
3201
|
+
$.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
|
|
3239
3202
|
})($ || ($ = {}));
|
|
3240
3203
|
|
|
3241
3204
|
;
|
|
3242
3205
|
"use strict";
|
|
3243
3206
|
var $;
|
|
3244
3207
|
(function ($) {
|
|
3245
|
-
|
|
3246
|
-
try {
|
|
3247
|
-
return handler();
|
|
3248
|
-
}
|
|
3249
|
-
catch (error) {
|
|
3250
|
-
return error;
|
|
3251
|
-
}
|
|
3252
|
-
}
|
|
3253
|
-
$.$mol_try = $mol_try;
|
|
3208
|
+
$.$mol_dom = $mol_dom_context;
|
|
3254
3209
|
})($ || ($ = {}));
|
|
3255
3210
|
|
|
3256
3211
|
;
|
|
3257
3212
|
"use strict";
|
|
3258
3213
|
var $;
|
|
3259
3214
|
(function ($) {
|
|
3260
|
-
$
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3215
|
+
function $mol_dom_render_children(el, childNodes) {
|
|
3216
|
+
const node_set = new Set(childNodes);
|
|
3217
|
+
let nextNode = el.firstChild;
|
|
3218
|
+
for (let view of childNodes) {
|
|
3219
|
+
if (view == null)
|
|
3220
|
+
continue;
|
|
3221
|
+
if (view instanceof $mol_dom_context.Node) {
|
|
3222
|
+
while (true) {
|
|
3223
|
+
if (!nextNode) {
|
|
3224
|
+
el.appendChild(view);
|
|
3225
|
+
break;
|
|
3226
|
+
}
|
|
3227
|
+
if (nextNode == view) {
|
|
3228
|
+
nextNode = nextNode.nextSibling;
|
|
3229
|
+
break;
|
|
3230
|
+
}
|
|
3231
|
+
else {
|
|
3232
|
+
if (node_set.has(nextNode)) {
|
|
3233
|
+
el.insertBefore(view, nextNode);
|
|
3234
|
+
break;
|
|
3235
|
+
}
|
|
3236
|
+
else {
|
|
3237
|
+
const nn = nextNode.nextSibling;
|
|
3238
|
+
el.removeChild(nextNode);
|
|
3239
|
+
nextNode = nn;
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
else {
|
|
3245
|
+
if (nextNode && nextNode.nodeName === '#text') {
|
|
3246
|
+
const str = String(view);
|
|
3247
|
+
if (nextNode.nodeValue !== str)
|
|
3248
|
+
nextNode.nodeValue = str;
|
|
3249
|
+
nextNode = nextNode.nextSibling;
|
|
3250
|
+
}
|
|
3251
|
+
else {
|
|
3252
|
+
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
3253
|
+
el.insertBefore(textNode, nextNode);
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
while (nextNode) {
|
|
3258
|
+
const currNode = nextNode;
|
|
3259
|
+
nextNode = currNode.nextSibling;
|
|
3260
|
+
el.removeChild(currNode);
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
$.$mol_dom_render_children = $mol_dom_render_children;
|
|
3265
3264
|
})($ || ($ = {}));
|
|
3266
3265
|
|
|
3267
3266
|
;
|
|
3268
3267
|
"use strict";
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
if ($mol_promise_like(error))
|
|
3273
|
-
return false;
|
|
3274
|
-
if (!$mol_fail_catch(error))
|
|
3275
|
-
return false;
|
|
3276
|
-
$mol_try(() => { $mol_fail_hidden(error); });
|
|
3277
|
-
return true;
|
|
3278
|
-
}
|
|
3279
|
-
$.$mol_fail_log = $mol_fail_log;
|
|
3280
|
-
})($ || ($ = {}));
|
|
3268
|
+
|
|
3269
|
+
;
|
|
3270
|
+
"use strict";
|
|
3281
3271
|
|
|
3282
3272
|
;
|
|
3283
3273
|
"use strict";
|
|
3284
3274
|
var $;
|
|
3285
|
-
(function ($
|
|
3286
|
-
$
|
|
3275
|
+
(function ($) {
|
|
3276
|
+
function $mol_dom_serialize(node) {
|
|
3277
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
3278
|
+
return serializer.serializeToString(node);
|
|
3279
|
+
}
|
|
3280
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
3287
3281
|
})($ || ($ = {}));
|
|
3288
3282
|
|
|
3289
3283
|
;
|