spec-3nweb-server 1.8.4 → 1.8.6

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 (324) hide show
  1. package/.gitlab-ci-linux.yml +50 -0
  2. package/.gitlab-ci-mac.yml +29 -0
  3. package/.gitlab-ci-windows.yml +29 -0
  4. package/.gitlab-ci.yml +63 -0
  5. package/build/3nstorage/routes/owner/archive-obj-version.js +2 -2
  6. package/build/3nstorage/routes/owner/cancel-trans.js +2 -2
  7. package/build/3nstorage/routes/owner/delete-obj.js +2 -2
  8. package/build/3nstorage/routes/owner/get-current-obj.js +3 -4
  9. package/build/3nstorage/routes/owner/param-setter.js +2 -6
  10. package/build/asmail/routes/config/param-setter.js +2 -2
  11. package/build/asmail/routes/delivery/finalize-delivery.js +2 -2
  12. package/build/asmail/routes/delivery/put-obj.js +2 -2
  13. package/build/asmail/routes/delivery/sender-authorization.js +2 -2
  14. package/build/asmail/routes/retrieval/remove-message.js +2 -2
  15. package/build/cli/signup-cmd.js +0 -1
  16. package/build/lib-server/routes/sessions/close.js +2 -2
  17. package/build/lib-server/routes/sessions/mid-auth.js +2 -5
  18. package/build/main.js +12 -15
  19. package/build/mock/tls-options.js +46 -44
  20. package/build/signup/routes/add.js +4 -4
  21. package/build/tests/admin-proto/signup.d.ts +1 -0
  22. package/build/tests/admin-proto/signup.js +235 -0
  23. package/build/tests/jasmine.d.ts +1 -0
  24. package/build/tests/jasmine.js +32 -0
  25. package/build/tests/libs-for-tests/3nstorage.d.ts +22 -0
  26. package/build/tests/libs-for-tests/3nstorage.js +123 -0
  27. package/build/tests/libs-for-tests/asmail.d.ts +22 -0
  28. package/build/tests/libs-for-tests/asmail.js +179 -0
  29. package/build/tests/libs-for-tests/assert.d.ts +1 -0
  30. package/build/tests/libs-for-tests/assert.js +26 -0
  31. package/build/tests/libs-for-tests/async-jasmine.d.ts +7 -0
  32. package/build/tests/libs-for-tests/async-jasmine.js +77 -0
  33. package/build/tests/libs-for-tests/bytes-equal.d.ts +1 -0
  34. package/build/tests/libs-for-tests/bytes-equal.js +34 -0
  35. package/build/tests/libs-for-tests/json-copy.d.ts +1 -0
  36. package/build/tests/libs-for-tests/json-copy.js +45 -0
  37. package/build/tests/libs-for-tests/json-equal.d.ts +4 -0
  38. package/build/tests/libs-for-tests/json-equal.js +67 -0
  39. package/build/tests/libs-for-tests/mailerid.d.ts +13 -0
  40. package/build/tests/libs-for-tests/mailerid.js +114 -0
  41. package/build/tests/libs-for-tests/pkl.d.ts +28 -0
  42. package/build/tests/libs-for-tests/pkl.js +89 -0
  43. package/build/tests/libs-for-tests/server-components/3nstorage.d.ts +20 -0
  44. package/build/tests/libs-for-tests/server-components/3nstorage.js +200 -0
  45. package/build/tests/libs-for-tests/server-components/admin.d.ts +6 -0
  46. package/build/tests/libs-for-tests/server-components/admin.js +43 -0
  47. package/build/tests/libs-for-tests/server-components/asmail.d.ts +16 -0
  48. package/build/tests/libs-for-tests/server-components/asmail.js +143 -0
  49. package/build/tests/libs-for-tests/server-components/component.d.ts +13 -0
  50. package/build/tests/libs-for-tests/server-components/component.js +77 -0
  51. package/build/tests/libs-for-tests/server-components/mailerid.d.ts +10 -0
  52. package/build/tests/libs-for-tests/server-components/mailerid.js +103 -0
  53. package/build/tests/libs-for-tests/server-runner.d.ts +15 -0
  54. package/build/tests/libs-for-tests/server-runner.js +69 -0
  55. package/build/tests/libs-for-tests/spec-assembly.d.ts +6 -0
  56. package/build/tests/libs-for-tests/spec-assembly.js +55 -0
  57. package/build/tests/libs-for-tests/ws-utils.d.ts +3 -0
  58. package/build/tests/libs-for-tests/ws-utils.js +59 -0
  59. package/build/tests/libs-for-tests/xhr-utils.d.ts +61 -0
  60. package/build/tests/libs-for-tests/xhr-utils.js +154 -0
  61. package/build/tests/protocols/3nstorage/owner/specs/archive-obj-ver.d.ts +2 -0
  62. package/build/tests/protocols/3nstorage/owner/specs/archive-obj-ver.js +84 -0
  63. package/build/tests/protocols/3nstorage/owner/specs/archive-root-ver.d.ts +2 -0
  64. package/build/tests/protocols/3nstorage/owner/specs/archive-root-ver.js +78 -0
  65. package/build/tests/protocols/3nstorage/owner/specs/delete-archive-obj-ver.d.ts +2 -0
  66. package/build/tests/protocols/3nstorage/owner/specs/delete-archive-obj-ver.js +83 -0
  67. package/build/tests/protocols/3nstorage/owner/specs/delete-archive-root-ver.d.ts +2 -0
  68. package/build/tests/protocols/3nstorage/owner/specs/delete-archive-root-ver.js +77 -0
  69. package/build/tests/protocols/3nstorage/owner/specs/delete-obj.d.ts +2 -0
  70. package/build/tests/protocols/3nstorage/owner/specs/delete-obj.js +75 -0
  71. package/build/tests/protocols/3nstorage/owner/specs/events.d.ts +2 -0
  72. package/build/tests/protocols/3nstorage/owner/specs/events.js +91 -0
  73. package/build/tests/protocols/3nstorage/owner/specs/get-current-obj.d.ts +2 -0
  74. package/build/tests/protocols/3nstorage/owner/specs/get-current-obj.js +269 -0
  75. package/build/tests/protocols/3nstorage/owner/specs/get-current-root.d.ts +2 -0
  76. package/build/tests/protocols/3nstorage/owner/specs/get-current-root.js +262 -0
  77. package/build/tests/protocols/3nstorage/owner/specs/get-obj-status.d.ts +2 -0
  78. package/build/tests/protocols/3nstorage/owner/specs/get-obj-status.js +79 -0
  79. package/build/tests/protocols/3nstorage/owner/specs/get-root-status.d.ts +2 -0
  80. package/build/tests/protocols/3nstorage/owner/specs/get-root-status.js +72 -0
  81. package/build/tests/protocols/3nstorage/owner/specs/put-current-obj.d.ts +2 -0
  82. package/build/tests/protocols/3nstorage/owner/specs/put-current-obj.js +287 -0
  83. package/build/tests/protocols/3nstorage/owner/specs/put-current-root.d.ts +2 -0
  84. package/build/tests/protocols/3nstorage/owner/specs/put-current-root.js +274 -0
  85. package/build/tests/protocols/3nstorage/owner/specs/trans-cancel-root.d.ts +2 -0
  86. package/build/tests/protocols/3nstorage/owner/specs/trans-cancel-root.js +73 -0
  87. package/build/tests/protocols/3nstorage/owner/specs/trans-cancel.d.ts +2 -0
  88. package/build/tests/protocols/3nstorage/owner/specs/trans-cancel.js +72 -0
  89. package/build/tests/protocols/3nstorage/owner/test-utils.d.ts +14 -0
  90. package/build/tests/protocols/3nstorage/owner/test-utils.js +54 -0
  91. package/build/tests/protocols/3nstorage/owner.d.ts +1 -0
  92. package/build/tests/protocols/3nstorage/owner.js +138 -0
  93. package/build/tests/protocols/asmail/config.d.ts +1 -0
  94. package/build/tests/protocols/asmail/config.js +117 -0
  95. package/build/tests/protocols/asmail/delivery/specs/finalize-delivery.d.ts +2 -0
  96. package/build/tests/protocols/asmail/delivery/specs/finalize-delivery.js +60 -0
  97. package/build/tests/protocols/asmail/delivery/specs/provide-recipient-pubkey.d.ts +2 -0
  98. package/build/tests/protocols/asmail/delivery/specs/provide-recipient-pubkey.js +68 -0
  99. package/build/tests/protocols/asmail/delivery/specs/put-metadata.d.ts +2 -0
  100. package/build/tests/protocols/asmail/delivery/specs/put-metadata.js +83 -0
  101. package/build/tests/protocols/asmail/delivery/specs/put-obj.d.ts +2 -0
  102. package/build/tests/protocols/asmail/delivery/specs/put-obj.js +123 -0
  103. package/build/tests/protocols/asmail/delivery/specs/restart-session.d.ts +2 -0
  104. package/build/tests/protocols/asmail/delivery/specs/restart-session.js +79 -0
  105. package/build/tests/protocols/asmail/delivery/specs/start-session.d.ts +2 -0
  106. package/build/tests/protocols/asmail/delivery/specs/start-session.js +64 -0
  107. package/build/tests/protocols/asmail/delivery/test-utils.d.ts +16 -0
  108. package/build/tests/protocols/asmail/delivery/test-utils.js +46 -0
  109. package/build/tests/protocols/asmail/delivery.d.ts +1 -0
  110. package/build/tests/protocols/asmail/delivery.js +46 -0
  111. package/build/tests/protocols/asmail/retrieval/specs/events.d.ts +2 -0
  112. package/build/tests/protocols/asmail/retrieval/specs/events.js +62 -0
  113. package/build/tests/protocols/asmail/retrieval/specs/get-message-meta.d.ts +2 -0
  114. package/build/tests/protocols/asmail/retrieval/specs/get-message-meta.js +70 -0
  115. package/build/tests/protocols/asmail/retrieval/specs/get-message-obj.d.ts +2 -0
  116. package/build/tests/protocols/asmail/retrieval/specs/get-message-obj.js +166 -0
  117. package/build/tests/protocols/asmail/retrieval/specs/list-messages.d.ts +2 -0
  118. package/build/tests/protocols/asmail/retrieval/specs/list-messages.js +96 -0
  119. package/build/tests/protocols/asmail/retrieval/specs/remove-message.d.ts +2 -0
  120. package/build/tests/protocols/asmail/retrieval/specs/remove-message.js +66 -0
  121. package/build/tests/protocols/asmail/retrieval/test-utils.d.ts +17 -0
  122. package/build/tests/protocols/asmail/retrieval/test-utils.js +46 -0
  123. package/build/tests/protocols/asmail/retrieval.d.ts +1 -0
  124. package/build/tests/protocols/asmail/retrieval.js +92 -0
  125. package/build/tests/protocols/mailerid.d.ts +1 -0
  126. package/build/tests/protocols/mailerid.js +210 -0
  127. package/build/tests/shared-checks/check-mid-login.d.ts +2 -0
  128. package/build/tests/shared-checks/check-mid-login.js +131 -0
  129. package/build/tests/shared-checks/requests.d.ts +20 -0
  130. package/build/tests/shared-checks/requests.js +123 -0
  131. package/package.json +1 -1
  132. package/packing/create-deb.sh +57 -0
  133. package/packing/deb/lib/systemd/system/3nweb.service +11 -0
  134. package/packing/deb/postinst +44 -0
  135. package/packing/deb/usr/share/doc/3nweb-server/conf-for-postinstall.yaml +19 -0
  136. package/packing/deb/usr/share/doc/3nweb-server/copyright +22 -0
  137. package/publish-task.sh +10 -0
  138. package/push-to-github.sh +105 -0
  139. package/ts-code/3nstorage/3nstorage-app.ts +99 -0
  140. package/ts-code/3nstorage/owner.ts +178 -0
  141. package/ts-code/3nstorage/resources/sessions.ts +37 -0
  142. package/ts-code/3nstorage/resources/store.ts +896 -0
  143. package/ts-code/3nstorage/resources/users.ts +258 -0
  144. package/ts-code/3nstorage/routes/owner/archive-obj-version.ts +73 -0
  145. package/ts-code/3nstorage/routes/owner/cancel-trans.ts +58 -0
  146. package/ts-code/3nstorage/routes/owner/delete-obj.ts +103 -0
  147. package/ts-code/3nstorage/routes/owner/get-archived-obj-ver.ts +111 -0
  148. package/ts-code/3nstorage/routes/owner/get-current-obj.ts +122 -0
  149. package/ts-code/3nstorage/routes/owner/get-obj-status.ts +55 -0
  150. package/ts-code/3nstorage/routes/owner/param-getter.ts +51 -0
  151. package/ts-code/3nstorage/routes/owner/param-setter.ts +50 -0
  152. package/ts-code/3nstorage/routes/owner/put-current-obj.ts +284 -0
  153. package/ts-code/3nstorage/routes/owner/session-params.ts +49 -0
  154. package/ts-code/3nstorage/shared.ts +43 -0
  155. package/ts-code/asmail/asmail-app.ts +91 -0
  156. package/ts-code/asmail/config.ts +96 -0
  157. package/ts-code/asmail/delivery.ts +94 -0
  158. package/ts-code/asmail/resources/delivery-sessions.ts +118 -0
  159. package/ts-code/asmail/resources/inbox.ts +696 -0
  160. package/ts-code/asmail/resources/recipients.ts +495 -0
  161. package/ts-code/asmail/resources/sessions.ts +37 -0
  162. package/ts-code/asmail/retrieval.ts +96 -0
  163. package/ts-code/asmail/routes/config/param-getter.ts +49 -0
  164. package/ts-code/asmail/routes/config/param-setter.ts +49 -0
  165. package/ts-code/asmail/routes/delivery/finalize-delivery.ts +50 -0
  166. package/ts-code/asmail/routes/delivery/pre-flight.ts +132 -0
  167. package/ts-code/asmail/routes/delivery/provide-recipient-pubkey.ts +58 -0
  168. package/ts-code/asmail/routes/delivery/put-metadata.ts +94 -0
  169. package/ts-code/asmail/routes/delivery/put-obj.ts +166 -0
  170. package/ts-code/asmail/routes/delivery/restart-session.ts +130 -0
  171. package/ts-code/asmail/routes/delivery/sender-authorization.ts +81 -0
  172. package/ts-code/asmail/routes/delivery/start-session.ts +151 -0
  173. package/ts-code/asmail/routes/retrieval/get-message-meta.ts +53 -0
  174. package/ts-code/asmail/routes/retrieval/get-message-obj.ts +109 -0
  175. package/ts-code/asmail/routes/retrieval/list-messages.ts +70 -0
  176. package/ts-code/asmail/routes/retrieval/remove-message.ts +47 -0
  177. package/ts-code/cli/index.ts +82 -0
  178. package/ts-code/cli/run-cmd.ts +81 -0
  179. package/ts-code/cli/show-sample-config.ts +78 -0
  180. package/ts-code/cli/signup-cmd.ts +229 -0
  181. package/ts-code/cli/user-cmd.ts +68 -0
  182. package/ts-code/cli/utils.ts +105 -0
  183. package/ts-code/config/default-confs.ts +22 -0
  184. package/ts-code/config/from-yaml.ts +35 -0
  185. package/ts-code/config/letsencrypt.ts +77 -0
  186. package/ts-code/config/signup.ts +137 -0
  187. package/ts-code/lib-common/admin-api/signup.ts +120 -0
  188. package/ts-code/lib-common/assert.ts +22 -0
  189. package/ts-code/lib-common/async-fs-node.ts +656 -0
  190. package/ts-code/lib-common/buffer-utils.ts +124 -0
  191. package/ts-code/lib-common/byte-streaming/common.ts +166 -0
  192. package/ts-code/lib-common/bytes-equal.ts +25 -0
  193. package/ts-code/lib-common/canonical-address.ts +92 -0
  194. package/ts-code/lib-common/exceptions/error.ts +44 -0
  195. package/ts-code/lib-common/exceptions/file.ts +84 -0
  196. package/ts-code/lib-common/exceptions/http.ts +69 -0
  197. package/ts-code/lib-common/ipc/generic-ipc.ts +750 -0
  198. package/ts-code/lib-common/ipc/ws-ipc.ts +117 -0
  199. package/ts-code/lib-common/json-equal.ts +55 -0
  200. package/ts-code/lib-common/json-utils.ts +130 -0
  201. package/ts-code/lib-common/jwkeys.ts +246 -0
  202. package/ts-code/lib-common/map-of-sets.ts +60 -0
  203. package/ts-code/lib-common/mid-sigs-NaCl-Ed.ts +677 -0
  204. package/ts-code/lib-common/objs-on-disk/file-layout.ts +480 -0
  205. package/ts-code/lib-common/objs-on-disk/obj-file.ts +325 -0
  206. package/ts-code/lib-common/objs-on-disk/utils.ts +201 -0
  207. package/ts-code/lib-common/objs-on-disk/v1-obj-file-format.ts +329 -0
  208. package/ts-code/lib-common/processes.ts +501 -0
  209. package/ts-code/lib-common/random-node.ts +79 -0
  210. package/ts-code/lib-common/service-api/3nstorage/owner.ts +559 -0
  211. package/ts-code/lib-common/service-api/3nstorage/root-route.ts +22 -0
  212. package/ts-code/lib-common/service-api/asmail/config.ts +144 -0
  213. package/ts-code/lib-common/service-api/asmail/delivery.ts +250 -0
  214. package/ts-code/lib-common/service-api/asmail/retrieval.ts +238 -0
  215. package/ts-code/lib-common/service-api/asmail/root-route.ts +22 -0
  216. package/ts-code/lib-common/service-api/ipc-api.ts +44 -0
  217. package/ts-code/lib-common/service-api/locker.ts +44 -0
  218. package/ts-code/lib-common/service-api/mailer-id/login.ts +80 -0
  219. package/ts-code/lib-common/service-api/mailer-id/provisioning.ts +64 -0
  220. package/ts-code/lib-common/service-api/mailer-id/root-route.ts +25 -0
  221. package/ts-code/lib-common/service-api/pub-key-login.ts +75 -0
  222. package/ts-code/lib-common/service-api/web-socket-base.ts +87 -0
  223. package/ts-code/lib-common/session-encryptor.ts +54 -0
  224. package/ts-code/lib-common/time-window-cache.ts +74 -0
  225. package/ts-code/lib-common/transferable.d.ts +30 -0
  226. package/ts-code/lib-server/conf-util.ts +35 -0
  227. package/ts-code/lib-server/mid-access.ts +45 -0
  228. package/ts-code/lib-server/middleware/body-parsers.ts +248 -0
  229. package/ts-code/lib-server/middleware/error-handler.ts +79 -0
  230. package/ts-code/lib-server/pkl-access.ts +46 -0
  231. package/ts-code/lib-server/resources/dns.ts +151 -0
  232. package/ts-code/lib-server/resources/mailerid-authorizer.ts +115 -0
  233. package/ts-code/lib-server/resources/mem-backed-sessions-factory.ts +132 -0
  234. package/ts-code/lib-server/resources/server-data-folders.ts +160 -0
  235. package/ts-code/lib-server/resources/server-key-for-pkl-challenge.ts +41 -0
  236. package/ts-code/lib-server/resources/sessions.ts +232 -0
  237. package/ts-code/lib-server/resources/user-files.ts +147 -0
  238. package/ts-code/lib-server/routes/pub-key-login/complete-exchange.ts +63 -0
  239. package/ts-code/lib-server/routes/pub-key-login/start-exchange.ts +189 -0
  240. package/ts-code/lib-server/routes/sessions/close.ts +27 -0
  241. package/ts-code/lib-server/routes/sessions/mid-auth.ts +77 -0
  242. package/ts-code/lib-server/routes/sessions/start.ts +116 -0
  243. package/ts-code/lib-server/web-sockets/app.ts +339 -0
  244. package/ts-code/lib-server/web-sockets/server-events.ts +63 -0
  245. package/ts-code/lib.ts +29 -0
  246. package/ts-code/locker/locker-app.ts +60 -0
  247. package/ts-code/locker/resources/lockers.ts +17 -0
  248. package/ts-code/locker/resources/sessions.ts +37 -0
  249. package/ts-code/locker/routes/create-locker.ts +47 -0
  250. package/ts-code/mailerId/mailerId-app.ts +107 -0
  251. package/ts-code/mailerId/resources/certifier.ts +181 -0
  252. package/ts-code/mailerId/resources/sessions.ts +44 -0
  253. package/ts-code/mailerId/resources/users.ts +88 -0
  254. package/ts-code/mailerId/routes/certify.ts +68 -0
  255. package/ts-code/main.ts +304 -0
  256. package/ts-code/mock/dns.ts +106 -0
  257. package/ts-code/mock/mock-as-child-proc.ts +130 -0
  258. package/ts-code/mock/node-child-ipc.ts +69 -0
  259. package/ts-code/mock/run-in-proc.ts +111 -0
  260. package/ts-code/mock/tls-options.ts +73 -0
  261. package/ts-code/services.ts +138 -0
  262. package/ts-code/signup/resources/users.ts +429 -0
  263. package/ts-code/signup/routes/add.ts +65 -0
  264. package/ts-code/signup/routes/get-available-addresses.ts +49 -0
  265. package/ts-code/signup/routes/get-available-domains.ts +45 -0
  266. package/ts-code/signup/signup-app.ts +54 -0
  267. package/ts-code/signup/signup-tokens.ts +148 -0
  268. package/ts-code/tests/admin-proto/signup.ts +277 -0
  269. package/ts-code/tests/jasmine.ts +37 -0
  270. package/ts-code/tests/libs-for-tests/3nstorage.ts +144 -0
  271. package/ts-code/tests/libs-for-tests/asmail.ts +220 -0
  272. package/ts-code/tests/libs-for-tests/assert.ts +22 -0
  273. package/ts-code/tests/libs-for-tests/async-jasmine.ts +89 -0
  274. package/ts-code/tests/libs-for-tests/bytes-equal.ts +25 -0
  275. package/ts-code/tests/libs-for-tests/json-copy.ts +38 -0
  276. package/ts-code/tests/libs-for-tests/json-equal.ts +55 -0
  277. package/ts-code/tests/libs-for-tests/mailerid.ts +123 -0
  278. package/ts-code/tests/libs-for-tests/pkl.ts +127 -0
  279. package/ts-code/tests/libs-for-tests/server-components/3nstorage.ts +206 -0
  280. package/ts-code/tests/libs-for-tests/server-components/admin.ts +49 -0
  281. package/ts-code/tests/libs-for-tests/server-components/asmail.ts +152 -0
  282. package/ts-code/tests/libs-for-tests/server-components/component.ts +90 -0
  283. package/ts-code/tests/libs-for-tests/server-components/mailerid.ts +114 -0
  284. package/ts-code/tests/libs-for-tests/server-runner.ts +82 -0
  285. package/ts-code/tests/libs-for-tests/spec-assembly.ts +60 -0
  286. package/ts-code/tests/libs-for-tests/ws-utils.ts +61 -0
  287. package/ts-code/tests/libs-for-tests/xhr-utils.ts +179 -0
  288. package/ts-code/tests/protocols/3nstorage/owner/specs/archive-obj-ver.ts +100 -0
  289. package/ts-code/tests/protocols/3nstorage/owner/specs/archive-root-ver.ts +91 -0
  290. package/ts-code/tests/protocols/3nstorage/owner/specs/delete-archive-obj-ver.ts +99 -0
  291. package/ts-code/tests/protocols/3nstorage/owner/specs/delete-archive-root-ver.ts +90 -0
  292. package/ts-code/tests/protocols/3nstorage/owner/specs/delete-obj.ts +84 -0
  293. package/ts-code/tests/protocols/3nstorage/owner/specs/events.ts +125 -0
  294. package/ts-code/tests/protocols/3nstorage/owner/specs/get-current-obj.ts +298 -0
  295. package/ts-code/tests/protocols/3nstorage/owner/specs/get-current-root.ts +290 -0
  296. package/ts-code/tests/protocols/3nstorage/owner/specs/get-obj-status.ts +88 -0
  297. package/ts-code/tests/protocols/3nstorage/owner/specs/get-root-status.ts +80 -0
  298. package/ts-code/tests/protocols/3nstorage/owner/specs/put-current-obj.ts +366 -0
  299. package/ts-code/tests/protocols/3nstorage/owner/specs/put-current-root.ts +329 -0
  300. package/ts-code/tests/protocols/3nstorage/owner/specs/trans-cancel-root.ts +86 -0
  301. package/ts-code/tests/protocols/3nstorage/owner/specs/trans-cancel.ts +86 -0
  302. package/ts-code/tests/protocols/3nstorage/owner/test-utils.ts +72 -0
  303. package/ts-code/tests/protocols/3nstorage/owner.ts +198 -0
  304. package/ts-code/tests/protocols/asmail/config.ts +172 -0
  305. package/ts-code/tests/protocols/asmail/delivery/specs/finalize-delivery.ts +69 -0
  306. package/ts-code/tests/protocols/asmail/delivery/specs/provide-recipient-pubkey.ts +88 -0
  307. package/ts-code/tests/protocols/asmail/delivery/specs/put-metadata.ts +102 -0
  308. package/ts-code/tests/protocols/asmail/delivery/specs/put-obj.ts +156 -0
  309. package/ts-code/tests/protocols/asmail/delivery/specs/restart-session.ts +97 -0
  310. package/ts-code/tests/protocols/asmail/delivery/specs/start-session.ts +79 -0
  311. package/ts-code/tests/protocols/asmail/delivery/test-utils.ts +64 -0
  312. package/ts-code/tests/protocols/asmail/delivery.ts +56 -0
  313. package/ts-code/tests/protocols/asmail/retrieval/specs/events.ts +78 -0
  314. package/ts-code/tests/protocols/asmail/retrieval/specs/get-message-meta.ts +80 -0
  315. package/ts-code/tests/protocols/asmail/retrieval/specs/get-message-obj.ts +197 -0
  316. package/ts-code/tests/protocols/asmail/retrieval/specs/list-messages.ts +110 -0
  317. package/ts-code/tests/protocols/asmail/retrieval/specs/remove-message.ts +74 -0
  318. package/ts-code/tests/protocols/asmail/retrieval/test-utils.ts +60 -0
  319. package/ts-code/tests/protocols/asmail/retrieval.ts +115 -0
  320. package/ts-code/tests/protocols/mailerid.ts +271 -0
  321. package/ts-code/tests/shared-checks/check-mid-login.ts +164 -0
  322. package/ts-code/tests/shared-checks/requests.ts +135 -0
  323. package/ts-code/tsconfig.json +11 -0
  324. package/ts-code/web3n.d.ts +1068 -0
@@ -0,0 +1,50 @@
1
+
2
+ #########
3
+ # Linux #
4
+ #########
5
+
6
+ build for linux:
7
+ extends: build
8
+ rules: [ { when: on_success } ]
9
+ image: node-22
10
+
11
+
12
+ test on linux:
13
+ extends: test
14
+ rules: [ { when: on_success } ]
15
+ needs:
16
+ - build for linux
17
+ image: node-22
18
+
19
+
20
+ pack for linux:
21
+ extends: pack
22
+ rules: [ { when: on_success } ]
23
+ needs:
24
+ - build for linux
25
+ - test on linux
26
+ image: node-22
27
+
28
+
29
+ pack mock for linux:
30
+ extends: pack mock
31
+ rules: [ { when: on_success } ]
32
+ needs:
33
+ - build for linux
34
+ - test on linux
35
+ image: node-22
36
+
37
+
38
+ # pack deb:
39
+ # extends: pack
40
+ # rules: [ { when: on_success } ]
41
+ # needs:
42
+ # - build for linux
43
+ # - test on linux
44
+ # image: node-16
45
+ # script:
46
+ # - npm run pack-deb
47
+ # artifacts:
48
+ # paths:
49
+ # - 3nweb-*.deb
50
+ # expire_in: 3d
@@ -0,0 +1,29 @@
1
+
2
+ #########
3
+ # MacOS #
4
+ #########
5
+
6
+ build for mac:
7
+ extends: build
8
+ rules: [ { when: on_success } ]
9
+ tags:
10
+ - mac-m1
11
+
12
+
13
+ test on mac:
14
+ extends: test
15
+ rules: [ { when: on_success } ]
16
+ needs:
17
+ - build for mac
18
+ tags:
19
+ - mac-m1
20
+
21
+
22
+ pack mock for mac:
23
+ extends: pack mock
24
+ rules: [ { when: on_success } ]
25
+ tags:
26
+ - mac-m1
27
+ needs:
28
+ - build for mac
29
+ - test on mac
@@ -0,0 +1,29 @@
1
+
2
+ ###########
3
+ # Windows #
4
+ ###########
5
+
6
+ build for windows:
7
+ extends: build
8
+ rules: [ { when: on_success } ]
9
+ tags:
10
+ - windows
11
+
12
+
13
+ test on windows:
14
+ extends: test
15
+ rules: [ { when: on_success } ]
16
+ needs:
17
+ - build for windows
18
+ tags:
19
+ - windows
20
+
21
+
22
+ pack mock for windows:
23
+ extends: pack mock
24
+ rules: [ { when: on_success } ]
25
+ tags:
26
+ - windows
27
+ needs:
28
+ - build for windows
29
+ - test on windows
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,63 @@
1
+ stages:
2
+ - build
3
+ - test
4
+ - pack
5
+ - publish
6
+
7
+
8
+ build:
9
+ rules: [ { when: never } ]
10
+ stage: build
11
+ script:
12
+ - npm ci
13
+ - npm run build
14
+ artifacts:
15
+ paths:
16
+ - node_modules/
17
+ - build/
18
+ expire_in: 1h
19
+
20
+
21
+ test:
22
+ rules: [ { when: never } ]
23
+ stage: test
24
+ script:
25
+ - npm run test
26
+
27
+
28
+ pack:
29
+ rules: [ { when: never } ]
30
+ stage: pack
31
+ script:
32
+ - npm run clear-for-packing
33
+ artifacts:
34
+ paths:
35
+ - build/
36
+ - node_modules/
37
+ - LICENSE
38
+ - package-lock.json
39
+ - package.json
40
+ - README.md
41
+ expire_in: 3d
42
+
43
+
44
+ pack mock:
45
+ extends: pack
46
+ script:
47
+ - npm run clear-for-packing-mock
48
+
49
+
50
+ publish to npm:
51
+ stage: publish
52
+ rules:
53
+ - if: '$CI_COMMIT_BRANCH == "master"'
54
+ when: manual
55
+ image: node-22
56
+ script:
57
+ - bash publish-task.sh $NPM_PUBLISH_TOKEN
58
+
59
+
60
+ include:
61
+ - .gitlab-ci-linux.yml
62
+ - .gitlab-ci-windows.yml
63
+ - .gitlab-ci-mac.yml
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2022 3NSoft Inc.
3
+ Copyright (C) 2022, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -34,7 +34,7 @@ function archiveCurrentObjVersion(root, archiveObjVerFunc) {
34
34
  }
35
35
  try {
36
36
  await archiveObjVerFunc(userId, objId, version);
37
- res.status(SC.okPost).end();
37
+ res.status(SC.okPost).send();
38
38
  }
39
39
  catch (err) {
40
40
  if ("string" !== typeof err) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2017, 2020 3NSoft Inc.
3
+ Copyright (C) 2015 - 2017, 2020, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -29,7 +29,7 @@ function cancelTransaction(root, cancelTransFunc) {
29
29
  const transactionId = req.params.transactionId;
30
30
  try {
31
31
  await cancelTransFunc(userId, objId, ((transactionId === '-') ? undefined : transactionId));
32
- res.status(owner_1.cancelTransaction.SC.ok).end();
32
+ res.status(owner_1.cancelTransaction.SC.ok).send();
33
33
  }
34
34
  catch (err) {
35
35
  if ("string" !== typeof err) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2016, 2020, 2022 3NSoft Inc.
3
+ Copyright (C) 2016, 2020, 2022, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -55,7 +55,7 @@ function deleteObj(root, delCurrent, deleteObjFunc) {
55
55
  else {
56
56
  await deleteObjFunc(userId, objId, version);
57
57
  }
58
- res.status(owner_1.currentObj.SC.okDelete).end();
58
+ res.status(owner_1.currentObj.SC.okDelete).send();
59
59
  }
60
60
  catch (err) {
61
61
  if ("string" !== typeof err) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2017, 2020 3NSoft Inc.
3
+ Copyright (C) 2017, 2020, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -67,7 +67,7 @@ function getCurrentObj(root, getCurrentObjFunc) {
67
67
  if (opts.ver) {
68
68
  if (opts.ver !== version) {
69
69
  res.set(owner_1.HTTP_HEADER.objVersion, `${version}`);
70
- res.status(owner_1.currentObj.SC.unknownObjVer).end();
70
+ res.status(owner_1.currentObj.SC.unknownObjVer).send();
71
71
  return;
72
72
  }
73
73
  }
@@ -102,8 +102,7 @@ function getCurrentObj(root, getCurrentObjFunc) {
102
102
  }
103
103
  else if ((err === users_1.SC.OBJ_UNKNOWN)
104
104
  || (err === users_1.SC.OBJ_VER_UNKNOWN)) {
105
- res.status(owner_1.currentObj.SC.unknownObj).send(objId ?
106
- `Object ${objId} is unknown.` : `Root object is not set.`);
105
+ res.status(owner_1.currentObj.SC.unknownObj).send(objId ? `Object ${objId} is unknown.` : `Root object is not set.`);
107
106
  }
108
107
  else if (err === users_1.SC.USER_UNKNOWN) {
109
108
  res.status(owner_1.ERR_SC.server).send(`Recipient disappeared from the system.`);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -20,9 +20,6 @@ exports.setParam = void 0;
20
20
  const users_1 = require("../../resources/users");
21
21
  const owner_1 = require("../../../lib-common/service-api/3nstorage/owner");
22
22
  function setParam(paramSetter) {
23
- if ('function' !== typeof paramSetter) {
24
- throw new TypeError("Given argument 'paramSetter' must be function, but is not.");
25
- }
26
23
  return async (req, res, next) => {
27
24
  const session = req.session;
28
25
  const userId = session.params.userId;
@@ -30,7 +27,7 @@ function setParam(paramSetter) {
30
27
  try {
31
28
  const valChanged = await paramSetter(userId, pValue);
32
29
  if (valChanged) {
33
- res.status(owner_1.PARAM_SC.ok).end();
30
+ res.status(owner_1.PARAM_SC.ok).send();
34
31
  }
35
32
  else {
36
33
  res.status(owner_1.ERR_SC.malformed).send('Malformed parameter value.');
@@ -48,4 +45,3 @@ function setParam(paramSetter) {
48
45
  };
49
46
  }
50
47
  exports.setParam = setParam;
51
- ;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016, 2025 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2025 - 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -27,7 +27,7 @@ function setParam(paramSetter) {
27
27
  try {
28
28
  const valChanged = await paramSetter(userId, pValue);
29
29
  if (valChanged) {
30
- res.status(config_1.PARAM_SC.ok).end();
30
+ res.status(config_1.PARAM_SC.ok).send();
31
31
  }
32
32
  else {
33
33
  res.status(config_1.ERR_SC.malformed).send('Malformed parameter value.');
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016, 2025 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2025 - 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -27,7 +27,7 @@ function finalizeDelivery(finDelivFunc) {
27
27
  try {
28
28
  await finDelivFunc(recipient, msgId);
29
29
  session.close();
30
- res.status(delivery_1.completion.SC.ok).end();
30
+ res.status(delivery_1.completion.SC.ok).send();
31
31
  }
32
32
  catch (err) {
33
33
  if ('string' !== typeof err) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2017, 2019 - 2020, 2025 3NSoft Inc.
3
+ Copyright (C) 2015 - 2017, 2019 - 2020, 2025 - 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -74,7 +74,7 @@ function saveMsgObj(saveObjFunc, chunkLimit) {
74
74
  }
75
75
  try {
76
76
  await saveObjFunc(recipient, msgId, objId, opts.fstReq, opts.sndReq, len, req);
77
- res.status(delivery_1.msgObj.SC.ok).end();
77
+ res.status(delivery_1.msgObj.SC.ok).send();
78
78
  }
79
79
  catch (err) {
80
80
  session.params.currentMsgLength -= len;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -50,7 +50,7 @@ function authorize(relyingPartyDomain, midAuthorizingFunc) {
50
50
  const certsVerified = await midAuthorizingFunc(relyingPartyDomain, sessionId, sender, rb.assertion, rb.userCert, rb.provCert);
51
51
  if (certsVerified) {
52
52
  req.session.isAuthorized = true;
53
- res.status(delivery_1.authSender.SC.ok).end();
53
+ res.status(delivery_1.authSender.SC.ok).send();
54
54
  }
55
55
  else {
56
56
  res.status(delivery_1.authSender.SC.authFailed).send("Server is not accepting provided credentials.");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -25,7 +25,7 @@ function deleteMsg(delMsgFunc) {
25
25
  const msgId = req.params.msgId;
26
26
  try {
27
27
  await delMsgFunc(userId, msgId);
28
- res.status(retrieval_1.rmMsg.SC.ok).end();
28
+ res.status(retrieval_1.rmMsg.SC.ok).send();
29
29
  }
30
30
  catch (err) {
31
31
  if ("string" !== typeof err) {
@@ -169,7 +169,6 @@ function parseSignupArgs(args, execName) {
169
169
  }
170
170
  }
171
171
  else if (args[0] === createTokenCmd.name) {
172
- console.log(args);
173
172
  const signupCmd = parseWithConfFile(args.slice(1), createTokenOpts);
174
173
  if (signupCmd) {
175
174
  if (!signupCmd.domain && !signupCmd.user) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -20,7 +20,7 @@ exports.closeSession = void 0;
20
20
  function closeSession() {
21
21
  return (req, res, next) => {
22
22
  req.session.close();
23
- res.status(200).end();
23
+ res.status(200).send();
24
24
  };
25
25
  }
26
26
  exports.closeSession = closeSession;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -26,9 +26,6 @@ const login_1 = require("../../../lib-common/service-api/mailer-id/login");
26
26
  * This creates an authorize-sender route handler.
27
27
  */
28
28
  function midLogin(relyingPartyDomain, midAuthorizingFunc) {
29
- if ('function' !== typeof midAuthorizingFunc) {
30
- throw new TypeError("Given argument 'midAuthorizingFunc' must be function, but is not.");
31
- }
32
29
  return async (req, res, next) => {
33
30
  if (req.session.isAuthorized) {
34
31
  res.status(login_1.ERR_SC.duplicate).send("This protocol request has already been served.");
@@ -47,7 +44,7 @@ function midLogin(relyingPartyDomain, midAuthorizingFunc) {
47
44
  const certsVerified = await midAuthorizingFunc(relyingPartyDomain, sessionId, req.session.params.userId, rb.assertion, rb.userCert, rb.provCert);
48
45
  if (certsVerified) {
49
46
  req.session.isAuthorized = true;
50
- res.status(login_1.authSession.SC.ok).end();
47
+ res.status(login_1.authSession.SC.ok).send();
51
48
  }
52
49
  else {
53
50
  req.session.close();
package/build/main.js CHANGED
@@ -183,30 +183,25 @@ async function displayTokenValue(conf, tokenId) {
183
183
  if (ctx) {
184
184
  const signupLink = signupLinkFrom(conf, ctx.token);
185
185
  if (signupLink) {
186
- console.log(`\nSignup link: ${signupLink}`);
186
+ console.log(`\nSignup link:\n ${signupLink}`);
187
187
  }
188
188
  if (ctx.type === 'multi-domain') {
189
189
  console.log(`\nMulti-user signup context:`);
190
190
  console.log(` domains:`, ctx.domains);
191
191
  console.log(` value:`, ctx.token);
192
192
  if (ctx.validTill) {
193
- console.log(` valid till: ${(new Date(ctx.validTill)).toString()}\n`);
194
- }
195
- else {
196
- console.log(``);
193
+ console.log(` valid till: ${(new Date(ctx.validTill)).toString()}`);
197
194
  }
198
195
  }
199
196
  else if (ctx.type === 'single-user') {
200
197
  console.log(`\nSingle-user signup context:`);
201
- console.log(` address:`, ctx.userId);
202
- console.log(` value:`, ctx.token);
198
+ console.log(` address: `, ctx.userId);
199
+ console.log(` value: `, ctx.token);
203
200
  if (ctx.validTill) {
204
- console.log(` valid till: ${(new Date(ctx.validTill)).toString()}\n`);
205
- }
206
- else {
207
- console.log(``);
201
+ console.log(` valid till: ${(new Date(ctx.validTill)).toString()}`);
208
202
  }
209
203
  }
204
+ console.log(``);
210
205
  }
211
206
  else {
212
207
  console.error(`Token ${tokenId} is not found.`);
@@ -229,19 +224,21 @@ function signupLinkFrom(conf, token = '') {
229
224
  }
230
225
  async function createMultiUserToken(conf, domains) {
231
226
  const token = await (0, signup_1.addMultiDomainSignup)(conf.rootFolder, domains);
232
- console.log(`\nToken value:\n ${token}\n`);
227
+ console.log(`\nFor creating users on domain${(domains.length > 0) ? 's' : ''} ${domains.join(', ')}:\n token value: ${token}`);
233
228
  const signupLink = signupLinkFrom(conf, token);
234
229
  if (signupLink) {
235
- console.log(`Signup link: ${signupLink}\n`);
230
+ console.log(`Signup link:\n ${signupLink}\n`);
236
231
  }
232
+ console.log(``);
237
233
  }
238
234
  async function createSingleUserToken(conf, userId) {
239
235
  const token = await (0, signup_1.addSingleUserSignup)(conf.rootFolder, userId);
240
- console.log(`\nToken value:\n ${token}\n`);
236
+ console.log(`\nFor creating user ${userId}:\n token value: ${token}`);
241
237
  const signupLink = signupLinkFrom(conf, token);
242
238
  if (signupLink) {
243
- console.log(`Signup link: ${signupLink}\n`);
239
+ console.log(`Signup link:\n ${signupLink}\n`);
244
240
  }
241
+ console.log(``);
245
242
  }
246
243
  const cmd = (0, cli_1.parseProcessArgv)();
247
244
  if (cmd.runCmd) {
@@ -19,52 +19,54 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.sslOpts = void 0;
20
20
  exports.sslOpts = {
21
21
  key: `-----BEGIN PRIVATE KEY-----
22
- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDNSnmGLUwA7Qf9
23
- D2cqOq4fvhRcO07/C5PLjbEzIg311caqfU7bUlit90vBFB7TvHg/cKORTXPJb/SQ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Oo0dyWMMPzM1Ah
61
+ 0y0NkovS7gUA3pM3DF9hU7YXXoXjueMi/wIDAQABo1MwUTAdBgNVHQ4EFgQUK9jG
62
+ K/xw9TJGdYq6u8hYdjqcPvowHwYDVR0jBBgwFoAUK9jGK/xw9TJGdYq6u8hYdjqc
63
+ PvowDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEALe20I+WMlcMW
64
+ GBoryo2OXvJ5Uu4AiImP5RbhgpDXry9FXiARwR/kx/oAY5o1flJ3jY3yO8fETDcD
65
+ G6F6Tf/PKPlMDrWoFv7Vz/s4GjAyPFWPQJe3EiSjarah7x+hbRNPo7Xf+aCYI/p1
66
+ MLsCVUreTeqA8qno2qbdtwUM3FcTEL/mdkA/d2/H0HIHwGV0A2hpyG8d+RpP2na+
67
+ uwDNifryUwZd8bW2n3UoRtsralEW657sReywAa6iunk8220vjRq8LlceJh3952ov
68
+ EEuI+hxj/ikVBSjQX8aFhX8kx4p4q/mKCOA5q3DCbmrr3Cn8fl0zRZZegrk9kfpV
69
+ QGCnHRJ0yQ==
68
70
  -----END CERTIFICATE-----`
69
71
  };
70
72
  Object.freeze(exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- Copyright (C) 2015 - 2016, 2020 3NSoft Inc.
3
+ Copyright (C) 2015 - 2016, 2020, 2026 3NSoft Inc.
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify it under
6
6
  the terms of the GNU General Public License as published by the Free Software
@@ -42,14 +42,14 @@ function addUser(addUserFunc) {
42
42
  }
43
43
  try {
44
44
  await addUserFunc(userId, mailerId, storage.kdParams, signupToken);
45
- res.status(signup_1.addUser.SC.ok).end();
45
+ res.status(signup_1.addUser.SC.ok).send();
46
46
  }
47
47
  catch (err) {
48
48
  if (err === users_1.SC.USER_ALREADY_EXIST) {
49
- res.status(signup_1.addUser.SC.userAlreadyExists).end();
49
+ res.status(signup_1.addUser.SC.userAlreadyExists).send();
50
50
  }
51
51
  else if (err === users_1.SC.CREATION_UNAUTHORIZED) {
52
- res.status(signup_1.addUser.SC.unauthorized).end();
52
+ res.status(signup_1.addUser.SC.unauthorized).send();
53
53
  }
54
54
  else {
55
55
  next(err);
@@ -0,0 +1 @@
1
+ export {};