@enhance-eng/sandbox 0.4.0-beta.cde0192 → 0.4.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/dist/cli.js +4 -4
- package/dist/index.js +1 -1
- package/dist/vite/index.js +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[
|
|
5
|
-
self.__ENHANCE_CDN__ = ${JSON[
|
|
3
|
+
const _0x55bc31=_0xebc9;function _0xebc9(_0xb72290,_0x18cab4){_0xb72290=_0xb72290-0x96;const _0x46d5e7=_0x46d5();let _0xebc96c=_0x46d5e7[_0xb72290];return _0xebc96c;}(function(_0x2fce50,_0x231a1f){const _0x5e6ced=_0xebc9,_0x539f88=_0x2fce50();while(!![]){try{const _0x37ce31=-parseInt(_0x5e6ced(0xb1))/0x1*(parseInt(_0x5e6ced(0x96))/0x2)+-parseInt(_0x5e6ced(0x9b))/0x3+parseInt(_0x5e6ced(0xa5))/0x4+-parseInt(_0x5e6ced(0x9f))/0x5*(-parseInt(_0x5e6ced(0xac))/0x6)+-parseInt(_0x5e6ced(0xa3))/0x7+parseInt(_0x5e6ced(0xaf))/0x8*(-parseInt(_0x5e6ced(0xa4))/0x9)+parseInt(_0x5e6ced(0x97))/0xa;if(_0x37ce31===_0x231a1f)break;else _0x539f88['push'](_0x539f88['shift']());}catch(_0x40146f){_0x539f88['push'](_0x539f88['shift']());}}}(_0x46d5,0x75217));import{Command}from'commander';import{writeFile,mkdir}from'fs/promises';import{dirname,resolve}from'path';import _0x31dc37 from'dedent';function _0x46d5(){const _0x4dfa4b=['public/enhance-sw.js','command','282885Gmjnwe','stringify','output','name','846097jiGyCY','21141mouxPV','1210748befVTC','--publishable-key\x20<key>','description','--output\x20<path>','Output\x20path\x20for\x20the\x20service\x20worker\x20file','option','Enhance\x20sandbox\x20utility\x20CLI','42OvFPVv','stdout','action','2392JzVwCX','write','916JVseWm','version','cdnUrl','700QWtAjz','10770480KaAgca','requiredOption','Generate\x20the\x20service\x20worker\x20loader\x20file','utf-8','456555TNvZmi','publishableKey'];_0x46d5=function(){return _0x4dfa4b;};return _0x46d5();}function buildSwSource(_0x1d1c49){const _0x42a518=_0xebc9;return _0x31dc37`
|
|
4
|
+
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x42a518(0xa0)](_0x1d1c49[_0x42a518(0x9c)])};
|
|
5
|
+
self.__ENHANCE_CDN__ = ${JSON[_0x42a518(0xa0)](_0x1d1c49[_0x42a518(0xb3)])};
|
|
6
6
|
importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
|
|
7
|
-
`;}var program=new Command();program[
|
|
7
|
+
`;}var program=new Command();program[_0x55bc31(0xa2)]('enhance-sandbox')[_0x55bc31(0xa7)](_0x55bc31(0xab))[_0x55bc31(0xb2)]('0.0.0'),program[_0x55bc31(0x9e)]('init')[_0x55bc31(0xa7)](_0x55bc31(0x99))[_0x55bc31(0x98)]('--cdn-url\x20<url>','CDN\x20URL\x20for\x20enhance\x20assets')[_0x55bc31(0x98)](_0x55bc31(0xa6),'Publishable\x20key\x20for\x20enhance')[_0x55bc31(0xaa)](_0x55bc31(0xa8),_0x55bc31(0xa9),_0x55bc31(0x9d))[_0x55bc31(0xae)](async _0xb506d5=>{const _0x9cc0e6=_0x55bc31,_0x2d9f6e=resolve(process['cwd'](),_0xb506d5[_0x9cc0e6(0xa1)]),_0x1ad33b=buildSwSource({'cdnUrl':_0xb506d5['cdnUrl'],'publishableKey':_0xb506d5[_0x9cc0e6(0x9c)]});await mkdir(dirname(_0x2d9f6e),{'recursive':!![]}),await writeFile(_0x2d9f6e,_0x1ad33b,_0x9cc0e6(0x9a)),process[_0x9cc0e6(0xad)][_0x9cc0e6(0xb0)]('Created\x20'+_0xb506d5[_0x9cc0e6(0xa1)]+'\x0a');}),program['parseAsync']();
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x22c40a=_0x623e;(function(_0x39c3c6,_0x3fd560){var _0x8bf4b0=_0x623e,_0x5e4470=_0x39c3c6();while(!![]){try{var _0x53f2dd=parseInt(_0x8bf4b0(0xcc))/0x1*(-parseInt(_0x8bf4b0(0xd4))/0x2)+parseInt(_0x8bf4b0(0xce))/0x3+-parseInt(_0x8bf4b0(0xd1))/0x4+parseInt(_0x8bf4b0(0xc7))/0x5*(-parseInt(_0x8bf4b0(0xc9))/0x6)+-parseInt(_0x8bf4b0(0xd0))/0x7*(-parseInt(_0x8bf4b0(0xd6))/0x8)+-parseInt(_0x8bf4b0(0xd3))/0x9*(-parseInt(_0x8bf4b0(0xc6))/0xa)+-parseInt(_0x8bf4b0(0xcd))/0xb*(-parseInt(_0x8bf4b0(0xca))/0xc);if(_0x53f2dd===_0x3fd560)break;else _0x5e4470['push'](_0x5e4470['shift']());}catch(_0x4a770c){_0x5e4470['push'](_0x5e4470['shift']());}}}(_0x1ecd,0x78a09));var SW_PATH=_0x22c40a(0xd5);function _0x1ecd(){var _0x2f9bd0=['2253532MhwHgC','createElement','5261049qQNsij','10JsrJCs','/enhance-sw.js','2110792NhAeYd','10jUdlKM','5aOusln','head','3251142GaZaXO','408WuBQwj','navigator.serviceWorker?.register(\x22','65930QOGQNO','247742lHYGRK','944463ZGAebS','textContent','7gLSSQM'];_0x1ecd=function(){return _0x2f9bd0;};return _0x1ecd();}function enhance(){var _0x3c8950=_0x22c40a;const _0xdfbd=document[_0x3c8950(0xd2)]('script');_0xdfbd[_0x3c8950(0xcf)]=_0x3c8950(0xcb)+SW_PATH+'\x22)',document[_0x3c8950(0xc8)]['appendChild'](_0xdfbd);}function _0x623e(_0x4a9232,_0x2236cf){_0x4a9232=_0x4a9232-0xc6;var _0x1ecd95=_0x1ecd();var _0x623e30=_0x1ecd95[_0x4a9232];return _0x623e30;}export{enhance};
|
package/dist/vite/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[
|
|
3
|
-
self.__ENHANCE_CDN__ = ${JSON[
|
|
1
|
+
var _0x432a22=_0x5dcb;(function(_0x5b7744,_0x142bea){var _0x582409=_0x5dcb,_0x416df8=_0x5b7744();while(!![]){try{var _0x2f83f0=parseInt(_0x582409(0x104))/0x1+parseInt(_0x582409(0xfc))/0x2*(-parseInt(_0x582409(0x107))/0x3)+parseInt(_0x582409(0xf9))/0x4+parseInt(_0x582409(0xf5))/0x5*(-parseInt(_0x582409(0xf3))/0x6)+-parseInt(_0x582409(0xf2))/0x7+parseInt(_0x582409(0x106))/0x8*(parseInt(_0x582409(0xf7))/0x9)+-parseInt(_0x582409(0x105))/0xa;if(_0x2f83f0===_0x142bea)break;else _0x416df8['push'](_0x416df8['shift']());}catch(_0x4bc15e){_0x416df8['push'](_0x416df8['shift']());}}}(_0x2f88,0x4e3ba));import _0x5bda2c from'dedent';function buildSwSource(_0x489018){var _0xa5a79c=_0x5dcb;return _0x5bda2c`
|
|
2
|
+
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0xa5a79c(0xf1)](_0x489018[_0xa5a79c(0xf8)])};
|
|
3
|
+
self.__ENHANCE_CDN__ = ${JSON['stringify'](_0x489018[_0xa5a79c(0xf6)])};
|
|
4
4
|
importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
|
|
5
|
-
`;}var SW_PATH=
|
|
5
|
+
`;}function _0x2f88(){var _0x2d35cc=['384013RHVrtr','6oPzSIF','setHeader','1269205FYjqXs','cdnUrl','1144692RuApdP','publishableKey','1189664VTWxUH','middlewares','asset','1137238AHqdhV','url','application/javascript','Content-Type','end','use','/enhance-sw.js','enhance','410846SwdteL','192530WNRxQF','32ltMQYW','3XjdVmn','emitFile','enhance-sw.js','<script>navigator.serviceWorker?.register(\x22','stringify'];_0x2f88=function(){return _0x2d35cc;};return _0x2f88();}function _0x5dcb(_0x513d06,_0x1c9d8b){_0x513d06=_0x513d06-0xee;var _0x2f88f0=_0x2f88();var _0x5dcba6=_0x2f88f0[_0x513d06];return _0x5dcba6;}var SW_PATH=_0x432a22(0x102),enhance=_0x2b35bb=>{var _0x5dd6fa=_0x432a22;const _0x2e297a=buildSwSource(_0x2b35bb),_0x1aede4=_0x5dd6fa(0xf0)+SW_PATH+'\x22)</script>';return{'name':_0x5dd6fa(0x103),'configureServer'(_0x21c72e){var _0x52a3d8=_0x5dd6fa;_0x21c72e[_0x52a3d8(0xfa)]['use']((_0x3edd7c,_0x3ac65c,_0xf03f70)=>{var _0x1efa3c=_0x52a3d8;if(_0x3edd7c[_0x1efa3c(0xfd)]===SW_PATH){_0x3ac65c[_0x1efa3c(0xf4)](_0x1efa3c(0xff),'application/javascript'),_0x3ac65c[_0x1efa3c(0x100)](_0x2e297a);return;}_0xf03f70();});},'configurePreviewServer'(_0x471bc5){var _0x44607d=_0x5dd6fa;_0x471bc5[_0x44607d(0xfa)][_0x44607d(0x101)]((_0x3bc119,_0xc26e45,_0x56d448)=>{var _0x200002=_0x44607d;if(_0x3bc119[_0x200002(0xfd)]===SW_PATH){_0xc26e45[_0x200002(0xf4)](_0x200002(0xff),_0x200002(0xfe)),_0xc26e45[_0x200002(0x100)](_0x2e297a);return;}_0x56d448();});},'generateBundle'(){var _0x21bf1b=_0x5dd6fa;this[_0x21bf1b(0xee)]({'type':_0x21bf1b(0xfb),'fileName':_0x21bf1b(0xef),'source':_0x2e297a});},'transformIndexHtml'(_0x60885c){return _0x60885c['replace'](/<head([^>]*)>/,'<head$1>'+_0x1aede4);}};};export{enhance};
|