@artilingo/artiframe-cli 1.3.0 → 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.
- package/core-stubs/bin/SystemMethod.php +600 -521
- package/core-stubs/bin/ViewMethod.php +591 -393
- package/core-stubs/docs/de.html +853 -1172
- package/core-stubs/docs/en.html +585 -904
- package/core-stubs/docs/es.html +934 -1253
- package/core-stubs/docs/fr.html +913 -1232
- package/core-stubs/docs/tr.html +4212 -5021
- package/package.json +1 -1
- package/src/App.php +38 -0
- package/src/Commands/AddCommand.php +1 -1
- package/src/Commands/AuthCommand.php +219 -0
- package/src/Commands/IssuesCommand.php +174 -0
- package/src/Commands/ListCommand.php +2 -1
- package/src/Commands/MakeApiCommand.php +1 -1
- package/src/Commands/MakeClassCommand.php +1 -1
- package/src/Commands/MakeViewCommand.php +1 -1
- package/src/Commands/NewProjectCommand.php +37 -25
- package/src/Commands/RemoveCommand.php +21 -10
- package/src/Commands/ServeCommand.php +29 -9
- package/src/Commands/SuggestCommand.php +143 -0
- package/src/Commands/TableCommand.php +2 -1
- package/src/Commands/UpgradeCommand.php +209 -0
- package/src/Commands/VersionCommand.php +2 -1
- package/src/Lang/de.php +9 -1
- package/src/Lang/en.php +8 -0
- package/src/Lang/es.php +9 -1
- package/src/Lang/fr.php +8 -0
- package/src/Lang/tr.php +10 -2
- package/src/Services/Safeguard.php +25 -0
- package/stubs/service/image.stub +334 -334
- package/stubs/service/iyzico.stub +637 -637
- package/stubs/service/jwt.stub +312 -312
- package/stubs/service/phpmailer.stub +143 -143
- package/stubs/service/pusher.stub +232 -232
- package/stubs/service/qrcode.stub +169 -169
- package/stubs/service/redis.stub +361 -361
- package/stubs/service/s3.stub +377 -377
- package/stubs/service/sentry.stub +76 -106
- package/stubs/service/stripe.stub +526 -526
- package/stubs/service/twilio.stub +361 -361
- package/core-stubs/app/R2Manager.php +0 -130
|
@@ -45,4 +45,29 @@ class Safeguard
|
|
|
45
45
|
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Attempts to find the project root by recursively looking up for composer.json or app/public dirs.
|
|
51
|
+
*/
|
|
52
|
+
public function getProjectRoot(): string
|
|
53
|
+
{
|
|
54
|
+
$dir = rtrim(str_replace('\\', '/', getcwd()), '/');
|
|
55
|
+
$current = $dir;
|
|
56
|
+
|
|
57
|
+
while (true) {
|
|
58
|
+
if (file_exists($current . '/composer.json') || (is_dir($current . '/app') && is_dir($current . '/public'))) {
|
|
59
|
+
return $current;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
$parent = dirname($current);
|
|
63
|
+
if ($parent === $current || $parent === '.' || $parent === '') {
|
|
64
|
+
// Reached the filesystem root without finding project root
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
$current = $parent;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Fallback to getcwd() if we couldn't detect the root
|
|
71
|
+
return $dir;
|
|
72
|
+
}
|
|
48
73
|
}
|