@alevnyacow/nzmt 0.6.1 → 0.7.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/README.md +116 -145
- package/bin/cli.js +188 -131
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,171 +1,142 @@
|
|
|
1
|
-
# NZMT - Next Zod Modules Toolkit
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 4.199999809265137 529.1500244140625 37.34000015258789" data-asc="0.75" width="529.1500244140625" height="37.34000015258789"><defs/><g fill="#019ca9"><g transform="translate(0, 0)"><path d="M0.10 20.45Q0.10 20.30 0.05 20.15Q0 20 0.05 19.85Q0.10 19.85 0.23 19.82Q0.35 19.80 0.45 19.80L0.75 19.80Q1 19.75 1.25 19.77Q1.50 19.80 1.75 19.75L3.25 19.75Q3.35 19.75 3.45 19.85Q3.55 19.95 3.60 20L3.70 20.45Q3.70 20.60 3.75 20.80Q3.85 21.20 3.85 21.65Q3.90 21.80 3.90 21.95Q3.90 22.25 3.95 22.25Q4.15 22.05 4.25 21.82Q4.35 21.60 4.50 21.50Q4.65 21.35 4.73 21.30Q4.80 21.25 4.88 21.20Q4.95 21.15 5.10 21.07Q5.25 21 5.55 20.80Q6 20.55 6.38 20.40Q6.75 20.25 7.55 19.85Q7.70 19.80 8.08 19.70Q8.45 19.60 8.90 19.52Q9.35 19.45 9.83 19.43Q10.30 19.40 10.65 19.40Q11.20 19.45 11.55 19.52Q11.90 19.60 12.50 19.70Q12.75 19.75 13.33 19.80Q13.90 19.85 14.10 19.95Q15.35 20.65 16.10 21.15Q16.85 21.65 17.40 22.50Q17.50 22.60 17.70 22.73Q17.90 22.85 18.15 23.10Q18.40 23.35 18.63 23.77Q18.85 24.20 18.85 24.30Q19.05 25.15 19.30 25.67Q19.55 26.20 19.60 27.05Q19.65 27.45 19.85 27.92Q20.05 28.40 20.05 28.90Q20.05 29.40 20.10 30.02Q20.15 30.65 20.05 31.80Q20.05 32.15 20.08 32.45Q20.10 32.75 20.10 33.05L20.10 35.35Q20.10 35.70 20.10 36Q20.10 36.30 20.05 36.60Q20.05 37 20.08 37.30Q20.10 37.60 20.10 38Q20.10 38.10 20.10 38.23Q20.10 38.35 20 38.40Q19.90 38.45 19.73 38.45Q19.55 38.45 19.45 38.45Q19 38.45 18.60 38.48Q18.20 38.50 17.75 38.45L16.25 38.30Q16.05 38.25 15.70 38.30Q15.35 38.35 15.25 38.15Q15.20 37 15.23 36.52Q15.25 36.05 15.25 35.65Q15.25 35.40 15.20 35.02Q15.15 34.65 15.10 34L15.25 31.35Q15.25 30.85 15.23 30.57Q15.20 30.30 15.18 30.13Q15.15 29.95 15.13 29.70Q15.10 29.45 15.10 28.90Q15.10 28 14.78 27.10Q14.45 26.20 14 25.30Q13.75 24.80 13.35 24.40Q12.95 24 12.30 23.70Q12.20 23.65 12.05 23.60Q11.90 23.55 11.80 23.55L10.65 23.45Q9.80 23.40 8.90 23.75Q8 24.10 7.80 24.45Q7.45 25.05 7.25 25.35Q7.05 25.65 6.85 25.95Q6.80 26.10 6.70 26.48Q6.60 26.85 6.47 27.38Q6.35 27.90 6.25 28.48Q6.15 29.05 6.15 29.50Q6.15 29.85 6.15 30.18Q6.15 30.50 6.10 30.80L6 32.20L5.70 34.10Q5.70 34.60 5.70 35.17Q5.70 35.75 5.65 36.25L5.65 37.40Q5.35 37.60 5.15 37.60Q4.60 37.70 4.38 37.80Q4.15 37.90 3.55 37.85Q3 37.80 2.10 37.88Q1.20 37.95 0.65 37.85Q0.10 37.75 0.10 37.73Q0.10 37.70 0.10 37.45Q0.10 37.25 0.13 36.83Q0.15 36.40 0.15 35.92Q0.15 35.45 0.18 35Q0.20 34.55 0.20 34.30Q0.20 33.40 0.15 32.80Q0.10 32.20 0.10 31.30Q0.10 30.55 0.08 30.07Q0.05 29.60 0 28.85Q0 28.45 0.05 27.82Q0.10 27.20 0.10 26.50Q0.10 25.65 0.08 24.85Q0.05 24.05 0.05 23.65Q0 22.80 0 22.02Q0 21.25 0.10 20.45ZM39.55 27.90Q39.55 28.15 39.30 28.40Q39.15 28.55 38.85 28.60Q38.55 28.65 38.30 28.65Q37.95 28.75 37.45 28.75Q36.95 28.75 36.60 28.75Q35.90 28.75 35.55 28.77Q35.20 28.80 34.40 28.90L31.40 29.15L31.40 29.75Q31.40 30.30 31.55 30.82Q31.70 31.35 32.10 31.90Q32.35 32.30 32.70 32.65Q33.05 33 33.40 33.10Q33.70 33.20 33.95 33.30Q34.20 33.40 34.43 33.48Q34.65 33.55 34.85 33.50Q36.20 33.50 36.83 33.20Q37.45 32.90 38.35 32.45Q38.55 32.45 38.78 32.25Q39 32.05 39.10 32Q39.35 31.90 39.83 31.50Q40.30 31.10 40.55 31Q40.70 31.10 40.65 31.68Q40.60 32.25 40.70 32.75L40.70 33.30L40.70 34.30Q40.45 34.60 40.33 34.73Q40.20 34.85 40.13 34.95Q40.05 35.05 39.90 35.20Q39.75 35.35 39.45 35.65Q38.55 36.55 37.55 36.85Q37 37.15 36.35 37.27Q35.70 37.40 35.30 37.55Q35.05 37.60 34.85 37.63Q34.65 37.65 34.45 37.65L34.05 37.65Q33.10 37.65 32.20 37.63Q31.30 37.60 30.30 37.10Q29.95 37.15 29.33 36.90Q28.70 36.65 28.50 36.40Q27.95 36.10 27.53 35.65Q27.10 35.20 26.60 34.85Q25.90 34.35 25.60 33.80Q25.30 33.25 25.05 32.65Q24.80 32.20 24.60 31.65Q24.40 31.10 24.20 30.55Q24.20 30 24.18 29.50Q24.15 29 24.15 28.50L24.15 26.65Q24.15 25.75 24.53 24.50Q24.90 23.25 25.45 22.35Q25.60 22.15 25.80 21.95Q25.95 21.75 26.18 21.55Q26.40 21.35 26.65 21.10Q26.80 21.05 26.98 20.95Q27.15 20.85 27.50 20.65Q27.65 20.55 27.88 20.30Q28.10 20.05 28.50 19.95Q29.05 19.75 29.55 19.52Q30.05 19.30 30.30 19.30Q30.65 19.30 31.58 19.35Q32.50 19.40 33.35 19.45Q33.80 19.50 34.10 19.60Q34.40 19.70 34.55 19.70Q34.95 19.75 35.23 19.80Q35.50 19.85 35.80 19.95Q36.70 20.25 37.13 20.57Q37.55 20.90 37.85 21.25Q38.05 21.50 38.23 21.82Q38.40 22.15 38.60 22.40Q38.85 22.70 39.08 23.23Q39.30 23.75 39.40 24.25Q39.50 24.65 39.55 25.30Q39.60 25.95 39.60 26.45Q39.60 26.95 39.58 27.20Q39.55 27.45 39.55 27.90M35.25 25Q35.25 24.90 35.25 24.63Q35.25 24.35 35.15 24.25Q34.75 23.60 34.03 23.48Q33.30 23.35 32.75 23.45Q32.40 23.55 32.30 23.70Q32.20 23.85 32 24.15Q31.90 24.25 31.85 24.35Q31.80 24.45 31.70 24.55Q31.60 24.65 31.58 24.82Q31.55 25 31.50 25.15Q31.40 25.40 31.40 25.50Q31.40 25.60 31.50 26Q31.70 26.10 32.28 26.17Q32.85 26.25 33.48 26.25Q34.10 26.25 34.68 26.17Q35.25 26.10 35.45 26Q35.50 25.95 35.38 25.73Q35.25 25.50 35.25 25ZM57.70 21.70Q57.75 21.45 58.08 20.97Q58.40 20.50 58.65 20.20Q59.35 20.25 59.73 20.27Q60.10 20.30 60.60 20.20Q60.85 20.20 61.08 20.18Q61.30 20.15 61.55 20.20Q61.95 20.30 62.45 20.25Q62.95 20.20 63.35 20.20Q64.80 20.20 64.90 20.50Q64.45 21.20 63.98 21.70Q63.50 22.20 63 22.60Q62.60 23.10 62.15 23.70Q61.70 24.30 61.25 24.75Q60.75 25.20 60.33 25.82Q59.90 26.45 59.70 26.85Q59.20 27.40 58.75 28.07Q58.30 28.75 57.85 29.25Q58.20 29.75 58.48 30.13Q58.75 30.50 59.10 30.90Q59.45 31.25 59.88 31.68Q60.30 32.10 60.80 32.85Q61.75 33.85 62.88 34.88Q64 35.90 64.85 37.05Q65.05 37.20 65.42 37.63Q65.80 38.05 65.85 38.25Q65.85 38.50 65.80 38.52Q65.75 38.55 65.50 38.55Q65.40 38.60 65.25 38.60Q65.10 38.65 64.85 38.65Q64.40 38.65 63.95 38.60Q63.50 38.55 63 38.55Q62.60 38.55 62.28 38.55Q61.95 38.55 61.55 38.65Q61.30 38.65 61.03 38.70Q60.75 38.75 60.30 38.55Q60.30 38.45 60.10 38.20Q59.90 37.95 59.80 37.85Q59.60 37.60 59.45 37.42Q59.30 37.25 59.05 37L58.20 36.05Q57.95 35.80 57.70 35.63Q57.45 35.45 57.25 35.20Q56.85 34.65 56.55 34.23Q56.25 33.80 55.75 33.35Q55.50 33.10 55.42 32.98Q55.35 32.85 55.10 32.60Q54.85 32.75 54.63 32.92Q54.40 33.10 54.20 33.35Q53.50 34.05 52.98 34.83Q52.45 35.60 51.75 36.30L51 37.30Q50.80 37.45 50.63 37.88Q50.45 38.30 50.20 38.55L48.35 38.55Q47.70 38.55 47.02 38.42Q46.35 38.30 45.60 38.55L43.75 38.55Q43.75 38.30 43.80 38.23Q43.85 38.15 44.10 37.90Q45 36.55 46.60 35.20Q46.75 34.95 47 34.58Q47.25 34.20 47.50 33.95Q47.90 33.70 48.20 33.13Q48.50 32.55 49 32.15Q49.45 31.60 49.90 30.98Q50.35 30.35 50.80 29.80Q51 29.65 51 29.50Q51 29.25 50.85 29.05L49.85 27.65Q49.60 27.35 49.30 27.05Q49 26.75 48.75 26.45Q48.35 25.90 47.90 25.35Q47.45 24.80 47.05 24.40L45.45 22.50Q45.20 22.25 44.75 21.67Q44.30 21.10 44.10 20.75L44.10 20.50L44.40 20.50Q44.95 20.50 45.73 20.47Q46.50 20.45 47.05 20.45Q47.60 20.45 47.95 20.47Q48.30 20.50 48.80 20.40Q49.05 20.40 49.58 20.43Q50.10 20.45 50.20 20.50Q50.45 20.70 50.58 20.95Q50.70 21.20 50.85 21.40Q51.55 22.10 52.02 22.77Q52.50 23.45 52.95 24.15Q53.20 24.60 53.42 24.88Q53.65 25.15 53.90 25.60L54.30 26Q54.50 25.85 54.63 25.67Q54.75 25.50 54.90 25.30Q55.15 25.15 55.65 24.50Q56.20 23.80 56.80 23Q57.40 22.20 57.70 21.70ZM79.35 36.25Q79.35 36.80 79.32 37.40Q79.30 38 79.35 38.55Q79.35 38.85 79.35 39.42Q79.35 40 79.30 40.30Q79.35 40.50 79.20 40.67Q79.05 40.85 78.95 40.95L77.65 40.95Q77.40 40.95 77.07 40.92Q76.75 40.90 76.50 40.90Q76.30 41 75.95 41Q75.60 41 75.22 41Q74.85 41 74.52 40.98Q74.20 40.95 74.15 40.95Q73.90 40.70 73.88 40.63Q73.85 40.55 73.85 40.30L73.85 35.50L73.75 32.55L73.85 29.20L73.80 26.30L73.60 23.90Q73 23.90 72.15 23.95Q71.30 24 70.85 23.90Q70 23.75 69.52 23.82Q69.05 23.90 68.35 23.90L68.35 20.70L68.65 20.70Q68.90 20.70 69.07 20.68Q69.25 20.65 69.35 20.70Q69.60 20.90 70.07 20.82Q70.55 20.75 70.50 20.65Q71.05 20.60 71.17 20.60Q71.30 20.60 71.75 20.60Q72.15 20.60 72.92 20.63Q73.70 20.65 73.95 20.60Q73.95 20.60 73.95 20.30Q73.95 20 73.95 19.60Q73.95 19.20 73.95 18.75Q73.95 18.30 73.95 18.05Q74.05 17.10 74.07 16.32Q74.10 15.55 74.15 14.55Q74.20 13.85 74.20 13.20Q74.20 12.55 74.20 11.85Q74.20 11.15 74.27 10.13Q74.35 9.10 74.30 8.30Q74.30 8.05 74.22 7.97Q74.15 7.90 74.15 7.65Q74.15 7.40 74.20 7.27Q74.25 7.15 74.50 7.15Q74.95 7.15 75.45 7.20Q75.95 7.25 76.40 7.25Q77.15 7.25 77.77 7.25Q78.40 7.25 78.80 7.30Q79.55 7.40 79.95 7.50Q79.95 7.50 79.95 7.72Q79.95 7.95 79.95 8.27Q79.95 8.60 79.92 8.95Q79.90 9.30 79.90 9.60Q79.85 10.85 79.85 11.77Q79.85 12.70 79.90 13.95Q79.90 14.50 79.88 15.10Q79.85 15.70 79.90 16.25Q79.90 16.40 79.88 16.90Q79.85 17.40 79.80 17.97Q79.75 18.55 79.70 19.05Q79.65 19.55 79.65 19.70Q79.65 19.95 79.75 20.15Q79.85 20.35 79.95 20.35Q80.20 20.35 80.60 20.43Q81 20.50 81.25 20.50Q81.50 20.50 81.77 20.57Q82.05 20.65 82.55 20.65Q83 20.65 83.47 20.68Q83.95 20.70 84.50 20.70Q84.60 20.70 84.70 20.72Q84.80 20.75 84.90 20.75L85.10 20.75Q85.35 21.50 85.35 22.45Q85.35 23.40 85.10 23.90L84.80 23.90Q83.80 24 82.85 24.07Q81.90 24.15 80.90 24.15Q80.65 24.15 80.30 24.17Q79.95 24.20 79.70 24.20Q79.70 24.30 79.67 24.42Q79.65 24.55 79.65 24.65L79.65 24.85L79.65 25.30Q79.65 25.75 79.67 26.13Q79.70 26.50 79.65 26.90L79.75 29.55L79.55 31.80Q79.55 32.05 79.52 32.67Q79.50 33.30 79.47 34.02Q79.45 34.75 79.40 35.38Q79.35 36 79.35 36.25ZM143.75 38.10Q143.75 38.15 143.65 38.30Q143.55 38.45 143.45 38.45Q143.35 38.45 142.93 38.45Q142.50 38.45 142 38.45Q141.50 38.45 141.05 38.45Q140.60 38.45 140.50 38.45Q140.40 38.40 139.92 38.38Q139.45 38.35 138.88 38.30Q138.30 38.25 137.78 38.25Q137.25 38.25 137.05 38.30Q136.90 38.35 136.70 38.40Q136.50 38.45 136.30 38.45Q135.75 38.45 134.95 38.48Q134.15 38.50 133.80 38.55Q133.35 38.65 132.92 38.63Q132.50 38.60 132.05 38.60L129.25 38.70L123.45 38.70Q123.35 38.45 123.40 38.27Q123.45 38.10 123.45 37.80L123.45 34.25L123.80 33.90Q124.55 33.40 125.27 32.70Q126 32 127 31Q127.50 30.75 127.88 30.40Q128.25 30.05 128.70 29.80Q129.45 29.10 130.13 28.32Q130.80 27.55 131.50 26.80Q131.75 26.60 132.15 26.20Q132.55 25.80 132.80 25.55Q133.25 25.25 133.80 24.80Q134.35 24.35 134.45 24.10Q134.55 24 134.80 23.75Q135.05 23.50 135 23.45Q134.90 23.35 134.85 23.32Q134.80 23.30 134.55 23.30Q134 23.30 133.13 23.32Q132.25 23.35 131.90 23.40Q131.45 23.50 131.03 23.52Q130.60 23.55 130.15 23.60L128.40 23.60Q127.75 23.65 127.10 23.75Q126.45 23.85 125.90 23.75Q125.80 23.70 125.65 23.70Q125.50 23.70 125.40 23.60Q125.30 23.45 125.32 23.32Q125.35 23.20 125.35 23.10Q125.35 22.80 125.38 22.45Q125.40 22.10 125.40 21.30Q125.40 21 125.38 20.75Q125.35 20.50 125.40 20.40Q125.65 20.40 125.82 20.40Q126 20.40 126.25 20.45L126.65 20.45Q127.35 20.45 128.38 20.32Q129.40 20.20 130.10 20.20Q130.50 20.20 130.70 20.25Q130.90 20.30 131.30 20.30Q131.85 20.30 132.17 20.27Q132.50 20.25 133.05 20.20Q133.15 20.20 133.25 20.18Q133.35 20.15 133.55 20.15Q134.15 20.10 134.67 20.13Q135.20 20.15 135.60 20.10Q136.10 20.05 136.78 20.13Q137.45 20.20 137.90 20.20Q139.45 20.20 140.65 20.20Q141.85 20.20 142.10 20.40L142.10 25.45Q141.85 25.85 141.63 26.13Q141.40 26.40 141.13 26.67Q140.85 26.95 140.53 27.25Q140.20 27.55 139.70 27.95Q138.80 28.75 138.35 29.02Q137.90 29.30 137.40 29.65Q136.15 30.80 135.07 31.70Q134 32.60 132.80 33.60Q132.30 33.85 132.03 34.10Q131.75 34.35 131.50 34.60Q131.25 34.80 131.05 34.88Q130.85 34.95 130.85 35.20L131.20 35.20Q131.75 35.15 133.10 35.13Q134.45 35.10 135.90 35.10Q136.90 35.10 137.75 35.17Q138.60 35.25 139.15 35.25L142.75 35.20Q143.05 35.20 143.32 35.20Q143.60 35.20 143.75 35.25Q143.75 35.40 143.78 35.55Q143.80 35.70 143.75 35.80Q143.65 36.15 143.68 36.42Q143.70 36.70 143.70 37.05Q143.70 37.15 143.70 37.42Q143.70 37.70 143.75 38.10ZM151.35 19.35Q151.70 19.25 152.20 19.05Q152.70 18.85 153.20 18.85Q153.85 18.85 154.40 18.82Q154.95 18.80 155.60 18.80Q156.10 18.80 156.58 18.82Q157.05 18.85 157.45 19Q157.55 19 157.70 19.05Q157.85 19.10 158.10 19.35Q158.60 19.50 159.05 19.85Q159.50 20.20 159.88 20.70Q160.25 21.20 160.58 21.73Q160.90 22.25 161.15 22.75Q161.40 23.15 161.48 23.80Q161.55 24.45 161.70 24.85Q161.70 25.55 161.78 26.20Q161.85 26.85 161.85 27.55Q161.85 28.70 161.80 29.75Q161.75 30.80 161.75 31.95L161.65 33.60Q161.65 33.80 161.45 34.30Q161.25 34.80 161.20 35.05Q161.05 35.55 160.80 36.23Q160.55 36.90 160.45 37Q160.20 37.25 160.10 37.45Q160 37.65 159.93 37.85Q159.85 38.05 159.73 38.20Q159.60 38.35 159.30 38.50Q159.05 38.60 158.70 38.83Q158.35 39.05 158.05 39.25Q157.80 39.35 157.80 39.42Q157.80 39.50 157.45 39.60L156.55 39.80Q155.95 39.90 155.58 39.85Q155.20 39.80 154.75 39.80Q153.35 39.80 151.95 39.25Q151.50 39.25 151.08 39.05Q150.65 38.85 150.45 38.60Q150.20 38.40 149.95 38.17Q149.70 37.95 149.45 37.70Q149.05 37.25 148.80 36.80Q148.55 36.35 148.30 35.85Q148.05 35.30 147.75 34.73Q147.45 34.15 147.35 33.45Q147.25 32.30 147.18 31.35Q147.10 30.40 147.10 29.45L147.10 27.40Q147.05 27.30 147.05 27Q147.05 26.70 147.10 26.60Q147.10 26.35 147.13 26.07Q147.15 25.80 147.20 25.55Q147.25 25.15 147.25 24.75Q147.25 24.35 147.50 23.95Q147.45 24.05 147.58 23.77Q147.70 23.50 147.85 23.17Q148 22.85 148.10 22.60Q148.20 22.35 148.20 22.40L148.55 21.75Q148.70 21.60 148.85 21.40Q149 21.20 149.28 20.95Q149.55 20.70 150.03 20.30Q150.50 19.90 151.35 19.35M155 27.65Q154.80 27.65 154.63 27.85Q154.45 28.05 154.40 28.20Q154.05 28.95 154.05 29.45Q154.05 30.80 155 31.25Q155.25 31.25 155.43 31.07Q155.60 30.90 155.60 30.70Q155.60 30.20 155.73 29.55Q155.85 28.90 155.60 28.20Q155.35 27.95 155.30 27.80Q155.25 27.65 155 27.65ZM179.60 19.95Q179.65 18.75 179.80 17.13Q179.95 15.50 180.10 14.30Q180.00 13.55 180.10 12.77Q180.20 12 180.15 11.25Q180.15 10.95 180.18 10.63Q180.20 10.30 180.20 10Q180.45 8.80 180.45 7.55Q180.45 6.30 180.70 4.80L180.70 4.20Q181.70 4.45 182.58 4.63Q183.45 4.80 184.40 4.80Q184.15 5.55 184.10 6.30Q184.05 7.05 184.05 7.75Q184.05 9.20 183.93 10.63Q183.80 12.05 183.80 13.50Q183.80 13.80 183.75 14.13Q183.70 14.45 183.70 14.75Q183.75 15.15 183.73 15.75Q183.70 16.35 183.70 17Q183.70 17.65 183.73 18.25Q183.75 18.85 183.85 19.25Q183.70 20.45 183.78 21.67Q183.85 22.90 183.80 24.10Q183.70 24.95 183.75 25.73Q183.80 26.50 183.80 27.35Q183.80 28.20 183.83 29.05Q183.85 29.90 183.85 30.75Q183.85 31.60 183.70 32.77Q183.55 33.95 183.60 34.80Q183.60 36 183.53 36.90Q183.45 37.80 183.45 38.80Q183.45 39.25 183.20 39.38Q182.95 39.50 182.40 39.50Q181.70 39.60 181.15 39.55Q180.60 39.50 179.90 39.50Q179.40 39.50 179.33 39.30Q179.25 39.10 179.25 38.90L179.25 38Q179.20 37.95 179.15 37.85Q179.10 37.75 179.05 37.73Q179.00 37.70 178.95 37.65Q178.70 37.90 178.25 38Q177.80 38.10 177.35 38.35Q176.60 38.85 175.68 39.05Q174.75 39.25 173.75 39.25Q173.05 39.25 172.53 39.23Q172.00 39.20 171.55 39Q171.30 39 171.23 38.83Q171.15 38.65 170.90 38.65Q169.90 38.15 169.15 37.63Q168.40 37.10 167.70 36.40Q166.95 35.65 166.58 34.90Q166.20 34.15 165.70 33.15Q165.50 32.45 165.43 31.73Q165.35 31 165.10 30.30Q165.10 29.30 165.18 28.38Q165.25 27.45 165.70 26.75Q165.95 25.50 166.65 24.55Q167.35 23.60 168.30 22.90Q168.80 22.40 169.48 22.10Q170.15 21.80 170.90 21.55Q171.40 21.55 172.03 21.52Q172.65 21.50 173.15 21.25Q173.85 21.25 174.43 21.27Q175.00 21.30 175.75 21.55Q175.95 21.80 176.35 21.90Q176.75 22 177.00 22.25Q177.45 22.50 177.95 22.73Q178.45 22.95 178.95 23.15Q179.20 22.95 179.20 22.52Q179.20 22.10 179.45 21.55Q179.45 21.30 179.53 20.90Q179.60 20.50 179.60 19.95M173.75 26.10Q172.80 26.60 172.33 27.63Q171.85 28.65 171.85 29.60Q171.85 30.15 172.00 30.45Q172.15 30.75 172.15 31.20Q172.15 31.95 172.60 32.45Q173.05 32.95 173.75 33.50Q174.35 34 175.40 33.50Q175.85 32.95 176.43 32.42Q177.00 31.90 177.00 30.95Q177.25 29.95 177.10 29.20Q176.95 28.45 176.70 27.70Q176.45 27 175.80 26.55Q175.15 26.10 174.40 26.10L173.75 26.10ZM250.20 36.90Q250.30 35.75 250.25 34.83Q250.20 33.90 250.20 33.20Q250.05 32.60 250.00 31.98Q249.95 31.35 249.85 30.80Q249.60 30.10 249.53 29.38Q249.45 28.65 249.20 27.95Q249.20 27.20 248.93 26.52Q248.65 25.85 247.95 25.35Q247.40 25.10 246.95 24.90Q246.50 24.70 246.00 24.70Q245.75 24.85 245.18 25.20Q244.60 25.55 244.35 26.10Q244.10 26.70 243.93 27.17Q243.75 27.65 243.55 27.95Q243.25 28.45 243.25 29.15Q243.25 29.85 243.20 30.40Q243.20 30.50 243.15 30.88Q243.10 31.25 243.05 31.70Q243.00 32.15 242.95 32.52Q242.90 32.90 242.90 33L242.50 35.90Q242.50 36.25 242.48 36.58Q242.45 36.90 242.45 37.25Q242.45 37.50 242.40 37.75Q242.35 38 242.35 38.25L242.05 38.25Q241.45 38.35 240.78 38.35Q240.10 38.35 239.20 38.25Q238.95 38.20 238.78 38.15Q238.60 38.10 238.60 37.60Q238.60 37 238.58 36.50Q238.55 36 238.55 35.45Q238.60 34.70 238.60 33.92Q238.60 33.15 238.45 32.25Q238.45 31.60 238.30 30.85Q238.15 30.10 238.05 29.40Q237.95 28.75 237.95 28.07Q237.95 27.40 237.70 26.85Q237.55 26.35 237.38 25.92Q237.20 25.50 236.95 25Q236.90 24.90 236.85 24.88Q236.80 24.85 236.75 24.80L236.40 24.65Q235.85 24.30 235.05 24.15L234.85 24.15L233.75 24.30Q232.75 24.45 232.15 25Q230.70 26.45 230.25 28.85Q229.95 29.30 229.90 29.77Q229.85 30.25 229.75 30.70Q229.65 31.25 229.63 31.82Q229.60 32.40 229.55 32.95Q229.55 33.35 229.43 33.75Q229.30 34.15 229.40 34.50Q229.40 34.60 229.38 34.95Q229.35 35.30 229.33 35.70Q229.30 36.10 229.28 36.45Q229.25 36.80 229.25 36.90Q229.15 37.10 229.15 37.70Q229.15 38.30 229.10 38.40Q228.85 38.40 228.53 38.48Q228.20 38.55 227.85 38.65Q227.55 38.75 227.15 38.70Q226.75 38.65 226.40 38.55Q225.65 38.40 225.30 38.40Q224.95 38.40 224.40 38.25Q224.40 37.95 224.38 37.48Q224.35 37 224.28 36.48Q224.20 35.95 224.18 35.45Q224.15 34.95 224.15 34.70Q224.15 34.55 224.13 34.17Q224.10 33.80 224.08 33.38Q224.05 32.95 224.00 32.58Q223.95 32.20 223.95 32.05Q223.90 31.55 223.90 31.15Q223.90 30.75 223.90 30.25Q223.95 29.75 223.95 29.30Q223.95 28.85 223.95 28.40L223.95 24.25Q223.95 24.10 223.98 23.48Q224.00 22.85 224.03 22.15Q224.05 21.45 224.08 20.82Q224.10 20.20 224.10 20.05Q224.35 20.05 224.75 20Q225.15 19.95 225.40 19.95Q225.90 19.95 226.33 19.93Q226.75 19.90 227.20 19.90Q227.70 19.90 227.70 19.88Q227.70 19.85 227.90 19.90Q228.05 20.35 228.03 20.47Q228.00 20.60 228.10 20.95Q228.15 21.20 228.23 21.55Q228.30 21.90 228.30 22.15L228.30 22.40Q228.75 21.95 229.20 21.67Q229.65 21.40 229.90 21.15Q230.60 20.60 231.35 20.40Q232.10 20.20 233.05 20.05L235.30 19.80L235.65 19.80Q236.40 19.95 237.00 20.13Q237.60 20.30 238.25 20.70L239.50 21.80Q239.80 22 239.90 22.15Q240.15 22.35 240.38 22.63Q240.60 22.90 240.80 23.40Q241.05 23.15 241.25 22.92Q241.45 22.70 241.70 22.45Q241.80 22.35 241.98 22.25Q242.15 22.15 242.40 22.05Q242.80 21.80 243.00 21.63Q243.20 21.45 243.60 21.25Q243.85 21.15 244.18 21.05Q244.50 20.95 244.75 20.80Q245.95 20.30 246.93 20.60Q247.90 20.90 248.85 21.15Q249.60 21.40 250.13 21.90Q250.65 22.40 251.15 23.10L252.10 25Q252.35 25.75 252.58 26.48Q252.80 27.20 252.80 27.95Q253.00 28.90 253.20 29.88Q253.40 30.85 253.40 32.05Q253.65 32.80 253.55 33.70Q253.45 34.60 253.70 35.30L253.70 37.90Q253.20 37.90 252.93 38.08Q252.65 38.25 252.10 38.25Q251.85 38.25 251.45 38.33Q251.05 38.40 250.80 38.50Q250.55 38.50 250.38 38.48Q250.20 38.45 250.20 38.25L250.20 36.90ZM262.25 19.35Q262.60 19.25 263.10 19.05Q263.60 18.85 264.10 18.85Q264.75 18.85 265.30 18.82Q265.85 18.80 266.50 18.80Q267.00 18.80 267.48 18.82Q267.95 18.85 268.35 19Q268.45 19 268.60 19.05Q268.75 19.10 269.00 19.35Q269.50 19.50 269.95 19.85Q270.40 20.20 270.78 20.70Q271.15 21.20 271.48 21.73Q271.80 22.25 272.05 22.75Q272.30 23.15 272.38 23.80Q272.45 24.45 272.60 24.85Q272.60 25.55 272.68 26.20Q272.75 26.85 272.75 27.55Q272.75 28.70 272.70 29.75Q272.65 30.80 272.65 31.95L272.55 33.60Q272.55 33.80 272.35 34.30Q272.15 34.80 272.10 35.05Q271.95 35.55 271.70 36.23Q271.45 36.90 271.35 37Q271.10 37.25 271.00 37.45Q270.90 37.65 270.83 37.85Q270.75 38.05 270.63 38.20Q270.50 38.35 270.20 38.50Q269.95 38.60 269.60 38.83Q269.25 39.05 268.95 39.25Q268.70 39.35 268.70 39.42Q268.70 39.50 268.35 39.60L267.45 39.80Q266.85 39.90 266.48 39.85Q266.10 39.80 265.65 39.80Q264.25 39.80 262.85 39.25Q262.40 39.25 261.98 39.05Q261.55 38.85 261.35 38.60Q261.10 38.40 260.85 38.17Q260.60 37.95 260.35 37.70Q259.95 37.25 259.70 36.80Q259.45 36.35 259.20 35.85Q258.95 35.30 258.65 34.73Q258.35 34.15 258.25 33.45Q258.15 32.30 258.08 31.35Q258.00 30.40 258.00 29.45L258.00 27.40Q257.95 27.30 257.95 27Q257.95 26.70 258.00 26.60Q258.00 26.35 258.03 26.07Q258.05 25.80 258.10 25.55Q258.15 25.15 258.15 24.75Q258.15 24.35 258.40 23.95Q258.35 24.05 258.48 23.77Q258.60 23.50 258.75 23.17Q258.90 22.85 259.00 22.60Q259.10 22.35 259.10 22.40L259.45 21.75Q259.60 21.60 259.75 21.40Q259.90 21.20 260.18 20.95Q260.45 20.70 260.93 20.30Q261.40 19.90 262.25 19.35M265.90 27.65Q265.70 27.65 265.53 27.85Q265.35 28.05 265.30 28.20Q264.95 28.95 264.95 29.45Q264.95 30.80 265.90 31.25Q266.15 31.25 266.33 31.07Q266.50 30.90 266.50 30.70Q266.50 30.20 266.63 29.55Q266.75 28.90 266.50 28.20Q266.25 27.95 266.20 27.80Q266.15 27.65 265.90 27.65ZM290.50 19.95Q290.55 18.75 290.70 17.13Q290.85 15.50 291.00 14.30Q290.90 13.55 291.00 12.77Q291.10 12 291.05 11.25Q291.05 10.95 291.08 10.63Q291.10 10.30 291.10 10Q291.35 8.80 291.35 7.55Q291.35 6.30 291.60 4.80L291.60 4.20Q292.60 4.45 293.48 4.63Q294.35 4.80 295.30 4.80Q295.05 5.55 295.00 6.30Q294.95 7.05 294.95 7.75Q294.95 9.20 294.83 10.63Q294.70 12.05 294.70 13.50Q294.70 13.80 294.65 14.13Q294.60 14.45 294.60 14.75Q294.65 15.15 294.63 15.75Q294.60 16.35 294.60 17Q294.60 17.65 294.63 18.25Q294.65 18.85 294.75 19.25Q294.60 20.45 294.68 21.67Q294.75 22.90 294.70 24.10Q294.60 24.95 294.65 25.73Q294.70 26.50 294.70 27.35Q294.70 28.20 294.73 29.05Q294.75 29.90 294.75 30.75Q294.75 31.60 294.60 32.77Q294.45 33.95 294.50 34.80Q294.50 36 294.43 36.90Q294.35 37.80 294.35 38.80Q294.35 39.25 294.10 39.38Q293.85 39.50 293.30 39.50Q292.60 39.60 292.05 39.55Q291.50 39.50 290.80 39.50Q290.30 39.50 290.23 39.30Q290.15 39.10 290.15 38.90L290.15 38Q290.10 37.95 290.05 37.85Q290.00 37.75 289.95 37.73Q289.90 37.70 289.85 37.65Q289.60 37.90 289.15 38Q288.70 38.10 288.25 38.35Q287.50 38.85 286.58 39.05Q285.65 39.25 284.65 39.25Q283.95 39.25 283.43 39.23Q282.90 39.20 282.45 39Q282.20 39 282.13 38.83Q282.05 38.65 281.80 38.65Q280.80 38.15 280.05 37.63Q279.30 37.10 278.60 36.40Q277.85 35.65 277.48 34.90Q277.10 34.15 276.60 33.15Q276.40 32.45 276.33 31.73Q276.25 31 276.00 30.30Q276.00 29.30 276.08 28.38Q276.15 27.45 276.60 26.75Q276.85 25.50 277.55 24.55Q278.25 23.60 279.20 22.90Q279.70 22.40 280.38 22.10Q281.05 21.80 281.80 21.55Q282.30 21.55 282.93 21.52Q283.55 21.50 284.05 21.25Q284.75 21.25 285.33 21.27Q285.90 21.30 286.65 21.55Q286.85 21.80 287.25 21.90Q287.65 22 287.90 22.25Q288.35 22.50 288.85 22.73Q289.35 22.95 289.85 23.15Q290.10 22.95 290.10 22.52Q290.10 22.10 290.35 21.55Q290.35 21.30 290.43 20.90Q290.50 20.50 290.50 19.95M284.65 26.10Q283.70 26.60 283.23 27.63Q282.75 28.65 282.75 29.60Q282.75 30.15 282.90 30.45Q283.05 30.75 283.05 31.20Q283.05 31.95 283.50 32.45Q283.95 32.95 284.65 33.50Q285.25 34 286.30 33.50Q286.75 32.95 287.33 32.42Q287.90 31.90 287.90 30.95Q288.15 29.95 288.00 29.20Q287.85 28.45 287.60 27.70Q287.35 27 286.70 26.55Q286.05 26.10 285.30 26.10L284.65 26.10ZM303.90 38.10Q303.10 37.80 302.20 37.17Q301.30 36.55 300.90 36.25Q300.65 36 300.48 35.85Q300.30 35.70 300.25 35.45Q299.90 34.70 299.48 34.15Q299.05 33.60 298.90 32.90Q298.75 32.20 298.63 31.48Q298.50 30.75 298.40 30.10Q298.40 29.40 298.35 28.80Q298.30 28.20 298.30 27.50Q298.30 26.75 298.38 26.15Q298.45 25.55 298.45 24.80Q298.45 24.30 298.43 23.77Q298.40 23.25 298.40 22.75L298.40 22.05Q298.40 21.60 298.48 21.13Q298.55 20.65 298.55 20.15Q299.15 20.10 300.03 20.13Q300.90 20.15 301.35 20.15Q301.50 20.20 302.03 20.15Q302.55 20.10 302.75 20.10Q303.00 20.10 303.83 20.10Q304.65 20.10 304.90 20.15Q304.85 20.40 304.80 20.60Q304.75 20.80 304.75 21Q304.75 21.20 304.75 21.30Q304.75 22 304.70 22.55Q304.65 23.10 304.65 23.70Q304.65 24 304.68 24.88Q304.70 25.75 304.75 26.75Q304.80 27.75 304.88 28.63Q304.95 29.50 305.00 29.80Q305.00 30.30 305.03 30.63Q305.05 30.95 305.10 31.45Q305.15 32 305.38 32.38Q305.60 32.75 305.70 32.85L306.00 33.65L306.70 34.55Q307.05 35 307.65 35.08Q308.25 35.15 308.80 35.10L309.95 35Q310.35 34.95 310.85 34.48Q311.35 34 311.75 33.75Q312.00 33.50 312.18 33.02Q312.35 32.55 312.50 32.05Q312.50 32 312.60 31.60Q312.70 31.20 312.83 30.73Q312.95 30.25 313.03 29.82Q313.10 29.40 313.10 29.35Q313.15 28.95 313.20 28.45Q313.25 27.95 313.20 27.55Q313.10 27.10 313.20 26.55Q313.30 26 313.30 25.50Q313.30 25.10 313.35 24.60Q313.40 24.10 313.45 23.85Q313.45 23.90 313.48 23.65Q313.50 23.40 313.50 23.10Q313.50 22.80 313.50 22.52Q313.50 22.25 313.50 22.20Q313.45 21.90 313.38 21.63Q313.30 21.35 313.30 21.05Q313.30 20.90 313.35 20.75Q313.40 20.60 313.40 20.45L314.45 20.45Q314.65 20.45 314.83 20.50Q315.00 20.55 315.10 20.55Q315.60 20.55 315.95 20.57Q316.30 20.60 316.55 20.55Q316.80 20.45 316.95 20.47Q317.10 20.50 317.35 20.45Q317.75 20.55 318.03 20.47Q318.30 20.40 318.75 20.45Q318.80 20.70 318.73 21.15Q318.65 21.60 318.65 22.05Q318.65 23 318.68 23.98Q318.70 24.95 318.65 25.95Q318.60 26.50 318.63 27Q318.65 27.50 318.55 28Q318.55 28.10 318.55 28.38Q318.55 28.65 318.55 28.95Q318.55 29.25 318.55 29.52Q318.55 29.80 318.55 29.85Q318.65 30.40 318.65 31.20Q318.65 32 318.60 32.88Q318.55 33.75 318.53 34.55Q318.50 35.35 318.50 35.90Q318.50 36.65 318.55 37.38Q318.60 38.10 318.60 38.85Q317.40 39.10 316.28 39.08Q315.15 39.05 313.95 39.15Q313.80 38.95 313.80 38.50Q313.80 38.25 313.78 38.05Q313.75 37.85 313.70 37.60Q313.65 37.45 313.65 37.10Q313.65 36.95 313.60 36.85Q313.50 36.85 313.30 37.10Q313.10 37.35 312.85 37.45Q312.35 37.70 311.88 37.92Q311.40 38.15 310.90 38.25Q309.90 38.70 308.70 38.77Q307.50 38.85 306.20 38.85Q305.45 38.85 304.93 38.60Q304.40 38.35 303.90 38.10ZM327.05 24.60Q327.10 24.70 327.10 25.10Q327.10 25.50 327.10 25.70Q327.00 25.95 327.00 26.17Q327.00 26.40 327.00 26.65Q327.00 26.95 327.05 27.77Q327.10 28.60 327.10 28.95L327.10 30.05Q327.10 30.50 327.13 30.95Q327.15 31.40 327.15 31.85Q327.15 32.20 327.10 32.52Q327.05 32.85 327.10 33.20Q327.10 33.50 327.15 33.77Q327.20 34.05 327.20 34.35L327.20 38.90Q327.20 39.15 327.28 39.40Q327.35 39.65 327.20 39.60Q326.70 39.60 326.05 39.73Q325.40 39.85 324.85 39.85Q324.40 39.85 324.08 39.80Q323.75 39.75 323.20 39.50L323.20 38.85Q322.95 37.90 322.93 37.13Q322.90 36.35 322.90 35.65Q322.90 35.10 322.90 34.63Q322.90 34.15 323.00 33.65Q323.00 33.40 322.90 33.25Q322.90 33.20 322.88 32.98Q322.85 32.75 322.85 32.50Q322.85 32.25 322.85 32.02Q322.85 31.80 322.85 31.70L322.85 29.60Q322.85 29 322.83 28.40Q322.80 27.80 322.90 27.20Q322.95 27.15 322.98 26.73Q323.00 26.30 323.05 25.77Q323.10 25.25 323.13 24.77Q323.15 24.30 323.15 24.20Q323.20 23.40 323.18 22.60Q323.15 21.80 323.20 21.05Q323.20 19.60 323.18 18.22Q323.15 16.85 323.20 15.45Q323.20 14.55 323.20 13.67Q323.20 12.80 323.15 11.95Q323.10 11.50 323.13 11.25Q323.15 11 323.18 10.77Q323.20 10.55 323.23 10.30Q323.25 10.05 323.20 9.55Q323.20 9.05 323.25 8.57Q323.30 8.10 323.30 7.65Q323.30 7.15 323.28 6.80Q323.25 6.45 323.25 5.95L323.50 5.70Q324.00 5.70 324.60 5.75Q325.20 5.80 325.65 5.75Q326.05 5.70 326.25 5.70Q326.45 5.70 326.85 5.70Q327.10 5.70 327.25 5.85Q327.35 7.50 327.25 9.10Q327.15 10.70 327.15 12.45L327.15 15.95Q327.10 17.75 327.03 19.30Q326.95 20.85 326.95 22.35Q326.95 22.90 327.00 23.48Q327.05 24.05 327.05 24.60ZM346.70 27.90Q346.70 28.15 346.45 28.40Q346.30 28.55 346.00 28.60Q345.70 28.65 345.45 28.65Q345.10 28.75 344.60 28.75Q344.10 28.75 343.75 28.75Q343.05 28.75 342.70 28.77Q342.35 28.80 341.55 28.90L338.55 29.15L338.55 29.75Q338.55 30.30 338.70 30.82Q338.85 31.35 339.25 31.90Q339.50 32.30 339.85 32.65Q340.20 33 340.55 33.10Q340.85 33.20 341.10 33.30Q341.35 33.40 341.58 33.48Q341.80 33.55 342.00 33.50Q343.35 33.50 343.98 33.20Q344.60 32.90 345.50 32.45Q345.70 32.45 345.93 32.25Q346.15 32.05 346.25 32Q346.50 31.90 346.98 31.50Q347.45 31.10 347.70 31Q347.85 31.10 347.80 31.68Q347.75 32.25 347.85 32.75L347.85 33.30L347.85 34.30Q347.60 34.60 347.48 34.73Q347.35 34.85 347.28 34.95Q347.20 35.05 347.05 35.20Q346.90 35.35 346.60 35.65Q345.70 36.55 344.70 36.85Q344.15 37.15 343.50 37.27Q342.85 37.40 342.45 37.55Q342.20 37.60 342.00 37.63Q341.80 37.65 341.60 37.65L341.20 37.65Q340.25 37.65 339.35 37.63Q338.45 37.60 337.45 37.10Q337.10 37.15 336.48 36.90Q335.85 36.65 335.65 36.40Q335.10 36.10 334.68 35.65Q334.25 35.20 333.75 34.85Q333.05 34.35 332.75 33.80Q332.45 33.25 332.20 32.65Q331.95 32.20 331.75 31.65Q331.55 31.10 331.35 30.55Q331.35 30 331.33 29.50Q331.30 29 331.30 28.50L331.30 26.65Q331.30 25.75 331.68 24.50Q332.05 23.25 332.60 22.35Q332.75 22.15 332.95 21.95Q333.10 21.75 333.33 21.55Q333.55 21.35 333.80 21.10Q333.95 21.05 334.13 20.95Q334.30 20.85 334.65 20.65Q334.80 20.55 335.03 20.30Q335.25 20.05 335.65 19.95Q336.20 19.75 336.70 19.52Q337.20 19.30 337.45 19.30Q337.80 19.30 338.73 19.35Q339.65 19.40 340.50 19.45Q340.95 19.50 341.25 19.60Q341.55 19.70 341.70 19.70Q342.10 19.75 342.38 19.80Q342.65 19.85 342.95 19.95Q343.85 20.25 344.28 20.57Q344.70 20.90 345.00 21.25Q345.20 21.50 345.38 21.82Q345.55 22.15 345.75 22.40Q346.00 22.70 346.23 23.23Q346.45 23.75 346.55 24.25Q346.65 24.65 346.70 25.30Q346.75 25.95 346.75 26.45Q346.75 26.95 346.73 27.20Q346.70 27.45 346.70 27.90M342.40 25Q342.40 24.90 342.40 24.63Q342.40 24.35 342.30 24.25Q341.90 23.60 341.18 23.48Q340.45 23.35 339.90 23.45Q339.55 23.55 339.45 23.70Q339.35 23.85 339.15 24.15Q339.05 24.25 339.00 24.35Q338.95 24.45 338.85 24.55Q338.75 24.65 338.73 24.82Q338.70 25 338.65 25.15Q338.55 25.40 338.55 25.50Q338.55 25.60 338.65 26Q338.85 26.10 339.43 26.17Q340.00 26.25 340.63 26.25Q341.25 26.25 341.83 26.17Q342.40 26.10 342.60 26Q342.65 25.95 342.53 25.73Q342.40 25.50 342.40 25ZM361.85 34.95Q362.35 34.50 362.60 33.98Q362.85 33.45 362.85 32.70Q362.85 32.25 362.60 31.80Q362.35 31.35 361.85 31.10Q360.65 30.65 359.40 30.20Q358.15 29.75 356.70 29.50Q356.00 29.25 355.23 29Q354.45 28.75 353.45 28.50Q351.45 27.55 350.95 25.30Q350.95 24.35 350.95 23.45Q350.95 22.55 351.40 21.60Q351.70 20.90 351.93 20.57Q352.15 20.25 352.38 20.07Q352.60 19.90 352.83 19.77Q353.05 19.65 353.35 19.40Q354.50 18.95 355.33 18.72Q356.15 18.50 357.35 18.25Q357.85 18 358.33 17.95Q358.80 17.90 359.25 17.90L361.95 17.90Q362.70 17.90 363.35 17.88Q364.00 17.85 364.70 17.90Q365.80 17.95 366.75 18.10Q367.70 18.25 368.95 18.50Q370.10 18.65 370.60 18.85Q370.50 19.10 370.43 19.65Q370.35 20.20 370.30 20.75Q370.30 20.85 370.28 20.93Q370.25 21 370.25 21.10Q370.25 21.35 370.10 21.40Q370.00 21.45 369.88 21.40Q369.75 21.35 369.60 21.30Q368.75 21.20 367.85 21.20Q366.95 21.20 366.05 21.25Q365.15 21.30 364.25 21.45Q363.35 21.60 362.50 21.70Q362.10 21.80 361.75 21.88Q361.40 21.95 361.05 22.05Q360.65 22.15 360.33 22.30Q360.00 22.45 359.60 22.70Q359.10 23.30 358.90 23.80Q358.65 24.40 358.65 25Q358.55 25.25 358.65 25.77Q358.75 26.30 359.05 26.65Q359.70 27.35 360.25 27.55Q361.20 27.80 362.08 28Q362.95 28.20 363.65 28.40Q363.90 28.40 364.20 28.50Q364.50 28.60 364.75 28.60Q365.75 28.70 366.55 28.92Q367.35 29.15 368.30 29.50Q369.00 29.75 369.73 30.02Q370.45 30.30 371.15 30.75Q371.70 31.50 371.98 32.05Q372.25 32.60 372.50 33.35L372.50 34.65Q372.50 35.15 372.30 35.60Q372.10 36.05 371.85 36.30Q371.35 37.60 369.90 38.55Q368.95 39.25 367.93 39.73Q366.90 40.20 365.70 40.40Q364.00 40.95 362.28 41.02Q360.55 41.10 358.65 40.85L355.90 40.60Q355.45 40.55 354.85 40.45Q354.25 40.35 353.65 40.15Q352.80 39.90 352.43 39.88Q352.05 39.85 352.00 39.75Q351.95 39.65 351.90 39.58Q351.85 39.50 351.85 39.45Q351.60 38.90 351.55 38.42Q351.50 37.95 351.25 37.25Q351.15 37 351.10 36.80Q351.05 36.60 351.00 36.40L351.00 36.25Q351.00 36.15 350.98 36.10Q350.95 36.05 351.00 35.95Q351.25 35.95 351.43 36Q351.60 36.05 351.85 36.05Q352.45 36.20 353.23 36.35Q354.00 36.50 354.45 36.50Q354.90 36.50 355.45 36.52Q356.00 36.55 356.70 36.55Q357.30 36.60 357.95 36.60Q358.60 36.60 359.25 36.35Q359.40 36.20 359.75 36.05Q360.10 35.90 360.50 35.73Q360.90 35.55 361.28 35.38Q361.65 35.20 361.85 34.95ZM424.80 38.65Q424.70 38.65 424.45 38.70Q424.20 38.75 423.95 38.77Q423.70 38.80 423.53 38.83Q423.35 38.85 423.40 38.85L420.95 38.85Q420.15 38.75 419.63 38.73Q419.10 38.70 418.70 38.75Q418.60 38.75 418.50 38.67Q418.40 38.60 418.35 38.55Q418.30 38.10 418.33 37.20Q418.35 36.30 418.35 35.80L418.35 35.10Q418.45 34.25 418.40 33.58Q418.35 32.90 418.35 32.05L418.35 30.95Q418.60 29.85 418.48 28.65Q418.35 27.45 418.35 26.45L418.35 13.70Q418.35 13.20 418.10 13.20Q417.40 13.15 417.00 13.15Q416.60 13.15 415.90 13.20Q415.60 13.20 414.88 13.05Q414.15 12.90 413.90 12.95Q413.65 13.05 412.88 12.95Q412.10 12.85 411.85 12.85Q411.60 12.85 411.40 12.82Q411.20 12.80 411.00 12.65L411.00 9.55Q411.20 9.45 411.60 9.45Q412.00 9.45 412.40 9.45Q412.90 9.45 413.30 9.45Q413.70 9.45 414.05 9.40Q414.15 9.40 414.75 9.45Q415.35 9.50 415.75 9.55Q416.05 9.45 416.35 9.45Q417.10 9.40 417.75 9.45Q418.20 9.50 418.40 9.45Q418.60 9.40 419.00 9.40L419.80 9.40L421.15 9.50Q421.65 9.50 422.15 9.47Q422.65 9.45 423.15 9.50Q424.30 9.60 425.38 9.57Q426.45 9.55 427.15 9.45Q427.50 9.45 428.40 9.55Q429.30 9.65 430.15 9.70Q430.70 9.75 431.05 9.70Q431.40 9.65 431.65 9.70L431.65 12Q431.65 12.20 431.70 12.25Q431.75 12.30 431.65 12.70Q431.60 12.90 431.25 12.92Q430.90 12.95 430.70 12.95Q429.40 13.15 428.33 13.10Q427.25 13.05 426.25 13.05Q425.85 13.05 425.63 13.05Q425.40 13.05 425.10 13.10L425.10 14.25Q425.10 14.65 425.08 15.45Q425.05 16.25 425.05 16.70Q425.05 16.90 425.05 17Q425.05 17.10 425.03 17.27Q425.00 17.45 424.95 17.77Q424.90 18.10 424.75 18.70Q424.75 19.55 424.75 20.15Q424.75 20.75 424.78 21.25Q424.80 21.75 424.80 22.23Q424.80 22.70 424.80 23.35L424.80 23.85Q424.60 24.70 424.70 25.55Q424.80 26.40 424.80 27.25L424.80 38.65ZM439.25 19.35Q439.60 19.25 440.10 19.05Q440.60 18.85 441.10 18.85Q441.75 18.85 442.30 18.82Q442.85 18.80 443.50 18.80Q444.00 18.80 444.48 18.82Q444.95 18.85 445.35 19Q445.45 19 445.60 19.05Q445.75 19.10 446.00 19.35Q446.50 19.50 446.95 19.85Q447.40 20.20 447.78 20.70Q448.15 21.20 448.48 21.73Q448.80 22.25 449.05 22.75Q449.30 23.15 449.38 23.80Q449.45 24.45 449.60 24.85Q449.60 25.55 449.68 26.20Q449.75 26.85 449.75 27.55Q449.75 28.70 449.70 29.75Q449.65 30.80 449.65 31.95L449.55 33.60Q449.55 33.80 449.35 34.30Q449.15 34.80 449.10 35.05Q448.95 35.55 448.70 36.23Q448.45 36.90 448.35 37Q448.10 37.25 448.00 37.45Q447.90 37.65 447.83 37.85Q447.75 38.05 447.63 38.20Q447.50 38.35 447.20 38.50Q446.95 38.60 446.60 38.83Q446.25 39.05 445.95 39.25Q445.70 39.35 445.70 39.42Q445.70 39.50 445.35 39.60L444.45 39.80Q443.85 39.90 443.48 39.85Q443.10 39.80 442.65 39.80Q441.25 39.80 439.85 39.25Q439.40 39.25 438.98 39.05Q438.55 38.85 438.35 38.60Q438.10 38.40 437.85 38.17Q437.60 37.95 437.35 37.70Q436.95 37.25 436.70 36.80Q436.45 36.35 436.20 35.85Q435.95 35.30 435.65 34.73Q435.35 34.15 435.25 33.45Q435.15 32.30 435.08 31.35Q435.00 30.40 435.00 29.45L435.00 27.40Q434.95 27.30 434.95 27Q434.95 26.70 435.00 26.60Q435.00 26.35 435.03 26.07Q435.05 25.80 435.10 25.55Q435.15 25.15 435.15 24.75Q435.15 24.35 435.40 23.95Q435.35 24.05 435.48 23.77Q435.60 23.50 435.75 23.17Q435.90 22.85 436.00 22.60Q436.10 22.35 436.10 22.40L436.45 21.75Q436.60 21.60 436.75 21.40Q436.90 21.20 437.18 20.95Q437.45 20.70 437.93 20.30Q438.40 19.90 439.25 19.35M442.90 27.65Q442.70 27.65 442.53 27.85Q442.35 28.05 442.30 28.20Q441.95 28.95 441.95 29.45Q441.95 30.80 442.90 31.25Q443.15 31.25 443.33 31.07Q443.50 30.90 443.50 30.70Q443.50 30.20 443.63 29.55Q443.75 28.90 443.50 28.20Q443.25 27.95 443.20 27.80Q443.15 27.65 442.90 27.65ZM457.55 19.35Q457.90 19.25 458.40 19.05Q458.90 18.85 459.40 18.85Q460.05 18.85 460.60 18.82Q461.15 18.80 461.80 18.80Q462.30 18.80 462.78 18.82Q463.25 18.85 463.65 19Q463.75 19 463.90 19.05Q464.05 19.10 464.30 19.35Q464.80 19.50 465.25 19.85Q465.70 20.20 466.08 20.70Q466.45 21.20 466.78 21.73Q467.10 22.25 467.35 22.75Q467.60 23.15 467.68 23.80Q467.75 24.45 467.90 24.85Q467.90 25.55 467.98 26.20Q468.05 26.85 468.05 27.55Q468.05 28.70 468.00 29.75Q467.95 30.80 467.95 31.95L467.85 33.60Q467.85 33.80 467.65 34.30Q467.45 34.80 467.40 35.05Q467.25 35.55 467.00 36.23Q466.75 36.90 466.65 37Q466.40 37.25 466.30 37.45Q466.20 37.65 466.13 37.85Q466.05 38.05 465.93 38.20Q465.80 38.35 465.50 38.50Q465.25 38.60 464.90 38.83Q464.55 39.05 464.25 39.25Q464.00 39.35 464.00 39.42Q464.00 39.50 463.65 39.60L462.75 39.80Q462.15 39.90 461.78 39.85Q461.40 39.80 460.95 39.80Q459.55 39.80 458.15 39.25Q457.70 39.25 457.28 39.05Q456.85 38.85 456.65 38.60Q456.40 38.40 456.15 38.17Q455.90 37.95 455.65 37.70Q455.25 37.25 455.00 36.80Q454.75 36.35 454.50 35.85Q454.25 35.30 453.95 34.73Q453.65 34.15 453.55 33.45Q453.45 32.30 453.38 31.35Q453.30 30.40 453.30 29.45L453.30 27.40Q453.25 27.30 453.25 27Q453.25 26.70 453.30 26.60Q453.30 26.35 453.33 26.07Q453.35 25.80 453.40 25.55Q453.45 25.15 453.45 24.75Q453.45 24.35 453.70 23.95Q453.65 24.05 453.78 23.77Q453.90 23.50 454.05 23.17Q454.20 22.85 454.30 22.60Q454.40 22.35 454.40 22.40L454.75 21.75Q454.90 21.60 455.05 21.40Q455.20 21.20 455.48 20.95Q455.75 20.70 456.23 20.30Q456.70 19.90 457.55 19.35M461.20 27.65Q461.00 27.65 460.83 27.85Q460.65 28.05 460.60 28.20Q460.25 28.95 460.25 29.45Q460.25 30.80 461.20 31.25Q461.45 31.25 461.63 31.07Q461.80 30.90 461.80 30.70Q461.80 30.20 461.93 29.55Q462.05 28.90 461.80 28.20Q461.55 27.95 461.50 27.80Q461.45 27.65 461.20 27.65ZM476.55 24.60Q476.60 24.70 476.60 25.10Q476.60 25.50 476.60 25.70Q476.50 25.95 476.50 26.17Q476.50 26.40 476.50 26.65Q476.50 26.95 476.55 27.77Q476.60 28.60 476.60 28.95L476.60 30.05Q476.60 30.50 476.63 30.95Q476.65 31.40 476.65 31.85Q476.65 32.20 476.60 32.52Q476.55 32.85 476.60 33.20Q476.60 33.50 476.65 33.77Q476.70 34.05 476.70 34.35L476.70 38.90Q476.70 39.15 476.78 39.40Q476.85 39.65 476.70 39.60Q476.20 39.60 475.55 39.73Q474.90 39.85 474.35 39.85Q473.90 39.85 473.58 39.80Q473.25 39.75 472.70 39.50L472.70 38.85Q472.45 37.90 472.43 37.13Q472.40 36.35 472.40 35.65Q472.40 35.10 472.40 34.63Q472.40 34.15 472.50 33.65Q472.50 33.40 472.40 33.25Q472.40 33.20 472.38 32.98Q472.35 32.75 472.35 32.50Q472.35 32.25 472.35 32.02Q472.35 31.80 472.35 31.70L472.35 29.60Q472.35 29 472.33 28.40Q472.30 27.80 472.40 27.20Q472.45 27.15 472.48 26.73Q472.50 26.30 472.55 25.77Q472.60 25.25 472.63 24.77Q472.65 24.30 472.65 24.20Q472.70 23.40 472.68 22.60Q472.65 21.80 472.70 21.05Q472.70 19.60 472.68 18.22Q472.65 16.85 472.70 15.45Q472.70 14.55 472.70 13.67Q472.70 12.80 472.65 11.95Q472.60 11.50 472.63 11.25Q472.65 11 472.68 10.77Q472.70 10.55 472.73 10.30Q472.75 10.05 472.70 9.55Q472.70 9.05 472.75 8.57Q472.80 8.10 472.80 7.65Q472.80 7.15 472.78 6.80Q472.75 6.45 472.75 5.95L473.00 5.70Q473.50 5.70 474.10 5.75Q474.70 5.80 475.15 5.75Q475.55 5.70 475.75 5.70Q475.95 5.70 476.35 5.70Q476.60 5.70 476.75 5.85Q476.85 7.50 476.75 9.10Q476.65 10.70 476.65 12.45L476.65 15.95Q476.60 17.75 476.53 19.30Q476.45 20.85 476.45 22.35Q476.45 22.90 476.50 23.48Q476.55 24.05 476.55 24.60ZM490.45 24L491.55 22.90L493.25 21.25Q493.55 20.90 493.85 20.70Q494.15 20.50 494.85 20.60Q495.35 20.60 495.95 20.70Q496.55 20.80 497.30 20.80Q497.40 20.80 497.93 20.82Q498.45 20.85 498.45 20.90Q498.45 21.15 498.30 21.30L496.15 23.60Q496.05 23.70 495.65 24.07Q495.25 24.45 494.80 24.88Q494.35 25.30 493.95 25.67Q493.55 26.05 493.45 26.20Q493.05 26.65 492.58 27.05Q492.10 27.45 491.70 27.85Q491.25 28.30 490.85 28.70Q490.45 29.10 489.90 29.50L489.05 29.95Q489.15 30.15 489.68 30.70Q490.20 31.25 490.80 31.80Q491.35 32.35 491.85 32.73Q492.35 33.10 492.45 33.25L494.25 35.10L496.00 36.75Q496.25 37.10 496.78 37.75Q497.30 38.40 498.00 39.10Q498.25 39.35 498.53 39.60Q498.80 39.85 499.05 40.10Q499.45 40.50 499.75 40.85Q500.05 41.20 500.20 41.45Q500.20 41.60 499.50 41.50Q499.10 41.40 498.78 41.38Q498.45 41.35 498.05 41.30Q497.55 41.25 497.05 41.27Q496.55 41.30 496.05 41.20Q495.65 41.10 495.30 41.15Q494.95 41.20 494.60 41.20Q494.30 41.20 494.10 41.05Q493.95 40.95 493.90 40.85Q493.60 40.50 493.33 40.17Q493.05 39.85 492.75 39.55Q492.45 39.20 492.08 38.70Q491.70 38.20 491.40 37.90Q490.75 37.20 490.20 36.77Q489.65 36.35 489.05 35.75Q488.60 35 487.93 34.45Q487.25 33.90 486.55 33.15Q486.60 33.40 486.58 33.67Q486.55 33.95 486.55 34.20Q486.55 34.40 486.58 34.90Q486.60 35.40 486.63 35.98Q486.65 36.55 486.68 37.08Q486.70 37.60 486.65 37.80Q486.65 38.25 486.63 38.88Q486.60 39.50 486.55 39.60Q486.45 39.70 486.13 39.65Q485.80 39.60 485.55 39.60Q484.90 39.60 484.23 39.60Q483.55 39.60 483.00 39.75Q482.75 39.85 482.50 39.83Q482.25 39.80 482.00 39.80Q482.00 39.60 481.98 38.90Q481.95 38.20 481.93 37.42Q481.90 36.65 481.90 35.98Q481.90 35.30 481.95 35.10L481.80 31.55Q481.80 31.15 481.68 30.73Q481.55 30.30 481.60 29.90Q481.60 29.20 481.68 28.50Q481.75 27.80 481.70 27.10Q481.65 26.40 481.70 25.67Q481.75 24.95 481.80 24.25L481.80 22.30Q481.80 21.55 481.78 20.85Q481.75 20.15 481.70 19.40Q481.60 18.50 481.70 17.57Q481.80 16.65 481.85 15.70L481.95 14.05L481.95 10.50Q481.95 10.10 481.90 9.63Q481.85 9.15 481.90 8.65L481.90 7.75Q481.90 7.50 482.10 7.27Q482.30 7.05 482.50 7.05Q483.25 7.05 483.75 7.02Q484.25 7 484.95 7Q485.25 7 485.45 6.95Q485.60 7.25 485.60 7.55Q485.55 8.40 485.63 9.40Q485.70 10.40 485.70 11.25L485.80 12.65L485.80 13.90Q485.80 14.20 485.78 14.77Q485.75 15.35 485.75 16Q485.75 16.65 485.75 17.22Q485.75 17.80 485.80 18.05Q485.80 18.70 485.83 19.32Q485.85 19.95 485.90 20.60Q485.90 20.85 485.93 21.40Q485.95 21.95 485.95 22.57Q485.95 23.20 485.95 23.75Q485.95 24.30 485.95 24.55L486.20 26.70L486.20 27.35Q486.90 26.85 487.40 26.42Q487.90 26 488.45 25.60L490.45 24ZM508.55 33.15Q508.65 34.15 508.60 34.95Q508.55 35.75 508.45 36.45Q508.45 36.75 508.30 36.90Q507.80 37 507.15 37.08Q506.50 37.15 505.95 37.10Q505.50 37.05 505.05 37.13Q504.60 37.20 504.40 37.20Q504.40 36.90 504.35 36.65Q504.30 36.40 504.35 35.95Q504.40 35.55 504.38 35.10Q504.35 34.65 504.35 34.25L504.35 31.80Q504.30 30.65 504.30 29.45Q504.30 28.25 504.25 27.85Q504.20 27.40 504.28 26.95Q504.35 26.50 504.35 26.05Q504.30 25.35 504.33 24.63Q504.35 23.90 504.35 23.20Q504.35 22.60 504.30 21.63Q504.25 20.65 504.35 20.05Q504.75 19.95 505.35 19.95Q505.95 19.95 506.65 19.90Q507.20 19.85 507.75 19.85Q508.30 19.85 508.55 19.85Q508.65 19.85 508.63 20.13Q508.60 20.40 508.60 20.50Q508.55 21.75 508.60 22.67Q508.65 23.60 508.55 24.60Q508.60 25.60 508.58 26.32Q508.55 27.05 508.45 28.05Q508.45 28.20 508.45 28.85Q508.45 29.50 508.50 30.32Q508.55 31.15 508.55 31.93Q508.55 32.70 508.55 33.15M504.30 16.65Q504.25 16.40 504.28 15.90Q504.30 15.40 504.30 14.85Q504.30 14.60 504.28 14.40Q504.25 14.20 504.25 14Q504.25 13.90 504.28 13.85Q504.30 13.80 504.30 13.70L507.90 13.70Q508.15 13.70 508.20 13.72Q508.25 13.75 508.25 14L508.25 17.25Q507.95 17.30 507.33 17.30Q506.70 17.30 506.05 17.30Q505.40 17.30 504.88 17.27Q504.35 17.25 504.35 17.15Q504.30 17 504.30 16.65ZM523.15 36.25Q523.15 36.80 523.13 37.40Q523.10 38 523.15 38.55Q523.15 38.85 523.15 39.42Q523.15 40 523.10 40.30Q523.15 40.50 523.00 40.67Q522.85 40.85 522.75 40.95L521.45 40.95Q521.20 40.95 520.88 40.92Q520.55 40.90 520.30 40.90Q520.10 41 519.75 41Q519.40 41 519.03 41Q518.65 41 518.33 40.98Q518.00 40.95 517.95 40.95Q517.70 40.70 517.68 40.63Q517.65 40.55 517.65 40.30L517.65 35.50L517.55 32.55L517.65 29.20L517.60 26.30L517.40 23.90Q516.80 23.90 515.95 23.95Q515.10 24 514.65 23.90Q513.80 23.75 513.33 23.82Q512.85 23.90 512.15 23.90L512.15 20.70L512.45 20.70Q512.70 20.70 512.88 20.68Q513.05 20.65 513.15 20.70Q513.40 20.90 513.88 20.82Q514.35 20.75 514.30 20.65Q514.85 20.60 514.98 20.60Q515.10 20.60 515.55 20.60Q515.95 20.60 516.73 20.63Q517.50 20.65 517.75 20.60Q517.75 20.60 517.75 20.30Q517.75 20 517.75 19.60Q517.75 19.20 517.75 18.75Q517.75 18.30 517.75 18.05Q517.85 17.10 517.88 16.32Q517.90 15.55 517.95 14.55Q518.00 13.85 518.00 13.20Q518.00 12.55 518.00 11.85Q518.00 11.15 518.08 10.13Q518.15 9.10 518.10 8.30Q518.10 8.05 518.03 7.97Q517.95 7.90 517.95 7.65Q517.95 7.40 518.00 7.27Q518.05 7.15 518.30 7.15Q518.75 7.15 519.25 7.20Q519.75 7.25 520.20 7.25Q520.95 7.25 521.58 7.25Q522.20 7.25 522.60 7.30Q523.35 7.40 523.75 7.50Q523.75 7.50 523.75 7.72Q523.75 7.95 523.75 8.27Q523.75 8.60 523.73 8.95Q523.70 9.30 523.70 9.60Q523.65 10.85 523.65 11.77Q523.65 12.70 523.70 13.95Q523.70 14.50 523.68 15.10Q523.65 15.70 523.70 16.25Q523.70 16.40 523.68 16.90Q523.65 17.40 523.60 17.97Q523.55 18.55 523.50 19.05Q523.45 19.55 523.45 19.70Q523.45 19.95 523.55 20.15Q523.65 20.35 523.75 20.35Q524.00 20.35 524.40 20.43Q524.80 20.50 525.05 20.50Q525.30 20.50 525.58 20.57Q525.85 20.65 526.35 20.65Q526.80 20.65 527.28 20.68Q527.75 20.70 528.30 20.70Q528.40 20.70 528.50 20.72Q528.60 20.75 528.70 20.75L528.90 20.75Q529.15 21.50 529.15 22.45Q529.15 23.40 528.90 23.90L528.60 23.90Q527.60 24 526.65 24.07Q525.70 24.15 524.70 24.15Q524.45 24.15 524.10 24.17Q523.75 24.20 523.50 24.20Q523.50 24.30 523.48 24.42Q523.45 24.55 523.45 24.65L523.45 24.85L523.45 25.30Q523.45 25.75 523.48 26.13Q523.50 26.50 523.45 26.90L523.55 29.55L523.35 31.80Q523.35 32.05 523.33 32.67Q523.30 33.30 523.28 34.02Q523.25 34.75 523.20 35.38Q523.15 36 523.15 36.25Z"/></g></g></svg>
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/js/@alevnyacow%2Fnzmt)
|
|
4
4
|

|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# About
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
- `methods` function
|
|
10
|
-
- `Metadata` type
|
|
11
|
-
- `DTOs` type
|
|
12
|
-
- `Methods` type
|
|
13
|
-
- `Config` type
|
|
14
|
-
- [Controller](#controller)
|
|
15
|
-
- `endpoints` function
|
|
16
|
-
- `DefaultErrorCodes` enum
|
|
17
|
-
- `Guard` type
|
|
18
|
-
- `OnErrorHandler` type
|
|
19
|
-
- `SharedConfig` type
|
|
20
|
-
- `Metadata` type
|
|
21
|
-
- `Contract` type
|
|
22
|
-
- [Store](#store)
|
|
23
|
-
- `methods` function
|
|
24
|
-
- `InRAM` class generator
|
|
25
|
-
- `Types` type
|
|
26
|
-
- `Metadata` type
|
|
27
|
-
- `Contract` type
|
|
8
|
+
NZMT is an opinionated toolkit with scaffolding for building structured Next.js applications with DI, Zod validation, and DDD-inspired architecture — without boilerplate overhead.
|
|
28
9
|
|
|
29
|
-
|
|
10
|
+
- 🧩 **End-to-end contracts and implementations** — generated or manually authored — across backend and client–server integration layers.
|
|
11
|
+
- 🔐 **Runtime safety** across server layers with Zod out of the box.
|
|
12
|
+
- ⚡ **Dependency Injection** powered by Inversify with no setup required.
|
|
13
|
+
- 🚀 Comes with **scaffolding system** to generate and organize application structure via CLI.
|
|
30
14
|
|
|
31
|
-
|
|
15
|
+
# Quick start with scaffolding
|
|
32
16
|
|
|
33
|
-
|
|
17
|
+
```bash
|
|
18
|
+
# scaffolder initialization with Prisma (must be done once)
|
|
19
|
+
npx nzmt init prismaClientPath:@prisma/client
|
|
34
20
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// Method schemas description
|
|
44
|
-
schemas: {
|
|
45
|
-
// Method `basicOperations`
|
|
46
|
-
basicOperation: {
|
|
47
|
-
// `basicOperations` payload (Zod schema)
|
|
48
|
-
payload: z.object({
|
|
49
|
-
lhs: z.number(),
|
|
50
|
-
rhs: z.number(),
|
|
51
|
-
operation: z.enum(['+', '-', '/', '*'])
|
|
52
|
-
}),
|
|
53
|
-
// `basicOperations` response (Zod schema)
|
|
54
|
-
response: z.object({
|
|
55
|
-
result: z.number()
|
|
56
|
-
})
|
|
57
|
-
},
|
|
58
|
-
// ...another methods
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Use `... satisfies Module.Metadata` instead of
|
|
62
|
-
* `const mathServiceMetadata: Module.Metadata = ...`
|
|
63
|
-
* for correct TS autocompletion in your IDE when
|
|
64
|
-
* using `Module.methods`.
|
|
65
|
-
*/
|
|
66
|
-
} satisfies Module.Metadata
|
|
67
|
-
|
|
68
|
-
const mathServiceMethods = Module.methods(mathServiceMetadata)
|
|
21
|
+
# product entity with title and price fields
|
|
22
|
+
npx nzmt entity product f:title-string,price-int.positive
|
|
23
|
+
# product store (with Prisma implementation, RAM implementation and DI)
|
|
24
|
+
npx nzmt store product
|
|
25
|
+
# product service with injected user store and product store
|
|
26
|
+
npx nzmt service product i:ProductStore
|
|
27
|
+
# shop controller with injected shop service and logger
|
|
28
|
+
npx nzmt controller shop i:Logger,ProductService
|
|
69
29
|
```
|
|
70
30
|
|
|
71
|
-
|
|
31
|
+
# Design principles
|
|
72
32
|
|
|
73
|
-
|
|
74
|
-
export class MathService {
|
|
75
|
-
// created generator
|
|
76
|
-
private methods = mathServiceMethods
|
|
77
|
-
|
|
78
|
-
public basicOperation = this.methods(
|
|
79
|
-
// Method name, working TS intellisense
|
|
80
|
-
'basicOperation',
|
|
81
|
-
// handler logic
|
|
82
|
-
async (
|
|
83
|
-
// payload, also with TS intellisense
|
|
84
|
-
{ lhs, operation, rhs },
|
|
85
|
-
// errors generator
|
|
86
|
-
{ methodError }
|
|
87
|
-
) => {
|
|
88
|
-
switch(operation) {
|
|
89
|
-
case '*': {
|
|
90
|
-
// all types are infered from schemas, so
|
|
91
|
-
// TS intellisense also works with return types
|
|
92
|
-
return { result: lhs * rhs }
|
|
93
|
-
}
|
|
94
|
-
case '+': {
|
|
95
|
-
return { result: lhs + rhs }
|
|
96
|
-
}
|
|
97
|
-
case '-': {
|
|
98
|
-
return { result: lhs - rhs }
|
|
99
|
-
}
|
|
100
|
-
case '/': {
|
|
101
|
-
if (rhs === 0) {
|
|
102
|
-
/**
|
|
103
|
-
* You can create error with just code. All
|
|
104
|
-
* metadata like method name, zod module name
|
|
105
|
-
* or payload will present in this error object.
|
|
106
|
-
*/
|
|
107
|
-
throw methodError('DIVIDED_BY_ZERO')
|
|
108
|
-
}
|
|
109
|
-
return { result: lhs / rhs }
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
```
|
|
33
|
+
## Core idea
|
|
116
34
|
|
|
117
|
-
|
|
35
|
+
DDD is powerful, but it truly shines in large-scale systems with large teams. In practice, developers often face a trade-off:
|
|
36
|
+
either adopt heavy architectural concepts or build with little to no structure at all. **Mature engineering is about trade-offs. A good tool should help you make them intentionally.**
|
|
118
37
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
38
|
+
That’s what this toolkit is designed for. It brings the benefits of DDD without unnecessary complexity that can slow down early development — and adds scaffolding to move even faster. **Automate what’s routine. Stay flexible for what’s complex.**
|
|
39
|
+
|
|
40
|
+
## Server-side layer
|
|
41
|
+
|
|
42
|
+
Server-side logic is structured into four core modules: *Stores*, *Services*, *Controllers*, and *Providers*.
|
|
43
|
+
|
|
44
|
+
- **Stores** encapsulate Data Layer logic with no business rules.
|
|
45
|
+
- **Services** define business logic and use-case flows.
|
|
46
|
+
- **Controllers** handle API requests and delegate work to services.
|
|
47
|
+
- **Providers** manage integrations with external systems (e.g. email, third-party APIs).
|
|
48
|
+
|
|
49
|
+
## Shared layer
|
|
50
|
+
|
|
51
|
+
There are also two building blocks shared across server and client: Entities and Value Objects.
|
|
52
|
+
|
|
53
|
+
- **Entities** represent domain objects used throughout the application. They contain no Data Layer logic and are not responsible for business use-case logic, but may include pure domain logic, contracts, and invariants (e.g. User, Product).
|
|
54
|
+
- **Value Objects** define reusable, strongly-typed invariants for meaningful concepts such as Pagination or Identifier.
|
|
55
|
+
|
|
56
|
+
# Scaffolding
|
|
57
|
+
|
|
58
|
+
## Setup
|
|
59
|
+
|
|
60
|
+
1. Install required dependencies:
|
|
61
|
+
```bash
|
|
62
|
+
npm i inversify zod
|
|
63
|
+
```
|
|
64
|
+
These are not peer dependencies, so you can use NZMT with only required features.
|
|
65
|
+
|
|
66
|
+
2. Initialize scaffolding:
|
|
67
|
+
```
|
|
68
|
+
npx nzmt init prismaClientPath:@prisma/client
|
|
128
69
|
```
|
|
70
|
+
This creates `nzmt.config.json`, sets up DI and testing, and adds base providers. `prismaClientPath:...` parameter is optional and enables Prisma scaffolding.
|
|
129
71
|
|
|
130
|
-
|
|
72
|
+
## Naming conventions
|
|
131
73
|
|
|
132
|
-
|
|
74
|
+
- The entity name is expected to be **in `kebab-case`** (e.g. `awesome-user`, `product`).
|
|
75
|
+
- The entity name is expected to be **in singular form** (e.g. `product` instead of `products`).
|
|
133
76
|
|
|
134
|
-
|
|
77
|
+
## Shared layer modules
|
|
135
78
|
|
|
136
|
-
|
|
79
|
+
### Entities
|
|
137
80
|
|
|
138
|
-
Example:
|
|
81
|
+
Example: scaffolding a `User` entity with two fields (name and age).
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npx nzmt entity user f:name-string,age-int.positive
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
You can define entity fields using the `f:` flag. The format is `name-type`, where `type` maps to Zod (e.g. `int.positive` → `z.int().positive()`). This is optional — `npx nzmt entity user` will scaffold a `User` entity without additional fields.
|
|
88
|
+
|
|
89
|
+
Entity scaffolder generates a dedicated folder with a barrel file and an entity implementation. Generated code is fully editable — you stay in control.
|
|
90
|
+
|
|
91
|
+
The generated `user.entity.ts` looks like this:
|
|
139
92
|
|
|
140
93
|
```ts
|
|
141
|
-
import
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
94
|
+
import z from 'zod'
|
|
95
|
+
import { ValueObjects } from '@alevnyacow/nzmt'
|
|
96
|
+
|
|
97
|
+
export type UserModel = z.infer<typeof User.schema>
|
|
98
|
+
|
|
99
|
+
export class User {
|
|
100
|
+
static schema = z.object({
|
|
101
|
+
id: ValueObjects.Identifier.schema,
|
|
102
|
+
name: z.string(),
|
|
103
|
+
age: z.int().positive(),
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
private constructor(private readonly data: UserModel) {}
|
|
107
|
+
|
|
108
|
+
static create = (data: UserModel) => {
|
|
109
|
+
const parsedModel = User.schema.parse(data)
|
|
110
|
+
return new User(parsedModel)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
get model(): UserModel {
|
|
114
|
+
return this.data
|
|
154
115
|
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
type TestServiceDTOs = Module.DTOs<typeof testMetadata>
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* TestServiceDTOs:
|
|
161
|
-
* {
|
|
162
|
-
* testMethodPayload: { stringField: string }
|
|
163
|
-
* testMethodResponse: { result: boolean }
|
|
164
|
-
* }
|
|
165
|
-
*
|
|
166
|
-
*/
|
|
116
|
+
}
|
|
167
117
|
```
|
|
168
118
|
|
|
169
|
-
|
|
119
|
+
`User` entity, `User.schema` zod schema and `UserModel` type can be used wherever they are needed.
|
|
120
|
+
|
|
121
|
+
# Package API
|
|
170
122
|
|
|
171
|
-
|
|
123
|
+
- Module
|
|
124
|
+
- `methods` function
|
|
125
|
+
- `Metadata` type
|
|
126
|
+
- `DTOs` type
|
|
127
|
+
- `Methods` type
|
|
128
|
+
- `Config` type
|
|
129
|
+
- Controller
|
|
130
|
+
- `endpoints` function
|
|
131
|
+
- `DefaultErrorCodes` enum
|
|
132
|
+
- `Guard` type
|
|
133
|
+
- `OnErrorHandler` type
|
|
134
|
+
- `SharedConfig` type
|
|
135
|
+
- `Metadata` type
|
|
136
|
+
- `Contract` type
|
|
137
|
+
- Store
|
|
138
|
+
- `methods` function
|
|
139
|
+
- `InRAM` class generator
|
|
140
|
+
- `Types` type
|
|
141
|
+
- `Metadata` type
|
|
142
|
+
- `Contract` type
|
package/bin/cli.js
CHANGED
|
@@ -18,14 +18,14 @@ function insertAfterLineInFile(filePath, targetLine, newLine) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function insertBeforeLineInFile(filePath, targetLine, newLine) {
|
|
21
|
+
function insertBeforeLineInFile(filePath, targetLine, newLine, before = true) {
|
|
22
22
|
const content = fs.readFileSync(filePath, 'utf8');
|
|
23
23
|
const lines = content.split('\n');
|
|
24
24
|
|
|
25
25
|
const index = lines.findIndex(line => line.includes(targetLine));
|
|
26
26
|
|
|
27
27
|
if (index !== -1) {
|
|
28
|
-
lines.splice(index, 0, newLine);
|
|
28
|
+
lines.splice(before ? index - 1 : index, 0, newLine);
|
|
29
29
|
fs.writeFileSync(filePath, lines.join('\n'), 'utf8');
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -155,7 +155,7 @@ function initDI() {
|
|
|
155
155
|
"\t// Providers",
|
|
156
156
|
"\t// Services",
|
|
157
157
|
"\t// Controllers",
|
|
158
|
-
"\t//
|
|
158
|
+
"\t// Infrastructure",
|
|
159
159
|
"} satisfies DIEntries",
|
|
160
160
|
"",
|
|
161
161
|
"export type DITokens = keyof typeof diEntries",
|
|
@@ -312,20 +312,65 @@ function initPrisma() {
|
|
|
312
312
|
insertBeforeLineInFile(
|
|
313
313
|
diEntriesPath,
|
|
314
314
|
'type DIEntries =',
|
|
315
|
-
`import { prismaClient } from '${config?.paths?.infrastructure.replace('./src', '@')}/prisma'
|
|
315
|
+
`import { prismaClient } from '${config?.paths?.infrastructure.replace('./src', '@')}/prisma'`
|
|
316
316
|
)
|
|
317
317
|
|
|
318
318
|
insertAfterLineInFile(
|
|
319
319
|
diEntriesPath,
|
|
320
|
-
'//
|
|
320
|
+
'// Infrastructure',
|
|
321
321
|
`\tPrismaClient: { constantValue: prismaClient },`,
|
|
322
322
|
)
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
+
function initLogger() {
|
|
326
|
+
const config = loadConfig()
|
|
327
|
+
const loggerFolder = path.resolve(process.cwd(), config?.paths?.infrastructure, 'logger')
|
|
328
|
+
fs.mkdirSync(loggerFolder, { recursive: true })
|
|
329
|
+
|
|
330
|
+
fs.writeFileSync(path.resolve(loggerFolder, 'logger.ts'), [
|
|
331
|
+
`export abstract class Logger {`,
|
|
332
|
+
`\tabstract error: (payload: Record<string, unknown>) => Promise<void>`,
|
|
333
|
+
`}`
|
|
334
|
+
].join('\n'))
|
|
335
|
+
|
|
336
|
+
fs.writeFileSync(path.resolve(loggerFolder, 'logger.console.ts'), [
|
|
337
|
+
`import { injectable } from 'inversify'`,
|
|
338
|
+
`import { Logger } from './logger'`,
|
|
339
|
+
'',
|
|
340
|
+
'@injectable()',
|
|
341
|
+
`export class ConsoleLogger extends Logger {`,
|
|
342
|
+
`\terror: Logger['error'] = async (payload) => console.error(payload)`,
|
|
343
|
+
`}`
|
|
344
|
+
].join('\n'))
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
fs.writeFileSync(path.resolve(loggerFolder, 'index.ts'), [
|
|
348
|
+
`export * from './logger'`,
|
|
349
|
+
`export * from './logger.console'`
|
|
350
|
+
].join('\n'))
|
|
351
|
+
|
|
352
|
+
// Update DI
|
|
353
|
+
|
|
354
|
+
const diEntriesPath = path.resolve(process.cwd(), config?.paths?.di, 'entries.di.ts')
|
|
355
|
+
|
|
356
|
+
insertBeforeLineInFile(
|
|
357
|
+
diEntriesPath,
|
|
358
|
+
'type DIEntries =',
|
|
359
|
+
`import { ConsoleLogger } from '${config?.paths?.infrastructure.replace('./src', '@')}/logger'`
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
insertAfterLineInFile(
|
|
363
|
+
diEntriesPath,
|
|
364
|
+
'// Infrastructure',
|
|
365
|
+
`\tLogger: ConsoleLogger,`,
|
|
366
|
+
)
|
|
367
|
+
}
|
|
368
|
+
|
|
325
369
|
if (command.toLowerCase() === 'init' || command === 'i') {
|
|
326
370
|
createDefaultConfig()
|
|
327
371
|
initDI()
|
|
328
372
|
initPrisma()
|
|
373
|
+
initLogger()
|
|
329
374
|
|
|
330
375
|
process.exit(0)
|
|
331
376
|
}
|
|
@@ -335,7 +380,7 @@ function generateStores(lowerCase, upperCase, withEntityPreset) {
|
|
|
335
380
|
|
|
336
381
|
fs.mkdirSync(folder, { recursive: true })
|
|
337
382
|
|
|
338
|
-
const withEntity = withEntityPreset || (options ?? []).includes('
|
|
383
|
+
const withEntity = withEntityPreset || !(options ?? []).includes('dont-import-entity')
|
|
339
384
|
|
|
340
385
|
// Contract
|
|
341
386
|
|
|
@@ -509,7 +554,7 @@ function generateStores(lowerCase, upperCase, withEntityPreset) {
|
|
|
509
554
|
insertBeforeLineInFile(
|
|
510
555
|
diEntriesPath,
|
|
511
556
|
'type DIEntries =',
|
|
512
|
-
prismaPath ? `import { ${upperCase}PrismaStore, ${upperCase}RAMStore } from '${config?.paths?.stores.replace('./src', '@')}/${entityName}'
|
|
557
|
+
prismaPath ? `import { ${upperCase}PrismaStore, ${upperCase}RAMStore } from '${config?.paths?.stores.replace('./src', '@')}/${entityName}'` : `import { ${upperCase}RAMStore } from '${config?.paths?.stores.replace('./src', '@')}/${entityName}'`
|
|
513
558
|
)
|
|
514
559
|
|
|
515
560
|
insertAfterLineInFile(
|
|
@@ -632,7 +677,7 @@ function generateProvider(lowerCase, upperCase) {
|
|
|
632
677
|
`type Methods = Module.Methods<typeof ${lowerCase}ProviderMetadata>;`,
|
|
633
678
|
``,
|
|
634
679
|
`export abstract class ${upperCase}Provider {`,
|
|
635
|
-
`\
|
|
680
|
+
`\tprotected methods = Module.methods(${lowerCase}ProviderMetadata)`,
|
|
636
681
|
`}`
|
|
637
682
|
].join('\n'))
|
|
638
683
|
|
|
@@ -650,7 +695,7 @@ function generateProvider(lowerCase, upperCase) {
|
|
|
650
695
|
`import { ${upperCase}Provider } from './${entityName}.provider'`,
|
|
651
696
|
'',
|
|
652
697
|
`export class ${upperCase}${providerType}Provider extends ${upperCase}Provider {`,
|
|
653
|
-
`\
|
|
698
|
+
`\tprotected method = zodModuleMethodFactory(mailProviderMetadata);`,
|
|
654
699
|
`}`
|
|
655
700
|
].join('\n'))
|
|
656
701
|
|
|
@@ -666,7 +711,7 @@ function generateProvider(lowerCase, upperCase) {
|
|
|
666
711
|
insertBeforeLineInFile(
|
|
667
712
|
diEntriesPath,
|
|
668
713
|
'type DIEntries =',
|
|
669
|
-
`import { ${upperCase}MockProvider, ${upperCase}${providerType}Provider } from '${config?.paths?.providers.replace('./src', '@')}/${entityName}}'
|
|
714
|
+
`import { ${upperCase}MockProvider, ${upperCase}${providerType}Provider } from '${config?.paths?.providers.replace('./src', '@')}/${entityName}}'`
|
|
670
715
|
)
|
|
671
716
|
|
|
672
717
|
insertAfterLineInFile(
|
|
@@ -682,131 +727,65 @@ if (command.toLowerCase() === 'provider' || command === 'p') {
|
|
|
682
727
|
process.exit(0)
|
|
683
728
|
}
|
|
684
729
|
|
|
730
|
+
function toKebabFromPascal(str) {
|
|
731
|
+
return str
|
|
732
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
733
|
+
.toLowerCase()
|
|
734
|
+
}
|
|
685
735
|
|
|
686
|
-
function generateService(lowerCase, upperCase
|
|
736
|
+
function generateService(lowerCase, upperCase) {
|
|
687
737
|
const folder = config?.paths?.services ? path.resolve(process.cwd(), config?.paths?.services, entityName) : path.resolve(process.cwd(), entityName);
|
|
688
738
|
|
|
739
|
+
const injections = options.filter(x => x.startsWith('i:')).flatMap(x => x.split(':')[1]).join(',').split(',').filter(x => !!x.length)
|
|
740
|
+
|
|
741
|
+
const importInjections = injections.map((i) => {
|
|
742
|
+
if (i.endsWith('Service') || i.endsWith('Controller')) {
|
|
743
|
+
throw 'Only stores and infrastructure can be injected in services'
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
if (i.endsWith('Store')) {
|
|
747
|
+
return `import { ${i} } from '${config?.paths?.stores?.replace('./src', '@')}/${toKebabFromPascal(i).slice(0, -'-store'.length)}'`
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
return `import { ${i} } from '${config?.paths?.infrastructure?.replace('./src', '@')}/${toKebabFromPascal(i)}'`
|
|
751
|
+
})
|
|
752
|
+
|
|
689
753
|
fs.mkdirSync(folder, { recursive: true })
|
|
690
754
|
|
|
691
755
|
// Metadata
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
`\t\t\t}),`,
|
|
705
|
-
`\t\t\tresponse: z.object({`,
|
|
706
|
-
`\t\t\t\titem: ${lowerCase}StoreMetadata.models.details.nullable()`,
|
|
707
|
-
`\t\t\t})`,
|
|
708
|
-
`\t\t},`,
|
|
709
|
-
`\t\tgetList: {`,
|
|
710
|
-
`\t\t\tpayload: z.object({`,
|
|
711
|
-
`\t\t\t\tfilter: ${lowerCase}StoreMetadata.searchPayload.list,`,
|
|
712
|
-
`\t\t\t\tpagination: ValueObjects.Pagination.schema.optional()`,
|
|
713
|
-
`\t\t\t}),`,
|
|
714
|
-
`\t\t\tresponse: z.object({`,
|
|
715
|
-
`\t\t\t\titems: z.array(${lowerCase}StoreMetadata.models.list)`,
|
|
716
|
-
`\t\t\t})`,
|
|
717
|
-
`\t\t},`,
|
|
718
|
-
`\t\tupdateOne: {`,
|
|
719
|
-
`\t\t\tpayload: z.object({`,
|
|
720
|
-
`\t\t\t\tfilter: ${lowerCase}StoreMetadata.searchPayload.specific,`,
|
|
721
|
-
`\t\t\t\tpayload: ${lowerCase}StoreMetadata.actionsPayload.update`,
|
|
722
|
-
`\t\t\t}),`,
|
|
723
|
-
`\t\t\tresponse: z.object({})`,
|
|
724
|
-
`\t\t},`,
|
|
725
|
-
`\t\tcreate: {`,
|
|
726
|
-
`\t\t\tpayload: z.object({`,
|
|
727
|
-
`\t\t\t\tpayload: ${lowerCase}StoreMetadata.actionsPayload.create`,
|
|
728
|
-
`\t\t\t}),`,
|
|
729
|
-
`\t\t\tresponse: z.object({`,
|
|
730
|
-
`\t\t\t\tid: ValueObjects.Identifier.schema`,
|
|
731
|
-
`\t\t\t}),`,
|
|
732
|
-
`\t\t},`,
|
|
733
|
-
`\t\tdeleteOne: {`,
|
|
734
|
-
`\t\t\tpayload: z.object({`,
|
|
735
|
-
`\t\t\t\tfilter: ${lowerCase}StoreMetadata.searchPayload.specific`,
|
|
736
|
-
`\t\t\t}),`,
|
|
737
|
-
`\t\t\tresponse: z.object({})`,
|
|
738
|
-
`\t\t},`,
|
|
739
|
-
"\t}",
|
|
740
|
-
"} satisfies Module.Metadata",
|
|
741
|
-
"",
|
|
742
|
-
`export type ${upperCase}ServiceDTOs = Module.DTOs<typeof ${lowerCase}ServiceMetadata>`
|
|
743
|
-
].filter(x => typeof x === 'string').join('\n'))
|
|
744
|
-
} else {
|
|
745
|
-
fs.writeFileSync(path.resolve(folder, `${entityName}.service.metadata.ts`), [
|
|
746
|
-
"import type { Module } from '@alevnyacow/nzmt'",
|
|
747
|
-
"",
|
|
748
|
-
`export const ${lowerCase}ServiceMetadata = {`,
|
|
749
|
-
`\tname: '${upperCase}Service',`,
|
|
750
|
-
"\tschemas: {}",
|
|
751
|
-
"} satisfies Module.Metadata",
|
|
752
|
-
"",
|
|
753
|
-
`export type ${upperCase}ServiceDTOs = Module.DTOs<typeof ${lowerCase}ServiceMetadata>`
|
|
754
|
-
].filter(x => typeof x === 'string').join('\n'))
|
|
755
|
-
}
|
|
756
|
+
|
|
757
|
+
fs.writeFileSync(path.resolve(folder, `${entityName}.service.metadata.ts`), [
|
|
758
|
+
"import type { Module } from '@alevnyacow/nzmt'",
|
|
759
|
+
"",
|
|
760
|
+
`export const ${lowerCase}ServiceMetadata = {`,
|
|
761
|
+
`\tname: '${upperCase}Service',`,
|
|
762
|
+
"\tschemas: {}",
|
|
763
|
+
"} satisfies Module.Metadata",
|
|
764
|
+
"",
|
|
765
|
+
`export type ${upperCase}ServiceDTOs = Module.DTOs<typeof ${lowerCase}ServiceMetadata>`
|
|
766
|
+
].filter(x => typeof x === 'string').join('\n'))
|
|
767
|
+
|
|
756
768
|
|
|
757
769
|
// Service body
|
|
758
770
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
`\tgetSpecific = this.method('getSpecific', async (x) => {`,
|
|
778
|
-
`\t\tconst item = await ${lowerCase}Store.details(x);`,
|
|
779
|
-
`\t\treturn { item };`,
|
|
780
|
-
`\t})`,
|
|
781
|
-
`\t`,
|
|
782
|
-
`\tgetList = this.method('getList', async (x) => {`,
|
|
783
|
-
`\t\tconst items = await ${lowerCase}Store.list(x);`,
|
|
784
|
-
`\t\treturn { items };`,
|
|
785
|
-
`\t})`,
|
|
786
|
-
`\t`,
|
|
787
|
-
`\tupdateOne = this.method('updateOne', async (x) => {`,
|
|
788
|
-
`\t\tawait ${lowerCase}Store.updateOne(x);`,
|
|
789
|
-
`\t\treturn {};`,
|
|
790
|
-
`\t})`,
|
|
791
|
-
`\t`,
|
|
792
|
-
`\tdeleteOne = this.method('deleteOne', async (x) => {`,
|
|
793
|
-
`\t\tawait ${lowerCase}Store.deleteOne(x);`,
|
|
794
|
-
`\t\treturn {};`,
|
|
795
|
-
`\t})`,
|
|
796
|
-
"}"
|
|
797
|
-
].filter(x => typeof x === 'string').join('\n'))
|
|
798
|
-
} else {
|
|
799
|
-
fs.writeFileSync(path.resolve(folder, `${entityName}.service.ts`), [
|
|
800
|
-
"import { injectable } from 'inversify'",
|
|
801
|
-
`import { ${lowerCase}ServiceMetadata } from './${entityName}.service.metadata'`,
|
|
802
|
-
"import { Module } from '@alevnyacow/nzmt'",
|
|
803
|
-
"",
|
|
804
|
-
"@injectable()",
|
|
805
|
-
`export class ${upperCase}Service {`,
|
|
806
|
-
`\tprivate methods = Module.methods(${lowerCase}ServiceMetadata)`,
|
|
807
|
-
"}"
|
|
808
|
-
].filter(x => typeof x === 'string').join('\n'))
|
|
809
|
-
}
|
|
771
|
+
fs.writeFileSync(path.resolve(folder, `${entityName}.service.ts`), [
|
|
772
|
+
"import { injectable } from 'inversify'",
|
|
773
|
+
injections.length ? `import { DITokens } from '${config?.paths?.di?.replace('./src', '@')}'` : undefined,
|
|
774
|
+
`import { ${lowerCase}ServiceMetadata } from './${entityName}.service.metadata'`,
|
|
775
|
+
"import { Module } from '@alevnyacow/nzmt'",
|
|
776
|
+
...importInjections,
|
|
777
|
+
"",
|
|
778
|
+
"@injectable()",
|
|
779
|
+
`export class ${upperCase}Service {`,
|
|
780
|
+
`\tprivate methods = Module.methods(${lowerCase}ServiceMetadata)`,
|
|
781
|
+
``,
|
|
782
|
+
`\tconstructor(`,
|
|
783
|
+
...injections.map(x => `\t\t@inject('${x}' satisfies DITokens) private readonly ${x.charAt(0).toLowerCase() + x.slice(1)}: ${x},`),
|
|
784
|
+
`\t) {}`,
|
|
785
|
+
``,
|
|
786
|
+
"}"
|
|
787
|
+
].filter(x => typeof x === 'string').join('\n'))
|
|
788
|
+
|
|
810
789
|
|
|
811
790
|
// Barrel
|
|
812
791
|
|
|
@@ -822,7 +801,7 @@ function generateService(lowerCase, upperCase, withCrud) {
|
|
|
822
801
|
insertBeforeLineInFile(
|
|
823
802
|
diEntriesPath,
|
|
824
803
|
'type DIEntries =',
|
|
825
|
-
`import { ${upperCase}Service } from '${config?.paths?.services.replace('./src', '@')}/${entityName}
|
|
804
|
+
`import { ${upperCase}Service } from '${config?.paths?.services.replace('./src', '@')}/${entityName}'`
|
|
826
805
|
)
|
|
827
806
|
|
|
828
807
|
insertAfterLineInFile(
|
|
@@ -838,10 +817,88 @@ if (command.toLowerCase() === 'service' || command === 'S') {
|
|
|
838
817
|
process.exit(0)
|
|
839
818
|
}
|
|
840
819
|
|
|
841
|
-
|
|
820
|
+
function generateController(upperCase, lowerCase) {
|
|
821
|
+
const folder = config?.paths?.controllers ? path.resolve(process.cwd(), config?.paths?.controllers, entityName) : path.resolve(process.cwd(), entityName);
|
|
822
|
+
|
|
823
|
+
const injections = options.filter(x => x.startsWith('i:')).flatMap(x => x.split(':')[1]).join(',').split(',').filter(x => !!x.length)
|
|
824
|
+
|
|
825
|
+
const importInjections = injections.map((i) => {
|
|
826
|
+
if (i.endsWith('Controller')) {
|
|
827
|
+
throw 'Only stores, services and infrastructure can be injected in controllers'
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
if (i.endsWith('Store')) {
|
|
831
|
+
return `import { ${i} } from '${config?.paths?.stores?.replace('./src', '@')}/${toKebabFromPascal(i).slice(0, -'-store'.length)}'`
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
if (i.endsWith('Service')) {
|
|
835
|
+
return `import { ${i} } from '${config?.paths?.services?.replace('./src', '@')}/${toKebabFromPascal(i).slice(0, -'-service'.length)}'`
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
return `import { ${i} } from '${config?.paths?.infrastructure?.replace('./src', '@')}/${toKebabFromPascal(i)}'`
|
|
839
|
+
})
|
|
840
|
+
|
|
841
|
+
fs.mkdirSync(folder, { recursive: true })
|
|
842
|
+
|
|
843
|
+
// Metadata
|
|
844
|
+
|
|
845
|
+
fs.writeFileSync(path.resolve(folder, `${entityName}.controller.metadata.ts`), [
|
|
846
|
+
`import { Controller } from '@alevnyacow/nzmt'`,
|
|
847
|
+
``,
|
|
848
|
+
`export const ${lowerCase}ControllerMetadata = {`,
|
|
849
|
+
`\tname: '${upperCase}Controller',`,
|
|
850
|
+
`\tschemas: {}`,
|
|
851
|
+
`} satisfies Controller.Metadata`,
|
|
852
|
+
``,
|
|
853
|
+
`export type ${upperCase}API = Controller.Contract<typeof ${lowerCase}ControllerMetadata>`
|
|
854
|
+
].filter(x => typeof x === 'string').join('\n'))
|
|
855
|
+
|
|
856
|
+
// Body
|
|
857
|
+
|
|
858
|
+
fs.writeFileSync(path.resolve(folder, `${entityName}.controller.ts`), [
|
|
859
|
+
`import { Controller } from '@alevnyacow/nzmt'`,
|
|
860
|
+
`import { injectable } from 'inversify'`,
|
|
861
|
+
`import { DITokens } from '${config?.paths?.di?.replace('./src', '@')}'`,
|
|
862
|
+
`import { ${lowerCase}ControllerMetadata } from './${entityName}.controller.metadata'`,
|
|
863
|
+
...importInjections,
|
|
864
|
+
``,
|
|
865
|
+
`@injectable()`,
|
|
866
|
+
`export class ${upperCase}Controller {`,
|
|
867
|
+
`\tconstructor(`,
|
|
868
|
+
...injections.map(x => `\t\t@inject('${x}' satisfies DITokens) private readonly ${x.charAt(0).toLowerCase() + x.slice(1)}: ${x},`),
|
|
869
|
+
`\t) {}`,
|
|
870
|
+
``,
|
|
871
|
+
`\tprivate readonly endpoints = Controller.endpoints(${lowerCase}ControllerMetadata)`,
|
|
872
|
+
``,
|
|
873
|
+
`}`
|
|
874
|
+
].filter(x => typeof x === 'string').join('\n'))
|
|
875
|
+
|
|
876
|
+
// Barrel
|
|
877
|
+
|
|
878
|
+
fs.writeFileSync(path.resolve(folder, `index.ts`), [
|
|
879
|
+
`export * from './${entityName}.controller'`,
|
|
880
|
+
`export * from './${entityName}.controller.metadata'`
|
|
881
|
+
].filter(x => typeof x === 'string').join('\n'))
|
|
882
|
+
|
|
883
|
+
// Update DI
|
|
884
|
+
|
|
885
|
+
const diEntriesPath = path.resolve(process.cwd(), config?.paths?.di, 'entries.di.ts')
|
|
886
|
+
|
|
887
|
+
insertBeforeLineInFile(
|
|
888
|
+
diEntriesPath,
|
|
889
|
+
'type DIEntries =',
|
|
890
|
+
`import { ${upperCase}Controller } from '${config?.paths?.controllers.replace('./src', '@')}/${entityName}'`
|
|
891
|
+
)
|
|
892
|
+
|
|
893
|
+
insertAfterLineInFile(
|
|
894
|
+
diEntriesPath,
|
|
895
|
+
'// Controllers',
|
|
896
|
+
`\t${upperCase}Controller,`,
|
|
897
|
+
)
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
if (command.toLowerCase() === 'controller' || command === 'c') {
|
|
842
901
|
var [lowerCase, upperCase] = camelizeVariants(entityName)
|
|
843
|
-
|
|
844
|
-
generateStores(lowerCase, upperCase, true)
|
|
845
|
-
generateService(lowerCase, upperCase, true)
|
|
902
|
+
generateController(upperCase, lowerCase)
|
|
846
903
|
process.exit(0)
|
|
847
904
|
}
|