@powernukkitx/cli 0.0.3 → 1.0.1
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/LICENSE +21 -0
- package/README.md +110 -101
- package/dist/cli.js +34 -0
- package/dist/commands/backup.d.ts +2 -1
- package/dist/commands/backup.js +23 -74
- package/dist/commands/config.d.ts +1 -1
- package/dist/commands/config.js +60 -114
- package/dist/commands/console.d.ts +2 -0
- package/dist/commands/console.js +98 -0
- package/dist/commands/doctor.d.ts +2 -1
- package/dist/commands/doctor.js +97 -119
- package/dist/commands/info.d.ts +2 -1
- package/dist/commands/info.js +41 -36
- package/dist/commands/init.d.ts +2 -4
- package/dist/commands/init.js +87 -73
- package/dist/commands/install.js +45 -0
- package/dist/commands/logs.d.ts +2 -0
- package/dist/commands/logs.js +60 -0
- package/dist/commands/menu.js +94 -0
- package/dist/commands/plugin/index.d.ts +2 -0
- package/dist/commands/plugin/index.js +13 -0
- package/dist/commands/plugin/info.d.ts +2 -0
- package/dist/commands/plugin/info.js +39 -0
- package/dist/commands/plugin/install.d.ts +2 -0
- package/dist/commands/plugin/install.js +56 -0
- package/dist/commands/plugin/installed.d.ts +2 -0
- package/dist/commands/plugin/installed.js +41 -0
- package/dist/commands/plugin/list.d.ts +2 -0
- package/dist/commands/plugin/list.js +47 -0
- package/dist/commands/plugin/remove.d.ts +2 -0
- package/dist/commands/plugin/remove.js +44 -0
- package/dist/commands/plugin/search.d.ts +2 -0
- package/dist/commands/plugin/search.js +11 -0
- package/dist/commands/plugin/update.d.ts +2 -0
- package/dist/commands/plugin/update.js +52 -0
- package/dist/commands/start.d.ts +2 -7
- package/dist/commands/start.js +74 -108
- package/dist/commands/stop.d.ts +2 -0
- package/dist/commands/stop.js +26 -0
- package/dist/commands/update.d.ts +2 -5
- package/dist/commands/update.js +34 -55
- package/dist/commands/use.d.ts +2 -0
- package/dist/commands/use.js +39 -0
- package/dist/infra/http.js +119 -0
- package/dist/infra/paths.js +15 -0
- package/dist/infra/store.js +24 -0
- package/dist/services/backup.js +34 -0
- package/dist/services/plugins.js +139 -0
- package/dist/services/process.js +41 -0
- package/dist/services/release.js +51 -0
- package/dist/services/server.js +81 -0
- package/dist/ui/output.js +67 -0
- package/dist/ui/prompts.js +26 -0
- package/dist/ui/theme.js +16 -0
- package/package.json +44 -63
- package/dist/bundle.js +0 -18871
- package/dist/commands/plugin.d.ts +0 -12
- package/dist/commands/plugin.js +0 -385
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -260
- package/dist/lang/en.json +0 -178
- package/dist/lang/fr.json +0 -178
- package/dist/lang/index.d.ts +0 -7
- package/dist/lang/index.js +0 -83
- package/dist/plugins.json +0 -66
- package/dist/types.d.ts +0 -61
- package/dist/types.js +0 -1
- package/dist/utils/api.d.ts +0 -18
- package/dist/utils/api.js +0 -74
- package/dist/utils/github.d.ts +0 -27
- package/dist/utils/github.js +0 -187
- package/dist/utils/logger.d.ts +0 -15
- package/dist/utils/logger.js +0 -72
- package/dist/utils/pause.d.ts +0 -1
- package/dist/utils/pause.js +0 -6
- package/dist/utils/plugins.d.ts +0 -4
- package/dist/utils/plugins.js +0 -34
- package/dist/utils/server.d.ts +0 -3
- package/dist/utils/server.js +0 -39
- package/dist/utils/updater.d.ts +0 -1
- package/dist/utils/updater.js +0 -86
package/dist/lang/en.json
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cli": {
|
|
3
|
-
"description": "PowerNukkitX CLI — Manage your Minecraft Bedrock servers with style",
|
|
4
|
-
"version": "0.2.0",
|
|
5
|
-
"docLink": "Documentation"
|
|
6
|
-
},
|
|
7
|
-
"init": {
|
|
8
|
-
"title": "Create a new PowerNukkitX server",
|
|
9
|
-
"alreadyExists": "A PNX server already exists in this directory.",
|
|
10
|
-
"fetchingInfo": "Fetching latest release information...",
|
|
11
|
-
"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?",
|
|
25
|
-
"downloadingScripts": "Downloading start scripts...",
|
|
26
|
-
"scriptsDownloaded": "Start scripts downloaded",
|
|
27
|
-
"launchPrompt": "Start the server now?",
|
|
28
|
-
"creating": "Creating server...",
|
|
29
|
-
"done": "Server created successfully"
|
|
30
|
-
},
|
|
31
|
-
"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..."
|
|
42
|
-
},
|
|
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}"
|
|
90
|
-
},
|
|
91
|
-
"update": {
|
|
92
|
-
"title": "Updating PowerNukkitX server",
|
|
93
|
-
"checking": "Checking for updates...",
|
|
94
|
-
"notFound": "No PowerNukkitX server found here.",
|
|
95
|
-
"available": "New version available: {0}",
|
|
96
|
-
"currentLatest": "You already have the latest version ({0})",
|
|
97
|
-
"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"
|
|
103
|
-
},
|
|
104
|
-
"info": {
|
|
105
|
-
"title": "Server information",
|
|
106
|
-
"installed": "Installed",
|
|
107
|
-
"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"
|
|
141
|
-
},
|
|
142
|
-
"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.",
|
|
148
|
-
"collecting": "Collecting files...",
|
|
149
|
-
"estimatedSize": "Estimated size: {0}",
|
|
150
|
-
"copying": "Copying files...",
|
|
151
|
-
"done": "Backup created: {0} ({1})"
|
|
152
|
-
},
|
|
153
|
-
"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}"
|
|
164
|
-
},
|
|
165
|
-
"errors": {
|
|
166
|
-
"timeout": "Request timed out",
|
|
167
|
-
"network": "Network error: {0}",
|
|
168
|
-
"unknown": "An unknown error occurred"
|
|
169
|
-
},
|
|
170
|
-
"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",
|
|
175
|
-
"exit": "Exit",
|
|
176
|
-
"back": "Back to main menu"
|
|
177
|
-
}
|
|
178
|
-
}
|
package/dist/lang/fr.json
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cli": {
|
|
3
|
-
"description": "PowerNukkitX CLI — Gérez vos serveurs Minecraft Bedrock avec style",
|
|
4
|
-
"version": "0.2.0",
|
|
5
|
-
"docLink": "Documentation"
|
|
6
|
-
},
|
|
7
|
-
"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...",
|
|
11
|
-
"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"
|
|
30
|
-
},
|
|
31
|
-
"start": {
|
|
32
|
-
"title": "Démarrage du serveur PowerNukkitX",
|
|
33
|
-
"jarNotFound": "Aucun serveur PowerNukkitX trouvé ici.",
|
|
34
|
-
"createPrompt": "Créer un nouveau serveur maintenant ?",
|
|
35
|
-
"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..."
|
|
42
|
-
},
|
|
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}"
|
|
90
|
-
},
|
|
91
|
-
"update": {
|
|
92
|
-
"title": "Mise à jour du serveur PowerNukkitX",
|
|
93
|
-
"checking": "Vérification des mises à jour...",
|
|
94
|
-
"notFound": "Aucun serveur PowerNukkitX trouvé ici.",
|
|
95
|
-
"available": "Nouvelle version disponible : {0}",
|
|
96
|
-
"currentLatest": "Vous avez déjà la dernière version ({0})",
|
|
97
|
-
"saving": "Sauvegarde de l'ancienne version...",
|
|
98
|
-
"saved": "Ancienne version sauvegardée (powernukkitx.jar.old)",
|
|
99
|
-
"downloading": "Téléchargement de la nouvelle version...",
|
|
100
|
-
"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"
|
|
103
|
-
},
|
|
104
|
-
"info": {
|
|
105
|
-
"title": "Informations du serveur",
|
|
106
|
-
"installed": "Installé",
|
|
107
|
-
"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é"
|
|
141
|
-
},
|
|
142
|
-
"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.",
|
|
148
|
-
"collecting": "Collecte des fichiers...",
|
|
149
|
-
"estimatedSize": "Taille estimée : {0}",
|
|
150
|
-
"copying": "Copie des fichiers...",
|
|
151
|
-
"done": "Sauvegarde créée : {0} ({1})"
|
|
152
|
-
},
|
|
153
|
-
"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}"
|
|
164
|
-
},
|
|
165
|
-
"errors": {
|
|
166
|
-
"timeout": "La requête a expiré",
|
|
167
|
-
"network": "Erreur réseau : {0}",
|
|
168
|
-
"unknown": "Une erreur inconnue est survenue"
|
|
169
|
-
},
|
|
170
|
-
"lang": {
|
|
171
|
-
"prompt": "Select your language / Choisissez votre langue",
|
|
172
|
-
"detected": "Langue définie sur {0}",
|
|
173
|
-
"menu": "Que voulez-vous faire ?",
|
|
174
|
-
"pluginMenu": "Gestion des plugins",
|
|
175
|
-
"exit": "Quitter",
|
|
176
|
-
"back": "Retour au menu principal"
|
|
177
|
-
}
|
|
178
|
-
}
|
package/dist/lang/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type LanguageCode = 'en' | 'fr';
|
|
2
|
-
export declare function saveLanguage(code: LanguageCode): void;
|
|
3
|
-
export declare function hasSavedLanguage(): boolean;
|
|
4
|
-
export declare function setLanguage(code: LanguageCode): void;
|
|
5
|
-
export declare function initLanguage(cliLang?: string): LanguageCode;
|
|
6
|
-
export declare function getLanguage(): LanguageCode;
|
|
7
|
-
export declare function t(key: string, ...args: any[]): string;
|
package/dist/lang/index.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import en from './en.json' with { type: 'json' };
|
|
5
|
-
import fr from './fr.json' with { type: 'json' };
|
|
6
|
-
const translations = { en, fr };
|
|
7
|
-
const CONFIG_DIR = join(homedir(), '.pnx-cli');
|
|
8
|
-
const CONFIG_FILE = join(CONFIG_DIR, 'config.json');
|
|
9
|
-
let _code = 'en';
|
|
10
|
-
let _strings = translations.en;
|
|
11
|
-
function detectLanguage() {
|
|
12
|
-
const envLang = process.env.PNX_LANG || process.env.LANG || '';
|
|
13
|
-
if (envLang.startsWith('fr'))
|
|
14
|
-
return 'fr';
|
|
15
|
-
return 'en';
|
|
16
|
-
}
|
|
17
|
-
function loadSavedLanguage() {
|
|
18
|
-
try {
|
|
19
|
-
if (existsSync(CONFIG_FILE)) {
|
|
20
|
-
const raw = readFileSync(CONFIG_FILE, 'utf-8');
|
|
21
|
-
const cfg = JSON.parse(raw);
|
|
22
|
-
if (cfg.lang === 'en' || cfg.lang === 'fr')
|
|
23
|
-
return cfg.lang;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
catch { /* ignore */ }
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
export function saveLanguage(code) {
|
|
30
|
-
try {
|
|
31
|
-
if (!existsSync(CONFIG_DIR))
|
|
32
|
-
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
33
|
-
const existing = existsSync(CONFIG_FILE) ? JSON.parse(readFileSync(CONFIG_FILE, 'utf-8')) : {};
|
|
34
|
-
existing.lang = code;
|
|
35
|
-
writeFileSync(CONFIG_FILE, JSON.stringify(existing, null, 2), 'utf-8');
|
|
36
|
-
}
|
|
37
|
-
catch { /* ignore */ }
|
|
38
|
-
}
|
|
39
|
-
export function hasSavedLanguage() {
|
|
40
|
-
return loadSavedLanguage() !== null;
|
|
41
|
-
}
|
|
42
|
-
export function setLanguage(code) {
|
|
43
|
-
_code = code;
|
|
44
|
-
_strings = translations[code] || translations.en;
|
|
45
|
-
}
|
|
46
|
-
export function initLanguage(cliLang) {
|
|
47
|
-
const code = (cliLang ||
|
|
48
|
-
loadSavedLanguage() ||
|
|
49
|
-
detectLanguage());
|
|
50
|
-
setLanguage(code);
|
|
51
|
-
return _code;
|
|
52
|
-
}
|
|
53
|
-
export function getLanguage() {
|
|
54
|
-
return _code;
|
|
55
|
-
}
|
|
56
|
-
export function t(key, ...args) {
|
|
57
|
-
const keys = key.split('.');
|
|
58
|
-
let value = _strings;
|
|
59
|
-
for (const k of keys) {
|
|
60
|
-
if (value && typeof value === 'object' && k in value) {
|
|
61
|
-
value = value[k];
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
value = undefined;
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (typeof value === 'string') {
|
|
69
|
-
return value.replace(/{(\d+)}/g, (_, i) => String(args[parseInt(i)] ?? `{${i}}`));
|
|
70
|
-
}
|
|
71
|
-
// fallback to English
|
|
72
|
-
let fallback = translations.en;
|
|
73
|
-
for (const k of keys) {
|
|
74
|
-
if (fallback && typeof fallback === 'object' && k in fallback) {
|
|
75
|
-
fallback = fallback[k];
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
fallback = undefined;
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return typeof fallback === 'string' ? fallback : key;
|
|
83
|
-
}
|
package/dist/plugins.json
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"essentials": {
|
|
3
|
-
"name": "EssentialsPNX",
|
|
4
|
-
"description": "Essential commands pour votre serveur PNX (tpa, warp, home, etc.)",
|
|
5
|
-
"author": "PowerNukkitX",
|
|
6
|
-
"source": "github",
|
|
7
|
-
"repo": "PowerNukkitX/EssentialsPNX",
|
|
8
|
-
"asset": "EssentialsPNX.jar"
|
|
9
|
-
},
|
|
10
|
-
"economyapi": {
|
|
11
|
-
"name": "EconomyAPI",
|
|
12
|
-
"description": "Système économique complet pour votre serveur",
|
|
13
|
-
"author": "onebone",
|
|
14
|
-
"source": "github",
|
|
15
|
-
"repo": "onebone/EconomyAPI",
|
|
16
|
-
"asset": "EconomyAPI.jar"
|
|
17
|
-
},
|
|
18
|
-
"lands": {
|
|
19
|
-
"name": "Lands",
|
|
20
|
-
"description": "Système de protection de terrains et claims",
|
|
21
|
-
"author": "Angelic47",
|
|
22
|
-
"source": "github",
|
|
23
|
-
"repo": "Angelic47/Lands",
|
|
24
|
-
"asset": "Lands.jar"
|
|
25
|
-
},
|
|
26
|
-
"worldprotect": {
|
|
27
|
-
"name": "WorldProtect",
|
|
28
|
-
"description": "Protection et gestion avancée des mondes",
|
|
29
|
-
"author": "PowerNukkitX",
|
|
30
|
-
"source": "github",
|
|
31
|
-
"repo": "PowerNukkitX/WorldProtect",
|
|
32
|
-
"asset": "WorldProtect.jar"
|
|
33
|
-
},
|
|
34
|
-
"motd": {
|
|
35
|
-
"name": "MOTD",
|
|
36
|
-
"description": "Personnalisation du message du jour sur votre serveur",
|
|
37
|
-
"author": "PowerNukkitX",
|
|
38
|
-
"source": "github",
|
|
39
|
-
"repo": "PowerNukkitX/MOTD",
|
|
40
|
-
"asset": "MOTD.jar"
|
|
41
|
-
},
|
|
42
|
-
"fawe": {
|
|
43
|
-
"name": "FastAsyncWorldEdit",
|
|
44
|
-
"description": "WorldEdit ultra-rapide pour PNX",
|
|
45
|
-
"author": "IntellectualSites",
|
|
46
|
-
"source": "github",
|
|
47
|
-
"repo": "IntellectualSites/FastAsyncWorldEdit",
|
|
48
|
-
"asset": "FastAsyncWorldEdit-Bukkit.jar"
|
|
49
|
-
},
|
|
50
|
-
"tpsoptimizer": {
|
|
51
|
-
"name": "TPSOptimizer",
|
|
52
|
-
"description": "Optimise les performances et le TPS de votre serveur",
|
|
53
|
-
"author": "Creeperface01",
|
|
54
|
-
"source": "github",
|
|
55
|
-
"repo": "Creeperface01/TPSOptimizer",
|
|
56
|
-
"asset": "TPSOptimizer.jar"
|
|
57
|
-
},
|
|
58
|
-
"pets": {
|
|
59
|
-
"name": "Pets",
|
|
60
|
-
"description": "Ajoute des animaux de compagnie personnalisés",
|
|
61
|
-
"author": "PetteriM1",
|
|
62
|
-
"source": "github",
|
|
63
|
-
"repo": "PetteriM1/Pets",
|
|
64
|
-
"asset": "Pets.jar"
|
|
65
|
-
}
|
|
66
|
-
}
|
package/dist/types.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export interface PluginListItem {
|
|
2
|
-
name: string;
|
|
3
|
-
slug: string;
|
|
4
|
-
description: string;
|
|
5
|
-
tags: string[];
|
|
6
|
-
version: string;
|
|
7
|
-
downloads: number;
|
|
8
|
-
stars: number;
|
|
9
|
-
author: string;
|
|
10
|
-
}
|
|
11
|
-
export interface PluginFile {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
url: string;
|
|
15
|
-
size: number;
|
|
16
|
-
}
|
|
17
|
-
export interface PluginRelease {
|
|
18
|
-
id: string;
|
|
19
|
-
version: string;
|
|
20
|
-
is_stable: boolean;
|
|
21
|
-
created_at: string;
|
|
22
|
-
tag: string;
|
|
23
|
-
files: PluginFile[];
|
|
24
|
-
}
|
|
25
|
-
export interface PluginDetail {
|
|
26
|
-
name: string;
|
|
27
|
-
slug: string;
|
|
28
|
-
description: string;
|
|
29
|
-
long_description: string;
|
|
30
|
-
tags: string[];
|
|
31
|
-
downloads: number;
|
|
32
|
-
stars: number;
|
|
33
|
-
author: string;
|
|
34
|
-
author_id: string;
|
|
35
|
-
icon_url: string | null;
|
|
36
|
-
banner_url: string | null;
|
|
37
|
-
repository_url: string | null;
|
|
38
|
-
documentation_url: string | null;
|
|
39
|
-
license_url: string | null;
|
|
40
|
-
website_url: string | null;
|
|
41
|
-
created_at: string;
|
|
42
|
-
updated_at: string;
|
|
43
|
-
latest_version: string;
|
|
44
|
-
releases: PluginRelease[];
|
|
45
|
-
}
|
|
46
|
-
export interface PluginListResponse {
|
|
47
|
-
plugins: PluginListItem[];
|
|
48
|
-
count: number;
|
|
49
|
-
}
|
|
50
|
-
export interface ServerConfig {
|
|
51
|
-
jarPath: string;
|
|
52
|
-
javaArgs: string[];
|
|
53
|
-
autoRestart: boolean;
|
|
54
|
-
}
|
|
55
|
-
export interface InstalledPlugin {
|
|
56
|
-
slug: string;
|
|
57
|
-
name: string;
|
|
58
|
-
version: string;
|
|
59
|
-
installedAt: string;
|
|
60
|
-
fileName: string;
|
|
61
|
-
}
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/utils/api.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PluginListResponse, PluginDetail } from '../types.js';
|
|
2
|
-
export declare function fetchJSON(url: string): Promise<any>;
|
|
3
|
-
export interface ListPluginsParams {
|
|
4
|
-
sort?: 'newest' | 'updated' | 'stars';
|
|
5
|
-
limit?: number;
|
|
6
|
-
page?: number;
|
|
7
|
-
q?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function fetchPluginsList(params?: ListPluginsParams): Promise<PluginListResponse>;
|
|
10
|
-
export declare function fetchPluginDetail(slug: string): Promise<PluginDetail>;
|
|
11
|
-
export interface ResolvedDownload {
|
|
12
|
-
url: string;
|
|
13
|
-
name: string;
|
|
14
|
-
size: number;
|
|
15
|
-
version: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function resolveDownload(slug: string, version?: string): Promise<ResolvedDownload>;
|
|
18
|
-
export declare function proxyDownloadUrl(slug: string, version?: string): string;
|