@powernukkitx/cli 0.0.3 → 1.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 (82) hide show
  1. package/README.md +203 -177
  2. package/dist/bundle.js +3 -18856
  3. package/dist/cli.js +46 -0
  4. package/dist/commands/backup.d.ts +2 -1
  5. package/dist/commands/backup.js +21 -71
  6. package/dist/commands/cfg.d.ts +2 -0
  7. package/dist/commands/cfg.js +61 -0
  8. package/dist/commands/config.js +52 -105
  9. package/dist/commands/console.d.ts +2 -0
  10. package/dist/commands/console.js +99 -0
  11. package/dist/commands/doctor.d.ts +2 -1
  12. package/dist/commands/doctor.js +87 -108
  13. package/dist/commands/info.d.ts +2 -1
  14. package/dist/commands/info.js +39 -33
  15. package/dist/commands/init.d.ts +2 -4
  16. package/dist/commands/init.js +58 -65
  17. package/dist/commands/lang.d.ts +2 -0
  18. package/dist/commands/lang.js +28 -0
  19. package/dist/commands/logs.d.ts +2 -0
  20. package/dist/commands/logs.js +61 -0
  21. package/dist/commands/menu.js +86 -0
  22. package/dist/commands/plugin/index.d.ts +2 -0
  23. package/dist/commands/plugin/index.js +13 -0
  24. package/dist/commands/plugin/info.d.ts +2 -0
  25. package/dist/commands/plugin/info.js +40 -0
  26. package/dist/commands/plugin/install.d.ts +2 -0
  27. package/dist/commands/plugin/install.js +57 -0
  28. package/dist/commands/plugin/installed.d.ts +2 -0
  29. package/dist/commands/plugin/installed.js +42 -0
  30. package/dist/commands/plugin/list.d.ts +2 -0
  31. package/dist/commands/plugin/list.js +49 -0
  32. package/dist/commands/plugin/remove.d.ts +2 -0
  33. package/dist/commands/plugin/remove.js +45 -0
  34. package/dist/commands/plugin/search.d.ts +2 -0
  35. package/dist/commands/plugin/search.js +12 -0
  36. package/dist/commands/plugin/update.d.ts +2 -0
  37. package/dist/commands/plugin/update.js +53 -0
  38. package/dist/commands/plugin.d.ts +1 -12
  39. package/dist/commands/plugin.js +1 -385
  40. package/dist/commands/start.d.ts +2 -7
  41. package/dist/commands/start.js +61 -94
  42. package/dist/commands/stop.d.ts +2 -0
  43. package/dist/commands/stop.js +27 -0
  44. package/dist/commands/update.d.ts +2 -5
  45. package/dist/commands/update.js +30 -50
  46. package/dist/commands/use.d.ts +2 -0
  47. package/dist/commands/use.js +40 -0
  48. package/dist/core/config.d.ts +13 -0
  49. package/dist/core/config.js +31 -0
  50. package/dist/core/network.d.ts +13 -0
  51. package/dist/core/network.js +139 -0
  52. package/dist/core/output.d.ts +33 -0
  53. package/dist/core/output.js +75 -0
  54. package/dist/core/process.d.ts +10 -0
  55. package/dist/core/process.js +53 -0
  56. package/dist/i18n/en.json +174 -0
  57. package/dist/i18n/fr.json +174 -0
  58. package/dist/i18n/index.js +58 -0
  59. package/dist/index.d.ts +0 -1
  60. package/dist/index.js +1 -260
  61. package/dist/infra/http.js +121 -0
  62. package/dist/infra/paths.js +20 -0
  63. package/dist/infra/store.js +27 -0
  64. package/dist/lang/en.json +116 -148
  65. package/dist/lang/fr.json +115 -147
  66. package/dist/main.d.ts +2 -0
  67. package/dist/main.js +28 -0
  68. package/dist/services/backup.js +40 -0
  69. package/dist/services/plugins.js +111 -0
  70. package/dist/services/process.js +43 -0
  71. package/dist/services/release.js +38 -0
  72. package/dist/services/server.js +89 -0
  73. package/dist/ui/output.js +71 -0
  74. package/dist/ui/prompts.js +30 -0
  75. package/dist/ui/theme.js +18 -0
  76. package/dist/utils/api.d.ts +3 -12
  77. package/dist/utils/api.js +7 -57
  78. package/dist/utils/github.d.ts +3 -10
  79. package/dist/utils/github.js +27 -154
  80. package/dist/utils/server.d.ts +2 -2
  81. package/dist/utils/server.js +17 -24
  82. package/package.json +15 -32
package/dist/lang/en.json CHANGED
@@ -1,178 +1,146 @@
1
1
  {
2
- "cli": {
3
- "description": "PowerNukkitX CLI — Manage your Minecraft Bedrock servers with style",
4
- "version": "0.2.0",
5
- "docLink": "Documentation"
6
- },
2
+ "cli": { "description": "PowerNukkitX CLI — Manage your Minecraft Bedrock servers" },
7
3
  "init": {
8
- "title": "Create a new PowerNukkitX server",
9
- "alreadyExists": "A PNX server already exists in this directory.",
10
- "fetchingInfo": "Fetching latest release information...",
4
+ "title": "Create a PowerNukkitX server",
5
+ "promptDir": "Server directory?",
6
+ "alreadyExists": "A server already exists here",
7
+ "fetchingInfo": "Fetching latest version...",
11
8
  "latestVersion": "Latest version",
12
- "downloading": "Downloading powernukkitx.jar",
13
- "downloaded": "powernukkitx.jar downloaded ({0} MB)",
14
- "creatingConfig": "Creating server configuration...",
15
- "configCreated": "Configuration created successfully",
16
- "success": "PNX Server is ready!",
17
- "nextSteps": "Next steps",
18
- "serverDir": "Directory",
19
- "serverId": "Server ID",
20
- "nextStepCd": "Navigate to the server directory",
21
- "nextStepStart": "Start the server",
22
- "nextStepPlugins": "Browse available plugins",
23
- "nextStepInstall": "Install a plugin",
24
- "promptDir": "Where should the server be created?",
9
+ "downloading": "Downloading",
10
+ "downloaded": "Downloaded ({0} MB)",
25
11
  "downloadingScripts": "Downloading start scripts...",
26
12
  "scriptsDownloaded": "Start scripts downloaded",
27
- "launchPrompt": "Start the server now?",
28
- "creating": "Creating server...",
29
- "done": "Server created successfully"
13
+ "success": "Server ready!",
14
+ "launchPrompt": "Start the server now?"
30
15
  },
31
16
  "start": {
32
- "title": "Starting PowerNukkitX server",
33
- "jarNotFound": "No PowerNukkitX server found here.",
34
- "createPrompt": "Create a new server now?",
35
- "checkingJava": "Checking Java installation...",
36
- "javaNotFound": "Java 21 or higher is required. Download from https://adoptium.net/",
37
- "javaVersion": "Java {0} detected",
38
- "generatedCommand": "Generated start command:",
39
- "starting": "Starting server...",
40
- "stopped": "Server stopped with code {0}",
41
- "restarting": "Restarting server..."
17
+ "title": "Start server",
18
+ "notFound": "No server found here",
19
+ "createPrompt": "Create a server now?",
20
+ "checkingJava": "Checking Java...",
21
+ "javaOk": "Java {0} detected",
22
+ "javaNotFound": "Java 21+ required — https://adoptium.net/",
23
+ "starting": "Starting...",
24
+ "running": "Server running (PID {0})",
25
+ "stopped": "Server stopped (code {0})",
26
+ "restarting": "Restarting..."
42
27
  },
43
- "plugin": {
44
- "titleList": "Available plugin catalog",
45
- "titleInstall": "Installing plugins",
46
- "titleInstalled": "Installed plugins",
47
- "titleRemove": "Removing plugins",
48
- "titleInfo": "Plugin information",
49
- "titleSearch": "Search plugins",
50
- "titleUpdate": "Update plugins",
51
- "selectPrompt": "Select plugins to install:",
52
- "removePrompt": "Select plugins to remove:",
53
- "installSuccess": "{0} installed successfully",
54
- "notFound": "Plugin \"{0}\" not found",
55
- "installedCount": "{0} plugin(s) installed",
56
- "restartHint": "Restart the server to load the plugins",
57
- "noPlugins": "No plugins installed",
58
- "noPluginsDir": "No plugins/ directory found",
59
- "removeConfirm": "Remove {0}?",
60
- "removeCancelled": "Removal cancelled for {0}",
61
- "removed": "{0} removed",
62
- "installing": "Searching for {0} by {1}...",
63
- "urlInstall": "Installing from URL: {0}",
64
- "urlInvalid": "URL must point to a .jar file",
65
- "catalogEmpty": "No plugins in catalog",
66
- "catalogHint": "Use 'pnx plugin list' to browse the catalog",
67
- "searching": "Searching for releases...",
68
- "searchPrompt": "Search plugins:",
69
- "searchCancelled": "Search cancelled.",
70
- "searchEmpty": "No plugins matching \"{0}\"",
71
- "searchResults": "{0} plugin(s) matching \"{1}\"",
72
- "fetching": "Fetching plugins from marketplace...",
73
- "fetchingInfo": "Getting info for {0}...",
74
- "fetchError": "Failed to fetch plugins: {0}",
75
- "showingCount": "Showing {0} of {1} plugins",
76
- "infoPrompt": "Enter plugin slug:",
77
- "infoCancelled": "Info cancelled.",
78
- "selectVersion": "Select a version:",
79
- "releases": "Releases",
80
- "moreReleases": "... and {0} more releases",
81
- "noRelease": "No release found for {0}",
82
- "noFile": "No file found for {0} v{1}",
83
- "installError": "Failed to install {0}",
84
- "noSelection": "No plugins selected.",
85
- "updateSelect": "Select plugins to update:",
86
- "checkingUpdates": "Checking updates for",
87
- "alreadyLatest": "{0} is already up-to-date (v{1})",
88
- "updateDone": "{0} updated to v{1}",
89
- "updateError": "Failed to update {0}"
28
+ "stop": {
29
+ "title": "Stop server",
30
+ "notRunning": "No server running",
31
+ "killing": "Stopping server (PID {0})...",
32
+ "done": "Server stopped"
90
33
  },
91
34
  "update": {
92
- "title": "Updating PowerNukkitX server",
35
+ "title": "Update PowerNukkitX",
93
36
  "checking": "Checking for updates...",
94
- "notFound": "No PowerNukkitX server found here.",
37
+ "notFound": "No server found",
95
38
  "available": "New version available: {0}",
96
- "currentLatest": "You already have the latest version ({0})",
39
+ "upToDate": "Already up to date ({0})",
97
40
  "saving": "Backing up old version...",
98
- "saved": "Old version backed up as powernukkitx.jar.old",
99
- "downloading": "Downloading new version...",
100
- "done": "Update completed!",
101
- "restartHint": "Restart your server to apply changes",
102
- "deleteOldHint": "You can delete powernukkitx.jar.old once everything works"
41
+ "downloading": "Downloading...",
42
+ "done": "Update complete!",
43
+ "restart": "Restart the server to apply changes"
44
+ },
45
+ "doctor": {
46
+ "title": "Server diagnostics",
47
+ "checking": "Running diagnostics...",
48
+ "java": "Java",
49
+ "server": "Server",
50
+ "system": "System",
51
+ "plugins": "Plugins & Worlds",
52
+ "network": "Network",
53
+ "done": "Diagnostics complete"
103
54
  },
104
55
  "info": {
105
- "title": "Server information",
56
+ "title": "Server info",
57
+ "server": "Server",
58
+ "system": "System",
59
+ "status": "Status",
106
60
  "installed": "Installed",
107
61
  "notInstalled": "Not installed",
108
- "plugins": "plugin(s) installed",
109
- "worlds": "world(s) found",
110
- "ready": "Server ready to start with 'pnx start'",
111
- "notInitialized": "Server not initialized. Run 'pnx init'",
112
- "status": "Server PNX",
113
- "serverDir": "Server path",
114
- "javaVersion": "Java version"
115
- },
116
- "doctor": {
117
- "title": "Server diagnostic",
118
- "checkingJava": "Checking Java...",
119
- "javaOk": "Java {0}",
120
- "checkingServer": "Detecting server...",
121
- "serverFound": "Server found",
122
- "serverNotFound": "No server detected. Run 'pnx init' first.",
123
- "checkingJar": "Checking JAR file...",
124
- "jarOk": "powernukkitx.jar ({0} MB)",
125
- "jarMissing": "powernukkitx.jar is missing",
126
- "checkingConfig": "Checking config file...",
127
- "configFound": "pnx.yml found",
128
- "configLegacy": "Using server.properties (consider migrating to pnx.yml)",
129
- "configMissing": "No config file found — run the server once to generate it",
130
- "checkingPlugins": "Checking plugins...",
131
- "pluginsOk": "{0} plugin(s) found",
132
- "pluginsMissing": "No plugins/ directory",
133
- "pluginCheckHint": "Use '{0}' to check for updates",
134
- "checkingWorlds": "Checking worlds...",
135
- "worldsFound": "{0} world(s) found",
136
- "worldsMissing": "No worlds/ directory",
137
- "checkingPort": "Checking port 19132...",
138
- "portFree": "Port 19132 is available",
139
- "portInUse": "Port {0} is already in use",
140
- "done": "Diagnostic complete"
62
+ "path": "Path",
63
+ "plugins": "Plugins",
64
+ "worlds": "Worlds",
65
+ "ram": "Free RAM",
66
+ "ready": "Ready to start with 'pnx start'",
67
+ "notReady": "Run 'pnx init' to create a server"
141
68
  },
142
69
  "backup": {
143
- "title": "Create backup",
144
- "selectServer": "Which server to backup?",
145
- "noServer": "No server detected. Run 'pnx init' first.",
146
- "backupCurrent": "Backup current directory? {0}",
147
- "cancelled": "Backup cancelled.",
70
+ "title": "Backup",
71
+ "noServer": "No server detected",
148
72
  "collecting": "Collecting files...",
149
- "estimatedSize": "Estimated size: {0}",
73
+ "size": "Estimated size: {0}",
150
74
  "copying": "Copying files...",
151
75
  "done": "Backup created: {0} ({1})"
152
76
  },
153
77
  "config": {
154
- "title": "Server configuration",
155
- "noServer": "No server detected.",
156
- "hintInit": "Run 'pnx init' first to create a server.",
157
- "notFound": "No config file found (pnx.yml or server.properties).",
158
- "hintGenerate": "Run the server once to generate the config file.",
159
- "editHint": "Edit {0} to change these values."
160
- },
161
- "updater": {
162
- "coreUpdate": "A new PowerNukkitX version is available:",
163
- "pluginUpdate": "Update available for {0}: {1} {2}"
78
+ "title": "Configuration",
79
+ "noServer": "No server detected",
80
+ "notFound": "No config file found",
81
+ "editHint": "Edit {0} to change these values"
164
82
  },
165
- "errors": {
166
- "timeout": "Request timed out",
167
- "network": "Network error: {0}",
168
- "unknown": "An unknown error occurred"
83
+ "use": {
84
+ "title": "Default server",
85
+ "prompt": "Select a server:",
86
+ "pathPrompt": "Server path:",
87
+ "set": "Default server set: {0}",
88
+ "cleared": "Default server cleared",
89
+ "notFound": "powernukkitx.jar not found in: {0}"
169
90
  },
170
91
  "lang": {
171
- "prompt": "Select your language / Choisissez votre langue",
172
- "detected": "Language set to {0}",
173
- "menu": "What would you like to do?",
174
- "pluginMenu": "Plugin management",
92
+ "title": "Language",
93
+ "prompt": "Choose your language",
94
+ "set": "Language set to {0}",
95
+ "menu": "What do you want to do?",
175
96
  "exit": "Exit",
176
- "back": "Back to main menu"
97
+ "back": "Back"
98
+ },
99
+ "logs": {
100
+ "title": "Server logs",
101
+ "noServer": "No server detected",
102
+ "noLogs": "No log files found",
103
+ "watching": "Reading {0}",
104
+ "liveMode": "Live mode (Ctrl+C to quit)"
105
+ },
106
+ "console": {
107
+ "title": "Server console",
108
+ "noServer": "No server running",
109
+ "rconDisabled": "RCON disabled in server.properties",
110
+ "rconEnable": "Enable enable-rcon=true in server.properties",
111
+ "connecting": "Connecting via RCON...",
112
+ "connected": "Connected — type commands (exit to quit)",
113
+ "prompt": "> "
114
+ },
115
+ "plugin": {
116
+ "titleList": "Plugin catalog",
117
+ "titleInstall": "Install plugins",
118
+ "titleInstalled": "Installed plugins",
119
+ "titleRemove": "Remove plugins",
120
+ "titleInfo": "Plugin info",
121
+ "titleSearch": "Search plugins",
122
+ "titleUpdate": "Update plugins",
123
+ "fetching": "Fetching from marketplace...",
124
+ "fetchError": "Error: {0}",
125
+ "notFound": "Plugin not found: {0}",
126
+ "noPlugins": "No plugins installed",
127
+ "noPluginsDir": "No plugins/ directory",
128
+ "selectInstall": "Select plugins to install:",
129
+ "selectRemove": "Select plugins to remove:",
130
+ "selectUpdate": "Select plugins to update:",
131
+ "installSuccess": "{0} installed",
132
+ "installError": "Error installing {0}",
133
+ "removeConfirm": "Remove {0}?",
134
+ "removed": "{0} removed",
135
+ "alreadyLatest": "{0} is already up to date (v{1})",
136
+ "updated": "{0} updated to v{1}",
137
+ "noRelease": "No release available for {0}",
138
+ "urlInvalid": "URL must point to a .jar file",
139
+ "restartHint": "Restart the server to load plugins",
140
+ "count": "{0} plugin(s)"
141
+ },
142
+ "errors": {
143
+ "timeout": "Request timed out",
144
+ "network": "Network error: {0}"
177
145
  }
178
146
  }
package/dist/lang/fr.json CHANGED
@@ -1,178 +1,146 @@
1
1
  {
2
- "cli": {
3
- "description": "PowerNukkitX CLI — Gérez vos serveurs Minecraft Bedrock avec style",
4
- "version": "0.2.0",
5
- "docLink": "Documentation"
6
- },
2
+ "cli": { "description": "PowerNukkitX CLI — Gérez vos serveurs Minecraft Bedrock" },
7
3
  "init": {
8
- "title": "Création d'un nouveau serveur PowerNukkitX",
9
- "alreadyExists": "Un serveur PNX existe déjà dans ce répertoire.",
10
- "fetchingInfo": "Récupération des informations de la dernière version...",
4
+ "title": "Créer un serveur PowerNukkitX",
5
+ "promptDir": "Répertoire du serveur ?",
6
+ "alreadyExists": "Un serveur existe déjà ici",
7
+ "fetchingInfo": "Récupération de la dernière version...",
11
8
  "latestVersion": "Dernière version",
12
- "downloading": "Téléchargement de powernukkitx.jar",
13
- "downloaded": "powernukkitx.jar téléchargé ({0} Mo)",
14
- "creatingConfig": "Création de la configuration du serveur...",
15
- "configCreated": "Configuration créée avec succès",
16
- "success": "Serveur PNX prêt !",
17
- "nextSteps": "Prochaines étapes",
18
- "serverDir": "Répertoire",
19
- "serverId": "ID du serveur",
20
- "nextStepCd": "Aller dans le répertoire du serveur",
21
- "nextStepStart": "Démarrer le serveur",
22
- "nextStepPlugins": "Voir les plugins disponibles",
23
- "nextStepInstall": "Installer un plugin",
24
- "promptDir": "Où créer le serveur ?",
25
- "downloadingScripts": "Téléchargement des scripts de démarrage...",
26
- "scriptsDownloaded": "Scripts de démarrage téléchargés",
27
- "launchPrompt": "Lancer le serveur maintenant ?",
28
- "creating": "Création du serveur...",
29
- "done": "Serveur créé avec succès"
9
+ "downloading": "Téléchargement",
10
+ "downloaded": "Téléchargé ({0} Mo)",
11
+ "downloadingScripts": "Téléchargement des scripts...",
12
+ "scriptsDownloaded": "Scripts téléchargés",
13
+ "success": "Serveur prêt !",
14
+ "launchPrompt": "Démarrer le serveur maintenant ?"
30
15
  },
31
16
  "start": {
32
- "title": "Démarrage du serveur PowerNukkitX",
33
- "jarNotFound": "Aucun serveur PowerNukkitX trouvé ici.",
34
- "createPrompt": "Créer un nouveau serveur maintenant ?",
17
+ "title": "Démarrage du serveur",
18
+ "notFound": "Aucun serveur trouvé ici",
19
+ "createPrompt": "Créer un serveur maintenant ?",
35
20
  "checkingJava": "Vérification de Java...",
36
- "javaNotFound": "Java 21 ou supérieur est requis. Téléchargez depuis https://adoptium.net/",
37
- "javaVersion": "Java {0} détecté",
38
- "generatedCommand": "Commande de démarrage générée :",
39
- "starting": "Démarrage du serveur...",
40
- "stopped": "Serveur arrêté avec le code {0}",
41
- "restarting": "Redémarrage du serveur..."
21
+ "javaOk": "Java {0} détecté",
22
+ "javaNotFound": "Java 21+ requis — https://adoptium.net/",
23
+ "starting": "Démarrage...",
24
+ "running": "Serveur en cours d'exécution (PID {0})",
25
+ "stopped": "Serveur arrêté (code {0})",
26
+ "restarting": "Redémarrage..."
42
27
  },
43
- "plugin": {
44
- "titleList": "Catalogue de plugins disponibles",
45
- "titleInstall": "Installation de plugins",
46
- "titleInstalled": "Plugins installés",
47
- "titleRemove": "Suppression de plugins",
48
- "titleInfo": "Informations du plugin",
49
- "titleSearch": "Rechercher des plugins",
50
- "titleUpdate": "Mettre à jour les plugins",
51
- "selectPrompt": "Sélectionnez les plugins à installer :",
52
- "removePrompt": "Sélectionnez les plugins à supprimer :",
53
- "installSuccess": "{0} installé avec succès",
54
- "notFound": "Plugin \"{0}\" introuvable",
55
- "installedCount": "{0} plugin(s) installé(s)",
56
- "restartHint": "Redémarrez le serveur pour charger les plugins",
57
- "noPlugins": "Aucun plugin installé",
58
- "noPluginsDir": "Aucun répertoire plugins/ trouvé",
59
- "removeConfirm": "Supprimer {0} ?",
60
- "removeCancelled": "Suppression annulée pour {0}",
61
- "removed": "{0} supprimé",
62
- "installing": "Recherche de {0} par {1}...",
63
- "urlInstall": "Installation depuis l'URL : {0}",
64
- "urlInvalid": "L'URL doit pointer vers un fichier .jar",
65
- "catalogEmpty": "Aucun plugin dans le catalogue",
66
- "catalogHint": "Utilisez 'pnx plugin list' pour voir le catalogue",
67
- "searching": "Recherche des releases...",
68
- "searchPrompt": "Rechercher des plugins :",
69
- "searchCancelled": "Recherche annulée.",
70
- "searchEmpty": "Aucun plugin correspondant à \"{0}\"",
71
- "searchResults": "{0} plugin(s) correspondant à \"{1}\"",
72
- "fetching": "Récupération des plugins depuis la marketplace...",
73
- "fetchingInfo": "Récupération des infos pour {0}...",
74
- "fetchError": "Échec de récupération des plugins : {0}",
75
- "showingCount": "Affichage de {0} sur {1} plugins",
76
- "infoPrompt": "Entrez le slug du plugin :",
77
- "infoCancelled": "Infos annulées.",
78
- "selectVersion": "Sélectionnez une version :",
79
- "releases": "Versions",
80
- "moreReleases": "... et {0} versions supplémentaires",
81
- "noRelease": "Aucune version trouvée pour {0}",
82
- "noFile": "Aucun fichier trouvé pour {0} v{1}",
83
- "installError": "Échec de l'installation de {0}",
84
- "noSelection": "Aucun plugin sélectionné.",
85
- "updateSelect": "Sélectionnez les plugins à mettre à jour :",
86
- "checkingUpdates": "Vérification des mises à jour pour",
87
- "alreadyLatest": "{0} est déjà à jour (v{1})",
88
- "updateDone": "{0} mis à jour vers v{1}",
89
- "updateError": "Échec de la mise à jour de {0}"
28
+ "stop": {
29
+ "title": "Arrêt du serveur",
30
+ "notRunning": "Aucun serveur en cours d'exécution",
31
+ "killing": "Arrêt du serveur (PID {0})...",
32
+ "done": "Serveur arrêté"
90
33
  },
91
34
  "update": {
92
- "title": "Mise à jour du serveur PowerNukkitX",
35
+ "title": "Mise à jour PowerNukkitX",
93
36
  "checking": "Vérification des mises à jour...",
94
- "notFound": "Aucun serveur PowerNukkitX trouvé ici.",
37
+ "notFound": "Aucun serveur trouvé",
95
38
  "available": "Nouvelle version disponible : {0}",
96
- "currentLatest": "Vous avez déjà la dernière version ({0})",
39
+ "upToDate": "Déjà à jour ({0})",
97
40
  "saving": "Sauvegarde de l'ancienne version...",
98
- "saved": "Ancienne version sauvegardée (powernukkitx.jar.old)",
99
- "downloading": "Téléchargement de la nouvelle version...",
41
+ "downloading": "Téléchargement...",
100
42
  "done": "Mise à jour terminée !",
101
- "restartHint": "Redémarrez votre serveur pour appliquer les changements",
102
- "deleteOldHint": "Vous pouvez supprimer powernukkitx.jar.old une fois que tout fonctionne"
43
+ "restart": "Redémarrez le serveur pour appliquer les changements"
44
+ },
45
+ "doctor": {
46
+ "title": "Diagnostic du serveur",
47
+ "checking": "Analyse en cours...",
48
+ "java": "Java",
49
+ "server": "Serveur",
50
+ "system": "Système",
51
+ "plugins": "Plugins & Mondes",
52
+ "network": "Réseau",
53
+ "done": "Diagnostic terminé"
103
54
  },
104
55
  "info": {
105
56
  "title": "Informations du serveur",
57
+ "server": "Serveur",
58
+ "system": "Système",
59
+ "status": "Statut",
106
60
  "installed": "Installé",
107
61
  "notInstalled": "Non installé",
108
- "plugins": "plugin(s) installé(s)",
109
- "worlds": "monde(s) trouvé(s)",
110
- "ready": "Serveur prêt à démarrer avec 'pnx start'",
111
- "notInitialized": "Serveur non initialisé. Exécutez 'pnx init'",
112
- "status": "Serveur PNX",
113
- "serverDir": "Chemin du serveur",
114
- "javaVersion": "Version Java"
115
- },
116
- "doctor": {
117
- "title": "Diagnostic du serveur",
118
- "checkingJava": "Vérification de Java...",
119
- "javaOk": "Java {0}",
120
- "checkingServer": "Détection du serveur...",
121
- "serverFound": "Serveur trouvé",
122
- "serverNotFound": "Aucun serveur détecté. Exécutez 'pnx init' d'abord.",
123
- "checkingJar": "Vérification du JAR...",
124
- "jarOk": "powernukkitx.jar ({0} Mo)",
125
- "jarMissing": "powernukkitx.jar est manquant",
126
- "checkingConfig": "Vérification du fichier de config...",
127
- "configFound": "pnx.yml trouvé",
128
- "configLegacy": "Utilise server.properties (envisagez de migrer vers pnx.yml)",
129
- "configMissing": "Aucun fichier de config trouvé — lancez le serveur pour le générer",
130
- "checkingPlugins": "Vérification des plugins...",
131
- "pluginsOk": "{0} plugin(s) trouvé(s)",
132
- "pluginsMissing": "Aucun répertoire plugins/",
133
- "pluginCheckHint": "Utilisez '{0}' pour vérifier les mises à jour",
134
- "checkingWorlds": "Vérification des mondes...",
135
- "worldsFound": "{0} monde(s) trouvé(s)",
136
- "worldsMissing": "Aucun répertoire worlds/",
137
- "checkingPort": "Vérification du port 19132...",
138
- "portFree": "Le port 19132 est disponible",
139
- "portInUse": "Le port {0} est déjà utilisé",
140
- "done": "Diagnostic terminé"
62
+ "path": "Chemin",
63
+ "plugins": "Plugins",
64
+ "worlds": "Mondes",
65
+ "ram": "RAM libre",
66
+ "ready": "Prêt à démarrer avec 'pnx start'",
67
+ "notReady": "Exécutez 'pnx init' pour créer un serveur"
141
68
  },
142
69
  "backup": {
143
- "title": "Créer une sauvegarde",
144
- "selectServer": "Quel serveur sauvegarder ?",
145
- "noServer": "Aucun serveur détecté. Exécutez 'pnx init' d'abord.",
146
- "backupCurrent": "Sauvegarder le répertoire actuel ? {0}",
147
- "cancelled": "Sauvegarde annulée.",
70
+ "title": "Sauvegarde",
71
+ "noServer": "Aucun serveur détecté",
148
72
  "collecting": "Collecte des fichiers...",
149
- "estimatedSize": "Taille estimée : {0}",
150
- "copying": "Copie des fichiers...",
73
+ "size": "Taille estimée : {0}",
74
+ "copying": "Copie en cours...",
151
75
  "done": "Sauvegarde créée : {0} ({1})"
152
76
  },
153
77
  "config": {
154
- "title": "Configuration du serveur",
155
- "noServer": "Aucun serveur détecté.",
156
- "hintInit": "Exécutez 'pnx init' d'abord pour créer un serveur.",
157
- "notFound": "Aucun fichier de config trouvé (pnx.yml ou server.properties).",
158
- "hintGenerate": "Lancez le serveur une fois pour générer le fichier de config.",
159
- "editHint": "Modifiez {0} pour changer ces valeurs."
160
- },
161
- "updater": {
162
- "coreUpdate": "Une nouvelle version de PowerNukkitX est disponible :",
163
- "pluginUpdate": "Mise à jour disponible pour {0} : {1} {2}"
78
+ "title": "Configuration",
79
+ "noServer": "Aucun serveur détecté",
80
+ "notFound": "Aucun fichier de config trouvé",
81
+ "editHint": "Modifiez {0} pour changer ces valeurs"
164
82
  },
165
- "errors": {
166
- "timeout": "La requête a expiré",
167
- "network": "Erreur réseau : {0}",
168
- "unknown": "Une erreur inconnue est survenue"
83
+ "use": {
84
+ "title": "Serveur par défaut",
85
+ "prompt": "Sélectionnez un serveur :",
86
+ "pathPrompt": "Chemin du serveur :",
87
+ "set": "Serveur par défaut défini : {0}",
88
+ "cleared": "Serveur par défaut supprimé",
89
+ "notFound": "powernukkitx.jar introuvable dans : {0}"
169
90
  },
170
91
  "lang": {
171
- "prompt": "Select your language / Choisissez votre langue",
172
- "detected": "Langue définie sur {0}",
92
+ "title": "Langue",
93
+ "prompt": "Choisissez votre langue",
94
+ "set": "Langue définie sur {0}",
173
95
  "menu": "Que voulez-vous faire ?",
174
- "pluginMenu": "Gestion des plugins",
175
96
  "exit": "Quitter",
176
- "back": "Retour au menu principal"
97
+ "back": "Retour"
98
+ },
99
+ "logs": {
100
+ "title": "Logs du serveur",
101
+ "noServer": "Aucun serveur détecté",
102
+ "noLogs": "Aucun fichier de logs trouvé",
103
+ "watching": "Lecture de {0}",
104
+ "liveMode": "Mode live (Ctrl+C pour quitter)"
105
+ },
106
+ "console": {
107
+ "title": "Console du serveur",
108
+ "noServer": "Aucun serveur en cours d'exécution",
109
+ "rconDisabled": "RCON désactivé dans server.properties",
110
+ "rconEnable": "Activez enable-rcon=true dans server.properties",
111
+ "connecting": "Connexion RCON...",
112
+ "connected": "Connecté — tapez des commandes (exit pour quitter)",
113
+ "prompt": "> "
114
+ },
115
+ "plugin": {
116
+ "titleList": "Catalogue de plugins",
117
+ "titleInstall": "Installation de plugins",
118
+ "titleInstalled": "Plugins installés",
119
+ "titleRemove": "Suppression de plugins",
120
+ "titleInfo": "Informations du plugin",
121
+ "titleSearch": "Recherche de plugins",
122
+ "titleUpdate": "Mise à jour des plugins",
123
+ "fetching": "Récupération depuis la marketplace...",
124
+ "fetchError": "Erreur : {0}",
125
+ "notFound": "Plugin introuvable : {0}",
126
+ "noPlugins": "Aucun plugin installé",
127
+ "noPluginsDir": "Aucun répertoire plugins/",
128
+ "selectInstall": "Sélectionnez les plugins à installer :",
129
+ "selectRemove": "Sélectionnez les plugins à supprimer :",
130
+ "selectUpdate": "Sélectionnez les plugins à mettre à jour :",
131
+ "installSuccess": "{0} installé",
132
+ "installError": "Erreur lors de l'installation de {0}",
133
+ "removeConfirm": "Supprimer {0} ?",
134
+ "removed": "{0} supprimé",
135
+ "alreadyLatest": "{0} est déjà à jour (v{1})",
136
+ "updated": "{0} mis à jour vers v{1}",
137
+ "noRelease": "Aucune version disponible pour {0}",
138
+ "urlInvalid": "L'URL doit pointer vers un .jar",
139
+ "restartHint": "Redémarrez le serveur pour charger les plugins",
140
+ "count": "{0} plugin(s)"
141
+ },
142
+ "errors": {
143
+ "timeout": "Délai dépassé",
144
+ "network": "Erreur réseau : {0}"
177
145
  }
178
146
  }
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/main.js ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ import { defineCommand, runMain } from 'citty';
3
+ import { initLanguage } from './lang/index.js';
4
+ // Init language before anything
5
+ initLanguage();
6
+ const main = defineCommand({
7
+ meta: {
8
+ name: 'pnx',
9
+ version: '1.0.0',
10
+ description: 'PowerNukkitX CLI — Manage your Minecraft Bedrock servers',
11
+ },
12
+ subCommands: {
13
+ init: () => import('./commands/init.js').then(m => m.initCmd),
14
+ start: () => import('./commands/start.js').then(m => m.startCmd),
15
+ stop: () => import('./commands/stop.js').then(m => m.stopCmd),
16
+ update: () => import('./commands/update.js').then(m => m.updateCmd),
17
+ info: () => import('./commands/info.js').then(m => m.infoCmd),
18
+ doctor: () => import('./commands/doctor.js').then(m => m.doctorCmd),
19
+ backup: () => import('./commands/backup.js').then(m => m.backupCmd),
20
+ config: () => import('./commands/cfg.js').then(m => m.configCmd),
21
+ use: () => import('./commands/use.js').then(m => m.useCmd),
22
+ lang: () => import('./commands/lang.js').then(m => m.langCmd),
23
+ logs: () => import('./commands/logs.js').then(m => m.logsCmd),
24
+ console: () => import('./commands/console.js').then(m => m.consoleCmd),
25
+ plugin: () => import('./commands/plugin/index.js').then(m => m.pluginCmd),
26
+ },
27
+ });
28
+ runMain(main);