@enhance-eng/sandbox 0.4.2-beta.893d82e → 0.4.2
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 _0x38868e=_0xe4a9;(function(_0x3fbd30,_0x469ad4){const _0x3c2ee1=_0xe4a9,_0x49f7bc=_0x3fbd30();while(!![]){try{const _0x37060f=-parseInt(_0x3c2ee1(0x1c9))/0x1*(-parseInt(_0x3c2ee1(0x1d6))/0x2)+-parseInt(_0x3c2ee1(0x1bf))/0x3+parseInt(_0x3c2ee1(0x1da))/0x4+-parseInt(_0x3c2ee1(0x1c0))/0x5*(-parseInt(_0x3c2ee1(0x1d7))/0x6)+parseInt(_0x3c2ee1(0x1d9))/0x7+parseInt(_0x3c2ee1(0x1ca))/0x8+parseInt(_0x3c2ee1(0x1c4))/0x9*(-parseInt(_0x3c2ee1(0x1c1))/0xa);if(_0x37060f===_0x469ad4)break;else _0x49f7bc['push'](_0x49f7bc['shift']());}catch(_0x5801e8){_0x49f7bc['push'](_0x49f7bc['shift']());}}}(_0xf4d6,0x654e9));import{Command}from'commander';import{writeFile,mkdir}from'fs/promises';import{dirname,resolve}from'path';import _0x452af0 from'dedent';function _0xf4d6(){const _0x5ab059=['publishableKey','Output\x20path\x20for\x20the\x20service\x20worker\x20file','36449OrTURn','1193088lGTkFM','CDN\x20URL\x20for\x20enhance\x20assets\x20(defaults\x20to\x20production)','Enhance\x20sandbox\x20utility\x20CLI','enhance-sandbox','--publishable-key\x20<key>','cwd','option','https://cdn.enhancelabs.ai','output','cdnUrl','name','write','20puIwPj','6072rCCgRE','action','2216606uJgNFT','1707620SoUKvZ','--output\x20<path>','version','utf-8','description','1547214ziGBjU','2270Dvwwjs','210BsOLGp','stdout','init','336834RpkgRM','command','stringify'];_0xf4d6=function(){return _0x5ab059;};return _0xf4d6();}var DEFAULT_CDN_URL=_0x38868e(0x1d1);function buildSwSource(_0x2072ad){const _0x77a14c=_0x38868e,_0x2ca79f=_0x2072ad['cdnUrl']??DEFAULT_CDN_URL;return _0x452af0`
|
|
4
|
+
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x77a14c(0x1c6)](_0x2072ad['publishableKey'])};
|
|
5
|
+
self.__ENHANCE_CDN__ = ${JSON[_0x77a14c(0x1c6)](_0x2ca79f)};
|
|
6
6
|
importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
|
|
7
|
-
`;}var program=new Command();program[
|
|
7
|
+
`;}function _0xe4a9(_0x3e2821,_0x4ac0f7){_0x3e2821=_0x3e2821-0x1be;const _0xf4d6f2=_0xf4d6();let _0xe4a9c4=_0xf4d6f2[_0x3e2821];return _0xe4a9c4;}var program=new Command();program[_0x38868e(0x1d4)](_0x38868e(0x1cd))[_0x38868e(0x1be)](_0x38868e(0x1cc))[_0x38868e(0x1dc)]('0.0.0'),program[_0x38868e(0x1c5)](_0x38868e(0x1c3))[_0x38868e(0x1be)]('Generate\x20the\x20service\x20worker\x20loader\x20file')['requiredOption'](_0x38868e(0x1ce),'Publishable\x20key\x20for\x20enhance')[_0x38868e(0x1d0)]('--cdn-url\x20<url>',_0x38868e(0x1cb))[_0x38868e(0x1d0)](_0x38868e(0x1db),_0x38868e(0x1c8),'public/enhance-sw.js')[_0x38868e(0x1d8)](async _0x101681=>{const _0x4241ce=_0x38868e,_0x594182=resolve(process[_0x4241ce(0x1cf)](),_0x101681[_0x4241ce(0x1d2)]),_0x3c0ffe=buildSwSource({'publishableKey':_0x101681[_0x4241ce(0x1c7)],'cdnUrl':_0x101681[_0x4241ce(0x1d3)]});await mkdir(dirname(_0x594182),{'recursive':!![]}),await writeFile(_0x594182,_0x3c0ffe,_0x4241ce(0x1dd)),process[_0x4241ce(0x1c2)][_0x4241ce(0x1d5)]('Created\x20'+_0x101681[_0x4241ce(0x1d2)]+'\x0a');}),program['parseAsync']();
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x1e3330=_0x58f9;(function(_0x39b9af,_0xffe945){var _0x1c53de=_0x58f9,_0x1da880=_0x39b9af();while(!![]){try{var _0x307629=-parseInt(_0x1c53de(0x94))/0x1*(parseInt(_0x1c53de(0x9e))/0x2)+parseInt(_0x1c53de(0x9b))/0x3*(-parseInt(_0x1c53de(0x93))/0x4)+-parseInt(_0x1c53de(0x9a))/0x5+parseInt(_0x1c53de(0x91))/0x6*(parseInt(_0x1c53de(0x96))/0x7)+-parseInt(_0x1c53de(0x9f))/0x8+-parseInt(_0x1c53de(0x99))/0x9+parseInt(_0x1c53de(0x92))/0xa;if(_0x307629===_0xffe945)break;else _0x1da880['push'](_0x1da880['shift']());}catch(_0x391df6){_0x1da880['push'](_0x1da880['shift']());}}}(_0x941c,0x77a72));function _0x941c(){var _0x3f2942=['/enhance-sw.js','1756hXNgTo','3951528eOkQVL','117750QNUhXH','20754430pXHFRr','4krecSf','163OqWQVw','head','217WXwfUJ','createElement','navigator.serviceWorker?.register(\x22','2602296YtZHzx','3991695ySxEUr','1407546jumVDy','script'];_0x941c=function(){return _0x3f2942;};return _0x941c();}var SW_PATH=_0x1e3330(0x9d);function _0x58f9(_0xaede33,_0x2c7c84){_0xaede33=_0xaede33-0x91;var _0x941cfe=_0x941c();var _0x58f975=_0x941cfe[_0xaede33];return _0x58f975;}function enhance(){var _0xf5a81f=_0x1e3330;const _0x119855=document[_0xf5a81f(0x97)](_0xf5a81f(0x9c));_0x119855['textContent']=_0xf5a81f(0x98)+SW_PATH+'\x22)',document[_0xf5a81f(0x95)]['appendChild'](_0x119855);}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
|
+
function _0x2ca6(_0x49f4a2,_0x2df8e4){_0x49f4a2=_0x49f4a2-0x1d1;var _0x1e76f5=_0x1e76();var _0x2ca600=_0x1e76f5[_0x49f4a2];return _0x2ca600;}(function(_0x32e9dd,_0x10482b){var _0x3841e4=_0x2ca6,_0x2bff41=_0x32e9dd();while(!![]){try{var _0x1f17d8=-parseInt(_0x3841e4(0x1e7))/0x1+-parseInt(_0x3841e4(0x1de))/0x2+parseInt(_0x3841e4(0x1e0))/0x3+parseInt(_0x3841e4(0x1d1))/0x4*(-parseInt(_0x3841e4(0x1d6))/0x5)+parseInt(_0x3841e4(0x1d5))/0x6+parseInt(_0x3841e4(0x1df))/0x7+parseInt(_0x3841e4(0x1e4))/0x8*(parseInt(_0x3841e4(0x1e5))/0x9);if(_0x1f17d8===_0x10482b)break;else _0x2bff41['push'](_0x2bff41['shift']());}catch(_0x1f0bb6){_0x2bff41['push'](_0x2bff41['shift']());}}}(_0x1e76,0x23100));import _0x51c825 from'dedent';function _0x1e76(){var _0x110978=['url','cdnUrl','asset','567634ABOVnv','229824XjAhgk','105849KFerMy','publishableKey','application/javascript','setHeader','2414144ZWpiCh','9HWplLK','enhance-sw.js','98651ciCbNb','Content-Type','147088joyQBw','replace','use','enhance','1157838wZuspr','5zBiTUV','<head$1>','emitFile','stringify','end'];_0x1e76=function(){return _0x110978;};return _0x1e76();}var DEFAULT_CDN_URL='https://cdn.enhancelabs.ai';function buildSwSource(_0x36594b){var _0x2f1c68=_0x2ca6;const _0x32a72f=_0x36594b[_0x2f1c68(0x1dc)]??DEFAULT_CDN_URL;return _0x51c825`
|
|
2
|
+
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x2f1c68(0x1d9)](_0x36594b[_0x2f1c68(0x1e1)])};
|
|
3
|
+
self.__ENHANCE_CDN__ = ${JSON[_0x2f1c68(0x1d9)](_0x32a72f)};
|
|
4
4
|
importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
|
|
5
|
-
`;}var SW_PATH=
|
|
5
|
+
`;}var SW_PATH='/enhance-sw.js',enhance=_0x29df75=>{var _0xf6507b=_0x2ca6;const _0x328bd2=buildSwSource(_0x29df75),_0x1d900f='<script>navigator.serviceWorker?.register(\x22'+SW_PATH+'\x22)</script>';return{'name':_0xf6507b(0x1d4),'configureServer'(_0x28d4c3){var _0x447b22=_0xf6507b;_0x28d4c3['middlewares'][_0x447b22(0x1d3)]((_0x1d99c2,_0x477c8d,_0x1d4d02)=>{var _0x11aaef=_0x447b22;if(_0x1d99c2[_0x11aaef(0x1db)]===SW_PATH){_0x477c8d[_0x11aaef(0x1e3)](_0x11aaef(0x1e8),'application/javascript'),_0x477c8d[_0x11aaef(0x1da)](_0x328bd2);return;}_0x1d4d02();});},'configurePreviewServer'(_0xea5956){var _0x4bb9b1=_0xf6507b;_0xea5956['middlewares'][_0x4bb9b1(0x1d3)]((_0x3d1551,_0x57a869,_0x3cfd36)=>{var _0x318ac6=_0x4bb9b1;if(_0x3d1551['url']===SW_PATH){_0x57a869[_0x318ac6(0x1e3)](_0x318ac6(0x1e8),_0x318ac6(0x1e2)),_0x57a869['end'](_0x328bd2);return;}_0x3cfd36();});},'generateBundle'(){var _0x109f66=_0xf6507b;this[_0x109f66(0x1d8)]({'type':_0x109f66(0x1dd),'fileName':_0x109f66(0x1e6),'source':_0x328bd2});},'transformIndexHtml'(_0x82960d){var _0x439bc2=_0xf6507b;return _0x82960d[_0x439bc2(0x1d2)](/<head([^>]*)>/,_0x439bc2(0x1d7)+_0x1d900f);}};};export{enhance};
|