create-mern-omar 1.1.0 → 1.2.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.
Files changed (1561) hide show
  1. package/README.md +10 -18
  2. package/index.js +37 -10
  3. package/package.json +9 -2
  4. package/templates/.env.example +1 -1
  5. package/templates/db/index.js +1 -0
  6. package/templates/server.js +2 -2
  7. package/templates/node_modules/.package-lock.json +0 -1105
  8. package/templates/node_modules/@mongodb-js/saslprep/LICENSE +0 -22
  9. package/templates/node_modules/@mongodb-js/saslprep/dist/.esm-wrapper.mjs +0 -4
  10. package/templates/node_modules/@mongodb-js/saslprep/dist/browser.d.ts +0 -5
  11. package/templates/node_modules/@mongodb-js/saslprep/dist/browser.d.ts.map +0 -1
  12. package/templates/node_modules/@mongodb-js/saslprep/dist/browser.js +0 -12
  13. package/templates/node_modules/@mongodb-js/saslprep/dist/browser.js.map +0 -1
  14. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts +0 -3
  15. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.d.ts.map +0 -1
  16. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js +0 -5
  17. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data-browser.js.map +0 -1
  18. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts +0 -3
  19. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data.d.ts.map +0 -1
  20. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data.js +0 -5
  21. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-data.js.map +0 -1
  22. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts +0 -7
  23. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-src.d.ts.map +0 -1
  24. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-src.js +0 -881
  25. package/templates/node_modules/@mongodb-js/saslprep/dist/code-points-src.js.map +0 -1
  26. package/templates/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts +0 -2
  27. package/templates/node_modules/@mongodb-js/saslprep/dist/generate-code-points.d.ts.map +0 -1
  28. package/templates/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js +0 -83
  29. package/templates/node_modules/@mongodb-js/saslprep/dist/generate-code-points.js.map +0 -1
  30. package/templates/node_modules/@mongodb-js/saslprep/dist/index.d.ts +0 -11
  31. package/templates/node_modules/@mongodb-js/saslprep/dist/index.d.ts.map +0 -1
  32. package/templates/node_modules/@mongodb-js/saslprep/dist/index.js +0 -65
  33. package/templates/node_modules/@mongodb-js/saslprep/dist/index.js.map +0 -1
  34. package/templates/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts +0 -10
  35. package/templates/node_modules/@mongodb-js/saslprep/dist/memory-code-points.d.ts.map +0 -1
  36. package/templates/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js +0 -32
  37. package/templates/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js.map +0 -1
  38. package/templates/node_modules/@mongodb-js/saslprep/dist/node.d.ts +0 -10
  39. package/templates/node_modules/@mongodb-js/saslprep/dist/node.d.ts.map +0 -1
  40. package/templates/node_modules/@mongodb-js/saslprep/dist/node.js +0 -15
  41. package/templates/node_modules/@mongodb-js/saslprep/dist/node.js.map +0 -1
  42. package/templates/node_modules/@mongodb-js/saslprep/dist/util.d.ts +0 -2
  43. package/templates/node_modules/@mongodb-js/saslprep/dist/util.d.ts.map +0 -1
  44. package/templates/node_modules/@mongodb-js/saslprep/dist/util.js +0 -11
  45. package/templates/node_modules/@mongodb-js/saslprep/dist/util.js.map +0 -1
  46. package/templates/node_modules/@mongodb-js/saslprep/package.json +0 -87
  47. package/templates/node_modules/@mongodb-js/saslprep/readme.md +0 -29
  48. package/templates/node_modules/@types/webidl-conversions/LICENSE +0 -21
  49. package/templates/node_modules/@types/webidl-conversions/README.md +0 -15
  50. package/templates/node_modules/@types/webidl-conversions/index.d.ts +0 -91
  51. package/templates/node_modules/@types/webidl-conversions/package.json +0 -30
  52. package/templates/node_modules/@types/whatwg-url/LICENSE +0 -21
  53. package/templates/node_modules/@types/whatwg-url/README.md +0 -15
  54. package/templates/node_modules/@types/whatwg-url/index.d.ts +0 -172
  55. package/templates/node_modules/@types/whatwg-url/lib/URL-impl.d.ts +0 -22
  56. package/templates/node_modules/@types/whatwg-url/lib/URL.d.ts +0 -66
  57. package/templates/node_modules/@types/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -20
  58. package/templates/node_modules/@types/whatwg-url/lib/URLSearchParams.d.ts +0 -92
  59. package/templates/node_modules/@types/whatwg-url/package.json +0 -38
  60. package/templates/node_modules/@types/whatwg-url/webidl2js-wrapper.d.ts +0 -4
  61. package/templates/node_modules/accepts/HISTORY.md +0 -250
  62. package/templates/node_modules/accepts/LICENSE +0 -23
  63. package/templates/node_modules/accepts/README.md +0 -140
  64. package/templates/node_modules/accepts/index.js +0 -238
  65. package/templates/node_modules/accepts/package.json +0 -47
  66. package/templates/node_modules/basic-auth/HISTORY.md +0 -52
  67. package/templates/node_modules/basic-auth/LICENSE +0 -24
  68. package/templates/node_modules/basic-auth/README.md +0 -113
  69. package/templates/node_modules/basic-auth/index.js +0 -133
  70. package/templates/node_modules/basic-auth/package.json +0 -41
  71. package/templates/node_modules/body-parser/LICENSE +0 -23
  72. package/templates/node_modules/body-parser/README.md +0 -494
  73. package/templates/node_modules/body-parser/index.js +0 -80
  74. package/templates/node_modules/body-parser/lib/read.js +0 -250
  75. package/templates/node_modules/body-parser/lib/types/json.js +0 -166
  76. package/templates/node_modules/body-parser/lib/types/raw.js +0 -43
  77. package/templates/node_modules/body-parser/lib/types/text.js +0 -37
  78. package/templates/node_modules/body-parser/lib/types/urlencoded.js +0 -142
  79. package/templates/node_modules/body-parser/lib/utils.js +0 -96
  80. package/templates/node_modules/body-parser/package.json +0 -52
  81. package/templates/node_modules/bson/LICENSE.md +0 -201
  82. package/templates/node_modules/bson/README.md +0 -291
  83. package/templates/node_modules/bson/bson.d.ts +0 -1729
  84. package/templates/node_modules/bson/etc/prepare.js +0 -19
  85. package/templates/node_modules/bson/lib/bson.bundle.js +0 -4675
  86. package/templates/node_modules/bson/lib/bson.bundle.js.map +0 -1
  87. package/templates/node_modules/bson/lib/bson.cjs +0 -4670
  88. package/templates/node_modules/bson/lib/bson.cjs.map +0 -1
  89. package/templates/node_modules/bson/lib/bson.mjs +0 -4639
  90. package/templates/node_modules/bson/lib/bson.mjs.map +0 -1
  91. package/templates/node_modules/bson/lib/bson.node.mjs +0 -4639
  92. package/templates/node_modules/bson/lib/bson.node.mjs.map +0 -1
  93. package/templates/node_modules/bson/lib/bson.rn.cjs +0 -4680
  94. package/templates/node_modules/bson/lib/bson.rn.cjs.map +0 -1
  95. package/templates/node_modules/bson/package.json +0 -118
  96. package/templates/node_modules/bson/src/binary.ts +0 -751
  97. package/templates/node_modules/bson/src/bson.ts +0 -248
  98. package/templates/node_modules/bson/src/bson_value.ts +0 -55
  99. package/templates/node_modules/bson/src/code.ts +0 -69
  100. package/templates/node_modules/bson/src/constants.ts +0 -147
  101. package/templates/node_modules/bson/src/db_ref.ts +0 -128
  102. package/templates/node_modules/bson/src/decimal128.ts +0 -855
  103. package/templates/node_modules/bson/src/double.ts +0 -115
  104. package/templates/node_modules/bson/src/error.ts +0 -105
  105. package/templates/node_modules/bson/src/extended_json.ts +0 -513
  106. package/templates/node_modules/bson/src/index.ts +0 -19
  107. package/templates/node_modules/bson/src/int_32.ts +0 -101
  108. package/templates/node_modules/bson/src/long.ts +0 -1240
  109. package/templates/node_modules/bson/src/max_key.ts +0 -31
  110. package/templates/node_modules/bson/src/min_key.ts +0 -31
  111. package/templates/node_modules/bson/src/objectid.ts +0 -382
  112. package/templates/node_modules/bson/src/parse_utf8.ts +0 -35
  113. package/templates/node_modules/bson/src/parser/calculate_size.ts +0 -218
  114. package/templates/node_modules/bson/src/parser/deserializer.ts +0 -627
  115. package/templates/node_modules/bson/src/parser/on_demand/index.ts +0 -32
  116. package/templates/node_modules/bson/src/parser/on_demand/parse_to_elements.ts +0 -190
  117. package/templates/node_modules/bson/src/parser/serializer.ts +0 -954
  118. package/templates/node_modules/bson/src/parser/utils.ts +0 -69
  119. package/templates/node_modules/bson/src/regexp.ts +0 -114
  120. package/templates/node_modules/bson/src/symbol.ts +0 -55
  121. package/templates/node_modules/bson/src/timestamp.ts +0 -176
  122. package/templates/node_modules/bson/src/utils/byte_utils.ts +0 -63
  123. package/templates/node_modules/bson/src/utils/latin.ts +0 -104
  124. package/templates/node_modules/bson/src/utils/node_byte_utils.ts +0 -161
  125. package/templates/node_modules/bson/src/utils/number_utils.ts +0 -204
  126. package/templates/node_modules/bson/src/utils/string_utils.ts +0 -44
  127. package/templates/node_modules/bson/src/utils/web_byte_utils.ts +0 -216
  128. package/templates/node_modules/bytes/History.md +0 -97
  129. package/templates/node_modules/bytes/LICENSE +0 -23
  130. package/templates/node_modules/bytes/Readme.md +0 -152
  131. package/templates/node_modules/bytes/index.js +0 -170
  132. package/templates/node_modules/bytes/package.json +0 -42
  133. package/templates/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
  134. package/templates/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
  135. package/templates/node_modules/call-bind-apply-helpers/.nycrc +0 -9
  136. package/templates/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
  137. package/templates/node_modules/call-bind-apply-helpers/LICENSE +0 -21
  138. package/templates/node_modules/call-bind-apply-helpers/README.md +0 -62
  139. package/templates/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
  140. package/templates/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
  141. package/templates/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
  142. package/templates/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
  143. package/templates/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
  144. package/templates/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
  145. package/templates/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
  146. package/templates/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
  147. package/templates/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
  148. package/templates/node_modules/call-bind-apply-helpers/index.js +0 -15
  149. package/templates/node_modules/call-bind-apply-helpers/package.json +0 -85
  150. package/templates/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
  151. package/templates/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
  152. package/templates/node_modules/call-bind-apply-helpers/test/index.js +0 -63
  153. package/templates/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
  154. package/templates/node_modules/call-bound/.eslintrc +0 -13
  155. package/templates/node_modules/call-bound/.github/FUNDING.yml +0 -12
  156. package/templates/node_modules/call-bound/.nycrc +0 -9
  157. package/templates/node_modules/call-bound/CHANGELOG.md +0 -42
  158. package/templates/node_modules/call-bound/LICENSE +0 -21
  159. package/templates/node_modules/call-bound/README.md +0 -53
  160. package/templates/node_modules/call-bound/index.d.ts +0 -94
  161. package/templates/node_modules/call-bound/index.js +0 -19
  162. package/templates/node_modules/call-bound/package.json +0 -99
  163. package/templates/node_modules/call-bound/test/index.js +0 -61
  164. package/templates/node_modules/call-bound/tsconfig.json +0 -10
  165. package/templates/node_modules/content-disposition/HISTORY.md +0 -72
  166. package/templates/node_modules/content-disposition/LICENSE +0 -22
  167. package/templates/node_modules/content-disposition/README.md +0 -142
  168. package/templates/node_modules/content-disposition/index.js +0 -458
  169. package/templates/node_modules/content-disposition/package.json +0 -43
  170. package/templates/node_modules/content-type/HISTORY.md +0 -29
  171. package/templates/node_modules/content-type/LICENSE +0 -22
  172. package/templates/node_modules/content-type/README.md +0 -94
  173. package/templates/node_modules/content-type/index.js +0 -225
  174. package/templates/node_modules/content-type/package.json +0 -42
  175. package/templates/node_modules/cookie/LICENSE +0 -24
  176. package/templates/node_modules/cookie/README.md +0 -317
  177. package/templates/node_modules/cookie/SECURITY.md +0 -25
  178. package/templates/node_modules/cookie/index.js +0 -335
  179. package/templates/node_modules/cookie/package.json +0 -44
  180. package/templates/node_modules/cookie-signature/History.md +0 -70
  181. package/templates/node_modules/cookie-signature/LICENSE +0 -22
  182. package/templates/node_modules/cookie-signature/Readme.md +0 -23
  183. package/templates/node_modules/cookie-signature/index.js +0 -47
  184. package/templates/node_modules/cookie-signature/package.json +0 -24
  185. package/templates/node_modules/debug/LICENSE +0 -20
  186. package/templates/node_modules/debug/README.md +0 -481
  187. package/templates/node_modules/debug/package.json +0 -64
  188. package/templates/node_modules/debug/src/browser.js +0 -272
  189. package/templates/node_modules/debug/src/common.js +0 -292
  190. package/templates/node_modules/debug/src/index.js +0 -10
  191. package/templates/node_modules/debug/src/node.js +0 -263
  192. package/templates/node_modules/depd/History.md +0 -103
  193. package/templates/node_modules/depd/LICENSE +0 -22
  194. package/templates/node_modules/depd/Readme.md +0 -280
  195. package/templates/node_modules/depd/index.js +0 -538
  196. package/templates/node_modules/depd/lib/browser/index.js +0 -77
  197. package/templates/node_modules/depd/package.json +0 -45
  198. package/templates/node_modules/dotenv/CHANGELOG.md +0 -598
  199. package/templates/node_modules/dotenv/LICENSE +0 -23
  200. package/templates/node_modules/dotenv/README-es.md +0 -405
  201. package/templates/node_modules/dotenv/README.md +0 -692
  202. package/templates/node_modules/dotenv/SECURITY.md +0 -1
  203. package/templates/node_modules/dotenv/config.d.ts +0 -1
  204. package/templates/node_modules/dotenv/config.js +0 -9
  205. package/templates/node_modules/dotenv/lib/cli-options.js +0 -17
  206. package/templates/node_modules/dotenv/lib/env-options.js +0 -28
  207. package/templates/node_modules/dotenv/lib/main.d.ts +0 -179
  208. package/templates/node_modules/dotenv/lib/main.js +0 -434
  209. package/templates/node_modules/dotenv/package.json +0 -62
  210. package/templates/node_modules/dunder-proto/.eslintrc +0 -5
  211. package/templates/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
  212. package/templates/node_modules/dunder-proto/.nycrc +0 -13
  213. package/templates/node_modules/dunder-proto/CHANGELOG.md +0 -24
  214. package/templates/node_modules/dunder-proto/LICENSE +0 -21
  215. package/templates/node_modules/dunder-proto/README.md +0 -54
  216. package/templates/node_modules/dunder-proto/get.d.ts +0 -5
  217. package/templates/node_modules/dunder-proto/get.js +0 -30
  218. package/templates/node_modules/dunder-proto/package.json +0 -76
  219. package/templates/node_modules/dunder-proto/set.d.ts +0 -5
  220. package/templates/node_modules/dunder-proto/set.js +0 -35
  221. package/templates/node_modules/dunder-proto/test/get.js +0 -34
  222. package/templates/node_modules/dunder-proto/test/index.js +0 -4
  223. package/templates/node_modules/dunder-proto/test/set.js +0 -50
  224. package/templates/node_modules/dunder-proto/tsconfig.json +0 -9
  225. package/templates/node_modules/ee-first/LICENSE +0 -22
  226. package/templates/node_modules/ee-first/README.md +0 -80
  227. package/templates/node_modules/ee-first/index.js +0 -95
  228. package/templates/node_modules/ee-first/package.json +0 -29
  229. package/templates/node_modules/encodeurl/LICENSE +0 -22
  230. package/templates/node_modules/encodeurl/README.md +0 -109
  231. package/templates/node_modules/encodeurl/index.js +0 -60
  232. package/templates/node_modules/encodeurl/package.json +0 -40
  233. package/templates/node_modules/es-define-property/.eslintrc +0 -13
  234. package/templates/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  235. package/templates/node_modules/es-define-property/.nycrc +0 -9
  236. package/templates/node_modules/es-define-property/CHANGELOG.md +0 -29
  237. package/templates/node_modules/es-define-property/LICENSE +0 -21
  238. package/templates/node_modules/es-define-property/README.md +0 -49
  239. package/templates/node_modules/es-define-property/index.d.ts +0 -3
  240. package/templates/node_modules/es-define-property/index.js +0 -14
  241. package/templates/node_modules/es-define-property/package.json +0 -81
  242. package/templates/node_modules/es-define-property/test/index.js +0 -56
  243. package/templates/node_modules/es-define-property/tsconfig.json +0 -10
  244. package/templates/node_modules/es-errors/.eslintrc +0 -5
  245. package/templates/node_modules/es-errors/.github/FUNDING.yml +0 -12
  246. package/templates/node_modules/es-errors/CHANGELOG.md +0 -40
  247. package/templates/node_modules/es-errors/LICENSE +0 -21
  248. package/templates/node_modules/es-errors/README.md +0 -55
  249. package/templates/node_modules/es-errors/eval.d.ts +0 -3
  250. package/templates/node_modules/es-errors/eval.js +0 -4
  251. package/templates/node_modules/es-errors/index.d.ts +0 -3
  252. package/templates/node_modules/es-errors/index.js +0 -4
  253. package/templates/node_modules/es-errors/package.json +0 -80
  254. package/templates/node_modules/es-errors/range.d.ts +0 -3
  255. package/templates/node_modules/es-errors/range.js +0 -4
  256. package/templates/node_modules/es-errors/ref.d.ts +0 -3
  257. package/templates/node_modules/es-errors/ref.js +0 -4
  258. package/templates/node_modules/es-errors/syntax.d.ts +0 -3
  259. package/templates/node_modules/es-errors/syntax.js +0 -4
  260. package/templates/node_modules/es-errors/test/index.js +0 -19
  261. package/templates/node_modules/es-errors/tsconfig.json +0 -49
  262. package/templates/node_modules/es-errors/type.d.ts +0 -3
  263. package/templates/node_modules/es-errors/type.js +0 -4
  264. package/templates/node_modules/es-errors/uri.d.ts +0 -3
  265. package/templates/node_modules/es-errors/uri.js +0 -4
  266. package/templates/node_modules/es-object-atoms/.eslintrc +0 -16
  267. package/templates/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
  268. package/templates/node_modules/es-object-atoms/CHANGELOG.md +0 -37
  269. package/templates/node_modules/es-object-atoms/LICENSE +0 -21
  270. package/templates/node_modules/es-object-atoms/README.md +0 -63
  271. package/templates/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
  272. package/templates/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
  273. package/templates/node_modules/es-object-atoms/ToObject.d.ts +0 -7
  274. package/templates/node_modules/es-object-atoms/ToObject.js +0 -10
  275. package/templates/node_modules/es-object-atoms/index.d.ts +0 -3
  276. package/templates/node_modules/es-object-atoms/index.js +0 -4
  277. package/templates/node_modules/es-object-atoms/isObject.d.ts +0 -3
  278. package/templates/node_modules/es-object-atoms/isObject.js +0 -6
  279. package/templates/node_modules/es-object-atoms/package.json +0 -80
  280. package/templates/node_modules/es-object-atoms/test/index.js +0 -38
  281. package/templates/node_modules/es-object-atoms/tsconfig.json +0 -6
  282. package/templates/node_modules/escape-html/LICENSE +0 -24
  283. package/templates/node_modules/escape-html/Readme.md +0 -43
  284. package/templates/node_modules/escape-html/index.js +0 -78
  285. package/templates/node_modules/escape-html/package.json +0 -24
  286. package/templates/node_modules/etag/HISTORY.md +0 -83
  287. package/templates/node_modules/etag/LICENSE +0 -22
  288. package/templates/node_modules/etag/README.md +0 -159
  289. package/templates/node_modules/etag/index.js +0 -131
  290. package/templates/node_modules/etag/package.json +0 -47
  291. package/templates/node_modules/express/LICENSE +0 -24
  292. package/templates/node_modules/express/Readme.md +0 -276
  293. package/templates/node_modules/express/index.js +0 -11
  294. package/templates/node_modules/express/lib/application.js +0 -631
  295. package/templates/node_modules/express/lib/express.js +0 -81
  296. package/templates/node_modules/express/lib/request.js +0 -514
  297. package/templates/node_modules/express/lib/response.js +0 -1053
  298. package/templates/node_modules/express/lib/utils.js +0 -271
  299. package/templates/node_modules/express/lib/view.js +0 -205
  300. package/templates/node_modules/express/package.json +0 -99
  301. package/templates/node_modules/finalhandler/HISTORY.md +0 -239
  302. package/templates/node_modules/finalhandler/LICENSE +0 -22
  303. package/templates/node_modules/finalhandler/README.md +0 -150
  304. package/templates/node_modules/finalhandler/index.js +0 -293
  305. package/templates/node_modules/finalhandler/package.json +0 -47
  306. package/templates/node_modules/forwarded/HISTORY.md +0 -21
  307. package/templates/node_modules/forwarded/LICENSE +0 -22
  308. package/templates/node_modules/forwarded/README.md +0 -57
  309. package/templates/node_modules/forwarded/index.js +0 -90
  310. package/templates/node_modules/forwarded/package.json +0 -45
  311. package/templates/node_modules/fresh/HISTORY.md +0 -80
  312. package/templates/node_modules/fresh/LICENSE +0 -23
  313. package/templates/node_modules/fresh/README.md +0 -117
  314. package/templates/node_modules/fresh/index.js +0 -136
  315. package/templates/node_modules/fresh/package.json +0 -46
  316. package/templates/node_modules/function-bind/.eslintrc +0 -21
  317. package/templates/node_modules/function-bind/.github/FUNDING.yml +0 -12
  318. package/templates/node_modules/function-bind/.github/SECURITY.md +0 -3
  319. package/templates/node_modules/function-bind/.nycrc +0 -13
  320. package/templates/node_modules/function-bind/CHANGELOG.md +0 -136
  321. package/templates/node_modules/function-bind/LICENSE +0 -20
  322. package/templates/node_modules/function-bind/README.md +0 -46
  323. package/templates/node_modules/function-bind/implementation.js +0 -84
  324. package/templates/node_modules/function-bind/index.js +0 -5
  325. package/templates/node_modules/function-bind/package.json +0 -87
  326. package/templates/node_modules/function-bind/test/.eslintrc +0 -9
  327. package/templates/node_modules/function-bind/test/index.js +0 -252
  328. package/templates/node_modules/get-intrinsic/.eslintrc +0 -42
  329. package/templates/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
  330. package/templates/node_modules/get-intrinsic/.nycrc +0 -9
  331. package/templates/node_modules/get-intrinsic/CHANGELOG.md +0 -186
  332. package/templates/node_modules/get-intrinsic/LICENSE +0 -21
  333. package/templates/node_modules/get-intrinsic/README.md +0 -71
  334. package/templates/node_modules/get-intrinsic/index.js +0 -378
  335. package/templates/node_modules/get-intrinsic/package.json +0 -97
  336. package/templates/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
  337. package/templates/node_modules/get-proto/.eslintrc +0 -10
  338. package/templates/node_modules/get-proto/.github/FUNDING.yml +0 -12
  339. package/templates/node_modules/get-proto/.nycrc +0 -9
  340. package/templates/node_modules/get-proto/CHANGELOG.md +0 -21
  341. package/templates/node_modules/get-proto/LICENSE +0 -21
  342. package/templates/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
  343. package/templates/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
  344. package/templates/node_modules/get-proto/README.md +0 -50
  345. package/templates/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
  346. package/templates/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
  347. package/templates/node_modules/get-proto/index.d.ts +0 -5
  348. package/templates/node_modules/get-proto/index.js +0 -27
  349. package/templates/node_modules/get-proto/package.json +0 -81
  350. package/templates/node_modules/get-proto/test/index.js +0 -68
  351. package/templates/node_modules/get-proto/tsconfig.json +0 -9
  352. package/templates/node_modules/gopd/.eslintrc +0 -16
  353. package/templates/node_modules/gopd/.github/FUNDING.yml +0 -12
  354. package/templates/node_modules/gopd/CHANGELOG.md +0 -45
  355. package/templates/node_modules/gopd/LICENSE +0 -21
  356. package/templates/node_modules/gopd/README.md +0 -40
  357. package/templates/node_modules/gopd/gOPD.d.ts +0 -1
  358. package/templates/node_modules/gopd/gOPD.js +0 -4
  359. package/templates/node_modules/gopd/index.d.ts +0 -5
  360. package/templates/node_modules/gopd/index.js +0 -15
  361. package/templates/node_modules/gopd/package.json +0 -77
  362. package/templates/node_modules/gopd/test/index.js +0 -36
  363. package/templates/node_modules/gopd/tsconfig.json +0 -9
  364. package/templates/node_modules/has-symbols/.eslintrc +0 -11
  365. package/templates/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  366. package/templates/node_modules/has-symbols/.nycrc +0 -9
  367. package/templates/node_modules/has-symbols/CHANGELOG.md +0 -91
  368. package/templates/node_modules/has-symbols/LICENSE +0 -21
  369. package/templates/node_modules/has-symbols/README.md +0 -46
  370. package/templates/node_modules/has-symbols/index.d.ts +0 -3
  371. package/templates/node_modules/has-symbols/index.js +0 -14
  372. package/templates/node_modules/has-symbols/package.json +0 -111
  373. package/templates/node_modules/has-symbols/shams.d.ts +0 -3
  374. package/templates/node_modules/has-symbols/shams.js +0 -45
  375. package/templates/node_modules/has-symbols/test/index.js +0 -22
  376. package/templates/node_modules/has-symbols/test/shams/core-js.js +0 -29
  377. package/templates/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
  378. package/templates/node_modules/has-symbols/test/tests.js +0 -58
  379. package/templates/node_modules/has-symbols/tsconfig.json +0 -10
  380. package/templates/node_modules/hasown/.eslintrc +0 -5
  381. package/templates/node_modules/hasown/.github/FUNDING.yml +0 -12
  382. package/templates/node_modules/hasown/.nycrc +0 -13
  383. package/templates/node_modules/hasown/CHANGELOG.md +0 -40
  384. package/templates/node_modules/hasown/LICENSE +0 -21
  385. package/templates/node_modules/hasown/README.md +0 -40
  386. package/templates/node_modules/hasown/index.d.ts +0 -3
  387. package/templates/node_modules/hasown/index.js +0 -8
  388. package/templates/node_modules/hasown/package.json +0 -92
  389. package/templates/node_modules/hasown/tsconfig.json +0 -6
  390. package/templates/node_modules/http-errors/HISTORY.md +0 -186
  391. package/templates/node_modules/http-errors/LICENSE +0 -23
  392. package/templates/node_modules/http-errors/README.md +0 -169
  393. package/templates/node_modules/http-errors/index.js +0 -290
  394. package/templates/node_modules/http-errors/package.json +0 -54
  395. package/templates/node_modules/iconv-lite/Changelog.md +0 -241
  396. package/templates/node_modules/iconv-lite/LICENSE +0 -21
  397. package/templates/node_modules/iconv-lite/README.md +0 -138
  398. package/templates/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -532
  399. package/templates/node_modules/iconv-lite/encodings/dbcs-data.js +0 -185
  400. package/templates/node_modules/iconv-lite/encodings/index.js +0 -23
  401. package/templates/node_modules/iconv-lite/encodings/internal.js +0 -218
  402. package/templates/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -75
  403. package/templates/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  404. package/templates/node_modules/iconv-lite/encodings/sbcs-data.js +0 -178
  405. package/templates/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  406. package/templates/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  407. package/templates/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  408. package/templates/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  409. package/templates/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  410. package/templates/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  411. package/templates/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
  412. package/templates/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  413. package/templates/node_modules/iconv-lite/encodings/utf16.js +0 -187
  414. package/templates/node_modules/iconv-lite/encodings/utf32.js +0 -307
  415. package/templates/node_modules/iconv-lite/encodings/utf7.js +0 -283
  416. package/templates/node_modules/iconv-lite/lib/bom-handling.js +0 -48
  417. package/templates/node_modules/iconv-lite/lib/helpers/merge-exports.js +0 -13
  418. package/templates/node_modules/iconv-lite/lib/index.d.ts +0 -131
  419. package/templates/node_modules/iconv-lite/lib/index.js +0 -183
  420. package/templates/node_modules/iconv-lite/lib/streams.js +0 -105
  421. package/templates/node_modules/iconv-lite/package.json +0 -65
  422. package/templates/node_modules/iconv-lite/types/encodings.d.ts +0 -423
  423. package/templates/node_modules/inherits/LICENSE +0 -16
  424. package/templates/node_modules/inherits/README.md +0 -42
  425. package/templates/node_modules/inherits/inherits.js +0 -9
  426. package/templates/node_modules/inherits/inherits_browser.js +0 -27
  427. package/templates/node_modules/inherits/package.json +0 -29
  428. package/templates/node_modules/ipaddr.js/LICENSE +0 -19
  429. package/templates/node_modules/ipaddr.js/README.md +0 -233
  430. package/templates/node_modules/ipaddr.js/ipaddr.min.js +0 -1
  431. package/templates/node_modules/ipaddr.js/lib/ipaddr.js +0 -673
  432. package/templates/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +0 -68
  433. package/templates/node_modules/ipaddr.js/package.json +0 -35
  434. package/templates/node_modules/is-promise/LICENSE +0 -19
  435. package/templates/node_modules/is-promise/index.d.ts +0 -2
  436. package/templates/node_modules/is-promise/index.js +0 -6
  437. package/templates/node_modules/is-promise/index.mjs +0 -3
  438. package/templates/node_modules/is-promise/package.json +0 -30
  439. package/templates/node_modules/is-promise/readme.md +0 -33
  440. package/templates/node_modules/kareem/.nyc_output/fa57d6c4-9e78-4624-9229-f77b87a07481.json +0 -1
  441. package/templates/node_modules/kareem/.nyc_output/processinfo/fa57d6c4-9e78-4624-9229-f77b87a07481.json +0 -1
  442. package/templates/node_modules/kareem/.nyc_output/processinfo/index.json +0 -1
  443. package/templates/node_modules/kareem/CHANGELOG.md +0 -830
  444. package/templates/node_modules/kareem/LICENSE +0 -202
  445. package/templates/node_modules/kareem/README.md +0 -408
  446. package/templates/node_modules/kareem/SECURITY.md +0 -5
  447. package/templates/node_modules/kareem/coverage/lcov-report/base.css +0 -224
  448. package/templates/node_modules/kareem/coverage/lcov-report/block-navigation.js +0 -87
  449. package/templates/node_modules/kareem/coverage/lcov-report/favicon.png +0 -0
  450. package/templates/node_modules/kareem/coverage/lcov-report/index.html +0 -116
  451. package/templates/node_modules/kareem/coverage/lcov-report/index.js.html +0 -1603
  452. package/templates/node_modules/kareem/coverage/lcov-report/prettify.css +0 -1
  453. package/templates/node_modules/kareem/coverage/lcov-report/prettify.js +0 -2
  454. package/templates/node_modules/kareem/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  455. package/templates/node_modules/kareem/coverage/lcov-report/sorter.js +0 -196
  456. package/templates/node_modules/kareem/coverage/lcov.info +0 -423
  457. package/templates/node_modules/kareem/index.d.ts +0 -31
  458. package/templates/node_modules/kareem/index.js +0 -509
  459. package/templates/node_modules/kareem/package.json +0 -28
  460. package/templates/node_modules/math-intrinsics/.eslintrc +0 -16
  461. package/templates/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
  462. package/templates/node_modules/math-intrinsics/CHANGELOG.md +0 -24
  463. package/templates/node_modules/math-intrinsics/LICENSE +0 -21
  464. package/templates/node_modules/math-intrinsics/README.md +0 -50
  465. package/templates/node_modules/math-intrinsics/abs.d.ts +0 -1
  466. package/templates/node_modules/math-intrinsics/abs.js +0 -4
  467. package/templates/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
  468. package/templates/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
  469. package/templates/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
  470. package/templates/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
  471. package/templates/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
  472. package/templates/node_modules/math-intrinsics/constants/maxValue.js +0 -5
  473. package/templates/node_modules/math-intrinsics/floor.d.ts +0 -1
  474. package/templates/node_modules/math-intrinsics/floor.js +0 -4
  475. package/templates/node_modules/math-intrinsics/isFinite.d.ts +0 -3
  476. package/templates/node_modules/math-intrinsics/isFinite.js +0 -12
  477. package/templates/node_modules/math-intrinsics/isInteger.d.ts +0 -3
  478. package/templates/node_modules/math-intrinsics/isInteger.js +0 -16
  479. package/templates/node_modules/math-intrinsics/isNaN.d.ts +0 -1
  480. package/templates/node_modules/math-intrinsics/isNaN.js +0 -6
  481. package/templates/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
  482. package/templates/node_modules/math-intrinsics/isNegativeZero.js +0 -6
  483. package/templates/node_modules/math-intrinsics/max.d.ts +0 -1
  484. package/templates/node_modules/math-intrinsics/max.js +0 -4
  485. package/templates/node_modules/math-intrinsics/min.d.ts +0 -1
  486. package/templates/node_modules/math-intrinsics/min.js +0 -4
  487. package/templates/node_modules/math-intrinsics/mod.d.ts +0 -3
  488. package/templates/node_modules/math-intrinsics/mod.js +0 -9
  489. package/templates/node_modules/math-intrinsics/package.json +0 -86
  490. package/templates/node_modules/math-intrinsics/pow.d.ts +0 -1
  491. package/templates/node_modules/math-intrinsics/pow.js +0 -4
  492. package/templates/node_modules/math-intrinsics/round.d.ts +0 -1
  493. package/templates/node_modules/math-intrinsics/round.js +0 -4
  494. package/templates/node_modules/math-intrinsics/sign.d.ts +0 -3
  495. package/templates/node_modules/math-intrinsics/sign.js +0 -11
  496. package/templates/node_modules/math-intrinsics/test/index.js +0 -192
  497. package/templates/node_modules/math-intrinsics/tsconfig.json +0 -3
  498. package/templates/node_modules/media-typer/HISTORY.md +0 -50
  499. package/templates/node_modules/media-typer/LICENSE +0 -22
  500. package/templates/node_modules/media-typer/README.md +0 -93
  501. package/templates/node_modules/media-typer/index.js +0 -143
  502. package/templates/node_modules/media-typer/package.json +0 -33
  503. package/templates/node_modules/memory-pager/.travis.yml +0 -4
  504. package/templates/node_modules/memory-pager/LICENSE +0 -21
  505. package/templates/node_modules/memory-pager/README.md +0 -65
  506. package/templates/node_modules/memory-pager/index.js +0 -160
  507. package/templates/node_modules/memory-pager/package.json +0 -24
  508. package/templates/node_modules/memory-pager/test.js +0 -80
  509. package/templates/node_modules/merge-descriptors/index.d.ts +0 -11
  510. package/templates/node_modules/merge-descriptors/index.js +0 -26
  511. package/templates/node_modules/merge-descriptors/license +0 -11
  512. package/templates/node_modules/merge-descriptors/package.json +0 -50
  513. package/templates/node_modules/merge-descriptors/readme.md +0 -55
  514. package/templates/node_modules/mime-db/HISTORY.md +0 -541
  515. package/templates/node_modules/mime-db/LICENSE +0 -23
  516. package/templates/node_modules/mime-db/README.md +0 -109
  517. package/templates/node_modules/mime-db/db.json +0 -9342
  518. package/templates/node_modules/mime-db/index.js +0 -12
  519. package/templates/node_modules/mime-db/package.json +0 -56
  520. package/templates/node_modules/mime-types/HISTORY.md +0 -428
  521. package/templates/node_modules/mime-types/LICENSE +0 -23
  522. package/templates/node_modules/mime-types/README.md +0 -126
  523. package/templates/node_modules/mime-types/index.js +0 -211
  524. package/templates/node_modules/mime-types/mimeScore.js +0 -57
  525. package/templates/node_modules/mime-types/package.json +0 -49
  526. package/templates/node_modules/mongodb/LICENSE.md +0 -201
  527. package/templates/node_modules/mongodb/README.md +0 -355
  528. package/templates/node_modules/mongodb/etc/prepare.js +0 -12
  529. package/templates/node_modules/mongodb/lib/admin.js +0 -136
  530. package/templates/node_modules/mongodb/lib/admin.js.map +0 -1
  531. package/templates/node_modules/mongodb/lib/bson.js +0 -84
  532. package/templates/node_modules/mongodb/lib/bson.js.map +0 -1
  533. package/templates/node_modules/mongodb/lib/bulk/common.js +0 -835
  534. package/templates/node_modules/mongodb/lib/bulk/common.js.map +0 -1
  535. package/templates/node_modules/mongodb/lib/bulk/ordered.js +0 -67
  536. package/templates/node_modules/mongodb/lib/bulk/ordered.js.map +0 -1
  537. package/templates/node_modules/mongodb/lib/bulk/unordered.js +0 -92
  538. package/templates/node_modules/mongodb/lib/bulk/unordered.js.map +0 -1
  539. package/templates/node_modules/mongodb/lib/change_stream.js +0 -511
  540. package/templates/node_modules/mongodb/lib/change_stream.js.map +0 -1
  541. package/templates/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js +0 -272
  542. package/templates/node_modules/mongodb/lib/client-side-encryption/auto_encrypter.js.map +0 -1
  543. package/templates/node_modules/mongodb/lib/client-side-encryption/client_encryption.js +0 -609
  544. package/templates/node_modules/mongodb/lib/client-side-encryption/client_encryption.js.map +0 -1
  545. package/templates/node_modules/mongodb/lib/client-side-encryption/errors.js +0 -138
  546. package/templates/node_modules/mongodb/lib/client-side-encryption/errors.js.map +0 -1
  547. package/templates/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js +0 -85
  548. package/templates/node_modules/mongodb/lib/client-side-encryption/mongocryptd_manager.js.map +0 -1
  549. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/aws.js +0 -23
  550. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/aws.js.map +0 -1
  551. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/azure.js +0 -132
  552. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/azure.js.map +0 -1
  553. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js +0 -16
  554. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/gcp.js.map +0 -1
  555. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/index.js +0 -43
  556. package/templates/node_modules/mongodb/lib/client-side-encryption/providers/index.js.map +0 -1
  557. package/templates/node_modules/mongodb/lib/client-side-encryption/state_machine.js +0 -426
  558. package/templates/node_modules/mongodb/lib/client-side-encryption/state_machine.js.map +0 -1
  559. package/templates/node_modules/mongodb/lib/cmap/auth/auth_provider.js +0 -51
  560. package/templates/node_modules/mongodb/lib/cmap/auth/auth_provider.js.map +0 -1
  561. package/templates/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js +0 -102
  562. package/templates/node_modules/mongodb/lib/cmap/auth/aws_temporary_credentials.js.map +0 -1
  563. package/templates/node_modules/mongodb/lib/cmap/auth/gssapi.js +0 -154
  564. package/templates/node_modules/mongodb/lib/cmap/auth/gssapi.js.map +0 -1
  565. package/templates/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js +0 -168
  566. package/templates/node_modules/mongodb/lib/cmap/auth/mongo_credentials.js.map +0 -1
  567. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js +0 -133
  568. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_aws.js.map +0 -1
  569. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.js +0 -84
  570. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/automated_callback_workflow.js.map +0 -1
  571. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.js +0 -62
  572. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/azure_machine_workflow.js.map +0 -1
  573. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js +0 -141
  574. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/callback_workflow.js.map +0 -1
  575. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.js +0 -44
  576. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/command_builders.js.map +0 -1
  577. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js +0 -39
  578. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/gcp_machine_workflow.js.map +0 -1
  579. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.js +0 -122
  580. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/human_callback_workflow.js.map +0 -1
  581. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js +0 -31
  582. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js.map +0 -1
  583. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.js +0 -52
  584. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_cache.js.map +0 -1
  585. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js +0 -22
  586. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc/token_machine_workflow.js.map +0 -1
  587. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js +0 -73
  588. package/templates/node_modules/mongodb/lib/cmap/auth/mongodb_oidc.js.map +0 -1
  589. package/templates/node_modules/mongodb/lib/cmap/auth/plain.js +0 -26
  590. package/templates/node_modules/mongodb/lib/cmap/auth/plain.js.map +0 -1
  591. package/templates/node_modules/mongodb/lib/cmap/auth/providers.js +0 -22
  592. package/templates/node_modules/mongodb/lib/cmap/auth/providers.js.map +0 -1
  593. package/templates/node_modules/mongodb/lib/cmap/auth/scram.js +0 -254
  594. package/templates/node_modules/mongodb/lib/cmap/auth/scram.js.map +0 -1
  595. package/templates/node_modules/mongodb/lib/cmap/auth/x509.js +0 -36
  596. package/templates/node_modules/mongodb/lib/cmap/auth/x509.js.map +0 -1
  597. package/templates/node_modules/mongodb/lib/cmap/command_monitoring_events.js +0 -223
  598. package/templates/node_modules/mongodb/lib/cmap/command_monitoring_events.js.map +0 -1
  599. package/templates/node_modules/mongodb/lib/cmap/commands.js +0 -535
  600. package/templates/node_modules/mongodb/lib/cmap/commands.js.map +0 -1
  601. package/templates/node_modules/mongodb/lib/cmap/connect.js +0 -366
  602. package/templates/node_modules/mongodb/lib/cmap/connect.js.map +0 -1
  603. package/templates/node_modules/mongodb/lib/cmap/connection.js +0 -571
  604. package/templates/node_modules/mongodb/lib/cmap/connection.js.map +0 -1
  605. package/templates/node_modules/mongodb/lib/cmap/connection_pool.js +0 -558
  606. package/templates/node_modules/mongodb/lib/cmap/connection_pool.js.map +0 -1
  607. package/templates/node_modules/mongodb/lib/cmap/connection_pool_events.js +0 -190
  608. package/templates/node_modules/mongodb/lib/cmap/connection_pool_events.js.map +0 -1
  609. package/templates/node_modules/mongodb/lib/cmap/errors.js +0 -108
  610. package/templates/node_modules/mongodb/lib/cmap/errors.js.map +0 -1
  611. package/templates/node_modules/mongodb/lib/cmap/handshake/client_metadata.js +0 -241
  612. package/templates/node_modules/mongodb/lib/cmap/handshake/client_metadata.js.map +0 -1
  613. package/templates/node_modules/mongodb/lib/cmap/metrics.js +0 -62
  614. package/templates/node_modules/mongodb/lib/cmap/metrics.js.map +0 -1
  615. package/templates/node_modules/mongodb/lib/cmap/stream_description.js +0 -70
  616. package/templates/node_modules/mongodb/lib/cmap/stream_description.js.map +0 -1
  617. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/compression.js +0 -163
  618. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/compression.js.map +0 -1
  619. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/constants.js +0 -21
  620. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/constants.js.map +0 -1
  621. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js +0 -111
  622. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/on_data.js.map +0 -1
  623. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js +0 -222
  624. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/on_demand/document.js.map +0 -1
  625. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/responses.js +0 -315
  626. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/responses.js.map +0 -1
  627. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/shared.js +0 -35
  628. package/templates/node_modules/mongodb/lib/cmap/wire_protocol/shared.js.map +0 -1
  629. package/templates/node_modules/mongodb/lib/collection.js +0 -751
  630. package/templates/node_modules/mongodb/lib/collection.js.map +0 -1
  631. package/templates/node_modules/mongodb/lib/connection_string.js +0 -1089
  632. package/templates/node_modules/mongodb/lib/connection_string.js.map +0 -1
  633. package/templates/node_modules/mongodb/lib/constants.js +0 -170
  634. package/templates/node_modules/mongodb/lib/constants.js.map +0 -1
  635. package/templates/node_modules/mongodb/lib/cursor/abstract_cursor.js +0 -924
  636. package/templates/node_modules/mongodb/lib/cursor/abstract_cursor.js.map +0 -1
  637. package/templates/node_modules/mongodb/lib/cursor/aggregation_cursor.js +0 -164
  638. package/templates/node_modules/mongodb/lib/cursor/aggregation_cursor.js.map +0 -1
  639. package/templates/node_modules/mongodb/lib/cursor/change_stream_cursor.js +0 -104
  640. package/templates/node_modules/mongodb/lib/cursor/change_stream_cursor.js.map +0 -1
  641. package/templates/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.js +0 -52
  642. package/templates/node_modules/mongodb/lib/cursor/client_bulk_write_cursor.js.map +0 -1
  643. package/templates/node_modules/mongodb/lib/cursor/explainable_cursor.js +0 -36
  644. package/templates/node_modules/mongodb/lib/cursor/explainable_cursor.js.map +0 -1
  645. package/templates/node_modules/mongodb/lib/cursor/find_cursor.js +0 -399
  646. package/templates/node_modules/mongodb/lib/cursor/find_cursor.js.map +0 -1
  647. package/templates/node_modules/mongodb/lib/cursor/list_collections_cursor.js +0 -34
  648. package/templates/node_modules/mongodb/lib/cursor/list_collections_cursor.js.map +0 -1
  649. package/templates/node_modules/mongodb/lib/cursor/list_indexes_cursor.js +0 -32
  650. package/templates/node_modules/mongodb/lib/cursor/list_indexes_cursor.js.map +0 -1
  651. package/templates/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.js +0 -14
  652. package/templates/node_modules/mongodb/lib/cursor/list_search_indexes_cursor.js.map +0 -1
  653. package/templates/node_modules/mongodb/lib/cursor/run_command_cursor.js +0 -94
  654. package/templates/node_modules/mongodb/lib/cursor/run_command_cursor.js.map +0 -1
  655. package/templates/node_modules/mongodb/lib/db.js +0 -420
  656. package/templates/node_modules/mongodb/lib/db.js.map +0 -1
  657. package/templates/node_modules/mongodb/lib/deps.js +0 -125
  658. package/templates/node_modules/mongodb/lib/deps.js.map +0 -1
  659. package/templates/node_modules/mongodb/lib/encrypter.js +0 -106
  660. package/templates/node_modules/mongodb/lib/encrypter.js.map +0 -1
  661. package/templates/node_modules/mongodb/lib/error.js +0 -1383
  662. package/templates/node_modules/mongodb/lib/error.js.map +0 -1
  663. package/templates/node_modules/mongodb/lib/explain.js +0 -59
  664. package/templates/node_modules/mongodb/lib/explain.js.map +0 -1
  665. package/templates/node_modules/mongodb/lib/gridfs/download.js +0 -305
  666. package/templates/node_modules/mongodb/lib/gridfs/download.js.map +0 -1
  667. package/templates/node_modules/mongodb/lib/gridfs/index.js +0 -164
  668. package/templates/node_modules/mongodb/lib/gridfs/index.js.map +0 -1
  669. package/templates/node_modules/mongodb/lib/gridfs/upload.js +0 -358
  670. package/templates/node_modules/mongodb/lib/gridfs/upload.js.map +0 -1
  671. package/templates/node_modules/mongodb/lib/index.js +0 -193
  672. package/templates/node_modules/mongodb/lib/index.js.map +0 -1
  673. package/templates/node_modules/mongodb/lib/mongo_client.js +0 -557
  674. package/templates/node_modules/mongodb/lib/mongo_client.js.map +0 -1
  675. package/templates/node_modules/mongodb/lib/mongo_client_auth_providers.js +0 -80
  676. package/templates/node_modules/mongodb/lib/mongo_client_auth_providers.js.map +0 -1
  677. package/templates/node_modules/mongodb/lib/mongo_logger.js +0 -649
  678. package/templates/node_modules/mongodb/lib/mongo_logger.js.map +0 -1
  679. package/templates/node_modules/mongodb/lib/mongo_types.js +0 -56
  680. package/templates/node_modules/mongodb/lib/mongo_types.js.map +0 -1
  681. package/templates/node_modules/mongodb/lib/operations/aggregate.js +0 -90
  682. package/templates/node_modules/mongodb/lib/operations/aggregate.js.map +0 -1
  683. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.js +0 -51
  684. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/client_bulk_write.js.map +0 -1
  685. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.js +0 -340
  686. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/command_builder.js.map +0 -1
  687. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/common.js +0 -3
  688. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/common.js.map +0 -1
  689. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/executor.js +0 -120
  690. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/executor.js.map +0 -1
  691. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.js +0 -204
  692. package/templates/node_modules/mongodb/lib/operations/client_bulk_write/results_merger.js.map +0 -1
  693. package/templates/node_modules/mongodb/lib/operations/command.js +0 -83
  694. package/templates/node_modules/mongodb/lib/operations/command.js.map +0 -1
  695. package/templates/node_modules/mongodb/lib/operations/count.js +0 -45
  696. package/templates/node_modules/mongodb/lib/operations/count.js.map +0 -1
  697. package/templates/node_modules/mongodb/lib/operations/create_collection.js +0 -109
  698. package/templates/node_modules/mongodb/lib/operations/create_collection.js.map +0 -1
  699. package/templates/node_modules/mongodb/lib/operations/delete.js +0 -125
  700. package/templates/node_modules/mongodb/lib/operations/delete.js.map +0 -1
  701. package/templates/node_modules/mongodb/lib/operations/distinct.js +0 -61
  702. package/templates/node_modules/mongodb/lib/operations/distinct.js.map +0 -1
  703. package/templates/node_modules/mongodb/lib/operations/drop.js +0 -93
  704. package/templates/node_modules/mongodb/lib/operations/drop.js.map +0 -1
  705. package/templates/node_modules/mongodb/lib/operations/end_sessions.js +0 -34
  706. package/templates/node_modules/mongodb/lib/operations/end_sessions.js.map +0 -1
  707. package/templates/node_modules/mongodb/lib/operations/estimated_document_count.js +0 -41
  708. package/templates/node_modules/mongodb/lib/operations/estimated_document_count.js.map +0 -1
  709. package/templates/node_modules/mongodb/lib/operations/execute_operation.js +0 -238
  710. package/templates/node_modules/mongodb/lib/operations/execute_operation.js.map +0 -1
  711. package/templates/node_modules/mongodb/lib/operations/find.js +0 -148
  712. package/templates/node_modules/mongodb/lib/operations/find.js.map +0 -1
  713. package/templates/node_modules/mongodb/lib/operations/find_and_modify.js +0 -158
  714. package/templates/node_modules/mongodb/lib/operations/find_and_modify.js.map +0 -1
  715. package/templates/node_modules/mongodb/lib/operations/get_more.js +0 -62
  716. package/templates/node_modules/mongodb/lib/operations/get_more.js.map +0 -1
  717. package/templates/node_modules/mongodb/lib/operations/indexes.js +0 -186
  718. package/templates/node_modules/mongodb/lib/operations/indexes.js.map +0 -1
  719. package/templates/node_modules/mongodb/lib/operations/insert.js +0 -70
  720. package/templates/node_modules/mongodb/lib/operations/insert.js.map +0 -1
  721. package/templates/node_modules/mongodb/lib/operations/kill_cursors.js +0 -43
  722. package/templates/node_modules/mongodb/lib/operations/kill_cursors.js.map +0 -1
  723. package/templates/node_modules/mongodb/lib/operations/list_collections.js +0 -53
  724. package/templates/node_modules/mongodb/lib/operations/list_collections.js.map +0 -1
  725. package/templates/node_modules/mongodb/lib/operations/list_databases.js +0 -40
  726. package/templates/node_modules/mongodb/lib/operations/list_databases.js.map +0 -1
  727. package/templates/node_modules/mongodb/lib/operations/operation.js +0 -102
  728. package/templates/node_modules/mongodb/lib/operations/operation.js.map +0 -1
  729. package/templates/node_modules/mongodb/lib/operations/profiling_level.js +0 -43
  730. package/templates/node_modules/mongodb/lib/operations/profiling_level.js.map +0 -1
  731. package/templates/node_modules/mongodb/lib/operations/remove_user.js +0 -27
  732. package/templates/node_modules/mongodb/lib/operations/remove_user.js.map +0 -1
  733. package/templates/node_modules/mongodb/lib/operations/rename.js +0 -38
  734. package/templates/node_modules/mongodb/lib/operations/rename.js.map +0 -1
  735. package/templates/node_modules/mongodb/lib/operations/run_command.js +0 -47
  736. package/templates/node_modules/mongodb/lib/operations/run_command.js.map +0 -1
  737. package/templates/node_modules/mongodb/lib/operations/search_indexes/create.js +0 -33
  738. package/templates/node_modules/mongodb/lib/operations/search_indexes/create.js.map +0 -1
  739. package/templates/node_modules/mongodb/lib/operations/search_indexes/drop.js +0 -43
  740. package/templates/node_modules/mongodb/lib/operations/search_indexes/drop.js.map +0 -1
  741. package/templates/node_modules/mongodb/lib/operations/search_indexes/update.js +0 -35
  742. package/templates/node_modules/mongodb/lib/operations/search_indexes/update.js.map +0 -1
  743. package/templates/node_modules/mongodb/lib/operations/set_profiling_level.js +0 -53
  744. package/templates/node_modules/mongodb/lib/operations/set_profiling_level.js.map +0 -1
  745. package/templates/node_modules/mongodb/lib/operations/stats.js +0 -27
  746. package/templates/node_modules/mongodb/lib/operations/stats.js.map +0 -1
  747. package/templates/node_modules/mongodb/lib/operations/update.js +0 -188
  748. package/templates/node_modules/mongodb/lib/operations/update.js.map +0 -1
  749. package/templates/node_modules/mongodb/lib/operations/validate_collection.js +0 -37
  750. package/templates/node_modules/mongodb/lib/operations/validate_collection.js.map +0 -1
  751. package/templates/node_modules/mongodb/lib/read_concern.js +0 -73
  752. package/templates/node_modules/mongodb/lib/read_concern.js.map +0 -1
  753. package/templates/node_modules/mongodb/lib/read_preference.js +0 -191
  754. package/templates/node_modules/mongodb/lib/read_preference.js.map +0 -1
  755. package/templates/node_modules/mongodb/lib/sdam/common.js +0 -49
  756. package/templates/node_modules/mongodb/lib/sdam/common.js.map +0 -1
  757. package/templates/node_modules/mongodb/lib/sdam/events.js +0 -146
  758. package/templates/node_modules/mongodb/lib/sdam/events.js.map +0 -1
  759. package/templates/node_modules/mongodb/lib/sdam/monitor.js +0 -544
  760. package/templates/node_modules/mongodb/lib/sdam/monitor.js.map +0 -1
  761. package/templates/node_modules/mongodb/lib/sdam/server.js +0 -392
  762. package/templates/node_modules/mongodb/lib/sdam/server.js.map +0 -1
  763. package/templates/node_modules/mongodb/lib/sdam/server_description.js +0 -204
  764. package/templates/node_modules/mongodb/lib/sdam/server_description.js.map +0 -1
  765. package/templates/node_modules/mongodb/lib/sdam/server_selection.js +0 -231
  766. package/templates/node_modules/mongodb/lib/sdam/server_selection.js.map +0 -1
  767. package/templates/node_modules/mongodb/lib/sdam/server_selection_events.js +0 -85
  768. package/templates/node_modules/mongodb/lib/sdam/server_selection_events.js.map +0 -1
  769. package/templates/node_modules/mongodb/lib/sdam/srv_polling.js +0 -108
  770. package/templates/node_modules/mongodb/lib/sdam/srv_polling.js.map +0 -1
  771. package/templates/node_modules/mongodb/lib/sdam/topology.js +0 -650
  772. package/templates/node_modules/mongodb/lib/sdam/topology.js.map +0 -1
  773. package/templates/node_modules/mongodb/lib/sdam/topology_description.js +0 -383
  774. package/templates/node_modules/mongodb/lib/sdam/topology_description.js.map +0 -1
  775. package/templates/node_modules/mongodb/lib/sessions.js +0 -828
  776. package/templates/node_modules/mongodb/lib/sessions.js.map +0 -1
  777. package/templates/node_modules/mongodb/lib/sort.js +0 -103
  778. package/templates/node_modules/mongodb/lib/sort.js.map +0 -1
  779. package/templates/node_modules/mongodb/lib/timeout.js +0 -296
  780. package/templates/node_modules/mongodb/lib/timeout.js.map +0 -1
  781. package/templates/node_modules/mongodb/lib/transactions.js +0 -135
  782. package/templates/node_modules/mongodb/lib/transactions.js.map +0 -1
  783. package/templates/node_modules/mongodb/lib/utils.js +0 -1189
  784. package/templates/node_modules/mongodb/lib/utils.js.map +0 -1
  785. package/templates/node_modules/mongodb/lib/write_concern.js +0 -100
  786. package/templates/node_modules/mongodb/lib/write_concern.js.map +0 -1
  787. package/templates/node_modules/mongodb/mongodb.d.ts +0 -9010
  788. package/templates/node_modules/mongodb/package.json +0 -175
  789. package/templates/node_modules/mongodb/src/admin.ts +0 -173
  790. package/templates/node_modules/mongodb/src/bson.ts +0 -148
  791. package/templates/node_modules/mongodb/src/bulk/common.ts +0 -1251
  792. package/templates/node_modules/mongodb/src/bulk/ordered.ts +0 -83
  793. package/templates/node_modules/mongodb/src/bulk/unordered.ts +0 -115
  794. package/templates/node_modules/mongodb/src/change_stream.ts +0 -1158
  795. package/templates/node_modules/mongodb/src/client-side-encryption/auto_encrypter.ts +0 -469
  796. package/templates/node_modules/mongodb/src/client-side-encryption/client_encryption.ts +0 -1150
  797. package/templates/node_modules/mongodb/src/client-side-encryption/errors.ts +0 -144
  798. package/templates/node_modules/mongodb/src/client-side-encryption/mongocryptd_manager.ts +0 -100
  799. package/templates/node_modules/mongodb/src/client-side-encryption/providers/aws.ts +0 -33
  800. package/templates/node_modules/mongodb/src/client-side-encryption/providers/azure.ts +0 -181
  801. package/templates/node_modules/mongodb/src/client-side-encryption/providers/gcp.ts +0 -16
  802. package/templates/node_modules/mongodb/src/client-side-encryption/providers/index.ts +0 -207
  803. package/templates/node_modules/mongodb/src/client-side-encryption/state_machine.ts +0 -650
  804. package/templates/node_modules/mongodb/src/cmap/auth/auth_provider.ts +0 -77
  805. package/templates/node_modules/mongodb/src/cmap/auth/aws_temporary_credentials.ts +0 -127
  806. package/templates/node_modules/mongodb/src/cmap/auth/gssapi.ts +0 -202
  807. package/templates/node_modules/mongodb/src/cmap/auth/mongo_credentials.ts +0 -291
  808. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_aws.ts +0 -186
  809. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/automated_callback_workflow.ts +0 -88
  810. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/azure_machine_workflow.ts +0 -73
  811. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/callback_workflow.ts +0 -188
  812. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/command_builders.ts +0 -53
  813. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/gcp_machine_workflow.ts +0 -46
  814. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/human_callback_workflow.ts +0 -141
  815. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/k8s_machine_workflow.ts +0 -30
  816. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/token_cache.ts +0 -62
  817. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc/token_machine_workflow.ts +0 -21
  818. package/templates/node_modules/mongodb/src/cmap/auth/mongodb_oidc.ts +0 -185
  819. package/templates/node_modules/mongodb/src/cmap/auth/plain.ts +0 -25
  820. package/templates/node_modules/mongodb/src/cmap/auth/providers.ts +0 -22
  821. package/templates/node_modules/mongodb/src/cmap/auth/scram.ts +0 -344
  822. package/templates/node_modules/mongodb/src/cmap/auth/x509.ts +0 -43
  823. package/templates/node_modules/mongodb/src/cmap/command_monitoring_events.ts +0 -316
  824. package/templates/node_modules/mongodb/src/cmap/commands.ts +0 -788
  825. package/templates/node_modules/mongodb/src/cmap/connect.ts +0 -499
  826. package/templates/node_modules/mongodb/src/cmap/connection.ts +0 -931
  827. package/templates/node_modules/mongodb/src/cmap/connection_pool.ts +0 -831
  828. package/templates/node_modules/mongodb/src/cmap/connection_pool_events.ts +0 -300
  829. package/templates/node_modules/mongodb/src/cmap/errors.ts +0 -119
  830. package/templates/node_modules/mongodb/src/cmap/handshake/client_metadata.ts +0 -352
  831. package/templates/node_modules/mongodb/src/cmap/metrics.ts +0 -58
  832. package/templates/node_modules/mongodb/src/cmap/stream_description.ts +0 -96
  833. package/templates/node_modules/mongodb/src/cmap/wire_protocol/compression.ts +0 -197
  834. package/templates/node_modules/mongodb/src/cmap/wire_protocol/constants.ts +0 -17
  835. package/templates/node_modules/mongodb/src/cmap/wire_protocol/on_data.ts +0 -139
  836. package/templates/node_modules/mongodb/src/cmap/wire_protocol/on_demand/document.ts +0 -358
  837. package/templates/node_modules/mongodb/src/cmap/wire_protocol/responses.ts +0 -393
  838. package/templates/node_modules/mongodb/src/cmap/wire_protocol/shared.ts +0 -48
  839. package/templates/node_modules/mongodb/src/collection.ts +0 -1314
  840. package/templates/node_modules/mongodb/src/connection_string.ts +0 -1296
  841. package/templates/node_modules/mongodb/src/constants.ts +0 -176
  842. package/templates/node_modules/mongodb/src/cursor/abstract_cursor.ts +0 -1247
  843. package/templates/node_modules/mongodb/src/cursor/aggregation_cursor.ts +0 -245
  844. package/templates/node_modules/mongodb/src/cursor/change_stream_cursor.ts +0 -171
  845. package/templates/node_modules/mongodb/src/cursor/client_bulk_write_cursor.ts +0 -83
  846. package/templates/node_modules/mongodb/src/cursor/explainable_cursor.ts +0 -51
  847. package/templates/node_modules/mongodb/src/cursor/find_cursor.ts +0 -497
  848. package/templates/node_modules/mongodb/src/cursor/list_collections_cursor.ts +0 -50
  849. package/templates/node_modules/mongodb/src/cursor/list_indexes_cursor.ts +0 -37
  850. package/templates/node_modules/mongodb/src/cursor/list_search_indexes_cursor.ts +0 -20
  851. package/templates/node_modules/mongodb/src/cursor/run_command_cursor.ts +0 -178
  852. package/templates/node_modules/mongodb/src/db.ts +0 -622
  853. package/templates/node_modules/mongodb/src/deps.ts +0 -287
  854. package/templates/node_modules/mongodb/src/encrypter.ts +0 -127
  855. package/templates/node_modules/mongodb/src/error.ts +0 -1571
  856. package/templates/node_modules/mongodb/src/explain.ts +0 -124
  857. package/templates/node_modules/mongodb/src/gridfs/download.ts +0 -483
  858. package/templates/node_modules/mongodb/src/gridfs/index.ts +0 -264
  859. package/templates/node_modules/mongodb/src/gridfs/upload.ts +0 -537
  860. package/templates/node_modules/mongodb/src/index.ts +0 -633
  861. package/templates/node_modules/mongodb/src/mongo_client.ts +0 -1155
  862. package/templates/node_modules/mongodb/src/mongo_client_auth_providers.ts +0 -87
  863. package/templates/node_modules/mongodb/src/mongo_logger.ts +0 -1076
  864. package/templates/node_modules/mongodb/src/mongo_types.ts +0 -678
  865. package/templates/node_modules/mongodb/src/operations/aggregate.ts +0 -153
  866. package/templates/node_modules/mongodb/src/operations/client_bulk_write/client_bulk_write.ts +0 -72
  867. package/templates/node_modules/mongodb/src/operations/client_bulk_write/command_builder.ts +0 -487
  868. package/templates/node_modules/mongodb/src/operations/client_bulk_write/common.ts +0 -276
  869. package/templates/node_modules/mongodb/src/operations/client_bulk_write/executor.ts +0 -149
  870. package/templates/node_modules/mongodb/src/operations/client_bulk_write/results_merger.ts +0 -260
  871. package/templates/node_modules/mongodb/src/operations/command.ts +0 -171
  872. package/templates/node_modules/mongodb/src/operations/count.ts +0 -74
  873. package/templates/node_modules/mongodb/src/operations/create_collection.ts +0 -218
  874. package/templates/node_modules/mongodb/src/operations/delete.ts +0 -183
  875. package/templates/node_modules/mongodb/src/operations/distinct.ts +0 -92
  876. package/templates/node_modules/mongodb/src/operations/drop.ts +0 -130
  877. package/templates/node_modules/mongodb/src/operations/end_sessions.ts +0 -44
  878. package/templates/node_modules/mongodb/src/operations/estimated_document_count.ts +0 -61
  879. package/templates/node_modules/mongodb/src/operations/execute_operation.ts +0 -318
  880. package/templates/node_modules/mongodb/src/operations/find.ts +0 -254
  881. package/templates/node_modules/mongodb/src/operations/find_and_modify.ts +0 -319
  882. package/templates/node_modules/mongodb/src/operations/get_more.ts +0 -108
  883. package/templates/node_modules/mongodb/src/operations/indexes.ts +0 -418
  884. package/templates/node_modules/mongodb/src/operations/insert.ts +0 -108
  885. package/templates/node_modules/mongodb/src/operations/kill_cursors.ts +0 -64
  886. package/templates/node_modules/mongodb/src/operations/list_collections.ts +0 -108
  887. package/templates/node_modules/mongodb/src/operations/list_databases.ts +0 -68
  888. package/templates/node_modules/mongodb/src/operations/operation.ts +0 -181
  889. package/templates/node_modules/mongodb/src/operations/profiling_level.ts +0 -46
  890. package/templates/node_modules/mongodb/src/operations/remove_user.ts +0 -36
  891. package/templates/node_modules/mongodb/src/operations/rename.ts +0 -55
  892. package/templates/node_modules/mongodb/src/operations/run_command.ts +0 -79
  893. package/templates/node_modules/mongodb/src/operations/search_indexes/create.ts +0 -56
  894. package/templates/node_modules/mongodb/src/operations/search_indexes/drop.ts +0 -58
  895. package/templates/node_modules/mongodb/src/operations/search_indexes/update.ts +0 -45
  896. package/templates/node_modules/mongodb/src/operations/set_profiling_level.ts +0 -74
  897. package/templates/node_modules/mongodb/src/operations/stats.ts +0 -37
  898. package/templates/node_modules/mongodb/src/operations/update.ts +0 -318
  899. package/templates/node_modules/mongodb/src/operations/validate_collection.ts +0 -50
  900. package/templates/node_modules/mongodb/src/read_concern.ts +0 -88
  901. package/templates/node_modules/mongodb/src/read_preference.ts +0 -256
  902. package/templates/node_modules/mongodb/src/sdam/common.ts +0 -74
  903. package/templates/node_modules/mongodb/src/sdam/events.ts +0 -219
  904. package/templates/node_modules/mongodb/src/sdam/monitor.ts +0 -771
  905. package/templates/node_modules/mongodb/src/sdam/server.ts +0 -577
  906. package/templates/node_modules/mongodb/src/sdam/server_description.ts +0 -291
  907. package/templates/node_modules/mongodb/src/sdam/server_selection.ts +0 -323
  908. package/templates/node_modules/mongodb/src/sdam/server_selection_events.ts +0 -142
  909. package/templates/node_modules/mongodb/src/sdam/srv_polling.ts +0 -146
  910. package/templates/node_modules/mongodb/src/sdam/topology.ts +0 -1096
  911. package/templates/node_modules/mongodb/src/sdam/topology_description.ts +0 -548
  912. package/templates/node_modules/mongodb/src/sessions.ts +0 -1160
  913. package/templates/node_modules/mongodb/src/sort.ts +0 -141
  914. package/templates/node_modules/mongodb/src/timeout.ts +0 -405
  915. package/templates/node_modules/mongodb/src/transactions.ts +0 -181
  916. package/templates/node_modules/mongodb/src/utils.ts +0 -1491
  917. package/templates/node_modules/mongodb/src/write_concern.ts +0 -183
  918. package/templates/node_modules/mongodb/tsconfig.json +0 -46
  919. package/templates/node_modules/mongodb-connection-string-url/.esm-wrapper.mjs +0 -6
  920. package/templates/node_modules/mongodb-connection-string-url/LICENSE +0 -192
  921. package/templates/node_modules/mongodb-connection-string-url/README.md +0 -25
  922. package/templates/node_modules/mongodb-connection-string-url/lib/index.d.ts +0 -63
  923. package/templates/node_modules/mongodb-connection-string-url/lib/index.js +0 -239
  924. package/templates/node_modules/mongodb-connection-string-url/lib/index.js.map +0 -1
  925. package/templates/node_modules/mongodb-connection-string-url/lib/redact.d.ts +0 -7
  926. package/templates/node_modules/mongodb-connection-string-url/lib/redact.js +0 -97
  927. package/templates/node_modules/mongodb-connection-string-url/lib/redact.js.map +0 -1
  928. package/templates/node_modules/mongodb-connection-string-url/package.json +0 -71
  929. package/templates/node_modules/mongoose/LICENSE.md +0 -22
  930. package/templates/node_modules/mongoose/README.md +0 -397
  931. package/templates/node_modules/mongoose/SECURITY.md +0 -1
  932. package/templates/node_modules/mongoose/eslint.config.mjs +0 -198
  933. package/templates/node_modules/mongoose/index.js +0 -64
  934. package/templates/node_modules/mongoose/lib/aggregate.js +0 -1189
  935. package/templates/node_modules/mongoose/lib/cast/bigint.js +0 -46
  936. package/templates/node_modules/mongoose/lib/cast/boolean.js +0 -32
  937. package/templates/node_modules/mongoose/lib/cast/date.js +0 -41
  938. package/templates/node_modules/mongoose/lib/cast/decimal128.js +0 -39
  939. package/templates/node_modules/mongoose/lib/cast/double.js +0 -50
  940. package/templates/node_modules/mongoose/lib/cast/int32.js +0 -36
  941. package/templates/node_modules/mongoose/lib/cast/number.js +0 -42
  942. package/templates/node_modules/mongoose/lib/cast/objectid.js +0 -29
  943. package/templates/node_modules/mongoose/lib/cast/string.js +0 -37
  944. package/templates/node_modules/mongoose/lib/cast/uuid.js +0 -35
  945. package/templates/node_modules/mongoose/lib/cast.js +0 -444
  946. package/templates/node_modules/mongoose/lib/collection.js +0 -321
  947. package/templates/node_modules/mongoose/lib/connection.js +0 -1849
  948. package/templates/node_modules/mongoose/lib/connectionState.js +0 -26
  949. package/templates/node_modules/mongoose/lib/constants.js +0 -73
  950. package/templates/node_modules/mongoose/lib/cursor/aggregationCursor.js +0 -466
  951. package/templates/node_modules/mongoose/lib/cursor/changeStream.js +0 -198
  952. package/templates/node_modules/mongoose/lib/cursor/queryCursor.js +0 -622
  953. package/templates/node_modules/mongoose/lib/document.js +0 -5481
  954. package/templates/node_modules/mongoose/lib/driver.js +0 -15
  955. package/templates/node_modules/mongoose/lib/drivers/SPEC.md +0 -4
  956. package/templates/node_modules/mongoose/lib/drivers/node-mongodb-native/bulkWriteResult.js +0 -5
  957. package/templates/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js +0 -405
  958. package/templates/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js +0 -521
  959. package/templates/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js +0 -10
  960. package/templates/node_modules/mongoose/lib/error/browserMissingSchema.js +0 -29
  961. package/templates/node_modules/mongoose/lib/error/bulkSaveIncompleteError.js +0 -44
  962. package/templates/node_modules/mongoose/lib/error/bulkWriteError.js +0 -41
  963. package/templates/node_modules/mongoose/lib/error/cast.js +0 -158
  964. package/templates/node_modules/mongoose/lib/error/createCollectionsError.js +0 -26
  965. package/templates/node_modules/mongoose/lib/error/divergentArray.js +0 -40
  966. package/templates/node_modules/mongoose/lib/error/eachAsyncMultiError.js +0 -41
  967. package/templates/node_modules/mongoose/lib/error/index.js +0 -237
  968. package/templates/node_modules/mongoose/lib/error/invalidSchemaOption.js +0 -32
  969. package/templates/node_modules/mongoose/lib/error/messages.js +0 -47
  970. package/templates/node_modules/mongoose/lib/error/missingSchema.js +0 -33
  971. package/templates/node_modules/mongoose/lib/error/mongooseError.js +0 -13
  972. package/templates/node_modules/mongoose/lib/error/notFound.js +0 -47
  973. package/templates/node_modules/mongoose/lib/error/objectExpected.js +0 -31
  974. package/templates/node_modules/mongoose/lib/error/objectParameter.js +0 -31
  975. package/templates/node_modules/mongoose/lib/error/overwriteModel.js +0 -31
  976. package/templates/node_modules/mongoose/lib/error/parallelSave.js +0 -33
  977. package/templates/node_modules/mongoose/lib/error/parallelValidate.js +0 -33
  978. package/templates/node_modules/mongoose/lib/error/serverSelection.js +0 -62
  979. package/templates/node_modules/mongoose/lib/error/setOptionError.js +0 -103
  980. package/templates/node_modules/mongoose/lib/error/strict.js +0 -35
  981. package/templates/node_modules/mongoose/lib/error/strictPopulate.js +0 -31
  982. package/templates/node_modules/mongoose/lib/error/syncIndexes.js +0 -30
  983. package/templates/node_modules/mongoose/lib/error/validation.js +0 -97
  984. package/templates/node_modules/mongoose/lib/error/validator.js +0 -100
  985. package/templates/node_modules/mongoose/lib/error/version.js +0 -38
  986. package/templates/node_modules/mongoose/lib/helpers/aggregate/prepareDiscriminatorPipeline.js +0 -39
  987. package/templates/node_modules/mongoose/lib/helpers/aggregate/stringifyFunctionOperators.js +0 -50
  988. package/templates/node_modules/mongoose/lib/helpers/arrayDepth.js +0 -33
  989. package/templates/node_modules/mongoose/lib/helpers/clone.js +0 -204
  990. package/templates/node_modules/mongoose/lib/helpers/common.js +0 -127
  991. package/templates/node_modules/mongoose/lib/helpers/createJSONSchemaTypeDefinition.js +0 -24
  992. package/templates/node_modules/mongoose/lib/helpers/cursor/eachAsync.js +0 -225
  993. package/templates/node_modules/mongoose/lib/helpers/discriminator/applyEmbeddedDiscriminators.js +0 -36
  994. package/templates/node_modules/mongoose/lib/helpers/discriminator/areDiscriminatorValuesEqual.js +0 -16
  995. package/templates/node_modules/mongoose/lib/helpers/discriminator/checkEmbeddedDiscriminatorKeyProjection.js +0 -12
  996. package/templates/node_modules/mongoose/lib/helpers/discriminator/getConstructor.js +0 -29
  997. package/templates/node_modules/mongoose/lib/helpers/discriminator/getDiscriminatorByValue.js +0 -28
  998. package/templates/node_modules/mongoose/lib/helpers/discriminator/getSchemaDiscriminatorByValue.js +0 -27
  999. package/templates/node_modules/mongoose/lib/helpers/discriminator/mergeDiscriminatorSchema.js +0 -91
  1000. package/templates/node_modules/mongoose/lib/helpers/document/applyDefaults.js +0 -132
  1001. package/templates/node_modules/mongoose/lib/helpers/document/applyTimestamps.js +0 -105
  1002. package/templates/node_modules/mongoose/lib/helpers/document/applyVirtuals.js +0 -146
  1003. package/templates/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js +0 -45
  1004. package/templates/node_modules/mongoose/lib/helpers/document/compile.js +0 -238
  1005. package/templates/node_modules/mongoose/lib/helpers/document/getDeepestSubdocumentForPath.js +0 -38
  1006. package/templates/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js +0 -53
  1007. package/templates/node_modules/mongoose/lib/helpers/document/handleSpreadDoc.js +0 -35
  1008. package/templates/node_modules/mongoose/lib/helpers/each.js +0 -25
  1009. package/templates/node_modules/mongoose/lib/helpers/error/combinePathErrors.js +0 -22
  1010. package/templates/node_modules/mongoose/lib/helpers/firstKey.js +0 -8
  1011. package/templates/node_modules/mongoose/lib/helpers/get.js +0 -65
  1012. package/templates/node_modules/mongoose/lib/helpers/getConstructorName.js +0 -16
  1013. package/templates/node_modules/mongoose/lib/helpers/getDefaultBulkwriteResult.js +0 -18
  1014. package/templates/node_modules/mongoose/lib/helpers/getFunctionName.js +0 -10
  1015. package/templates/node_modules/mongoose/lib/helpers/immediate.js +0 -16
  1016. package/templates/node_modules/mongoose/lib/helpers/indexes/applySchemaCollation.js +0 -13
  1017. package/templates/node_modules/mongoose/lib/helpers/indexes/decorateDiscriminatorIndexOptions.js +0 -14
  1018. package/templates/node_modules/mongoose/lib/helpers/indexes/getRelatedIndexes.js +0 -63
  1019. package/templates/node_modules/mongoose/lib/helpers/indexes/isDefaultIdIndex.js +0 -18
  1020. package/templates/node_modules/mongoose/lib/helpers/indexes/isIndexEqual.js +0 -95
  1021. package/templates/node_modules/mongoose/lib/helpers/indexes/isIndexSpecEqual.js +0 -32
  1022. package/templates/node_modules/mongoose/lib/helpers/indexes/isTextIndex.js +0 -16
  1023. package/templates/node_modules/mongoose/lib/helpers/indexes/isTimeseriesIndex.js +0 -16
  1024. package/templates/node_modules/mongoose/lib/helpers/isAsyncFunction.js +0 -9
  1025. package/templates/node_modules/mongoose/lib/helpers/isBsonType.js +0 -15
  1026. package/templates/node_modules/mongoose/lib/helpers/isMongooseObject.js +0 -22
  1027. package/templates/node_modules/mongoose/lib/helpers/isObject.js +0 -16
  1028. package/templates/node_modules/mongoose/lib/helpers/isPOJO.js +0 -12
  1029. package/templates/node_modules/mongoose/lib/helpers/isPromise.js +0 -6
  1030. package/templates/node_modules/mongoose/lib/helpers/isSimpleValidator.js +0 -22
  1031. package/templates/node_modules/mongoose/lib/helpers/minimize.js +0 -41
  1032. package/templates/node_modules/mongoose/lib/helpers/model/applyDefaultsToPOJO.js +0 -52
  1033. package/templates/node_modules/mongoose/lib/helpers/model/applyHooks.js +0 -140
  1034. package/templates/node_modules/mongoose/lib/helpers/model/applyMethods.js +0 -70
  1035. package/templates/node_modules/mongoose/lib/helpers/model/applyStaticHooks.js +0 -33
  1036. package/templates/node_modules/mongoose/lib/helpers/model/applyStatics.js +0 -13
  1037. package/templates/node_modules/mongoose/lib/helpers/model/castBulkWrite.js +0 -320
  1038. package/templates/node_modules/mongoose/lib/helpers/model/decorateBulkWriteResult.js +0 -8
  1039. package/templates/node_modules/mongoose/lib/helpers/model/discriminator.js +0 -265
  1040. package/templates/node_modules/mongoose/lib/helpers/model/pushNestedArrayPaths.js +0 -15
  1041. package/templates/node_modules/mongoose/lib/helpers/omitUndefined.js +0 -20
  1042. package/templates/node_modules/mongoose/lib/helpers/once.js +0 -12
  1043. package/templates/node_modules/mongoose/lib/helpers/parallelLimit.js +0 -37
  1044. package/templates/node_modules/mongoose/lib/helpers/path/parentPaths.js +0 -18
  1045. package/templates/node_modules/mongoose/lib/helpers/path/setDottedPath.js +0 -33
  1046. package/templates/node_modules/mongoose/lib/helpers/pluralize.js +0 -95
  1047. package/templates/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js +0 -129
  1048. package/templates/node_modules/mongoose/lib/helpers/populate/assignVals.js +0 -360
  1049. package/templates/node_modules/mongoose/lib/helpers/populate/createPopulateQueryFilter.js +0 -97
  1050. package/templates/node_modules/mongoose/lib/helpers/populate/getModelsMapForPopulate.js +0 -774
  1051. package/templates/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js +0 -229
  1052. package/templates/node_modules/mongoose/lib/helpers/populate/getVirtual.js +0 -103
  1053. package/templates/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js +0 -7
  1054. package/templates/node_modules/mongoose/lib/helpers/populate/lookupLocalFields.js +0 -40
  1055. package/templates/node_modules/mongoose/lib/helpers/populate/markArraySubdocsPopulated.js +0 -49
  1056. package/templates/node_modules/mongoose/lib/helpers/populate/modelNamesFromRefPath.js +0 -66
  1057. package/templates/node_modules/mongoose/lib/helpers/populate/removeDeselectedForeignField.js +0 -31
  1058. package/templates/node_modules/mongoose/lib/helpers/populate/setPopulatedVirtualValue.js +0 -33
  1059. package/templates/node_modules/mongoose/lib/helpers/populate/skipPopulateValue.js +0 -10
  1060. package/templates/node_modules/mongoose/lib/helpers/populate/validateRef.js +0 -19
  1061. package/templates/node_modules/mongoose/lib/helpers/printJestWarning.js +0 -21
  1062. package/templates/node_modules/mongoose/lib/helpers/processConnectionOptions.js +0 -65
  1063. package/templates/node_modules/mongoose/lib/helpers/projection/applyProjection.js +0 -83
  1064. package/templates/node_modules/mongoose/lib/helpers/projection/hasIncludedChildren.js +0 -41
  1065. package/templates/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js +0 -18
  1066. package/templates/node_modules/mongoose/lib/helpers/projection/isExclusive.js +0 -37
  1067. package/templates/node_modules/mongoose/lib/helpers/projection/isInclusive.js +0 -39
  1068. package/templates/node_modules/mongoose/lib/helpers/projection/isNestedProjection.js +0 -8
  1069. package/templates/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js +0 -40
  1070. package/templates/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js +0 -28
  1071. package/templates/node_modules/mongoose/lib/helpers/projection/isSubpath.js +0 -14
  1072. package/templates/node_modules/mongoose/lib/helpers/projection/parseProjection.js +0 -33
  1073. package/templates/node_modules/mongoose/lib/helpers/query/applyGlobalOption.js +0 -29
  1074. package/templates/node_modules/mongoose/lib/helpers/query/cast$expr.js +0 -287
  1075. package/templates/node_modules/mongoose/lib/helpers/query/castFilterPath.js +0 -54
  1076. package/templates/node_modules/mongoose/lib/helpers/query/castUpdate.js +0 -643
  1077. package/templates/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js +0 -103
  1078. package/templates/node_modules/mongoose/lib/helpers/query/handleImmutable.js +0 -44
  1079. package/templates/node_modules/mongoose/lib/helpers/query/handleReadPreferenceAliases.js +0 -23
  1080. package/templates/node_modules/mongoose/lib/helpers/query/hasDollarKeys.js +0 -23
  1081. package/templates/node_modules/mongoose/lib/helpers/query/isOperator.js +0 -14
  1082. package/templates/node_modules/mongoose/lib/helpers/query/sanitizeFilter.js +0 -38
  1083. package/templates/node_modules/mongoose/lib/helpers/query/sanitizeProjection.js +0 -14
  1084. package/templates/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js +0 -62
  1085. package/templates/node_modules/mongoose/lib/helpers/query/trusted.js +0 -13
  1086. package/templates/node_modules/mongoose/lib/helpers/query/validOps.js +0 -3
  1087. package/templates/node_modules/mongoose/lib/helpers/schema/addAutoId.js +0 -7
  1088. package/templates/node_modules/mongoose/lib/helpers/schema/applyBuiltinPlugins.js +0 -12
  1089. package/templates/node_modules/mongoose/lib/helpers/schema/applyPlugins.js +0 -55
  1090. package/templates/node_modules/mongoose/lib/helpers/schema/applyReadConcern.js +0 -20
  1091. package/templates/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js +0 -37
  1092. package/templates/node_modules/mongoose/lib/helpers/schema/cleanPositionalOperators.js +0 -12
  1093. package/templates/node_modules/mongoose/lib/helpers/schema/getIndexes.js +0 -171
  1094. package/templates/node_modules/mongoose/lib/helpers/schema/getKeysInSchemaOrder.js +0 -28
  1095. package/templates/node_modules/mongoose/lib/helpers/schema/getPath.js +0 -43
  1096. package/templates/node_modules/mongoose/lib/helpers/schema/getSubdocumentStrictValue.js +0 -32
  1097. package/templates/node_modules/mongoose/lib/helpers/schema/handleIdOption.js +0 -20
  1098. package/templates/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js +0 -24
  1099. package/templates/node_modules/mongoose/lib/helpers/schema/idGetter.js +0 -34
  1100. package/templates/node_modules/mongoose/lib/helpers/schema/merge.js +0 -36
  1101. package/templates/node_modules/mongoose/lib/helpers/schematype/handleImmutable.js +0 -50
  1102. package/templates/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js +0 -161
  1103. package/templates/node_modules/mongoose/lib/helpers/specialProperties.js +0 -3
  1104. package/templates/node_modules/mongoose/lib/helpers/symbols.js +0 -20
  1105. package/templates/node_modules/mongoose/lib/helpers/timers.js +0 -3
  1106. package/templates/node_modules/mongoose/lib/helpers/timestamps/setDocumentTimestamps.js +0 -26
  1107. package/templates/node_modules/mongoose/lib/helpers/timestamps/setupTimestamps.js +0 -107
  1108. package/templates/node_modules/mongoose/lib/helpers/topology/allServersUnknown.js +0 -12
  1109. package/templates/node_modules/mongoose/lib/helpers/topology/isAtlas.js +0 -31
  1110. package/templates/node_modules/mongoose/lib/helpers/topology/isSSLError.js +0 -16
  1111. package/templates/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js +0 -193
  1112. package/templates/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js +0 -130
  1113. package/templates/node_modules/mongoose/lib/helpers/update/castArrayFilters.js +0 -113
  1114. package/templates/node_modules/mongoose/lib/helpers/update/decorateUpdateWithVersionKey.js +0 -35
  1115. package/templates/node_modules/mongoose/lib/helpers/update/modifiedPaths.js +0 -33
  1116. package/templates/node_modules/mongoose/lib/helpers/update/moveImmutableProperties.js +0 -53
  1117. package/templates/node_modules/mongoose/lib/helpers/update/removeUnusedArrayFilters.js +0 -32
  1118. package/templates/node_modules/mongoose/lib/helpers/update/updatedPathsByArrayFilter.js +0 -27
  1119. package/templates/node_modules/mongoose/lib/helpers/updateValidators.js +0 -193
  1120. package/templates/node_modules/mongoose/lib/index.js +0 -17
  1121. package/templates/node_modules/mongoose/lib/internal.js +0 -46
  1122. package/templates/node_modules/mongoose/lib/model.js +0 -5021
  1123. package/templates/node_modules/mongoose/lib/modifiedPathsSnapshot.js +0 -9
  1124. package/templates/node_modules/mongoose/lib/mongoose.js +0 -1411
  1125. package/templates/node_modules/mongoose/lib/options/populateOptions.js +0 -36
  1126. package/templates/node_modules/mongoose/lib/options/propertyOptions.js +0 -8
  1127. package/templates/node_modules/mongoose/lib/options/saveOptions.js +0 -16
  1128. package/templates/node_modules/mongoose/lib/options/schemaArrayOptions.js +0 -78
  1129. package/templates/node_modules/mongoose/lib/options/schemaBufferOptions.js +0 -38
  1130. package/templates/node_modules/mongoose/lib/options/schemaDateOptions.js +0 -71
  1131. package/templates/node_modules/mongoose/lib/options/schemaDocumentArrayOptions.js +0 -68
  1132. package/templates/node_modules/mongoose/lib/options/schemaMapOptions.js +0 -43
  1133. package/templates/node_modules/mongoose/lib/options/schemaNumberOptions.js +0 -101
  1134. package/templates/node_modules/mongoose/lib/options/schemaObjectIdOptions.js +0 -64
  1135. package/templates/node_modules/mongoose/lib/options/schemaStringOptions.js +0 -138
  1136. package/templates/node_modules/mongoose/lib/options/schemaSubdocumentOptions.js +0 -66
  1137. package/templates/node_modules/mongoose/lib/options/schemaTypeOptions.js +0 -244
  1138. package/templates/node_modules/mongoose/lib/options/schemaUnionOptions.js +0 -32
  1139. package/templates/node_modules/mongoose/lib/options/virtualOptions.js +0 -164
  1140. package/templates/node_modules/mongoose/lib/options.js +0 -17
  1141. package/templates/node_modules/mongoose/lib/plugins/index.js +0 -6
  1142. package/templates/node_modules/mongoose/lib/plugins/saveSubdocs.js +0 -75
  1143. package/templates/node_modules/mongoose/lib/plugins/sharding.js +0 -84
  1144. package/templates/node_modules/mongoose/lib/plugins/trackTransaction.js +0 -85
  1145. package/templates/node_modules/mongoose/lib/plugins/validateBeforeSave.js +0 -41
  1146. package/templates/node_modules/mongoose/lib/query.js +0 -5649
  1147. package/templates/node_modules/mongoose/lib/queryHelpers.js +0 -390
  1148. package/templates/node_modules/mongoose/lib/schema/array.js +0 -701
  1149. package/templates/node_modules/mongoose/lib/schema/bigint.js +0 -282
  1150. package/templates/node_modules/mongoose/lib/schema/boolean.js +0 -332
  1151. package/templates/node_modules/mongoose/lib/schema/buffer.js +0 -343
  1152. package/templates/node_modules/mongoose/lib/schema/date.js +0 -467
  1153. package/templates/node_modules/mongoose/lib/schema/decimal128.js +0 -263
  1154. package/templates/node_modules/mongoose/lib/schema/documentArray.js +0 -664
  1155. package/templates/node_modules/mongoose/lib/schema/documentArrayElement.js +0 -107
  1156. package/templates/node_modules/mongoose/lib/schema/double.js +0 -246
  1157. package/templates/node_modules/mongoose/lib/schema/index.js +0 -31
  1158. package/templates/node_modules/mongoose/lib/schema/int32.js +0 -289
  1159. package/templates/node_modules/mongoose/lib/schema/map.js +0 -201
  1160. package/templates/node_modules/mongoose/lib/schema/mixed.js +0 -146
  1161. package/templates/node_modules/mongoose/lib/schema/number.js +0 -492
  1162. package/templates/node_modules/mongoose/lib/schema/objectId.js +0 -333
  1163. package/templates/node_modules/mongoose/lib/schema/operators/bitwise.js +0 -38
  1164. package/templates/node_modules/mongoose/lib/schema/operators/exists.js +0 -12
  1165. package/templates/node_modules/mongoose/lib/schema/operators/geospatial.js +0 -107
  1166. package/templates/node_modules/mongoose/lib/schema/operators/helpers.js +0 -32
  1167. package/templates/node_modules/mongoose/lib/schema/operators/text.js +0 -39
  1168. package/templates/node_modules/mongoose/lib/schema/operators/type.js +0 -20
  1169. package/templates/node_modules/mongoose/lib/schema/string.js +0 -733
  1170. package/templates/node_modules/mongoose/lib/schema/subdocument.js +0 -439
  1171. package/templates/node_modules/mongoose/lib/schema/symbols.js +0 -5
  1172. package/templates/node_modules/mongoose/lib/schema/union.js +0 -113
  1173. package/templates/node_modules/mongoose/lib/schema/uuid.js +0 -305
  1174. package/templates/node_modules/mongoose/lib/schema.js +0 -3227
  1175. package/templates/node_modules/mongoose/lib/schemaType.js +0 -1835
  1176. package/templates/node_modules/mongoose/lib/stateMachine.js +0 -232
  1177. package/templates/node_modules/mongoose/lib/types/array/index.js +0 -119
  1178. package/templates/node_modules/mongoose/lib/types/array/isMongooseArray.js +0 -5
  1179. package/templates/node_modules/mongoose/lib/types/array/methods/index.js +0 -1065
  1180. package/templates/node_modules/mongoose/lib/types/arraySubdocument.js +0 -197
  1181. package/templates/node_modules/mongoose/lib/types/buffer.js +0 -294
  1182. package/templates/node_modules/mongoose/lib/types/decimal128.js +0 -13
  1183. package/templates/node_modules/mongoose/lib/types/documentArray/index.js +0 -113
  1184. package/templates/node_modules/mongoose/lib/types/documentArray/isMongooseDocumentArray.js +0 -5
  1185. package/templates/node_modules/mongoose/lib/types/documentArray/methods/index.js +0 -415
  1186. package/templates/node_modules/mongoose/lib/types/double.js +0 -13
  1187. package/templates/node_modules/mongoose/lib/types/index.js +0 -23
  1188. package/templates/node_modules/mongoose/lib/types/map.js +0 -419
  1189. package/templates/node_modules/mongoose/lib/types/objectid.js +0 -41
  1190. package/templates/node_modules/mongoose/lib/types/subdocument.js +0 -454
  1191. package/templates/node_modules/mongoose/lib/types/uuid.js +0 -13
  1192. package/templates/node_modules/mongoose/lib/utils.js +0 -1038
  1193. package/templates/node_modules/mongoose/lib/validOptions.js +0 -42
  1194. package/templates/node_modules/mongoose/lib/virtualType.js +0 -204
  1195. package/templates/node_modules/mongoose/package.json +0 -143
  1196. package/templates/node_modules/mongoose/types/aggregate.d.ts +0 -180
  1197. package/templates/node_modules/mongoose/types/augmentations.d.ts +0 -9
  1198. package/templates/node_modules/mongoose/types/callback.d.ts +0 -8
  1199. package/templates/node_modules/mongoose/types/collection.d.ts +0 -49
  1200. package/templates/node_modules/mongoose/types/connection.d.ts +0 -297
  1201. package/templates/node_modules/mongoose/types/cursor.d.ts +0 -67
  1202. package/templates/node_modules/mongoose/types/document.d.ts +0 -374
  1203. package/templates/node_modules/mongoose/types/error.d.ts +0 -143
  1204. package/templates/node_modules/mongoose/types/expressions.d.ts +0 -3053
  1205. package/templates/node_modules/mongoose/types/helpers.d.ts +0 -32
  1206. package/templates/node_modules/mongoose/types/index.d.ts +0 -1046
  1207. package/templates/node_modules/mongoose/types/indexes.d.ts +0 -97
  1208. package/templates/node_modules/mongoose/types/inferhydrateddoctype.d.ts +0 -115
  1209. package/templates/node_modules/mongoose/types/inferrawdoctype.d.ts +0 -135
  1210. package/templates/node_modules/mongoose/types/inferschematype.d.ts +0 -337
  1211. package/templates/node_modules/mongoose/types/middlewares.d.ts +0 -48
  1212. package/templates/node_modules/mongoose/types/models.d.ts +0 -1291
  1213. package/templates/node_modules/mongoose/types/mongooseoptions.d.ts +0 -228
  1214. package/templates/node_modules/mongoose/types/pipelinestage.d.ts +0 -333
  1215. package/templates/node_modules/mongoose/types/populate.d.ts +0 -53
  1216. package/templates/node_modules/mongoose/types/query.d.ts +0 -934
  1217. package/templates/node_modules/mongoose/types/schemaoptions.d.ts +0 -280
  1218. package/templates/node_modules/mongoose/types/schematypes.d.ts +0 -645
  1219. package/templates/node_modules/mongoose/types/session.d.ts +0 -32
  1220. package/templates/node_modules/mongoose/types/types.d.ts +0 -109
  1221. package/templates/node_modules/mongoose/types/utility.d.ts +0 -175
  1222. package/templates/node_modules/mongoose/types/validation.d.ts +0 -39
  1223. package/templates/node_modules/mongoose/types/virtuals.d.ts +0 -14
  1224. package/templates/node_modules/morgan/HISTORY.md +0 -221
  1225. package/templates/node_modules/morgan/LICENSE +0 -23
  1226. package/templates/node_modules/morgan/README.md +0 -436
  1227. package/templates/node_modules/morgan/index.js +0 -544
  1228. package/templates/node_modules/morgan/node_modules/debug/.coveralls.yml +0 -1
  1229. package/templates/node_modules/morgan/node_modules/debug/.eslintrc +0 -11
  1230. package/templates/node_modules/morgan/node_modules/debug/.travis.yml +0 -14
  1231. package/templates/node_modules/morgan/node_modules/debug/CHANGELOG.md +0 -362
  1232. package/templates/node_modules/morgan/node_modules/debug/LICENSE +0 -19
  1233. package/templates/node_modules/morgan/node_modules/debug/Makefile +0 -50
  1234. package/templates/node_modules/morgan/node_modules/debug/README.md +0 -312
  1235. package/templates/node_modules/morgan/node_modules/debug/component.json +0 -19
  1236. package/templates/node_modules/morgan/node_modules/debug/karma.conf.js +0 -70
  1237. package/templates/node_modules/morgan/node_modules/debug/node.js +0 -1
  1238. package/templates/node_modules/morgan/node_modules/debug/package.json +0 -49
  1239. package/templates/node_modules/morgan/node_modules/debug/src/browser.js +0 -185
  1240. package/templates/node_modules/morgan/node_modules/debug/src/debug.js +0 -202
  1241. package/templates/node_modules/morgan/node_modules/debug/src/index.js +0 -10
  1242. package/templates/node_modules/morgan/node_modules/debug/src/inspector-log.js +0 -15
  1243. package/templates/node_modules/morgan/node_modules/debug/src/node.js +0 -248
  1244. package/templates/node_modules/morgan/node_modules/ms/index.js +0 -152
  1245. package/templates/node_modules/morgan/node_modules/ms/license.md +0 -21
  1246. package/templates/node_modules/morgan/node_modules/ms/package.json +0 -37
  1247. package/templates/node_modules/morgan/node_modules/ms/readme.md +0 -51
  1248. package/templates/node_modules/morgan/node_modules/on-finished/HISTORY.md +0 -88
  1249. package/templates/node_modules/morgan/node_modules/on-finished/LICENSE +0 -23
  1250. package/templates/node_modules/morgan/node_modules/on-finished/README.md +0 -154
  1251. package/templates/node_modules/morgan/node_modules/on-finished/index.js +0 -196
  1252. package/templates/node_modules/morgan/node_modules/on-finished/package.json +0 -31
  1253. package/templates/node_modules/morgan/package.json +0 -52
  1254. package/templates/node_modules/mpath/.travis.yml +0 -9
  1255. package/templates/node_modules/mpath/History.md +0 -88
  1256. package/templates/node_modules/mpath/LICENSE +0 -22
  1257. package/templates/node_modules/mpath/README.md +0 -278
  1258. package/templates/node_modules/mpath/SECURITY.md +0 -5
  1259. package/templates/node_modules/mpath/index.js +0 -3
  1260. package/templates/node_modules/mpath/lib/index.js +0 -336
  1261. package/templates/node_modules/mpath/lib/stringToParts.js +0 -48
  1262. package/templates/node_modules/mpath/package.json +0 -144
  1263. package/templates/node_modules/mpath/test/.eslintrc.yml +0 -4
  1264. package/templates/node_modules/mpath/test/index.js +0 -1879
  1265. package/templates/node_modules/mpath/test/stringToParts.js +0 -30
  1266. package/templates/node_modules/mquery/.github/ISSUE_TEMPLATE.md +0 -11
  1267. package/templates/node_modules/mquery/.github/PULL_REQUEST_TEMPLATE.md +0 -9
  1268. package/templates/node_modules/mquery/History.md +0 -393
  1269. package/templates/node_modules/mquery/LICENSE +0 -22
  1270. package/templates/node_modules/mquery/README.md +0 -1387
  1271. package/templates/node_modules/mquery/SECURITY.md +0 -1
  1272. package/templates/node_modules/mquery/lib/collection/collection.js +0 -47
  1273. package/templates/node_modules/mquery/lib/collection/index.js +0 -13
  1274. package/templates/node_modules/mquery/lib/collection/node.js +0 -128
  1275. package/templates/node_modules/mquery/lib/env.js +0 -22
  1276. package/templates/node_modules/mquery/lib/mquery.js +0 -2748
  1277. package/templates/node_modules/mquery/lib/permissions.js +0 -93
  1278. package/templates/node_modules/mquery/lib/utils.js +0 -297
  1279. package/templates/node_modules/mquery/package.json +0 -35
  1280. package/templates/node_modules/ms/index.js +0 -162
  1281. package/templates/node_modules/ms/license.md +0 -21
  1282. package/templates/node_modules/ms/package.json +0 -38
  1283. package/templates/node_modules/ms/readme.md +0 -59
  1284. package/templates/node_modules/negotiator/HISTORY.md +0 -114
  1285. package/templates/node_modules/negotiator/LICENSE +0 -24
  1286. package/templates/node_modules/negotiator/README.md +0 -212
  1287. package/templates/node_modules/negotiator/index.js +0 -83
  1288. package/templates/node_modules/negotiator/lib/charset.js +0 -169
  1289. package/templates/node_modules/negotiator/lib/encoding.js +0 -205
  1290. package/templates/node_modules/negotiator/lib/language.js +0 -179
  1291. package/templates/node_modules/negotiator/lib/mediaType.js +0 -294
  1292. package/templates/node_modules/negotiator/package.json +0 -43
  1293. package/templates/node_modules/object-inspect/.eslintrc +0 -53
  1294. package/templates/node_modules/object-inspect/.github/FUNDING.yml +0 -12
  1295. package/templates/node_modules/object-inspect/.nycrc +0 -13
  1296. package/templates/node_modules/object-inspect/CHANGELOG.md +0 -424
  1297. package/templates/node_modules/object-inspect/LICENSE +0 -21
  1298. package/templates/node_modules/object-inspect/example/all.js +0 -23
  1299. package/templates/node_modules/object-inspect/example/circular.js +0 -6
  1300. package/templates/node_modules/object-inspect/example/fn.js +0 -5
  1301. package/templates/node_modules/object-inspect/example/inspect.js +0 -10
  1302. package/templates/node_modules/object-inspect/index.js +0 -544
  1303. package/templates/node_modules/object-inspect/package-support.json +0 -20
  1304. package/templates/node_modules/object-inspect/package.json +0 -105
  1305. package/templates/node_modules/object-inspect/readme.markdown +0 -84
  1306. package/templates/node_modules/object-inspect/test/bigint.js +0 -58
  1307. package/templates/node_modules/object-inspect/test/browser/dom.js +0 -15
  1308. package/templates/node_modules/object-inspect/test/circular.js +0 -16
  1309. package/templates/node_modules/object-inspect/test/deep.js +0 -12
  1310. package/templates/node_modules/object-inspect/test/element.js +0 -53
  1311. package/templates/node_modules/object-inspect/test/err.js +0 -48
  1312. package/templates/node_modules/object-inspect/test/fakes.js +0 -29
  1313. package/templates/node_modules/object-inspect/test/fn.js +0 -76
  1314. package/templates/node_modules/object-inspect/test/global.js +0 -17
  1315. package/templates/node_modules/object-inspect/test/has.js +0 -15
  1316. package/templates/node_modules/object-inspect/test/holes.js +0 -15
  1317. package/templates/node_modules/object-inspect/test/indent-option.js +0 -271
  1318. package/templates/node_modules/object-inspect/test/inspect.js +0 -139
  1319. package/templates/node_modules/object-inspect/test/lowbyte.js +0 -12
  1320. package/templates/node_modules/object-inspect/test/number.js +0 -58
  1321. package/templates/node_modules/object-inspect/test/quoteStyle.js +0 -26
  1322. package/templates/node_modules/object-inspect/test/toStringTag.js +0 -40
  1323. package/templates/node_modules/object-inspect/test/undef.js +0 -12
  1324. package/templates/node_modules/object-inspect/test/values.js +0 -261
  1325. package/templates/node_modules/object-inspect/test-core-js.js +0 -26
  1326. package/templates/node_modules/object-inspect/util.inspect.js +0 -1
  1327. package/templates/node_modules/on-finished/HISTORY.md +0 -98
  1328. package/templates/node_modules/on-finished/LICENSE +0 -23
  1329. package/templates/node_modules/on-finished/README.md +0 -162
  1330. package/templates/node_modules/on-finished/index.js +0 -234
  1331. package/templates/node_modules/on-finished/package.json +0 -39
  1332. package/templates/node_modules/on-headers/HISTORY.md +0 -26
  1333. package/templates/node_modules/on-headers/LICENSE +0 -22
  1334. package/templates/node_modules/on-headers/README.md +0 -81
  1335. package/templates/node_modules/on-headers/index.js +0 -180
  1336. package/templates/node_modules/on-headers/package.json +0 -44
  1337. package/templates/node_modules/once/LICENSE +0 -15
  1338. package/templates/node_modules/once/README.md +0 -79
  1339. package/templates/node_modules/once/once.js +0 -42
  1340. package/templates/node_modules/once/package.json +0 -33
  1341. package/templates/node_modules/parseurl/HISTORY.md +0 -58
  1342. package/templates/node_modules/parseurl/LICENSE +0 -24
  1343. package/templates/node_modules/parseurl/README.md +0 -133
  1344. package/templates/node_modules/parseurl/index.js +0 -158
  1345. package/templates/node_modules/parseurl/package.json +0 -40
  1346. package/templates/node_modules/path-to-regexp/LICENSE +0 -21
  1347. package/templates/node_modules/path-to-regexp/Readme.md +0 -224
  1348. package/templates/node_modules/path-to-regexp/dist/index.d.ts +0 -144
  1349. package/templates/node_modules/path-to-regexp/dist/index.js +0 -409
  1350. package/templates/node_modules/path-to-regexp/dist/index.js.map +0 -1
  1351. package/templates/node_modules/path-to-regexp/package.json +0 -64
  1352. package/templates/node_modules/proxy-addr/HISTORY.md +0 -161
  1353. package/templates/node_modules/proxy-addr/LICENSE +0 -22
  1354. package/templates/node_modules/proxy-addr/README.md +0 -139
  1355. package/templates/node_modules/proxy-addr/index.js +0 -327
  1356. package/templates/node_modules/proxy-addr/package.json +0 -47
  1357. package/templates/node_modules/punycode/LICENSE-MIT.txt +0 -20
  1358. package/templates/node_modules/punycode/README.md +0 -148
  1359. package/templates/node_modules/punycode/package.json +0 -58
  1360. package/templates/node_modules/punycode/punycode.es6.js +0 -444
  1361. package/templates/node_modules/punycode/punycode.js +0 -443
  1362. package/templates/node_modules/qs/.editorconfig +0 -46
  1363. package/templates/node_modules/qs/.eslintrc +0 -39
  1364. package/templates/node_modules/qs/.github/FUNDING.yml +0 -12
  1365. package/templates/node_modules/qs/.nycrc +0 -13
  1366. package/templates/node_modules/qs/CHANGELOG.md +0 -622
  1367. package/templates/node_modules/qs/LICENSE.md +0 -29
  1368. package/templates/node_modules/qs/README.md +0 -733
  1369. package/templates/node_modules/qs/dist/qs.js +0 -141
  1370. package/templates/node_modules/qs/lib/formats.js +0 -23
  1371. package/templates/node_modules/qs/lib/index.js +0 -11
  1372. package/templates/node_modules/qs/lib/parse.js +0 -328
  1373. package/templates/node_modules/qs/lib/stringify.js +0 -356
  1374. package/templates/node_modules/qs/lib/utils.js +0 -268
  1375. package/templates/node_modules/qs/package.json +0 -93
  1376. package/templates/node_modules/qs/test/empty-keys-cases.js +0 -267
  1377. package/templates/node_modules/qs/test/parse.js +0 -1276
  1378. package/templates/node_modules/qs/test/stringify.js +0 -1306
  1379. package/templates/node_modules/qs/test/utils.js +0 -262
  1380. package/templates/node_modules/range-parser/HISTORY.md +0 -56
  1381. package/templates/node_modules/range-parser/LICENSE +0 -23
  1382. package/templates/node_modules/range-parser/README.md +0 -84
  1383. package/templates/node_modules/range-parser/index.js +0 -162
  1384. package/templates/node_modules/range-parser/package.json +0 -44
  1385. package/templates/node_modules/raw-body/LICENSE +0 -22
  1386. package/templates/node_modules/raw-body/README.md +0 -223
  1387. package/templates/node_modules/raw-body/index.d.ts +0 -85
  1388. package/templates/node_modules/raw-body/index.js +0 -336
  1389. package/templates/node_modules/raw-body/package.json +0 -46
  1390. package/templates/node_modules/router/HISTORY.md +0 -228
  1391. package/templates/node_modules/router/LICENSE +0 -23
  1392. package/templates/node_modules/router/README.md +0 -416
  1393. package/templates/node_modules/router/index.js +0 -748
  1394. package/templates/node_modules/router/lib/layer.js +0 -247
  1395. package/templates/node_modules/router/lib/route.js +0 -242
  1396. package/templates/node_modules/router/package.json +0 -44
  1397. package/templates/node_modules/safe-buffer/LICENSE +0 -21
  1398. package/templates/node_modules/safe-buffer/README.md +0 -584
  1399. package/templates/node_modules/safe-buffer/index.d.ts +0 -187
  1400. package/templates/node_modules/safe-buffer/index.js +0 -62
  1401. package/templates/node_modules/safe-buffer/package.json +0 -37
  1402. package/templates/node_modules/safer-buffer/LICENSE +0 -21
  1403. package/templates/node_modules/safer-buffer/Porting-Buffer.md +0 -268
  1404. package/templates/node_modules/safer-buffer/Readme.md +0 -156
  1405. package/templates/node_modules/safer-buffer/dangerous.js +0 -58
  1406. package/templates/node_modules/safer-buffer/package.json +0 -34
  1407. package/templates/node_modules/safer-buffer/safer.js +0 -77
  1408. package/templates/node_modules/safer-buffer/tests.js +0 -406
  1409. package/templates/node_modules/send/LICENSE +0 -23
  1410. package/templates/node_modules/send/README.md +0 -317
  1411. package/templates/node_modules/send/index.js +0 -997
  1412. package/templates/node_modules/send/package.json +0 -63
  1413. package/templates/node_modules/serve-static/LICENSE +0 -25
  1414. package/templates/node_modules/serve-static/README.md +0 -253
  1415. package/templates/node_modules/serve-static/index.js +0 -208
  1416. package/templates/node_modules/serve-static/package.json +0 -44
  1417. package/templates/node_modules/setprototypeof/LICENSE +0 -13
  1418. package/templates/node_modules/setprototypeof/README.md +0 -31
  1419. package/templates/node_modules/setprototypeof/index.d.ts +0 -2
  1420. package/templates/node_modules/setprototypeof/index.js +0 -17
  1421. package/templates/node_modules/setprototypeof/package.json +0 -38
  1422. package/templates/node_modules/setprototypeof/test/index.js +0 -24
  1423. package/templates/node_modules/side-channel/.editorconfig +0 -9
  1424. package/templates/node_modules/side-channel/.eslintrc +0 -12
  1425. package/templates/node_modules/side-channel/.github/FUNDING.yml +0 -12
  1426. package/templates/node_modules/side-channel/.nycrc +0 -13
  1427. package/templates/node_modules/side-channel/CHANGELOG.md +0 -110
  1428. package/templates/node_modules/side-channel/LICENSE +0 -21
  1429. package/templates/node_modules/side-channel/README.md +0 -61
  1430. package/templates/node_modules/side-channel/index.d.ts +0 -14
  1431. package/templates/node_modules/side-channel/index.js +0 -43
  1432. package/templates/node_modules/side-channel/package.json +0 -85
  1433. package/templates/node_modules/side-channel/test/index.js +0 -104
  1434. package/templates/node_modules/side-channel/tsconfig.json +0 -9
  1435. package/templates/node_modules/side-channel-list/.editorconfig +0 -9
  1436. package/templates/node_modules/side-channel-list/.eslintrc +0 -11
  1437. package/templates/node_modules/side-channel-list/.github/FUNDING.yml +0 -12
  1438. package/templates/node_modules/side-channel-list/.nycrc +0 -13
  1439. package/templates/node_modules/side-channel-list/CHANGELOG.md +0 -15
  1440. package/templates/node_modules/side-channel-list/LICENSE +0 -21
  1441. package/templates/node_modules/side-channel-list/README.md +0 -62
  1442. package/templates/node_modules/side-channel-list/index.d.ts +0 -13
  1443. package/templates/node_modules/side-channel-list/index.js +0 -113
  1444. package/templates/node_modules/side-channel-list/list.d.ts +0 -14
  1445. package/templates/node_modules/side-channel-list/package.json +0 -77
  1446. package/templates/node_modules/side-channel-list/test/index.js +0 -104
  1447. package/templates/node_modules/side-channel-list/tsconfig.json +0 -9
  1448. package/templates/node_modules/side-channel-map/.editorconfig +0 -9
  1449. package/templates/node_modules/side-channel-map/.eslintrc +0 -11
  1450. package/templates/node_modules/side-channel-map/.github/FUNDING.yml +0 -12
  1451. package/templates/node_modules/side-channel-map/.nycrc +0 -13
  1452. package/templates/node_modules/side-channel-map/CHANGELOG.md +0 -22
  1453. package/templates/node_modules/side-channel-map/LICENSE +0 -21
  1454. package/templates/node_modules/side-channel-map/README.md +0 -62
  1455. package/templates/node_modules/side-channel-map/index.d.ts +0 -15
  1456. package/templates/node_modules/side-channel-map/index.js +0 -68
  1457. package/templates/node_modules/side-channel-map/package.json +0 -80
  1458. package/templates/node_modules/side-channel-map/test/index.js +0 -114
  1459. package/templates/node_modules/side-channel-map/tsconfig.json +0 -9
  1460. package/templates/node_modules/side-channel-weakmap/.editorconfig +0 -9
  1461. package/templates/node_modules/side-channel-weakmap/.eslintrc +0 -12
  1462. package/templates/node_modules/side-channel-weakmap/.github/FUNDING.yml +0 -12
  1463. package/templates/node_modules/side-channel-weakmap/.nycrc +0 -13
  1464. package/templates/node_modules/side-channel-weakmap/CHANGELOG.md +0 -28
  1465. package/templates/node_modules/side-channel-weakmap/LICENSE +0 -21
  1466. package/templates/node_modules/side-channel-weakmap/README.md +0 -62
  1467. package/templates/node_modules/side-channel-weakmap/index.d.ts +0 -15
  1468. package/templates/node_modules/side-channel-weakmap/index.js +0 -84
  1469. package/templates/node_modules/side-channel-weakmap/package.json +0 -87
  1470. package/templates/node_modules/side-channel-weakmap/test/index.js +0 -114
  1471. package/templates/node_modules/side-channel-weakmap/tsconfig.json +0 -9
  1472. package/templates/node_modules/sift/MIT-LICENSE.txt +0 -20
  1473. package/templates/node_modules/sift/README.md +0 -465
  1474. package/templates/node_modules/sift/es/index.js +0 -632
  1475. package/templates/node_modules/sift/es/index.js.map +0 -1
  1476. package/templates/node_modules/sift/es5m/index.js +0 -743
  1477. package/templates/node_modules/sift/es5m/index.js.map +0 -1
  1478. package/templates/node_modules/sift/index.d.ts +0 -4
  1479. package/templates/node_modules/sift/index.js +0 -4
  1480. package/templates/node_modules/sift/lib/core.d.ts +0 -116
  1481. package/templates/node_modules/sift/lib/index.d.ts +0 -6
  1482. package/templates/node_modules/sift/lib/index.js +0 -781
  1483. package/templates/node_modules/sift/lib/index.js.map +0 -1
  1484. package/templates/node_modules/sift/lib/operations.d.ts +0 -88
  1485. package/templates/node_modules/sift/lib/utils.d.ts +0 -11
  1486. package/templates/node_modules/sift/package.json +0 -61
  1487. package/templates/node_modules/sift/sift.csp.min.js +0 -778
  1488. package/templates/node_modules/sift/sift.csp.min.js.map +0 -1
  1489. package/templates/node_modules/sift/sift.min.js +0 -2
  1490. package/templates/node_modules/sift/sift.min.js.map +0 -1
  1491. package/templates/node_modules/sift/src/core.ts +0 -494
  1492. package/templates/node_modules/sift/src/index.ts +0 -54
  1493. package/templates/node_modules/sift/src/operations.ts +0 -422
  1494. package/templates/node_modules/sift/src/utils.ts +0 -74
  1495. package/templates/node_modules/sparse-bitfield/.travis.yml +0 -6
  1496. package/templates/node_modules/sparse-bitfield/LICENSE +0 -21
  1497. package/templates/node_modules/sparse-bitfield/README.md +0 -62
  1498. package/templates/node_modules/sparse-bitfield/index.js +0 -95
  1499. package/templates/node_modules/sparse-bitfield/package.json +0 -27
  1500. package/templates/node_modules/sparse-bitfield/test.js +0 -79
  1501. package/templates/node_modules/statuses/HISTORY.md +0 -87
  1502. package/templates/node_modules/statuses/LICENSE +0 -23
  1503. package/templates/node_modules/statuses/README.md +0 -139
  1504. package/templates/node_modules/statuses/codes.json +0 -65
  1505. package/templates/node_modules/statuses/index.js +0 -146
  1506. package/templates/node_modules/statuses/package.json +0 -49
  1507. package/templates/node_modules/toidentifier/HISTORY.md +0 -9
  1508. package/templates/node_modules/toidentifier/LICENSE +0 -21
  1509. package/templates/node_modules/toidentifier/README.md +0 -61
  1510. package/templates/node_modules/toidentifier/index.js +0 -32
  1511. package/templates/node_modules/toidentifier/package.json +0 -38
  1512. package/templates/node_modules/tr46/LICENSE.md +0 -21
  1513. package/templates/node_modules/tr46/README.md +0 -76
  1514. package/templates/node_modules/tr46/index.js +0 -344
  1515. package/templates/node_modules/tr46/lib/mappingTable.json +0 -1
  1516. package/templates/node_modules/tr46/lib/regexes.js +0 -29
  1517. package/templates/node_modules/tr46/lib/statusMapping.js +0 -9
  1518. package/templates/node_modules/tr46/package.json +0 -44
  1519. package/templates/node_modules/type-is/HISTORY.md +0 -292
  1520. package/templates/node_modules/type-is/LICENSE +0 -23
  1521. package/templates/node_modules/type-is/README.md +0 -198
  1522. package/templates/node_modules/type-is/index.js +0 -250
  1523. package/templates/node_modules/type-is/package.json +0 -47
  1524. package/templates/node_modules/unpipe/HISTORY.md +0 -4
  1525. package/templates/node_modules/unpipe/LICENSE +0 -22
  1526. package/templates/node_modules/unpipe/README.md +0 -43
  1527. package/templates/node_modules/unpipe/index.js +0 -69
  1528. package/templates/node_modules/unpipe/package.json +0 -27
  1529. package/templates/node_modules/vary/HISTORY.md +0 -39
  1530. package/templates/node_modules/vary/LICENSE +0 -22
  1531. package/templates/node_modules/vary/README.md +0 -101
  1532. package/templates/node_modules/vary/index.js +0 -149
  1533. package/templates/node_modules/vary/package.json +0 -43
  1534. package/templates/node_modules/webidl-conversions/LICENSE.md +0 -12
  1535. package/templates/node_modules/webidl-conversions/README.md +0 -99
  1536. package/templates/node_modules/webidl-conversions/lib/index.js +0 -450
  1537. package/templates/node_modules/webidl-conversions/package.json +0 -35
  1538. package/templates/node_modules/whatwg-url/LICENSE.txt +0 -21
  1539. package/templates/node_modules/whatwg-url/README.md +0 -106
  1540. package/templates/node_modules/whatwg-url/index.js +0 -27
  1541. package/templates/node_modules/whatwg-url/lib/Function.js +0 -42
  1542. package/templates/node_modules/whatwg-url/lib/URL-impl.js +0 -233
  1543. package/templates/node_modules/whatwg-url/lib/URL.js +0 -499
  1544. package/templates/node_modules/whatwg-url/lib/URLSearchParams-impl.js +0 -135
  1545. package/templates/node_modules/whatwg-url/lib/URLSearchParams.js +0 -505
  1546. package/templates/node_modules/whatwg-url/lib/VoidFunction.js +0 -26
  1547. package/templates/node_modules/whatwg-url/lib/encoding.js +0 -16
  1548. package/templates/node_modules/whatwg-url/lib/infra.js +0 -26
  1549. package/templates/node_modules/whatwg-url/lib/percent-encoding.js +0 -142
  1550. package/templates/node_modules/whatwg-url/lib/url-state-machine.js +0 -1274
  1551. package/templates/node_modules/whatwg-url/lib/urlencoded.js +0 -89
  1552. package/templates/node_modules/whatwg-url/lib/utils.js +0 -190
  1553. package/templates/node_modules/whatwg-url/package.json +0 -53
  1554. package/templates/node_modules/whatwg-url/webidl2js-wrapper.js +0 -7
  1555. package/templates/node_modules/wrappy/LICENSE +0 -15
  1556. package/templates/node_modules/wrappy/README.md +0 -36
  1557. package/templates/node_modules/wrappy/package.json +0 -29
  1558. package/templates/node_modules/wrappy/wrappy.js +0 -33
  1559. package/templates/package-lock.json +0 -1139
  1560. package/templates/package.json +0 -20
  1561. /package/templates/controllers/{users.routes.js → index.routes.js} +0 -0
@@ -1,2748 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Dependencies
5
- */
6
-
7
- const assert = require('assert');
8
- const util = require('util');
9
- const utils = require('./utils');
10
-
11
- const debug = util.debuglog('mquery');
12
-
13
- /**
14
- * Query constructor used for building queries.
15
- *
16
- * #### Example:
17
- *
18
- * var query = new Query({ name: 'mquery' });
19
- * query.setOptions({ collection: moduleCollection })
20
- * await query.where('age').gte(21).exec();
21
- *
22
- * @param {Object} [criteria] criteria for the query OR the collection instance to use
23
- * @param {Object} [options]
24
- * @api public
25
- */
26
-
27
- function Query(criteria, options) {
28
- if (!(this instanceof Query))
29
- return new Query(criteria, options);
30
-
31
- const proto = this.constructor.prototype;
32
-
33
- this.op = proto.op || undefined;
34
-
35
- this.options = Object.assign({}, proto.options);
36
-
37
- this._conditions = proto._conditions
38
- ? utils.clone(proto._conditions)
39
- : {};
40
-
41
- this._fields = proto._fields
42
- ? utils.clone(proto._fields)
43
- : undefined;
44
-
45
- this._updateDoc = proto._updateDoc
46
- ? utils.clone(proto._updateDoc)
47
- : undefined;
48
-
49
- this._path = proto._path || undefined;
50
- this._distinctDoc = proto._distinctDoc || undefined;
51
- this._collection = proto._collection || undefined;
52
- this._traceFunction = proto._traceFunction || undefined;
53
-
54
- if (options) {
55
- this.setOptions(options);
56
- }
57
-
58
- if (criteria) {
59
- this.find(criteria);
60
- }
61
- }
62
-
63
- /**
64
- * Converts this query to a constructor function with all arguments and options retained.
65
- *
66
- * #### Example:
67
- *
68
- * // Create a query that will read documents with a "video" category from
69
- * // `aCollection` on the primary node in the replica-set unless it is down,
70
- * // in which case we'll read from a secondary node.
71
- * var query = mquery({ category: 'video' })
72
- * query.setOptions({ collection: aCollection, read: 'primaryPreferred' });
73
- *
74
- * // create a constructor based off these settings
75
- * var Video = query.toConstructor();
76
- *
77
- * // Video is now a subclass of mquery() and works the same way but with the
78
- * // default query parameters and options set.
79
- *
80
- * // run a query with the previous settings but filter for movies with names
81
- * // that start with "Life".
82
- * Video().where({ name: /^Life/ }).exec(cb);
83
- *
84
- * @return {Query} new Query
85
- * @api public
86
- */
87
-
88
- Query.prototype.toConstructor = function toConstructor() {
89
- function CustomQuery(criteria, options) {
90
- if (!(this instanceof CustomQuery))
91
- return new CustomQuery(criteria, options);
92
- Query.call(this, criteria, options);
93
- }
94
-
95
- utils.inherits(CustomQuery, Query);
96
-
97
- // set inherited defaults
98
- const p = CustomQuery.prototype;
99
-
100
- p.options = {};
101
- p.setOptions(this.options);
102
-
103
- p.op = this.op;
104
- p._conditions = utils.clone(this._conditions);
105
- p._fields = utils.clone(this._fields);
106
- p._updateDoc = utils.clone(this._updateDoc);
107
- p._path = this._path;
108
- p._distinctDoc = this._distinctDoc;
109
- p._collection = this._collection;
110
- p._traceFunction = this._traceFunction;
111
-
112
- return CustomQuery;
113
- };
114
-
115
- /**
116
- * Sets query options.
117
- *
118
- * #### Options:
119
- *
120
- * - [tailable](http://www.mongodb.org/display/DOCS/Tailable+Cursors) *
121
- * - [sort](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bsort(\)%7D%7D) *
122
- * - [limit](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Blimit%28%29%7D%7D) *
123
- * - [skip](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bskip%28%29%7D%7D) *
124
- * - [maxTime](http://docs.mongodb.org/manual/reference/operator/meta/maxTimeMS/#op._S_maxTimeMS) *
125
- * - [batchSize](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7BbatchSize%28%29%7D%7D) *
126
- * - [comment](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24comment) *
127
- * - [hint](http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24hint) *
128
- * - [slaveOk](http://docs.mongodb.org/manual/applications/replication/#read-preference) *
129
- * - [safe](http://www.mongodb.org/display/DOCS/getLastError+Command)
130
- * - collection the collection to query against
131
- *
132
- * _* denotes a query helper method is also available_
133
- *
134
- * @param {Object} options
135
- * @api public
136
- */
137
-
138
- Query.prototype.setOptions = function(options) {
139
- if (!(options && utils.isObject(options)))
140
- return this;
141
-
142
- // set arbitrary options
143
- const methods = utils.keys(options);
144
- let method;
145
-
146
- for (let i = 0; i < methods.length; ++i) {
147
- method = methods[i];
148
-
149
- // use methods if exist (safer option manipulation)
150
- if ('function' == typeof this[method]) {
151
- const args = Array.isArray(options[method])
152
- ? options[method]
153
- : [options[method]];
154
- this[method].apply(this, args);
155
- } else {
156
- this.options[method] = options[method];
157
- }
158
- }
159
-
160
- return this;
161
- };
162
-
163
- /**
164
- * Sets this Querys collection.
165
- *
166
- * @param {Collection} coll
167
- * @return {Query} this
168
- */
169
-
170
- Query.prototype.collection = function collection(coll) {
171
- this._collection = new Query.Collection(coll);
172
-
173
- return this;
174
- };
175
-
176
- /**
177
- * Adds a collation to this op (MongoDB 3.4 and up)
178
- *
179
- * #### Example:
180
- *
181
- * query.find().collation({ locale: "en_US", strength: 1 })
182
- *
183
- * @param {Object} value
184
- * @return {Query} this
185
- * @see MongoDB docs https://docs.mongodb.com/manual/reference/method/cursor.collation/#cursor.collation
186
- * @api public
187
- */
188
-
189
- Query.prototype.collation = function(value) {
190
- this.options.collation = value;
191
- return this;
192
- };
193
-
194
- /**
195
- * Specifies a `$where` condition
196
- *
197
- * Use `$where` when you need to select documents using a JavaScript expression.
198
- *
199
- * #### Example:
200
- *
201
- * query.$where('this.comments.length > 10 || this.name.length > 5')
202
- *
203
- * query.$where(function () {
204
- * return this.comments.length > 10 || this.name.length > 5;
205
- * })
206
- *
207
- * @param {String|Function} js javascript string or function
208
- * @return {Query} this
209
- * @memberOf Query
210
- * @method $where
211
- * @api public
212
- */
213
-
214
- Query.prototype.$where = function(js) {
215
- this._conditions.$where = js;
216
- return this;
217
- };
218
-
219
- /**
220
- * Specifies a `path` for use with chaining.
221
- *
222
- * #### Example:
223
- *
224
- * // instead of writing:
225
- * await User.find({age: {$gte: 21, $lte: 65}});
226
- *
227
- * // we can instead write:
228
- * User.where('age').gte(21).lte(65);
229
- *
230
- * // passing query conditions is permitted
231
- * User.find().where({ name: 'vonderful' })
232
- *
233
- * // chaining
234
- * await User
235
- * .where('age').gte(21).lte(65)
236
- * .where('name', /^vonderful/i)
237
- * .where('friends').slice(10)
238
- * .exec()
239
- *
240
- * @param {String} [path]
241
- * @param {Object} [val]
242
- * @return {Query} this
243
- * @api public
244
- */
245
-
246
- Query.prototype.where = function() {
247
- if (!arguments.length) return this;
248
- if (!this.op) this.op = 'find';
249
-
250
- const type = typeof arguments[0];
251
-
252
- if ('string' == type) {
253
- this._path = arguments[0];
254
-
255
- if (2 === arguments.length) {
256
- this._conditions[this._path] = arguments[1];
257
- }
258
-
259
- return this;
260
- }
261
-
262
- if ('object' == type && !Array.isArray(arguments[0])) {
263
- return this.merge(arguments[0]);
264
- }
265
-
266
- throw new TypeError('path must be a string or object');
267
- };
268
-
269
- /**
270
- * Specifies the complementary comparison value for paths specified with `where()`
271
- *
272
- * #### Example:
273
- *
274
- * User.where('age').equals(49);
275
- *
276
- * // is the same as
277
- *
278
- * User.where('age', 49);
279
- *
280
- * @param {Object} val
281
- * @return {Query} this
282
- * @api public
283
- */
284
-
285
- Query.prototype.equals = function equals(val) {
286
- this._ensurePath('equals');
287
- const path = this._path;
288
- this._conditions[path] = val;
289
- return this;
290
- };
291
-
292
- /**
293
- * Specifies the complementary comparison value for paths specified with `where()`
294
- * This is alias of `equals`
295
- *
296
- * #### Example:
297
- *
298
- * User.where('age').eq(49);
299
- *
300
- * // is the same as
301
- *
302
- * User.shere('age').equals(49);
303
- *
304
- * // is the same as
305
- *
306
- * User.where('age', 49);
307
- *
308
- * @param {Object} val
309
- * @return {Query} this
310
- * @api public
311
- */
312
-
313
- Query.prototype.eq = function eq(val) {
314
- this._ensurePath('eq');
315
- const path = this._path;
316
- this._conditions[path] = val;
317
- return this;
318
- };
319
-
320
- /**
321
- * Specifies arguments for an `$or` condition.
322
- *
323
- * #### Example:
324
- *
325
- * query.or([{ color: 'red' }, { status: 'emergency' }])
326
- *
327
- * @param {Array} array array of conditions
328
- * @return {Query} this
329
- * @api public
330
- */
331
-
332
- Query.prototype.or = function or(array) {
333
- const or = this._conditions.$or || (this._conditions.$or = []);
334
- if (!Array.isArray(array)) array = [array];
335
- or.push.apply(or, array);
336
- return this;
337
- };
338
-
339
- /**
340
- * Specifies arguments for a `$nor` condition.
341
- *
342
- * #### Example:
343
- *
344
- * query.nor([{ color: 'green' }, { status: 'ok' }])
345
- *
346
- * @param {Array} array array of conditions
347
- * @return {Query} this
348
- * @api public
349
- */
350
-
351
- Query.prototype.nor = function nor(array) {
352
- const nor = this._conditions.$nor || (this._conditions.$nor = []);
353
- if (!Array.isArray(array)) array = [array];
354
- nor.push.apply(nor, array);
355
- return this;
356
- };
357
-
358
- /**
359
- * Specifies arguments for a `$and` condition.
360
- *
361
- * #### Example:
362
- *
363
- * query.and([{ color: 'green' }, { status: 'ok' }])
364
- *
365
- * @see $and http://docs.mongodb.org/manual/reference/operator/and/
366
- * @param {Array} array array of conditions
367
- * @return {Query} this
368
- * @api public
369
- */
370
-
371
- Query.prototype.and = function and(array) {
372
- const and = this._conditions.$and || (this._conditions.$and = []);
373
- if (!Array.isArray(array)) array = [array];
374
- and.push.apply(and, array);
375
- return this;
376
- };
377
-
378
- /**
379
- * Specifies a $gt query condition.
380
- *
381
- * When called with one argument, the most recent path passed to `where()` is used.
382
- *
383
- * #### Example:
384
- *
385
- * Thing.find().where('age').gt(21)
386
- *
387
- * // or
388
- * Thing.find().gt('age', 21)
389
- *
390
- * @method gt
391
- * @memberOf Query
392
- * @param {String} [path]
393
- * @param {Number} val
394
- * @api public
395
- */
396
-
397
- /**
398
- * Specifies a $gte query condition.
399
- *
400
- * When called with one argument, the most recent path passed to `where()` is used.
401
- *
402
- * @method gte
403
- * @memberOf Query
404
- * @param {String} [path]
405
- * @param {Number} val
406
- * @api public
407
- */
408
-
409
- /**
410
- * Specifies a $lt query condition.
411
- *
412
- * When called with one argument, the most recent path passed to `where()` is used.
413
- *
414
- * @method lt
415
- * @memberOf Query
416
- * @param {String} [path]
417
- * @param {Number} val
418
- * @api public
419
- */
420
-
421
- /**
422
- * Specifies a $lte query condition.
423
- *
424
- * When called with one argument, the most recent path passed to `where()` is used.
425
- *
426
- * @method lte
427
- * @memberOf Query
428
- * @param {String} [path]
429
- * @param {Number} val
430
- * @api public
431
- */
432
-
433
- /**
434
- * Specifies a $ne query condition.
435
- *
436
- * When called with one argument, the most recent path passed to `where()` is used.
437
- *
438
- * @method ne
439
- * @memberOf Query
440
- * @param {String} [path]
441
- * @param {Number} val
442
- * @api public
443
- */
444
-
445
- /**
446
- * Specifies an $in query condition.
447
- *
448
- * When called with one argument, the most recent path passed to `where()` is used.
449
- *
450
- * @method in
451
- * @memberOf Query
452
- * @param {String} [path]
453
- * @param {Number} val
454
- * @api public
455
- */
456
-
457
- /**
458
- * Specifies an $nin query condition.
459
- *
460
- * When called with one argument, the most recent path passed to `where()` is used.
461
- *
462
- * @method nin
463
- * @memberOf Query
464
- * @param {String} [path]
465
- * @param {Number} val
466
- * @api public
467
- */
468
-
469
- /**
470
- * Specifies an $all query condition.
471
- *
472
- * When called with one argument, the most recent path passed to `where()` is used.
473
- *
474
- * @method all
475
- * @memberOf Query
476
- * @param {String} [path]
477
- * @param {Number} val
478
- * @api public
479
- */
480
-
481
- /**
482
- * Specifies a $size query condition.
483
- *
484
- * When called with one argument, the most recent path passed to `where()` is used.
485
- *
486
- * @method size
487
- * @memberOf Query
488
- * @param {String} [path]
489
- * @param {Number} val
490
- * @api public
491
- */
492
-
493
- /**
494
- * Specifies a $regex query condition.
495
- *
496
- * When called with one argument, the most recent path passed to `where()` is used.
497
- *
498
- * @method regex
499
- * @memberOf Query
500
- * @param {String} [path]
501
- * @param {String|RegExp} val
502
- * @api public
503
- */
504
-
505
- /**
506
- * Specifies a $maxDistance query condition.
507
- *
508
- * When called with one argument, the most recent path passed to `where()` is used.
509
- *
510
- * @method maxDistance
511
- * @memberOf Query
512
- * @param {String} [path]
513
- * @param {Number} val
514
- * @api public
515
- */
516
-
517
- /*!
518
- * gt, gte, lt, lte, ne, in, nin, all, regex, size, maxDistance
519
- *
520
- * Thing.where('type').nin(array)
521
- */
522
-
523
- 'gt gte lt lte ne in nin all regex size maxDistance minDistance'.split(' ').forEach(function($conditional) {
524
- Query.prototype[$conditional] = function() {
525
- let path, val;
526
-
527
- if (1 === arguments.length) {
528
- this._ensurePath($conditional);
529
- val = arguments[0];
530
- path = this._path;
531
- } else {
532
- val = arguments[1];
533
- path = arguments[0];
534
- }
535
-
536
- const conds = this._conditions[path] === null || typeof this._conditions[path] === 'object' ?
537
- this._conditions[path] :
538
- (this._conditions[path] = {});
539
- conds['$' + $conditional] = val;
540
- return this;
541
- };
542
- });
543
-
544
- /**
545
- * Specifies a `$mod` condition
546
- *
547
- * @param {String} [path]
548
- * @param {Number} val
549
- * @return {Query} this
550
- * @api public
551
- */
552
-
553
- Query.prototype.mod = function() {
554
- let val, path;
555
-
556
- if (1 === arguments.length) {
557
- this._ensurePath('mod');
558
- val = arguments[0];
559
- path = this._path;
560
- } else if (2 === arguments.length && !Array.isArray(arguments[1])) {
561
- this._ensurePath('mod');
562
- val = [arguments[0], arguments[1]];
563
- path = this._path;
564
- } else if (3 === arguments.length) {
565
- val = [arguments[1], arguments[2]];
566
- path = arguments[0];
567
- } else {
568
- val = arguments[1];
569
- path = arguments[0];
570
- }
571
-
572
- const conds = this._conditions[path] || (this._conditions[path] = {});
573
- conds.$mod = val;
574
- return this;
575
- };
576
-
577
- /**
578
- * Specifies an `$exists` condition
579
- *
580
- * #### Example:
581
- *
582
- * // { name: { $exists: true }}
583
- * Thing.where('name').exists()
584
- * Thing.where('name').exists(true)
585
- * Thing.find().exists('name')
586
- *
587
- * // { name: { $exists: false }}
588
- * Thing.where('name').exists(false);
589
- * Thing.find().exists('name', false);
590
- *
591
- * @param {String} [path]
592
- * @param {Number} val
593
- * @return {Query} this
594
- * @api public
595
- */
596
-
597
- Query.prototype.exists = function() {
598
- let path, val;
599
-
600
- if (0 === arguments.length) {
601
- this._ensurePath('exists');
602
- path = this._path;
603
- val = true;
604
- } else if (1 === arguments.length) {
605
- if ('boolean' === typeof arguments[0]) {
606
- this._ensurePath('exists');
607
- path = this._path;
608
- val = arguments[0];
609
- } else {
610
- path = arguments[0];
611
- val = true;
612
- }
613
- } else if (2 === arguments.length) {
614
- path = arguments[0];
615
- val = arguments[1];
616
- }
617
-
618
- const conds = this._conditions[path] || (this._conditions[path] = {});
619
- conds.$exists = val;
620
- return this;
621
- };
622
-
623
- /**
624
- * Specifies an `$elemMatch` condition
625
- *
626
- * #### Example:
627
- *
628
- * query.elemMatch('comment', { author: 'autobot', votes: {$gte: 5}})
629
- *
630
- * query.where('comment').elemMatch({ author: 'autobot', votes: {$gte: 5}})
631
- *
632
- * query.elemMatch('comment', function (elem) {
633
- * elem.where('author').equals('autobot');
634
- * elem.where('votes').gte(5);
635
- * })
636
- *
637
- * query.where('comment').elemMatch(function (elem) {
638
- * elem.where({ author: 'autobot' });
639
- * elem.where('votes').gte(5);
640
- * })
641
- *
642
- * @param {String|Object|Function} path
643
- * @param {Object|Function} criteria
644
- * @return {Query} this
645
- * @api public
646
- */
647
-
648
- Query.prototype.elemMatch = function() {
649
- if (null == arguments[0])
650
- throw new TypeError('Invalid argument');
651
-
652
- let fn, path, criteria;
653
-
654
- if ('function' === typeof arguments[0]) {
655
- this._ensurePath('elemMatch');
656
- path = this._path;
657
- fn = arguments[0];
658
- } else if (utils.isObject(arguments[0])) {
659
- this._ensurePath('elemMatch');
660
- path = this._path;
661
- criteria = arguments[0];
662
- } else if ('function' === typeof arguments[1]) {
663
- path = arguments[0];
664
- fn = arguments[1];
665
- } else if (arguments[1] && utils.isObject(arguments[1])) {
666
- path = arguments[0];
667
- criteria = arguments[1];
668
- } else {
669
- throw new TypeError('Invalid argument');
670
- }
671
-
672
- if (fn) {
673
- criteria = new Query;
674
- fn(criteria);
675
- criteria = criteria._conditions;
676
- }
677
-
678
- const conds = this._conditions[path] || (this._conditions[path] = {});
679
- conds.$elemMatch = criteria;
680
- return this;
681
- };
682
-
683
- // Spatial queries
684
-
685
- /**
686
- * Sugar for geo-spatial queries.
687
- *
688
- * #### Example:
689
- *
690
- * query.within().box()
691
- * query.within().circle()
692
- * query.within().geometry()
693
- *
694
- * query.where('loc').within({ center: [50,50], radius: 10, unique: true, spherical: true });
695
- * query.where('loc').within({ box: [[40.73, -73.9], [40.7, -73.988]] });
696
- * query.where('loc').within({ polygon: [[],[],[],[]] });
697
- *
698
- * query.where('loc').within([], [], []) // polygon
699
- * query.where('loc').within([], []) // box
700
- * query.where('loc').within({ type: 'LineString', coordinates: [...] }); // geometry
701
- *
702
- * #### Note:
703
- *
704
- * Must be used after `where()`.
705
- *
706
- * @memberOf Query
707
- * @return {Query} this
708
- * @api public
709
- */
710
-
711
- Query.prototype.within = function within() {
712
- // opinionated, must be used after where
713
- this._ensurePath('within');
714
- this._geoComparison = '$geoWithin';
715
-
716
- if (0 === arguments.length) {
717
- return this;
718
- }
719
-
720
- if (2 === arguments.length) {
721
- return this.box.apply(this, arguments);
722
- } else if (2 < arguments.length) {
723
- return this.polygon.apply(this, arguments);
724
- }
725
-
726
- const area = arguments[0];
727
-
728
- if (!area)
729
- throw new TypeError('Invalid argument');
730
-
731
- if (area.center)
732
- return this.circle(area);
733
-
734
- if (area.box)
735
- return this.box.apply(this, area.box);
736
-
737
- if (area.polygon)
738
- return this.polygon.apply(this, area.polygon);
739
-
740
- if (area.type && area.coordinates)
741
- return this.geometry(area);
742
-
743
- throw new TypeError('Invalid argument');
744
- };
745
-
746
- /**
747
- * Specifies a $box condition
748
- *
749
- * #### Example:
750
- *
751
- * var lowerLeft = [40.73083, -73.99756]
752
- * var upperRight= [40.741404, -73.988135]
753
- *
754
- * query.where('loc').within().box(lowerLeft, upperRight)
755
- * query.box('loc', lowerLeft, upperRight )
756
- *
757
- * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
758
- * @see Query#within #query_Query-within
759
- * @param {String} path
760
- * @param {Object} val
761
- * @return {Query} this
762
- * @api public
763
- */
764
-
765
- Query.prototype.box = function() {
766
- let path, box;
767
-
768
- if (3 === arguments.length) {
769
- // box('loc', [], [])
770
- path = arguments[0];
771
- box = [arguments[1], arguments[2]];
772
- } else if (2 === arguments.length) {
773
- // box([], [])
774
- this._ensurePath('box');
775
- path = this._path;
776
- box = [arguments[0], arguments[1]];
777
- } else {
778
- throw new TypeError('Invalid argument');
779
- }
780
-
781
- const conds = this._conditions[path] || (this._conditions[path] = {});
782
- conds[this._geoComparison || '$geoWithin'] = { $box: box };
783
- return this;
784
- };
785
-
786
- /**
787
- * Specifies a $polygon condition
788
- *
789
- * #### Example:
790
- *
791
- * query.where('loc').within().polygon([10,20], [13, 25], [7,15])
792
- * query.polygon('loc', [10,20], [13, 25], [7,15])
793
- *
794
- * @param {String|Array} [path]
795
- * @param {Array|Object} [val]
796
- * @return {Query} this
797
- * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
798
- * @api public
799
- */
800
-
801
- Query.prototype.polygon = function() {
802
- let val, path;
803
-
804
- if ('string' == typeof arguments[0]) {
805
- // polygon('loc', [],[],[])
806
- val = Array.from(arguments);
807
- path = val.shift();
808
- } else {
809
- // polygon([],[],[])
810
- this._ensurePath('polygon');
811
- path = this._path;
812
- val = Array.from(arguments);
813
- }
814
-
815
- const conds = this._conditions[path] || (this._conditions[path] = {});
816
- conds[this._geoComparison || '$geoWithin'] = { $polygon: val };
817
- return this;
818
- };
819
-
820
- /**
821
- * Specifies a $center or $centerSphere condition.
822
- *
823
- * #### Example:
824
- *
825
- * var area = { center: [50, 50], radius: 10, unique: true }
826
- * query.where('loc').within().circle(area)
827
- * query.center('loc', area);
828
- *
829
- * // for spherical calculations
830
- * var area = { center: [50, 50], radius: 10, unique: true, spherical: true }
831
- * query.where('loc').within().circle(area)
832
- * query.center('loc', area);
833
- *
834
- * @param {String} [path]
835
- * @param {Object} area
836
- * @return {Query} this
837
- * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
838
- * @api public
839
- */
840
-
841
- Query.prototype.circle = function() {
842
- let path, val;
843
-
844
- if (1 === arguments.length) {
845
- this._ensurePath('circle');
846
- path = this._path;
847
- val = arguments[0];
848
- } else if (2 === arguments.length) {
849
- path = arguments[0];
850
- val = arguments[1];
851
- } else {
852
- throw new TypeError('Invalid argument');
853
- }
854
-
855
- if (!('radius' in val && val.center))
856
- throw new Error('center and radius are required');
857
-
858
- const conds = this._conditions[path] || (this._conditions[path] = {});
859
-
860
- const type = val.spherical
861
- ? '$centerSphere'
862
- : '$center';
863
-
864
- const wKey = this._geoComparison || '$geoWithin';
865
- conds[wKey] = {};
866
- conds[wKey][type] = [val.center, val.radius];
867
-
868
- if ('unique' in val)
869
- conds[wKey].$uniqueDocs = !!val.unique;
870
-
871
- return this;
872
- };
873
-
874
- /**
875
- * Specifies a `$near` or `$nearSphere` condition
876
- *
877
- * These operators return documents sorted by distance.
878
- *
879
- * #### Example:
880
- *
881
- * query.where('loc').near({ center: [10, 10] });
882
- * query.where('loc').near({ center: [10, 10], maxDistance: 5 });
883
- * query.where('loc').near({ center: [10, 10], maxDistance: 5, spherical: true });
884
- * query.near('loc', { center: [10, 10], maxDistance: 5 });
885
- * query.near({ center: { type: 'Point', coordinates: [..] }})
886
- * query.near().geometry({ type: 'Point', coordinates: [..] })
887
- *
888
- * @param {String} [path]
889
- * @param {Object} val
890
- * @return {Query} this
891
- * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
892
- * @api public
893
- */
894
-
895
- Query.prototype.near = function near() {
896
- let path, val;
897
-
898
- this._geoComparison = '$near';
899
-
900
- if (0 === arguments.length) {
901
- return this;
902
- } else if (1 === arguments.length) {
903
- this._ensurePath('near');
904
- path = this._path;
905
- val = arguments[0];
906
- } else if (2 === arguments.length) {
907
- path = arguments[0];
908
- val = arguments[1];
909
- } else {
910
- throw new TypeError('Invalid argument');
911
- }
912
-
913
- if (!val.center) {
914
- throw new Error('center is required');
915
- }
916
-
917
- const conds = this._conditions[path] || (this._conditions[path] = {});
918
-
919
- const type = val.spherical
920
- ? '$nearSphere'
921
- : '$near';
922
-
923
- // center could be a GeoJSON object or an Array
924
- if (Array.isArray(val.center)) {
925
- conds[type] = val.center;
926
-
927
- const radius = 'maxDistance' in val
928
- ? val.maxDistance
929
- : null;
930
-
931
- if (null != radius) {
932
- conds.$maxDistance = radius;
933
- }
934
- if (null != val.minDistance) {
935
- conds.$minDistance = val.minDistance;
936
- }
937
- } else {
938
- // GeoJSON?
939
- if (val.center.type != 'Point' || !Array.isArray(val.center.coordinates)) {
940
- throw new Error(util.format('Invalid GeoJSON specified for %s', type));
941
- }
942
- conds[type] = { $geometry: val.center };
943
-
944
- // MongoDB 2.6 insists on maxDistance being in $near / $nearSphere
945
- if ('maxDistance' in val) {
946
- conds[type]['$maxDistance'] = val.maxDistance;
947
- }
948
- if ('minDistance' in val) {
949
- conds[type]['$minDistance'] = val.minDistance;
950
- }
951
- }
952
-
953
- return this;
954
- };
955
-
956
- /**
957
- * Declares an intersects query for `geometry()`.
958
- *
959
- * #### Example:
960
- *
961
- * query.where('path').intersects().geometry({
962
- * type: 'LineString'
963
- * , coordinates: [[180.0, 11.0], [180, 9.0]]
964
- * })
965
- *
966
- * query.where('path').intersects({
967
- * type: 'LineString'
968
- * , coordinates: [[180.0, 11.0], [180, 9.0]]
969
- * })
970
- *
971
- * @param {Object} [arg]
972
- * @return {Query} this
973
- * @api public
974
- */
975
-
976
- Query.prototype.intersects = function intersects() {
977
- // opinionated, must be used after where
978
- this._ensurePath('intersects');
979
-
980
- this._geoComparison = '$geoIntersects';
981
-
982
- if (0 === arguments.length) {
983
- return this;
984
- }
985
-
986
- const area = arguments[0];
987
-
988
- if (null != area && area.type && area.coordinates)
989
- return this.geometry(area);
990
-
991
- throw new TypeError('Invalid argument');
992
- };
993
-
994
- /**
995
- * Specifies a `$geometry` condition
996
- *
997
- * #### Example:
998
- *
999
- * var polyA = [[[ 10, 20 ], [ 10, 40 ], [ 30, 40 ], [ 30, 20 ]]]
1000
- * query.where('loc').within().geometry({ type: 'Polygon', coordinates: polyA })
1001
- *
1002
- * // or
1003
- * var polyB = [[ 0, 0 ], [ 1, 1 ]]
1004
- * query.where('loc').within().geometry({ type: 'LineString', coordinates: polyB })
1005
- *
1006
- * // or
1007
- * var polyC = [ 0, 0 ]
1008
- * query.where('loc').within().geometry({ type: 'Point', coordinates: polyC })
1009
- *
1010
- * // or
1011
- * query.where('loc').intersects().geometry({ type: 'Point', coordinates: polyC })
1012
- *
1013
- * #### Note:
1014
- *
1015
- * `geometry()` **must** come after either `intersects()` or `within()`.
1016
- *
1017
- * The `object` argument must contain `type` and `coordinates` properties.
1018
- * - type {String}
1019
- * - coordinates {Array}
1020
- *
1021
- * The most recent path passed to `where()` is used.
1022
- *
1023
- * @param {Object} object Must contain a `type` property which is a String and a `coordinates` property which is an Array. See the examples.
1024
- * @return {Query} this
1025
- * @see http://docs.mongodb.org/manual/release-notes/2.4/#new-geospatial-indexes-with-geojson-and-improved-spherical-geometry
1026
- * @see http://www.mongodb.org/display/DOCS/Geospatial+Indexing
1027
- * @see $geometry http://docs.mongodb.org/manual/reference/operator/geometry/
1028
- * @api public
1029
- */
1030
-
1031
- Query.prototype.geometry = function geometry() {
1032
- if (!('$within' == this._geoComparison ||
1033
- '$geoWithin' == this._geoComparison ||
1034
- '$near' == this._geoComparison ||
1035
- '$geoIntersects' == this._geoComparison)) {
1036
- throw new Error('geometry() must come after `within()`, `intersects()`, or `near()');
1037
- }
1038
-
1039
- let val, path;
1040
-
1041
- if (1 === arguments.length) {
1042
- this._ensurePath('geometry');
1043
- path = this._path;
1044
- val = arguments[0];
1045
- } else {
1046
- throw new TypeError('Invalid argument');
1047
- }
1048
-
1049
- if (!(val.type && Array.isArray(val.coordinates))) {
1050
- throw new TypeError('Invalid argument');
1051
- }
1052
-
1053
- const conds = this._conditions[path] || (this._conditions[path] = {});
1054
- conds[this._geoComparison] = { $geometry: val };
1055
-
1056
- return this;
1057
- };
1058
-
1059
- // end spatial
1060
-
1061
- /**
1062
- * Specifies which document fields to include or exclude
1063
- *
1064
- * #### String syntax
1065
- *
1066
- * When passing a string, prefixing a path with `-` will flag that path as excluded. When a path does not have the `-` prefix, it is included.
1067
- *
1068
- * #### Example:
1069
- *
1070
- * // include a and b, exclude c
1071
- * query.select('a b -c');
1072
- *
1073
- * // or you may use object notation, useful when
1074
- * // you have keys already prefixed with a "-"
1075
- * query.select({a: 1, b: 1, c: 0});
1076
- *
1077
- * #### Note:
1078
- *
1079
- * Cannot be used with `distinct()`
1080
- *
1081
- * @param {Object|String} arg
1082
- * @return {Query} this
1083
- * @see SchemaType
1084
- * @api public
1085
- */
1086
-
1087
- Query.prototype.select = function select() {
1088
- let arg = arguments[0];
1089
- if (!arg) return this;
1090
-
1091
- if (arguments.length !== 1) {
1092
- throw new Error('Invalid select: select only takes 1 argument');
1093
- }
1094
-
1095
- this._validate('select');
1096
-
1097
- const fields = this._fields || (this._fields = {});
1098
- const type = typeof arg;
1099
- let i, len;
1100
-
1101
- if (('string' == type || utils.isArgumentsObject(arg)) &&
1102
- 'number' == typeof arg.length || Array.isArray(arg)) {
1103
- if ('string' == type)
1104
- arg = arg.split(/\s+/);
1105
-
1106
- for (i = 0, len = arg.length; i < len; ++i) {
1107
- let field = arg[i];
1108
- if (!field) continue;
1109
- const include = '-' == field[0] ? 0 : 1;
1110
- if (include === 0) field = field.substring(1);
1111
- fields[field] = include;
1112
- }
1113
-
1114
- return this;
1115
- }
1116
-
1117
- if (utils.isObject(arg)) {
1118
- const keys = utils.keys(arg);
1119
- for (i = 0; i < keys.length; ++i) {
1120
- fields[keys[i]] = arg[keys[i]];
1121
- }
1122
- return this;
1123
- }
1124
-
1125
- throw new TypeError('Invalid select() argument. Must be string or object.');
1126
- };
1127
-
1128
- /**
1129
- * Specifies a $slice condition for a `path`
1130
- *
1131
- * #### Example:
1132
- *
1133
- * query.slice('comments', 5)
1134
- * query.slice('comments', -5)
1135
- * query.slice('comments', [10, 5])
1136
- * query.where('comments').slice(5)
1137
- * query.where('comments').slice([-10, 5])
1138
- *
1139
- * @param {String} [path]
1140
- * @param {Number} val number/range of elements to slice
1141
- * @return {Query} this
1142
- * @see mongodb http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields#RetrievingaSubsetofFields-RetrievingaSubrangeofArrayElements
1143
- * @api public
1144
- */
1145
-
1146
- Query.prototype.slice = function() {
1147
- if (0 === arguments.length)
1148
- return this;
1149
-
1150
- this._validate('slice');
1151
-
1152
- let path, val;
1153
-
1154
- if (1 === arguments.length) {
1155
- const arg = arguments[0];
1156
- if (typeof arg === 'object' && !Array.isArray(arg)) {
1157
- const keys = Object.keys(arg);
1158
- const numKeys = keys.length;
1159
- for (let i = 0; i < numKeys; ++i) {
1160
- this.slice(keys[i], arg[keys[i]]);
1161
- }
1162
- return this;
1163
- }
1164
- this._ensurePath('slice');
1165
- path = this._path;
1166
- val = arguments[0];
1167
- } else if (2 === arguments.length) {
1168
- if ('number' === typeof arguments[0]) {
1169
- this._ensurePath('slice');
1170
- path = this._path;
1171
- val = [arguments[0], arguments[1]];
1172
- } else {
1173
- path = arguments[0];
1174
- val = arguments[1];
1175
- }
1176
- } else if (3 === arguments.length) {
1177
- path = arguments[0];
1178
- val = [arguments[1], arguments[2]];
1179
- }
1180
-
1181
- const myFields = this._fields || (this._fields = {});
1182
- myFields[path] = { $slice: val };
1183
- return this;
1184
- };
1185
-
1186
- /**
1187
- * Sets the sort order
1188
- *
1189
- * If an object is passed, values allowed are 'asc', 'desc', 'ascending', 'descending', 1, and -1.
1190
- *
1191
- * If a string is passed, it must be a space delimited list of path names. The sort order of each path is ascending unless the path name is prefixed with `-` which will be treated as descending.
1192
- *
1193
- * #### Example:
1194
- *
1195
- * // these are equivalent
1196
- * query.sort({ field: 'asc', test: -1 });
1197
- * query.sort('field -test');
1198
- * query.sort([['field', 1], ['test', -1]]);
1199
- *
1200
- * #### Note:
1201
- *
1202
- * - The array syntax `.sort([['field', 1], ['test', -1]])` can only be used with [mongodb driver >= 2.0.46](https://github.com/mongodb/node-mongodb-native/blob/2.1/HISTORY.md#2046-2015-10-15).
1203
- * - Cannot be used with `distinct()`
1204
- *
1205
- * @param {Object|String|Array} arg
1206
- * @return {Query} this
1207
- * @api public
1208
- */
1209
-
1210
- Query.prototype.sort = function(arg) {
1211
- if (!arg) return this;
1212
- let i, len, field;
1213
-
1214
- this._validate('sort');
1215
-
1216
- const type = typeof arg;
1217
-
1218
- // .sort([['field', 1], ['test', -1]])
1219
- if (Array.isArray(arg)) {
1220
- len = arg.length;
1221
- for (i = 0; i < arg.length; ++i) {
1222
- if (!Array.isArray(arg[i])) {
1223
- throw new Error('Invalid sort() argument, must be array of arrays');
1224
- }
1225
- _pushArr(this.options, arg[i][0], arg[i][1]);
1226
- }
1227
- return this;
1228
- }
1229
-
1230
- // .sort('field -test')
1231
- if (1 === arguments.length && 'string' == type) {
1232
- arg = arg.split(/\s+/);
1233
- len = arg.length;
1234
- for (i = 0; i < len; ++i) {
1235
- field = arg[i];
1236
- if (!field) continue;
1237
- const ascend = '-' == field[0] ? -1 : 1;
1238
- if (ascend === -1) field = field.substring(1);
1239
- push(this.options, field, ascend);
1240
- }
1241
-
1242
- return this;
1243
- }
1244
-
1245
- // .sort({ field: 1, test: -1 })
1246
- if (utils.isObject(arg)) {
1247
- const keys = utils.keys(arg);
1248
- for (i = 0; i < keys.length; ++i) {
1249
- field = keys[i];
1250
- push(this.options, field, arg[field]);
1251
- }
1252
-
1253
- return this;
1254
- }
1255
-
1256
- if (typeof Map !== 'undefined' && arg instanceof Map) {
1257
- _pushMap(this.options, arg);
1258
- return this;
1259
- }
1260
- throw new TypeError('Invalid sort() argument. Must be a string, object, or array.');
1261
- };
1262
-
1263
- /*!
1264
- * @ignore
1265
- */
1266
-
1267
- const _validSortValue = {
1268
- 1: 1,
1269
- '-1': -1,
1270
- asc: 1,
1271
- ascending: 1,
1272
- desc: -1,
1273
- descending: -1
1274
- };
1275
-
1276
- function push(opts, field, value) {
1277
- if (Array.isArray(opts.sort)) {
1278
- throw new TypeError('Can\'t mix sort syntaxes. Use either array or object:' +
1279
- '\n- `.sort([[\'field\', 1], [\'test\', -1]])`' +
1280
- '\n- `.sort({ field: 1, test: -1 })`');
1281
- }
1282
-
1283
- let s;
1284
- if (value && value.$meta) {
1285
- s = opts.sort || (opts.sort = {});
1286
- s[field] = { $meta: value.$meta };
1287
- return;
1288
- }
1289
-
1290
- s = opts.sort || (opts.sort = {});
1291
- let val = String(value || 1).toLowerCase();
1292
- val = _validSortValue[val];
1293
- if (!val) throw new TypeError('Invalid sort value: { ' + field + ': ' + value + ' }');
1294
-
1295
- s[field] = val;
1296
- }
1297
-
1298
- function _pushArr(opts, field, value) {
1299
- opts.sort = opts.sort || [];
1300
- if (!Array.isArray(opts.sort)) {
1301
- throw new TypeError('Can\'t mix sort syntaxes. Use either array or object:' +
1302
- '\n- `.sort([[\'field\', 1], [\'test\', -1]])`' +
1303
- '\n- `.sort({ field: 1, test: -1 })`');
1304
- }
1305
-
1306
- let val = String(value || 1).toLowerCase();
1307
- val = _validSortValue[val];
1308
- if (!val) throw new TypeError('Invalid sort value: [ ' + field + ', ' + value + ' ]');
1309
-
1310
- opts.sort.push([field, val]);
1311
- }
1312
-
1313
- function _pushMap(opts, map) {
1314
- opts.sort = opts.sort || new Map();
1315
- if (!(opts.sort instanceof Map)) {
1316
- throw new TypeError('Can\'t mix sort syntaxes. Use either array or ' +
1317
- 'object or map consistently');
1318
- }
1319
- map.forEach(function(value, key) {
1320
- let val = String(value || 1).toLowerCase();
1321
- val = _validSortValue[val];
1322
- if (!val) throw new TypeError('Invalid sort value: < ' + key + ': ' + value + ' >');
1323
-
1324
- opts.sort.set(key, val);
1325
- });
1326
- }
1327
-
1328
-
1329
- /**
1330
- * Specifies the limit option.
1331
- *
1332
- * #### Example:
1333
- *
1334
- * query.limit(20)
1335
- *
1336
- * #### Note:
1337
- *
1338
- * Cannot be used with `distinct()`
1339
- *
1340
- * @method limit
1341
- * @memberOf Query
1342
- * @param {Number} val
1343
- * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Blimit%28%29%7D%7D
1344
- * @api public
1345
- */
1346
- /**
1347
- * Specifies the skip option.
1348
- *
1349
- * #### Example:
1350
- *
1351
- * query.skip(100).limit(20)
1352
- *
1353
- * #### Note:
1354
- *
1355
- * Cannot be used with `distinct()`
1356
- *
1357
- * @method skip
1358
- * @memberOf Query
1359
- * @param {Number} val
1360
- * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7Bskip%28%29%7D%7D
1361
- * @api public
1362
- */
1363
- /**
1364
- * Specifies the batchSize option.
1365
- *
1366
- * #### Example:
1367
- *
1368
- * query.batchSize(100)
1369
- *
1370
- * #### Note:
1371
- *
1372
- * Cannot be used with `distinct()`
1373
- *
1374
- * @method batchSize
1375
- * @memberOf Query
1376
- * @param {Number} val
1377
- * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%7B%7BbatchSize%28%29%7D%7D
1378
- * @api public
1379
- */
1380
- /**
1381
- * Specifies the `comment` option.
1382
- *
1383
- * #### Example:
1384
- *
1385
- * query.comment('login query')
1386
- *
1387
- * #### Note:
1388
- *
1389
- * Cannot be used with `distinct()`
1390
- *
1391
- * @method comment
1392
- * @memberOf Query
1393
- * @param {Number} val
1394
- * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24comment
1395
- * @api public
1396
- */
1397
-
1398
- /*!
1399
- * limit, skip, batchSize, comment
1400
- *
1401
- * Sets these associated options.
1402
- *
1403
- * query.comment('feed query');
1404
- */
1405
-
1406
- ['limit', 'skip', 'batchSize', 'comment'].forEach(function(method) {
1407
- Query.prototype[method] = function(v) {
1408
- this._validate(method);
1409
- this.options[method] = v;
1410
- return this;
1411
- };
1412
- });
1413
-
1414
- /**
1415
- * Specifies the maxTimeMS option.
1416
- *
1417
- * #### Example:
1418
- *
1419
- * query.maxTime(100)
1420
- * query.maxTimeMS(100)
1421
- *
1422
- * @method maxTime
1423
- * @memberOf Query
1424
- * @param {Number} ms
1425
- * @see mongodb http://docs.mongodb.org/manual/reference/operator/meta/maxTimeMS/#op._S_maxTimeMS
1426
- * @api public
1427
- */
1428
-
1429
- Query.prototype.maxTime = Query.prototype.maxTimeMS = function(ms) {
1430
- this._validate('maxTime');
1431
- this.options.maxTimeMS = ms;
1432
- return this;
1433
- };
1434
-
1435
- /**
1436
- * Sets query hints.
1437
- *
1438
- * #### Example:
1439
- *
1440
- * query.hint({ indexA: 1, indexB: -1});
1441
- * query.hint('indexA_1_indexB_1');
1442
- *
1443
- * #### Note:
1444
- *
1445
- * Cannot be used with `distinct()`
1446
- *
1447
- * @param {Object|string} val a hint object or the index name
1448
- * @return {Query} this
1449
- * @see mongodb http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24hint
1450
- * @api public
1451
- */
1452
-
1453
- Query.prototype.hint = function() {
1454
- if (0 === arguments.length) return this;
1455
-
1456
- this._validate('hint');
1457
-
1458
- const arg = arguments[0];
1459
- if (utils.isObject(arg)) {
1460
- const hint = this.options.hint || (this.options.hint = {});
1461
-
1462
- // must keep object keys in order so don't use Object.keys()
1463
- for (const k in arg) {
1464
- hint[k] = arg[k];
1465
- }
1466
-
1467
- return this;
1468
- }
1469
- if (typeof arg === 'string') {
1470
- this.options.hint = arg;
1471
- return this;
1472
- }
1473
-
1474
- throw new TypeError('Invalid hint. ' + arg);
1475
- };
1476
-
1477
- /**
1478
- * Requests acknowledgement that this operation has been persisted to MongoDB's
1479
- * on-disk journal.
1480
- * This option is only valid for operations that write to the database:
1481
- *
1482
- * - `deleteOne()`
1483
- * - `deleteMany()`
1484
- * - `findOneAndDelete()`
1485
- * - `findOneAndUpdate()`
1486
- * - `updateOne()`
1487
- * - `updateMany()`
1488
- *
1489
- * Defaults to the `j` value if it is specified in writeConcern options
1490
- *
1491
- * #### Example:
1492
- *
1493
- * mquery().w(2).j(true).wtimeout(2000);
1494
- *
1495
- * @method j
1496
- * @memberOf Query
1497
- * @instance
1498
- * @param {boolean} val
1499
- * @see mongodb https://docs.mongodb.com/manual/reference/write-concern/#j-option
1500
- * @return {Query} this
1501
- * @api public
1502
- */
1503
-
1504
- Query.prototype.j = function j(val) {
1505
- this.options.j = val;
1506
- return this;
1507
- };
1508
-
1509
- /**
1510
- * Sets the slaveOk option. _Deprecated_ in MongoDB 2.2 in favor of read preferences.
1511
- *
1512
- * #### Example:
1513
- *
1514
- * query.slaveOk() // true
1515
- * query.slaveOk(true)
1516
- * query.slaveOk(false)
1517
- *
1518
- * @deprecated use read() preferences instead if on mongodb >= 2.2
1519
- * @param {Boolean} v defaults to true
1520
- * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference
1521
- * @see read()
1522
- * @return {Query} this
1523
- * @api public
1524
- */
1525
-
1526
- Query.prototype.slaveOk = function(v) {
1527
- this.options.slaveOk = arguments.length ? !!v : true;
1528
- return this;
1529
- };
1530
-
1531
- /**
1532
- * Sets the readPreference option for the query.
1533
- *
1534
- * #### Example:
1535
- *
1536
- * new Query().read('primary')
1537
- * new Query().read('p') // same as primary
1538
- *
1539
- * new Query().read('primaryPreferred')
1540
- * new Query().read('pp') // same as primaryPreferred
1541
- *
1542
- * new Query().read('secondary')
1543
- * new Query().read('s') // same as secondary
1544
- *
1545
- * new Query().read('secondaryPreferred')
1546
- * new Query().read('sp') // same as secondaryPreferred
1547
- *
1548
- * new Query().read('nearest')
1549
- * new Query().read('n') // same as nearest
1550
- *
1551
- * // you can also use mongodb.ReadPreference class to also specify tags
1552
- * new Query().read(mongodb.ReadPreference('secondary', [{ dc:'sf', s: 1 },{ dc:'ma', s: 2 }]))
1553
- *
1554
- * new Query().setReadPreference('primary') // alias of .read()
1555
- *
1556
- * #### Preferences:
1557
- *
1558
- * primary - (default) Read from primary only. Operations will produce an error if primary is unavailable. Cannot be combined with tags.
1559
- * secondary Read from secondary if available, otherwise error.
1560
- * primaryPreferred Read from primary if available, otherwise a secondary.
1561
- * secondaryPreferred Read from a secondary if available, otherwise read from the primary.
1562
- * nearest All operations read from among the nearest candidates, but unlike other modes, this option will include both the primary and all secondaries in the random selection.
1563
- *
1564
- * Aliases
1565
- *
1566
- * p primary
1567
- * pp primaryPreferred
1568
- * s secondary
1569
- * sp secondaryPreferred
1570
- * n nearest
1571
- *
1572
- * Read more about how to use read preferences [here](http://docs.mongodb.org/manual/applications/replication/#read-preference) and [here](http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences).
1573
- *
1574
- * @param {String|ReadPreference} pref one of the listed preference options or their aliases
1575
- * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference
1576
- * @see driver http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences
1577
- * @return {Query} this
1578
- * @api public
1579
- */
1580
-
1581
- Query.prototype.read = Query.prototype.setReadPreference = function(pref) {
1582
- if (arguments.length > 1 && !Query.prototype.read.deprecationWarningIssued) {
1583
- console.error('Deprecation warning: \'tags\' argument is not supported anymore in Query.read() method. Please use mongodb.ReadPreference object instead.');
1584
- Query.prototype.read.deprecationWarningIssued = true;
1585
- }
1586
- this.options.readPreference = utils.readPref(pref);
1587
- return this;
1588
- };
1589
-
1590
- /**
1591
- * Sets the readConcern option for the query.
1592
- *
1593
- * #### Example:
1594
- *
1595
- * new Query().readConcern('local')
1596
- * new Query().readConcern('l') // same as local
1597
- *
1598
- * new Query().readConcern('available')
1599
- * new Query().readConcern('a') // same as available
1600
- *
1601
- * new Query().readConcern('majority')
1602
- * new Query().readConcern('m') // same as majority
1603
- *
1604
- * new Query().readConcern('linearizable')
1605
- * new Query().readConcern('lz') // same as linearizable
1606
- *
1607
- * new Query().readConcern('snapshot')
1608
- * new Query().readConcern('s') // same as snapshot
1609
- *
1610
- * new Query().r('s') // r is alias of readConcern
1611
- *
1612
- *
1613
- * #### Read Concern Level:
1614
- *
1615
- * local MongoDB 3.2+ The query returns from the instance with no guarantee guarantee that the data has been written to a majority of the replica set members (i.e. may be rolled back).
1616
- * available MongoDB 3.6+ The query returns from the instance with no guarantee guarantee that the data has been written to a majority of the replica set members (i.e. may be rolled back).
1617
- * majority MongoDB 3.2+ The query returns the data that has been acknowledged by a majority of the replica set members. The documents returned by the read operation are durable, even in the event of failure.
1618
- * linearizable MongoDB 3.4+ The query returns data that reflects all successful majority-acknowledged writes that completed prior to the start of the read operation. The query may wait for concurrently executing writes to propagate to a majority of replica set members before returning results.
1619
- * snapshot MongoDB 4.0+ Only available for operations within multi-document transactions. Upon transaction commit with write concern "majority", the transaction operations are guaranteed to have read from a snapshot of majority-committed data.
1620
- *
1621
- * Aliases
1622
- *
1623
- * l local
1624
- * a available
1625
- * m majority
1626
- * lz linearizable
1627
- * s snapshot
1628
- *
1629
- * Read more about how to use read concern [here](https://docs.mongodb.com/manual/reference/read-concern/).
1630
- *
1631
- * @param {String} level one of the listed read concern level or their aliases
1632
- * @see mongodb https://docs.mongodb.com/manual/reference/read-concern/
1633
- * @return {Query} this
1634
- * @api public
1635
- */
1636
-
1637
- Query.prototype.readConcern = Query.prototype.r = function(level) {
1638
- this.options.readConcern = utils.readConcern(level);
1639
- return this;
1640
- };
1641
-
1642
- /**
1643
- * Sets tailable option.
1644
- *
1645
- * #### Example:
1646
- *
1647
- * query.tailable() <== true
1648
- * query.tailable(true)
1649
- * query.tailable(false)
1650
- *
1651
- * #### Note:
1652
- *
1653
- * Cannot be used with `distinct()`
1654
- *
1655
- * @param {Boolean} v defaults to true
1656
- * @see mongodb http://www.mongodb.org/display/DOCS/Tailable+Cursors
1657
- * @api public
1658
- */
1659
-
1660
- Query.prototype.tailable = function() {
1661
- this._validate('tailable');
1662
-
1663
- this.options.tailable = arguments.length
1664
- ? !!arguments[0]
1665
- : true;
1666
-
1667
- return this;
1668
- };
1669
-
1670
- /**
1671
- * Sets the specified number of `mongod` servers, or tag set of `mongod` servers,
1672
- * that must acknowledge this write before this write is considered successful.
1673
- * This option is only valid for operations that write to the database:
1674
- *
1675
- * - `deleteOne()`
1676
- * - `deleteMany()`
1677
- * - `findOneAndDelete()`
1678
- * - `findOneAndUpdate()`
1679
- * - `updateOne()`
1680
- * - `updateMany()`
1681
- *
1682
- * Defaults to the `w` value if it is specified in writeConcern options
1683
- *
1684
- * #### Example:
1685
- *
1686
- * mquery().writeConcern(0)
1687
- * mquery().writeConcern(1)
1688
- * mquery().writeConcern({ w: 1, j: true, wtimeout: 2000 })
1689
- * mquery().writeConcern('majority')
1690
- * mquery().writeConcern('m') // same as majority
1691
- * mquery().writeConcern('tagSetName') // if the tag set is 'm', use .writeConcern({ w: 'm' }) instead
1692
- * mquery().w(1) // w is alias of writeConcern
1693
- *
1694
- * @method writeConcern
1695
- * @memberOf Query
1696
- * @instance
1697
- * @param {String|number|object} concern 0 for fire-and-forget, 1 for acknowledged by one server, 'majority' for majority of the replica set, or [any of the more advanced options](https://docs.mongodb.com/manual/reference/write-concern/#w-option).
1698
- * @see mongodb https://docs.mongodb.com/manual/reference/write-concern/#w-option
1699
- * @return {Query} this
1700
- * @api public
1701
- */
1702
-
1703
- Query.prototype.writeConcern = Query.prototype.w = function writeConcern(concern) {
1704
- if ('object' === typeof concern) {
1705
- if ('undefined' !== typeof concern.j) this.options.j = concern.j;
1706
- if ('undefined' !== typeof concern.w) this.options.w = concern.w;
1707
- if ('undefined' !== typeof concern.wtimeout) this.options.wtimeout = concern.wtimeout;
1708
- } else {
1709
- this.options.w = 'm' === concern ? 'majority' : concern;
1710
- }
1711
- return this;
1712
- };
1713
-
1714
- /**
1715
- * Specifies a time limit, in milliseconds, for the write concern.
1716
- * If `ms > 1`, it is maximum amount of time to wait for this write
1717
- * to propagate through the replica set before this operation fails.
1718
- * The default is `0`, which means no timeout.
1719
- *
1720
- * This option is only valid for operations that write to the database:
1721
- *
1722
- * - `deleteOne()`
1723
- * - `deleteMany()`
1724
- * - `findOneAndDelete()`
1725
- * - `findOneAndUpdate()`
1726
- * - `updateOne()`
1727
- * - `updateMany()`
1728
- *
1729
- * Defaults to `wtimeout` value if it is specified in writeConcern
1730
- *
1731
- * #### Example:
1732
- *
1733
- * mquery().w(2).j(true).wtimeout(2000)
1734
- *
1735
- * @method wtimeout
1736
- * @memberOf Query
1737
- * @instance
1738
- * @param {number} ms number of milliseconds to wait
1739
- * @see mongodb https://docs.mongodb.com/manual/reference/write-concern/#wtimeout
1740
- * @return {Query} this
1741
- * @api public
1742
- */
1743
-
1744
- Query.prototype.wtimeout = Query.prototype.wTimeout = function wtimeout(ms) {
1745
- this.options.wtimeout = ms;
1746
- return this;
1747
- };
1748
-
1749
- /**
1750
- * Merges another Query or conditions object into this one.
1751
- *
1752
- * When a Query is passed, conditions, field selection and options are merged.
1753
- *
1754
- * @param {Query|Object} source
1755
- * @return {Query} this
1756
- */
1757
-
1758
- Query.prototype.merge = function(source) {
1759
- if (!source)
1760
- return this;
1761
-
1762
- if (!Query.canMerge(source))
1763
- throw new TypeError('Invalid argument. Expected instanceof mquery or plain object');
1764
-
1765
- if (source instanceof Query) {
1766
- // if source has a feature, apply it to ourselves
1767
-
1768
- if (source._conditions) {
1769
- utils.merge(this._conditions, source._conditions);
1770
- }
1771
-
1772
- if (source._fields) {
1773
- this._fields || (this._fields = {});
1774
- utils.merge(this._fields, source._fields);
1775
- }
1776
-
1777
- if (source.options) {
1778
- this.options || (this.options = {});
1779
- utils.merge(this.options, source.options);
1780
- }
1781
-
1782
- if (source._updateDoc) {
1783
- this._updateDoc || (this._updateDoc = {});
1784
- utils.mergeClone(this._updateDoc, source._updateDoc);
1785
- }
1786
-
1787
- if (source._distinctDoc) {
1788
- this._distinctDoc = source._distinctDoc;
1789
- }
1790
-
1791
- return this;
1792
- }
1793
-
1794
- // plain object
1795
- utils.merge(this._conditions, source);
1796
-
1797
- return this;
1798
- };
1799
-
1800
- /**
1801
- * Finds documents.
1802
- *
1803
- * #### Example:
1804
- *
1805
- * query.find()
1806
- * await query.find()
1807
- * await query.find({ name: 'Burning Lights' })
1808
- *
1809
- * @param {Object} [criteria] mongodb selector
1810
- * @return {Query} this
1811
- * @api public
1812
- */
1813
-
1814
- Query.prototype.find = function(criteria) {
1815
- this.op = 'find';
1816
-
1817
- if (Query.canMerge(criteria)) {
1818
- this.merge(criteria);
1819
- }
1820
-
1821
- return this;
1822
- };
1823
-
1824
- /**
1825
- * Executes a `find` Query
1826
- * @returns the result
1827
- */
1828
- Query.prototype._find = async function _find() {
1829
- const conds = this._conditions;
1830
- const options = this._optionsForExec();
1831
-
1832
- if (this.$useProjection) {
1833
- options.projection = this._fieldsForExec();
1834
- } else {
1835
- options.fields = this._fieldsForExec();
1836
- }
1837
-
1838
- debug('find', this._collection.collectionName, conds, options);
1839
-
1840
- return this._collection.find(conds, options);
1841
- };
1842
-
1843
- /**
1844
- * Returns the query cursor
1845
- *
1846
- * #### Examples:
1847
- *
1848
- * query.find().cursor();
1849
- * query.cursor({ name: 'Burning Lights' });
1850
- *
1851
- * @param {Object} [criteria] mongodb selector
1852
- * @return {Object} cursor
1853
- * @api public
1854
- */
1855
-
1856
- Query.prototype.cursor = function cursor(criteria) {
1857
- if (this.op) {
1858
- if (this.op !== 'find') {
1859
- throw new TypeError('.cursor only support .find method');
1860
- }
1861
- } else {
1862
- this.find(criteria);
1863
- }
1864
-
1865
- const conds = this._conditions;
1866
- const options = this._optionsForExec();
1867
-
1868
- if (this.$useProjection) {
1869
- options.projection = this._fieldsForExec();
1870
- } else {
1871
- options.fields = this._fieldsForExec();
1872
- }
1873
-
1874
- debug('findCursor', this._collection.collectionName, conds, options);
1875
-
1876
- return this._collection.findCursor(conds, options);
1877
- };
1878
-
1879
- /**
1880
- * Executes the query as a findOne() operation.
1881
- *
1882
- * #### Example:
1883
- *
1884
- * query.findOne().where('name', /^Burning/);
1885
- *
1886
- * query.findOne({ name: /^Burning/ })
1887
- *
1888
- * await query.findOne({ name: /^Burning/ }); // executes
1889
- *
1890
- * @param {Object|Query} [criteria] mongodb selector
1891
- * @return {Query} this
1892
- * @api public
1893
- */
1894
-
1895
- Query.prototype.findOne = function(criteria) {
1896
- this.op = 'findOne';
1897
-
1898
- if (Query.canMerge(criteria)) {
1899
- this.merge(criteria);
1900
- }
1901
-
1902
- return this;
1903
- };
1904
-
1905
- /**
1906
- * Executes a `findOne` Query
1907
- * @returns the results
1908
- */
1909
- Query.prototype._findOne = async function _findOne() {
1910
- const conds = this._conditions;
1911
- const options = this._optionsForExec();
1912
-
1913
- if (this.$useProjection) {
1914
- options.projection = this._fieldsForExec();
1915
- } else {
1916
- options.fields = this._fieldsForExec();
1917
- }
1918
-
1919
- debug('findOne', this._collection.collectionName, conds, options);
1920
-
1921
- return this._collection.findOne(conds, options);
1922
- };
1923
-
1924
- /**
1925
- * Executes the query as a countDocuments() operation.
1926
- *
1927
- * #### Example:
1928
- *
1929
- * query.countDocuments().where('color', 'black').exec();
1930
- *
1931
- * query.countDocuments({ color: 'black' })
1932
- *
1933
- * await query.countDocuments({ color: 'black' });
1934
- *
1935
- * const count = await query.where('color', 'black').countDocuments();
1936
- * console.log('there are %d kittens', count);
1937
- *
1938
- * @param {Object} [filter] mongodb selector
1939
- * @return {Query} this
1940
- * @api public
1941
- */
1942
-
1943
- Query.prototype.countDocuments = function(filter) {
1944
- this.op = 'countDocuments';
1945
- this._validate();
1946
-
1947
- if (Query.canMerge(filter)) {
1948
- this.merge(filter);
1949
- }
1950
-
1951
- return this;
1952
- };
1953
-
1954
- /**
1955
- * Executes a `countDocuments` Query
1956
- * @returns the results
1957
- */
1958
- Query.prototype._countDocuments = async function _countDocuments() {
1959
- const conds = this._conditions;
1960
- const options = this._optionsForExec();
1961
-
1962
- debug('countDocuments', this._collection.collectionName, conds, options);
1963
-
1964
- return this._collection.countDocuments(conds, options);
1965
- };
1966
-
1967
- /**
1968
- * Executes the query as a estimatedDocumentCount() operation.
1969
- *
1970
- * #### Example:
1971
- *
1972
- * query.estimatedDocumentCount();
1973
- *
1974
- * const count = await query.estimatedDocumentCount();
1975
- * console.log('there are %d kittens', count);
1976
- *
1977
- * @return {Query} this
1978
- * @api public
1979
- */
1980
-
1981
- Query.prototype.estimatedDocumentCount = function() {
1982
- this.op = 'estimatedDocumentCount';
1983
- this._validate();
1984
-
1985
- return this;
1986
- };
1987
-
1988
- /**
1989
- * Executes a `count` Query
1990
- * @returns the results
1991
- */
1992
- Query.prototype._estimatedDocumentCount = async function _estimatedDocumentCount() {
1993
- const conds = this._conditions;
1994
- const options = this._optionsForExec();
1995
- debug('estimatedDocumentCount', this._collection.collectionName, conds, options);
1996
- return this._collection.estimatedDocumentCount(conds, options);
1997
- };
1998
-
1999
- /**
2000
- * Declares or executes a distinct() operation.
2001
- *
2002
- * #### Example:
2003
- *
2004
- * await distinct(criteria, field)
2005
- * distinct(criteria, field)
2006
- * await distinct(field)
2007
- * distinct(field)
2008
- * await distinct()
2009
- * distinct()
2010
- *
2011
- * @param {Object|Query} [criteria]
2012
- * @param {String} [field]
2013
- * @return {Query} this
2014
- * @see mongodb http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Distinct
2015
- * @api public
2016
- */
2017
-
2018
- Query.prototype.distinct = function(criteria, field) {
2019
- this.op = 'distinct';
2020
- this._validate();
2021
-
2022
- if (!field && typeof criteria === 'string') {
2023
- field = criteria;
2024
- criteria = undefined;
2025
- }
2026
-
2027
- if ('string' == typeof field) {
2028
- this._distinctDoc = field;
2029
- }
2030
-
2031
- if (Query.canMerge(criteria)) {
2032
- this.merge(criteria);
2033
- }
2034
-
2035
- return this;
2036
- };
2037
-
2038
- /**
2039
- * Executes a `distinct` Query
2040
- * @returns the results
2041
- */
2042
- Query.prototype._distinct = async function _distinct() {
2043
- if (!this._distinctDoc) {
2044
- throw new Error('No value for `distinct` has been declared');
2045
- }
2046
-
2047
- const conds = this._conditions,
2048
- options = this._optionsForExec();
2049
-
2050
- return this._collection.distinct(this._distinctDoc, conds, options);
2051
- };
2052
-
2053
- /**
2054
- * Declare and/or execute this query as an `updateMany()` operation. This function will update _all_ documents that match
2055
- * `criteria`, rather than just the first one.
2056
- *
2057
- * _All paths passed that are not $atomic operations will become $set ops._
2058
- *
2059
- * #### Example:
2060
- *
2061
- * // Update every document whose `title` contains 'test'
2062
- * mquery().updateMany({ title: /test/ }, { year: 2017 })
2063
- *
2064
- * @param {Object} [criteria]
2065
- * @param {Object} [doc] the update command
2066
- * @param {Object} [options]
2067
- * @return {Query} this
2068
- * @api public
2069
- */
2070
-
2071
- Query.prototype.updateMany = function updateMany(criteria, doc, options) {
2072
- return _update(this, 'updateMany', criteria, doc, options);
2073
- };
2074
-
2075
- /**
2076
- * Executes a `updateMany` Query
2077
- * @returns the results
2078
- */
2079
- Query.prototype._updateMany = async function() {
2080
- return _updateExec(this, 'updateMany');
2081
- };
2082
-
2083
- /**
2084
- * Declare and/or execute this query as an `updateOne()` operation. This function will _always_ update just one document,
2085
- * regardless of the `multi` option.
2086
- *
2087
- * _All paths passed that are not $atomic operations will become $set ops._
2088
- *
2089
- * #### Example:
2090
- *
2091
- * // Update the first document whose `title` contains 'test'
2092
- * mquery().updateMany({ title: /test/ }, { year: 2017 })
2093
- *
2094
- * @param {Object} [criteria]
2095
- * @param {Object} [doc] the update command
2096
- * @param {Object} [options]
2097
- * @return {Query} this
2098
- * @api public
2099
- */
2100
-
2101
- Query.prototype.updateOne = function updateOne(criteria, doc, options) {
2102
- return _update(this, 'updateOne', criteria, doc, options);
2103
- };
2104
-
2105
- /**
2106
- * Executes a `updateOne` Query
2107
- * @returns the results
2108
- */
2109
- Query.prototype._updateOne = async function() {
2110
- return _updateExec(this, 'updateOne');
2111
- };
2112
-
2113
- /**
2114
- * Declare and/or execute this query as an `replaceOne()` operation. Similar
2115
- * to `updateOne()`, except `replaceOne()` is not allowed to use atomic
2116
- * modifiers (`$set`, `$push`, etc.). Calling `replaceOne()` will always
2117
- * replace the existing doc.
2118
- *
2119
- * #### Example:
2120
- *
2121
- * // Replace the document with `_id` 1 with `{ _id: 1, year: 2017 }`
2122
- * mquery().replaceOne({ _id: 1 }, { year: 2017 })
2123
- *
2124
- * @param {Object} [criteria]
2125
- * @param {Object} [doc] the update command
2126
- * @param {Object} [options]
2127
- * @return {Query} this
2128
- * @api public
2129
- */
2130
-
2131
- Query.prototype.replaceOne = function replaceOne(criteria, doc, options) {
2132
- this.setOptions({ overwrite: true });
2133
- return _update(this, 'replaceOne', criteria, doc, options);
2134
- };
2135
-
2136
- /**
2137
- * Executes a `replaceOne` Query
2138
- * @returns the results
2139
- */
2140
- Query.prototype._replaceOne = async function() {
2141
- return _updateExec(this, 'replaceOne');
2142
- };
2143
-
2144
- /*!
2145
- * Internal helper for updateMany, updateOne
2146
- */
2147
-
2148
- function _update(query, op, criteria, doc, options) {
2149
- query.op = op;
2150
-
2151
- if (Query.canMerge(criteria)) {
2152
- query.merge(criteria);
2153
- }
2154
-
2155
- if (doc) {
2156
- query._mergeUpdate(doc);
2157
- }
2158
-
2159
- if (utils.isObject(options)) {
2160
- // { overwrite: true }
2161
- query.setOptions(options);
2162
- }
2163
-
2164
- return query;
2165
- }
2166
-
2167
- /**
2168
- * Helper for de-duplicating "update*" functions
2169
- * @param {Query} query The Query Object (replacement for "this")
2170
- * @param {String} op The Operation to be done
2171
- * @returns the results
2172
- */
2173
- async function _updateExec(query, op) {
2174
- const options = query._optionsForExec();
2175
-
2176
- const criteria = query._conditions;
2177
- const doc = query._updateForExec();
2178
-
2179
- debug(op, query._collection.collectionName, criteria, doc, options);
2180
- return query._collection[op](criteria, doc, options);
2181
- }
2182
-
2183
- /**
2184
- * Declare and/or execute this query as a `deleteOne()` operation.
2185
- *
2186
- * #### Example:
2187
- *
2188
- * await mquery(collection).deleteOne({ artist: 'Anne Murray' })
2189
- *
2190
- * @param {Object|Query} [criteria] mongodb selector
2191
- * @return {Query} this
2192
- * @api public
2193
- */
2194
-
2195
- Query.prototype.deleteOne = function(criteria) {
2196
- this.op = 'deleteOne';
2197
-
2198
- if (Query.canMerge(criteria)) {
2199
- this.merge(criteria);
2200
- }
2201
-
2202
- return this;
2203
- };
2204
-
2205
- /**
2206
- * Executes a `deleteOne` Query
2207
- * @returns the results
2208
- */
2209
- Query.prototype._deleteOne = async function() {
2210
- const options = this._optionsForExec();
2211
- delete options.justOne;
2212
-
2213
- const conds = this._conditions;
2214
-
2215
- debug('deleteOne', this._collection.collectionName, conds, options);
2216
- return this._collection.deleteOne(conds, options);
2217
- };
2218
-
2219
- /**
2220
- * Declare and/or execute this query as a `deleteMany()` operation. Always deletes
2221
- * _every_ document that matches `criteria`.
2222
- *
2223
- * #### Example:
2224
- *
2225
- * await mquery(collection).deleteMany({ artist: 'Anne Murray' })
2226
- *
2227
- * @param {Object|Query} [criteria] mongodb selector
2228
- * @return {Query} this
2229
- * @api public
2230
- */
2231
-
2232
- Query.prototype.deleteMany = function(criteria) {
2233
- this.op = 'deleteMany';
2234
-
2235
- if (Query.canMerge(criteria)) {
2236
- this.merge(criteria);
2237
- }
2238
-
2239
- return this;
2240
- };
2241
-
2242
- /**
2243
- * Executes a `deleteMany` Query
2244
- * @returns the results
2245
- */
2246
- Query.prototype._deleteMany = async function() {
2247
- const options = this._optionsForExec();
2248
- delete options.justOne;
2249
-
2250
- const conds = this._conditions;
2251
-
2252
- return this._collection.deleteMany(conds, options);
2253
- };
2254
-
2255
- /**
2256
- * Issues a mongodb findOneAndUpdate command.
2257
- *
2258
- * Finds a matching document, updates it according to the `update` arg, passing any `options`, and returns the found document (if any).
2259
- *
2260
- * #### Available options
2261
- *
2262
- * - `new`: bool - true to return the modified document rather than the original. defaults to true
2263
- * - `upsert`: bool - creates the object if it doesn't exist. defaults to false.
2264
- * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
2265
- *
2266
- * #### Examples:
2267
- *
2268
- * await query.findOneAndUpdate(conditions, update, options) // executes
2269
- * query.findOneAndUpdate(conditions, update, options) // returns Query
2270
- * await query.findOneAndUpdate(conditions, update) // executes
2271
- * query.findOneAndUpdate(conditions, update) // returns Query
2272
- * await query.findOneAndUpdate(update) // returns Query
2273
- * query.findOneAndUpdate(update) // returns Query
2274
- * await query.findOneAndUpdate() // executes
2275
- * query.findOneAndUpdate() // returns Query
2276
- *
2277
- * @param {Object|Query} [query]
2278
- * @param {Object} [doc]
2279
- * @param {Object} [options]
2280
- * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
2281
- * @return {Query} this
2282
- * @api public
2283
- */
2284
-
2285
- Query.prototype.findOneAndUpdate = function(criteria, doc, options) {
2286
- this.op = 'findOneAndUpdate';
2287
- this._validate();
2288
-
2289
- if (Query.canMerge(criteria)) {
2290
- this.merge(criteria);
2291
- }
2292
-
2293
- // apply doc
2294
- if (doc) {
2295
- this._mergeUpdate(doc);
2296
- }
2297
-
2298
- options && this.setOptions(options);
2299
-
2300
- return this;
2301
- };
2302
-
2303
- /**
2304
- * Executes a `findOneAndUpdate` Query
2305
- * @returns the results
2306
- */
2307
- Query.prototype._findOneAndUpdate = async function() {
2308
- const conds = this._conditions;
2309
- const update = this._updateForExec();
2310
- const options = this._optionsForExec();
2311
-
2312
- return this._collection.findOneAndUpdate(conds, update, options);
2313
- };
2314
-
2315
- /**
2316
- * Issues a mongodb findOneAndReplace command.
2317
- *
2318
- * Finds a matching document, replaces it according to the `replacement` arg, passing any `options`, and returns the found document (if any).
2319
- *
2320
- * #### Available options
2321
- *
2322
- * - `new`: bool - true to return the modified document rather than the original. defaults to true
2323
- * - `upsert`: bool - creates the object if it doesn't exist. defaults to false.
2324
- * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
2325
- *
2326
- * #### Examples:
2327
- *
2328
- * await query.findOneAndReplace(conditions, replacement, options) // executes
2329
- * query.findOneAndReplace(conditions, replacement, options) // returns Query
2330
- * await query.findOneAndReplace(conditions, replacement) // executes
2331
- * query.findOneAndReplace(conditions, replacement) // returns Query
2332
- * await query.findOneAndReplace(replacement) // returns Query
2333
- * query.findOneAndReplace(replacement) // returns Query
2334
- * await query.findOneAndReplace() // executes
2335
- * query.findOneAndReplace() // returns Query
2336
- *
2337
- * @param {Object|Query} [query]
2338
- * @param {Object} [replacement]
2339
- * @param {Object} [options]
2340
- * @see mongodb http://www.mongodb.org/display/DOCS/findAndModify+Command
2341
- * @return {Query} this
2342
- * @api public
2343
- */
2344
-
2345
- Query.prototype.findOneAndReplace = function(criteria, replacement, options) {
2346
- this.op = 'findOneAndReplace';
2347
- this._validate();
2348
-
2349
- if (Query.canMerge(criteria)) {
2350
- this.merge(criteria);
2351
- }
2352
-
2353
- // apply replacement
2354
- if (replacement) {
2355
- this._updateDoc = replacement;
2356
- this.options = this.options || {};
2357
- this.options.overwrite = true;
2358
- }
2359
-
2360
- options && this.setOptions(options);
2361
-
2362
- return this;
2363
- };
2364
-
2365
- /**
2366
- * Executes a `findOneAndReplace` Query
2367
- * @returns the results
2368
- */
2369
- Query.prototype._findOneAndReplace = async function() {
2370
- const conds = this._conditions;
2371
- const replacement = this._updateForExec();
2372
- const options = this._optionsForExec();
2373
-
2374
- debug('findOneAndReplace', this._collection.collectionName, conds, replacement, options);
2375
- return this._collection.findOneAndReplace(conds, replacement, options);
2376
- };
2377
-
2378
- /**
2379
- * Issues a mongodb findOneAndDelete.
2380
- *
2381
- * Finds a matching document, removes it, returning the found document (if any).
2382
- *
2383
- * #### Available options
2384
- *
2385
- * - `sort`: if multiple docs are found by the conditions, sets the sort order to choose which doc to update
2386
- *
2387
- * #### Examples:
2388
- *
2389
- * await A.where().findOneAndDelete(conditions, options) // executes
2390
- * A.where().findOneAndDelete(conditions, options) // return Query
2391
- * await A.where().findOneAndDelete(conditions) // executes
2392
- * A.where().findOneAndDelete(conditions) // returns Query
2393
- * await A.where().findOneAndDelete() // executes
2394
- * A.where().findOneAndDelete() // returns Query
2395
- *
2396
- * @param {Object} [filter]
2397
- * @param {Object} [options]
2398
- * @return {Query} this
2399
- * @api public
2400
- */
2401
-
2402
- Query.prototype.findOneAndDelete = function(filter, options) {
2403
- this.op = 'findOneAndDelete';
2404
- this._validate();
2405
-
2406
- if (Query.canMerge(filter)) {
2407
- this.merge(filter);
2408
- }
2409
-
2410
- // apply options
2411
- options && this.setOptions(options);
2412
-
2413
- return this;
2414
- };
2415
-
2416
- /**
2417
- * Executes a `findOneAndRemove` Query
2418
- * @returns the results
2419
- */
2420
- Query.prototype._findOneAndDelete = async function() {
2421
- const options = this._optionsForExec();
2422
- const conds = this._conditions;
2423
-
2424
- debug('findOneAndDelete', this._collection.collectionName, conds, options);
2425
- return this._collection.findOneAndDelete(conds, options);
2426
- };
2427
-
2428
- /**
2429
- * Add trace function that gets called when the query is executed.
2430
- * The function will be called with (method, queryInfo, query) and
2431
- * should return a callback function which will be called
2432
- * with (err, result, millis) when the query is complete.
2433
- *
2434
- * queryInfo is an object containing: {
2435
- * collectionName: <name of the collection>,
2436
- * conditions: <query criteria>,
2437
- * options: <comment, fields, readPreference, etc>,
2438
- * doc: [document to update, if applicable]
2439
- * }
2440
- *
2441
- * NOTE: Does not trace stream queries.
2442
- *
2443
- * @param {Function} traceFunction
2444
- * @return {Query} this
2445
- * @api public
2446
- */
2447
- Query.prototype.setTraceFunction = function(traceFunction) {
2448
- this._traceFunction = traceFunction;
2449
- return this;
2450
- };
2451
-
2452
- /**
2453
- * Executes the query
2454
- *
2455
- * #### Examples:
2456
- *
2457
- * query.exec();
2458
- * await query.exec();
2459
- * query.exec('update');
2460
- * await query.exec('find');
2461
- *
2462
- * @param {String|Function} [operation]
2463
- * @api public
2464
- */
2465
-
2466
- Query.prototype.exec = async function exec(op) {
2467
- if (typeof op === 'string') {
2468
- this.op = op;
2469
- }
2470
-
2471
- assert.ok(this.op, 'Missing query type: (find, etc)');
2472
-
2473
- const fnName = '_' + this.op;
2474
-
2475
- // better error, because default would list it as "this[fnName] is not a function"
2476
- if (typeof this[fnName] !== 'function') {
2477
- throw new TypeError(`this[${fnName}] is not a function`);
2478
- }
2479
-
2480
- return this[fnName]();
2481
- };
2482
-
2483
- /**
2484
- * Executes the query returning a `Promise` which will be
2485
- * resolved with either the doc(s) or rejected with the error.
2486
- *
2487
- * @param {Function} [resolve]
2488
- * @param {Function} [reject]
2489
- * @return {Promise}
2490
- * @api public
2491
- */
2492
-
2493
- Query.prototype.then = async function(res, rej) {
2494
- return this.exec().then(res, rej);
2495
- };
2496
-
2497
- /**
2498
- * Returns a cursor for the given `find` query.
2499
- *
2500
- * @throws Error if operation is not a find
2501
- * @returns {Cursor} MongoDB driver cursor
2502
- */
2503
-
2504
- Query.prototype.cursor = function() {
2505
- if ('find' != this.op)
2506
- throw new Error('cursor() is only available for find');
2507
-
2508
- const conds = this._conditions;
2509
-
2510
- const options = this._optionsForExec();
2511
- if (this.$useProjection) {
2512
- options.projection = this._fieldsForExec();
2513
- } else {
2514
- options.fields = this._fieldsForExec();
2515
- }
2516
-
2517
- return this._collection.findCursor(conds, options);
2518
- };
2519
-
2520
- /**
2521
- * Determines if field selection has been made.
2522
- *
2523
- * @return {Boolean}
2524
- * @api public
2525
- */
2526
-
2527
- Query.prototype.selected = function selected() {
2528
- return !!(this._fields && Object.keys(this._fields).length > 0);
2529
- };
2530
-
2531
- /**
2532
- * Determines if inclusive field selection has been made.
2533
- *
2534
- * query.selectedInclusively() // false
2535
- * query.select('name')
2536
- * query.selectedInclusively() // true
2537
- * query.selectedExlusively() // false
2538
- *
2539
- * @returns {Boolean}
2540
- */
2541
-
2542
- Query.prototype.selectedInclusively = function selectedInclusively() {
2543
- if (!this._fields) return false;
2544
-
2545
- const keys = Object.keys(this._fields);
2546
- if (0 === keys.length) return false;
2547
-
2548
- for (let i = 0; i < keys.length; ++i) {
2549
- const key = keys[i];
2550
- if (0 === this._fields[key]) return false;
2551
- if (this._fields[key] &&
2552
- typeof this._fields[key] === 'object' &&
2553
- this._fields[key].$meta) {
2554
- return false;
2555
- }
2556
- }
2557
-
2558
- return true;
2559
- };
2560
-
2561
- /**
2562
- * Determines if exclusive field selection has been made.
2563
- *
2564
- * query.selectedExlusively() // false
2565
- * query.select('-name')
2566
- * query.selectedExlusively() // true
2567
- * query.selectedInclusively() // false
2568
- *
2569
- * @returns {Boolean}
2570
- */
2571
-
2572
- Query.prototype.selectedExclusively = function selectedExclusively() {
2573
- if (!this._fields) return false;
2574
-
2575
- const keys = Object.keys(this._fields);
2576
- if (0 === keys.length) return false;
2577
-
2578
- for (let i = 0; i < keys.length; ++i) {
2579
- const key = keys[i];
2580
- if (0 === this._fields[key]) return true;
2581
- }
2582
-
2583
- return false;
2584
- };
2585
-
2586
- /**
2587
- * Merges `doc` with the current update object.
2588
- *
2589
- * @param {Object} doc
2590
- */
2591
-
2592
- Query.prototype._mergeUpdate = function(doc) {
2593
- if (!this._updateDoc) this._updateDoc = {};
2594
- if (doc instanceof Query) {
2595
- if (doc._updateDoc) {
2596
- utils.mergeClone(this._updateDoc, doc._updateDoc);
2597
- }
2598
- } else {
2599
- utils.mergeClone(this._updateDoc, doc);
2600
- }
2601
- };
2602
-
2603
- /**
2604
- * Returns default options.
2605
- *
2606
- * @return {Object}
2607
- * @api private
2608
- */
2609
-
2610
- Query.prototype._optionsForExec = function() {
2611
- const options = utils.clone(this.options);
2612
- return options;
2613
- };
2614
-
2615
- /**
2616
- * Returns fields selection for this query.
2617
- *
2618
- * @return {Object}
2619
- * @api private
2620
- */
2621
-
2622
- Query.prototype._fieldsForExec = function() {
2623
- return utils.clone(this._fields);
2624
- };
2625
-
2626
- /**
2627
- * Return an update document with corrected $set operations.
2628
- *
2629
- * @api private
2630
- */
2631
-
2632
- Query.prototype._updateForExec = function() {
2633
- const update = this._updateDoc == null ? {} : utils.clone(this._updateDoc);
2634
- const ops = utils.keys(update);
2635
- const ret = {};
2636
-
2637
- for (const op of ops) {
2638
- if (this.options.overwrite) {
2639
- ret[op] = update[op];
2640
- continue;
2641
- }
2642
-
2643
- if ('$' !== op[0]) {
2644
- // fix up $set sugar
2645
- if (!ret.$set) {
2646
- if (update.$set) {
2647
- ret.$set = update.$set;
2648
- } else {
2649
- ret.$set = {};
2650
- }
2651
- }
2652
- ret.$set[op] = update[op];
2653
- if (!~ops.indexOf('$set')) ops.push('$set');
2654
- } else if ('$set' === op) {
2655
- if (!ret.$set) {
2656
- ret[op] = update[op];
2657
- }
2658
- } else {
2659
- ret[op] = update[op];
2660
- }
2661
- }
2662
-
2663
- this._compiledUpdate = ret;
2664
- return ret;
2665
- };
2666
-
2667
- /**
2668
- * Make sure _path is set.
2669
- *
2670
- * @parmam {String} method
2671
- */
2672
-
2673
- Query.prototype._ensurePath = function(method) {
2674
- if (!this._path) {
2675
- const msg = method + '() must be used after where() '
2676
- + 'when called with these arguments';
2677
- throw new Error(msg);
2678
- }
2679
- };
2680
-
2681
- /*!
2682
- * Permissions
2683
- */
2684
-
2685
- Query.permissions = require('./permissions');
2686
-
2687
- Query._isPermitted = function(a, b) {
2688
- const denied = Query.permissions[b];
2689
- if (!denied) return true;
2690
- return true !== denied[a];
2691
- };
2692
-
2693
- Query.prototype._validate = function(action) {
2694
- let fail;
2695
- let validator;
2696
-
2697
- if (undefined === action) {
2698
-
2699
- validator = Query.permissions[this.op];
2700
- if ('function' != typeof validator) return true;
2701
-
2702
- fail = validator(this);
2703
-
2704
- } else if (!Query._isPermitted(action, this.op)) {
2705
- fail = action;
2706
- }
2707
-
2708
- if (fail) {
2709
- throw new Error(fail + ' cannot be used with ' + this.op);
2710
- }
2711
- };
2712
-
2713
- /**
2714
- * Determines if `conds` can be merged using `mquery().merge()`
2715
- *
2716
- * @param {Object} conds
2717
- * @return {Boolean}
2718
- */
2719
-
2720
- Query.canMerge = function(conds) {
2721
- return conds instanceof Query || utils.isObject(conds);
2722
- };
2723
-
2724
- /**
2725
- * Set a trace function that will get called whenever a
2726
- * query is executed.
2727
- *
2728
- * See `setTraceFunction()` for details.
2729
- *
2730
- * @param {Object} conds
2731
- * @return {Boolean}
2732
- */
2733
- Query.setGlobalTraceFunction = function(traceFunction) {
2734
- Query.traceFunction = traceFunction;
2735
- };
2736
-
2737
- /*!
2738
- * Exports.
2739
- */
2740
-
2741
- Query.utils = utils;
2742
- Query.env = require('./env');
2743
- Query.Collection = require('./collection');
2744
- Query.BaseCollection = require('./collection/collection');
2745
- module.exports = exports = Query;
2746
-
2747
- // TODO
2748
- // test utils