express-sweet 1.0.22 → 1.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 (499) hide show
  1. package/CHANGELOG.md +80 -25
  2. package/README.md +149 -12
  3. package/dist/build.common.js +7 -7
  4. package/dist/build.esm.js +9 -9
  5. package/docs/{templates → download/templates}/cjs/authentication.js +3 -3
  6. package/docs/{templates → download/templates}/cjs/config.js +0 -0
  7. package/docs/{templates → download/templates}/cjs/database.js +3 -3
  8. package/docs/{templates → download/templates}/cjs/view.js +0 -0
  9. package/docs/{templates → download/templates}/esm/authentication.js +3 -3
  10. package/docs/{templates → download/templates}/esm/config.js +0 -0
  11. package/docs/{templates → download/templates}/esm/database.js +3 -3
  12. package/docs/{templates → download/templates}/esm/view.js +0 -0
  13. package/docs/img/belongs-to-many.png +0 -0
  14. package/docs/img/belongs-to.png +0 -0
  15. package/docs/img/has-many.png +0 -0
  16. package/docs/img/has-one.png +0 -0
  17. package/docs/img/logos/default-small.svg +3 -0
  18. package/docs/img/logos/default.svg +1 -0
  19. package/docs/img/logos/favicon.svg +3 -0
  20. package/docs/img/screencaps/login.png +0 -0
  21. package/docs/img/screencaps/personal-editing.png +0 -0
  22. package/docs/img/screencaps/personal.png +0 -0
  23. package/docs/img/screencaps/user-editing.png +0 -0
  24. package/docs/img/screencaps/users.png +0 -0
  25. package/docs/index.html +5697 -3104
  26. package/docs/theme/css/style.bundle.css +48542 -0
  27. package/docs/theme/js/scripts.bundle.js +7882 -0
  28. package/docs/theme/js/widgets.bundle.js +17949 -0
  29. package/docs/theme/media/svg/avatars/001-boy.svg +94 -0
  30. package/docs/theme/media/svg/avatars/002-girl.svg +139 -0
  31. package/docs/theme/media/svg/avatars/003-girl-1.svg +109 -0
  32. package/docs/theme/media/svg/avatars/004-boy-1.svg +109 -0
  33. package/docs/theme/media/svg/avatars/005-girl-2.svg +153 -0
  34. package/docs/theme/media/svg/avatars/006-girl-3.svg +120 -0
  35. package/docs/theme/media/svg/avatars/007-boy-2.svg +128 -0
  36. package/docs/theme/media/svg/avatars/008-boy-3.svg +106 -0
  37. package/docs/theme/media/svg/avatars/009-boy-4.svg +81 -0
  38. package/docs/theme/media/svg/avatars/010-girl-4.svg +107 -0
  39. package/docs/theme/media/svg/avatars/011-boy-5.svg +94 -0
  40. package/docs/theme/media/svg/avatars/012-girl-5.svg +114 -0
  41. package/docs/theme/media/svg/avatars/013-girl-6.svg +112 -0
  42. package/docs/theme/media/svg/avatars/014-girl-7.svg +89 -0
  43. package/docs/theme/media/svg/avatars/015-boy-6.svg +98 -0
  44. package/docs/theme/media/svg/avatars/016-boy-7.svg +109 -0
  45. package/docs/theme/media/svg/avatars/017-girl-8.svg +99 -0
  46. package/docs/theme/media/svg/avatars/018-girl-9.svg +92 -0
  47. package/docs/theme/media/svg/avatars/019-girl-10.svg +75 -0
  48. package/docs/theme/media/svg/avatars/020-girl-11.svg +89 -0
  49. package/docs/theme/media/svg/avatars/021-boy-8.svg +110 -0
  50. package/docs/theme/media/svg/avatars/022-girl-12.svg +91 -0
  51. package/docs/theme/media/svg/avatars/023-girl-13.svg +90 -0
  52. package/docs/theme/media/svg/avatars/024-boy-9.svg +123 -0
  53. package/docs/theme/media/svg/avatars/025-girl-14.svg +138 -0
  54. package/docs/theme/media/svg/avatars/026-boy-10.svg +110 -0
  55. package/docs/theme/media/svg/avatars/027-girl-15.svg +152 -0
  56. package/docs/theme/media/svg/avatars/028-girl-16.svg +97 -0
  57. package/docs/theme/media/svg/avatars/029-boy-11.svg +121 -0
  58. package/docs/theme/media/svg/avatars/030-girl-17.svg +115 -0
  59. package/docs/theme/media/svg/avatars/031-boy-12.svg +105 -0
  60. package/docs/theme/media/svg/avatars/032-boy-13.svg +101 -0
  61. package/docs/theme/media/svg/avatars/033-girl-18.svg +95 -0
  62. package/docs/theme/media/svg/avatars/034-boy-14.svg +84 -0
  63. package/docs/theme/media/svg/avatars/035-boy-15.svg +123 -0
  64. package/docs/theme/media/svg/avatars/036-girl-19.svg +119 -0
  65. package/docs/theme/media/svg/avatars/037-girl-20.svg +82 -0
  66. package/docs/theme/media/svg/avatars/038-boy-16.svg +78 -0
  67. package/docs/theme/media/svg/avatars/039-girl-21.svg +101 -0
  68. package/docs/theme/media/svg/avatars/040-boy-17.svg +83 -0
  69. package/docs/theme/media/svg/avatars/041-girl-22.svg +83 -0
  70. package/docs/theme/media/svg/avatars/042-girl-23.svg +86 -0
  71. package/docs/theme/media/svg/avatars/043-boy-18.svg +147 -0
  72. package/docs/theme/media/svg/avatars/044-boy-19.svg +116 -0
  73. package/docs/theme/media/svg/avatars/045-boy-20.svg +92 -0
  74. package/docs/theme/media/svg/avatars/046-girl-24.svg +114 -0
  75. package/docs/theme/media/svg/avatars/047-girl-25.svg +94 -0
  76. package/docs/theme/media/svg/avatars/048-boy-21.svg +91 -0
  77. package/docs/theme/media/svg/avatars/049-boy-22.svg +85 -0
  78. package/docs/theme/media/svg/avatars/050-girl-26.svg +87 -0
  79. package/docs/theme/media/svg/avatars/blank-dark.svg +5 -0
  80. package/docs/theme/media/svg/avatars/blank.svg +5 -0
  81. package/docs/theme/media/svg/brand-logos/adidas-9.svg +1 -0
  82. package/docs/theme/media/svg/brand-logos/adidas.svg +1 -0
  83. package/docs/theme/media/svg/brand-logos/airbnb-2.svg +1 -0
  84. package/docs/theme/media/svg/brand-logos/alcatel-mobile-3.svg +1 -0
  85. package/docs/theme/media/svg/brand-logos/amazon-dark.svg +13 -0
  86. package/docs/theme/media/svg/brand-logos/amazon.svg +1 -0
  87. package/docs/theme/media/svg/brand-logos/android-wordmark.svg +1 -0
  88. package/docs/theme/media/svg/brand-logos/angular-3.svg +1 -0
  89. package/docs/theme/media/svg/brand-logos/angular-icon-1.svg +1 -0
  90. package/docs/theme/media/svg/brand-logos/angular-icon.svg +1 -0
  91. package/docs/theme/media/svg/brand-logos/angular.svg +1 -0
  92. package/docs/theme/media/svg/brand-logos/aon.svg +18 -0
  93. package/docs/theme/media/svg/brand-logos/apigee.svg +1 -0
  94. package/docs/theme/media/svg/brand-logos/apple-black-dark.svg +10 -0
  95. package/docs/theme/media/svg/brand-logos/apple-black.svg +1 -0
  96. package/docs/theme/media/svg/brand-logos/apple-itunes.svg +1 -0
  97. package/docs/theme/media/svg/brand-logos/aries-2.svg +1 -0
  98. package/docs/theme/media/svg/brand-logos/asml-1.svg +1 -0
  99. package/docs/theme/media/svg/brand-logos/aspnetzero.svg +17 -0
  100. package/docs/theme/media/svg/brand-logos/atica.svg +16 -0
  101. package/docs/theme/media/svg/brand-logos/audi-11.svg +1 -0
  102. package/docs/theme/media/svg/brand-logos/aven.svg +20 -0
  103. package/docs/theme/media/svg/brand-logos/avis-1.svg +1 -0
  104. package/docs/theme/media/svg/brand-logos/avocode-inc.svg +1 -0
  105. package/docs/theme/media/svg/brand-logos/balloon.svg +1 -0
  106. package/docs/theme/media/svg/brand-logos/banco-santander-logo.svg +1 -0
  107. package/docs/theme/media/svg/brand-logos/beats-electronics.svg +1 -0
  108. package/docs/theme/media/svg/brand-logos/bebo.svg +42 -0
  109. package/docs/theme/media/svg/brand-logos/behance.svg +10 -0
  110. package/docs/theme/media/svg/brand-logos/biman-airlines-classic-logo.svg +1 -0
  111. package/docs/theme/media/svg/brand-logos/bookingcom-1.svg +1 -0
  112. package/docs/theme/media/svg/brand-logos/bootstrap-4.svg +1 -0
  113. package/docs/theme/media/svg/brand-logos/bootstrap-5.svg +1 -0
  114. package/docs/theme/media/svg/brand-logos/bootstrap5.svg +10 -0
  115. package/docs/theme/media/svg/brand-logos/bose.svg +1 -0
  116. package/docs/theme/media/svg/brand-logos/bp-2.svg +6 -0
  117. package/docs/theme/media/svg/brand-logos/bp-3.svg +1 -0
  118. package/docs/theme/media/svg/brand-logos/brantano.svg +1 -0
  119. package/docs/theme/media/svg/brand-logos/bride.svg +1 -0
  120. package/docs/theme/media/svg/brand-logos/british-council-1.svg +1 -0
  121. package/docs/theme/media/svg/brand-logos/brondi.svg +1 -0
  122. package/docs/theme/media/svg/brand-logos/campingaz-1.svg +1 -0
  123. package/docs/theme/media/svg/brand-logos/canon-logo.svg +1 -0
  124. package/docs/theme/media/svg/brand-logos/carrols.svg +1 -0
  125. package/docs/theme/media/svg/brand-logos/casio.svg +1 -0
  126. package/docs/theme/media/svg/brand-logos/caterpillar-2.svg +1 -0
  127. package/docs/theme/media/svg/brand-logos/citrix-6002.svg +1 -0
  128. package/docs/theme/media/svg/brand-logos/code-lab.svg +23 -0
  129. package/docs/theme/media/svg/brand-logos/codeigniter.svg +1 -0
  130. package/docs/theme/media/svg/brand-logos/comcast.svg +1 -0
  131. package/docs/theme/media/svg/brand-logos/conair.svg +1 -0
  132. package/docs/theme/media/svg/brand-logos/costa-2.svg +1 -0
  133. package/docs/theme/media/svg/brand-logos/costco-wholesale-logo.svg +1 -0
  134. package/docs/theme/media/svg/brand-logos/css-5.svg +1 -0
  135. package/docs/theme/media/svg/brand-logos/decathlon-logo.svg +1 -0
  136. package/docs/theme/media/svg/brand-logos/deloitte-1.svg +1 -0
  137. package/docs/theme/media/svg/brand-logos/depend.svg +1 -0
  138. package/docs/theme/media/svg/brand-logos/diesel-5.svg +1 -0
  139. package/docs/theme/media/svg/brand-logos/disqus.svg +49 -0
  140. package/docs/theme/media/svg/brand-logos/django-community.svg +1 -0
  141. package/docs/theme/media/svg/brand-logos/dribbble-icon-1.svg +1 -0
  142. package/docs/theme/media/svg/brand-logos/dribbble-pink.svg +1 -0
  143. package/docs/theme/media/svg/brand-logos/duolingo.svg +3 -0
  144. package/docs/theme/media/svg/brand-logos/dynamac.svg +1 -0
  145. package/docs/theme/media/svg/brand-logos/ebay.svg +1 -0
  146. package/docs/theme/media/svg/brand-logos/ember.svg +1 -0
  147. package/docs/theme/media/svg/brand-logos/envato.svg +1 -0
  148. package/docs/theme/media/svg/brand-logos/espacio-urbano.svg +1 -0
  149. package/docs/theme/media/svg/brand-logos/etoys-com.svg +1 -0
  150. package/docs/theme/media/svg/brand-logos/facebook-1.svg +1 -0
  151. package/docs/theme/media/svg/brand-logos/facebook-2.svg +1 -0
  152. package/docs/theme/media/svg/brand-logos/facebook-3.svg +1 -0
  153. package/docs/theme/media/svg/brand-logos/facebook-4.svg +4 -0
  154. package/docs/theme/media/svg/brand-logos/farmers-insurance-3.svg +1 -0
  155. package/docs/theme/media/svg/brand-logos/figma-1.svg +1 -0
  156. package/docs/theme/media/svg/brand-logos/foursquare.svg +1 -0
  157. package/docs/theme/media/svg/brand-logos/fox-hub.svg +6 -0
  158. package/docs/theme/media/svg/brand-logos/friday-s.svg +1 -0
  159. package/docs/theme/media/svg/brand-logos/fujifilm.svg +18 -0
  160. package/docs/theme/media/svg/brand-logos/funding-circle.svg +1 -0
  161. package/docs/theme/media/svg/brand-logos/garmin-1.svg +1 -0
  162. package/docs/theme/media/svg/brand-logos/general-electric.svg +1 -0
  163. package/docs/theme/media/svg/brand-logos/github-1.svg +12 -0
  164. package/docs/theme/media/svg/brand-logos/github-2.svg +1 -0
  165. package/docs/theme/media/svg/brand-logos/github-icon.svg +1 -0
  166. package/docs/theme/media/svg/brand-logos/github.svg +3 -0
  167. package/docs/theme/media/svg/brand-logos/gitlab.svg +1 -0
  168. package/docs/theme/media/svg/brand-logos/google-icon.svg +6 -0
  169. package/docs/theme/media/svg/brand-logos/google-photos.svg +1 -0
  170. package/docs/theme/media/svg/brand-logos/google-play-store.svg +1 -0
  171. package/docs/theme/media/svg/brand-logos/google-podcasts.svg +1 -0
  172. package/docs/theme/media/svg/brand-logos/google-tag-manager.svg +18 -0
  173. package/docs/theme/media/svg/brand-logos/gradiente-2.svg +1 -0
  174. package/docs/theme/media/svg/brand-logos/gulp-1.svg +1 -0
  175. package/docs/theme/media/svg/brand-logos/gulp.svg +1 -0
  176. package/docs/theme/media/svg/brand-logos/hbo.svg +1 -0
  177. package/docs/theme/media/svg/brand-logos/heavylift.svg +1 -0
  178. package/docs/theme/media/svg/brand-logos/hilton-buenos-aires.svg +1 -0
  179. package/docs/theme/media/svg/brand-logos/himel.svg +1 -0
  180. package/docs/theme/media/svg/brand-logos/honda-7.svg +1 -0
  181. package/docs/theme/media/svg/brand-logos/hp-2.svg +1 -0
  182. package/docs/theme/media/svg/brand-logos/hp-3.svg +4 -0
  183. package/docs/theme/media/svg/brand-logos/hp-hewlett-packard.svg +1 -0
  184. package/docs/theme/media/svg/brand-logos/html5.svg +1 -0
  185. package/docs/theme/media/svg/brand-logos/huggies-2.svg +1 -0
  186. package/docs/theme/media/svg/brand-logos/ikon-1.svg +1 -0
  187. package/docs/theme/media/svg/brand-logos/infography.svg +1 -0
  188. package/docs/theme/media/svg/brand-logos/instagram-2-1.svg +1 -0
  189. package/docs/theme/media/svg/brand-logos/instagram-2016.svg +1 -0
  190. package/docs/theme/media/svg/brand-logos/intermarche-2.svg +53 -0
  191. package/docs/theme/media/svg/brand-logos/invision.svg +1 -0
  192. package/docs/theme/media/svg/brand-logos/javascript-2.svg +1 -0
  193. package/docs/theme/media/svg/brand-logos/javascript-4.svg +1 -0
  194. package/docs/theme/media/svg/brand-logos/javascript.svg +1 -0
  195. package/docs/theme/media/svg/brand-logos/jelcz.svg +1 -0
  196. package/docs/theme/media/svg/brand-logos/jfits.svg +1 -0
  197. package/docs/theme/media/svg/brand-logos/jquery-2.svg +1 -0
  198. package/docs/theme/media/svg/brand-logos/jquery.svg +1 -0
  199. package/docs/theme/media/svg/brand-logos/kanba.svg +25 -0
  200. package/docs/theme/media/svg/brand-logos/keysight-logo.svg +1 -0
  201. package/docs/theme/media/svg/brand-logos/kickstarter.svg +23 -0
  202. package/docs/theme/media/svg/brand-logos/komatsu-3.svg +38 -0
  203. package/docs/theme/media/svg/brand-logos/koni-special.svg +1 -0
  204. package/docs/theme/media/svg/brand-logos/kpmg.svg +14 -0
  205. package/docs/theme/media/svg/brand-logos/laravel-2.svg +10 -0
  206. package/docs/theme/media/svg/brand-logos/last-fm-1.svg +1 -0
  207. package/docs/theme/media/svg/brand-logos/leaf.svg +24 -0
  208. package/docs/theme/media/svg/brand-logos/leclerc-1.svg +1 -0
  209. package/docs/theme/media/svg/brand-logos/legrand.svg +1 -0
  210. package/docs/theme/media/svg/brand-logos/leica-2.svg +1 -0
  211. package/docs/theme/media/svg/brand-logos/levis.svg +1 -0
  212. package/docs/theme/media/svg/brand-logos/lg-electronics.svg +1 -0
  213. package/docs/theme/media/svg/brand-logos/lidl-supermarkets.svg +1 -0
  214. package/docs/theme/media/svg/brand-logos/linkedin-1.svg +14 -0
  215. package/docs/theme/media/svg/brand-logos/linkedin-2.svg +11 -0
  216. package/docs/theme/media/svg/brand-logos/linkedin.svg +1 -0
  217. package/docs/theme/media/svg/brand-logos/lloyds-of-london-logo.svg +1 -0
  218. package/docs/theme/media/svg/brand-logos/mastercard-icon.svg +13 -0
  219. package/docs/theme/media/svg/brand-logos/maxis-communications-logo.svg +1 -0
  220. package/docs/theme/media/svg/brand-logos/metro-1.svg +1 -0
  221. package/docs/theme/media/svg/brand-logos/metro-4.svg +1 -0
  222. package/docs/theme/media/svg/brand-logos/metro-by-t-mobile.svg +1 -0
  223. package/docs/theme/media/svg/brand-logos/microsoft-5.svg +1 -0
  224. package/docs/theme/media/svg/brand-logos/miller-6.svg +1 -0
  225. package/docs/theme/media/svg/brand-logos/minol.svg +1 -0
  226. package/docs/theme/media/svg/brand-logos/mnd.svg +1 -0
  227. package/docs/theme/media/svg/brand-logos/msn.svg +1 -0
  228. package/docs/theme/media/svg/brand-logos/mysql-2.svg +1 -0
  229. package/docs/theme/media/svg/brand-logos/nasa.svg +21 -0
  230. package/docs/theme/media/svg/brand-logos/nestle-4.svg +1 -0
  231. package/docs/theme/media/svg/brand-logos/new-beko-logo.svg +1 -0
  232. package/docs/theme/media/svg/brand-logos/nike-4.svg +1 -0
  233. package/docs/theme/media/svg/brand-logos/node-sass.svg +1 -0
  234. package/docs/theme/media/svg/brand-logos/noht.svg +1 -0
  235. package/docs/theme/media/svg/brand-logos/npm.svg +1 -0
  236. package/docs/theme/media/svg/brand-logos/ocaml.svg +1 -0
  237. package/docs/theme/media/svg/brand-logos/oger-tours.svg +1 -0
  238. package/docs/theme/media/svg/brand-logos/origin-4.svg +1 -0
  239. package/docs/theme/media/svg/brand-logos/paypie.svg +1 -0
  240. package/docs/theme/media/svg/brand-logos/pinterest-p.svg +10 -0
  241. package/docs/theme/media/svg/brand-logos/pinterest.svg +1 -0
  242. package/docs/theme/media/svg/brand-logos/plurk.svg +47 -0
  243. package/docs/theme/media/svg/brand-logos/puma-logo.svg +1 -0
  244. package/docs/theme/media/svg/brand-logos/python-5.svg +1 -0
  245. package/docs/theme/media/svg/brand-logos/quilosa.svg +5 -0
  246. package/docs/theme/media/svg/brand-logos/react-native-firebase-1.svg +1 -0
  247. package/docs/theme/media/svg/brand-logos/react-router.svg +1 -0
  248. package/docs/theme/media/svg/brand-logos/react.svg +1 -0
  249. package/docs/theme/media/svg/brand-logos/redbull.svg +1 -0
  250. package/docs/theme/media/svg/brand-logos/reddit.svg +9 -0
  251. package/docs/theme/media/svg/brand-logos/rgb.svg +59 -0
  252. package/docs/theme/media/svg/brand-logos/sass-1.svg +1 -0
  253. package/docs/theme/media/svg/brand-logos/seat-pg.svg +1 -0
  254. package/docs/theme/media/svg/brand-logos/sentry-3.svg +1 -0
  255. package/docs/theme/media/svg/brand-logos/shell.svg +1 -0
  256. package/docs/theme/media/svg/brand-logos/siplast.svg +1 -0
  257. package/docs/theme/media/svg/brand-logos/slack-icon.svg +6 -0
  258. package/docs/theme/media/svg/brand-logos/slack-new-logo.svg +1 -0
  259. package/docs/theme/media/svg/brand-logos/slack.svg +1 -0
  260. package/docs/theme/media/svg/brand-logos/smartphone.svg +5 -0
  261. package/docs/theme/media/svg/brand-logos/snowbird.svg +1 -0
  262. package/docs/theme/media/svg/brand-logos/soriana-logo-1.svg +1 -0
  263. package/docs/theme/media/svg/brand-logos/sparkpost.svg +1 -0
  264. package/docs/theme/media/svg/brand-logos/spotify-2.svg +1 -0
  265. package/docs/theme/media/svg/brand-logos/spotify-logo.svg +1 -0
  266. package/docs/theme/media/svg/brand-logos/spotify.svg +13 -0
  267. package/docs/theme/media/svg/brand-logos/spring-3.svg +10 -0
  268. package/docs/theme/media/svg/brand-logos/sprint-nextel.svg +1 -0
  269. package/docs/theme/media/svg/brand-logos/stabilo.svg +1 -0
  270. package/docs/theme/media/svg/brand-logos/strava-wordmark-1.svg +1 -0
  271. package/docs/theme/media/svg/brand-logos/stream-1.svg +1 -0
  272. package/docs/theme/media/svg/brand-logos/super-cuts.svg +1 -0
  273. package/docs/theme/media/svg/brand-logos/suzuki-motor-corporation-logo.svg +1 -0
  274. package/docs/theme/media/svg/brand-logos/suzuki.svg +1 -0
  275. package/docs/theme/media/svg/brand-logos/swarm.svg +1 -0
  276. package/docs/theme/media/svg/brand-logos/syngenta.svg +1 -0
  277. package/docs/theme/media/svg/brand-logos/telegram-2.svg +24 -0
  278. package/docs/theme/media/svg/brand-logos/telegram.svg +4 -0
  279. package/docs/theme/media/svg/brand-logos/tempstar.svg +1 -0
  280. package/docs/theme/media/svg/brand-logos/the-blockchain-group-tbg.svg +1 -0
  281. package/docs/theme/media/svg/brand-logos/thomas-1.svg +1 -0
  282. package/docs/theme/media/svg/brand-logos/thuisbezorgd.svg +1 -0
  283. package/docs/theme/media/svg/brand-logos/thule-2.svg +1 -0
  284. package/docs/theme/media/svg/brand-logos/ticketmaster-5.svg +1 -0
  285. package/docs/theme/media/svg/brand-logos/tofas-logo.svg +1 -0
  286. package/docs/theme/media/svg/brand-logos/tower.svg +4 -0
  287. package/docs/theme/media/svg/brand-logos/treva.svg +11 -0
  288. package/docs/theme/media/svg/brand-logos/trimble-2.svg +55 -0
  289. package/docs/theme/media/svg/brand-logos/trivago.svg +1 -0
  290. package/docs/theme/media/svg/brand-logos/truman.svg +58 -0
  291. package/docs/theme/media/svg/brand-logos/tvit.svg +11 -0
  292. package/docs/theme/media/svg/brand-logos/twitch.svg +5 -0
  293. package/docs/theme/media/svg/brand-logos/twitter-2.svg +4 -0
  294. package/docs/theme/media/svg/brand-logos/twitter.svg +10 -0
  295. package/docs/theme/media/svg/brand-logos/typescript-1.svg +6 -0
  296. package/docs/theme/media/svg/brand-logos/unilever-2.svg +1 -0
  297. package/docs/theme/media/svg/brand-logos/university-of-cambridge.svg +1 -0
  298. package/docs/theme/media/svg/brand-logos/urw-software.svg +1 -0
  299. package/docs/theme/media/svg/brand-logos/verizon-2015.svg +1 -0
  300. package/docs/theme/media/svg/brand-logos/vimeo-icon.svg +1 -0
  301. package/docs/theme/media/svg/brand-logos/vimeo.svg +1 -0
  302. package/docs/theme/media/svg/brand-logos/visa-icon.svg +5 -0
  303. package/docs/theme/media/svg/brand-logos/visa.svg +1 -0
  304. package/docs/theme/media/svg/brand-logos/vodafone.svg +3 -0
  305. package/docs/theme/media/svg/brand-logos/volicity-9.svg +10 -0
  306. package/docs/theme/media/svg/brand-logos/vue-9.svg +1 -0
  307. package/docs/theme/media/svg/brand-logos/vype.svg +1 -0
  308. package/docs/theme/media/svg/brand-logos/webasto-logo.svg +1 -0
  309. package/docs/theme/media/svg/brand-logos/webpack-icon.svg +1 -0
  310. package/docs/theme/media/svg/brand-logos/webpack.svg +1 -0
  311. package/docs/theme/media/svg/brand-logos/west-marine.svg +1 -0
  312. package/docs/theme/media/svg/brand-logos/worth.svg +1 -0
  313. package/docs/theme/media/svg/brand-logos/xing-icon.svg +1 -0
  314. package/docs/theme/media/svg/brand-logos/youtube-3.svg +1 -0
  315. package/docs/theme/media/svg/brand-logos/youtube-play.svg +4 -0
  316. package/docs/theme/media/svg/brand-logos/youtube.svg +1 -0
  317. package/docs/theme/media/svg/brand-logos/ziprecruiter-blacktext.svg +1 -0
  318. package/docs/theme/media/svg/brand-logos/zurich-logo.svg +1 -0
  319. package/docs/theme/media/svg/card-logos/american-express-dark.svg +25 -0
  320. package/docs/theme/media/svg/card-logos/american-express.svg +32 -0
  321. package/docs/theme/media/svg/card-logos/bitcoin 1.svg +7 -0
  322. package/docs/theme/media/svg/card-logos/dark/american-express.svg +25 -0
  323. package/docs/theme/media/svg/card-logos/dark/mastercard.svg +6 -0
  324. package/docs/theme/media/svg/card-logos/dark/visa.svg +5 -0
  325. package/docs/theme/media/svg/card-logos/mastercard-dark.svg +6 -0
  326. package/docs/theme/media/svg/card-logos/mastercard.svg +13 -0
  327. package/docs/theme/media/svg/card-logos/visa-dark.svg +5 -0
  328. package/docs/theme/media/svg/card-logos/visa.svg +5 -0
  329. package/docs/theme/media/svg/coins/binance.svg +1 -0
  330. package/docs/theme/media/svg/coins/bitcoin.svg +2 -0
  331. package/docs/theme/media/svg/coins/chainlink.svg +1 -0
  332. package/docs/theme/media/svg/coins/coin.svg +1 -0
  333. package/docs/theme/media/svg/coins/ethereum.svg +1 -0
  334. package/docs/theme/media/svg/coins/filecoin.svg +1 -0
  335. package/docs/theme/media/svg/files/ai-dark.svg +9 -0
  336. package/docs/theme/media/svg/files/ai.svg +9 -0
  337. package/docs/theme/media/svg/files/blank-image-dark.svg +13 -0
  338. package/docs/theme/media/svg/files/blank-image.svg +13 -0
  339. package/docs/theme/media/svg/files/css-dark.svg +10 -0
  340. package/docs/theme/media/svg/files/css.svg +10 -0
  341. package/docs/theme/media/svg/files/dark/ai.svg +9 -0
  342. package/docs/theme/media/svg/files/dark/css.svg +10 -0
  343. package/docs/theme/media/svg/files/dark/doc.svg +10 -0
  344. package/docs/theme/media/svg/files/dark/folder-document.svg +10 -0
  345. package/docs/theme/media/svg/files/dark/pdf.svg +10 -0
  346. package/docs/theme/media/svg/files/dark/sql.svg +10 -0
  347. package/docs/theme/media/svg/files/dark/tif.svg +10 -0
  348. package/docs/theme/media/svg/files/dark/upload.svg +5 -0
  349. package/docs/theme/media/svg/files/dark/xml.svg +10 -0
  350. package/docs/theme/media/svg/files/doc-dark.svg +10 -0
  351. package/docs/theme/media/svg/files/doc.svg +10 -0
  352. package/docs/theme/media/svg/files/folder-document-dark.svg +10 -0
  353. package/docs/theme/media/svg/files/folder-document.svg +3 -0
  354. package/docs/theme/media/svg/files/pdf-dark.svg +10 -0
  355. package/docs/theme/media/svg/files/pdf.svg +10 -0
  356. package/docs/theme/media/svg/files/sql-dark.svg +10 -0
  357. package/docs/theme/media/svg/files/sql.svg +10 -0
  358. package/docs/theme/media/svg/files/tif-dark.svg +10 -0
  359. package/docs/theme/media/svg/files/tif.svg +10 -0
  360. package/docs/theme/media/svg/files/upload-dark.svg +5 -0
  361. package/docs/theme/media/svg/files/upload.svg +5 -0
  362. package/docs/theme/media/svg/files/xml-dark.svg +10 -0
  363. package/docs/theme/media/svg/files/xml.svg +10 -0
  364. package/docs/theme/media/svg/food-icons/cheeseburger.svg +42 -0
  365. package/docs/theme/media/svg/food-icons/cheesecake.svg +39 -0
  366. package/docs/theme/media/svg/food-icons/coffee.svg +25 -0
  367. package/docs/theme/media/svg/food-icons/salad.svg +27 -0
  368. package/docs/theme/media/svg/food-icons/spaghetti.svg +37 -0
  369. package/docs/theme/media/svg/general/rhone.svg +32 -0
  370. package/docs/theme/media/svg/humans/custom-1.svg +10 -0
  371. package/docs/theme/media/svg/illustrations/easy/1-dark.svg +9 -0
  372. package/docs/theme/media/svg/illustrations/easy/1.svg +9 -0
  373. package/docs/theme/media/svg/illustrations/easy/2-dark.svg +9 -0
  374. package/docs/theme/media/svg/illustrations/easy/2.svg +9 -0
  375. package/docs/theme/media/svg/illustrations/easy/3-dark.svg +11 -0
  376. package/docs/theme/media/svg/illustrations/easy/3.svg +11 -0
  377. package/docs/theme/media/svg/illustrations/easy/4.svg +8 -0
  378. package/docs/theme/media/svg/illustrations/easy/5.svg +8 -0
  379. package/docs/theme/media/svg/illustrations/easy/6.svg +9 -0
  380. package/docs/theme/media/svg/illustrations/easy/7.svg +8 -0
  381. package/docs/theme/media/svg/illustrations/landing.svg +50 -0
  382. package/docs/theme/media/svg/illustrations/sigma/illustration-realestate.svg +100 -0
  383. package/docs/theme/media/svg/illustrations/sigma/question.svg +87 -0
  384. package/docs/theme/media/svg/illustrations/sigma/volume-1-dark.svg +140 -0
  385. package/docs/theme/media/svg/illustrations/sigma/volume-1.svg +146 -0
  386. package/docs/theme/media/svg/misc/eolic-energy.svg +51 -0
  387. package/docs/theme/media/svg/misc/hot-air-balloon.svg +1 -0
  388. package/docs/theme/media/svg/misc/infography.svg +1 -0
  389. package/docs/theme/media/svg/misc/octagon.svg +3 -0
  390. package/docs/theme/media/svg/misc/puzzle.svg +1 -0
  391. package/docs/theme/media/svg/misc/recycling.svg +56 -0
  392. package/docs/theme/media/svg/misc/retweet.svg +55 -0
  393. package/docs/theme/media/svg/misc/smartphone-2-dark.svg +5 -0
  394. package/docs/theme/media/svg/misc/smartphone-2.svg +5 -0
  395. package/docs/theme/media/svg/misc/smartphone-dark.svg +5 -0
  396. package/docs/theme/media/svg/misc/smartphone.svg +5 -0
  397. package/docs/theme/media/svg/misc/taieri.svg +13 -0
  398. package/docs/theme/media/svg/misc/video-play.svg +17 -0
  399. package/docs/theme/media/svg/payment-methods/americanexpress.svg +14 -0
  400. package/docs/theme/media/svg/payment-methods/mastercard.svg +20 -0
  401. package/docs/theme/media/svg/payment-methods/paypal.svg +7 -0
  402. package/docs/theme/media/svg/payment-methods/visa.svg +4 -0
  403. package/docs/theme/media/svg/products-categories/gaming.svg +39 -0
  404. package/docs/theme/media/svg/products-categories/gloves.svg +17 -0
  405. package/docs/theme/media/svg/products-categories/shoes.svg +14 -0
  406. package/docs/theme/media/svg/products-categories/t-shirt.svg +15 -0
  407. package/docs/theme/media/svg/products-categories/watch.svg +16 -0
  408. package/docs/theme/media/svg/shapes/abstract-1-dark.svg +16 -0
  409. package/docs/theme/media/svg/shapes/abstract-1.svg +16 -0
  410. package/docs/theme/media/svg/shapes/abstract-10.svg +9 -0
  411. package/docs/theme/media/svg/shapes/abstract-2-dark.svg +12 -0
  412. package/docs/theme/media/svg/shapes/abstract-2.svg +5 -0
  413. package/docs/theme/media/svg/shapes/abstract-3-dark.svg +13 -0
  414. package/docs/theme/media/svg/shapes/abstract-3.svg +13 -0
  415. package/docs/theme/media/svg/shapes/abstract-4-dark.svg +11 -0
  416. package/docs/theme/media/svg/shapes/abstract-4.svg +11 -0
  417. package/docs/theme/media/svg/shapes/abstract-5-dark.svg +14 -0
  418. package/docs/theme/media/svg/shapes/abstract-5.svg +14 -0
  419. package/docs/theme/media/svg/shapes/abstract-6.svg +3 -0
  420. package/docs/theme/media/svg/shapes/abstract-7.svg +9 -0
  421. package/docs/theme/media/svg/shapes/abstract-8.svg +16 -0
  422. package/docs/theme/media/svg/shapes/abstract-9.svg +9 -0
  423. package/docs/theme/media/svg/shapes/bitcoin.svg +9 -0
  424. package/docs/theme/media/svg/shapes/dogecoin.svg +10 -0
  425. package/docs/theme/media/svg/shapes/ethereum.svg +8 -0
  426. package/docs/theme/media/svg/shapes/man-head.svg +0 -0
  427. package/docs/theme/media/svg/shapes/top-green.png +0 -0
  428. package/docs/theme/media/svg/shapes/wave-bg-dark.svg +14 -0
  429. package/docs/theme/media/svg/shapes/wave-bg-purple.svg +14 -0
  430. package/docs/theme/media/svg/shapes/wave-bg-red.svg +14 -0
  431. package/docs/theme/media/svg/shapes/widget-bg-1.png +0 -0
  432. package/docs/theme/media/svg/shapes/widget-bg-2.png +0 -0
  433. package/docs/theme/media/svg/social-logos/dribbble.svg +4 -0
  434. package/docs/theme/media/svg/social-logos/facebook.svg +4 -0
  435. package/docs/theme/media/svg/social-logos/github.svg +3 -0
  436. package/docs/theme/media/svg/social-logos/google.svg +6 -0
  437. package/docs/theme/media/svg/social-logos/instagram.svg +22 -0
  438. package/docs/theme/media/svg/social-logos/twitter.svg +10 -0
  439. package/docs/theme/media/svg/social-logos/youtube.svg +4 -0
  440. package/docs/theme/plugins/custom/prismjs/prismjs.bundle.css +192 -0
  441. package/docs/theme/plugins/custom/prismjs/prismjs.bundle.js +3485 -0
  442. package/docs/theme/plugins/global/fonts/@fortawesome/fa-brands-400.ttf +0 -0
  443. package/docs/theme/plugins/global/fonts/@fortawesome/fa-brands-400.woff2 +0 -0
  444. package/docs/theme/plugins/global/fonts/@fortawesome/fa-regular-400.ttf +0 -0
  445. package/docs/theme/plugins/global/fonts/@fortawesome/fa-regular-400.woff2 +0 -0
  446. package/docs/theme/plugins/global/fonts/@fortawesome/fa-solid-900.ttf +0 -0
  447. package/docs/theme/plugins/global/fonts/@fortawesome/fa-solid-900.woff2 +0 -0
  448. package/docs/theme/plugins/global/fonts/@fortawesome/fa-v4compatibility.ttf +0 -0
  449. package/docs/theme/plugins/global/fonts/@fortawesome/fa-v4compatibility.woff2 +0 -0
  450. package/docs/theme/plugins/global/fonts/bootstrap-icons/bootstrap-icons.woff +0 -0
  451. package/docs/theme/plugins/global/fonts/bootstrap-icons/bootstrap-icons.woff2 +0 -0
  452. package/docs/theme/plugins/global/fonts/fonticon/fonticon.css +235 -0
  453. package/docs/theme/plugins/global/fonts/fonticon/fonticon.eot +0 -0
  454. package/docs/theme/plugins/global/fonts/fonticon/fonticon.svg +225 -0
  455. package/docs/theme/plugins/global/fonts/fonticon/fonticon.ttf +0 -0
  456. package/docs/theme/plugins/global/fonts/fonticon/fonticon.woff +0 -0
  457. package/docs/theme/plugins/global/fonts/fonticon/fonticon.woff2 +0 -0
  458. package/docs/theme/plugins/global/fonts/line-awesome/la-brands-400.eot +0 -0
  459. package/docs/theme/plugins/global/fonts/line-awesome/la-brands-400.svg +1313 -0
  460. package/docs/theme/plugins/global/fonts/line-awesome/la-brands-400.ttf +0 -0
  461. package/docs/theme/plugins/global/fonts/line-awesome/la-brands-400.woff +0 -0
  462. package/docs/theme/plugins/global/fonts/line-awesome/la-brands-400.woff2 +0 -0
  463. package/docs/theme/plugins/global/fonts/line-awesome/la-regular-400.eot +0 -0
  464. package/docs/theme/plugins/global/fonts/line-awesome/la-regular-400.svg +467 -0
  465. package/docs/theme/plugins/global/fonts/line-awesome/la-regular-400.ttf +0 -0
  466. package/docs/theme/plugins/global/fonts/line-awesome/la-regular-400.woff +0 -0
  467. package/docs/theme/plugins/global/fonts/line-awesome/la-regular-400.woff2 +0 -0
  468. package/docs/theme/plugins/global/fonts/line-awesome/la-solid-900.eot +0 -0
  469. package/docs/theme/plugins/global/fonts/line-awesome/la-solid-900.svg +2894 -0
  470. package/docs/theme/plugins/global/fonts/line-awesome/la-solid-900.ttf +0 -0
  471. package/docs/theme/plugins/global/fonts/line-awesome/la-solid-900.woff +0 -0
  472. package/docs/theme/plugins/global/fonts/line-awesome/la-solid-900.woff2 +0 -0
  473. package/docs/theme/plugins/global/plugins.bundle.css +34622 -0
  474. package/docs/theme/plugins/global/plugins.bundle.js +71788 -0
  475. package/hero.svg +1 -0
  476. package/package.json +7 -6
  477. package/screencaps/login.png +0 -0
  478. package/screencaps/personal-editing.png +0 -0
  479. package/screencaps/personal.png +0 -0
  480. package/screencaps/user-editing.png +0 -0
  481. package/screencaps/users.png +0 -0
  482. package/types/database/Database.d.ts +33 -33
  483. package/types/interfaces/AuthenticationOptions.d.ts +19 -4
  484. package/types/interfaces/ViewOptions.d.ts +1 -1
  485. package/types/middlewares/Authentication.d.ts +10 -0
  486. package/types/package.d.ts +0 -1
  487. package/types/utils/isArray.d.ts +1 -1
  488. package/types/utils/isAsyncFunction.d.ts +1 -1
  489. package/types/utils/isObject.d.ts +1 -1
  490. package/types/utils/isString.d.ts +1 -1
  491. package/docs/docs.css +0 -284
  492. package/docs/docs.js +0 -41
  493. package/docs/img/associations/belongs-to-many.png +0 -0
  494. package/docs/img/associations/belongs-to.png +0 -0
  495. package/docs/img/associations/has-many.png +0 -0
  496. package/docs/img/associations/has-one.png +0 -0
  497. package/docs/img/demos/login&users.jfif +0 -0
  498. package/docs/img/hero.svg +0 -1
  499. package/docs/img/logo.svg +0 -12
package/CHANGELOG.md CHANGED
@@ -1,7 +1,60 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [1.0.22] - 2022-07-27
4
+ ## [1.0.24] - 2022/10/24
5
+ ### Fixed
6
+ - Added is_ajax option to user authentication.
7
+ config/authentication.js:
8
+ ```js
9
+ /**
10
+ * How to determine if it is an ajax request.
11
+ * The default is that if there is an XMLHttpRequest in the request header (req.xhr) returns true.
12
+ * For example, if there is no XMLHttpRequest in req(express.Request) and the Ajax endpoint starts with /api, a custom Ajax decision can be made like "return /^\/api\//.test(req.path)".
13
+ *
14
+ * @type {(req: express.Request) => boolean}
15
+ * @example
16
+ * is_ajax: req => {
17
+ * // If the request URL begins with /api, it is assumed to be Ajax.
18
+ * return /^\/api/.test(req.path);
19
+ * // return !!req.xhr;
20
+ * }
21
+ */
22
+ is_ajax: req => !!req.xhr
23
+ ```
24
+
25
+ ## [1.0.23] - 2022/10/20
26
+ ### Fixed
27
+ - A request body object has been added to the parameters of the callback function for user authentication.
28
+ config/authentication.js:
29
+ ```js
30
+ const UserModel = require('../models/UserModel');
31
+
32
+ /**
33
+ * User authentication configuration interface.
34
+ */
35
+ module.exports = {
36
+ /**
37
+ * This hook is called when authenticating a user.
38
+ * Please find the user information that owns the credentials based on the user name and password you received and return it.
39
+ * If the user who owns the credentials cannot be found, return null.
40
+ *
41
+ * Note that the user information must include an ID value that can identify the user.
42
+ *
43
+ * @type {(username: string, password: string, req: express.Request) => Promise<{[key: string]: any}|null>}
44
+ */
45
+ authenticate_user: async (username, password, req) => {
46
+ return UserModel.findOne({
47
+ where: {
48
+ email: username,
49
+ password
50
+ },
51
+ raw: true
52
+ });
53
+ }
54
+ }
55
+ ```
56
+
57
+ ## [1.0.22] - 2022/7/27
5
58
  ### Fixed
6
59
  - You can now set hook functions that are called before the view is rendered.
7
60
  Hook functions can be used, for example, to set local variables that can be used in the view.
@@ -15,17 +68,17 @@ All notable changes to this project will be documented in this file.
15
68
  * @example
16
69
  * // The message set here can be referenced in the view as {{message}}.
17
70
  * beforeRender: res => {
18
- * res.loclas.message = 'Hello World';
71
+ * res.locals.message = 'Hello World';
19
72
  * }
20
73
  *
21
74
  * @type {(res: express.Response) => void}
22
75
  */
23
76
  beforeRender: res => {
24
- res.loclas.message = 'Hello World';
77
+ res.locals.message = 'Hello World';
25
78
  }
26
79
  ```
27
80
 
28
- ## [1.0.21] - 2022-05-26
81
+ ## [1.0.21] - 2022/526
29
82
  ### Fixed
30
83
  - Added an option to the face indexing method to retrieve details (gender, emotion, age group) of indexed faces.
31
84
  ```js
@@ -69,7 +122,7 @@ All notable changes to this project will be documented in this file.
69
122
  console.log(faceDetails);
70
123
  ```
71
124
 
72
- ## [1.0.20] - 2022-05-25
125
+ ## [1.0.20] - 2022/5/25
73
126
  ### Fixed
74
127
  - Added an option to get details (emotion, gender, age group) to the face detection method.
75
128
  ```js
@@ -128,7 +181,7 @@ All notable changes to this project will be documented in this file.
128
181
  })();
129
182
  ```
130
183
 
131
- ## [1.0.19] - 2022-05-20
184
+ ## [1.0.19] - 2022/5/20
132
185
  ### Fixed
133
186
  - Add date format helper to view.
134
187
  ```html
@@ -137,7 +190,7 @@ All notable changes to this project will be documented in this file.
137
190
  {{format_date 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z" 'es'}} => 2021/10/24
138
191
  ```
139
192
 
140
- ## [1.0.18] - 2022-05-18
193
+ ## [1.0.18] - 2022/5/18
141
194
  ### Fixed
142
195
  - User authentication sessions can now be stored in redis.
143
196
  To use redis for session storage, simply add the following option to config/authentication.js.
@@ -161,19 +214,19 @@ All notable changes to this project will be documented in this file.
161
214
  redis_host: 'redis://localhost:6379'
162
215
  ```
163
216
 
164
- ## [1.0.17] - 2022-05-17
217
+ ## [1.0.17] - 2022/5/17
165
218
  ### Fixed
166
219
  - Updated documentation and refactored variable names.
167
220
 
168
- ## [1.0.16] - 2022-02-14
221
+ ## [1.0.16] - 2022/2/14
169
222
  ### Fixed
170
223
  - I forgot to include the build file, so I added the build file.
171
224
 
172
- ## [1.0.15] - 2022-02-14
225
+ ## [1.0.15] - 2022/2/14
173
226
  ### Fixed
174
227
  - Changed the type of 'config/authentication.js#allow_unauthenticated' from'string[]' to'(string|RegExp)[]}'.
175
228
 
176
- ## [1.0.14] - 2022-01-17
229
+ ## [1.0.14] - 2022/1/17
177
230
  ### Fixed
178
231
  - empty view helper can now check any type. Previously I could only check arrays.
179
232
  ```html
@@ -217,7 +270,7 @@ All notable changes to this project will be documented in this file.
217
270
  {{not_empty value}} => false
218
271
  ```
219
272
 
220
- ## [1.0.13] - 2021-12-13
273
+ ## [1.0.13] - 2021/12/13
221
274
  ### Fixed
222
275
  - The model's begin method now accepts the transaction option.
223
276
  See [Transaction | Sequelize](https://sequelize.org/master/class/lib/transaction.js~Transaction.html) for transaction options.
@@ -243,7 +296,7 @@ All notable changes to this project will be documented in this file.
243
296
  }
244
297
  ```
245
298
 
246
- ## [1.0.12] - 2021-11-16
299
+ ## [1.0.12] - 2021/11/16
247
300
  ### Fixed
248
301
  - Added a method to the model that can execute raw SQL.
249
302
  As there are often use cases in which it is just easier to execute raw / already prepared SQL queries, you can use the Model.query method.
@@ -258,11 +311,11 @@ All notable changes to this project will be documented in this file.
258
311
  const users = await BookModel.query("SELECT * FROM book", {type: BookModel.QueryTypes.SELECT});
259
312
  ```
260
313
 
261
- ## [1.0.11] - 2021-11-10
314
+ ## [1.0.11] - 2021/11/10
262
315
  ### Fixed
263
316
  - Fixed a bug that the database config was read before NODE_ENV was set and the database config matching NODE_ENV could not be read.
264
317
 
265
- ## [1.0.10] - 2021-10-19
318
+ ## [1.0.10] - 2021/10/19
266
319
  ### Fixed
267
320
  - Added face similarity found to face search results in collection.
268
321
 
@@ -287,33 +340,33 @@ All notable changes to this project will be documented in this file.
287
340
  console.log('Face search results:', res);
288
341
  ```
289
342
 
290
- ## [1.0.9] - 2021-10-13
343
+ ## [1.0.9] - 2021/10/13
291
344
  ### Fixed
292
345
  - Updated dependent package'sharp'from 0.25.4 to 0.29.1.
293
346
  This update statically links sharp's pre-built libvips binaries, eliminating the need to install Phton.
294
347
  Click [here](https://sharp.pixelplumbing.com/changelog) for sharp change log.
295
348
 
296
- ## [1.0.8] - 2021-09-25
349
+ ## [1.0.8] - 2021/9/25
297
350
  ### Fixed
298
351
  - Fixed a bug where the default router couldn't aqua from the endpoint URL.
299
352
 
300
- ## [1.0.7] - 2021-08-13
353
+ ## [1.0.7] - 2021/8/13
301
354
  ### Fixed
302
355
  - Added where member functions to Model class. Please see [here](https://takuya-motoshima.github.io/express-sweet/#model-class) for details.
303
356
 
304
- ## [1.0.6] - 2021-08-13
357
+ ## [1.0.6] - 2021/8/13
305
358
  ### Fixed
306
359
  - Added fn, col and literal member functions to Model class. Please see [here](https://takuya-motoshima.github.io/express-sweet/#model-class) for details.
307
360
 
308
- ## [1.0.5] - 2021-08-12
361
+ ## [1.0.5] - 2021/8/12
309
362
  ### Fixed
310
363
  - Changed the maximum size per field for multipart (multipart/form-data) requests from 1MB to unlimited.
311
364
 
312
- ## [1.0.4] - 2021-06-13
365
+ ## [1.0.4] - 2021/6/13
313
366
  ### Fixed
314
367
  - Fixed a bug where the referrer URL was set in app.locals.currentPath instead of the current URL.
315
368
 
316
- ## [1.0.3] - 2021-06-13
369
+ ## [1.0.3] - 2021/6/13
317
370
  ### Fixed
318
371
  - Change the current URL path of a local variable.app.locals.currentPath is a USVString containing an initial '/' followed by the path of the URL not including the query string or fragment.
319
372
 
@@ -322,12 +375,12 @@ All notable changes to this project will be documented in this file.
322
375
  console.log(app.locals.currentPath);
323
376
  ```
324
377
 
325
- ## [1.0.2] - 2021-06-10
378
+ ## [1.0.2] - 2021//6/10
326
379
  ### Fixed
327
380
  - Updated rollup from version 2.44 to 2.51.
328
381
  - Fixed a bug where preloading models failed in cjs.
329
382
 
330
- ## [1.0.1] - 2021-06-02
383
+ ## [1.0.1] - 2021/6/2
331
384
  ### Fixed
332
385
  - Fixed a bug that caused an error when reading options defined in ESM's default Export.
333
386
 
@@ -352,4 +405,6 @@ All notable changes to this project will be documented in this file.
352
405
  [1.0.19]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.18...v1.0.19
353
406
  [1.0.20]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.19...v1.0.20
354
407
  [1.0.21]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.20...v1.0.21
355
- [1.0.22]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.21...v1.0.22
408
+ [1.0.22]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.21...v1.0.22
409
+ [1.0.23]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.22...v1.0.23
410
+ [1.0.24]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.23...v1.0.24
package/README.md CHANGED
@@ -1,19 +1,156 @@
1
- # express-sweet
2
- ![heading](docs/img/hero.svg)
1
+ [![Express Sweet Logo](hero.svg)](https://takuya-motoshima.github.io/express-sweet/#install)
3
2
 
4
3
  Extend Express functionality with Express Sweet and start developing fast, minimal web applications.
5
4
 
6
5
  ## Documentation
7
- * [Introduction](https://takuya-motoshima.github.io/express-sweet/#introduction)
8
- * [Quick Start](https://takuya-motoshima.github.io/express-sweet/#quick-start)
9
- * [Environment variable](https://takuya-motoshima.github.io/express-sweet/#environment-variable)
10
- * [Base configuration](https://takuya-motoshima.github.io/express-sweet/#base-configuration)
11
- * [Routing](https://takuya-motoshima.github.io/express-sweet/#routing)
12
- * [Views](https://takuya-motoshima.github.io/express-sweet/#views)
13
- * [Model](https://takuya-motoshima.github.io/express-sweet/#model)
14
- * [User authentication](https://takuya-motoshima.github.io/express-sweet/#user-authentication)
15
- * [Rekognition](https://takuya-motoshima.github.io/express-sweet/#rekognition)
16
- * [Changelog](https://takuya-motoshima.github.io/express-sweet/#changelog)
6
+ * [Express Sweet Documentation](https://takuya-motoshima.github.io/express-sweet/)
7
+ * [Changelog](CHANGELOG.md)
8
+
9
+ ## Quick Start
10
+ The easiest way to get started with Express Sweet is to install express-sweet-generator and automatically create a template application.
11
+ The following application can be started immediately by executing the template.
12
+ See <a href="https://takuya-motoshima.github.io/express-sweet/" target="_blank">here</a> for instructions on using express-sweet.
13
+
14
+ <p align="center">
15
+ <img alt="login" src="screencaps/login.png" width="45%">
16
+ <img alt="users" src="screencaps/users.png" width="45%">
17
+ </p>
18
+ <p align="center">
19
+ <img alt="user-editing" src="screencaps/user-editing.png" width="45%">
20
+ <img alt="personal" src="screencaps/personal.png" width="45%">
21
+ </p>
22
+
23
+ 1. Use the application generator tool, express-sweet-generator, to quickly create an application skeleton.
24
+ ```sh
25
+ npm install -g express-sweet-generator
26
+ ```
27
+
28
+ 1. Create an Express myapp named myapp.
29
+ The app is created in a folder named myapp in the working directory.
30
+ ```sh
31
+ express-sweet myapp
32
+ # If you want to use ESM, below.
33
+ #express-sweet -o esm myapp
34
+ ```
35
+ 1. Install dependent packages.
36
+ ```sh
37
+ cd myapp
38
+ npm install
39
+ ```
40
+ 1. This sample application uses a database.
41
+ Execute the following SQL to create the database.
42
+ ```sql
43
+ CREATE DATABASE IF NOT EXISTS `sampledb` DEFAULT CHARACTER SET utf8mb4;
44
+
45
+ USE `sampledb`;
46
+
47
+ CREATE TABLE `user` (
48
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
49
+ `name` varchar(30) NOT NULL,
50
+ `email` varchar(255) NOT NULL,
51
+ `password` varchar(100) NOT NULL,
52
+ `icon` varchar(768) NOT NULL DEFAULT MD5(RAND()),
53
+ `created` datetime NOT NULL DEFAULT current_timestamp(),
54
+ `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
55
+ PRIMARY KEY (`id`),
56
+ UNIQUE KEY `ukUserEmail` (`email`),
57
+ UNIQUE KEY `ukUserIcon`(`icon`)
58
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
59
+
60
+ CREATE TABLE `profile` (
61
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
62
+ `userId` int(10) unsigned NOT NULL,
63
+ `address` varchar(255) NOT NULL,
64
+ `tel` varchar(14) NOT NULL,
65
+ `created` datetime NOT NULL DEFAULT current_timestamp(),
66
+ `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
67
+ PRIMARY KEY (`id`),
68
+ UNIQUE KEY `ukProfileUserId` (`userId`),
69
+ CONSTRAINT `fkProfileUser` FOREIGN KEY (`userId`) REFERENCES `user` (`id`)
70
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
71
+
72
+ CREATE TABLE `comment` (
73
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
74
+ `userId` int(10) unsigned NOT NULL,
75
+ `text` text NOT NULL,
76
+ `created` datetime NOT NULL DEFAULT current_timestamp(),
77
+ `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
78
+ PRIMARY KEY (`id`),
79
+ CONSTRAINT `fkCommentUser` FOREIGN KEY (`userId`) REFERENCES `user` (`id`)
80
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
81
+
82
+ CREATE TABLE `book` (
83
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
84
+ `userId` int(10) unsigned NOT NULL,
85
+ `title` text NOT NULL,
86
+ `created` datetime NOT NULL DEFAULT current_timestamp(),
87
+ `modified` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
88
+ PRIMARY KEY (`id`),
89
+ UNIQUE KEY `ukBookTitle` (`userId`, `title`(255)),
90
+ CONSTRAINT `fkBookUser` FOREIGN KEY (`userId`) REFERENCES `user` (`id`)
91
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
92
+
93
+ INSERT INTO `user` (`id`, `email`, `password`, `name`, `icon`) VALUES
94
+ (1, 'robin@example.com', 'password', 'Robin', '/upload/1.png'),
95
+ (2, 'taylor@example.com', 'password', 'Taylor', '/upload/2.png');
96
+ INSERT INTO `profile` (`userId`, `address`, `tel`) VALUES
97
+ (1, '777 Brockton Avenue, Abington MA 2351', '202-555-0105'),
98
+ (2, '30 Memorial Drive, Avon MA 2322', '');
99
+ INSERT INTO `comment` (`userId`, `text`) VALUES
100
+ (1, 'From Robin #1'),
101
+ (1, 'From Robin #2'),
102
+ (2, 'From Taylor #1');
103
+ INSERT INTO `book` (`userId`, `title`) VALUES
104
+ (1, 'Beautiful'),
105
+ (1, 'Lose Yourself'),
106
+ (2, 'When Im Gone');
107
+ ```
108
+ 1. Build front-end JS.
109
+ ```sh
110
+ cd myapp/client
111
+ npm install
112
+ npm run build
113
+ ```
114
+ 1. Next, you need to set how the database is connected.
115
+ The database connection method can be set in config/database.js, so change it according to your environment.
116
+ See [here](https://sequelize.org/docs/v6/other-topics/migrations/#cfg) for details.
117
+ ```js
118
+ // For ESM, use "export default".
119
+ //export default {
120
+ module.exports = {
121
+ development: {
122
+ username: 'root',
123
+ password: 'password',
124
+ database: 'sampledb',
125
+ host: 'localhost',
126
+ dialect: 'mariadb'
127
+ },
128
+ test: {
129
+ username: 'root',
130
+ password: 'password',
131
+ database: 'sampledb',
132
+ host: 'localhost',
133
+ dialect: 'mariadb'
134
+ },
135
+ production: {
136
+ username: 'root',
137
+ password: 'password',
138
+ database: 'sampledb',
139
+ host: 'localhost',
140
+ dialect: 'mariadb'
141
+ }
142
+ }
143
+ ```
144
+ 1. The DB to be used can be defined individually for each environment.
145
+ Specify the environment in the .env file.
146
+ ```js
147
+ NODE_ENV=development
148
+ ```
149
+ 1. Launch the application.
150
+ ```sh
151
+ cd myapp
152
+ npm start
153
+ ```
17
154
 
18
155
  ## Author
19
156
  **Takuya Motoshima**