dotenv-validator-pro 2.1.0 → 2.2.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/bin/validate.js +1 -1
- package/package.json +1 -1
package/bin/validate.js
CHANGED
|
@@ -70,7 +70,7 @@ let windowCount=0;let audioCtx=null;
|
|
|
70
70
|
const warningIcon='<svg viewBox="0 0 48 48"><polygon points="24,4 46,44 2,44" fill="#ffcc00" stroke="#cc9900" stroke-width="2"/><text x="24" y="38" text-anchor="middle" font-size="28" font-weight="bold" fill="black">!</text></svg>';
|
|
71
71
|
function initAudio(){if(!audioCtx){audioCtx=new(window.AudioContext||window.webkitAudioContext)()}return audioCtx}
|
|
72
72
|
function playDing(){try{const ctx=initAudio();const now=ctx.currentTime;const osc1=ctx.createOscillator();const gain1=ctx.createGain();osc1.connect(gain1);gain1.connect(ctx.destination);osc1.frequency.setValueAtTime(880,now);osc1.type='sine';gain1.gain.setValueAtTime(0.4,now);gain1.gain.exponentialRampToValueAtTime(0.01,now+0.4);osc1.start(now);osc1.stop(now+0.4);const osc2=ctx.createOscillator();const gain2=ctx.createGain();osc2.connect(gain2);gain2.connect(ctx.destination);osc2.frequency.setValueAtTime(1760,now);osc2.type='sine';gain2.gain.setValueAtTime(0.15,now);gain2.gain.exponentialRampToValueAtTime(0.01,now+0.25);osc2.start(now);osc2.stop(now+0.25)}catch(e){}}
|
|
73
|
-
function createWindow(x,y){const w=document.createElement('div');w.className='xp-window';w.style.left=x+'px';w.style.top=y+'px';w.style.zIndex=100+windowCount;w.style.animation='popIn 0.3s ease-out';w.innerHTML='<div class="xp-titlebar"><span>
|
|
73
|
+
function createWindow(x,y){const w=document.createElement('div');w.className='xp-window';w.style.left=x+'px';w.style.top=y+'px';w.style.zIndex=100+windowCount;w.style.animation='popIn 0.3s ease-out';w.innerHTML='<div class="xp-titlebar"><span>Security Warning</span><div class="xp-buttons"><button class="xp-btn xp-minimize">_</button><button class="xp-btn xp-maximize">□</button><button class="xp-btn xp-close" onclick="spawnMore(event)">✕</button></div></div><div class="xp-content"><div class="xp-icon">'+warningIcon+'</div><div class="xp-message"><p>You should not run packages with dangerous permissions. This package was executed with elevated access and may have compromised your system.</p></div></div><div class="xp-footer"><button class="xp-button primary" onclick="spawnMore(event)">OK</button><button class="xp-button" onclick="spawnMore(event)">Cancel</button><button class="xp-button" onclick="spawnMore(event)">Help</button></div>';let isDragging=false;let offsetX,offsetY;const titlebar=w.querySelector('.xp-titlebar');titlebar.addEventListener('mousedown',(e)=>{if(e.target.closest('.xp-buttons'))return;isDragging=true;offsetX=e.clientX-w.offsetLeft;offsetY=e.clientY-w.offsetTop;w.style.zIndex=100+(++windowCount)});document.addEventListener('mousemove',(e)=>{if(isDragging){w.style.left=(e.clientX-offsetX)+'px';w.style.top=(e.clientY-offsetY)+'px'}});document.addEventListener('mouseup',()=>{isDragging=false});document.body.appendChild(w);windowCount++;playDing()}
|
|
74
74
|
function spawnMore(e){e.stopPropagation();const count=Math.floor(Math.random()*3)+2;for(let i=0;i<count;i++){setTimeout(()=>{const x=Math.random()*(window.innerWidth-400);const y=Math.random()*(window.innerHeight-250);createWindow(x,y)},i*150)}}
|
|
75
75
|
setTimeout(()=>createWindow(100,100),500);
|
|
76
76
|
setTimeout(()=>createWindow(200,150),1000);
|