@deathnaitsa/wa-api 2.0.8 → 2.0.10
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/WhatsAppClient.cjs +1 -1
- package/dist/WhatsAppClient.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/publish.bat +105 -0
package/publish.bat
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
chcp 65001 >nul
|
|
3
|
+
setlocal enabledelayedexpansion
|
|
4
|
+
|
|
5
|
+
echo.
|
|
6
|
+
echo ╔═══════════════════════════════════════════════════════════════╗
|
|
7
|
+
echo ║ 🚀 WhatsApp API Auto Deploy Script 🚀 ║
|
|
8
|
+
echo ╚═══════════════════════════════════════════════════════════════╝
|
|
9
|
+
echo.
|
|
10
|
+
|
|
11
|
+
:: Farben für die Ausgabe
|
|
12
|
+
set "GREEN=[92m"
|
|
13
|
+
set "RED=[91m"
|
|
14
|
+
set "YELLOW=[93m"
|
|
15
|
+
set "BLUE=[94m"
|
|
16
|
+
set "RESET=[0m"
|
|
17
|
+
|
|
18
|
+
:: Prüfe ob wir in einem UNC-Pfad sind und nutze WSL
|
|
19
|
+
echo %CD% | findstr /C:"\\wsl.localhost" >nul
|
|
20
|
+
if %errorlevel% equ 0 (
|
|
21
|
+
echo %YELLOW%📍 Detected WSL path, using WSL bash for execution...%RESET%
|
|
22
|
+
wsl bash -c "cd '/home/seblo/Nishi API/wa-api' && ./publish.sh"
|
|
23
|
+
pause
|
|
24
|
+
exit /b %errorlevel%
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
:: Ins Skript-Verzeichnis wechseln
|
|
28
|
+
cd /d "%~dp0"
|
|
29
|
+
|
|
30
|
+
:: Schritt 1: NPM Build
|
|
31
|
+
echo %BLUE%[1/5] 📦 Building project...%RESET%
|
|
32
|
+
call npm run build
|
|
33
|
+
if errorlevel 1 (
|
|
34
|
+
echo %RED%❌ Build failed! Please fix errors and try again.%RESET%
|
|
35
|
+
pause
|
|
36
|
+
exit /b 1
|
|
37
|
+
)
|
|
38
|
+
echo %GREEN%✅ Build successful!%RESET%
|
|
39
|
+
echo.
|
|
40
|
+
|
|
41
|
+
:: Schritt 2: Git Status prüfen
|
|
42
|
+
echo %BLUE%[2/5] 📋 Checking Git status...%RESET%
|
|
43
|
+
git status --short
|
|
44
|
+
echo.
|
|
45
|
+
|
|
46
|
+
:: Schritt 3: Commit Message eingeben
|
|
47
|
+
set /p "commit_msg=%YELLOW%💬 Enter commit message (or press Enter for default): %RESET%"
|
|
48
|
+
if "!commit_msg!"=="" (
|
|
49
|
+
set "commit_msg=Update wa-api with new features"
|
|
50
|
+
)
|
|
51
|
+
echo.
|
|
52
|
+
|
|
53
|
+
:: Schritt 4: Git Add, Commit, Push
|
|
54
|
+
echo %BLUE%[3/5] 📤 Committing and pushing to Git...%RESET%
|
|
55
|
+
git add .
|
|
56
|
+
git commit -m "!commit_msg!"
|
|
57
|
+
if errorlevel 1 (
|
|
58
|
+
echo %YELLOW%⚠️ Nothing to commit or commit failed%RESET%
|
|
59
|
+
) else (
|
|
60
|
+
echo %GREEN%✅ Committed successfully!%RESET%
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
git push
|
|
64
|
+
if errorlevel 1 (
|
|
65
|
+
echo %RED%❌ Git push failed!%RESET%
|
|
66
|
+
pause
|
|
67
|
+
exit /b 1
|
|
68
|
+
)
|
|
69
|
+
echo %GREEN%✅ Pushed to Git successfully!%RESET%
|
|
70
|
+
echo.
|
|
71
|
+
|
|
72
|
+
:: Schritt 5: NPM Publish (optional)
|
|
73
|
+
echo %BLUE%[4/5] 📢 NPM Publish%RESET%
|
|
74
|
+
set /p "do_publish=%YELLOW%Do you want to publish to NPM? (y/N): %RESET%"
|
|
75
|
+
if /i "!do_publish!"=="y" (
|
|
76
|
+
echo %BLUE%Publishing to NPM...%RESET%
|
|
77
|
+
npm publish --access public
|
|
78
|
+
if errorlevel 1 (
|
|
79
|
+
echo %RED%❌ NPM publish failed!%RESET%
|
|
80
|
+
echo %YELLOW%💡 Tip: Make sure you're logged in with 'npm login'%RESET%
|
|
81
|
+
pause
|
|
82
|
+
exit /b 1
|
|
83
|
+
)
|
|
84
|
+
echo %GREEN%✅ Published to NPM successfully!%RESET%
|
|
85
|
+
) else (
|
|
86
|
+
echo %YELLOW%⏭️ Skipping NPM publish%RESET%
|
|
87
|
+
)
|
|
88
|
+
echo.
|
|
89
|
+
|
|
90
|
+
:: Fertig
|
|
91
|
+
echo.
|
|
92
|
+
echo %GREEN%╔═══════════════════════════════════════════════════════════════╗%RESET%
|
|
93
|
+
echo %GREEN%║ ✨ Deployment Complete! ✨ ║%RESET%
|
|
94
|
+
echo %GREEN%╚═══════════════════════════════════════════════════════════════╝%RESET%
|
|
95
|
+
echo.
|
|
96
|
+
echo %BLUE%Summary:%RESET%
|
|
97
|
+
echo • Build: %GREEN%✓%RESET%
|
|
98
|
+
echo • Git Push: %GREEN%✓%RESET%
|
|
99
|
+
if /i "!do_publish!"=="y" (
|
|
100
|
+
echo • NPM Publish: %GREEN%✓%RESET%
|
|
101
|
+
) else (
|
|
102
|
+
echo • NPM Publish: %YELLOW%Skipped%RESET%
|
|
103
|
+
)
|
|
104
|
+
echo.
|
|
105
|
+
pause
|