@churchapps/apihelper 0.0.22 → 0.0.24

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 (58) hide show
  1. package/.prettierrc.json +13 -0
  2. package/CLAUDE.md +110 -0
  3. package/dist/auth/AuthenticatedUser.js +1 -2
  4. package/dist/auth/AuthenticatedUser.js.map +1 -1
  5. package/dist/auth/CustomAuthProvider.d.ts +1 -1
  6. package/dist/auth/CustomAuthProvider.d.ts.map +1 -1
  7. package/dist/auth/CustomAuthProvider.js +13 -24
  8. package/dist/auth/CustomAuthProvider.js.map +1 -1
  9. package/dist/controllers/CustomBaseController.d.ts +4 -4
  10. package/dist/controllers/CustomBaseController.d.ts.map +1 -1
  11. package/dist/controllers/CustomBaseController.js +24 -37
  12. package/dist/controllers/CustomBaseController.js.map +1 -1
  13. package/dist/controllers/ErrorController.d.ts +1 -1
  14. package/dist/controllers/ErrorController.d.ts.map +1 -1
  15. package/dist/controllers/ErrorController.js +19 -30
  16. package/dist/controllers/ErrorController.js.map +1 -1
  17. package/dist/helpers/AwsHelper.d.ts.map +1 -1
  18. package/dist/helpers/AwsHelper.js +84 -115
  19. package/dist/helpers/AwsHelper.js.map +1 -1
  20. package/dist/helpers/DB.js +37 -54
  21. package/dist/helpers/DB.js.map +1 -1
  22. package/dist/helpers/DBCreator.js +23 -36
  23. package/dist/helpers/DBCreator.js.map +1 -1
  24. package/dist/helpers/EmailHelper.d.ts +1 -1
  25. package/dist/helpers/EmailHelper.d.ts.map +1 -1
  26. package/dist/helpers/EmailHelper.js +62 -70
  27. package/dist/helpers/EmailHelper.js.map +1 -1
  28. package/dist/helpers/EncryptionHelper.d.ts.map +1 -1
  29. package/dist/helpers/EnvironmentBase.js +14 -25
  30. package/dist/helpers/EnvironmentBase.js.map +1 -1
  31. package/dist/helpers/FileStorageHelper.d.ts.map +1 -1
  32. package/dist/helpers/FileStorageHelper.js +29 -38
  33. package/dist/helpers/FileStorageHelper.js.map +1 -1
  34. package/dist/helpers/LoggingHelper.js +1 -1
  35. package/dist/helpers/LoggingHelper.js.map +1 -1
  36. package/dist/helpers/Pool.d.ts.map +1 -1
  37. package/dist/helpers/Pool.js +2 -1
  38. package/dist/helpers/Pool.js.map +1 -1
  39. package/dist/templates/ChurchEmailTemplate.html +383 -0
  40. package/dist/templates/EmailTemplate.html +426 -0
  41. package/eslint.config.mjs +40 -0
  42. package/package.json +38 -36
  43. package/scripts/copy-assets.js +22 -0
  44. package/src/auth/CustomAuthProvider.ts +1 -1
  45. package/src/controllers/CustomBaseController.ts +2 -2
  46. package/src/controllers/ErrorController.ts +2 -2
  47. package/src/helpers/AwsHelper.ts +10 -10
  48. package/src/helpers/DBCreator.ts +2 -2
  49. package/src/helpers/EmailHelper.ts +38 -34
  50. package/src/helpers/LoggingHelper.ts +1 -1
  51. package/src/helpers/Pool.ts +2 -1
  52. package/tsconfig.json +8 -18
  53. package/dist/tools/DBCreator.d.ts +0 -1
  54. package/dist/tools/DBCreator.d.ts.map +0 -1
  55. package/dist/tools/DBCreator.js +0 -1
  56. package/dist/tools/DBCreator.js.map +0 -1
  57. package/src/tools/DBCreator.ts +0 -0
  58. package/tslint.json +0 -15
@@ -0,0 +1,426 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
3
+
4
+ <head>
5
+ <meta charset="utf-8"> <!-- utf-8 works for most cases -->
6
+ <meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
7
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
8
+ <meta name="x-apple-disable-message-reformatting"> <!-- Disable auto-scale in iOS 10 Mail entirely -->
9
+ <title></title> <!-- The title tag shows in email notifications, like Android 4.4. -->
10
+
11
+ <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet">
12
+
13
+ <!-- CSS Reset : BEGIN -->
14
+ <style>
15
+ /* What it does: Remove spaces around the email design added by some email clients. */
16
+ /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */
17
+ html,
18
+ body {
19
+ margin: 0 auto !important;
20
+ padding: 0 !important;
21
+ height: 100% !important;
22
+ width: 100% !important;
23
+ background: #f1f1f1;
24
+ }
25
+
26
+ /* What it does: Stops email clients resizing small text. */
27
+ * {
28
+ -ms-text-size-adjust: 100%;
29
+ -webkit-text-size-adjust: 100%;
30
+ }
31
+
32
+ /* What it does: Centers email on Android 4.4 */
33
+ div[style*="margin: 16px 0"] {
34
+ margin: 0 !important;
35
+ }
36
+
37
+ /* What it does: Stops Outlook from adding extra spacing to tables. */
38
+ table,
39
+ td {
40
+ mso-table-lspace: 0pt !important;
41
+ mso-table-rspace: 0pt !important;
42
+ }
43
+
44
+ /* What it does: Fixes webkit padding issue. */
45
+ table {
46
+ border-spacing: 0 !important;
47
+ border-collapse: collapse !important;
48
+ table-layout: fixed !important;
49
+ margin: 0 auto !important;
50
+ }
51
+
52
+ /* What it does: Uses a better rendering method when resizing images in IE. */
53
+ img {
54
+ -ms-interpolation-mode: bicubic;
55
+ }
56
+
57
+ /* What it does: Prevents Windows 10 Mail from underlining links despite inline CSS. Styles for underlined links should be inline. */
58
+ a {
59
+ text-decoration: none;
60
+ }
61
+
62
+ /* What it does: A work-around for email clients meddling in triggered links. */
63
+ *[x-apple-data-detectors],
64
+ /* iOS */
65
+ .unstyle-auto-detected-links *,
66
+ .aBn {
67
+ border-bottom: 0 !important;
68
+ cursor: default !important;
69
+ color: inherit !important;
70
+ text-decoration: none !important;
71
+ font-size: inherit !important;
72
+ font-family: inherit !important;
73
+ font-weight: inherit !important;
74
+ line-height: inherit !important;
75
+ }
76
+
77
+ /* What it does: Prevents Gmail from displaying a download button on large, non-linked images. */
78
+ .a6S {
79
+ display: none !important;
80
+ opacity: 0.01 !important;
81
+ }
82
+
83
+ /* What it does: Prevents Gmail from changing the text color in conversation threads. */
84
+ .im {
85
+ color: inherit !important;
86
+ }
87
+
88
+ /* If the above doesn't work, add a .g-img class to any image in question. */
89
+ img.g-img+div {
90
+ display: none !important;
91
+ }
92
+
93
+ /* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */
94
+ /* Create one of these media queries for each additional viewport size you'd like to fix */
95
+
96
+ /* iPhone 4, 4S, 5, 5S, 5C, and 5SE */
97
+ @media only screen and (min-device-width: 320px) and (max-device-width: 374px) {
98
+ u~div .email-container {
99
+ min-width: 320px !important;
100
+ }
101
+ }
102
+
103
+ /* iPhone 6, 6S, 7, 8, and X */
104
+ @media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
105
+ u~div .email-container {
106
+ min-width: 375px !important;
107
+ }
108
+ }
109
+
110
+ /* iPhone 6+, 7+, and 8+ */
111
+ @media only screen and (min-device-width: 414px) {
112
+ u~div .email-container {
113
+ min-width: 414px !important;
114
+ }
115
+ }
116
+ </style>
117
+
118
+ <!-- CSS Reset : END -->
119
+
120
+ <!-- Progressive Enhancements : BEGIN -->
121
+ <style>
122
+ .primary {
123
+ background: #0288d1;
124
+ }
125
+
126
+ .bg_white {
127
+ background: #ffffff;
128
+ }
129
+
130
+ .bg_light {
131
+ background: #fafafa;
132
+ }
133
+
134
+ .bg_black {
135
+ background: #000000;
136
+ }
137
+
138
+ .bg_dark {
139
+ background: rgba(0, 0, 0, .8);
140
+ }
141
+
142
+ .email-section {
143
+ padding: 2.5em;
144
+ }
145
+
146
+ /*BUTTON*/
147
+ .btn {
148
+ padding: 10px 15px;
149
+ display: inline-block;
150
+ }
151
+
152
+ .btn.btn-primary {
153
+ border-radius: 5px;
154
+ background: #0288d1;
155
+ color: #ffffff;
156
+ }
157
+
158
+ .btn.btn-white {
159
+ border-radius: 5px;
160
+ background: #ffffff;
161
+ color: #000000;
162
+ }
163
+
164
+ .btn.btn-white-outline {
165
+ border-radius: 5px;
166
+ background: transparent;
167
+ border: 1px solid #fff;
168
+ color: #fff;
169
+ }
170
+
171
+ .btn.btn-black-outline {
172
+ border-radius: 0px;
173
+ background: transparent;
174
+ border: 2px solid #000;
175
+ color: #000;
176
+ font-weight: 700;
177
+ }
178
+
179
+ h1,
180
+ h2,
181
+ h3,
182
+ h4,
183
+ h5,
184
+ h6 {
185
+ font-family: 'Lato', sans-serif;
186
+ color: #000000;
187
+ margin-top: 0;
188
+ font-weight: 400;
189
+ }
190
+
191
+ body {
192
+ font-family: 'Lato', sans-serif;
193
+ font-weight: 400;
194
+ font-size: 15px;
195
+ line-height: 1.8;
196
+ color: rgba(0, 0, 0, .4);
197
+ }
198
+
199
+ a {
200
+ color: #0288d1;
201
+ }
202
+
203
+ table {}
204
+
205
+ /*LOGO*/
206
+
207
+ .logo h1 {
208
+ margin: 0;
209
+ }
210
+
211
+ .logo h1 a {
212
+ color: #0288d1;
213
+ font-size: 24px;
214
+ font-weight: 700;
215
+ font-family: 'Lato', sans-serif;
216
+ }
217
+
218
+ /*HERO*/
219
+ .hero {
220
+ position: relative;
221
+ z-index: 0;
222
+ }
223
+
224
+ .hero .text {
225
+ color: rgba(0, 0, 0, .3);
226
+ }
227
+
228
+ .hero .text h2 {
229
+ color: #000;
230
+ font-size: 40px;
231
+ margin-bottom: 0;
232
+ font-weight: 400;
233
+ line-height: 1.4;
234
+ }
235
+
236
+ .hero .text h3 {
237
+ font-size: 24px;
238
+ font-weight: 300;
239
+ }
240
+
241
+ .hero .text h2 span {
242
+ font-weight: 600;
243
+ color: #0288d1;
244
+ }
245
+
246
+
247
+ /*HEADING SECTION*/
248
+ .heading-section {}
249
+
250
+ .heading-section h2 {
251
+ color: #000000;
252
+ font-size: 28px;
253
+ margin-top: 0;
254
+ line-height: 1.4;
255
+ font-weight: 400;
256
+ }
257
+
258
+ .heading-section .subheading {
259
+ margin-bottom: 20px !important;
260
+ display: inline-block;
261
+ font-size: 13px;
262
+ text-transform: uppercase;
263
+ letter-spacing: 2px;
264
+ color: rgba(0, 0, 0, .4);
265
+ position: relative;
266
+ }
267
+
268
+ .heading-section .subheading::after {
269
+ position: absolute;
270
+ left: 0;
271
+ right: 0;
272
+ bottom: -10px;
273
+ content: '';
274
+ width: 100%;
275
+ height: 2px;
276
+ background: #0288d1;
277
+ margin: 0 auto;
278
+ }
279
+
280
+ .heading-section-white {
281
+ color: rgba(255, 255, 255, .8);
282
+ }
283
+
284
+ .heading-section-white h2 {
285
+ line-height: 1;
286
+ padding-bottom: 0;
287
+ }
288
+
289
+ .heading-section-white h2 {
290
+ color: #ffffff;
291
+ }
292
+
293
+ .heading-section-white .subheading {
294
+ margin-bottom: 0;
295
+ display: inline-block;
296
+ font-size: 13px;
297
+ text-transform: uppercase;
298
+ letter-spacing: 2px;
299
+ color: rgba(255, 255, 255, .4);
300
+ }
301
+
302
+
303
+ ul.social {
304
+ padding: 0;
305
+ }
306
+
307
+ ul.social li {
308
+ display: inline-block;
309
+ margin-right: 10px;
310
+ }
311
+
312
+ /*FOOTER*/
313
+
314
+ .footer {
315
+ border-top: 1px solid rgba(0, 0, 0, .05);
316
+ color: rgba(0, 0, 0, .5);
317
+ }
318
+
319
+ .footer .heading {
320
+ color: #000;
321
+ font-size: 20px;
322
+ }
323
+
324
+ .footer ul {
325
+ margin: 0;
326
+ padding: 0;
327
+ }
328
+
329
+ .footer ul li {
330
+ list-style: none;
331
+ margin-bottom: 10px;
332
+ }
333
+
334
+ .footer ul li a {
335
+ color: rgba(0, 0, 0, 1);
336
+ }
337
+
338
+
339
+ @media screen and (max-width: 500px) {}
340
+ </style>
341
+
342
+
343
+ </head>
344
+
345
+ <body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f1f1f1;">
346
+ <center style="width: 100%; background-color: #f1f1f1;">
347
+ <div style="display: none; font-size: 1px;max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden; mso-hide: all; font-family: sans-serif;">
348
+ &zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
349
+ </div>
350
+ <div style="max-width: 600px; margin: 0 auto;" class="email-container">
351
+ <!-- BEGIN BODY -->
352
+ <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto;">
353
+ <tr>
354
+ <td valign="top" class="bg_white" style="padding: 1em 2.5em 0 2.5em;">
355
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
356
+ <tr>
357
+ <td class="logo" style="text-align: center;">
358
+ <h1>{appLink}</h1>
359
+ </td>
360
+ </tr>
361
+ </table>
362
+ </td>
363
+ </tr><!-- end tr -->
364
+ <tr>
365
+ <td valign="middle" class="hero bg_white" style="padding: 2em 0 4em 0;">
366
+ <table>
367
+ <tr>
368
+ <td>
369
+ <div class="text" style="padding: 0 2.5em; text-align: center;">
370
+ {contents}
371
+ </div>
372
+ </td>
373
+ </tr>
374
+ </table>
375
+ </td>
376
+ </tr><!-- end tr -->
377
+ <!-- 1 Column Text + Button : END -->
378
+ </table>
379
+ <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin: auto;">
380
+ <tr>
381
+ <td valign="middle" class="bg_light footer email-section">
382
+ <p></p>
383
+ <table>
384
+ <tr>
385
+ <td valign="top" width="60%" style="padding-top: 20px;">
386
+ <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
387
+ <tr>
388
+ <td style="text-align: left; padding-left: 5px; padding-right: 5px;">
389
+ <h3 class="heading">Contact Support</h3>
390
+ <ul>
391
+ <li><span class="text"><a href="mailto:support@livecs.org">support@livecs.org</a></span></li>
392
+ <li><span class="text"><a href="phone:19189942638">+1 (918) 994-2638</a></span></li>
393
+ <li><span class="text"><a href="https://m.me/livecsolutions">https://m.me/livecsolutions</a></span></li>
394
+ <li><span class="text"><a href="https://support.churchapps.org">https://support.churchapps.org</a></span></li>
395
+ </ul>
396
+ </td>
397
+ </tr>
398
+ </table>
399
+ </td>
400
+ <td valign="top" width="40%" style="padding-top: 20px;">
401
+ <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
402
+ <tr>
403
+ <td style="text-align: left; padding-left: 10px;">
404
+ <h3 class="heading">Explore Our Apps</h3>
405
+ <ul>
406
+ <li><a href="https://lessons.church/">Lessons.church</a></li>
407
+ <li><a href="https://chums.org/">CHUMS</a></li>
408
+ <li><a href="https://b1.church/">B1</a></li>
409
+ <li><a href="https://streaminglive.church/">StreamingLive</a></li>
410
+ <li><a href="https://votd.org/">Verse of the Day</a></li>
411
+ </ul>
412
+ </td>
413
+ </tr>
414
+ </table>
415
+ </td>
416
+ </tr>
417
+ </table>
418
+ </td>
419
+ </tr><!-- end: tr -->
420
+ </table>
421
+
422
+ </div>
423
+ </center>
424
+ </body>
425
+
426
+ </html>
@@ -0,0 +1,40 @@
1
+ import eslint from "@eslint/js";
2
+ import tseslint from "@typescript-eslint/eslint-plugin";
3
+ import parser from "@typescript-eslint/parser";
4
+
5
+ export default [
6
+ eslint.configs.recommended,
7
+ {
8
+ files: ["**/*.ts"],
9
+ languageOptions: {
10
+ parser: parser,
11
+ parserOptions: {
12
+ ecmaVersion: 2020,
13
+ sourceType: "module"
14
+ },
15
+ globals: {
16
+ console: "readonly",
17
+ process: "readonly",
18
+ Buffer: "readonly",
19
+ __dirname: "readonly",
20
+ global: "readonly"
21
+ }
22
+ },
23
+ plugins: {
24
+ "@typescript-eslint": tseslint
25
+ },
26
+ rules: {
27
+ "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
28
+ "no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
29
+ "@typescript-eslint/no-explicit-any": "warn",
30
+ "no-console": "off",
31
+ "no-useless-catch": "off",
32
+ "comma-dangle": ["error", "never"],
33
+ "object-curly-spacing": ["error", "always"],
34
+ "array-bracket-spacing": ["error", "never"]
35
+ }
36
+ },
37
+ {
38
+ ignores: ["dist/**/*", "node_modules/**/*"]
39
+ }
40
+ ];
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "@churchapps/apihelper",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "Library of helper functions not specific to any one ChurchApps project or framework.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
8
  "clean": "rimraf dist",
9
- "copy-assets": "copyfiles -f src/apiBase/tools/templates/* dist/templates",
9
+ "copy-assets": "node scripts/copy-assets.js",
10
10
  "link": "link",
11
11
  "tsc": "tsc",
12
- "build": "npm-run-all clean tsc copy-assets"
12
+ "build": "npm-run-all clean tsc copy-assets",
13
+ "lint": "eslint src/**/*.ts",
14
+ "lint:fix": "eslint src/**/*.ts --fix",
15
+ "format": "prettier --write src/**/*.ts",
16
+ "format:check": "prettier --check src/**/*.ts"
13
17
  },
14
18
  "repository": {
15
19
  "type": "git",
@@ -25,43 +29,41 @@
25
29
  },
26
30
  "homepage": "https://github.com/LiveChurchSolutions/Helpers#readme",
27
31
  "dependencies": {
28
- "@aws-sdk/client-cloudwatch-logs": "^3.408.0",
29
- "@aws-sdk/client-s3": "^3.627.0",
30
- "@aws-sdk/client-ses": "^3.624.0",
31
- "@aws-sdk/client-ssm": "^3.662.0",
32
- "@aws-sdk/s3-presigned-post": "^3.627.0",
33
- "@aws-sdk/s3-request-presigner": "^3.627.0",
34
- "@churchapps/helpers": "^1.0.25",
35
- "date-fns": "^2.30.0",
36
- "dotenv": "^16.3.1",
37
- "express": "^4.17.2",
38
- "fs-extra": "^11.1.1",
32
+ "@aws-sdk/client-cloudwatch-logs": "^3.828.0",
33
+ "@aws-sdk/client-s3": "^3.828.0",
34
+ "@aws-sdk/client-ses": "^3.828.0",
35
+ "@aws-sdk/client-ssm": "^3.828.0",
36
+ "@aws-sdk/s3-presigned-post": "^3.828.0",
37
+ "@aws-sdk/s3-request-presigner": "^3.828.0",
38
+ "@churchapps/helpers": "^1.0.38",
39
+ "dotenv": "^16.5.0",
40
+ "express": "^4.21.2",
41
+ "fs-extra": "^11.3.0",
39
42
  "inversify": "^6.0.1",
40
- "inversify-express-utils": "^6.4.3",
41
- "jsonwebtoken": "^9.0.1",
43
+ "inversify-express-utils": "^6.5.0",
44
+ "jsonwebtoken": "^9.0.2",
42
45
  "kind-of": "^6.0.3",
43
46
  "mysql": "^2.18.1",
44
- "nodemailer": "^6.7.2",
45
- "nodemailer-direct-transport": "^3.3.2",
46
- "react-ga4": "^2.1.0",
47
- "rrule": "^2.7.2",
48
- "winston": "^3.10.0",
49
- "winston-cloudwatch": "^6.2.0"
47
+ "nodemailer": "^7.0.3",
48
+ "winston": "^3.17.0",
49
+ "winston-cloudwatch": "^6.3.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/express": "^4.17.13",
53
- "@types/fs-extra": "^11.0.1",
54
- "@types/jsonwebtoken": "^9.0.2",
55
- "@types/kind-of": "^6.0.0",
56
- "@types/mysql": "^2.15.21",
57
- "@types/node": "^20.5.6",
58
- "@types/nodemailer": "^6.4.4",
59
- "@types/nodemailer-direct-transport": "^1.0.32",
60
- "@types/slug": "^5.0.9",
61
- "copyfiles": "^2.4.1",
62
- "npm-run-all": "^4.1.5",
63
- "rimraf": "^5.0.1",
64
- "tslint": "^6.1.2",
65
- "typescript": "^5.2.2"
52
+ "@types/express": "^4.17.21",
53
+ "@types/fs-extra": "^11.0.4",
54
+ "@types/jsonwebtoken": "^9.0.9",
55
+ "@types/kind-of": "^6.0.3",
56
+ "@types/mysql": "^2.15.27",
57
+ "@types/node": "^22.15.21",
58
+ "@types/nodemailer": "^6.4.17",
59
+ "@typescript-eslint/eslint-plugin": "^8.34.0",
60
+ "@typescript-eslint/parser": "^8.34.0",
61
+ "eslint": "^9.28.0",
62
+ "eslint-config-prettier": "^10.1.5",
63
+ "eslint-plugin-prettier": "^5.4.1",
64
+ "npm-run-all2": "^5.0.2",
65
+ "prettier": "^3.5.3",
66
+ "rimraf": "^4.1.4",
67
+ "typescript": "^5.8.3"
66
68
  }
67
69
  }
@@ -0,0 +1,22 @@
1
+ const fs = require('fs-extra');
2
+ const path = require('path');
3
+
4
+ async function copyAssets() {
5
+ try {
6
+ const srcDir = path.join(__dirname, '..', 'src', 'tools', 'templates');
7
+ const destDir = path.join(__dirname, '..', 'dist', 'templates');
8
+
9
+ // Ensure destination directory exists
10
+ await fs.ensureDir(destDir);
11
+
12
+ // Copy all files from src/tools/templates to dist/templates
13
+ await fs.copy(srcDir, destDir);
14
+
15
+ console.log('Assets copied successfully');
16
+ } catch (error) {
17
+ console.error('Error copying assets:', error);
18
+ process.exit(1);
19
+ }
20
+ }
21
+
22
+ copyAssets();
@@ -8,7 +8,7 @@ import { EnvironmentBase } from "..";
8
8
  @injectable()
9
9
  export class CustomAuthProvider implements interfaces.AuthProvider {
10
10
  // public async getUser(req: express.Request, res: express.Response, next: express.NextFunction): Promise<interfaces.Principal> {
11
- public async getUser(req: express.Request, res: express.Response, next: express.NextFunction): Promise<Principal> {
11
+ public async getUser(req: express.Request, _res: express.Response, _next: express.NextFunction): Promise<Principal> {
12
12
  const authHeader = req.headers.authorization;
13
13
  if (authHeader) {
14
14
  const token = authHeader.split(" ")[1];
@@ -35,7 +35,7 @@ export class CustomBaseController extends BaseHttpController {
35
35
  return result;
36
36
  }
37
37
 
38
- public async actionWrapper(req: express.Request, res: express.Response, fetchFunction: (au: AuthenticatedUser) => any): Promise<any> {
38
+ public async actionWrapper(_req: express.Request, _res: express.Response, fetchFunction: (_au: AuthenticatedUser) => any): Promise<any> {
39
39
  try {
40
40
  const result = await fetchFunction(this.authUser());
41
41
  await this.logger.flush();
@@ -52,7 +52,7 @@ export class CustomBaseController extends BaseHttpController {
52
52
  }
53
53
  }
54
54
 
55
- public async actionWrapperAnon(req: express.Request, res: express.Response, fetchFunction: () => any): Promise<any> {
55
+ public async actionWrapperAnon(_req: express.Request, _res: express.Response, fetchFunction: () => any): Promise<any> {
56
56
  try {
57
57
  const result = await fetchFunction();
58
58
  await this.logger.flush();
@@ -1,4 +1,4 @@
1
- import { controller, httpPost, httpGet, interfaces, requestParam, httpDelete } from "inversify-express-utils";
1
+ import { controller, httpPost } from "inversify-express-utils";
2
2
  import express from "express";
3
3
  import { CustomBaseController } from "./CustomBaseController"
4
4
  import { ErrorLog } from "../models"
@@ -8,7 +8,7 @@ import { ErrorLog } from "../models"
8
8
  export class ErrorController extends CustomBaseController {
9
9
 
10
10
  @httpPost("/")
11
- public async save(req: express.Request<{}, {}, ErrorLog[]>, res: express.Response): Promise<any> {
11
+ public async save(req: express.Request<{}, {}, ErrorLog[]>, _res: express.Response): Promise<any> {
12
12
  // try {
13
13
  /*
14
14
  try {