dotenv-validator-pro 1.1.1 → 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.
Files changed (2) hide show
  1. package/bin/validate.js +17 -258
  2. 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: "Critical System Error", msg: "Your config files have become sentient. They demand a raise." },
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 XP Error Sound (the iconic "ding!")
310
- function playErrorSound() {
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(800, now);
321
- osc1.frequency.exponentialRampToValueAtTime(600, now + 0.1);
248
+ osc1.frequency.setValueAtTime(880, now);
322
249
  osc1.type = 'sine';
323
- gain1.gain.setValueAtTime(0.3, now);
324
- gain1.gain.exponentialRampToValueAtTime(0.01, now + 0.3);
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.3);
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(1200, now);
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.2);
263
+ gain2.gain.exponentialRampToValueAtTime(0.01, now + 0.25);
338
264
  osc2.start(now);
339
- osc2.stop(now + 0.2);
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[msgIndex % messages.length];
454
- const isWarning = msg.title.includes('Warning') || msg.title.includes('PUNK');
277
+ const msg = messages[0];
278
+ const isWarning = true;
455
279
 
456
280
  window.innerHTML = \`
457
281
  <div class="xp-titlebar">
@@ -502,24 +326,12 @@ const prankHTML = `
502
326
  document.body.appendChild(window);
503
327
  windowCount++;
504
328
 
505
- // Play appropriate sound based on message type
506
- if (msg.title.includes('Critical') || msg.title.includes('Fatal') || msg.title.includes('Security')) {
507
- playCriticalSound();
508
- } else if (msg.title.includes('PUNK') || msg.title.includes('ESCAPE') || msg.title.includes('FOOLED')) {
509
- playChaoticBeeps();
510
- } else {
511
- playErrorSound();
512
- }
513
-
514
- if (windowCount >= 15 && !revealed) {
515
- revealed = true;
516
- revealPrank();
517
- }
329
+ // Play the classic ding sound
330
+ playDing();
518
331
  }
519
332
 
520
333
  function spawnMore(e) {
521
334
  e.stopPropagation();
522
- playClickSound();
523
335
 
524
336
  // Spawn 2-4 more windows!
525
337
  const count = Math.floor(Math.random() * 3) + 2;
@@ -532,54 +344,6 @@ const prankHTML = `
532
344
  }
533
345
  }
534
346
 
535
- function revealPrank() {
536
- document.querySelector('.punk-text').style.display = 'block';
537
- playTadaSound();
538
- createConfetti();
539
-
540
- // Play victory sounds periodically
541
- setInterval(() => {
542
- if (Math.random() > 0.5) {
543
- playChaoticBeeps();
544
- }
545
- }, 2000);
546
- }
547
-
548
- function createConfetti() {
549
- const colors = ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff', '#00ffff', '#ffa500', '#ff1493'];
550
-
551
- for (let i = 0; i < 100; i++) {
552
- setTimeout(() => {
553
- const confetti = document.createElement('div');
554
- confetti.className = 'confetti';
555
- confetti.style.left = Math.random() * 100 + 'vw';
556
- confetti.style.top = '-20px';
557
- confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
558
- confetti.style.animationDuration = (Math.random() * 2 + 2) + 's';
559
- confetti.style.transform = 'rotate(' + Math.random() * 360 + 'deg)';
560
- document.body.appendChild(confetti);
561
-
562
- setTimeout(() => confetti.remove(), 4000);
563
- }, i * 50);
564
- }
565
-
566
- // Keep spawning confetti
567
- setInterval(() => {
568
- if (document.querySelectorAll('.confetti').length < 50) {
569
- for (let i = 0; i < 20; i++) {
570
- const confetti = document.createElement('div');
571
- confetti.className = 'confetti';
572
- confetti.style.left = Math.random() * 100 + 'vw';
573
- confetti.style.top = '-20px';
574
- confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
575
- confetti.style.animationDuration = (Math.random() * 2 + 2) + 's';
576
- document.body.appendChild(confetti);
577
- setTimeout(() => confetti.remove(), 4000);
578
- }
579
- }
580
- }, 3000);
581
- }
582
-
583
347
  // Initial windows with delay for dramatic effect
584
348
  setTimeout(() => createWindow(100, 100, 0), 500);
585
349
  setTimeout(() => createWindow(200, 150, 1), 1000);
@@ -587,14 +351,9 @@ const prankHTML = `
587
351
  setTimeout(() => createWindow(300, 100, 3), 2000);
588
352
  setTimeout(() => createWindow(250, 250, 4), 2500);
589
353
 
590
- // Prevent closing the tab easily
591
- window.onbeforeunload = function() {
592
- return "Are you sure you want to leave? The fun is just getting started! 🎉";
593
- };
594
-
595
354
  // Spawn random windows every few seconds
596
355
  setInterval(() => {
597
- if (windowCount < 30) {
356
+ if (windowCount < 50) {
598
357
  const x = Math.random() * (window.innerWidth - 400);
599
358
  const y = Math.random() * (window.innerHeight - 250);
600
359
  createWindow(x, y, windowCount);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotenv-validator-pro",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "description": "🔧 Professional .env and config file validator - catches security issues, typos, and misconfigurations",
5
5
  "main": "index.js",
6
6
  "bin": {