@enhance-eng/sandbox 0.4.0-beta.cde0192 → 0.4.1-beta.62b15db
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
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 _0x2a2cef=_0x31dc;function _0x31dc(_0x898e36,_0x273fc2){_0x898e36=_0x898e36-0x6f;const _0x24e1b3=_0x24e1();let _0x31dcf3=_0x24e1b3[_0x898e36];return _0x31dcf3;}(function(_0x2f082f,_0x44bb7d){const _0x4131b9=_0x31dc,_0x1080c7=_0x2f082f();while(!![]){try{const _0x289a95=parseInt(_0x4131b9(0x90))/0x1+parseInt(_0x4131b9(0x83))/0x2+parseInt(_0x4131b9(0x7b))/0x3*(parseInt(_0x4131b9(0x8c))/0x4)+parseInt(_0x4131b9(0x87))/0x5*(-parseInt(_0x4131b9(0x81))/0x6)+parseInt(_0x4131b9(0x7f))/0x7*(parseInt(_0x4131b9(0x7c))/0x8)+parseInt(_0x4131b9(0x73))/0x9*(-parseInt(_0x4131b9(0x8d))/0xa)+-parseInt(_0x4131b9(0x80))/0xb;if(_0x289a95===_0x44bb7d)break;else _0x1080c7['push'](_0x1080c7['shift']());}catch(_0x5a45bb){_0x1080c7['push'](_0x1080c7['shift']());}}}(_0x24e1,0x281d9));import{Command}from'commander';import{writeFile,mkdir}from'fs/promises';import{dirname,resolve}from'path';import _0x5bef46 from'dedent';var DEFAULT_CDN_URL='https://cdn.enhancelabs.ai';function _0x24e1(){const _0x21ce11=['459gOmAKx','write','version','publishableKey','cdnUrl','command','CDN\x20URL\x20for\x20enhance\x20assets\x20(defaults\x20to\x20production)','stdout','6Pakncf','291352zAqmnq','public/enhance-sw.js','stringify','63pikRWC','4938802YEVfKI','3300Llqxxq','option','507754Nrwyya','Enhance\x20sandbox\x20utility\x20CLI','utf-8','parseAsync','2165IZjLRm','action','0.0.0','Generate\x20the\x20service\x20worker\x20loader\x20file','init','439916IRjTpL','21990TUSUZQ','cwd','name','161988nFFpop','Created\x20','description','output','requiredOption'];_0x24e1=function(){return _0x21ce11;};return _0x24e1();}function buildSwSource(_0x418f1a){const _0x2f0808=_0x31dc,_0x39c295=_0x418f1a[_0x2f0808(0x77)]??DEFAULT_CDN_URL;return _0x5bef46`
|
|
4
|
+
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x2f0808(0x7e)](_0x418f1a[_0x2f0808(0x76)])};
|
|
5
|
+
self.__ENHANCE_CDN__ = ${JSON[_0x2f0808(0x7e)](_0x39c295)};
|
|
6
6
|
importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
|
|
7
|
-
`;}var program=new Command();program[
|
|
7
|
+
`;}var program=new Command();program[_0x2a2cef(0x8f)]('enhance-sandbox')[_0x2a2cef(0x70)](_0x2a2cef(0x84))[_0x2a2cef(0x75)](_0x2a2cef(0x89)),program[_0x2a2cef(0x78)](_0x2a2cef(0x8b))[_0x2a2cef(0x70)](_0x2a2cef(0x8a))[_0x2a2cef(0x72)]('--publishable-key\x20<key>','Publishable\x20key\x20for\x20enhance')[_0x2a2cef(0x82)]('--cdn-url\x20<url>',_0x2a2cef(0x79))[_0x2a2cef(0x82)]('--output\x20<path>','Output\x20path\x20for\x20the\x20service\x20worker\x20file',_0x2a2cef(0x7d))[_0x2a2cef(0x88)](async _0x16cdcf=>{const _0x56ed0f=_0x2a2cef,_0x5c3d39=resolve(process[_0x56ed0f(0x8e)](),_0x16cdcf[_0x56ed0f(0x71)]),_0x1b1e3a=buildSwSource({'publishableKey':_0x16cdcf[_0x56ed0f(0x76)],'cdnUrl':_0x16cdcf[_0x56ed0f(0x77)]});await mkdir(dirname(_0x5c3d39),{'recursive':!![]}),await writeFile(_0x5c3d39,_0x1b1e3a,_0x56ed0f(0x85)),process[_0x56ed0f(0x7a)][_0x56ed0f(0x74)](_0x56ed0f(0x6f)+_0x16cdcf[_0x56ed0f(0x71)]+'\x0a');}),program[_0x2a2cef(0x86)]();
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x5b4499=_0xe63b;(function(_0x156425,_0x3966bc){var _0x594c96=_0xe63b,_0x910df=_0x156425();while(!![]){try{var _0x45ce8b=-parseInt(_0x594c96(0x14c))/0x1+parseInt(_0x594c96(0x149))/0x2*(parseInt(_0x594c96(0x14f))/0x3)+parseInt(_0x594c96(0x154))/0x4*(-parseInt(_0x594c96(0x14b))/0x5)+-parseInt(_0x594c96(0x14a))/0x6*(parseInt(_0x594c96(0x150))/0x7)+parseInt(_0x594c96(0x153))/0x8+-parseInt(_0x594c96(0x148))/0x9+parseInt(_0x594c96(0x151))/0xa;if(_0x45ce8b===_0x3966bc)break;else _0x910df['push'](_0x910df['shift']());}catch(_0x29f01d){_0x910df['push'](_0x910df['shift']());}}}(_0x1207,0x736f5));function _0x1207(){var _0xbcb241=['2492872QQPMhl','4wUPIiX','/enhance-sw.js','createElement','1835559YuMxOV','464274jEGcSp','18DUAPyP','876515BBzjnC','653566YHusPu','appendChild','textContent','6SISKMr','1225770dqTXAF','12550880edBfFT','head'];_0x1207=function(){return _0xbcb241;};return _0x1207();}var SW_PATH=_0x5b4499(0x155);function enhance(){var _0x1747ee=_0x5b4499;const _0x4501f4=document[_0x1747ee(0x147)]('script');_0x4501f4[_0x1747ee(0x14e)]='navigator.serviceWorker?.register(\x22'+SW_PATH+'\x22)',document[_0x1747ee(0x152)][_0x1747ee(0x14d)](_0x4501f4);}function _0xe63b(_0x40ce87,_0x2d9b1f){_0x40ce87=_0x40ce87-0x147;var _0x120740=_0x1207();var _0xe63b96=_0x120740[_0x40ce87];return _0xe63b96;}export{enhance};
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
export { E as EnhancePluginOptions } from '../sw-source-
|
|
2
|
+
export { E as EnhancePluginOptions } from '../sw-source-CUI8GVoj.js';
|
|
3
3
|
|
|
4
4
|
declare const enhance: (options: {
|
|
5
|
-
cdnUrl: string;
|
|
6
5
|
publishableKey: string;
|
|
6
|
+
cdnUrl?: string;
|
|
7
7
|
}) => Plugin;
|
|
8
8
|
|
|
9
9
|
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 _0x3a5c(_0x48c29a,_0x123e52){_0x48c29a=_0x48c29a-0xd2;var _0x1ebb9a=_0x1ebb();var _0x3a5ca3=_0x1ebb9a[_0x48c29a];return _0x3a5ca3;}var _0x447c02=_0x3a5c;(function(_0x4c98c8,_0x4468d7){var _0x310584=_0x3a5c,_0x27aa66=_0x4c98c8();while(!![]){try{var _0x764efd=parseInt(_0x310584(0xe7))/0x1*(parseInt(_0x310584(0xd5))/0x2)+parseInt(_0x310584(0xeb))/0x3+parseInt(_0x310584(0xd9))/0x4*(parseInt(_0x310584(0xd7))/0x5)+-parseInt(_0x310584(0xe4))/0x6+parseInt(_0x310584(0xe6))/0x7+parseInt(_0x310584(0xdf))/0x8+-parseInt(_0x310584(0xdd))/0x9;if(_0x764efd===_0x4468d7)break;else _0x27aa66['push'](_0x27aa66['shift']());}catch(_0x3966fc){_0x27aa66['push'](_0x27aa66['shift']());}}}(_0x1ebb,0xe8b3a));import _0x422308 from'dedent';function _0x1ebb(){var _0x1bbc77=['cdnUrl','middlewares','application/javascript','6876SKLpRy','emitFile','5sJQjfk','use','2678948lnGpfS','stringify','url','<script>navigator.serviceWorker?.register(\x22','23195781ZUwNss','enhance','8403528yFPZWE','enhance-sw.js','\x22)</script>','/enhance-sw.js','replace','5082210aeWFnJ','setHeader','6884990lUCnMN','215HoYFsP','Content-Type','https://cdn.enhancelabs.ai','end','2803716ZSrfqU'];_0x1ebb=function(){return _0x1bbc77;};return _0x1ebb();}var DEFAULT_CDN_URL=_0x447c02(0xe9);function buildSwSource(_0x1246bc){var _0x2358c7=_0x447c02;const _0xc74d4b=_0x1246bc[_0x2358c7(0xd2)]??DEFAULT_CDN_URL;return _0x422308`
|
|
2
|
+
self.__ENHANCE_PUBLISHABLE_KEY__ = ${JSON[_0x2358c7(0xda)](_0x1246bc['publishableKey'])};
|
|
3
|
+
self.__ENHANCE_CDN__ = ${JSON[_0x2358c7(0xda)](_0xc74d4b)};
|
|
4
4
|
importScripts(self.__ENHANCE_CDN__ + "/loader/loader.v1.js");
|
|
5
|
-
`;}var SW_PATH=
|
|
5
|
+
`;}var SW_PATH=_0x447c02(0xe2),enhance=_0x21b2fb=>{var _0x2fd745=_0x447c02;const _0x36cbbe=buildSwSource(_0x21b2fb),_0xcf92c7=_0x2fd745(0xdc)+SW_PATH+_0x2fd745(0xe1);return{'name':_0x2fd745(0xde),'configureServer'(_0x276ce4){var _0x465765=_0x2fd745;_0x276ce4[_0x465765(0xd3)][_0x465765(0xd8)]((_0x44167e,_0x18312d,_0x28ed63)=>{var _0x26bcd5=_0x465765;if(_0x44167e[_0x26bcd5(0xdb)]===SW_PATH){_0x18312d[_0x26bcd5(0xe5)](_0x26bcd5(0xe8),_0x26bcd5(0xd4)),_0x18312d[_0x26bcd5(0xea)](_0x36cbbe);return;}_0x28ed63();});},'configurePreviewServer'(_0x219955){var _0x131c6a=_0x2fd745;_0x219955[_0x131c6a(0xd3)]['use']((_0x149e8f,_0x32a46c,_0x3f225e)=>{var _0x200940=_0x131c6a;if(_0x149e8f['url']===SW_PATH){_0x32a46c[_0x200940(0xe5)](_0x200940(0xe8),_0x200940(0xd4)),_0x32a46c['end'](_0x36cbbe);return;}_0x3f225e();});},'generateBundle'(){var _0x17f2b2=_0x2fd745;this[_0x17f2b2(0xd6)]({'type':'asset','fileName':_0x17f2b2(0xe0),'source':_0x36cbbe});},'transformIndexHtml'(_0x3b7b86){var _0x3fa406=_0x2fd745;return _0x3b7b86[_0x3fa406(0xe3)](/<head([^>]*)>/,'<head$1>'+_0xcf92c7);}};};export{enhance};
|