@gnar-engine/cli 1.0.5 → 1.0.7

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 (48) hide show
  1. package/bootstrap/deploy.localdev.yml +14 -0
  2. package/bootstrap/secrets.localdev.yml +7 -3
  3. package/bootstrap/services/notification/Dockerfile +2 -2
  4. package/bootstrap/services/notification/package.json +14 -32
  5. package/bootstrap/services/notification/src/app.js +50 -48
  6. package/bootstrap/services/notification/src/commands/notification.handler.js +96 -0
  7. package/bootstrap/services/notification/src/config.js +55 -12
  8. package/bootstrap/services/notification/src/controllers/http.controller.js +87 -0
  9. package/bootstrap/services/notification/src/controllers/message.controller.js +39 -70
  10. package/bootstrap/services/notification/src/db/migrations/01-init.js +50 -0
  11. package/bootstrap/services/notification/src/db/migrations/02-notification-service-init.js +23 -0
  12. package/bootstrap/services/notification/src/policies/notification.policy.js +49 -0
  13. package/bootstrap/services/notification/src/schema/notification.schema.js +17 -0
  14. package/bootstrap/services/notification/src/services/notification.service.js +32 -0
  15. package/bootstrap/services/portal/src/services/client.js +3 -0
  16. package/bootstrap/services/user/src/commands/user.handler.js +35 -18
  17. package/bootstrap/services/user/src/tests/commands/user.test.js +15 -6
  18. package/install-from-clone.sh +1 -1
  19. package/package.json +1 -1
  20. package/src/cli.js +0 -6
  21. package/src/config.js +13 -1
  22. package/src/dev/commands.js +7 -3
  23. package/src/dev/dev.service.js +192 -128
  24. package/src/helpers/helpers.js +24 -0
  25. package/src/profiles/command.js +41 -0
  26. package/src/profiles/profiles.client.js +23 -0
  27. package/src/scaffolder/commands.js +57 -1
  28. package/src/scaffolder/scaffolder.handler.js +127 -60
  29. package/src/services/docker.js +173 -0
  30. package/templates/entity/src/commands/{{entityName}}.handler.js.hbs +94 -0
  31. package/templates/entity/src/controllers/{{entityName}}.http.controller.js.hbs +87 -0
  32. package/templates/entity/src/mysql.db/migrations/03-{{entityName}}-entity-init.js.hbs +23 -0
  33. package/templates/entity/src/policies/{{entityName}}.policy.js.hbs +49 -0
  34. package/templates/entity/src/schema/{{entityName}}.schema.js.hbs +17 -0
  35. package/templates/entity/src/services/mongodb.{{entityName}}.service.js.hbs +70 -0
  36. package/templates/entity/src/services/mysql.{{entityName}}.service.js.hbs +27 -0
  37. package/bootstrap/services/notification/Dockerfile.prod +0 -37
  38. package/bootstrap/services/notification/README.md +0 -3
  39. package/bootstrap/services/notification/src/commands/command-bus.js +0 -20
  40. package/bootstrap/services/notification/src/commands/handlers/control.handler.js +0 -18
  41. package/bootstrap/services/notification/src/commands/handlers/notification.handler.js +0 -157
  42. package/bootstrap/services/notification/src/services/logger.service.js +0 -16
  43. package/bootstrap/services/notification/src/services/ses.service.js +0 -23
  44. package/bootstrap/services/notification/src/templates/admin-order-recieved.hbs +0 -136
  45. package/bootstrap/services/notification/src/templates/admin-subscription-failed.hbs +0 -87
  46. package/bootstrap/services/notification/src/templates/customer-order-recieved.hbs +0 -132
  47. package/bootstrap/services/notification/src/templates/customer-subscription-failed.hbs +0 -77
  48. package/bootstrap/services/notification/src/tests/notification.test.js +0 -0
@@ -1,132 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Order Received</title>
6
- <style>
7
- body {
8
- font-family: Arial, sans-serif;
9
- font-size: 14px;
10
- color: #333;
11
- }
12
-
13
- .container {
14
- max-width: 600px;
15
- margin: auto;
16
- padding: 20px;
17
- border: 1px solid #eee;
18
- }
19
-
20
- .logo {
21
- text-align: center;
22
- margin-bottom: 20px;
23
- }
24
-
25
- .logo img {
26
- max-height: 60px;
27
- }
28
-
29
- .header {
30
- text-align: center;
31
- font-size: 20px;
32
- margin-bottom: 20px;
33
- }
34
-
35
- table {
36
- width: 100%;
37
- border-collapse: collapse;
38
- margin-bottom: 20px;
39
- }
40
-
41
- th, td {
42
- padding: 10px;
43
- border: 1px solid #ddd;
44
- text-align: left;
45
- }
46
-
47
- th {
48
- background-color: #f8f8f8;
49
- }
50
-
51
- .totals td {
52
- font-weight: bold;
53
- }
54
-
55
- .footer {
56
- font-size: 12px;
57
- color: #777;
58
- text-align: center;
59
- }
60
- </style>
61
- </head>
62
- <body>
63
- <div class="container">
64
- <div class="logo">
65
- <img src="{{ logoUrl }}" alt="Logo">
66
- </div>
67
-
68
- <div class="header">
69
- Thank you for your order, {{order.billingAddress.firstName}}!
70
- </div>
71
-
72
- <p>We've received your order and are now processing it. Here are the details:</p>
73
-
74
- <h3>Order Summary</h3>
75
- <table>
76
- <thead>
77
- <tr>
78
- <th>SKU</th>
79
- <th>Type</th>
80
- <th>Price</th>
81
- <th>Qty</th>
82
- </tr>
83
- </thead>
84
- <tbody>
85
- {{#each order.lineItems}}
86
- <tr>
87
- <td>{{sku}}</td>
88
- <td>{{type}}</td>
89
- <td>{{currencySymbol}} {{price.price}}</td>
90
- <td>{{quantity}}</td>
91
- </tr>
92
- {{/each}}
93
- </tbody>
94
- </table>
95
-
96
- <table class="totals">
97
- <tr>
98
- <td>Subtotal:</td>
99
- <td style="text-align: right;">{{currencySymbol}} {{order.subTotal}}</td>
100
- </tr>
101
- <tr>
102
- <td>Tax:</td>
103
- <td style="text-align: right;">{{currencySymbol}} {{order.tax}}</td>
104
- </tr>
105
- <tr>
106
- <td>Shipping:</td>
107
- <td style="text-align: right;">{{currencySymbol}} {{order.shipping}}</td>
108
- </tr>
109
- <tr>
110
- <td>Total:</td>
111
- <td style="text-align: right;"><strong>{{currencySymbol}} {{order.total}}</strong></td>
112
- </tr>
113
- </table>
114
-
115
- <h3>Billing Information</h3>
116
- <p>
117
- {{order.billingAddress.firstName}} {{order.billingAddress.lastName}}<br>
118
- {{order.billingAddress.addressLine1}}<br>
119
- {{order.billingAddress.addressLine2}}<br>
120
- {{order.billingAddress.city}}, {{order.billingAddress.county}}<br>
121
- {{order.billingAddress.postcode}}<br>
122
- {{order.billingAddress.country}}<br>
123
- Phone: {{order.billingAddress.phone}}<br>
124
- Email: {{order.billingAddress.email}}
125
- </p>
126
-
127
- <div class="footer">
128
- If you have any questions, please contact us at support@gnar.co.uk
129
- </div>
130
- </div>
131
- </body>
132
- </html>
@@ -1,77 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Subscription Cancelled</title>
6
- <style>
7
- body {
8
- font-family: Arial, sans-serif;
9
- font-size: 14px;
10
- color: #333;
11
- }
12
-
13
- .container {
14
- max-width: 600px;
15
- margin: auto;
16
- padding: 20px;
17
- border: 1px solid #eee;
18
- }
19
-
20
- .logo {
21
- text-align: center;
22
- margin-bottom: 20px;
23
- }
24
-
25
- .logo img {
26
- max-height: 60px;
27
- }
28
-
29
- .header {
30
- text-align: center;
31
- font-size: 20px;
32
- margin-bottom: 20px;
33
- color: #c0392b;
34
- }
35
-
36
- .content p {
37
- margin-bottom: 15px;
38
- }
39
-
40
- .footer {
41
- font-size: 12px;
42
- color: #777;
43
- text-align: center;
44
- margin-top: 30px;
45
- }
46
- </style>
47
- </head>
48
- <body>
49
- <div class="container">
50
- <div class="logo">
51
- <img src="{{ logoUrl }}" alt="Logo">
52
- </div>
53
-
54
- <div class="header">
55
- Your Subscription Has Been Cancelled
56
- </div>
57
-
58
- <div class="content">
59
- <p>Hi {{firstName}},</p>
60
-
61
- <p>Unfortunately, we were unable to process your subscription payment after three attempts.</p>
62
-
63
- <p>As a result, your subscription has now been <strong>cancelled</strong>.</p>
64
-
65
- <p>If you'd like to continue enjoying our services, you'll need to purchase a new subscription.</p>
66
-
67
- <p>You can do this by visiting your account and selecting a new plan that suits you.</p>
68
-
69
- <p>If you believe this was a mistake or have updated your payment information, please contact our support team.</p>
70
- </div>
71
-
72
- <div class="footer">
73
- If you have any questions, feel free to contact us at support@gnar.co.uk
74
- </div>
75
- </div>
76
- </body>
77
- </html>