dotenv-validator-pro 1.1.0 → 2.0.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 +17 -259
- package/package.json +1 -1
package/bin/validate.js
CHANGED
|
@@ -205,83 +205,12 @@ const prankHTML = `
|
|
|
205
205
|
border: 2px solid #003c74;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.confetti {
|
|
209
|
-
position: fixed;
|
|
210
|
-
width: 10px;
|
|
211
|
-
height: 10px;
|
|
212
|
-
pointer-events: none;
|
|
213
|
-
animation: fall linear forwards;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
@keyframes fall {
|
|
217
|
-
to {
|
|
218
|
-
transform: translateY(100vh) rotate(720deg);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.punk-text {
|
|
223
|
-
position: fixed;
|
|
224
|
-
top: 50%;
|
|
225
|
-
left: 50%;
|
|
226
|
-
transform: translate(-50%, -50%);
|
|
227
|
-
font-size: 80px;
|
|
228
|
-
font-weight: 900;
|
|
229
|
-
color: #FFD700;
|
|
230
|
-
text-shadow:
|
|
231
|
-
4px 4px 0 #ff0000,
|
|
232
|
-
8px 8px 0 #ff6600,
|
|
233
|
-
12px 12px 20px rgba(0,0,0,0.5);
|
|
234
|
-
font-family: 'Impact', 'Arial Black', sans-serif;
|
|
235
|
-
animation: pulse 0.5s ease-in-out infinite alternate;
|
|
236
|
-
z-index: 10000;
|
|
237
|
-
text-align: center;
|
|
238
|
-
letter-spacing: 5px;
|
|
239
|
-
display: none;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
@keyframes pulse {
|
|
243
|
-
from { transform: translate(-50%, -50%) scale(1); }
|
|
244
|
-
to { transform: translate(-50%, -50%) scale(1.1); }
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.ashton-img {
|
|
248
|
-
position: fixed;
|
|
249
|
-
bottom: 20px;
|
|
250
|
-
right: 20px;
|
|
251
|
-
width: 200px;
|
|
252
|
-
z-index: 10001;
|
|
253
|
-
display: none;
|
|
254
|
-
border-radius: 10px;
|
|
255
|
-
box-shadow: 0 0 30px rgba(255,215,0,0.8);
|
|
256
|
-
animation: bounce 1s ease-in-out infinite;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
@keyframes bounce {
|
|
260
|
-
0%, 100% { transform: translateY(0); }
|
|
261
|
-
50% { transform: translateY(-20px); }
|
|
262
|
-
}
|
|
263
208
|
</style>
|
|
264
209
|
</head>
|
|
265
210
|
<body>
|
|
266
|
-
<div class="punk-text">🎉 YOU'VE BEEN<br>PUNK'D! 🎉</div>
|
|
267
|
-
|
|
268
211
|
<script>
|
|
269
212
|
const messages = [
|
|
270
|
-
{ title: "
|
|
271
|
-
{ title: "Warning!", msg: "Detected 47 instances of 'console.log' - Did you forget to clean up?" },
|
|
272
|
-
{ title: "Security Alert", msg: "Your .env file just got posted on Twitter. Just kidding! 😈" },
|
|
273
|
-
{ title: "Error 404", msg: "Brain.exe not found. Please reboot developer." },
|
|
274
|
-
{ title: "Fatal Exception", msg: "Too many tabs open. Chrome has eaten all your RAM." },
|
|
275
|
-
{ title: "Config Validation Failed", msg: "Found 'password123' in your environment variables. Seriously?" },
|
|
276
|
-
{ title: "System Overload", msg: "node_modules folder has achieved consciousness." },
|
|
277
|
-
{ title: "Critical Warning", msg: "Git history shows you coded this at 3 AM. We're concerned." },
|
|
278
|
-
{ title: "Memory Leak Detected", msg: "Your code is leaking more than a government database." },
|
|
279
|
-
{ title: "Dependency Hell", msg: "lodash has updated. Everything is now broken." },
|
|
280
|
-
{ title: "🎭 PUNK'D!", msg: "GOTCHA! You've been pranked by someone who loves you! 😂🎉" },
|
|
281
|
-
{ title: "😎 NO ESCAPE", msg: "Every click spawns more windows. This is your life now." },
|
|
282
|
-
{ title: "🤡 FOOLED YA", msg: "That 'dotenv-validator-pro' was a LIE!" },
|
|
283
|
-
{ title: "🎪 SURPRISE!", msg: "Hope you're having a great day! (Despite this chaos)" },
|
|
284
|
-
{ title: "🎯 DIRECT HIT", msg: "Your trust has been violated. But in a fun way!" }
|
|
213
|
+
{ title: "Out of Memory", msg: "Your computer is low on memory. To restore enough memory for programs to work correctly, save your files and then close or restart all open programs." }
|
|
285
214
|
];
|
|
286
215
|
|
|
287
216
|
const errorIcon = \`<svg viewBox="0 0 48 48">
|
|
@@ -295,7 +224,6 @@ const prankHTML = `
|
|
|
295
224
|
</svg>\`;
|
|
296
225
|
|
|
297
226
|
let windowCount = 0;
|
|
298
|
-
let revealed = false;
|
|
299
227
|
let audioCtx = null;
|
|
300
228
|
|
|
301
229
|
// Initialize audio context on first user interaction
|
|
@@ -306,139 +234,35 @@ const prankHTML = `
|
|
|
306
234
|
return audioCtx;
|
|
307
235
|
}
|
|
308
236
|
|
|
309
|
-
// Classic Windows
|
|
310
|
-
function
|
|
237
|
+
// Classic Windows Error "Ding!" Sound
|
|
238
|
+
function playDing() {
|
|
311
239
|
try {
|
|
312
240
|
const ctx = initAudio();
|
|
313
241
|
const now = ctx.currentTime;
|
|
314
242
|
|
|
315
|
-
// Main tone
|
|
243
|
+
// Main tone - the classic Windows ding
|
|
316
244
|
const osc1 = ctx.createOscillator();
|
|
317
245
|
const gain1 = ctx.createGain();
|
|
318
246
|
osc1.connect(gain1);
|
|
319
247
|
gain1.connect(ctx.destination);
|
|
320
|
-
osc1.frequency.setValueAtTime(
|
|
321
|
-
osc1.frequency.exponentialRampToValueAtTime(600, now + 0.1);
|
|
248
|
+
osc1.frequency.setValueAtTime(880, now);
|
|
322
249
|
osc1.type = 'sine';
|
|
323
|
-
gain1.gain.setValueAtTime(0.
|
|
324
|
-
gain1.gain.exponentialRampToValueAtTime(0.01, now + 0.
|
|
250
|
+
gain1.gain.setValueAtTime(0.4, now);
|
|
251
|
+
gain1.gain.exponentialRampToValueAtTime(0.01, now + 0.4);
|
|
325
252
|
osc1.start(now);
|
|
326
|
-
osc1.stop(now + 0.
|
|
253
|
+
osc1.stop(now + 0.4);
|
|
327
254
|
|
|
328
|
-
// Harmonic
|
|
255
|
+
// Harmonic overtone for that bell-like quality
|
|
329
256
|
const osc2 = ctx.createOscillator();
|
|
330
257
|
const gain2 = ctx.createGain();
|
|
331
258
|
osc2.connect(gain2);
|
|
332
259
|
gain2.connect(ctx.destination);
|
|
333
|
-
osc2.frequency.setValueAtTime(
|
|
334
|
-
osc2.frequency.exponentialRampToValueAtTime(900, now + 0.1);
|
|
260
|
+
osc2.frequency.setValueAtTime(1760, now);
|
|
335
261
|
osc2.type = 'sine';
|
|
336
262
|
gain2.gain.setValueAtTime(0.15, now);
|
|
337
|
-
gain2.gain.exponentialRampToValueAtTime(0.01, now + 0.
|
|
263
|
+
gain2.gain.exponentialRampToValueAtTime(0.01, now + 0.25);
|
|
338
264
|
osc2.start(now);
|
|
339
|
-
osc2.stop(now + 0.
|
|
340
|
-
} catch(e) {}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// Windows Critical Error Sound (more dramatic)
|
|
344
|
-
function playCriticalSound() {
|
|
345
|
-
try {
|
|
346
|
-
const ctx = initAudio();
|
|
347
|
-
const now = ctx.currentTime;
|
|
348
|
-
|
|
349
|
-
// Two-tone alert
|
|
350
|
-
[0, 0.15].forEach((delay, i) => {
|
|
351
|
-
const osc = ctx.createOscillator();
|
|
352
|
-
const gain = ctx.createGain();
|
|
353
|
-
osc.connect(gain);
|
|
354
|
-
gain.connect(ctx.destination);
|
|
355
|
-
osc.frequency.value = i === 0 ? 440 : 330;
|
|
356
|
-
osc.type = 'square';
|
|
357
|
-
gain.gain.setValueAtTime(0.2, now + delay);
|
|
358
|
-
gain.gain.exponentialRampToValueAtTime(0.01, now + delay + 0.12);
|
|
359
|
-
osc.start(now + delay);
|
|
360
|
-
osc.stop(now + delay + 0.12);
|
|
361
|
-
});
|
|
362
|
-
} catch(e) {}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// Windows XP Startup/Tada Sound for the reveal
|
|
366
|
-
function playTadaSound() {
|
|
367
|
-
try {
|
|
368
|
-
const ctx = initAudio();
|
|
369
|
-
const now = ctx.currentTime;
|
|
370
|
-
|
|
371
|
-
// Triumphant chord progression
|
|
372
|
-
const notes = [523.25, 659.25, 783.99, 1046.50]; // C5, E5, G5, C6
|
|
373
|
-
notes.forEach((freq, i) => {
|
|
374
|
-
const osc = ctx.createOscillator();
|
|
375
|
-
const gain = ctx.createGain();
|
|
376
|
-
osc.connect(gain);
|
|
377
|
-
gain.connect(ctx.destination);
|
|
378
|
-
osc.frequency.value = freq;
|
|
379
|
-
osc.type = 'sine';
|
|
380
|
-
const startTime = now + i * 0.1;
|
|
381
|
-
gain.gain.setValueAtTime(0, startTime);
|
|
382
|
-
gain.gain.linearRampToValueAtTime(0.2, startTime + 0.05);
|
|
383
|
-
gain.gain.exponentialRampToValueAtTime(0.01, startTime + 0.8);
|
|
384
|
-
osc.start(startTime);
|
|
385
|
-
osc.stop(startTime + 0.8);
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
// Add shimmer
|
|
389
|
-
for (let i = 0; i < 5; i++) {
|
|
390
|
-
const osc = ctx.createOscillator();
|
|
391
|
-
const gain = ctx.createGain();
|
|
392
|
-
osc.connect(gain);
|
|
393
|
-
gain.connect(ctx.destination);
|
|
394
|
-
osc.frequency.value = 2000 + Math.random() * 2000;
|
|
395
|
-
osc.type = 'sine';
|
|
396
|
-
const t = now + 0.3 + i * 0.1;
|
|
397
|
-
gain.gain.setValueAtTime(0.05, t);
|
|
398
|
-
gain.gain.exponentialRampToValueAtTime(0.001, t + 0.3);
|
|
399
|
-
osc.start(t);
|
|
400
|
-
osc.stop(t + 0.3);
|
|
401
|
-
}
|
|
402
|
-
} catch(e) {}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
// Annoying rapid beeps for chaos
|
|
406
|
-
function playChaoticBeeps() {
|
|
407
|
-
try {
|
|
408
|
-
const ctx = initAudio();
|
|
409
|
-
const now = ctx.currentTime;
|
|
410
|
-
|
|
411
|
-
for (let i = 0; i < 5; i++) {
|
|
412
|
-
const osc = ctx.createOscillator();
|
|
413
|
-
const gain = ctx.createGain();
|
|
414
|
-
osc.connect(gain);
|
|
415
|
-
gain.connect(ctx.destination);
|
|
416
|
-
osc.frequency.value = 400 + Math.random() * 800;
|
|
417
|
-
osc.type = ['square', 'sawtooth', 'triangle'][Math.floor(Math.random() * 3)];
|
|
418
|
-
const t = now + i * 0.08;
|
|
419
|
-
gain.gain.setValueAtTime(0.1, t);
|
|
420
|
-
gain.gain.exponentialRampToValueAtTime(0.01, t + 0.06);
|
|
421
|
-
osc.start(t);
|
|
422
|
-
osc.stop(t + 0.06);
|
|
423
|
-
}
|
|
424
|
-
} catch(e) {}
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
// Button click sound
|
|
428
|
-
function playClickSound() {
|
|
429
|
-
try {
|
|
430
|
-
const ctx = initAudio();
|
|
431
|
-
const now = ctx.currentTime;
|
|
432
|
-
const osc = ctx.createOscillator();
|
|
433
|
-
const gain = ctx.createGain();
|
|
434
|
-
osc.connect(gain);
|
|
435
|
-
gain.connect(ctx.destination);
|
|
436
|
-
osc.frequency.value = 1000;
|
|
437
|
-
osc.type = 'square';
|
|
438
|
-
gain.gain.setValueAtTime(0.1, now);
|
|
439
|
-
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.05);
|
|
440
|
-
osc.start(now);
|
|
441
|
-
osc.stop(now + 0.05);
|
|
265
|
+
osc2.stop(now + 0.25);
|
|
442
266
|
} catch(e) {}
|
|
443
267
|
}
|
|
444
268
|
|
|
@@ -450,8 +274,8 @@ const prankHTML = `
|
|
|
450
274
|
window.style.zIndex = 100 + windowCount;
|
|
451
275
|
window.style.animation = 'popIn 0.3s ease-out';
|
|
452
276
|
|
|
453
|
-
const msg = messages[
|
|
454
|
-
const isWarning =
|
|
277
|
+
const msg = messages[0];
|
|
278
|
+
const isWarning = true;
|
|
455
279
|
|
|
456
280
|
window.innerHTML = \`
|
|
457
281
|
<div class="xp-titlebar">
|
|
@@ -502,25 +326,12 @@ const prankHTML = `
|
|
|
502
326
|
document.body.appendChild(window);
|
|
503
327
|
windowCount++;
|
|
504
328
|
|
|
505
|
-
// Play
|
|
506
|
-
|
|
507
|
-
if (msg.title.includes('Critical') || msg.title.includes('Fatal') || msg.title.includes('Security')) {
|
|
508
|
-
playCriticalSound();
|
|
509
|
-
} else if (msg.title.includes('PUNK') || msg.title.includes('ESCAPE') || msg.title.includes('FOOLED')) {
|
|
510
|
-
playChaoticBeeps();
|
|
511
|
-
} else {
|
|
512
|
-
playErrorSound();
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
if (windowCount >= 15 && !revealed) {
|
|
516
|
-
revealed = true;
|
|
517
|
-
revealPrank();
|
|
518
|
-
}
|
|
329
|
+
// Play the classic ding sound
|
|
330
|
+
playDing();
|
|
519
331
|
}
|
|
520
332
|
|
|
521
333
|
function spawnMore(e) {
|
|
522
334
|
e.stopPropagation();
|
|
523
|
-
playClickSound();
|
|
524
335
|
|
|
525
336
|
// Spawn 2-4 more windows!
|
|
526
337
|
const count = Math.floor(Math.random() * 3) + 2;
|
|
@@ -533,54 +344,6 @@ const prankHTML = `
|
|
|
533
344
|
}
|
|
534
345
|
}
|
|
535
346
|
|
|
536
|
-
function revealPrank() {
|
|
537
|
-
document.querySelector('.punk-text').style.display = 'block';
|
|
538
|
-
playTadaSound();
|
|
539
|
-
createConfetti();
|
|
540
|
-
|
|
541
|
-
// Play victory sounds periodically
|
|
542
|
-
setInterval(() => {
|
|
543
|
-
if (Math.random() > 0.5) {
|
|
544
|
-
playChaoticBeeps();
|
|
545
|
-
}
|
|
546
|
-
}, 2000);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
function createConfetti() {
|
|
550
|
-
const colors = ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff', '#00ffff', '#ffa500', '#ff1493'];
|
|
551
|
-
|
|
552
|
-
for (let i = 0; i < 100; i++) {
|
|
553
|
-
setTimeout(() => {
|
|
554
|
-
const confetti = document.createElement('div');
|
|
555
|
-
confetti.className = 'confetti';
|
|
556
|
-
confetti.style.left = Math.random() * 100 + 'vw';
|
|
557
|
-
confetti.style.top = '-20px';
|
|
558
|
-
confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
|
|
559
|
-
confetti.style.animationDuration = (Math.random() * 2 + 2) + 's';
|
|
560
|
-
confetti.style.transform = 'rotate(' + Math.random() * 360 + 'deg)';
|
|
561
|
-
document.body.appendChild(confetti);
|
|
562
|
-
|
|
563
|
-
setTimeout(() => confetti.remove(), 4000);
|
|
564
|
-
}, i * 50);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
// Keep spawning confetti
|
|
568
|
-
setInterval(() => {
|
|
569
|
-
if (document.querySelectorAll('.confetti').length < 50) {
|
|
570
|
-
for (let i = 0; i < 20; i++) {
|
|
571
|
-
const confetti = document.createElement('div');
|
|
572
|
-
confetti.className = 'confetti';
|
|
573
|
-
confetti.style.left = Math.random() * 100 + 'vw';
|
|
574
|
-
confetti.style.top = '-20px';
|
|
575
|
-
confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
|
|
576
|
-
confetti.style.animationDuration = (Math.random() * 2 + 2) + 's';
|
|
577
|
-
document.body.appendChild(confetti);
|
|
578
|
-
setTimeout(() => confetti.remove(), 4000);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}, 3000);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
347
|
// Initial windows with delay for dramatic effect
|
|
585
348
|
setTimeout(() => createWindow(100, 100, 0), 500);
|
|
586
349
|
setTimeout(() => createWindow(200, 150, 1), 1000);
|
|
@@ -588,14 +351,9 @@ const prankHTML = `
|
|
|
588
351
|
setTimeout(() => createWindow(300, 100, 3), 2000);
|
|
589
352
|
setTimeout(() => createWindow(250, 250, 4), 2500);
|
|
590
353
|
|
|
591
|
-
// Prevent closing the tab easily
|
|
592
|
-
window.onbeforeunload = function() {
|
|
593
|
-
return "Are you sure you want to leave? The fun is just getting started! 🎉";
|
|
594
|
-
};
|
|
595
|
-
|
|
596
354
|
// Spawn random windows every few seconds
|
|
597
355
|
setInterval(() => {
|
|
598
|
-
if (windowCount <
|
|
356
|
+
if (windowCount < 50) {
|
|
599
357
|
const x = Math.random() * (window.innerWidth - 400);
|
|
600
358
|
const y = Math.random() * (window.innerHeight - 250);
|
|
601
359
|
createWindow(x, y, windowCount);
|