@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
99 } ) ;
1010} ;
1111loader . ready ( function ( ) {
12- var _a , _b , _c , _d , _e , _f , _g , _h , _j , _k , _l , _m , _o , _p , _q , _r , _s , _t , _u , _v , _w ;
12+ var _a , _b , _c , _d , _e , _f , _g , _h , _j , _k , _l , _m , _o , _p , _q , _r , _s , _t , _u , _v , _w , _x , _y ;
1313 return __awaiter ( this , void 0 , void 0 , function * ( ) {
1414 const keyInput = document . getElementById ( 'key' ) ;
1515 const consoleDiv = document . getElementById ( 'console' ) ;
@@ -106,7 +106,8 @@ loader.ready(function () {
106106 '../dist/tjson.json' ,
107107 '../dist/tmodule.js' ,
108108 '../dist/tmodule2.js' ,
109- '../dist/tmodule3.js'
109+ '../dist/tmodule3.js' ,
110+ '../dist/tmodule4.js'
110111 ] ) ;
111112 const tmodule = loader . require ( '../dist/tmodule' , files , {
112113 'cache' : cache ,
@@ -248,13 +249,19 @@ loader.ready(function () {
248249 } ) ;
249250 } ) ( ) ;
250251 } ) ;
251- ( _j = document . getElementById ( 'getFiles' ) ) === null || _j === void 0 ? void 0 : _j . addEventListener ( 'click' , function ( ) {
252+ ( _j = document . getElementById ( 'loadDefault' ) ) === null || _j === void 0 ? void 0 : _j . addEventListener ( 'click' , function ( ) {
253+ const m = loader . require ( '../dist/tmodule4.js' , files , {
254+ 'cache' : cache
255+ } ) ;
256+ console . log ( m ) ;
257+ } ) ;
258+ ( _k = document . getElementById ( 'getFiles' ) ) === null || _k === void 0 ? void 0 : _k . addEventListener ( 'click' , function ( ) {
252259 console . log ( Object . keys ( files ) ) ;
253260 } ) ;
254- ( _k = document . getElementById ( 'getCache' ) ) === null || _k === void 0 ? void 0 : _k . addEventListener ( 'click' , function ( ) {
261+ ( _l = document . getElementById ( 'getCache' ) ) === null || _l === void 0 ? void 0 : _l . addEventListener ( 'click' , function ( ) {
255262 console . log ( cache ) ;
256263 } ) ;
257- ( _l = document . getElementById ( 'runTestOnNode' ) ) === null || _l === void 0 ? void 0 : _l . addEventListener ( 'click' , function ( ) {
264+ ( _m = document . getElementById ( 'runTestOnNode' ) ) === null || _m === void 0 ? void 0 : _m . addEventListener ( 'click' , function ( ) {
258265 ( function ( ) {
259266 return __awaiter ( this , void 0 , void 0 , function * ( ) {
260267 mask . style . display = 'flex' ;
@@ -271,7 +278,7 @@ loader.ready(function () {
271278 } ) ;
272279 } ) ( ) ;
273280 } ) ;
274- ( _m = document . getElementById ( 'runTestOnNodeLoop' ) ) === null || _m === void 0 ? void 0 : _m . addEventListener ( 'click' , function ( ) {
281+ ( _o = document . getElementById ( 'runTestOnNodeLoop' ) ) === null || _o === void 0 ? void 0 : _o . addEventListener ( 'click' , function ( ) {
275282 ( function ( ) {
276283 return __awaiter ( this , void 0 , void 0 , function * ( ) {
277284 mask . style . display = 'flex' ;
@@ -288,7 +295,17 @@ loader.ready(function () {
288295 } ) ;
289296 } ) ( ) ;
290297 } ) ;
291- ( _o = document . getElementById ( 'runTypeGuard' ) ) === null || _o === void 0 ? void 0 : _o . addEventListener ( 'click' , function ( ) {
298+ ( _p = document . getElementById ( 'runThe1ToThe4' ) ) === null || _p === void 0 ? void 0 : _p . addEventListener ( 'click' , function ( ) {
299+ const cache1 = { } ;
300+ const m = loader . require ( '../dist/tmodule.js' , files , {
301+ 'cache' : cache1 ,
302+ 'preprocess' : ( code ) => {
303+ return code . replace ( / ' t h e 1 ' / g, '\'the4\'' ) ;
304+ }
305+ } ) ;
306+ console . log ( 'filename:' , m [ 0 ] . tm2fn , 'd1:' , m [ 0 ] . getData ( 'd1' ) ) ;
307+ } ) ;
308+ ( _q = document . getElementById ( 'runTypeGuard' ) ) === null || _q === void 0 ? void 0 : _q . addEventListener ( 'click' , function ( ) {
292309 ( function ( ) {
293310 return __awaiter ( this , void 0 , void 0 , function * ( ) {
294311 mask . style . display = 'flex' ;
@@ -326,7 +343,7 @@ loader.ready(function () {
326343 } ) ;
327344 } ) ( ) ;
328345 } ) ;
329- ( _p = document . getElementById ( 'runResizeObserverESM' ) ) === null || _p === void 0 ? void 0 : _p . addEventListener ( 'click' , function ( ) {
346+ ( _r = document . getElementById ( 'runResizeObserverESM' ) ) === null || _r === void 0 ? void 0 : _r . addEventListener ( 'click' , function ( ) {
330347 ( function ( ) {
331348 return __awaiter ( this , void 0 , void 0 , function * ( ) {
332349 mask . style . display = 'flex' ;
@@ -344,7 +361,7 @@ loader.ready(function () {
344361 } ) ;
345362 } ) ( ) ;
346363 } ) ;
347- ( _q = document . getElementById ( 'runResizeObserverUMD' ) ) === null || _q === void 0 ? void 0 : _q . addEventListener ( 'click' , function ( ) {
364+ ( _s = document . getElementById ( 'runResizeObserverUMD' ) ) === null || _s === void 0 ? void 0 : _s . addEventListener ( 'click' , function ( ) {
348365 ( function ( ) {
349366 return __awaiter ( this , void 0 , void 0 , function * ( ) {
350367 mask . style . display = 'flex' ;
@@ -362,7 +379,7 @@ loader.ready(function () {
362379 } ) ;
363380 } ) ( ) ;
364381 } ) ;
365- ( _r = document . getElementById ( 'runMonacoEditor' ) ) === null || _r === void 0 ? void 0 : _r . addEventListener ( 'click' , function ( ) {
382+ ( _t = document . getElementById ( 'runMonacoEditor' ) ) === null || _t === void 0 ? void 0 : _t . addEventListener ( 'click' , function ( ) {
366383 ( function ( ) {
367384 return __awaiter ( this , void 0 , void 0 , function * ( ) {
368385 const monacoDiv = document . getElementById ( 'monacoDiv' ) ;
@@ -415,7 +432,7 @@ loader.ready(function () {
415432 } ) ;
416433 } ) ( ) ;
417434 } ) ;
418- ( _s = document . getElementById ( 'AddFetchFilesAdapter' ) ) === null || _s === void 0 ? void 0 : _s . addEventListener ( 'click' , function ( ) {
435+ ( _u = document . getElementById ( 'AddFetchFilesAdapter' ) ) === null || _u === void 0 ? void 0 : _u . addEventListener ( 'click' , function ( ) {
419436 ( function ( ) {
420437 return __awaiter ( this , void 0 , void 0 , function * ( ) {
421438 const tmpFiles = { } ;
@@ -445,7 +462,7 @@ loader.ready(function () {
445462 } ) ;
446463 } ) ( ) ;
447464 } ) ;
448- ( _t = document . getElementById ( 'AddSniffFilesAdapter' ) ) === null || _t === void 0 ? void 0 : _t . addEventListener ( 'click' , function ( ) {
465+ ( _v = document . getElementById ( 'AddSniffFilesAdapter' ) ) === null || _v === void 0 ? void 0 : _v . addEventListener ( 'click' , function ( ) {
449466 ( function ( ) {
450467 return __awaiter ( this , void 0 , void 0 , function * ( ) {
451468 const tmpFiles = { } ;
@@ -470,10 +487,10 @@ loader.ready(function () {
470487 } ) ;
471488 } ) ( ) ;
472489 } ) ;
473- ( _u = document . getElementById ( 'runRemoveComment' ) ) === null || _u === void 0 ? void 0 : _u . addEventListener ( 'click' , function ( ) {
490+ ( _w = document . getElementById ( 'runRemoveComment' ) ) === null || _w === void 0 ? void 0 : _w . addEventListener ( 'click' , function ( ) {
474491 document . getElementById ( 'removeComment2' ) . value = loader . removeComment ( document . getElementById ( 'removeComment1' ) . value ) ;
475492 } ) ;
476- ( _v = document . getElementById ( 'runParseUrl' ) ) === null || _v === void 0 ? void 0 : _v . addEventListener ( 'click' , function ( ) {
493+ ( _x = document . getElementById ( 'runParseUrl' ) ) === null || _x === void 0 ? void 0 : _x . addEventListener ( 'click' , function ( ) {
477494 document . getElementById ( 'runParseUrl2' ) . value = JSON . stringify ( loader . parseUrl ( document . getElementById ( 'runParseUrl1' ) . value ) , null , 4 ) ;
478495 } ) ;
479496 const urlResolve1 = document . getElementById ( 'urlResolve1' ) ;
@@ -498,7 +515,7 @@ loader.ready(function () {
498515 }
499516 }
500517 } ) ;
501- ( _w = document . getElementById ( 'urlResolve' ) ) === null || _w === void 0 ? void 0 : _w . addEventListener ( 'click' , function ( ) {
518+ ( _y = document . getElementById ( 'urlResolve' ) ) === null || _y === void 0 ? void 0 : _y . addEventListener ( 'click' , function ( ) {
502519 document . getElementById ( 'urlResolve3' ) . innerText = loader . urlResolve ( urlResolve1 . value , urlResolve2 . value ) ;
503520 } ) ;
504521 } ) ;
0 commit comments