orcaq 1.0.32 → 1.1.1

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 (628) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/4by6-f6q.js +982 -0
  3. package/.output/public/_nuxt/8Ppmjv9D.js +1 -0
  4. package/.output/public/_nuxt/B1qjkRVO.js +1 -0
  5. package/.output/public/_nuxt/B3KEisfc.js +1 -0
  6. package/.output/public/_nuxt/B4ebLeWY.js +9 -0
  7. package/.output/public/_nuxt/{IitECNfD.js → B6hH0qos.js} +1 -1
  8. package/.output/public/_nuxt/{BUDtG__q.js → B7HEMfgt.js} +1 -1
  9. package/.output/public/_nuxt/B84SvUzr.js +1 -0
  10. package/.output/public/_nuxt/BDXvbRNW.js +1 -0
  11. package/.output/public/_nuxt/BGRcizqy.js +1 -0
  12. package/.output/public/_nuxt/{ClYziJpO.js → BGVGiigU.js} +1 -1
  13. package/.output/public/_nuxt/{ZdjmUBoX.js → BJYf67_H.js} +1 -1
  14. package/.output/public/_nuxt/BOK5ZFNK.js +1 -0
  15. package/.output/public/_nuxt/BPY2ud8g.js +1 -0
  16. package/.output/public/_nuxt/BSONoRG4.js +2 -0
  17. package/.output/public/_nuxt/BT53m-su.js +1 -0
  18. package/.output/public/_nuxt/BTJSh8in.js +2 -0
  19. package/.output/public/_nuxt/BVpt8J3a.js +1 -0
  20. package/.output/public/_nuxt/{BhUkpIlA.js → BdDEVolW.js} +1 -1
  21. package/.output/public/_nuxt/{C27bL9Es.js → BeNILdbT.js} +1 -1
  22. package/.output/public/_nuxt/{Dnx67EG9.js → BmU9CNkM.js} +1 -1
  23. package/.output/public/_nuxt/{DLHYqHwF.js → BnFDcr74.js} +1 -1
  24. package/.output/public/_nuxt/{sE-55p4e.js → BprXyYdv.js} +1 -1
  25. package/.output/public/_nuxt/{BCcTASq_.js → Bq7otXBA.js} +1 -1
  26. package/.output/public/_nuxt/{B_PBOfFN.js → BqyO8OjC.js} +93 -93
  27. package/.output/public/_nuxt/Bs1og3h1.js +10 -0
  28. package/.output/public/_nuxt/Bs2DgR_z.js +1 -0
  29. package/.output/public/_nuxt/{BsoQBloB.js → BvUhrUEH.js} +1 -1
  30. package/.output/public/_nuxt/{DkggUtNN.js → BxDrCsPf.js} +1 -1
  31. package/.output/public/_nuxt/BxrwrGYE.js +1 -0
  32. package/.output/public/_nuxt/By0aUn7N.js +1 -0
  33. package/.output/public/_nuxt/{C07rlnlv.js → ByOuUnNS.js} +1 -1
  34. package/.output/public/_nuxt/C177_GoB.js +1 -0
  35. package/.output/public/_nuxt/{DcfsxCxL.js → C1jMZ4hc.js} +1 -1
  36. package/.output/public/_nuxt/C5bgdIOp.js +1 -0
  37. package/.output/public/_nuxt/C69a9jD3.js +67 -0
  38. package/.output/public/_nuxt/C8AyZ3_X.js +2 -0
  39. package/.output/public/_nuxt/C8KplD68.js +1 -0
  40. package/.output/public/_nuxt/CA99KAte.js +3 -0
  41. package/.output/public/_nuxt/{CvTHaPAO.js → CE8aasoy.js} +1 -1
  42. package/.output/public/_nuxt/{DkY69STm.js → CEvNlevo.js} +1 -1
  43. package/.output/public/_nuxt/{B8JnYxjr.js → CKqvNpN3.js} +1 -1
  44. package/.output/public/_nuxt/CNF1h1lI.js +1 -0
  45. package/.output/public/_nuxt/COAycMg4.js +1 -0
  46. package/.output/public/_nuxt/CR6_eO9a.js +6 -0
  47. package/.output/public/_nuxt/{D4jn2f-6.js → CREZ9f0O.js} +4 -4
  48. package/.output/public/_nuxt/CS5ItJPR.js +39 -0
  49. package/.output/public/_nuxt/CcK14gfI.js +1 -0
  50. package/.output/public/_nuxt/{DnxDSFih.js → Ci43mke5.js} +3 -3
  51. package/.output/public/_nuxt/CjouDEjz.js +1 -0
  52. package/.output/public/_nuxt/Cp5lMcfd.js +1 -0
  53. package/.output/public/_nuxt/CpYiq1Wv.js +1 -0
  54. package/.output/public/_nuxt/{DVxTxYP4.js → CrLqg4B0.js} +1 -1
  55. package/.output/public/_nuxt/{BJxYuvXF.js → CvcedJeQ.js} +1 -1
  56. package/.output/public/_nuxt/{FIJP2AmN.js → Cvq07PgE.js} +1 -1
  57. package/.output/public/_nuxt/CwmbX4-U.js +1 -0
  58. package/.output/public/_nuxt/{B27ECqWz.js → Cx6s86aR.js} +1 -1
  59. package/.output/public/_nuxt/{DDYV6jDr.js → CybtvDjH.js} +1 -1
  60. package/.output/public/_nuxt/CzB2y8br.js +18 -0
  61. package/.output/public/_nuxt/{-p9JbKy8.js → D-YUpbah.js} +3 -3
  62. package/.output/public/_nuxt/D60Pzl_V.js +1 -0
  63. package/.output/public/_nuxt/D9BYd7AV.js +1 -0
  64. package/.output/public/_nuxt/D9dEqMyH.js +152 -0
  65. package/.output/public/_nuxt/DCJ49Fnq.js +1 -0
  66. package/.output/public/_nuxt/{gO22NLpn.js → DESYlybj.js} +1 -1
  67. package/.output/public/_nuxt/DFM-aCBX.js +1 -0
  68. package/.output/public/_nuxt/{DRKnK1N_.js → DHnNoguE.js} +1 -1
  69. package/.output/public/_nuxt/{ChkFTcxr.js → DJqZzQsX.js} +1 -1
  70. package/.output/public/_nuxt/DNNdcUH4.js +1 -0
  71. package/.output/public/_nuxt/{LFK46Fls.js → DNdM2ZyK.js} +1 -1
  72. package/.output/public/_nuxt/{CVliJ52o.js → DQT4eICL.js} +1 -1
  73. package/.output/public/_nuxt/{CffFK_qY.js → DWBoXz89.js} +1 -1
  74. package/.output/public/_nuxt/DXp9fCib.js +20 -0
  75. package/.output/public/_nuxt/{ACOLmAuq.js → DaKikgWm.js} +1 -1
  76. package/.output/public/_nuxt/{B9zSkyFO.js → DaMyovpr.js} +1 -1
  77. package/.output/public/_nuxt/DeBdxlx0.js +1 -0
  78. package/.output/public/_nuxt/{trZyeId5.js → DhKwXzSk.js} +1 -1
  79. package/.output/public/_nuxt/{C6Vqzp-9.js → DkadXn5U.js} +1 -1
  80. package/.output/public/_nuxt/Dkikh2OC.js +22 -0
  81. package/.output/public/_nuxt/DlOyXrKK.js +1 -0
  82. package/.output/public/_nuxt/{UqWhjgOc.js → Dpl6-lqE.js} +1 -1
  83. package/.output/public/_nuxt/DqA_edEU.js +1 -0
  84. package/.output/public/_nuxt/DqxL2Lpl.js +1 -0
  85. package/.output/public/_nuxt/Dt3rfvTn.js +1 -0
  86. package/.output/public/_nuxt/Dt5h0Tys.js +1 -0
  87. package/.output/public/_nuxt/DwrSZ8Vj.js +1 -0
  88. package/.output/public/_nuxt/DwyFZZT6.js +1 -0
  89. package/.output/public/_nuxt/EM8J-XL1.js +7 -0
  90. package/.output/public/_nuxt/ESKvsKwc.js +1 -0
  91. package/.output/public/_nuxt/{CWGdTiOD.js → F5lCgNdb.js} +1 -1
  92. package/.output/public/_nuxt/H5m89x1B.js +1 -0
  93. package/.output/public/_nuxt/{CwdIiq6J.js → PUe8M07P.js} +2 -2
  94. package/.output/public/_nuxt/{Cjgqfl1g.js → TEF-nDfP.js} +1 -1
  95. package/.output/public/_nuxt/{DNZpxuwM.js → TuKV3Ilv.js} +1 -1
  96. package/.output/public/_nuxt/V5LvXMJl.js +1 -0
  97. package/.output/public/_nuxt/{c_huf6xz.js → YJvNy3iu.js} +27 -27
  98. package/.output/public/_nuxt/{C7C8tPlA.js → ZObQcd0X.js} +1 -1
  99. package/.output/public/_nuxt/{CHOD7i6O.js → b_MfGg1c.js} +1 -1
  100. package/.output/public/_nuxt/builds/latest.json +1 -1
  101. package/.output/public/_nuxt/builds/meta/455d4da4-6357-4478-8703-78a79ccbbc0f.json +1 -0
  102. package/.output/public/_nuxt/entry.qdzR7QFr.css +1 -0
  103. package/.output/public/_nuxt/fpuEgQ7C.js +12 -0
  104. package/.output/public/_nuxt/jU7fkvuR.js +1 -0
  105. package/.output/public/_nuxt/{CSTzT9hP.js → lHkFwi3L.js} +1 -1
  106. package/.output/public/_nuxt/{BQOaPJzs.js → minLMBmY.js} +1 -1
  107. package/.output/public/_nuxt/pQ8l8BR2.js +1 -0
  108. package/.output/public/_nuxt/xYXqL1eV.js +1 -0
  109. package/.output/public/_nuxt/xxfb8w7n.js +1 -0
  110. package/.output/server/chunks/_/create-adapter.mjs +36 -7
  111. package/.output/server/chunks/_/create-adapter.mjs.map +1 -1
  112. package/.output/server/chunks/_/database-error.mjs +10 -0
  113. package/.output/server/chunks/_/database-error.mjs.map +1 -1
  114. package/.output/server/chunks/_/database-roles.factory.mjs +126 -22
  115. package/.output/server/chunks/_/database-roles.factory.mjs.map +1 -1
  116. package/.output/server/chunks/_/db-connection.mjs +721 -81
  117. package/.output/server/chunks/_/db-connection.mjs.map +1 -1
  118. package/.output/server/chunks/_/functions.factory.mjs +97 -6
  119. package/.output/server/chunks/_/functions.factory.mjs.map +1 -1
  120. package/.output/server/chunks/_/instance-insights.factory.mjs +106 -7
  121. package/.output/server/chunks/_/instance-insights.factory.mjs.map +1 -1
  122. package/.output/server/chunks/_/metadata.factory.mjs +912 -43
  123. package/.output/server/chunks/_/metadata.factory.mjs.map +1 -1
  124. package/.output/server/chunks/_/native-backup-jobs.mjs +1302 -0
  125. package/.output/server/chunks/_/native-backup-jobs.mjs.map +1 -0
  126. package/.output/server/chunks/_/query.factory.mjs +536 -14
  127. package/.output/server/chunks/_/query.factory.mjs.map +1 -1
  128. package/.output/server/chunks/_/schemaMeta.type.mjs +13 -0
  129. package/.output/server/chunks/_/schemaMeta.type.mjs.map +1 -0
  130. package/.output/server/chunks/_/tables.factory.mjs +905 -37
  131. package/.output/server/chunks/_/tables.factory.mjs.map +1 -1
  132. package/.output/server/chunks/_/type-alias.constants.mjs +242 -0
  133. package/.output/server/chunks/_/type-alias.constants.mjs.map +1 -0
  134. package/.output/server/chunks/_/views.factory.mjs +106 -8
  135. package/.output/server/chunks/_/views.factory.mjs.map +1 -1
  136. package/.output/server/chunks/build/client.manifest.mjs +676 -672
  137. package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
  138. package/.output/server/chunks/nitro/nitro.mjs +1046 -751
  139. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  140. package/.output/server/chunks/routes/api/ai/agent.mjs +30 -79
  141. package/.output/server/chunks/routes/api/ai/agent.mjs.map +1 -1
  142. package/.output/server/chunks/routes/api/database-export/export-database.mjs +26 -124
  143. package/.output/server/chunks/routes/api/database-export/export-database.mjs.map +1 -1
  144. package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs +52 -0
  145. package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs.map +1 -0
  146. package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs +43 -0
  147. package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs.map +1 -0
  148. package/.output/server/chunks/routes/api/database-import/import-database.mjs +69 -134
  149. package/.output/server/chunks/routes/api/database-import/import-database.mjs.map +1 -1
  150. package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs +43 -0
  151. package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs.map +1 -0
  152. package/.output/server/chunks/routes/api/database-roles/create-role.mjs +2 -0
  153. package/.output/server/chunks/routes/api/database-roles/create-role.mjs.map +1 -1
  154. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs +2 -0
  155. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs.map +1 -1
  156. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs +2 -0
  157. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs.map +1 -1
  158. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs +2 -0
  159. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs.map +1 -1
  160. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs +2 -0
  161. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs.map +1 -1
  162. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs +2 -0
  163. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs.map +1 -1
  164. package/.output/server/chunks/routes/api/database-roles/get-role.mjs +2 -0
  165. package/.output/server/chunks/routes/api/database-roles/get-role.mjs.map +1 -1
  166. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs +2 -0
  167. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs.map +1 -1
  168. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs +2 -0
  169. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs.map +1 -1
  170. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs +2 -0
  171. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs.map +1 -1
  172. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs +2 -0
  173. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs.map +1 -1
  174. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs +2 -0
  175. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs.map +1 -1
  176. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs +2 -0
  177. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs.map +1 -1
  178. package/.output/server/chunks/routes/api/functions/definition.post.mjs +3 -1
  179. package/.output/server/chunks/routes/api/functions/definition.post.mjs.map +1 -1
  180. package/.output/server/chunks/routes/api/functions/delete.post.mjs +3 -1
  181. package/.output/server/chunks/routes/api/functions/delete.post.mjs.map +1 -1
  182. package/.output/server/chunks/routes/api/functions/overview.post.mjs +3 -1
  183. package/.output/server/chunks/routes/api/functions/overview.post.mjs.map +1 -1
  184. package/.output/server/chunks/routes/api/functions/rename.post.mjs +3 -1
  185. package/.output/server/chunks/routes/api/functions/rename.post.mjs.map +1 -1
  186. package/.output/server/chunks/routes/api/functions/signature.post.mjs +3 -1
  187. package/.output/server/chunks/routes/api/functions/signature.post.mjs.map +1 -1
  188. package/.output/server/chunks/routes/api/functions/update.post.mjs +24 -6
  189. package/.output/server/chunks/routes/api/functions/update.post.mjs.map +1 -1
  190. package/.output/server/chunks/routes/api/index.post.mjs +63 -0
  191. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -0
  192. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs +2 -0
  193. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs.map +1 -1
  194. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs +2 -0
  195. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs.map +1 -1
  196. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs +2 -0
  197. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs.map +1 -1
  198. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs +2 -0
  199. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs.map +1 -1
  200. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs +2 -0
  201. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs.map +1 -1
  202. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs +2 -0
  203. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs.map +1 -1
  204. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs +2 -0
  205. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs.map +1 -1
  206. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs +2 -0
  207. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs.map +1 -1
  208. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +10 -4
  209. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -1
  210. package/.output/server/chunks/routes/api/metadata/erd.post.mjs +4 -0
  211. package/.output/server/chunks/routes/api/metadata/erd.post.mjs.map +1 -1
  212. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs +4 -0
  213. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs.map +1 -1
  214. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs +4 -0
  215. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs.map +1 -1
  216. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs +80 -7
  217. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs.map +1 -1
  218. package/.output/server/chunks/routes/api/query/execute.post.mjs +3 -1
  219. package/.output/server/chunks/routes/api/query/execute.post.mjs.map +1 -1
  220. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs +3 -1
  221. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs.map +1 -1
  222. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs +3 -1
  223. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs.map +1 -1
  224. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs +3 -1
  225. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs.map +1 -1
  226. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs +3 -1
  227. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs.map +1 -1
  228. package/.output/server/chunks/routes/api/tables/ddl.post.mjs +3 -1
  229. package/.output/server/chunks/routes/api/tables/ddl.post.mjs.map +1 -1
  230. package/.output/server/chunks/routes/api/tables/export.post.mjs +4 -2
  231. package/.output/server/chunks/routes/api/tables/export.post.mjs.map +1 -1
  232. package/.output/server/chunks/routes/api/tables/indexes.post.mjs +3 -1
  233. package/.output/server/chunks/routes/api/tables/indexes.post.mjs.map +1 -1
  234. package/.output/server/chunks/routes/api/tables/meta.post.mjs +3 -1
  235. package/.output/server/chunks/routes/api/tables/meta.post.mjs.map +1 -1
  236. package/.output/server/chunks/routes/api/tables/overview.post.mjs +3 -1
  237. package/.output/server/chunks/routes/api/tables/overview.post.mjs.map +1 -1
  238. package/.output/server/chunks/routes/api/tables/rls.post.mjs +3 -1
  239. package/.output/server/chunks/routes/api/tables/rls.post.mjs.map +1 -1
  240. package/.output/server/chunks/routes/api/tables/rules.post.mjs +3 -1
  241. package/.output/server/chunks/routes/api/tables/rules.post.mjs.map +1 -1
  242. package/.output/server/chunks/routes/api/tables/size.post.mjs +3 -1
  243. package/.output/server/chunks/routes/api/tables/size.post.mjs.map +1 -1
  244. package/.output/server/chunks/routes/api/tables/structure.post.mjs +3 -1
  245. package/.output/server/chunks/routes/api/tables/structure.post.mjs.map +1 -1
  246. package/.output/server/chunks/routes/api/tables/triggers.post.mjs +3 -1
  247. package/.output/server/chunks/routes/api/tables/triggers.post.mjs.map +1 -1
  248. package/.output/server/chunks/routes/api/views/definition.post.mjs +2 -0
  249. package/.output/server/chunks/routes/api/views/definition.post.mjs.map +1 -1
  250. package/.output/server/chunks/routes/api/views/dependencies.post.mjs +2 -0
  251. package/.output/server/chunks/routes/api/views/dependencies.post.mjs.map +1 -1
  252. package/.output/server/chunks/routes/api/views/explain.post.mjs +2 -0
  253. package/.output/server/chunks/routes/api/views/explain.post.mjs.map +1 -1
  254. package/.output/server/chunks/routes/api/views/indexes.post.mjs +2 -0
  255. package/.output/server/chunks/routes/api/views/indexes.post.mjs.map +1 -1
  256. package/.output/server/chunks/routes/api/views/meta.post.mjs +2 -0
  257. package/.output/server/chunks/routes/api/views/meta.post.mjs.map +1 -1
  258. package/.output/server/chunks/routes/api/views/overview.post.mjs +2 -0
  259. package/.output/server/chunks/routes/api/views/overview.post.mjs.map +1 -1
  260. package/.output/server/chunks/routes/renderer.mjs +1 -1
  261. package/.output/server/index.mjs +1 -1
  262. package/.output/server/node_modules/aws-ssl-profiles/lib/index.js +13 -0
  263. package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js +2888 -0
  264. package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js +111 -0
  265. package/.output/server/node_modules/aws-ssl-profiles/package.json +52 -0
  266. package/.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  267. package/.output/server/node_modules/better-sqlite3/lib/database.js +90 -0
  268. package/.output/server/node_modules/better-sqlite3/lib/index.js +3 -0
  269. package/.output/server/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  270. package/.output/server/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  271. package/.output/server/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  272. package/.output/server/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  273. package/.output/server/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  274. package/.output/server/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  275. package/.output/server/node_modules/better-sqlite3/lib/methods/table.js +189 -0
  276. package/.output/server/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  277. package/.output/server/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  278. package/.output/server/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
  279. package/.output/server/node_modules/better-sqlite3/lib/util.js +12 -0
  280. package/.output/server/node_modules/better-sqlite3/package.json +59 -0
  281. package/.output/server/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
  282. package/.output/server/node_modules/cpu-features/lib/index.js +5 -0
  283. package/.output/server/node_modules/cpu-features/package.json +40 -0
  284. package/.output/server/node_modules/denque/index.js +481 -0
  285. package/.output/server/node_modules/denque/package.json +58 -0
  286. package/.output/server/node_modules/generate-function/index.js +181 -0
  287. package/.output/server/node_modules/generate-function/package.json +32 -0
  288. package/.output/server/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  289. package/.output/server/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  290. package/.output/server/node_modules/iconv-lite/encodings/index.js +23 -0
  291. package/.output/server/node_modules/iconv-lite/encodings/internal.js +218 -0
  292. package/.output/server/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  293. package/.output/server/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  294. package/.output/server/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  295. package/.output/server/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  296. package/.output/server/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  297. package/.output/server/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  298. package/.output/server/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  299. package/.output/server/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  300. package/.output/server/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  301. package/.output/server/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  302. package/.output/server/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  303. package/.output/server/node_modules/iconv-lite/encodings/utf16.js +187 -0
  304. package/.output/server/node_modules/iconv-lite/encodings/utf32.js +307 -0
  305. package/.output/server/node_modules/iconv-lite/encodings/utf7.js +283 -0
  306. package/.output/server/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  307. package/.output/server/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  308. package/.output/server/node_modules/iconv-lite/lib/index.js +182 -0
  309. package/.output/server/node_modules/iconv-lite/lib/streams.js +105 -0
  310. package/.output/server/node_modules/iconv-lite/package.json +70 -0
  311. package/.output/server/node_modules/is-property/is-property.js +5 -0
  312. package/.output/server/node_modules/is-property/package.json +36 -0
  313. package/.output/server/node_modules/long/package.json +58 -0
  314. package/.output/server/node_modules/long/umd/index.js +1622 -0
  315. package/.output/server/node_modules/long/umd/package.json +3 -0
  316. package/.output/server/node_modules/lru.min/lib/index.js +248 -0
  317. package/.output/server/node_modules/lru.min/package.json +87 -0
  318. package/.output/server/node_modules/mysql2/index.js +77 -0
  319. package/.output/server/node_modules/mysql2/lib/auth_41.js +95 -0
  320. package/.output/server/node_modules/mysql2/lib/auth_plugins/caching_sha2_password.js +115 -0
  321. package/.output/server/node_modules/mysql2/lib/auth_plugins/index.js +8 -0
  322. package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_clear_password.js +17 -0
  323. package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_native_password.js +34 -0
  324. package/.output/server/node_modules/mysql2/lib/auth_plugins/sha256_password.js +74 -0
  325. package/.output/server/node_modules/mysql2/lib/base/connection.js +1139 -0
  326. package/.output/server/node_modules/mysql2/lib/base/pool.js +343 -0
  327. package/.output/server/node_modules/mysql2/lib/commands/auth_switch.js +151 -0
  328. package/.output/server/node_modules/mysql2/lib/commands/binlog_dump.js +109 -0
  329. package/.output/server/node_modules/mysql2/lib/commands/change_user.js +68 -0
  330. package/.output/server/node_modules/mysql2/lib/commands/client_handshake.js +386 -0
  331. package/.output/server/node_modules/mysql2/lib/commands/close_statement.js +18 -0
  332. package/.output/server/node_modules/mysql2/lib/commands/command.js +54 -0
  333. package/.output/server/node_modules/mysql2/lib/commands/execute.js +116 -0
  334. package/.output/server/node_modules/mysql2/lib/commands/index.js +29 -0
  335. package/.output/server/node_modules/mysql2/lib/commands/ping.js +36 -0
  336. package/.output/server/node_modules/mysql2/lib/commands/prepare.js +143 -0
  337. package/.output/server/node_modules/mysql2/lib/commands/query.js +365 -0
  338. package/.output/server/node_modules/mysql2/lib/commands/quit.js +29 -0
  339. package/.output/server/node_modules/mysql2/lib/commands/register_slave.js +27 -0
  340. package/.output/server/node_modules/mysql2/lib/commands/reset_connection.js +29 -0
  341. package/.output/server/node_modules/mysql2/lib/commands/server_handshake.js +205 -0
  342. package/.output/server/node_modules/mysql2/lib/compressed_protocol.js +153 -0
  343. package/.output/server/node_modules/mysql2/lib/connection.js +12 -0
  344. package/.output/server/node_modules/mysql2/lib/connection_config.js +299 -0
  345. package/.output/server/node_modules/mysql2/lib/constants/charset_encodings.js +317 -0
  346. package/.output/server/node_modules/mysql2/lib/constants/charsets.js +317 -0
  347. package/.output/server/node_modules/mysql2/lib/constants/client.js +39 -0
  348. package/.output/server/node_modules/mysql2/lib/constants/commands.js +37 -0
  349. package/.output/server/node_modules/mysql2/lib/constants/cursor.js +9 -0
  350. package/.output/server/node_modules/mysql2/lib/constants/encoding_charset.js +50 -0
  351. package/.output/server/node_modules/mysql2/lib/constants/errors.js +3973 -0
  352. package/.output/server/node_modules/mysql2/lib/constants/field_flags.js +20 -0
  353. package/.output/server/node_modules/mysql2/lib/constants/server_status.js +44 -0
  354. package/.output/server/node_modules/mysql2/lib/constants/session_track.js +11 -0
  355. package/.output/server/node_modules/mysql2/lib/constants/ssl_profiles.js +11 -0
  356. package/.output/server/node_modules/mysql2/lib/constants/types.js +64 -0
  357. package/.output/server/node_modules/mysql2/lib/create_connection.js +10 -0
  358. package/.output/server/node_modules/mysql2/lib/create_pool.js +10 -0
  359. package/.output/server/node_modules/mysql2/lib/create_pool_cluster.js +9 -0
  360. package/.output/server/node_modules/mysql2/lib/helpers.js +83 -0
  361. package/.output/server/node_modules/mysql2/lib/packet_parser.js +195 -0
  362. package/.output/server/node_modules/mysql2/lib/packets/auth_next_factor.js +35 -0
  363. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request.js +38 -0
  364. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request_more_data.js +33 -0
  365. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_response.js +30 -0
  366. package/.output/server/node_modules/mysql2/lib/packets/binary_row.js +95 -0
  367. package/.output/server/node_modules/mysql2/lib/packets/binlog_dump.js +33 -0
  368. package/.output/server/node_modules/mysql2/lib/packets/binlog_query_statusvars.js +115 -0
  369. package/.output/server/node_modules/mysql2/lib/packets/change_user.js +97 -0
  370. package/.output/server/node_modules/mysql2/lib/packets/close_statement.js +21 -0
  371. package/.output/server/node_modules/mysql2/lib/packets/column_definition.js +291 -0
  372. package/.output/server/node_modules/mysql2/lib/packets/encode_parameter.js +69 -0
  373. package/.output/server/node_modules/mysql2/lib/packets/execute.js +177 -0
  374. package/.output/server/node_modules/mysql2/lib/packets/handshake.js +112 -0
  375. package/.output/server/node_modules/mysql2/lib/packets/handshake_response.js +173 -0
  376. package/.output/server/node_modules/mysql2/lib/packets/index.js +154 -0
  377. package/.output/server/node_modules/mysql2/lib/packets/packet.js +978 -0
  378. package/.output/server/node_modules/mysql2/lib/packets/prepare_statement.js +27 -0
  379. package/.output/server/node_modules/mysql2/lib/packets/prepared_statement_header.js +16 -0
  380. package/.output/server/node_modules/mysql2/lib/packets/query.js +102 -0
  381. package/.output/server/node_modules/mysql2/lib/packets/register_slave.js +46 -0
  382. package/.output/server/node_modules/mysql2/lib/packets/reset_connection.js +17 -0
  383. package/.output/server/node_modules/mysql2/lib/packets/resultset_header.js +124 -0
  384. package/.output/server/node_modules/mysql2/lib/packets/ssl_request.js +25 -0
  385. package/.output/server/node_modules/mysql2/lib/packets/text_row.js +47 -0
  386. package/.output/server/node_modules/mysql2/lib/parsers/binary_parser.js +235 -0
  387. package/.output/server/node_modules/mysql2/lib/parsers/parser_cache.js +68 -0
  388. package/.output/server/node_modules/mysql2/lib/parsers/static_binary_parser.js +213 -0
  389. package/.output/server/node_modules/mysql2/lib/parsers/static_text_parser.js +152 -0
  390. package/.output/server/node_modules/mysql2/lib/parsers/string.js +50 -0
  391. package/.output/server/node_modules/mysql2/lib/parsers/text_parser.js +214 -0
  392. package/.output/server/node_modules/mysql2/lib/pool.js +12 -0
  393. package/.output/server/node_modules/mysql2/lib/pool_cluster.js +375 -0
  394. package/.output/server/node_modules/mysql2/lib/pool_config.js +34 -0
  395. package/.output/server/node_modules/mysql2/lib/pool_connection.js +81 -0
  396. package/.output/server/node_modules/mysql2/lib/promise/capture_local_err.js +25 -0
  397. package/.output/server/node_modules/mysql2/lib/promise/connection.js +237 -0
  398. package/.output/server/node_modules/mysql2/lib/promise/inherit_events.js +27 -0
  399. package/.output/server/node_modules/mysql2/lib/promise/make_done_cb.js +16 -0
  400. package/.output/server/node_modules/mysql2/lib/promise/pool.js +118 -0
  401. package/.output/server/node_modules/mysql2/lib/promise/pool_cluster.js +59 -0
  402. package/.output/server/node_modules/mysql2/lib/promise/pool_connection.js +19 -0
  403. package/.output/server/node_modules/mysql2/lib/promise/prepared_statement_info.js +35 -0
  404. package/.output/server/node_modules/mysql2/lib/server.js +37 -0
  405. package/.output/server/node_modules/mysql2/lib/tracing.js +81 -0
  406. package/.output/server/node_modules/mysql2/package.json +95 -0
  407. package/.output/server/node_modules/mysql2/promise.js +209 -0
  408. package/.output/server/node_modules/named-placeholders/index.js +179 -0
  409. package/.output/server/node_modules/named-placeholders/package.json +36 -0
  410. package/.output/server/node_modules/oracledb/index.js +27 -0
  411. package/.output/server/node_modules/oracledb/lib/aqDeqOptions.js +186 -0
  412. package/.output/server/node_modules/oracledb/lib/aqEnqOptions.js +81 -0
  413. package/.output/server/node_modules/oracledb/lib/aqMessage.js +149 -0
  414. package/.output/server/node_modules/oracledb/lib/aqQueue.js +293 -0
  415. package/.output/server/node_modules/oracledb/lib/connection.js +1842 -0
  416. package/.output/server/node_modules/oracledb/lib/constants.js +210 -0
  417. package/.output/server/node_modules/oracledb/lib/dbObject.js +606 -0
  418. package/.output/server/node_modules/oracledb/lib/errors.js +1046 -0
  419. package/.output/server/node_modules/oracledb/lib/future.js +53 -0
  420. package/.output/server/node_modules/oracledb/lib/impl/aqDeqOptions.js +206 -0
  421. package/.output/server/node_modules/oracledb/lib/impl/aqEnqOptions.js +89 -0
  422. package/.output/server/node_modules/oracledb/lib/impl/aqMessage.js +134 -0
  423. package/.output/server/node_modules/oracledb/lib/impl/aqQueue.js +82 -0
  424. package/.output/server/node_modules/oracledb/lib/impl/base.js +45 -0
  425. package/.output/server/node_modules/oracledb/lib/impl/connection.js +671 -0
  426. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/buffer.js +1214 -0
  427. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/constants.js +110 -0
  428. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/oson.js +852 -0
  429. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/vector.js +197 -0
  430. package/.output/server/node_modules/oracledb/lib/impl/dbObject.js +159 -0
  431. package/.output/server/node_modules/oracledb/lib/impl/index.js +59 -0
  432. package/.output/server/node_modules/oracledb/lib/impl/lob.js +113 -0
  433. package/.output/server/node_modules/oracledb/lib/impl/pool.js +230 -0
  434. package/.output/server/node_modules/oracledb/lib/impl/resultset.js +307 -0
  435. package/.output/server/node_modules/oracledb/lib/impl/sodaCollection.js +175 -0
  436. package/.output/server/node_modules/oracledb/lib/impl/sodaDatabase.js +82 -0
  437. package/.output/server/node_modules/oracledb/lib/impl/sodaDocCursor.js +64 -0
  438. package/.output/server/node_modules/oracledb/lib/impl/sodaDocument.js +89 -0
  439. package/.output/server/node_modules/oracledb/lib/impl/sodaOperation.js +110 -0
  440. package/.output/server/node_modules/oracledb/lib/lob.js +315 -0
  441. package/.output/server/node_modules/oracledb/lib/oracledb.js +1716 -0
  442. package/.output/server/node_modules/oracledb/lib/pool.js +873 -0
  443. package/.output/server/node_modules/oracledb/lib/poolStatistics.js +143 -0
  444. package/.output/server/node_modules/oracledb/lib/queryStream.js +119 -0
  445. package/.output/server/node_modules/oracledb/lib/resultset.js +368 -0
  446. package/.output/server/node_modules/oracledb/lib/settings.js +221 -0
  447. package/.output/server/node_modules/oracledb/lib/sodaCollection.js +284 -0
  448. package/.output/server/node_modules/oracledb/lib/sodaDatabase.js +176 -0
  449. package/.output/server/node_modules/oracledb/lib/sodaDocCursor.js +82 -0
  450. package/.output/server/node_modules/oracledb/lib/sodaDocument.js +125 -0
  451. package/.output/server/node_modules/oracledb/lib/sodaOperation.js +236 -0
  452. package/.output/server/node_modules/oracledb/lib/thin/aq.js +475 -0
  453. package/.output/server/node_modules/oracledb/lib/thin/connection.js +1504 -0
  454. package/.output/server/node_modules/oracledb/lib/thin/dbObject.js +737 -0
  455. package/.output/server/node_modules/oracledb/lib/thin/index.js +40 -0
  456. package/.output/server/node_modules/oracledb/lib/thin/lob.js +380 -0
  457. package/.output/server/node_modules/oracledb/lib/thin/pool.js +738 -0
  458. package/.output/server/node_modules/oracledb/lib/thin/protocol/capabilities.js +145 -0
  459. package/.output/server/node_modules/oracledb/lib/thin/protocol/constants.js +872 -0
  460. package/.output/server/node_modules/oracledb/lib/thin/protocol/encryptDecrypt.js +197 -0
  461. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqArray.js +238 -0
  462. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqBase.js +305 -0
  463. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqDeq.js +164 -0
  464. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqEnq.js +135 -0
  465. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/auth.js +376 -0
  466. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/base.js +568 -0
  467. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/commit.js +56 -0
  468. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/dataType.js +401 -0
  469. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/execute.js +358 -0
  470. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fastAuth.js +83 -0
  471. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fetch.js +64 -0
  472. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/index.js +59 -0
  473. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/lobOp.js +195 -0
  474. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/logOff.js +52 -0
  475. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/ping.js +56 -0
  476. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/protocol.js +97 -0
  477. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/rollback.js +56 -0
  478. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/sessionRelease.js +60 -0
  479. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionChangeState.js +99 -0
  480. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionSwitch.js +147 -0
  481. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/withData.js +920 -0
  482. package/.output/server/node_modules/oracledb/lib/thin/protocol/packet.js +631 -0
  483. package/.output/server/node_modules/oracledb/lib/thin/protocol/protocol.js +240 -0
  484. package/.output/server/node_modules/oracledb/lib/thin/protocol/utils.js +82 -0
  485. package/.output/server/node_modules/oracledb/lib/thin/resultSet.js +122 -0
  486. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ANO.js +438 -0
  487. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/connStrategy.js +316 -0
  488. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/constants.js +210 -0
  489. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ezConnectResolver.js +466 -0
  490. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/navNodes.js +904 -0
  491. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/networkSession.js +733 -0
  492. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js +609 -0
  493. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/nvStrToNvPair.js +780 -0
  494. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/packet.js +439 -0
  495. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/paramParser.js +239 -0
  496. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/sessionAtts.js +198 -0
  497. package/.output/server/node_modules/oracledb/lib/thin/statement.js +573 -0
  498. package/.output/server/node_modules/oracledb/lib/thin/statementCache.js +195 -0
  499. package/.output/server/node_modules/oracledb/lib/thin/util.js +254 -0
  500. package/.output/server/node_modules/oracledb/lib/traceHandler.js +133 -0
  501. package/.output/server/node_modules/oracledb/lib/transformer.js +279 -0
  502. package/.output/server/node_modules/oracledb/lib/types.js +592 -0
  503. package/.output/server/node_modules/oracledb/lib/util.js +648 -0
  504. package/.output/server/node_modules/oracledb/lib/version.js +36 -0
  505. package/.output/server/node_modules/oracledb/package.json +48 -0
  506. package/.output/server/node_modules/sql-escaper/lib/index.js +398 -0
  507. package/.output/server/node_modules/sql-escaper/package.json +81 -0
  508. package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
  509. package/.output/server/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
  510. package/.output/server/package.json +14 -18
  511. package/package.json +2 -2
  512. package/.output/public/_nuxt/019vQzZn.js +0 -1
  513. package/.output/public/_nuxt/0lRW_xjL.js +0 -1
  514. package/.output/public/_nuxt/B6EI6PpE.js +0 -1
  515. package/.output/public/_nuxt/B9Mt45db.js +0 -1
  516. package/.output/public/_nuxt/BKltSiU0.js +0 -1
  517. package/.output/public/_nuxt/BM4vnZvX.js +0 -732
  518. package/.output/public/_nuxt/BNYR501z.js +0 -1
  519. package/.output/public/_nuxt/BVLVn__t.js +0 -9
  520. package/.output/public/_nuxt/BY1l0S_M.js +0 -1
  521. package/.output/public/_nuxt/BaseCodeEditor.SAr2eD8R.css +0 -1
  522. package/.output/public/_nuxt/BcvJQkv0.js +0 -1
  523. package/.output/public/_nuxt/BdN9B2_l.js +0 -160
  524. package/.output/public/_nuxt/BflvengI.js +0 -1
  525. package/.output/public/_nuxt/BgolbRTO.js +0 -1
  526. package/.output/public/_nuxt/BwISH3M4.js +0 -1
  527. package/.output/public/_nuxt/C-M4q4KX.js +0 -1
  528. package/.output/public/_nuxt/C2Ziircr.js +0 -1
  529. package/.output/public/_nuxt/C3NWXcpd.js +0 -39
  530. package/.output/public/_nuxt/C5p44jKD.js +0 -1
  531. package/.output/public/_nuxt/C617vhDd.js +0 -1
  532. package/.output/public/_nuxt/C8S0o4Gy.js +0 -1
  533. package/.output/public/_nuxt/CNlsVoWh.js +0 -1
  534. package/.output/public/_nuxt/CWkPMmwS.js +0 -2
  535. package/.output/public/_nuxt/Cgy4ijjN.js +0 -67
  536. package/.output/public/_nuxt/ClBBUcFW.js +0 -1
  537. package/.output/public/_nuxt/CuRyxljq.js +0 -1
  538. package/.output/public/_nuxt/Cx4Bnfq1.js +0 -2
  539. package/.output/public/_nuxt/D-H6_V16.js +0 -1
  540. package/.output/public/_nuxt/D-SDqguC.js +0 -1
  541. package/.output/public/_nuxt/D-XwprNU.js +0 -6
  542. package/.output/public/_nuxt/D3G5Xy_-.js +0 -1
  543. package/.output/public/_nuxt/D9o5Pdvp.js +0 -1
  544. package/.output/public/_nuxt/DFArp87o.js +0 -1
  545. package/.output/public/_nuxt/DFZIXzfU.js +0 -1
  546. package/.output/public/_nuxt/DHRNt0p9.js +0 -1
  547. package/.output/public/_nuxt/DLKku6fV.js +0 -1
  548. package/.output/public/_nuxt/DWgjNKGq.js +0 -152
  549. package/.output/public/_nuxt/DYm57BZk.js +0 -2
  550. package/.output/public/_nuxt/DaQw8gVp.js +0 -1
  551. package/.output/public/_nuxt/DgnsV5Qb.js +0 -1
  552. package/.output/public/_nuxt/Do5Fyo7J.js +0 -1
  553. package/.output/public/_nuxt/Dqirx7MF.js +0 -1
  554. package/.output/public/_nuxt/GoTwJjoS.js +0 -39
  555. package/.output/public/_nuxt/Hs25HoUO.js +0 -22
  556. package/.output/public/_nuxt/J2CvNR3L.js +0 -1
  557. package/.output/public/_nuxt/LK6Q8l0D.js +0 -1
  558. package/.output/public/_nuxt/Oh9SO2qg.js +0 -1
  559. package/.output/public/_nuxt/P_8UoGnr.js +0 -72
  560. package/.output/public/_nuxt/V5yaR3hv.js +0 -2
  561. package/.output/public/_nuxt/XWTuAj6n.js +0 -1
  562. package/.output/public/_nuxt/XqwbcqcW.js +0 -1
  563. package/.output/public/_nuxt/Yzrsuije.js +0 -1
  564. package/.output/public/_nuxt/_8UrUcVF.js +0 -1
  565. package/.output/public/_nuxt/builds/meta/27a307c3-bfc5-4ccd-94b8-387eb94981bb.json +0 -1
  566. package/.output/public/_nuxt/cKBf5-av.js +0 -1
  567. package/.output/public/_nuxt/entry.DeK5kcSi.css +0 -1
  568. package/.output/public/_nuxt/kc-op4gz.js +0 -12
  569. package/.output/public/_nuxt/kehy-5uo.js +0 -1
  570. package/.output/public/_nuxt/lSaGvORn.js +0 -10
  571. package/.output/public/_nuxt/lY3EyFEK.js +0 -1
  572. package/.output/public/_nuxt/tMhdAKU2.js +0 -3
  573. package/.output/public/_nuxt/uyCIL8xw.js +0 -1
  574. package/.output/server/node_modules/cross-spawn/index.js +0 -39
  575. package/.output/server/node_modules/cross-spawn/lib/enoent.js +0 -59
  576. package/.output/server/node_modules/cross-spawn/lib/parse.js +0 -91
  577. package/.output/server/node_modules/cross-spawn/lib/util/escape.js +0 -47
  578. package/.output/server/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
  579. package/.output/server/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
  580. package/.output/server/node_modules/cross-spawn/package.json +0 -73
  581. package/.output/server/node_modules/execa/index.js +0 -268
  582. package/.output/server/node_modules/execa/lib/command.js +0 -52
  583. package/.output/server/node_modules/execa/lib/error.js +0 -88
  584. package/.output/server/node_modules/execa/lib/kill.js +0 -115
  585. package/.output/server/node_modules/execa/lib/promise.js +0 -46
  586. package/.output/server/node_modules/execa/lib/stdio.js +0 -52
  587. package/.output/server/node_modules/execa/lib/stream.js +0 -97
  588. package/.output/server/node_modules/execa/package.json +0 -74
  589. package/.output/server/node_modules/get-stream/buffer-stream.js +0 -52
  590. package/.output/server/node_modules/get-stream/index.js +0 -61
  591. package/.output/server/node_modules/get-stream/package.json +0 -47
  592. package/.output/server/node_modules/human-signals/build/src/core.js +0 -273
  593. package/.output/server/node_modules/human-signals/build/src/main.js +0 -71
  594. package/.output/server/node_modules/human-signals/build/src/realtime.js +0 -19
  595. package/.output/server/node_modules/human-signals/build/src/signals.js +0 -35
  596. package/.output/server/node_modules/human-signals/package.json +0 -64
  597. package/.output/server/node_modules/is-stream/index.js +0 -28
  598. package/.output/server/node_modules/is-stream/package.json +0 -42
  599. package/.output/server/node_modules/isexe/index.js +0 -57
  600. package/.output/server/node_modules/isexe/mode.js +0 -41
  601. package/.output/server/node_modules/isexe/package.json +0 -31
  602. package/.output/server/node_modules/isexe/windows.js +0 -42
  603. package/.output/server/node_modules/merge-stream/index.js +0 -41
  604. package/.output/server/node_modules/merge-stream/package.json +0 -19
  605. package/.output/server/node_modules/mimic-fn/index.js +0 -13
  606. package/.output/server/node_modules/mimic-fn/package.json +0 -42
  607. package/.output/server/node_modules/npm-run-path/index.js +0 -47
  608. package/.output/server/node_modules/npm-run-path/package.json +0 -44
  609. package/.output/server/node_modules/onetime/index.js +0 -44
  610. package/.output/server/node_modules/onetime/package.json +0 -43
  611. package/.output/server/node_modules/path-key/index.js +0 -16
  612. package/.output/server/node_modules/path-key/package.json +0 -39
  613. package/.output/server/node_modules/pg-dump-restore/lib/common.js +0 -33
  614. package/.output/server/node_modules/pg-dump-restore/lib/index.js +0 -9
  615. package/.output/server/node_modules/pg-dump-restore/lib/pg-dump.js +0 -95
  616. package/.output/server/node_modules/pg-dump-restore/lib/pg-restore.js +0 -87
  617. package/.output/server/node_modules/pg-dump-restore/package.json +0 -66
  618. package/.output/server/node_modules/shebang-command/index.js +0 -19
  619. package/.output/server/node_modules/shebang-command/package.json +0 -34
  620. package/.output/server/node_modules/shebang-regex/index.js +0 -2
  621. package/.output/server/node_modules/shebang-regex/package.json +0 -35
  622. package/.output/server/node_modules/signal-exit/index.js +0 -202
  623. package/.output/server/node_modules/signal-exit/package.json +0 -38
  624. package/.output/server/node_modules/signal-exit/signals.js +0 -53
  625. package/.output/server/node_modules/strip-final-newline/index.js +0 -16
  626. package/.output/server/node_modules/strip-final-newline/package.json +0 -40
  627. package/.output/server/node_modules/which/package.json +0 -43
  628. package/.output/server/node_modules/which/which.js +0 -125
@@ -0,0 +1,1214 @@
1
+ // Copyright (c) 2022, 2025, Oracle and/or its affiliates.
2
+
3
+ //-----------------------------------------------------------------------------
4
+ //
5
+ // This software is dual-licensed to you under the Universal Permissive License
6
+ // (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
7
+ // 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
8
+ // either license.
9
+ //
10
+ // If you elect to accept the software under the Apache License, Version 2.0,
11
+ // the following applies:
12
+ //
13
+ // Licensed under the Apache License, Version 2.0 (the "License");
14
+ // you may not use this file except in compliance with the License.
15
+ // You may obtain a copy of the License at
16
+ //
17
+ // https://www.apache.org/licenses/LICENSE-2.0
18
+ //
19
+ // Unless required by applicable law or agreed to in writing, software
20
+ // distributed under the License is distributed on an "AS IS" BASIS,
21
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ // See the License for the specific language governing permissions and
23
+ // limitations under the License.
24
+ //
25
+ //-----------------------------------------------------------------------------
26
+
27
+ 'use strict';
28
+
29
+ const { Buffer } = require('buffer');
30
+ const constants = require("./constants.js");
31
+ const errors = require("../../errors.js");
32
+ const types = require("../../types.js");
33
+ const nodbUtil = require("../../util.js");
34
+
35
+ /**
36
+ * Base buffer class used for managing buffered data without unnecessary
37
+ * copying.
38
+ */
39
+ class BaseBuffer {
40
+
41
+ //---------------------------------------------------------------------------
42
+ // constructor()
43
+ //
44
+ // The initializer is either an integer specifying the size of the buffer, or
45
+ // an existing Buffer, which is used directly.
46
+ //---------------------------------------------------------------------------
47
+ constructor(initializer) {
48
+ if (typeof initializer === 'number') {
49
+ this.buf = Buffer.alloc(initializer);
50
+ this.size = 0;
51
+ this.maxSize = initializer;
52
+ } else if (initializer) {
53
+ this.buf = initializer;
54
+ this.size = this.maxSize = initializer.length;
55
+ }
56
+ this.pos = 0;
57
+ }
58
+
59
+ //---------------------------------------------------------------------------
60
+ // _grow()
61
+ //
62
+ // Called when the buffer needs to grow. The base function simply raises an
63
+ // error.
64
+ //---------------------------------------------------------------------------
65
+ _grow(numBytes) {
66
+ errors.throwErr(errors.ERR_BUFFER_LENGTH_INSUFFICIENT, this.numBytesLeft(),
67
+ numBytes);
68
+ }
69
+
70
+ //---------------------------------------------------------------------------
71
+ // _readBytesWithLength()
72
+ //
73
+ // Helper function that processes the number of bytes (if needed) and then
74
+ // acquires the specified number of bytes from the buffer. The base function
75
+ // simply uses the length as given.
76
+ //---------------------------------------------------------------------------
77
+ _readBytesWithLength(numBytes) {
78
+ return this.readBytes(numBytes);
79
+ }
80
+
81
+ //---------------------------------------------------------------------------
82
+ // _readInteger()
83
+ //
84
+ // Read an integer from the buffer of the specified maximum size and returns
85
+ // it. The signed flag indicates whether the value is allowed to be signed or
86
+ // not and the skip flag indicates whether the data should simply be skipped.
87
+ //---------------------------------------------------------------------------
88
+ _readInteger(maxSize, signed, skip) {
89
+ let isNegative = false;
90
+ let size = this.readUInt8();
91
+ if (size === 0) {
92
+ return 0;
93
+ } else if (size & 0x80) {
94
+ if (!signed) {
95
+ errors.throwErr(errors.ERR_UNEXPECTED_NEGATIVE_INTEGER, this.pos, this.packetNum);
96
+ }
97
+ isNegative = true;
98
+ size = size & 0x7f;
99
+ }
100
+ if (size > maxSize) {
101
+ errors.throwErr(errors.ERR_INTEGER_TOO_LARGE, size, maxSize, this.pos, this.packetNum);
102
+ }
103
+ if (skip) {
104
+ this.skipBytes(size);
105
+ } else {
106
+ const buf = this.readBytes(size);
107
+ const value = buf.readUIntBE(0, size);
108
+ return (isNegative) ? -value : value;
109
+ }
110
+ }
111
+
112
+ //---------------------------------------------------------------------------
113
+ // numBytesLeft()
114
+ //
115
+ // Returns the number of bytes that are remaining in the buffer.
116
+ //---------------------------------------------------------------------------
117
+ numBytesLeft() {
118
+ return this.size - this.pos;
119
+ }
120
+
121
+ //---------------------------------------------------------------------------
122
+ // parseBinaryDouble()
123
+ //
124
+ // Parses a binary double from the supplied buffer and returns a Number.
125
+ // It is assumed at this point that the size of the buffer is 8 bytes. A copy
126
+ // is made of the buffer in order to ensure that the original buffer is not
127
+ // modified. If it is and data spans multiple packets, incorrect data may be
128
+ // returned!
129
+ //---------------------------------------------------------------------------
130
+ parseBinaryDouble(buf) {
131
+ buf = Buffer.from(buf);
132
+ if (buf[0] & 0x80) {
133
+ buf[0] &= 0x7f;
134
+ } else {
135
+ // complement the bits for a negative number
136
+ buf[0] ^= 0xff;
137
+ buf[1] ^= 0xff;
138
+ buf[2] ^= 0xff;
139
+ buf[3] ^= 0xff;
140
+ buf[4] ^= 0xff;
141
+ buf[5] ^= 0xff;
142
+ buf[6] ^= 0xff;
143
+ buf[7] ^= 0xff;
144
+ }
145
+ return buf.readDoubleBE();
146
+ }
147
+
148
+ //---------------------------------------------------------------------------
149
+ // parseBinaryFloat()
150
+ //
151
+ // Parses a binary float from the supplied buffer and returns a Number. It
152
+ // is assumed at this point that the size of the buffer is 4 bytes. A copy is
153
+ // made of the buffer in order to ensure that the original buffer is not
154
+ // modified. If it is and data spans multiple packets, incorrect data may be
155
+ // returned!
156
+ //---------------------------------------------------------------------------
157
+ parseBinaryFloat(buf) {
158
+ buf = Buffer.from(buf);
159
+ if (buf[0] & 0x80) {
160
+ buf[0] &= 0x7f;
161
+ } else {
162
+ // complement the bits for a negative number
163
+ buf[0] ^= 0xff;
164
+ buf[1] ^= 0xff;
165
+ buf[2] ^= 0xff;
166
+ buf[3] ^= 0xff;
167
+ }
168
+ return buf.readFloatBE();
169
+ }
170
+
171
+ //---------------------------------------------------------------------------
172
+ // parseOracleDate()
173
+ //
174
+ // Parses an Oracle date from the supplied buffer and returns a Date. It is
175
+ // assumed at this point that the size of the buffer is either 7 bytes (date
176
+ // or compressed timestamp), 11 bytes (timestamp) or 13 bytes (timestamp with
177
+ // time zone). Time zone information is discarded because Node.js uses UTC
178
+ // timestamps and the server returns the data in that format, too. The Date
179
+ // type in Node.js doesn't support time zone information.
180
+ //---------------------------------------------------------------------------
181
+ parseOracleDate(buf, useLocalTime = true) {
182
+ let fseconds = 0;
183
+ if (buf.length >= 11) {
184
+ fseconds = Math.floor(buf.readUInt32BE(7) / (1000 * 1000));
185
+ }
186
+ const year = (buf[0] - 100) * 100 + buf[1] - 100;
187
+ return nodbUtil.makeDate(useLocalTime, year, buf[2], buf[3], buf[4] - 1,
188
+ buf[5] - 1, buf[6] - 1, fseconds, 0);
189
+ }
190
+
191
+ //---------------------------------------------------------------------------
192
+ // parseOracleIntervalYM()
193
+ //
194
+ // Parses an Oracle interval year-to-month (YM) from the supplied buffer
195
+ // and returns a corresponding IntervalYM object representing that value.
196
+ // This object contains attributes for years and months.
197
+ //---------------------------------------------------------------------------
198
+ parseOracleIntervalYM(buf) {
199
+ const years = buf.readUInt32BE() - constants.TNS_DURATION_MID;
200
+ const months = buf[4] - constants.TNS_DURATION_OFFSET;
201
+ return new types.IntervalYM({ years: years, months: months });
202
+ }
203
+
204
+ //---------------------------------------------------------------------------
205
+ // parseOracleIntervalDS()
206
+ //
207
+ // Parses an Oracle interval day-to-second (DS) from the supplied buffer
208
+ // and returns a corresponding IntervalDS object representing that value.
209
+ // This object contains attributes for day and time units.
210
+ //---------------------------------------------------------------------------
211
+ parseOracleIntervalDS(buf) {
212
+ const days = buf.readUInt32BE() - constants.TNS_DURATION_MID;
213
+ const fseconds = buf.readUInt32BE(7) - constants.TNS_DURATION_MID;
214
+ const hours = buf[4] - constants.TNS_DURATION_OFFSET;
215
+ const minutes = buf[5] - constants.TNS_DURATION_OFFSET;
216
+ const seconds = buf[6] - constants.TNS_DURATION_OFFSET;
217
+ return new types.IntervalDS({ days: days, hours: hours, minutes: minutes,
218
+ seconds: seconds, fseconds: fseconds });
219
+ }
220
+
221
+ //---------------------------------------------------------------------------
222
+ // parseOracleNumber()
223
+ //
224
+ // Parses an Oracle number from the supplied buffer and returns a Number. It
225
+ // is assumed at this point that the buffer only contains the encoded numeric
226
+ // data.
227
+ //---------------------------------------------------------------------------
228
+ parseOracleNumber(buf) {
229
+
230
+ // the first byte is the exponent; positive numbers have the highest
231
+ // order bit set, whereas negative numbers have the highest order bit
232
+ // cleared and the bits inverted
233
+ let exponent = buf[0];
234
+ const isPositive = Boolean(exponent & 0x80);
235
+ if (!isPositive) {
236
+ exponent = (exponent ^ 0xFF);
237
+ }
238
+ exponent -= 193;
239
+ let decimalPointIndex = exponent * 2 + 2;
240
+
241
+ // a mantissa length of 0 implies a value of 0 (if positive) or a value
242
+ // of -1e126 (if negative)
243
+ if (buf.length === 1) {
244
+ if (isPositive) {
245
+ return "0";
246
+ }
247
+ return "-1e126";
248
+ }
249
+
250
+ // check for the trailing 102 byte for negative numbers and, if present,
251
+ // reduce the number of mantissa digits
252
+ let numBytes = buf.length;
253
+ if (!isPositive && buf[buf.length - 1] === 102) {
254
+ numBytes -= 1;
255
+ }
256
+
257
+ // process the mantissa bytes which are the remaining bytes; each
258
+ // mantissa byte is a base-100 digit
259
+ let base100Digit;
260
+ const digits = [];
261
+ for (let i = 1; i < numBytes; i++) {
262
+
263
+ // positive numbers have 1 added to them; negative numbers are
264
+ // subtracted from the value 101
265
+ if (isPositive) {
266
+ base100Digit = buf[i] - 1;
267
+ } else {
268
+ base100Digit = 101 - buf[i];
269
+ }
270
+
271
+ // process the first digit; leading zeroes are ignored
272
+ let digit = Math.floor(base100Digit / 10);
273
+ if (digit === 0 && i === 1) {
274
+ decimalPointIndex -= 1;
275
+ } else if (digit === 10) {
276
+ digits.push("1");
277
+ digits.push("0");
278
+ decimalPointIndex += 1;
279
+ } else if (digit !== 0 || i > 1) {
280
+ digits.push(digit.toString());
281
+ }
282
+
283
+ // process the second digit; trailing zeroes are ignored
284
+ digit = base100Digit % 10;
285
+ if (digit !== 0 || i < numBytes - 1) {
286
+ digits.push(digit.toString());
287
+ }
288
+ }
289
+
290
+ // create string of digits for transformation to JS value
291
+ const chars = [];
292
+
293
+ // if negative, include the sign
294
+ if (!isPositive) {
295
+ chars.push("-");
296
+ }
297
+
298
+ // if the decimal point index is 0 or less, add the decimal point and
299
+ // any leading zeroes that are needed
300
+ if (decimalPointIndex <= 0) {
301
+ chars.push(".");
302
+ if (decimalPointIndex < 0)
303
+ chars.push("0".repeat(-decimalPointIndex));
304
+ }
305
+
306
+ // add each of the digits
307
+ for (let i = 0; i < digits.length; i++) {
308
+ if (i > 0 && i === decimalPointIndex) {
309
+ chars.push(".");
310
+ }
311
+ chars.push(digits[i]);
312
+ }
313
+
314
+ // if the decimal point index exceeds the number of digits, add any
315
+ // trailing zeroes that are needed
316
+ if (decimalPointIndex > digits.length) {
317
+ for (let i = digits.length; i < decimalPointIndex; i++) {
318
+ chars.push("0");
319
+ }
320
+ }
321
+
322
+ // convert result to a Number
323
+ return chars.join("");
324
+ }
325
+
326
+ //---------------------------------------------------------------------------
327
+ // readBinaryDouble()
328
+ //
329
+ // Reads a binary double value from the buffer and returns a Number or a
330
+ // String, depending on the desired type.
331
+ //---------------------------------------------------------------------------
332
+ readBinaryDouble() {
333
+ const buf = this.readBytesWithLength();
334
+ if (!buf) {
335
+ return null;
336
+ }
337
+ return this.parseBinaryDouble(buf);
338
+ }
339
+
340
+ //---------------------------------------------------------------------------
341
+ // readBinaryFloat()
342
+ //
343
+ // Reads a binary float value from the buffer and returns a Number or a
344
+ // String, depending on the desired type.
345
+ //---------------------------------------------------------------------------
346
+ readBinaryFloat() {
347
+ const buf = this.readBytesWithLength();
348
+ if (!buf) {
349
+ return null;
350
+ }
351
+ return this.parseBinaryFloat(buf);
352
+ }
353
+
354
+ //---------------------------------------------------------------------------
355
+ // readBinaryInteger()
356
+ //
357
+ // Reads a binary integer value from the buffer and returns a Number
358
+ //---------------------------------------------------------------------------
359
+ readBinaryInteger() {
360
+ const buf = this.readBytesWithLength();
361
+ if (!buf) {
362
+ return 0;
363
+ }
364
+ if (buf.length > 4) {
365
+ errors.throwErr(errors.ERR_INTEGER_TOO_LARGE, buf.length, 4, this.pos, this.packetNum);
366
+ }
367
+ return (buf.readIntBE(0, buf.length));
368
+ }
369
+
370
+ //---------------------------------------------------------------------------
371
+ // readBool()
372
+ //
373
+ // Reads a boolean value from the buffer and returns a Boolean.
374
+ //---------------------------------------------------------------------------
375
+ readBool() {
376
+ const buf = this.readBytesWithLength();
377
+ if (!buf) {
378
+ return null;
379
+ }
380
+ return (buf[buf.length - 1] === 1);
381
+ }
382
+
383
+ //---------------------------------------------------------------------------
384
+ // readBytes()
385
+ //
386
+ // Returns a Buffer containing the specified number of bytes. If an
387
+ // insufficient number of bytes are available an error is thrown.
388
+ //---------------------------------------------------------------------------
389
+ readBytes(numBytes) {
390
+ const numBytesLeft = this.numBytesLeft();
391
+ if (numBytes > numBytesLeft) {
392
+ errors.throwErr(errors.ERR_UNEXPECTED_END_OF_DATA, numBytes,
393
+ numBytesLeft);
394
+ }
395
+ const buf = this.buf.subarray(this.pos, this.pos + numBytes);
396
+ this.pos += numBytes;
397
+ return buf;
398
+ }
399
+
400
+ //---------------------------------------------------------------------------
401
+ // readBytesAndLength()
402
+ //
403
+ // Reads the UB4 length from the buffer and then returns a Buffer containing
404
+ // the specified number of bytes.
405
+ //---------------------------------------------------------------------------
406
+ readBytesAndLength() {
407
+ const numBytes = this.readUB4();
408
+ if (numBytes > 0)
409
+ return this.readBytesWithLength();
410
+ }
411
+
412
+ //---------------------------------------------------------------------------
413
+ // readBytesWithLength()
414
+ //
415
+ // Reads the length from the buffer and then returns a Buffer containing the
416
+ // specified number of bytes. If the length is 0 or the special null length
417
+ // indicator value, null is returned instead.
418
+ //---------------------------------------------------------------------------
419
+ readBytesWithLength() {
420
+ const numBytes = this.readUInt8();
421
+ if (numBytes === 0 || numBytes === constants.TNS_NULL_LENGTH_INDICATOR)
422
+ return null;
423
+ return this._readBytesWithLength(numBytes);
424
+ }
425
+
426
+ //---------------------------------------------------------------------------
427
+ // readDbObject()
428
+ //
429
+ // Reads a database object from the buffer and returns the implementation
430
+ // object (or null, if the object is atomically null).
431
+ //---------------------------------------------------------------------------
432
+ readDbObject() {
433
+ const obj = {};
434
+ let numBytes = this.readUB4();
435
+ if (numBytes > 0)
436
+ obj.toid = Buffer.from(this.readBytesWithLength());
437
+ numBytes = this.readUB4();
438
+ if (numBytes > 0)
439
+ obj.oid = Buffer.from(this.readBytesWithLength());
440
+ numBytes = this.readUB4();
441
+ if (numBytes > 0)
442
+ obj.snapshot = Buffer.from(this.readBytesWithLength());
443
+ this.skipUB2(); // version
444
+ numBytes = this.readUB4();
445
+ this.skipUB2(); // flags
446
+ if (numBytes > 0)
447
+ obj.packedData = Buffer.from(this.readBytesWithLength());
448
+ return obj;
449
+ }
450
+
451
+ //---------------------------------------------------------------------------
452
+ // readInt8()
453
+ //
454
+ // Reads a signed 8-bit integer from the buffer.
455
+ //---------------------------------------------------------------------------
456
+ readInt8() {
457
+ const buf = this.readBytes(1);
458
+ return buf.readInt8();
459
+ }
460
+
461
+ //---------------------------------------------------------------------------
462
+ // readOracleDate()
463
+ //
464
+ // Reads an Oracle date from the buffer and returns a Date or a String,
465
+ // depending on the desired type.
466
+ //---------------------------------------------------------------------------
467
+ readOracleDate(useLocalTime) {
468
+ const buf = this.readBytesWithLength();
469
+ if (!buf) {
470
+ return null;
471
+ }
472
+ return this.parseOracleDate(buf, useLocalTime);
473
+ }
474
+
475
+ //---------------------------------------------------------------------------
476
+ // readOracleIntervalYM()
477
+ //
478
+ // Reads interval year to month value from the buffer and returns a
479
+ // JavaScript object representing that value.
480
+ //---------------------------------------------------------------------------
481
+ readOracleIntervalYM() {
482
+ const buf = this.readBytesWithLength();
483
+ if (!buf) {
484
+ return null;
485
+ }
486
+ return this.parseOracleIntervalYM(buf);
487
+ }
488
+
489
+ //---------------------------------------------------------------------------
490
+ // readOracleIntervalDS()
491
+ //
492
+ // Reads interval day to second value from the buffer and returns a
493
+ // JavaScript object representing that value.
494
+ //---------------------------------------------------------------------------
495
+ readOracleIntervalDS() {
496
+ const buf = this.readBytesWithLength();
497
+ if (!buf) {
498
+ return null;
499
+ }
500
+ return this.parseOracleIntervalDS(buf);
501
+ }
502
+
503
+ //---------------------------------------------------------------------------
504
+ // readOracleNumber()
505
+ //
506
+ // Reads an Oracle number from the buffer and returns a Number or a String,
507
+ // depending on the desired type.
508
+ //---------------------------------------------------------------------------
509
+ readOracleNumber() {
510
+ const buf = this.readBytesWithLength();
511
+ if (!buf) {
512
+ return null;
513
+ }
514
+ return this.parseOracleNumber(buf);
515
+ }
516
+
517
+ //---------------------------------------------------------------------------
518
+ // readSB2()
519
+ //
520
+ // Reads a signed, variable length integer of up to 2 bytes in length.
521
+ //---------------------------------------------------------------------------
522
+ readSB2() {
523
+ return this._readInteger(2, true, false);
524
+ }
525
+
526
+ //---------------------------------------------------------------------------
527
+ // readSB4()
528
+ //
529
+ // Reads a signed, variable length integer of up to 4 bytes in length.
530
+ //---------------------------------------------------------------------------
531
+ readSB4() {
532
+ return this._readInteger(4, true, false);
533
+ }
534
+
535
+ //---------------------------------------------------------------------------
536
+ // readSB8()
537
+ //
538
+ // Reads a signed, variable length integer of up to 8 bytes in length.
539
+ //---------------------------------------------------------------------------
540
+ readSB8() {
541
+ return this._readInteger(8, true, false);
542
+ }
543
+
544
+ //---------------------------------------------------------------------------
545
+ // readStr()
546
+ //
547
+ // Reads a string from the buffer in the specified character set form.
548
+ //---------------------------------------------------------------------------
549
+ readStr(csfrm) {
550
+ const buf = this.readBytesWithLength();
551
+ if (!buf) {
552
+ return null;
553
+ }
554
+ if (csfrm === constants.CSFRM_IMPLICIT)
555
+ return buf.toString();
556
+
557
+ // need a copy of the buffer since swap16() changes the buffer in place and
558
+ // it is possible that the buffer may need to be rescanned (for the case
559
+ // where insufficient packets are available during the initial scan)
560
+ return Buffer.from(buf).swap16().toString('utf16le');
561
+ }
562
+
563
+ //---------------------------------------------------------------------------
564
+ // readStrAndLength()
565
+ //
566
+ // Reads a length from the buffer and then, if the length is non-zero, reads
567
+ // string from the buffer and returns it.
568
+ //---------------------------------------------------------------------------
569
+ readStrAndLength() {
570
+ const buf = this.readBytesAndLength();
571
+ return buf ? buf.toString() : null;
572
+ }
573
+
574
+ //---------------------------------------------------------------------------
575
+ // readUB2()
576
+ //
577
+ // Reads an unsigned, variable length integer of up to 2 bytes in length.
578
+ //---------------------------------------------------------------------------
579
+ readUB2() {
580
+ return this._readInteger(2, false, false);
581
+ }
582
+
583
+ //---------------------------------------------------------------------------
584
+ // readUB4()
585
+ //
586
+ // Reads an unsigned, variable length integer of up to 4 bytes in length.
587
+ //---------------------------------------------------------------------------
588
+ readUB4() {
589
+ return this._readInteger(4, false, false);
590
+ }
591
+
592
+ //---------------------------------------------------------------------------
593
+ // readUB8()
594
+ //
595
+ // Reads an unsigned, variable length integer of up to 8 bytes in length.
596
+ //---------------------------------------------------------------------------
597
+ readUB8() {
598
+ return this._readInteger(8, false, false);
599
+ }
600
+
601
+ //---------------------------------------------------------------------------
602
+ // readUInt8()
603
+ //
604
+ // Reads an unsigned 8-bit integer from the buffer.
605
+ //---------------------------------------------------------------------------
606
+ readUInt8() {
607
+ const buf = this.readBytes(1);
608
+ return buf[0];
609
+ }
610
+
611
+ //---------------------------------------------------------------------------
612
+ // readUInt16BE()
613
+ //
614
+ // Reads an unsigned 16-bit integer from the buffer in big endian order.
615
+ //---------------------------------------------------------------------------
616
+ readUInt16BE() {
617
+ const buf = this.readBytes(2);
618
+ return buf.readUInt16BE();
619
+ }
620
+
621
+ //---------------------------------------------------------------------------
622
+ // readUInt16LE()
623
+ //
624
+ // Reads an unsigned 16-bit integer from the buffer in little endian order.
625
+ //---------------------------------------------------------------------------
626
+ readUInt16LE() {
627
+ const buf = this.readBytes(2);
628
+ return buf.readUInt16LE();
629
+ }
630
+
631
+ //---------------------------------------------------------------------------
632
+ // readUInt32BE()
633
+ //
634
+ // Reads an unsigned 32-bit integer from the buffer in big endian order.
635
+ //---------------------------------------------------------------------------
636
+ readUInt32BE() {
637
+ const buf = this.readBytes(4);
638
+ return buf.readUInt32BE();
639
+ }
640
+
641
+ //---------------------------------------------------------------------------
642
+ // reserveBytes()
643
+ //
644
+ // Reserves the specified number of bytes in the buffer. If not enough bytes
645
+ // remain in the buffer, the buffer is grown.
646
+ //---------------------------------------------------------------------------
647
+ reserveBytes(numBytes) {
648
+ if (numBytes > this.numBytesLeft()) {
649
+ this._grow(this.pos + numBytes);
650
+ }
651
+ const pos = this.pos;
652
+ this.pos += numBytes;
653
+ return pos;
654
+ }
655
+
656
+ //---------------------------------------------------------------------------
657
+ // skipBytes()
658
+ //
659
+ // Skips the specified number of bytes in the buffer.
660
+ //---------------------------------------------------------------------------
661
+ skipBytes(numBytes) {
662
+ if (numBytes > this.numBytesLeft())
663
+ errors.throwErr(errors.ERR_UNEXPECTED_END_OF_DATA);
664
+ this.pos += numBytes;
665
+ }
666
+
667
+ //---------------------------------------------------------------------------
668
+ // skipSB4()
669
+ //
670
+ // Skips a signed, variable length integer of up to 4 bytes in length.
671
+ //---------------------------------------------------------------------------
672
+ skipSB4() {
673
+ return this._readInteger(4, true, true);
674
+ }
675
+
676
+ //---------------------------------------------------------------------------
677
+ // skipUB1()
678
+ //
679
+ // Skips a single byte integer in the buffer.
680
+ //---------------------------------------------------------------------------
681
+ skipUB1() {
682
+ this.skipBytes(1);
683
+ }
684
+
685
+ //---------------------------------------------------------------------------
686
+ // skipUB2()
687
+ //
688
+ // Skips an unsigned, variable length integer of up to 2 bytes in length.
689
+ //---------------------------------------------------------------------------
690
+ skipUB2() {
691
+ return this._readInteger(2, false, true);
692
+ }
693
+
694
+ //---------------------------------------------------------------------------
695
+ // skipUB4()
696
+ //
697
+ // Skips an unsigned, variable length integer of up to 4 bytes in length.
698
+ //---------------------------------------------------------------------------
699
+ skipUB4() {
700
+ return this._readInteger(4, false, true);
701
+ }
702
+
703
+ //---------------------------------------------------------------------------
704
+ // skipUB8()
705
+ //
706
+ // Skips an unsigned, variable length integer of up to 8 bytes in length.
707
+ //---------------------------------------------------------------------------
708
+ skipUB8() {
709
+ return this._readInteger(8, false, true);
710
+ }
711
+
712
+ //---------------------------------------------------------------------------
713
+ // writeBinaryDouble()
714
+ //
715
+ // Writes the number in binary double format to the buffer.
716
+ //---------------------------------------------------------------------------
717
+ writeBinaryDouble(n, pos) {
718
+ if (!pos) {
719
+ pos = this.reserveBytes(8);
720
+ }
721
+ this.buf.writeDoubleBE(n, pos);
722
+ if ((this.buf[pos] & 0x80) === 0) {
723
+ this.buf[pos] |= 0x80;
724
+ } else {
725
+ // We complement the bits for a negative number
726
+ this.buf[pos] ^= 0xff;
727
+ this.buf[pos + 1] ^= 0xff;
728
+ this.buf[pos + 2] ^= 0xff;
729
+ this.buf[pos + 3] ^= 0xff;
730
+ this.buf[pos + 4] ^= 0xff;
731
+ this.buf[pos + 5] ^= 0xff;
732
+ this.buf[pos + 6] ^= 0xff;
733
+ this.buf[pos + 7] ^= 0xff;
734
+ }
735
+ }
736
+
737
+ //---------------------------------------------------------------------------
738
+ // writeBinaryFloat()
739
+ //
740
+ // Writes the number in binary float format to the buffer.
741
+ //---------------------------------------------------------------------------
742
+ writeBinaryFloat(n, pos) {
743
+ if (!pos) {
744
+ pos = this.reserveBytes(4);
745
+ }
746
+ this.buf.writeFloatBE(n, pos);
747
+ if ((this.buf[pos] & 0x80) === 0) {
748
+ this.buf[pos] |= 0x80;
749
+ } else {
750
+ // We complement the bits for a negative number
751
+ this.buf[pos] ^= 0xff;
752
+ this.buf[pos + 1] ^= 0xff;
753
+ this.buf[pos + 2] ^= 0xff;
754
+ this.buf[pos + 3] ^= 0xff;
755
+ }
756
+ }
757
+
758
+ //---------------------------------------------------------------------------
759
+ // writeBytes()
760
+ //
761
+ // Writes the bytes in the supplied buffer to the buffer.
762
+ //---------------------------------------------------------------------------
763
+ writeBytes(value) {
764
+ let start = 0;
765
+ let valueLen = value.length;
766
+ while (valueLen > 0) {
767
+ const bytesLeft = this.numBytesLeft();
768
+ if (bytesLeft === 0) {
769
+ this._grow(this.pos + valueLen);
770
+ }
771
+ const bytesToWrite = Math.min(bytesLeft, valueLen);
772
+ value.copy(this.buf, this.pos, start, start + bytesToWrite);
773
+ this.pos += bytesToWrite;
774
+ start += bytesToWrite;
775
+ valueLen -= bytesToWrite;
776
+ }
777
+ }
778
+
779
+ // _writeRawBytesAndLength()
780
+ //
781
+ // Writes the length in the format required before
782
+ // writing the bytes.
783
+ //---------------------------------------------------------------------------
784
+ _writeRawBytesAndLength(value, numBytes) {
785
+ if (numBytes <= constants.TNS_MAX_SHORT_LENGTH) {
786
+ this.writeUInt8(numBytes);
787
+ if (numBytes > 0) {
788
+ this.writeBytes(value);
789
+ }
790
+ } else {
791
+ let start = 0;
792
+ this.writeUInt8(constants.TNS_LONG_LENGTH_INDICATOR);
793
+ while (numBytes > 0) {
794
+ const chunkLen = Math.min(numBytes, constants.BUFFER_CHUNK_SIZE);
795
+ this.writeUB4(chunkLen);
796
+ this.writeBytes(value.subarray(start, start + chunkLen));
797
+ numBytes -= chunkLen;
798
+ start += chunkLen;
799
+ }
800
+ this.writeUB4(0);
801
+ }
802
+ }
803
+ //---------------------------------------------------------------------------
804
+ // writeBytesWithLength()
805
+ //
806
+ // Writes the bytes in the supplied buffer to the buffer, but first writes
807
+ // the length. If the length exceeds a fixed value, the value is written in
808
+ // chunks instead.
809
+ //---------------------------------------------------------------------------
810
+ writeBytesWithLength(value) {
811
+ const numBytes = value.length;
812
+ this._writeRawBytesAndLength(value, numBytes);
813
+ }
814
+
815
+ //---------------------------------------------------------------------------
816
+ // writeDbObject()
817
+ //
818
+ // Writes a database object to the buffer.
819
+ //---------------------------------------------------------------------------
820
+ writeDbObject(obj) {
821
+ this.writeUB4(obj.toid.length);
822
+ this.writeBytesWithLength(obj.toid);
823
+ if (obj.oid) {
824
+ this.writeUB4(obj.oid.length);
825
+ this.writeBytesWithLength(obj.oid);
826
+ } else {
827
+ this.writeUB4(0);
828
+ }
829
+ this.writeUB4(0); // snapshot
830
+ this.writeUB4(0); // version
831
+ const packedData = obj._getPackedData();
832
+ this.writeUB4(packedData.length);
833
+ this.writeUB4(obj.flags);
834
+ this.writeBytesWithLength(packedData);
835
+ }
836
+
837
+ //---------------------------------------------------------------------------
838
+ // writeOracleDate()
839
+ //
840
+ // Writes the date to the buffer using the given Oracle type. Note that if a
841
+ // timestamp with zero milliseconds is written, the type is automatically
842
+ // changed to DB_TYPE_DATE (except for DB_TYPE_TIMESTAMP_TZ which requires
843
+ // the full amount to be written).
844
+ //---------------------------------------------------------------------------
845
+ writeOracleDate(date, type, writeLength = true) {
846
+ let fsec;
847
+ let length = type._bufferSizeFactor;
848
+ if (length > 7) {
849
+ fsec = date.getUTCMilliseconds() * 1000 * 1000;
850
+ if (fsec === 0 && length <= 11)
851
+ length = 7;
852
+ }
853
+ if (writeLength) {
854
+ this.writeUInt8(length);
855
+ }
856
+ const pos = this.reserveBytes(length);
857
+ if (type === types.DB_TYPE_DATE || type == types.DB_TYPE_TIMESTAMP) {
858
+ const year = date.getFullYear();
859
+ this.buf[pos] = Math.trunc(year / 100) + 100;
860
+ this.buf[pos + 1] = year % 100 + 100;
861
+ this.buf[pos + 2] = date.getMonth() + 1;
862
+ this.buf[pos + 3] = date.getDate();
863
+ this.buf[pos + 4] = date.getHours() + 1;
864
+ this.buf[pos + 5] = date.getMinutes() + 1;
865
+ this.buf[pos + 6] = date.getSeconds() + 1;
866
+ } else {
867
+ const year = date.getUTCFullYear();
868
+ this.buf[pos] = Math.trunc(year / 100) + 100;
869
+ this.buf[pos + 1] = year % 100 + 100;
870
+ this.buf[pos + 2] = date.getUTCMonth() + 1;
871
+ this.buf[pos + 3] = date.getUTCDate();
872
+ this.buf[pos + 4] = date.getUTCHours() + 1;
873
+ this.buf[pos + 5] = date.getUTCMinutes() + 1;
874
+ this.buf[pos + 6] = date.getUTCSeconds() + 1;
875
+ }
876
+ if (length > 7) {
877
+ this.buf.writeInt32BE(fsec, pos + 7);
878
+ if (length > 11) {
879
+ this.buf[pos + 11] = constants.TZ_HOUR_OFFSET;
880
+ this.buf[pos + 12] = constants.TZ_MINUTE_OFFSET;
881
+ }
882
+ }
883
+ }
884
+
885
+ //---------------------------------------------------------------------------
886
+ // writeOracleIntervalYM()
887
+ //
888
+ // Writes a time interval to the buffer in Oracle Interval Year To Month
889
+ // format. It is assumed that the 'value' parameter is a valid IntervalYM
890
+ // object at this stage.
891
+ //---------------------------------------------------------------------------
892
+ writeOracleIntervalYM(value, writeLength = true) {
893
+ if (writeLength) {
894
+ this.writeUInt8(5);
895
+ }
896
+ this.writeUInt32BE(value.years + constants.TNS_DURATION_MID);
897
+ this.writeUInt8(value.months + constants.TNS_DURATION_OFFSET);
898
+ }
899
+
900
+ //---------------------------------------------------------------------------
901
+ // writeOracleIntervalDS()
902
+ //
903
+ // Writes a time interval to the buffer in Oracle Interval Day To Second
904
+ // format. It is assumed that the 'value' parameter is a valid IntervalDS
905
+ // object at this stage.
906
+ //---------------------------------------------------------------------------
907
+ writeOracleIntervalDS(value, writeLength = true) {
908
+ if (writeLength) {
909
+ this.writeUInt8(11);
910
+ }
911
+ this.writeUInt32BE(value.days + constants.TNS_DURATION_MID);
912
+ this.writeUInt8(value.hours + constants.TNS_DURATION_OFFSET);
913
+ this.writeUInt8(value.minutes + constants.TNS_DURATION_OFFSET);
914
+ this.writeUInt8(value.seconds + constants.TNS_DURATION_OFFSET);
915
+ this.writeUInt32BE(value.fseconds + constants.TNS_DURATION_MID);
916
+ }
917
+
918
+ //---------------------------------------------------------------------------
919
+ // writeOracleNumber()
920
+ //
921
+ // Writes the number (in string form) in Oracle Number format to the buffer.
922
+ //---------------------------------------------------------------------------
923
+ writeOracleNumber(value) {
924
+
925
+ // determine if number is negative
926
+ let isNegative = false;
927
+ if (value[0] === '-') {
928
+ isNegative = true;
929
+ value = value.substring(1);
930
+ }
931
+
932
+ // parse the exponent, if one is present
933
+ let exponent = 0;
934
+ const exponentPos = value.indexOf('e');
935
+ if (exponentPos > 0) {
936
+ exponent = Number(value.substring(exponentPos + 1));
937
+ value = value.substring(0, exponentPos);
938
+ }
939
+
940
+ // adjust the exponent and the value if there is a decimal point
941
+ const decimalPos = value.indexOf('.');
942
+ if (decimalPos > 0) {
943
+ exponent -= (value.length - decimalPos - 1);
944
+ value = value.substring(0, decimalPos) + value.substring(decimalPos + 1);
945
+ }
946
+
947
+ // strip any leading zeroes
948
+ if (value[0] === '0') {
949
+ value = value.replace(/^0+/, "");
950
+ }
951
+
952
+ // strip any trailing zeroes
953
+ if (value.length > 0 && value[value.length - 1] === '0') {
954
+ const trimmedValue = value.replace(/0+$/, "");
955
+ exponent += (value.length - trimmedValue.length);
956
+ value = trimmedValue;
957
+ }
958
+
959
+ // throw exception if number cannot be represented as an Oracle Number
960
+ if (value.length > constants.NUMBER_MAX_DIGITS || exponent >= 126 ||
961
+ exponent <= -131) {
962
+ errors.throwErr(errors.ERR_ORACLE_NUMBER_NO_REPR);
963
+ }
964
+
965
+ // if the exponent is odd, append a zero
966
+ if ((exponent > 0 && exponent % 2 === 1) ||
967
+ (exponent < 0 && exponent % 2 === -1)) {
968
+ exponent--;
969
+ value += "0";
970
+ }
971
+
972
+ // add a leading zero if the number of digits is odd
973
+ if (value.length % 2 === 1) {
974
+ value = "0" + value;
975
+ }
976
+
977
+ // write the encoded data to the wire
978
+ const appendSentinel =
979
+ (isNegative && value.length < constants.NUMBER_MAX_DIGITS);
980
+ const numPairs = value.length / 2;
981
+ let exponentOnWire = ((exponent + value.length) / 2) + 192;
982
+ if (isNegative) {
983
+ exponentOnWire = (exponentOnWire ^ 0xFF);
984
+ } else if (value.length === 0 && exponent === 0) {
985
+ exponentOnWire = 128;
986
+ }
987
+ let pos = this.reserveBytes(numPairs + 2 + appendSentinel);
988
+ this.buf[pos++] = numPairs + 1 + appendSentinel;
989
+ this.buf[pos++] = exponentOnWire;
990
+ for (let i = 0; i < value.length; i += 2) {
991
+ const base100Digit = Number(value.substring(i, i + 2));
992
+ if (isNegative) {
993
+ this.buf[pos++] = 101 - base100Digit;
994
+ } else {
995
+ this.buf[pos++] = base100Digit + 1;
996
+ }
997
+ }
998
+ if (appendSentinel) {
999
+ this.buf[pos] = 102;
1000
+ }
1001
+
1002
+ }
1003
+
1004
+ //---------------------------------------------------------------------------
1005
+ // writeStr()
1006
+ //
1007
+ // Writes the string to the buffer.
1008
+ //---------------------------------------------------------------------------
1009
+ writeStr(s) {
1010
+ this.writeBytes(Buffer.from(s));
1011
+ }
1012
+
1013
+ //---------------------------------------------------------------------------
1014
+ // writeInt32BE()
1015
+ //
1016
+ // Writes a signed 32-bit integer to the buffer in big endian order.
1017
+ //---------------------------------------------------------------------------
1018
+ writeInt32BE(n) {
1019
+ const pos = this.reserveBytes(4);
1020
+ this.buf.writeInt32BE(n, pos);
1021
+ }
1022
+
1023
+ //---------------------------------------------------------------------------
1024
+ // writeSB4()
1025
+ //
1026
+ // Writes a signed integer (up to 4 bytes in length) in variable length
1027
+ // format to the buffer.
1028
+ //---------------------------------------------------------------------------
1029
+ writeSB4(value) {
1030
+ let sign = 0;
1031
+ if (value < 0) {
1032
+ value = -value;
1033
+ sign = 0x80;
1034
+ }
1035
+ if (value === 0) {
1036
+ this.writeUInt8(0);
1037
+ } else if (value <= 0xff) {
1038
+ this.writeUInt8(1 | sign);
1039
+ this.writeUInt8(value);
1040
+ } else if (value <= 0xffff) {
1041
+ this.writeUInt8(2 | sign);
1042
+ this.writeUInt16BE(value);
1043
+ } else {
1044
+ this.writeUInt8(4 | sign);
1045
+ this.writeUInt32BE(value);
1046
+ }
1047
+ }
1048
+
1049
+ //---------------------------------------------------------------------------
1050
+ // writeUB4()
1051
+ //
1052
+ // Writes an unsigned integer (up to 4 bytes in length) in variable length
1053
+ // format to the buffer.
1054
+ //---------------------------------------------------------------------------
1055
+ writeUB4(value) {
1056
+ if (value === 0) {
1057
+ this.writeUInt8(0);
1058
+ } else if (value <= 0xff) {
1059
+ this.writeUInt8(1);
1060
+ this.writeUInt8(value);
1061
+ } else if (value <= 0xffff) {
1062
+ this.writeUInt8(2);
1063
+ this.writeUInt16BE(value);
1064
+ } else {
1065
+ this.writeUInt8(4);
1066
+ this.writeUInt32BE(value);
1067
+ }
1068
+ }
1069
+
1070
+ //---------------------------------------------------------------------------
1071
+ // writeUB2()
1072
+ //
1073
+ // Writes an unsigned integer (up to 2 bytes in length) in variable length
1074
+ // format to the buffer.
1075
+ //---------------------------------------------------------------------------
1076
+ writeUB2(value) {
1077
+ if (value === 0) {
1078
+ this.writeUInt8(0);
1079
+ } else if (value <= 0xff) {
1080
+ this.writeUInt8(1);
1081
+ this.writeUInt8(value);
1082
+ } else {
1083
+ this.writeUInt8(2);
1084
+ this.writeUInt16BE(value);
1085
+ }
1086
+ }
1087
+
1088
+ //---------------------------------------------------------------------------
1089
+ // writeUB8()
1090
+ //
1091
+ // Writes an unsigned integer (up to 8 bytes in length) in variable length
1092
+ // format to the buffer.
1093
+ //---------------------------------------------------------------------------
1094
+ writeUB8(value) {
1095
+ if (value === 0) {
1096
+ this.writeUInt8(0);
1097
+ } else if (value <= 0xff) {
1098
+ this.writeUInt8(1);
1099
+ this.writeUInt8(value);
1100
+ } else if (value <= 0xffff) {
1101
+ this.writeUInt8(2);
1102
+ this.writeUInt16BE(value);
1103
+ } else if (value <= 0xffffffff) {
1104
+ this.writeUInt8(4);
1105
+ this.writeUInt32BE(value);
1106
+ } else {
1107
+ this.writeUInt8(8);
1108
+ this.writeUInt64BE(value);
1109
+ }
1110
+ }
1111
+
1112
+ //---------------------------------------------------------------------------
1113
+ // writeUInt8()
1114
+ //
1115
+ // Writes an unsigned 8-bit integer to the buffer.
1116
+ //---------------------------------------------------------------------------
1117
+ writeUInt8(n) {
1118
+ const pos = this.reserveBytes(1);
1119
+ this.buf[pos] = n;
1120
+ }
1121
+
1122
+ // writeSB1()
1123
+ //
1124
+ // Writes an signed 8-bit integer to the buffer.
1125
+ //---------------------------------------------------------------------------
1126
+ writeSB1(n) {
1127
+ const pos = this.reserveBytes(1);
1128
+ this.buf[pos] = n;
1129
+ }
1130
+
1131
+ //---------------------------------------------------------------------------
1132
+ // writeUInt16BE()
1133
+ //
1134
+ // Writes an unsigned 16-bit integer to the buffer in big endian order.
1135
+ //---------------------------------------------------------------------------
1136
+ writeUInt16BE(n) {
1137
+ const pos = this.reserveBytes(2);
1138
+ this.buf.writeUInt16BE(n, pos);
1139
+ }
1140
+
1141
+ //---------------------------------------------------------------------------
1142
+ // writeUInt32BE()
1143
+ //
1144
+ // Writes an unsigned 32-bit integer to the buffer in big endian order.
1145
+ //---------------------------------------------------------------------------
1146
+ writeUInt32BE(n) {
1147
+ const pos = this.reserveBytes(4);
1148
+ this.buf.writeUInt32BE(n, pos);
1149
+ }
1150
+
1151
+ //---------------------------------------------------------------------------
1152
+ // writeUInt64BE()
1153
+ //
1154
+ // Writes an unsigned 64-bit integer to the buffer in big endian order. Since
1155
+ // Node.js doesn't support anything above 32-bits without using BigInt, the
1156
+ // higher order bits are simply written as 0.
1157
+ //---------------------------------------------------------------------------
1158
+ writeUInt64BE(n) {
1159
+ const pos = this.reserveBytes(8);
1160
+ this.buf.writeUInt32BE(0, pos);
1161
+ this.buf.writeUInt32BE(n, pos + 4);
1162
+ }
1163
+
1164
+ //---------------------------------------------------------------------------
1165
+ // writeUInt16LE()
1166
+ //
1167
+ // Writes an unsigned 16-bit integer to the buffer in little endian order.
1168
+ //---------------------------------------------------------------------------
1169
+ writeUInt16LE(n) {
1170
+ const pos = this.reserveBytes(2);
1171
+ this.buf.writeUInt16LE(n, pos);
1172
+ }
1173
+
1174
+ }
1175
+
1176
+ class GrowableBuffer extends BaseBuffer {
1177
+
1178
+ //---------------------------------------------------------------------------
1179
+ // constructor()
1180
+ //
1181
+ // Initializes the buffer with an initial fixed chunk size.
1182
+ //---------------------------------------------------------------------------
1183
+ constructor(initializer) {
1184
+ if (initializer) {
1185
+ super(initializer);
1186
+ } else {
1187
+ super(constants.BUFFER_CHUNK_SIZE);
1188
+ this.size = this.maxSize;
1189
+ }
1190
+ }
1191
+
1192
+ //---------------------------------------------------------------------------
1193
+ // _grow()
1194
+ //
1195
+ // Called when the buffer needs to grow. Ensures that sufficient space is
1196
+ // allocated to include the requested number of bytes, rounded to the nearest
1197
+ // chunk size.
1198
+ //---------------------------------------------------------------------------
1199
+ _grow(numBytes) {
1200
+ const remainder = numBytes % constants.BUFFER_CHUNK_SIZE;
1201
+ if (remainder > 0) {
1202
+ numBytes += (constants.BUFFER_CHUNK_SIZE - remainder);
1203
+ }
1204
+ const buf = Buffer.allocUnsafe(numBytes);
1205
+ this.buf.copy(buf);
1206
+ this.buf = buf;
1207
+ this.maxSize = this.size = numBytes;
1208
+ }
1209
+ }
1210
+
1211
+ module.exports = {
1212
+ BaseBuffer,
1213
+ GrowableBuffer
1214
+ };