@artilingo/artiframe-cli 2.0.3 → 2.0.5

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 (90) hide show
  1. package/LICENSE +660 -660
  2. package/bin/artiframe.js +0 -0
  3. package/bin/artiframe.php +0 -0
  4. package/core-stubs/app/ApiAuthControl.php +76 -0
  5. package/core-stubs/app/ApiControl.php +81 -35
  6. package/core-stubs/app/AuthControl.php +39 -0
  7. package/core-stubs/app/Database.php +36 -35
  8. package/core-stubs/app/DotEnv.php +19 -1
  9. package/core-stubs/app/ViewControl.php +47 -1
  10. package/core-stubs/bin/SQLMethod.php +261 -0
  11. package/core-stubs/bin/SystemMethod.php +115 -74
  12. package/core-stubs/bin/ViewMethod.php +19 -5
  13. package/core-stubs/docs/de.html +4325 -4347
  14. package/core-stubs/docs/en.html +4325 -4347
  15. package/core-stubs/docs/es.html +4325 -4347
  16. package/core-stubs/docs/fr.html +4325 -4347
  17. package/core-stubs/docs/tr.html +117 -46
  18. package/core-stubs/public/403.php +52 -0
  19. package/core-stubs/public/assets/css/components/header.css +174 -0
  20. package/core-stubs/public/assets/css/components/mobilenav.css +198 -0
  21. package/core-stubs/public/assets/css/components/sidebar.css +184 -0
  22. package/core-stubs/public/assets/css/root/app.css +975 -38
  23. package/core-stubs/public/assets/css/root/root.css +64 -0
  24. package/core-stubs/public/assets/js/components/header.js +380 -0
  25. package/core-stubs/public/assets/js/components/mobilenav.js +97 -0
  26. package/core-stubs/public/assets/js/components/theme-modal.js +74 -0
  27. package/core-stubs/public/assets/js/root/app.js +1870 -0
  28. package/core-stubs/public/includes/footer.php +4 -5
  29. package/core-stubs/public/includes/head-auth.php +65 -0
  30. package/core-stubs/public/includes/head.php +56 -17
  31. package/core-stubs/public/includes/header.php +135 -1
  32. package/core-stubs/public/includes/mobilenav.php +75 -3
  33. package/core-stubs/public/includes/sidebar.php +186 -1
  34. package/core-stubs/public/includes/theme-modal.php +1 -0
  35. package/db-studio/debug.log +3 -0
  36. package/db-studio/index.html +1755 -0
  37. package/db-studio/launcher.html +102 -0
  38. package/db-studio/launcher.js +180 -0
  39. package/db-studio/logo.svg +22 -0
  40. package/db-studio/main.js +568 -0
  41. package/db-studio/package-lock.json +1034 -0
  42. package/db-studio/package.json +16 -0
  43. package/db-studio/preload.js +29 -0
  44. package/devops-studio/api-inspector.js +222 -0
  45. package/devops-studio/index.html +1892 -0
  46. package/devops-studio/logo.svg +22 -0
  47. package/devops-studio/main.js +67 -0
  48. package/devops-studio/make-wizard.js +635 -0
  49. package/devops-studio/package-lock.json +871 -0
  50. package/devops-studio/package.json +12 -0
  51. package/package.json +5 -2
  52. package/scripts/postinstall.js +44 -8
  53. package/server-studio/.json-404-guard +1 -0
  54. package/server-studio/index.html +283 -0
  55. package/server-studio/logo.svg +22 -0
  56. package/server-studio/main.js +133 -0
  57. package/server-studio/package-lock.json +1179 -0
  58. package/server-studio/package.json +15 -0
  59. package/server-studio/router.php +99 -0
  60. package/src/App.php +29 -0
  61. package/src/Commands/AddCommand.php +26 -9
  62. package/src/Commands/DbExportCommand.php +131 -0
  63. package/src/Commands/DbStartCommand.php +46 -0
  64. package/src/Commands/DevopsCommand.php +35 -0
  65. package/src/Commands/GoCommand.php +48 -48
  66. package/src/Commands/ListCommand.php +68 -68
  67. package/src/Commands/MakeApiCommand.php +6 -1
  68. package/src/Commands/MakeViewCommand.php +25 -2
  69. package/src/Commands/NewProjectCommand.php +16 -11
  70. package/src/Commands/OptimizeCommand.php +61 -0
  71. package/src/Commands/RemoveCommand.php +36 -7
  72. package/src/Commands/ServeCommand.php +46 -91
  73. package/src/Commands/ShowCommand.php +24 -24
  74. package/src/Commands/UpgradeCommand.php +39 -10
  75. package/stubs/make/api-switch-case.stub +1 -1
  76. package/stubs/make/auth-api-standart.stub +20 -0
  77. package/stubs/make/auth-api-switch-case.stub +38 -0
  78. package/stubs/make/auth-view.stub +26 -0
  79. package/stubs/make/class.stub +10 -2
  80. package/stubs/make/view.stub +3 -0
  81. package/stubs/service/image.stub +334 -334
  82. package/stubs/service/iyzico.stub +637 -637
  83. package/stubs/service/jwt.stub +312 -312
  84. package/stubs/service/phpmailer.stub +143 -143
  85. package/stubs/service/pusher.stub +232 -232
  86. package/stubs/service/qrcode.stub +169 -169
  87. package/stubs/service/redis.stub +361 -361
  88. package/stubs/service/s3.stub +377 -377
  89. package/stubs/service/stripe.stub +526 -526
  90. package/stubs/service/twilio.stub +361 -361
@@ -1,143 +1,143 @@
1
- <?php
2
- namespace Src\Service;
3
-
4
- use PHPMailer\PHPMailer\PHPMailer;
5
- use PHPMailer\PHPMailer\Exception;
6
-
7
- /**
8
- * ArtiFrame Mailer Wrapper for PHPMailer
9
- *
10
- * Provides a clean, fluent API on top of the battle-tested PHPMailer library.
11
- * Handles complex RFC standards, TLS handshakes, and CRLF injections automatically.
12
- */
13
- class Mailer
14
- {
15
- private PHPMailer $mail;
16
-
17
- public function __construct()
18
- {
19
- $this->mail = new PHPMailer(true);
20
-
21
- // SMTP Configuration from .env
22
- $this->mail->isSMTP();
23
- $this->mail->Host = $_ENV['MAIL_HOST'] ?? 'localhost';
24
- $this->mail->SMTPAuth = !empty($_ENV['MAIL_USERNAME']);
25
- $this->mail->Username = $_ENV['MAIL_USERNAME'] ?? '';
26
- $this->mail->Password = $_ENV['MAIL_PASSWORD'] ?? '';
27
-
28
- $encryption = strtolower($_ENV['MAIL_ENCRYPTION'] ?? '');
29
- if ($encryption === 'tls') {
30
- $this->mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
31
- } elseif ($encryption === 'ssl') {
32
- $this->mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
33
- }
34
-
35
- $this->mail->Port = $_ENV['MAIL_PORT'] ?? 25;
36
-
37
- // Security & Formatting Defaults
38
- $this->mail->CharSet = 'UTF-8';
39
- $this->mail->Encoding = 'base64';
40
-
41
- $this->mail->setFrom(
42
- $_ENV['MAIL_FROM_ADDRESS'] ?? 'hello@example.com',
43
- $_ENV['MAIL_FROM_NAME'] ?? 'ArtiFrame'
44
- );
45
- }
46
-
47
- /**
48
- * Instantiates a new Mailer instance for fluent chaining.
49
- */
50
- public static function create(): self
51
- {
52
- return new self();
53
- }
54
-
55
- /**
56
- * Add a primary recipient.
57
- */
58
- public function to(string $email, string $name = ''): self
59
- {
60
- $this->mail->addAddress($email, $name);
61
- return $this;
62
- }
63
-
64
- /**
65
- * Add a Carbon Copy (CC) recipient.
66
- */
67
- public function cc(string $email, string $name = ''): self
68
- {
69
- $this->mail->addCC($email, $name);
70
- return $this;
71
- }
72
-
73
- /**
74
- * Add a Blind Carbon Copy (BCC) recipient.
75
- */
76
- public function bcc(string $email, string $name = ''): self
77
- {
78
- $this->mail->addBCC($email, $name);
79
- return $this;
80
- }
81
-
82
- /**
83
- * Set the email subject.
84
- */
85
- public function subject(string $subject): self
86
- {
87
- $this->mail->Subject = $subject;
88
- return $this;
89
- }
90
-
91
- /**
92
- * Set the body format to HTML. Automatically generates an AltBody (Plain Text) version.
93
- */
94
- public function html(string $html, ?string $altText = null): self
95
- {
96
- $this->mail->isHTML(true);
97
- $this->mail->Body = $html;
98
- $this->mail->AltBody = $altText ?? strip_tags(str_replace(['<br>', '<br/>'], "\n", $html));
99
- return $this;
100
- }
101
-
102
- /**
103
- * Set the body format to strict Plain Text.
104
- */
105
- public function text(string $text): self
106
- {
107
- $this->mail->isHTML(false);
108
- $this->mail->Body = $text;
109
- return $this;
110
- }
111
-
112
- /**
113
- * Attach a file (PDF, DOCX, ZIP, etc.)
114
- */
115
- public function attach(string $path, string $name = ''): self
116
- {
117
- $this->mail->addAttachment($path, $name);
118
- return $this;
119
- }
120
-
121
- /**
122
- * Embed an inline image for HTML rendering (e.g., logo).
123
- * Usage in HTML: <img src="cid:YOUR_CID">
124
- */
125
- public function embedImage(string $path, string $cid, string $name = ''): self
126
- {
127
- $this->mail->addEmbeddedImage($path, $cid, $name);
128
- return $this;
129
- }
130
-
131
- /**
132
- * Execute the SMTP transmission.
133
- * @throws \Exception
134
- */
135
- public function send(): bool
136
- {
137
- try {
138
- return $this->mail->send();
139
- } catch (Exception $e) {
140
- throw new \Exception("SMTP Mailer Error: " . $this->mail->ErrorInfo);
141
- }
142
- }
143
- }
1
+ <?php
2
+ namespace Src\Service;
3
+
4
+ use PHPMailer\PHPMailer\PHPMailer;
5
+ use PHPMailer\PHPMailer\Exception;
6
+
7
+ /**
8
+ * ArtiFrame Mailer Wrapper for PHPMailer
9
+ *
10
+ * Provides a clean, fluent API on top of the battle-tested PHPMailer library.
11
+ * Handles complex RFC standards, TLS handshakes, and CRLF injections automatically.
12
+ */
13
+ class Mailer
14
+ {
15
+ private PHPMailer $mail;
16
+
17
+ public function __construct()
18
+ {
19
+ $this->mail = new PHPMailer(true);
20
+
21
+ // SMTP Configuration from .env
22
+ $this->mail->isSMTP();
23
+ $this->mail->Host = $_ENV['MAIL_HOST'] ?? 'localhost';
24
+ $this->mail->SMTPAuth = !empty($_ENV['MAIL_USERNAME']);
25
+ $this->mail->Username = $_ENV['MAIL_USERNAME'] ?? '';
26
+ $this->mail->Password = $_ENV['MAIL_PASSWORD'] ?? '';
27
+
28
+ $encryption = strtolower($_ENV['MAIL_ENCRYPTION'] ?? '');
29
+ if ($encryption === 'tls') {
30
+ $this->mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
31
+ } elseif ($encryption === 'ssl') {
32
+ $this->mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
33
+ }
34
+
35
+ $this->mail->Port = $_ENV['MAIL_PORT'] ?? 25;
36
+
37
+ // Security & Formatting Defaults
38
+ $this->mail->CharSet = 'UTF-8';
39
+ $this->mail->Encoding = 'base64';
40
+
41
+ $this->mail->setFrom(
42
+ $_ENV['MAIL_FROM_ADDRESS'] ?? 'hello@example.com',
43
+ $_ENV['MAIL_FROM_NAME'] ?? 'ArtiFrame'
44
+ );
45
+ }
46
+
47
+ /**
48
+ * Instantiates a new Mailer instance for fluent chaining.
49
+ */
50
+ public static function create(): self
51
+ {
52
+ return new self();
53
+ }
54
+
55
+ /**
56
+ * Add a primary recipient.
57
+ */
58
+ public function to(string $email, string $name = ''): self
59
+ {
60
+ $this->mail->addAddress($email, $name);
61
+ return $this;
62
+ }
63
+
64
+ /**
65
+ * Add a Carbon Copy (CC) recipient.
66
+ */
67
+ public function cc(string $email, string $name = ''): self
68
+ {
69
+ $this->mail->addCC($email, $name);
70
+ return $this;
71
+ }
72
+
73
+ /**
74
+ * Add a Blind Carbon Copy (BCC) recipient.
75
+ */
76
+ public function bcc(string $email, string $name = ''): self
77
+ {
78
+ $this->mail->addBCC($email, $name);
79
+ return $this;
80
+ }
81
+
82
+ /**
83
+ * Set the email subject.
84
+ */
85
+ public function subject(string $subject): self
86
+ {
87
+ $this->mail->Subject = $subject;
88
+ return $this;
89
+ }
90
+
91
+ /**
92
+ * Set the body format to HTML. Automatically generates an AltBody (Plain Text) version.
93
+ */
94
+ public function html(string $html, ?string $altText = null): self
95
+ {
96
+ $this->mail->isHTML(true);
97
+ $this->mail->Body = $html;
98
+ $this->mail->AltBody = $altText ?? strip_tags(str_replace(['<br>', '<br/>'], "\n", $html));
99
+ return $this;
100
+ }
101
+
102
+ /**
103
+ * Set the body format to strict Plain Text.
104
+ */
105
+ public function text(string $text): self
106
+ {
107
+ $this->mail->isHTML(false);
108
+ $this->mail->Body = $text;
109
+ return $this;
110
+ }
111
+
112
+ /**
113
+ * Attach a file (PDF, DOCX, ZIP, etc.)
114
+ */
115
+ public function attach(string $path, string $name = ''): self
116
+ {
117
+ $this->mail->addAttachment($path, $name);
118
+ return $this;
119
+ }
120
+
121
+ /**
122
+ * Embed an inline image for HTML rendering (e.g., logo).
123
+ * Usage in HTML: <img src="cid:YOUR_CID">
124
+ */
125
+ public function embedImage(string $path, string $cid, string $name = ''): self
126
+ {
127
+ $this->mail->addEmbeddedImage($path, $cid, $name);
128
+ return $this;
129
+ }
130
+
131
+ /**
132
+ * Execute the SMTP transmission.
133
+ * @throws \Exception
134
+ */
135
+ public function send(): bool
136
+ {
137
+ try {
138
+ return $this->mail->send();
139
+ } catch (Exception $e) {
140
+ throw new \Exception("SMTP Mailer Error: " . $this->mail->ErrorInfo);
141
+ }
142
+ }
143
+ }