agent-skill-manager 1.22.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2115) hide show
  1. package/README.md +23 -42
  2. package/data/skill-index/Affitor_affiliate-skills.json +62 -2
  3. package/data/skill-index/Eronred_aso-skills.json +1 -1
  4. package/data/skill-index/GPTomics_bioSkills.json +173 -17
  5. package/data/skill-index/Galaxy-Dawn_claude-scholar.json +14 -2
  6. package/data/skill-index/Imbad0202_academic-research-skills.json +19 -19
  7. package/data/skill-index/K-Dense-AI_claude-scientific-skills.json +39 -555
  8. package/data/skill-index/Leonxlnx_taste-skill.json +14 -2
  9. package/data/skill-index/Master-cai_Research-Paper-Writing-Skills.json +1 -1
  10. package/data/skill-index/MiniMax-AI_skills.json +103 -7
  11. package/data/skill-index/affaan-m_everything-claude-code.json +4045 -733
  12. package/data/skill-index/alirezarezvani_claude-skills.json +686 -2
  13. package/data/skill-index/anthropics_skills.json +2 -2
  14. package/data/skill-index/bytedance_deer-flow.json +62 -2
  15. package/data/skill-index/coreyhaines31_marketingskills.json +44 -8
  16. package/data/skill-index/github_awesome-copilot.json +3142 -898
  17. package/data/skill-index/heygen-com_hyperframes.json +69 -0
  18. package/data/skill-index/himself65_finance-skills.json +175 -19
  19. package/data/skill-index/kemiljk_fluid-design.json +1 -1
  20. package/data/skill-index/kepano_obsidian-skills.json +2 -2
  21. package/data/skill-index/luongnv89_skills.json +47 -35
  22. package/data/skill-index/mattpocock_skills.json +70 -34
  23. package/data/skill-index/nextlevelbuilder_ui-ux-pro-max-skill.json +1 -1
  24. package/data/skill-index/obra_superpowers.json +1 -1
  25. package/data/skill-index/sickn33_antigravity-awesome-skills.json +42937 -5491
  26. package/data/skill-index/slavingia_skills.json +1 -1
  27. package/data/skill-index-resources.json +10 -1
  28. package/dist/agent-skill-manager.js +385 -405
  29. package/dist/{chunk-2bvch8gs.js → chunk-6mbpytcj.js} +1 -1
  30. package/dist/{chunk-thr0x97h.js → chunk-x537ndd4.js} +1 -1
  31. package/package.json +1 -5
  32. package/node_modules/@balena/dockerignore/LICENSE.md +0 -206
  33. package/node_modules/@balena/dockerignore/README.md +0 -261
  34. package/node_modules/@balena/dockerignore/ignore.js +0 -363
  35. package/node_modules/@balena/dockerignore/index.d.ts +0 -45
  36. package/node_modules/@balena/dockerignore/package.json +0 -49
  37. package/node_modules/@grpc/grpc-js/LICENSE +0 -201
  38. package/node_modules/@grpc/grpc-js/README.md +0 -84
  39. package/node_modules/@grpc/grpc-js/build/src/admin.d.ts +0 -11
  40. package/node_modules/@grpc/grpc-js/build/src/admin.js +0 -30
  41. package/node_modules/@grpc/grpc-js/build/src/admin.js.map +0 -1
  42. package/node_modules/@grpc/grpc-js/build/src/auth-context.d.ts +0 -5
  43. package/node_modules/@grpc/grpc-js/build/src/auth-context.js +0 -19
  44. package/node_modules/@grpc/grpc-js/build/src/auth-context.js.map +0 -1
  45. package/node_modules/@grpc/grpc-js/build/src/backoff-timeout.d.ts +0 -94
  46. package/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js +0 -191
  47. package/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js.map +0 -1
  48. package/node_modules/@grpc/grpc-js/build/src/call-credentials.d.ts +0 -57
  49. package/node_modules/@grpc/grpc-js/build/src/call-credentials.js +0 -153
  50. package/node_modules/@grpc/grpc-js/build/src/call-credentials.js.map +0 -1
  51. package/node_modules/@grpc/grpc-js/build/src/call-interface.d.ts +0 -101
  52. package/node_modules/@grpc/grpc-js/build/src/call-interface.js +0 -100
  53. package/node_modules/@grpc/grpc-js/build/src/call-interface.js.map +0 -1
  54. package/node_modules/@grpc/grpc-js/build/src/call-number.d.ts +0 -1
  55. package/node_modules/@grpc/grpc-js/build/src/call-number.js +0 -24
  56. package/node_modules/@grpc/grpc-js/build/src/call-number.js.map +0 -1
  57. package/node_modules/@grpc/grpc-js/build/src/call.d.ts +0 -86
  58. package/node_modules/@grpc/grpc-js/build/src/call.js +0 -152
  59. package/node_modules/@grpc/grpc-js/build/src/call.js.map +0 -1
  60. package/node_modules/@grpc/grpc-js/build/src/certificate-provider.d.ts +0 -43
  61. package/node_modules/@grpc/grpc-js/build/src/certificate-provider.js +0 -141
  62. package/node_modules/@grpc/grpc-js/build/src/certificate-provider.js.map +0 -1
  63. package/node_modules/@grpc/grpc-js/build/src/channel-credentials.d.ts +0 -119
  64. package/node_modules/@grpc/grpc-js/build/src/channel-credentials.js +0 -430
  65. package/node_modules/@grpc/grpc-js/build/src/channel-credentials.js.map +0 -1
  66. package/node_modules/@grpc/grpc-js/build/src/channel-options.d.ts +0 -81
  67. package/node_modules/@grpc/grpc-js/build/src/channel-options.js +0 -73
  68. package/node_modules/@grpc/grpc-js/build/src/channel-options.js.map +0 -1
  69. package/node_modules/@grpc/grpc-js/build/src/channel.d.ts +0 -76
  70. package/node_modules/@grpc/grpc-js/build/src/channel.js +0 -68
  71. package/node_modules/@grpc/grpc-js/build/src/channel.js.map +0 -1
  72. package/node_modules/@grpc/grpc-js/build/src/channelz.d.ts +0 -158
  73. package/node_modules/@grpc/grpc-js/build/src/channelz.js +0 -598
  74. package/node_modules/@grpc/grpc-js/build/src/channelz.js.map +0 -1
  75. package/node_modules/@grpc/grpc-js/build/src/client-interceptors.d.ts +0 -123
  76. package/node_modules/@grpc/grpc-js/build/src/client-interceptors.js +0 -434
  77. package/node_modules/@grpc/grpc-js/build/src/client-interceptors.js.map +0 -1
  78. package/node_modules/@grpc/grpc-js/build/src/client.d.ts +0 -74
  79. package/node_modules/@grpc/grpc-js/build/src/client.js +0 -433
  80. package/node_modules/@grpc/grpc-js/build/src/client.js.map +0 -1
  81. package/node_modules/@grpc/grpc-js/build/src/compression-algorithms.d.ts +0 -5
  82. package/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js +0 -26
  83. package/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js.map +0 -1
  84. package/node_modules/@grpc/grpc-js/build/src/compression-filter.d.ts +0 -28
  85. package/node_modules/@grpc/grpc-js/build/src/compression-filter.js +0 -295
  86. package/node_modules/@grpc/grpc-js/build/src/compression-filter.js.map +0 -1
  87. package/node_modules/@grpc/grpc-js/build/src/connectivity-state.d.ts +0 -7
  88. package/node_modules/@grpc/grpc-js/build/src/connectivity-state.js +0 -28
  89. package/node_modules/@grpc/grpc-js/build/src/connectivity-state.js.map +0 -1
  90. package/node_modules/@grpc/grpc-js/build/src/constants.d.ts +0 -38
  91. package/node_modules/@grpc/grpc-js/build/src/constants.js +0 -64
  92. package/node_modules/@grpc/grpc-js/build/src/constants.js.map +0 -1
  93. package/node_modules/@grpc/grpc-js/build/src/control-plane-status.d.ts +0 -5
  94. package/node_modules/@grpc/grpc-js/build/src/control-plane-status.js +0 -42
  95. package/node_modules/@grpc/grpc-js/build/src/control-plane-status.js.map +0 -1
  96. package/node_modules/@grpc/grpc-js/build/src/deadline.d.ts +0 -22
  97. package/node_modules/@grpc/grpc-js/build/src/deadline.js +0 -108
  98. package/node_modules/@grpc/grpc-js/build/src/deadline.js.map +0 -1
  99. package/node_modules/@grpc/grpc-js/build/src/duration.d.ts +0 -15
  100. package/node_modules/@grpc/grpc-js/build/src/duration.js +0 -74
  101. package/node_modules/@grpc/grpc-js/build/src/duration.js.map +0 -1
  102. package/node_modules/@grpc/grpc-js/build/src/environment.d.ts +0 -1
  103. package/node_modules/@grpc/grpc-js/build/src/environment.js +0 -22
  104. package/node_modules/@grpc/grpc-js/build/src/environment.js.map +0 -1
  105. package/node_modules/@grpc/grpc-js/build/src/error.d.ts +0 -2
  106. package/node_modules/@grpc/grpc-js/build/src/error.js +0 -40
  107. package/node_modules/@grpc/grpc-js/build/src/error.js.map +0 -1
  108. package/node_modules/@grpc/grpc-js/build/src/events.d.ts +0 -9
  109. package/node_modules/@grpc/grpc-js/build/src/events.js +0 -19
  110. package/node_modules/@grpc/grpc-js/build/src/events.js.map +0 -1
  111. package/node_modules/@grpc/grpc-js/build/src/experimental.d.ts +0 -20
  112. package/node_modules/@grpc/grpc-js/build/src/experimental.js +0 -58
  113. package/node_modules/@grpc/grpc-js/build/src/experimental.js.map +0 -1
  114. package/node_modules/@grpc/grpc-js/build/src/filter-stack.d.ts +0 -21
  115. package/node_modules/@grpc/grpc-js/build/src/filter-stack.js +0 -82
  116. package/node_modules/@grpc/grpc-js/build/src/filter-stack.js.map +0 -1
  117. package/node_modules/@grpc/grpc-js/build/src/filter.d.ts +0 -25
  118. package/node_modules/@grpc/grpc-js/build/src/filter.js +0 -38
  119. package/node_modules/@grpc/grpc-js/build/src/filter.js.map +0 -1
  120. package/node_modules/@grpc/grpc-js/build/src/generated/channelz.d.ts +0 -118
  121. package/node_modules/@grpc/grpc-js/build/src/generated/channelz.js +0 -3
  122. package/node_modules/@grpc/grpc-js/build/src/generated/channelz.js.map +0 -1
  123. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.d.ts +0 -9
  124. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js +0 -4
  125. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js.map +0 -1
  126. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.d.ts +0 -6
  127. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js +0 -4
  128. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js.map +0 -1
  129. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.d.ts +0 -6
  130. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js +0 -4
  131. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js.map +0 -1
  132. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.d.ts +0 -51
  133. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js +0 -4
  134. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js.map +0 -1
  135. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.d.ts +0 -6
  136. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js +0 -4
  137. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js.map +0 -1
  138. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.d.ts +0 -9
  139. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js +0 -4
  140. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js.map +0 -1
  141. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.d.ts +0 -16
  142. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js +0 -19
  143. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js.map +0 -1
  144. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.d.ts +0 -27
  145. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js +0 -4
  146. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js.map +0 -1
  147. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.d.ts +0 -22
  148. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js +0 -4
  149. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js.map +0 -1
  150. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.d.ts +0 -11
  151. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js +0 -4
  152. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js.map +0 -1
  153. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.d.ts +0 -17
  154. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js +0 -4
  155. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js.map +0 -1
  156. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.d.ts +0 -34
  157. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js +0 -10
  158. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js.map +0 -1
  159. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.d.ts +0 -83
  160. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js +0 -56
  161. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js.map +0 -1
  162. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.d.ts +0 -22
  163. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js +0 -4
  164. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js.map +0 -1
  165. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.d.ts +0 -56
  166. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js +0 -32
  167. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js.map +0 -1
  168. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.d.ts +0 -99
  169. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js +0 -36
  170. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js.map +0 -1
  171. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.d.ts +0 -39
  172. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js +0 -4
  173. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js.map +0 -1
  174. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.d.ts +0 -7
  175. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js +0 -4
  176. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js.map +0 -1
  177. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.d.ts +0 -61
  178. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js +0 -11
  179. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js.map +0 -1
  180. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.d.ts +0 -6
  181. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js +0 -4
  182. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js.map +0 -1
  183. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.d.ts +0 -27
  184. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js +0 -11
  185. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js.map +0 -1
  186. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.d.ts +0 -6
  187. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js +0 -4
  188. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js.map +0 -1
  189. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.d.ts +0 -7
  190. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js +0 -4
  191. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js.map +0 -1
  192. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.d.ts +0 -28
  193. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js +0 -4
  194. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js.map +0 -1
  195. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.d.ts +0 -17
  196. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js +0 -4
  197. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js.map +0 -1
  198. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.d.ts +0 -21
  199. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js +0 -11
  200. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js.map +0 -1
  201. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.d.ts +0 -9
  202. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js +0 -4
  203. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js.map +0 -1
  204. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.d.ts +0 -12
  205. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js +0 -4
  206. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js.map +0 -1
  207. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.d.ts +0 -12
  208. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js +0 -4
  209. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js.map +0 -1
  210. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.d.ts +0 -12
  211. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js +0 -4
  212. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js.map +0 -1
  213. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.d.ts +0 -20
  214. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js +0 -4
  215. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js.map +0 -1
  216. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.d.ts +0 -6
  217. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js +0 -4
  218. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js.map +0 -1
  219. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.d.ts +0 -7
  220. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js +0 -10
  221. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js.map +0 -1
  222. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.d.ts +0 -9
  223. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js +0 -4
  224. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js.map +0 -1
  225. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.d.ts +0 -6
  226. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js +0 -4
  227. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js.map +0 -1
  228. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.d.ts +0 -7
  229. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js +0 -4
  230. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js.map +0 -1
  231. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.d.ts +0 -27
  232. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js +0 -4
  233. package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js.map +0 -1
  234. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.d.ts +0 -79
  235. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js +0 -4
  236. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js.map +0 -1
  237. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.d.ts +0 -64
  238. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js +0 -4
  239. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js.map +0 -1
  240. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts +0 -24
  241. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js +0 -14
  242. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js.map +0 -1
  243. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.d.ts +0 -72
  244. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js +0 -4
  245. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js.map +0 -1
  246. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.d.ts +0 -27
  247. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js +0 -4
  248. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js.map +0 -1
  249. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.d.ts +0 -41
  250. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js +0 -4
  251. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js.map +0 -1
  252. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.d.ts +0 -74
  253. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js +0 -15
  254. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js.map +0 -1
  255. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.d.ts +0 -159
  256. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js +0 -4
  257. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js.map +0 -1
  258. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.d.ts +0 -13
  259. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js +0 -4
  260. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js.map +0 -1
  261. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.d.ts +0 -15
  262. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js +0 -4
  263. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js.map +0 -1
  264. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.d.ts +0 -13
  265. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js +0 -4
  266. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js.map +0 -1
  267. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.d.ts +0 -15
  268. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js +0 -4
  269. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js.map +0 -1
  270. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.d.ts +0 -35
  271. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js +0 -4
  272. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js.map +0 -1
  273. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.d.ts +0 -29
  274. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js +0 -4
  275. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js.map +0 -1
  276. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.d.ts +0 -33
  277. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js +0 -4
  278. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js.map +0 -1
  279. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.d.ts +0 -29
  280. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js +0 -4
  281. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js.map +0 -1
  282. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.d.ts +0 -25
  283. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js +0 -4
  284. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js.map +0 -1
  285. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.d.ts +0 -15
  286. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js +0 -4
  287. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js.map +0 -1
  288. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.d.ts +0 -13
  289. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js +0 -4
  290. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js.map +0 -1
  291. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.d.ts +0 -15
  292. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js +0 -4
  293. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js.map +0 -1
  294. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.d.ts +0 -33
  295. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js +0 -4
  296. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js.map +0 -1
  297. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.d.ts +0 -29
  298. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js +0 -4
  299. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js.map +0 -1
  300. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.d.ts +0 -79
  301. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js +0 -4
  302. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js.map +0 -1
  303. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.d.ts +0 -41
  304. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js +0 -4
  305. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js.map +0 -1
  306. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.d.ts +0 -53
  307. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js +0 -4
  308. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js.map +0 -1
  309. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.d.ts +0 -27
  310. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js +0 -4
  311. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js.map +0 -1
  312. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.d.ts +0 -66
  313. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js +0 -4
  314. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js.map +0 -1
  315. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.d.ts +0 -146
  316. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js +0 -4
  317. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js.map +0 -1
  318. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.d.ts +0 -43
  319. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js +0 -4
  320. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js.map +0 -1
  321. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.d.ts +0 -29
  322. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js +0 -4
  323. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js.map +0 -1
  324. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.d.ts +0 -70
  325. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js +0 -4
  326. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js.map +0 -1
  327. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.d.ts +0 -15
  328. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js +0 -4
  329. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js.map +0 -1
  330. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.d.ts +0 -27
  331. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js +0 -4
  332. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js.map +0 -1
  333. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.d.ts +0 -66
  334. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js +0 -4
  335. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js.map +0 -1
  336. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.d.ts +0 -27
  337. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js +0 -4
  338. package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js.map +0 -1
  339. package/node_modules/@grpc/grpc-js/build/src/generated/orca.d.ts +0 -145
  340. package/node_modules/@grpc/grpc-js/build/src/generated/orca.js +0 -3
  341. package/node_modules/@grpc/grpc-js/build/src/generated/orca.js.map +0 -1
  342. package/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.d.ts +0 -40
  343. package/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js +0 -4
  344. package/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js.map +0 -1
  345. package/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.d.ts +0 -18
  346. package/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js +0 -4
  347. package/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js.map +0 -1
  348. package/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.d.ts +0 -149
  349. package/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js +0 -4
  350. package/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js.map +0 -1
  351. package/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.d.ts +0 -82
  352. package/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js +0 -4
  353. package/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js.map +0 -1
  354. package/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.d.ts +0 -89
  355. package/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js +0 -4
  356. package/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js.map +0 -1
  357. package/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.d.ts +0 -48
  358. package/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js +0 -4
  359. package/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js.map +0 -1
  360. package/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.d.ts +0 -98
  361. package/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js +0 -4
  362. package/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js.map +0 -1
  363. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.d.ts +0 -82
  364. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js +0 -4
  365. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js.map +0 -1
  366. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.d.ts +0 -83
  367. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js +0 -4
  368. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js.map +0 -1
  369. package/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.d.ts +0 -82
  370. package/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js +0 -4
  371. package/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js.map +0 -1
  372. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.d.ts +0 -82
  373. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js +0 -4
  374. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js.map +0 -1
  375. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.d.ts +0 -83
  376. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js +0 -4
  377. package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js.map +0 -1
  378. package/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.d.ts +0 -30
  379. package/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js +0 -19
  380. package/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js.map +0 -1
  381. package/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.d.ts +0 -62
  382. package/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js +0 -4
  383. package/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js.map +0 -1
  384. package/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.d.ts +0 -30
  385. package/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js +0 -4
  386. package/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js.map +0 -1
  387. package/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.d.ts +0 -56
  388. package/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js +0 -4
  389. package/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js.map +0 -1
  390. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.d.ts +0 -82
  391. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js +0 -4
  392. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js.map +0 -1
  393. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.d.ts +0 -83
  394. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js +0 -4
  395. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js.map +0 -1
  396. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.d.ts +0 -82
  397. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js +0 -4
  398. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js.map +0 -1
  399. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.d.ts +0 -83
  400. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js +0 -4
  401. package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js.map +0 -1
  402. package/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.d.ts +0 -284
  403. package/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js +0 -4
  404. package/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js.map +0 -1
  405. package/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.d.ts +0 -102
  406. package/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js +0 -4
  407. package/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js.map +0 -1
  408. package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.d.ts +0 -82
  409. package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js +0 -4
  410. package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js.map +0 -1
  411. package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.d.ts +0 -83
  412. package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js +0 -4
  413. package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js.map +0 -1
  414. package/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.d.ts +0 -121
  415. package/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js +0 -4
  416. package/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js.map +0 -1
  417. package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.d.ts +0 -36
  418. package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js +0 -4
  419. package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js.map +0 -1
  420. package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.d.ts +0 -25
  421. package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js +0 -4
  422. package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js.map +0 -1
  423. package/node_modules/@grpc/grpc-js/build/src/http_proxy.d.ts +0 -16
  424. package/node_modules/@grpc/grpc-js/build/src/http_proxy.js +0 -274
  425. package/node_modules/@grpc/grpc-js/build/src/http_proxy.js.map +0 -1
  426. package/node_modules/@grpc/grpc-js/build/src/index.d.ts +0 -79
  427. package/node_modules/@grpc/grpc-js/build/src/index.js +0 -148
  428. package/node_modules/@grpc/grpc-js/build/src/index.js.map +0 -1
  429. package/node_modules/@grpc/grpc-js/build/src/internal-channel.d.ts +0 -124
  430. package/node_modules/@grpc/grpc-js/build/src/internal-channel.js +0 -605
  431. package/node_modules/@grpc/grpc-js/build/src/internal-channel.js.map +0 -1
  432. package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.d.ts +0 -24
  433. package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js +0 -151
  434. package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js.map +0 -1
  435. package/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.d.ts +0 -71
  436. package/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js +0 -571
  437. package/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js.map +0 -1
  438. package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.d.ts +0 -134
  439. package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js +0 -514
  440. package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js.map +0 -1
  441. package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.d.ts +0 -24
  442. package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js +0 -204
  443. package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js.map +0 -1
  444. package/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.d.ts +0 -20
  445. package/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js +0 -392
  446. package/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js.map +0 -1
  447. package/node_modules/@grpc/grpc-js/build/src/load-balancer.d.ts +0 -101
  448. package/node_modules/@grpc/grpc-js/build/src/load-balancer.js +0 -116
  449. package/node_modules/@grpc/grpc-js/build/src/load-balancer.js.map +0 -1
  450. package/node_modules/@grpc/grpc-js/build/src/load-balancing-call.d.ts +0 -49
  451. package/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js +0 -302
  452. package/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js.map +0 -1
  453. package/node_modules/@grpc/grpc-js/build/src/logging.d.ts +0 -7
  454. package/node_modules/@grpc/grpc-js/build/src/logging.js +0 -122
  455. package/node_modules/@grpc/grpc-js/build/src/logging.js.map +0 -1
  456. package/node_modules/@grpc/grpc-js/build/src/make-client.d.ts +0 -71
  457. package/node_modules/@grpc/grpc-js/build/src/make-client.js +0 -143
  458. package/node_modules/@grpc/grpc-js/build/src/make-client.js.map +0 -1
  459. package/node_modules/@grpc/grpc-js/build/src/metadata.d.ts +0 -100
  460. package/node_modules/@grpc/grpc-js/build/src/metadata.js +0 -272
  461. package/node_modules/@grpc/grpc-js/build/src/metadata.js.map +0 -1
  462. package/node_modules/@grpc/grpc-js/build/src/object-stream.d.ts +0 -27
  463. package/node_modules/@grpc/grpc-js/build/src/object-stream.js +0 -19
  464. package/node_modules/@grpc/grpc-js/build/src/object-stream.js.map +0 -1
  465. package/node_modules/@grpc/grpc-js/build/src/orca.d.ts +0 -89
  466. package/node_modules/@grpc/grpc-js/build/src/orca.js +0 -323
  467. package/node_modules/@grpc/grpc-js/build/src/orca.js.map +0 -1
  468. package/node_modules/@grpc/grpc-js/build/src/picker.d.ts +0 -95
  469. package/node_modules/@grpc/grpc-js/build/src/picker.js +0 -86
  470. package/node_modules/@grpc/grpc-js/build/src/picker.js.map +0 -1
  471. package/node_modules/@grpc/grpc-js/build/src/priority-queue.d.ts +0 -50
  472. package/node_modules/@grpc/grpc-js/build/src/priority-queue.js +0 -120
  473. package/node_modules/@grpc/grpc-js/build/src/priority-queue.js.map +0 -1
  474. package/node_modules/@grpc/grpc-js/build/src/resolver-dns.d.ts +0 -13
  475. package/node_modules/@grpc/grpc-js/build/src/resolver-dns.js +0 -363
  476. package/node_modules/@grpc/grpc-js/build/src/resolver-dns.js.map +0 -1
  477. package/node_modules/@grpc/grpc-js/build/src/resolver-ip.d.ts +0 -1
  478. package/node_modules/@grpc/grpc-js/build/src/resolver-ip.js +0 -106
  479. package/node_modules/@grpc/grpc-js/build/src/resolver-ip.js.map +0 -1
  480. package/node_modules/@grpc/grpc-js/build/src/resolver-uds.d.ts +0 -1
  481. package/node_modules/@grpc/grpc-js/build/src/resolver-uds.js +0 -51
  482. package/node_modules/@grpc/grpc-js/build/src/resolver-uds.js.map +0 -1
  483. package/node_modules/@grpc/grpc-js/build/src/resolver.d.ts +0 -102
  484. package/node_modules/@grpc/grpc-js/build/src/resolver.js +0 -89
  485. package/node_modules/@grpc/grpc-js/build/src/resolver.js.map +0 -1
  486. package/node_modules/@grpc/grpc-js/build/src/resolving-call.d.ts +0 -54
  487. package/node_modules/@grpc/grpc-js/build/src/resolving-call.js +0 -319
  488. package/node_modules/@grpc/grpc-js/build/src/resolving-call.js.map +0 -1
  489. package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.d.ts +0 -70
  490. package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js +0 -304
  491. package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js.map +0 -1
  492. package/node_modules/@grpc/grpc-js/build/src/retrying-call.d.ts +0 -100
  493. package/node_modules/@grpc/grpc-js/build/src/retrying-call.js +0 -724
  494. package/node_modules/@grpc/grpc-js/build/src/retrying-call.js.map +0 -1
  495. package/node_modules/@grpc/grpc-js/build/src/server-call.d.ts +0 -141
  496. package/node_modules/@grpc/grpc-js/build/src/server-call.js +0 -226
  497. package/node_modules/@grpc/grpc-js/build/src/server-call.js.map +0 -1
  498. package/node_modules/@grpc/grpc-js/build/src/server-credentials.d.ts +0 -48
  499. package/node_modules/@grpc/grpc-js/build/src/server-credentials.js +0 -314
  500. package/node_modules/@grpc/grpc-js/build/src/server-credentials.js.map +0 -1
  501. package/node_modules/@grpc/grpc-js/build/src/server-interceptors.d.ts +0 -216
  502. package/node_modules/@grpc/grpc-js/build/src/server-interceptors.js +0 -817
  503. package/node_modules/@grpc/grpc-js/build/src/server-interceptors.js.map +0 -1
  504. package/node_modules/@grpc/grpc-js/build/src/server.d.ts +0 -140
  505. package/node_modules/@grpc/grpc-js/build/src/server.js +0 -1608
  506. package/node_modules/@grpc/grpc-js/build/src/server.js.map +0 -1
  507. package/node_modules/@grpc/grpc-js/build/src/service-config.d.ts +0 -58
  508. package/node_modules/@grpc/grpc-js/build/src/service-config.js +0 -430
  509. package/node_modules/@grpc/grpc-js/build/src/service-config.js.map +0 -1
  510. package/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.d.ts +0 -25
  511. package/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js +0 -245
  512. package/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js.map +0 -1
  513. package/node_modules/@grpc/grpc-js/build/src/status-builder.d.ts +0 -28
  514. package/node_modules/@grpc/grpc-js/build/src/status-builder.js +0 -68
  515. package/node_modules/@grpc/grpc-js/build/src/status-builder.js.map +0 -1
  516. package/node_modules/@grpc/grpc-js/build/src/stream-decoder.d.ts +0 -12
  517. package/node_modules/@grpc/grpc-js/build/src/stream-decoder.js +0 -100
  518. package/node_modules/@grpc/grpc-js/build/src/stream-decoder.js.map +0 -1
  519. package/node_modules/@grpc/grpc-js/build/src/subchannel-address.d.ts +0 -42
  520. package/node_modules/@grpc/grpc-js/build/src/subchannel-address.js +0 -202
  521. package/node_modules/@grpc/grpc-js/build/src/subchannel-address.js.map +0 -1
  522. package/node_modules/@grpc/grpc-js/build/src/subchannel-call.d.ts +0 -68
  523. package/node_modules/@grpc/grpc-js/build/src/subchannel-call.js +0 -545
  524. package/node_modules/@grpc/grpc-js/build/src/subchannel-call.js.map +0 -1
  525. package/node_modules/@grpc/grpc-js/build/src/subchannel-interface.d.ts +0 -82
  526. package/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js +0 -114
  527. package/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js.map +0 -1
  528. package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.d.ts +0 -40
  529. package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js +0 -137
  530. package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js.map +0 -1
  531. package/node_modules/@grpc/grpc-js/build/src/subchannel.d.ts +0 -135
  532. package/node_modules/@grpc/grpc-js/build/src/subchannel.js +0 -397
  533. package/node_modules/@grpc/grpc-js/build/src/subchannel.js.map +0 -1
  534. package/node_modules/@grpc/grpc-js/build/src/tls-helpers.d.ts +0 -2
  535. package/node_modules/@grpc/grpc-js/build/src/tls-helpers.js +0 -34
  536. package/node_modules/@grpc/grpc-js/build/src/tls-helpers.js.map +0 -1
  537. package/node_modules/@grpc/grpc-js/build/src/transport.d.ts +0 -135
  538. package/node_modules/@grpc/grpc-js/build/src/transport.js +0 -640
  539. package/node_modules/@grpc/grpc-js/build/src/transport.js.map +0 -1
  540. package/node_modules/@grpc/grpc-js/build/src/uri-parser.d.ts +0 -13
  541. package/node_modules/@grpc/grpc-js/build/src/uri-parser.js +0 -125
  542. package/node_modules/@grpc/grpc-js/build/src/uri-parser.js.map +0 -1
  543. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/LICENSE +0 -201
  544. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/README.md +0 -140
  545. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js +0 -915
  546. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js.map +0 -1
  547. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/index.d.ts +0 -162
  548. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/index.js +0 -246
  549. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/index.js.map +0 -1
  550. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/util.d.ts +0 -27
  551. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/util.js +0 -89
  552. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/util.js.map +0 -1
  553. package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/package.json +0 -69
  554. package/node_modules/@grpc/grpc-js/package.json +0 -89
  555. package/node_modules/@grpc/grpc-js/proto/channelz.proto +0 -564
  556. package/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/LICENSE +0 -202
  557. package/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/validate/validate.proto +0 -797
  558. package/node_modules/@grpc/grpc-js/proto/xds/LICENSE +0 -201
  559. package/node_modules/@grpc/grpc-js/proto/xds/xds/data/orca/v3/orca_load_report.proto +0 -58
  560. package/node_modules/@grpc/grpc-js/proto/xds/xds/service/orca/v3/orca.proto +0 -36
  561. package/node_modules/@grpc/grpc-js/src/admin.ts +0 -45
  562. package/node_modules/@grpc/grpc-js/src/auth-context.ts +0 -23
  563. package/node_modules/@grpc/grpc-js/src/backoff-timeout.ts +0 -222
  564. package/node_modules/@grpc/grpc-js/src/call-credentials.ts +0 -227
  565. package/node_modules/@grpc/grpc-js/src/call-interface.ts +0 -208
  566. package/node_modules/@grpc/grpc-js/src/call-number.ts +0 -22
  567. package/node_modules/@grpc/grpc-js/src/call.ts +0 -218
  568. package/node_modules/@grpc/grpc-js/src/certificate-provider.ts +0 -176
  569. package/node_modules/@grpc/grpc-js/src/channel-credentials.ts +0 -523
  570. package/node_modules/@grpc/grpc-js/src/channel-options.ts +0 -128
  571. package/node_modules/@grpc/grpc-js/src/channel.ts +0 -174
  572. package/node_modules/@grpc/grpc-js/src/channelz.ts +0 -909
  573. package/node_modules/@grpc/grpc-js/src/client-interceptors.ts +0 -585
  574. package/node_modules/@grpc/grpc-js/src/client.ts +0 -716
  575. package/node_modules/@grpc/grpc-js/src/compression-algorithms.ts +0 -22
  576. package/node_modules/@grpc/grpc-js/src/compression-filter.ts +0 -358
  577. package/node_modules/@grpc/grpc-js/src/connectivity-state.ts +0 -24
  578. package/node_modules/@grpc/grpc-js/src/constants.ts +0 -66
  579. package/node_modules/@grpc/grpc-js/src/control-plane-status.ts +0 -43
  580. package/node_modules/@grpc/grpc-js/src/deadline.ts +0 -106
  581. package/node_modules/@grpc/grpc-js/src/duration.ts +0 -79
  582. package/node_modules/@grpc/grpc-js/src/environment.ts +0 -19
  583. package/node_modules/@grpc/grpc-js/src/error.ts +0 -37
  584. package/node_modules/@grpc/grpc-js/src/events.ts +0 -26
  585. package/node_modules/@grpc/grpc-js/src/experimental.ts +0 -73
  586. package/node_modules/@grpc/grpc-js/src/filter-stack.ts +0 -100
  587. package/node_modules/@grpc/grpc-js/src/filter.ts +0 -63
  588. package/node_modules/@grpc/grpc-js/src/generated/channelz.ts +0 -119
  589. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Any.ts +0 -13
  590. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BoolValue.ts +0 -10
  591. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BytesValue.ts +0 -10
  592. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DescriptorProto.ts +0 -59
  593. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DoubleValue.ts +0 -10
  594. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Duration.ts +0 -13
  595. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Edition.ts +0 -44
  596. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts +0 -33
  597. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumOptions.ts +0 -26
  598. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts +0 -15
  599. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts +0 -21
  600. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ExtensionRangeOptions.ts +0 -49
  601. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSet.ts +0 -183
  602. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSetDefaults.ts +0 -28
  603. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts +0 -112
  604. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldOptions.ts +0 -165
  605. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts +0 -43
  606. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts +0 -11
  607. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileOptions.ts +0 -76
  608. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FloatValue.ts +0 -10
  609. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts +0 -44
  610. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int32Value.ts +0 -10
  611. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int64Value.ts +0 -11
  612. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MessageOptions.ts +0 -32
  613. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts +0 -21
  614. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodOptions.ts +0 -36
  615. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts +0 -13
  616. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofOptions.ts +0 -16
  617. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts +0 -16
  618. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceOptions.ts +0 -16
  619. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts +0 -26
  620. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/StringValue.ts +0 -10
  621. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SymbolVisibility.ts +0 -17
  622. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Timestamp.ts +0 -13
  623. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt32Value.ts +0 -10
  624. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt64Value.ts +0 -11
  625. package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts +0 -33
  626. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Address.ts +0 -89
  627. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channel.ts +0 -68
  628. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelConnectivityState.ts +0 -45
  629. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelData.ts +0 -76
  630. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelRef.ts +0 -31
  631. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTrace.ts +0 -45
  632. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTraceEvent.ts +0 -91
  633. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channelz.ts +0 -178
  634. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelRequest.ts +0 -17
  635. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelResponse.ts +0 -19
  636. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerRequest.ts +0 -17
  637. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerResponse.ts +0 -19
  638. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts +0 -39
  639. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts +0 -33
  640. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersRequest.ts +0 -37
  641. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersResponse.ts +0 -33
  642. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketRequest.ts +0 -29
  643. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketResponse.ts +0 -19
  644. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts +0 -17
  645. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts +0 -19
  646. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts +0 -37
  647. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts +0 -33
  648. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Security.ts +0 -87
  649. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Server.ts +0 -45
  650. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerData.ts +0 -57
  651. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerRef.ts +0 -31
  652. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Socket.ts +0 -70
  653. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketData.ts +0 -150
  654. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOption.ts +0 -47
  655. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionLinger.ts +0 -33
  656. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts +0 -74
  657. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts +0 -19
  658. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketRef.ts +0 -31
  659. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Subchannel.ts +0 -70
  660. package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SubchannelRef.ts +0 -31
  661. package/node_modules/@grpc/grpc-js/src/generated/orca.ts +0 -146
  662. package/node_modules/@grpc/grpc-js/src/generated/validate/AnyRules.ts +0 -44
  663. package/node_modules/@grpc/grpc-js/src/generated/validate/BoolRules.ts +0 -22
  664. package/node_modules/@grpc/grpc-js/src/generated/validate/BytesRules.ts +0 -153
  665. package/node_modules/@grpc/grpc-js/src/generated/validate/DoubleRules.ts +0 -86
  666. package/node_modules/@grpc/grpc-js/src/generated/validate/DurationRules.ts +0 -93
  667. package/node_modules/@grpc/grpc-js/src/generated/validate/EnumRules.ts +0 -52
  668. package/node_modules/@grpc/grpc-js/src/generated/validate/FieldRules.ts +0 -102
  669. package/node_modules/@grpc/grpc-js/src/generated/validate/Fixed32Rules.ts +0 -86
  670. package/node_modules/@grpc/grpc-js/src/generated/validate/Fixed64Rules.ts +0 -87
  671. package/node_modules/@grpc/grpc-js/src/generated/validate/FloatRules.ts +0 -86
  672. package/node_modules/@grpc/grpc-js/src/generated/validate/Int32Rules.ts +0 -86
  673. package/node_modules/@grpc/grpc-js/src/generated/validate/Int64Rules.ts +0 -87
  674. package/node_modules/@grpc/grpc-js/src/generated/validate/KnownRegex.ts +0 -38
  675. package/node_modules/@grpc/grpc-js/src/generated/validate/MapRules.ts +0 -66
  676. package/node_modules/@grpc/grpc-js/src/generated/validate/MessageRules.ts +0 -34
  677. package/node_modules/@grpc/grpc-js/src/generated/validate/RepeatedRules.ts +0 -60
  678. package/node_modules/@grpc/grpc-js/src/generated/validate/SFixed32Rules.ts +0 -86
  679. package/node_modules/@grpc/grpc-js/src/generated/validate/SFixed64Rules.ts +0 -87
  680. package/node_modules/@grpc/grpc-js/src/generated/validate/SInt32Rules.ts +0 -86
  681. package/node_modules/@grpc/grpc-js/src/generated/validate/SInt64Rules.ts +0 -87
  682. package/node_modules/@grpc/grpc-js/src/generated/validate/StringRules.ts +0 -288
  683. package/node_modules/@grpc/grpc-js/src/generated/validate/TimestampRules.ts +0 -106
  684. package/node_modules/@grpc/grpc-js/src/generated/validate/UInt32Rules.ts +0 -86
  685. package/node_modules/@grpc/grpc-js/src/generated/validate/UInt64Rules.ts +0 -87
  686. package/node_modules/@grpc/grpc-js/src/generated/xds/data/orca/v3/OrcaLoadReport.ts +0 -113
  687. package/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OpenRcaService.ts +0 -43
  688. package/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.ts +0 -29
  689. package/node_modules/@grpc/grpc-js/src/http_proxy.ts +0 -315
  690. package/node_modules/@grpc/grpc-js/src/index.ts +0 -312
  691. package/node_modules/@grpc/grpc-js/src/internal-channel.ts +0 -878
  692. package/node_modules/@grpc/grpc-js/src/load-balancer-child-handler.ts +0 -173
  693. package/node_modules/@grpc/grpc-js/src/load-balancer-outlier-detection.ts +0 -840
  694. package/node_modules/@grpc/grpc-js/src/load-balancer-pick-first.ts +0 -662
  695. package/node_modules/@grpc/grpc-js/src/load-balancer-round-robin.ts +0 -287
  696. package/node_modules/@grpc/grpc-js/src/load-balancer-weighted-round-robin.ts +0 -494
  697. package/node_modules/@grpc/grpc-js/src/load-balancer.ts +0 -258
  698. package/node_modules/@grpc/grpc-js/src/load-balancing-call.ts +0 -387
  699. package/node_modules/@grpc/grpc-js/src/logging.ts +0 -134
  700. package/node_modules/@grpc/grpc-js/src/make-client.ts +0 -238
  701. package/node_modules/@grpc/grpc-js/src/metadata.ts +0 -323
  702. package/node_modules/@grpc/grpc-js/src/object-stream.ts +0 -66
  703. package/node_modules/@grpc/grpc-js/src/orca.ts +0 -349
  704. package/node_modules/@grpc/grpc-js/src/picker.ts +0 -157
  705. package/node_modules/@grpc/grpc-js/src/priority-queue.ts +0 -118
  706. package/node_modules/@grpc/grpc-js/src/resolver-dns.ts +0 -449
  707. package/node_modules/@grpc/grpc-js/src/resolver-ip.ts +0 -124
  708. package/node_modules/@grpc/grpc-js/src/resolver-uds.ts +0 -63
  709. package/node_modules/@grpc/grpc-js/src/resolver.ts +0 -176
  710. package/node_modules/@grpc/grpc-js/src/resolving-call.ts +0 -379
  711. package/node_modules/@grpc/grpc-js/src/resolving-load-balancer.ts +0 -407
  712. package/node_modules/@grpc/grpc-js/src/retrying-call.ts +0 -924
  713. package/node_modules/@grpc/grpc-js/src/server-call.ts +0 -420
  714. package/node_modules/@grpc/grpc-js/src/server-credentials.ts +0 -352
  715. package/node_modules/@grpc/grpc-js/src/server-interceptors.ts +0 -1071
  716. package/node_modules/@grpc/grpc-js/src/server.ts +0 -2212
  717. package/node_modules/@grpc/grpc-js/src/service-config.ts +0 -564
  718. package/node_modules/@grpc/grpc-js/src/single-subchannel-channel.ts +0 -248
  719. package/node_modules/@grpc/grpc-js/src/status-builder.ts +0 -80
  720. package/node_modules/@grpc/grpc-js/src/stream-decoder.ts +0 -110
  721. package/node_modules/@grpc/grpc-js/src/subchannel-address.ts +0 -252
  722. package/node_modules/@grpc/grpc-js/src/subchannel-call.ts +0 -622
  723. package/node_modules/@grpc/grpc-js/src/subchannel-interface.ts +0 -176
  724. package/node_modules/@grpc/grpc-js/src/subchannel-pool.ts +0 -176
  725. package/node_modules/@grpc/grpc-js/src/subchannel.ts +0 -559
  726. package/node_modules/@grpc/grpc-js/src/tls-helpers.ts +0 -35
  727. package/node_modules/@grpc/grpc-js/src/transport.ts +0 -825
  728. package/node_modules/@grpc/grpc-js/src/uri-parser.ts +0 -127
  729. package/node_modules/@grpc/proto-loader/LICENSE +0 -201
  730. package/node_modules/@grpc/proto-loader/README.md +0 -140
  731. package/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js +0 -913
  732. package/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js.map +0 -1
  733. package/node_modules/@grpc/proto-loader/build/src/index.d.ts +0 -160
  734. package/node_modules/@grpc/proto-loader/build/src/index.js +0 -244
  735. package/node_modules/@grpc/proto-loader/build/src/index.js.map +0 -1
  736. package/node_modules/@grpc/proto-loader/build/src/util.d.ts +0 -27
  737. package/node_modules/@grpc/proto-loader/build/src/util.js +0 -89
  738. package/node_modules/@grpc/proto-loader/build/src/util.js.map +0 -1
  739. package/node_modules/@grpc/proto-loader/package.json +0 -69
  740. package/node_modules/@js-sdsl/ordered-map/CHANGELOG.md +0 -237
  741. package/node_modules/@js-sdsl/ordered-map/LICENSE +0 -21
  742. package/node_modules/@js-sdsl/ordered-map/README.md +0 -270
  743. package/node_modules/@js-sdsl/ordered-map/README.zh-CN.md +0 -272
  744. package/node_modules/@js-sdsl/ordered-map/dist/cjs/index.d.ts +0 -402
  745. package/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js +0 -795
  746. package/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js.map +0 -1
  747. package/node_modules/@js-sdsl/ordered-map/dist/esm/index.d.ts +0 -402
  748. package/node_modules/@js-sdsl/ordered-map/dist/esm/index.js +0 -975
  749. package/node_modules/@js-sdsl/ordered-map/dist/esm/index.js.map +0 -1
  750. package/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.js +0 -1157
  751. package/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js +0 -8
  752. package/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js.map +0 -1
  753. package/node_modules/@js-sdsl/ordered-map/package.json +0 -138
  754. package/node_modules/@protobufjs/aspromise/LICENSE +0 -26
  755. package/node_modules/@protobufjs/aspromise/README.md +0 -13
  756. package/node_modules/@protobufjs/aspromise/index.d.ts +0 -13
  757. package/node_modules/@protobufjs/aspromise/index.js +0 -52
  758. package/node_modules/@protobufjs/aspromise/package.json +0 -21
  759. package/node_modules/@protobufjs/aspromise/tests/index.js +0 -130
  760. package/node_modules/@protobufjs/base64/LICENSE +0 -26
  761. package/node_modules/@protobufjs/base64/README.md +0 -19
  762. package/node_modules/@protobufjs/base64/index.d.ts +0 -32
  763. package/node_modules/@protobufjs/base64/index.js +0 -139
  764. package/node_modules/@protobufjs/base64/package.json +0 -21
  765. package/node_modules/@protobufjs/base64/tests/index.js +0 -46
  766. package/node_modules/@protobufjs/codegen/LICENSE +0 -26
  767. package/node_modules/@protobufjs/codegen/README.md +0 -49
  768. package/node_modules/@protobufjs/codegen/index.d.ts +0 -31
  769. package/node_modules/@protobufjs/codegen/index.js +0 -99
  770. package/node_modules/@protobufjs/codegen/package.json +0 -13
  771. package/node_modules/@protobufjs/codegen/tests/index.js +0 -13
  772. package/node_modules/@protobufjs/eventemitter/LICENSE +0 -26
  773. package/node_modules/@protobufjs/eventemitter/README.md +0 -22
  774. package/node_modules/@protobufjs/eventemitter/index.d.ts +0 -43
  775. package/node_modules/@protobufjs/eventemitter/index.js +0 -76
  776. package/node_modules/@protobufjs/eventemitter/package.json +0 -21
  777. package/node_modules/@protobufjs/eventemitter/tests/index.js +0 -47
  778. package/node_modules/@protobufjs/fetch/LICENSE +0 -26
  779. package/node_modules/@protobufjs/fetch/README.md +0 -13
  780. package/node_modules/@protobufjs/fetch/index.d.ts +0 -56
  781. package/node_modules/@protobufjs/fetch/index.js +0 -115
  782. package/node_modules/@protobufjs/fetch/package.json +0 -25
  783. package/node_modules/@protobufjs/fetch/tests/index.js +0 -16
  784. package/node_modules/@protobufjs/float/LICENSE +0 -26
  785. package/node_modules/@protobufjs/float/README.md +0 -102
  786. package/node_modules/@protobufjs/float/bench/index.js +0 -87
  787. package/node_modules/@protobufjs/float/bench/suite.js +0 -46
  788. package/node_modules/@protobufjs/float/index.d.ts +0 -83
  789. package/node_modules/@protobufjs/float/index.js +0 -335
  790. package/node_modules/@protobufjs/float/package.json +0 -26
  791. package/node_modules/@protobufjs/float/tests/index.js +0 -100
  792. package/node_modules/@protobufjs/inquire/.npmignore +0 -3
  793. package/node_modules/@protobufjs/inquire/LICENSE +0 -26
  794. package/node_modules/@protobufjs/inquire/README.md +0 -13
  795. package/node_modules/@protobufjs/inquire/index.d.ts +0 -9
  796. package/node_modules/@protobufjs/inquire/index.js +0 -17
  797. package/node_modules/@protobufjs/inquire/package.json +0 -21
  798. package/node_modules/@protobufjs/inquire/tests/data/array.js +0 -1
  799. package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +0 -1
  800. package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +0 -1
  801. package/node_modules/@protobufjs/inquire/tests/data/object.js +0 -1
  802. package/node_modules/@protobufjs/inquire/tests/index.js +0 -20
  803. package/node_modules/@protobufjs/path/LICENSE +0 -26
  804. package/node_modules/@protobufjs/path/README.md +0 -19
  805. package/node_modules/@protobufjs/path/index.d.ts +0 -22
  806. package/node_modules/@protobufjs/path/index.js +0 -65
  807. package/node_modules/@protobufjs/path/package.json +0 -21
  808. package/node_modules/@protobufjs/path/tests/index.js +0 -60
  809. package/node_modules/@protobufjs/pool/.npmignore +0 -3
  810. package/node_modules/@protobufjs/pool/LICENSE +0 -26
  811. package/node_modules/@protobufjs/pool/README.md +0 -13
  812. package/node_modules/@protobufjs/pool/index.d.ts +0 -32
  813. package/node_modules/@protobufjs/pool/index.js +0 -48
  814. package/node_modules/@protobufjs/pool/package.json +0 -21
  815. package/node_modules/@protobufjs/pool/tests/index.js +0 -33
  816. package/node_modules/@protobufjs/utf8/.npmignore +0 -3
  817. package/node_modules/@protobufjs/utf8/LICENSE +0 -26
  818. package/node_modules/@protobufjs/utf8/README.md +0 -20
  819. package/node_modules/@protobufjs/utf8/index.d.ts +0 -24
  820. package/node_modules/@protobufjs/utf8/index.js +0 -105
  821. package/node_modules/@protobufjs/utf8/package.json +0 -21
  822. package/node_modules/@protobufjs/utf8/tests/data/utf8.txt +0 -216
  823. package/node_modules/@protobufjs/utf8/tests/index.js +0 -57
  824. package/node_modules/@types/node/LICENSE +0 -21
  825. package/node_modules/@types/node/README.md +0 -16
  826. package/node_modules/@types/node/assert/strict.d.ts +0 -8
  827. package/node_modules/@types/node/assert.d.ts +0 -912
  828. package/node_modules/@types/node/async_hooks.d.ts +0 -497
  829. package/node_modules/@types/node/buffer.d.ts +0 -2142
  830. package/node_modules/@types/node/child_process.d.ts +0 -1355
  831. package/node_modules/@types/node/cluster.d.ts +0 -414
  832. package/node_modules/@types/node/console.d.ts +0 -407
  833. package/node_modules/@types/node/constants.d.ts +0 -18
  834. package/node_modules/@types/node/crypto.d.ts +0 -3243
  835. package/node_modules/@types/node/dgram.d.ts +0 -545
  836. package/node_modules/@types/node/diagnostics_channel.d.ts +0 -128
  837. package/node_modules/@types/node/dns/promises.d.ts +0 -357
  838. package/node_modules/@types/node/dns.d.ts +0 -643
  839. package/node_modules/@types/node/domain.d.ts +0 -169
  840. package/node_modules/@types/node/events.d.ts +0 -623
  841. package/node_modules/@types/node/fs/promises.d.ts +0 -997
  842. package/node_modules/@types/node/fs.d.ts +0 -3723
  843. package/node_modules/@types/node/globals.d.ts +0 -284
  844. package/node_modules/@types/node/globals.global.d.ts +0 -1
  845. package/node_modules/@types/node/http.d.ts +0 -1358
  846. package/node_modules/@types/node/http2.d.ts +0 -2100
  847. package/node_modules/@types/node/https.d.ts +0 -391
  848. package/node_modules/@types/node/index.d.ts +0 -132
  849. package/node_modules/@types/node/inspector.d.ts +0 -2738
  850. package/node_modules/@types/node/module.d.ts +0 -114
  851. package/node_modules/@types/node/net.d.ts +0 -783
  852. package/node_modules/@types/node/os.d.ts +0 -455
  853. package/node_modules/@types/node/package.json +0 -235
  854. package/node_modules/@types/node/path.d.ts +0 -172
  855. package/node_modules/@types/node/perf_hooks.d.ts +0 -555
  856. package/node_modules/@types/node/process.d.ts +0 -1477
  857. package/node_modules/@types/node/punycode.d.ts +0 -117
  858. package/node_modules/@types/node/querystring.d.ts +0 -131
  859. package/node_modules/@types/node/readline.d.ts +0 -542
  860. package/node_modules/@types/node/repl.d.ts +0 -424
  861. package/node_modules/@types/node/stream/consumers.d.ts +0 -24
  862. package/node_modules/@types/node/stream/promises.d.ts +0 -42
  863. package/node_modules/@types/node/stream/web.d.ts +0 -6
  864. package/node_modules/@types/node/stream.d.ts +0 -1218
  865. package/node_modules/@types/node/string_decoder.d.ts +0 -67
  866. package/node_modules/@types/node/timers/promises.d.ts +0 -68
  867. package/node_modules/@types/node/timers.d.ts +0 -94
  868. package/node_modules/@types/node/tls.d.ts +0 -1019
  869. package/node_modules/@types/node/trace_events.d.ts +0 -161
  870. package/node_modules/@types/node/tty.d.ts +0 -206
  871. package/node_modules/@types/node/url.d.ts +0 -798
  872. package/node_modules/@types/node/util.d.ts +0 -1564
  873. package/node_modules/@types/node/v8.d.ts +0 -378
  874. package/node_modules/@types/node/vm.d.ts +0 -508
  875. package/node_modules/@types/node/wasi.d.ts +0 -153
  876. package/node_modules/@types/node/worker_threads.d.ts +0 -649
  877. package/node_modules/@types/node/zlib.d.ts +0 -517
  878. package/node_modules/ansi-regex/index.d.ts +0 -37
  879. package/node_modules/ansi-regex/index.js +0 -10
  880. package/node_modules/ansi-regex/license +0 -9
  881. package/node_modules/ansi-regex/package.json +0 -55
  882. package/node_modules/ansi-regex/readme.md +0 -78
  883. package/node_modules/ansi-styles/index.d.ts +0 -345
  884. package/node_modules/ansi-styles/index.js +0 -163
  885. package/node_modules/ansi-styles/license +0 -9
  886. package/node_modules/ansi-styles/package.json +0 -56
  887. package/node_modules/ansi-styles/readme.md +0 -152
  888. package/node_modules/argparse/LICENSE +0 -254
  889. package/node_modules/argparse/README.md +0 -84
  890. package/node_modules/argparse/argparse.js +0 -3707
  891. package/node_modules/argparse/lib/sub.js +0 -67
  892. package/node_modules/argparse/lib/textwrap.js +0 -440
  893. package/node_modules/argparse/package.json +0 -31
  894. package/node_modules/asn1/Jenkinsfile +0 -65
  895. package/node_modules/asn1/LICENSE +0 -19
  896. package/node_modules/asn1/README.md +0 -50
  897. package/node_modules/asn1/lib/ber/errors.js +0 -13
  898. package/node_modules/asn1/lib/ber/index.js +0 -27
  899. package/node_modules/asn1/lib/ber/reader.js +0 -262
  900. package/node_modules/asn1/lib/ber/types.js +0 -36
  901. package/node_modules/asn1/lib/ber/writer.js +0 -317
  902. package/node_modules/asn1/lib/index.js +0 -20
  903. package/node_modules/asn1/package.json +0 -31
  904. package/node_modules/b4a/LICENSE +0 -201
  905. package/node_modules/b4a/README.md +0 -153
  906. package/node_modules/b4a/browser.js +0 -567
  907. package/node_modules/b4a/index.js +0 -188
  908. package/node_modules/b4a/lib/ascii.js +0 -31
  909. package/node_modules/b4a/lib/base64.js +0 -65
  910. package/node_modules/b4a/lib/hex.js +0 -51
  911. package/node_modules/b4a/lib/latin1.js +0 -31
  912. package/node_modules/b4a/lib/utf16le.js +0 -40
  913. package/node_modules/b4a/lib/utf8.js +0 -141
  914. package/node_modules/b4a/package.json +0 -49
  915. package/node_modules/b4a/react-native.js +0 -5
  916. package/node_modules/bare-events/LICENSE +0 -201
  917. package/node_modules/bare-events/README.md +0 -25
  918. package/node_modules/bare-events/global.d.ts +0 -15
  919. package/node_modules/bare-events/global.js +0 -5
  920. package/node_modules/bare-events/index.d.ts +0 -81
  921. package/node_modules/bare-events/index.js +0 -367
  922. package/node_modules/bare-events/lib/errors.js +0 -26
  923. package/node_modules/bare-events/package.json +0 -61
  924. package/node_modules/bare-events/web.d.ts +0 -79
  925. package/node_modules/bare-events/web.js +0 -335
  926. package/node_modules/bare-fs/CMakeLists.txt +0 -13
  927. package/node_modules/bare-fs/LICENSE +0 -201
  928. package/node_modules/bare-fs/README.md +0 -989
  929. package/node_modules/bare-fs/binding.c +0 -2889
  930. package/node_modules/bare-fs/binding.js +0 -1
  931. package/node_modules/bare-fs/index.d.ts +0 -1223
  932. package/node_modules/bare-fs/index.js +0 -2842
  933. package/node_modules/bare-fs/lib/constants.d.ts +0 -49
  934. package/node_modules/bare-fs/lib/constants.js +0 -49
  935. package/node_modules/bare-fs/lib/errors.d.ts +0 -11
  936. package/node_modules/bare-fs/lib/errors.js +0 -55
  937. package/node_modules/bare-fs/package.json +0 -74
  938. package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
  939. package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
  940. package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
  941. package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
  942. package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
  943. package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
  944. package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
  945. package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
  946. package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
  947. package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
  948. package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
  949. package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
  950. package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
  951. package/node_modules/bare-fs/promises.d.ts +0 -310
  952. package/node_modules/bare-fs/promises.js +0 -119
  953. package/node_modules/bare-os/CMakeLists.txt +0 -13
  954. package/node_modules/bare-os/LICENSE +0 -201
  955. package/node_modules/bare-os/README.md +0 -11
  956. package/node_modules/bare-os/binding.c +0 -1427
  957. package/node_modules/bare-os/binding.js +0 -1
  958. package/node_modules/bare-os/index.d.ts +0 -143
  959. package/node_modules/bare-os/index.js +0 -129
  960. package/node_modules/bare-os/lib/constants.js +0 -7
  961. package/node_modules/bare-os/lib/errors.js +0 -22
  962. package/node_modules/bare-os/package.json +0 -49
  963. package/node_modules/bare-os/prebuilds/android-arm/bare-os.bare +0 -0
  964. package/node_modules/bare-os/prebuilds/android-arm64/bare-os.bare +0 -0
  965. package/node_modules/bare-os/prebuilds/android-ia32/bare-os.bare +0 -0
  966. package/node_modules/bare-os/prebuilds/android-x64/bare-os.bare +0 -0
  967. package/node_modules/bare-os/prebuilds/darwin-arm64/bare-os.bare +0 -0
  968. package/node_modules/bare-os/prebuilds/darwin-x64/bare-os.bare +0 -0
  969. package/node_modules/bare-os/prebuilds/ios-arm64/bare-os.bare +0 -0
  970. package/node_modules/bare-os/prebuilds/ios-arm64-simulator/bare-os.bare +0 -0
  971. package/node_modules/bare-os/prebuilds/ios-x64-simulator/bare-os.bare +0 -0
  972. package/node_modules/bare-os/prebuilds/linux-arm64/bare-os.bare +0 -0
  973. package/node_modules/bare-os/prebuilds/linux-x64/bare-os.bare +0 -0
  974. package/node_modules/bare-os/prebuilds/win32-arm64/bare-os.bare +0 -0
  975. package/node_modules/bare-os/prebuilds/win32-x64/bare-os.bare +0 -0
  976. package/node_modules/bare-path/LICENSE +0 -201
  977. package/node_modules/bare-path/NOTICE +0 -28
  978. package/node_modules/bare-path/README.md +0 -19
  979. package/node_modules/bare-path/index.js +0 -11
  980. package/node_modules/bare-path/lib/constants.js +0 -11
  981. package/node_modules/bare-path/lib/posix.js +0 -242
  982. package/node_modules/bare-path/lib/shared.js +0 -67
  983. package/node_modules/bare-path/lib/win32.js +0 -513
  984. package/node_modules/bare-path/package.json +0 -36
  985. package/node_modules/bare-stream/LICENSE +0 -201
  986. package/node_modules/bare-stream/README.md +0 -15
  987. package/node_modules/bare-stream/global.js +0 -12
  988. package/node_modules/bare-stream/index.d.ts +0 -235
  989. package/node_modules/bare-stream/index.js +0 -492
  990. package/node_modules/bare-stream/package.json +0 -70
  991. package/node_modules/bare-stream/promises.js +0 -3
  992. package/node_modules/bare-stream/web.d.ts +0 -152
  993. package/node_modules/bare-stream/web.js +0 -607
  994. package/node_modules/bare-url/CMakeLists.txt +0 -27
  995. package/node_modules/bare-url/LICENSE +0 -201
  996. package/node_modules/bare-url/README.md +0 -19
  997. package/node_modules/bare-url/binding.c +0 -186
  998. package/node_modules/bare-url/binding.js +0 -1
  999. package/node_modules/bare-url/global.d.ts +0 -12
  1000. package/node_modules/bare-url/global.js +0 -2
  1001. package/node_modules/bare-url/index.d.ts +0 -41
  1002. package/node_modules/bare-url/index.js +0 -407
  1003. package/node_modules/bare-url/lib/errors.d.ts +0 -10
  1004. package/node_modules/bare-url/lib/errors.js +0 -33
  1005. package/node_modules/bare-url/lib/url-search-params.d.ts +0 -23
  1006. package/node_modules/bare-url/lib/url-search-params.js +0 -194
  1007. package/node_modules/bare-url/package.json +0 -54
  1008. package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
  1009. package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
  1010. package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
  1011. package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
  1012. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  1013. package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
  1014. package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
  1015. package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
  1016. package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
  1017. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  1018. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  1019. package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
  1020. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  1021. package/node_modules/base64-js/LICENSE +0 -21
  1022. package/node_modules/base64-js/README.md +0 -34
  1023. package/node_modules/base64-js/base64js.min.js +0 -1
  1024. package/node_modules/base64-js/index.d.ts +0 -3
  1025. package/node_modules/base64-js/index.js +0 -150
  1026. package/node_modules/base64-js/package.json +0 -47
  1027. package/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +0 -13
  1028. package/node_modules/bcrypt-pbkdf/LICENSE +0 -66
  1029. package/node_modules/bcrypt-pbkdf/README.md +0 -45
  1030. package/node_modules/bcrypt-pbkdf/index.js +0 -556
  1031. package/node_modules/bcrypt-pbkdf/package.json +0 -15
  1032. package/node_modules/bl/.travis.yml +0 -17
  1033. package/node_modules/bl/BufferList.js +0 -396
  1034. package/node_modules/bl/LICENSE.md +0 -13
  1035. package/node_modules/bl/README.md +0 -247
  1036. package/node_modules/bl/bl.js +0 -84
  1037. package/node_modules/bl/package.json +0 -37
  1038. package/node_modules/bl/test/convert.js +0 -21
  1039. package/node_modules/bl/test/indexOf.js +0 -492
  1040. package/node_modules/bl/test/isBufferList.js +0 -32
  1041. package/node_modules/bl/test/test.js +0 -869
  1042. package/node_modules/buffer/AUTHORS.md +0 -70
  1043. package/node_modules/buffer/LICENSE +0 -21
  1044. package/node_modules/buffer/README.md +0 -410
  1045. package/node_modules/buffer/index.d.ts +0 -186
  1046. package/node_modules/buffer/index.js +0 -1817
  1047. package/node_modules/buffer/package.json +0 -96
  1048. package/node_modules/buildcheck/.eslintrc.js +0 -5
  1049. package/node_modules/buildcheck/.github/workflows/ci.yml +0 -88
  1050. package/node_modules/buildcheck/.github/workflows/lint.yml +0 -27
  1051. package/node_modules/buildcheck/.gitignore +0 -3
  1052. package/node_modules/buildcheck/LICENSE +0 -19
  1053. package/node_modules/buildcheck/README.md +0 -106
  1054. package/node_modules/buildcheck/deps/Find-VisualStudio.cs +0 -250
  1055. package/node_modules/buildcheck/lib/findvs.js +0 -361
  1056. package/node_modules/buildcheck/lib/index.js +0 -738
  1057. package/node_modules/buildcheck/package.json +0 -36
  1058. package/node_modules/buildcheck/test/test.js +0 -8
  1059. package/node_modules/chownr/LICENSE +0 -15
  1060. package/node_modules/chownr/README.md +0 -3
  1061. package/node_modules/chownr/chownr.js +0 -167
  1062. package/node_modules/chownr/package.json +0 -29
  1063. package/node_modules/cliui/LICENSE.txt +0 -14
  1064. package/node_modules/cliui/README.md +0 -141
  1065. package/node_modules/cliui/build/index.cjs +0 -302
  1066. package/node_modules/cliui/build/index.d.cts +0 -43
  1067. package/node_modules/cliui/build/lib/index.js +0 -287
  1068. package/node_modules/cliui/build/lib/string-utils.js +0 -27
  1069. package/node_modules/cliui/index.mjs +0 -13
  1070. package/node_modules/cliui/package.json +0 -83
  1071. package/node_modules/color-convert/LICENSE +0 -21
  1072. package/node_modules/color-convert/README.md +0 -68
  1073. package/node_modules/color-convert/conversions.js +0 -839
  1074. package/node_modules/color-convert/index.js +0 -81
  1075. package/node_modules/color-convert/package.json +0 -48
  1076. package/node_modules/color-convert/route.js +0 -97
  1077. package/node_modules/color-name/LICENSE +0 -8
  1078. package/node_modules/color-name/README.md +0 -11
  1079. package/node_modules/color-name/index.js +0 -152
  1080. package/node_modules/color-name/package.json +0 -28
  1081. package/node_modules/cpu-features/.eslintrc.js +0 -5
  1082. package/node_modules/cpu-features/.github/workflows/ci.yml +0 -74
  1083. package/node_modules/cpu-features/.github/workflows/lint.yml +0 -27
  1084. package/node_modules/cpu-features/LICENSE +0 -19
  1085. package/node_modules/cpu-features/README.md +0 -59
  1086. package/node_modules/cpu-features/binding.gyp +0 -16
  1087. package/node_modules/cpu-features/build/Makefile +0 -352
  1088. package/node_modules/cpu-features/build/Release/.deps/Release/cpu_features.a.d +0 -1
  1089. package/node_modules/cpu-features/build/Release/.deps/Release/cpufeatures.node.d +0 -1
  1090. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o.d +0 -8
  1091. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o.d +0 -12
  1092. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o.d +0 -6
  1093. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o.d +0 -26
  1094. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o.d +0 -6
  1095. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o.d +0 -6
  1096. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o.d +0 -6
  1097. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o.d +0 -6
  1098. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o.d +0 -6
  1099. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o.d +0 -6
  1100. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o.d +0 -6
  1101. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o.d +0 -6
  1102. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o.d +0 -12
  1103. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o.d +0 -11
  1104. package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpufeatures/src/binding.o.d +0 -183
  1105. package/node_modules/cpu-features/build/Release/cpu_features.a +0 -0
  1106. package/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
  1107. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o +0 -0
  1108. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o +0 -0
  1109. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o +0 -0
  1110. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o +0 -0
  1111. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o +0 -0
  1112. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o +0 -0
  1113. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o +0 -0
  1114. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o +0 -0
  1115. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o +0 -0
  1116. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o +0 -0
  1117. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o +0 -0
  1118. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o +0 -0
  1119. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o +0 -0
  1120. package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o +0 -0
  1121. package/node_modules/cpu-features/build/Release/obj.target/cpufeatures/src/binding.o +0 -0
  1122. package/node_modules/cpu-features/build/binding.Makefile +0 -6
  1123. package/node_modules/cpu-features/build/config.gypi +0 -512
  1124. package/node_modules/cpu-features/build/cpufeatures.target.mk +0 -192
  1125. package/node_modules/cpu-features/build/deps/cpu_features/cpu_features.Makefile +0 -6
  1126. package/node_modules/cpu-features/build/deps/cpu_features/cpu_features.target.mk +0 -204
  1127. package/node_modules/cpu-features/build/gyp-mac-tool +0 -766
  1128. package/node_modules/cpu-features/buildcheck.gypi +0 -17
  1129. package/node_modules/cpu-features/buildcheck.js +0 -32
  1130. package/node_modules/cpu-features/deps/cpu_features/.clang-format +0 -4
  1131. package/node_modules/cpu-features/deps/cpu_features/.dockerignore +0 -31
  1132. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/Dockerfile +0 -5
  1133. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/aarch64_linux_cmake.yml +0 -30
  1134. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_freebsd_cmake.yml +0 -22
  1135. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_bazel.yml +0 -26
  1136. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_cmake.yml +0 -31
  1137. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_macos_cmake.yml +0 -43
  1138. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_windows_cmake.yml +0 -25
  1139. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/arm_linux_cmake.yml +0 -31
  1140. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/clang_format.yml +0 -24
  1141. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/mips_linux_cmake.yml +0 -30
  1142. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/power_linux_cmake.yml +0 -29
  1143. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/riscv_linux_cmake.yml +0 -28
  1144. package/node_modules/cpu-features/deps/cpu_features/.github/workflows/s390x_linux_cmake.yml +0 -27
  1145. package/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +0 -21
  1146. package/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +0 -329
  1147. package/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +0 -261
  1148. package/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +0 -23
  1149. package/node_modules/cpu-features/deps/cpu_features/LICENSE +0 -230
  1150. package/node_modules/cpu-features/deps/cpu_features/README.md +0 -272
  1151. package/node_modules/cpu-features/deps/cpu_features/WORKSPACE +0 -19
  1152. package/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +0 -5
  1153. package/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +0 -11
  1154. package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +0 -3
  1155. package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +0 -3
  1156. package/node_modules/cpu-features/deps/cpu_features/cmake/README.md +0 -30
  1157. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +0 -252
  1158. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +0 -40
  1159. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +0 -64
  1160. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +0 -312
  1161. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +0 -7
  1162. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +0 -48
  1163. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +0 -34
  1164. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +0 -22
  1165. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +0 -11
  1166. package/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +0 -107
  1167. package/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +0 -15
  1168. package/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +0 -105
  1169. package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +0 -54
  1170. package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +0 -384
  1171. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +0 -259
  1172. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +0 -121
  1173. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +0 -74
  1174. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +0 -149
  1175. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +0 -72
  1176. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +0 -108
  1177. package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +0 -288
  1178. package/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +0 -40
  1179. package/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +0 -37
  1180. package/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +0 -39
  1181. package/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +0 -240
  1182. package/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +0 -49
  1183. package/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +0 -110
  1184. package/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +0 -70
  1185. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +0 -60
  1186. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +0 -4
  1187. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +0 -205
  1188. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +0 -320
  1189. package/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +0 -12
  1190. package/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +0 -456
  1191. package/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +0 -165
  1192. package/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +0 -75
  1193. package/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +0 -490
  1194. package/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +0 -79
  1195. package/node_modules/cpu-features/deps/cpu_features/src/copy.inl +0 -19
  1196. package/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +0 -86
  1197. package/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +0 -26
  1198. package/node_modules/cpu-features/deps/cpu_features/src/equals.inl +0 -22
  1199. package/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +0 -62
  1200. package/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +0 -169
  1201. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +0 -88
  1202. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +0 -79
  1203. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +0 -82
  1204. package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +0 -138
  1205. package/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +0 -212
  1206. package/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +0 -93
  1207. package/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +0 -163
  1208. package/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +0 -111
  1209. package/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +0 -120
  1210. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +0 -2055
  1211. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +0 -68
  1212. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +0 -58
  1213. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +0 -57
  1214. package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +0 -58
  1215. package/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +0 -132
  1216. package/node_modules/cpu-features/deps/cpu_features/src/string_view.c +0 -192
  1217. package/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +0 -461
  1218. package/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +0 -114
  1219. package/node_modules/cpu-features/deps/cpu_features/test/bit_utils_test.cc +0 -53
  1220. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_aarch64_test.cc +0 -396
  1221. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_arm_test.cc +0 -384
  1222. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_mips_test.cc +0 -176
  1223. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_ppc_test.cc +0 -131
  1224. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_riscv_test.cc +0 -180
  1225. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_s390x_test.cc +0 -82
  1226. package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_x86_test.cc +0 -1729
  1227. package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.cc +0 -103
  1228. package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +0 -61
  1229. package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.cc +0 -52
  1230. package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +0 -31
  1231. package/node_modules/cpu-features/deps/cpu_features/test/stack_line_reader_test.cc +0 -132
  1232. package/node_modules/cpu-features/deps/cpu_features/test/string_view_test.cc +0 -202
  1233. package/node_modules/cpu-features/lib/index.js +0 -5
  1234. package/node_modules/cpu-features/package.json +0 -40
  1235. package/node_modules/cpu-features/src/binding.cc +0 -151
  1236. package/node_modules/cpu-features/test/test.js +0 -12
  1237. package/node_modules/debug/LICENSE +0 -20
  1238. package/node_modules/debug/README.md +0 -481
  1239. package/node_modules/debug/package.json +0 -64
  1240. package/node_modules/debug/src/browser.js +0 -272
  1241. package/node_modules/debug/src/common.js +0 -292
  1242. package/node_modules/debug/src/index.js +0 -10
  1243. package/node_modules/debug/src/node.js +0 -263
  1244. package/node_modules/docker-modem/.eslintrc +0 -35
  1245. package/node_modules/docker-modem/.github/FUNDING.yml +0 -1
  1246. package/node_modules/docker-modem/.github/workflows/main.yml +0 -63
  1247. package/node_modules/docker-modem/.travis.yml +0 -36
  1248. package/node_modules/docker-modem/.vscode/launch.json +0 -22
  1249. package/node_modules/docker-modem/LICENSE +0 -201
  1250. package/node_modules/docker-modem/README.md +0 -64
  1251. package/node_modules/docker-modem/lib/http.js +0 -87
  1252. package/node_modules/docker-modem/lib/http_duplex.js +0 -55
  1253. package/node_modules/docker-modem/lib/modem.js +0 -577
  1254. package/node_modules/docker-modem/lib/ssh.js +0 -48
  1255. package/node_modules/docker-modem/lib/utils.js +0 -24
  1256. package/node_modules/docker-modem/package.json +0 -32
  1257. package/node_modules/docker-modem/test/modem_test.js +0 -248
  1258. package/node_modules/dockerode/.claude/settings.local.json +0 -8
  1259. package/node_modules/dockerode/.eslintignore +0 -2
  1260. package/node_modules/dockerode/.eslintrc +0 -35
  1261. package/node_modules/dockerode/.github/FUNDING.yml +0 -1
  1262. package/node_modules/dockerode/.github/stale.yml +0 -20
  1263. package/node_modules/dockerode/.github/workflows/main.yml +0 -35
  1264. package/node_modules/dockerode/.travis.yml +0 -24
  1265. package/node_modules/dockerode/.vscode/launch.json +0 -25
  1266. package/node_modules/dockerode/LICENSE +0 -201
  1267. package/node_modules/dockerode/README.md +0 -530
  1268. package/node_modules/dockerode/lib/buildkit.js +0 -242
  1269. package/node_modules/dockerode/lib/config.js +0 -135
  1270. package/node_modules/dockerode/lib/container.js +0 -1085
  1271. package/node_modules/dockerode/lib/docker.js +0 -1903
  1272. package/node_modules/dockerode/lib/exec.js +0 -139
  1273. package/node_modules/dockerode/lib/image.js +0 -279
  1274. package/node_modules/dockerode/lib/network.js +0 -171
  1275. package/node_modules/dockerode/lib/node.js +0 -135
  1276. package/node_modules/dockerode/lib/plugin.js +0 -372
  1277. package/node_modules/dockerode/lib/proto/auth.proto +0 -54
  1278. package/node_modules/dockerode/lib/proto/buildkit_status.proto +0 -81
  1279. package/node_modules/dockerode/lib/secret.js +0 -134
  1280. package/node_modules/dockerode/lib/service.js +0 -183
  1281. package/node_modules/dockerode/lib/session.js +0 -63
  1282. package/node_modules/dockerode/lib/task.js +0 -97
  1283. package/node_modules/dockerode/lib/util.js +0 -106
  1284. package/node_modules/dockerode/lib/volume.js +0 -90
  1285. package/node_modules/dockerode/package.json +0 -40
  1286. package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  1287. package/node_modules/emoji-regex/README.md +0 -73
  1288. package/node_modules/emoji-regex/es2015/index.js +0 -6
  1289. package/node_modules/emoji-regex/es2015/text.js +0 -6
  1290. package/node_modules/emoji-regex/index.d.ts +0 -23
  1291. package/node_modules/emoji-regex/index.js +0 -6
  1292. package/node_modules/emoji-regex/package.json +0 -50
  1293. package/node_modules/emoji-regex/text.js +0 -6
  1294. package/node_modules/end-of-stream/LICENSE +0 -21
  1295. package/node_modules/end-of-stream/README.md +0 -54
  1296. package/node_modules/end-of-stream/index.js +0 -96
  1297. package/node_modules/end-of-stream/package.json +0 -37
  1298. package/node_modules/escalade/dist/index.js +0 -22
  1299. package/node_modules/escalade/dist/index.mjs +0 -22
  1300. package/node_modules/escalade/index.d.mts +0 -11
  1301. package/node_modules/escalade/index.d.ts +0 -15
  1302. package/node_modules/escalade/license +0 -9
  1303. package/node_modules/escalade/package.json +0 -74
  1304. package/node_modules/escalade/readme.md +0 -211
  1305. package/node_modules/escalade/sync/index.d.mts +0 -9
  1306. package/node_modules/escalade/sync/index.d.ts +0 -13
  1307. package/node_modules/escalade/sync/index.js +0 -18
  1308. package/node_modules/escalade/sync/index.mjs +0 -18
  1309. package/node_modules/events-universal/LICENSE +0 -201
  1310. package/node_modules/events-universal/README.md +0 -17
  1311. package/node_modules/events-universal/bare.js +0 -1
  1312. package/node_modules/events-universal/default.js +0 -1
  1313. package/node_modules/events-universal/index.js +0 -1
  1314. package/node_modules/events-universal/package.json +0 -39
  1315. package/node_modules/events-universal/react-native.js +0 -1
  1316. package/node_modules/fast-fifo/LICENSE +0 -21
  1317. package/node_modules/fast-fifo/README.md +0 -78
  1318. package/node_modules/fast-fifo/fixed-size.js +0 -39
  1319. package/node_modules/fast-fifo/index.js +0 -48
  1320. package/node_modules/fast-fifo/package.json +0 -28
  1321. package/node_modules/fs-constants/LICENSE +0 -21
  1322. package/node_modules/fs-constants/README.md +0 -26
  1323. package/node_modules/fs-constants/browser.js +0 -1
  1324. package/node_modules/fs-constants/index.js +0 -1
  1325. package/node_modules/fs-constants/package.json +0 -19
  1326. package/node_modules/fs-extra/LICENSE +0 -15
  1327. package/node_modules/fs-extra/README.md +0 -294
  1328. package/node_modules/fs-extra/lib/copy/copy-sync.js +0 -176
  1329. package/node_modules/fs-extra/lib/copy/copy.js +0 -180
  1330. package/node_modules/fs-extra/lib/copy/index.js +0 -7
  1331. package/node_modules/fs-extra/lib/empty/index.js +0 -39
  1332. package/node_modules/fs-extra/lib/ensure/file.js +0 -66
  1333. package/node_modules/fs-extra/lib/ensure/index.js +0 -23
  1334. package/node_modules/fs-extra/lib/ensure/link.js +0 -64
  1335. package/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
  1336. package/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
  1337. package/node_modules/fs-extra/lib/ensure/symlink.js +0 -92
  1338. package/node_modules/fs-extra/lib/esm.mjs +0 -68
  1339. package/node_modules/fs-extra/lib/fs/index.js +0 -146
  1340. package/node_modules/fs-extra/lib/index.js +0 -16
  1341. package/node_modules/fs-extra/lib/json/index.js +0 -16
  1342. package/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
  1343. package/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
  1344. package/node_modules/fs-extra/lib/json/output-json.js +0 -12
  1345. package/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
  1346. package/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
  1347. package/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
  1348. package/node_modules/fs-extra/lib/move/index.js +0 -7
  1349. package/node_modules/fs-extra/lib/move/move-sync.js +0 -55
  1350. package/node_modules/fs-extra/lib/move/move.js +0 -59
  1351. package/node_modules/fs-extra/lib/output-file/index.js +0 -31
  1352. package/node_modules/fs-extra/lib/path-exists/index.js +0 -12
  1353. package/node_modules/fs-extra/lib/remove/index.js +0 -17
  1354. package/node_modules/fs-extra/lib/util/async.js +0 -29
  1355. package/node_modules/fs-extra/lib/util/stat.js +0 -159
  1356. package/node_modules/fs-extra/lib/util/utimes.js +0 -36
  1357. package/node_modules/fs-extra/package.json +0 -71
  1358. package/node_modules/get-caller-file/LICENSE.md +0 -6
  1359. package/node_modules/get-caller-file/README.md +0 -41
  1360. package/node_modules/get-caller-file/index.d.ts +0 -2
  1361. package/node_modules/get-caller-file/index.js +0 -22
  1362. package/node_modules/get-caller-file/index.js.map +0 -1
  1363. package/node_modules/get-caller-file/package.json +0 -42
  1364. package/node_modules/graceful-fs/LICENSE +0 -15
  1365. package/node_modules/graceful-fs/README.md +0 -143
  1366. package/node_modules/graceful-fs/clone.js +0 -23
  1367. package/node_modules/graceful-fs/graceful-fs.js +0 -448
  1368. package/node_modules/graceful-fs/legacy-streams.js +0 -118
  1369. package/node_modules/graceful-fs/package.json +0 -53
  1370. package/node_modules/graceful-fs/polyfills.js +0 -355
  1371. package/node_modules/ieee754/LICENSE +0 -11
  1372. package/node_modules/ieee754/README.md +0 -51
  1373. package/node_modules/ieee754/index.d.ts +0 -10
  1374. package/node_modules/ieee754/index.js +0 -85
  1375. package/node_modules/ieee754/package.json +0 -52
  1376. package/node_modules/inherits/LICENSE +0 -16
  1377. package/node_modules/inherits/README.md +0 -42
  1378. package/node_modules/inherits/inherits.js +0 -9
  1379. package/node_modules/inherits/inherits_browser.js +0 -27
  1380. package/node_modules/inherits/package.json +0 -29
  1381. package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  1382. package/node_modules/is-fullwidth-code-point/index.js +0 -50
  1383. package/node_modules/is-fullwidth-code-point/license +0 -9
  1384. package/node_modules/is-fullwidth-code-point/package.json +0 -42
  1385. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  1386. package/node_modules/js-yaml/LICENSE +0 -21
  1387. package/node_modules/js-yaml/README.md +0 -247
  1388. package/node_modules/js-yaml/bin/js-yaml.js +0 -126
  1389. package/node_modules/js-yaml/dist/js-yaml.js +0 -3880
  1390. package/node_modules/js-yaml/dist/js-yaml.min.js +0 -2
  1391. package/node_modules/js-yaml/dist/js-yaml.mjs +0 -3856
  1392. package/node_modules/js-yaml/index.js +0 -47
  1393. package/node_modules/js-yaml/lib/common.js +0 -59
  1394. package/node_modules/js-yaml/lib/dumper.js +0 -965
  1395. package/node_modules/js-yaml/lib/exception.js +0 -55
  1396. package/node_modules/js-yaml/lib/loader.js +0 -1733
  1397. package/node_modules/js-yaml/lib/schema/core.js +0 -11
  1398. package/node_modules/js-yaml/lib/schema/default.js +0 -22
  1399. package/node_modules/js-yaml/lib/schema/failsafe.js +0 -17
  1400. package/node_modules/js-yaml/lib/schema/json.js +0 -19
  1401. package/node_modules/js-yaml/lib/schema.js +0 -121
  1402. package/node_modules/js-yaml/lib/snippet.js +0 -101
  1403. package/node_modules/js-yaml/lib/type/binary.js +0 -125
  1404. package/node_modules/js-yaml/lib/type/bool.js +0 -35
  1405. package/node_modules/js-yaml/lib/type/float.js +0 -97
  1406. package/node_modules/js-yaml/lib/type/int.js +0 -156
  1407. package/node_modules/js-yaml/lib/type/map.js +0 -8
  1408. package/node_modules/js-yaml/lib/type/merge.js +0 -12
  1409. package/node_modules/js-yaml/lib/type/null.js +0 -35
  1410. package/node_modules/js-yaml/lib/type/omap.js +0 -44
  1411. package/node_modules/js-yaml/lib/type/pairs.js +0 -53
  1412. package/node_modules/js-yaml/lib/type/seq.js +0 -8
  1413. package/node_modules/js-yaml/lib/type/set.js +0 -29
  1414. package/node_modules/js-yaml/lib/type/str.js +0 -8
  1415. package/node_modules/js-yaml/lib/type/timestamp.js +0 -88
  1416. package/node_modules/js-yaml/lib/type.js +0 -66
  1417. package/node_modules/js-yaml/package.json +0 -66
  1418. package/node_modules/jsonfile/LICENSE +0 -15
  1419. package/node_modules/jsonfile/README.md +0 -230
  1420. package/node_modules/jsonfile/index.js +0 -88
  1421. package/node_modules/jsonfile/package.json +0 -40
  1422. package/node_modules/jsonfile/utils.js +0 -14
  1423. package/node_modules/lodash.camelcase/LICENSE +0 -47
  1424. package/node_modules/lodash.camelcase/README.md +0 -18
  1425. package/node_modules/lodash.camelcase/index.js +0 -599
  1426. package/node_modules/lodash.camelcase/package.json +0 -17
  1427. package/node_modules/long/LICENSE +0 -202
  1428. package/node_modules/long/README.md +0 -286
  1429. package/node_modules/long/index.d.ts +0 -2
  1430. package/node_modules/long/index.js +0 -1581
  1431. package/node_modules/long/package.json +0 -58
  1432. package/node_modules/long/types.d.ts +0 -474
  1433. package/node_modules/long/umd/index.d.ts +0 -3
  1434. package/node_modules/long/umd/index.js +0 -1622
  1435. package/node_modules/long/umd/package.json +0 -3
  1436. package/node_modules/long/umd/types.d.ts +0 -474
  1437. package/node_modules/mkdirp-classic/LICENSE +0 -21
  1438. package/node_modules/mkdirp-classic/README.md +0 -18
  1439. package/node_modules/mkdirp-classic/index.js +0 -98
  1440. package/node_modules/mkdirp-classic/package.json +0 -18
  1441. package/node_modules/ms/index.js +0 -162
  1442. package/node_modules/ms/license.md +0 -21
  1443. package/node_modules/ms/package.json +0 -38
  1444. package/node_modules/ms/readme.md +0 -59
  1445. package/node_modules/nan/.github/workflows/ci.yml +0 -52
  1446. package/node_modules/nan/.pre-commit-config.yaml +0 -8
  1447. package/node_modules/nan/CHANGELOG.md +0 -599
  1448. package/node_modules/nan/CMakeLists.txt +0 -138
  1449. package/node_modules/nan/LICENSE.md +0 -9
  1450. package/node_modules/nan/README.md +0 -456
  1451. package/node_modules/nan/doc/asyncworker.md +0 -146
  1452. package/node_modules/nan/doc/buffers.md +0 -54
  1453. package/node_modules/nan/doc/callback.md +0 -76
  1454. package/node_modules/nan/doc/converters.md +0 -41
  1455. package/node_modules/nan/doc/errors.md +0 -226
  1456. package/node_modules/nan/doc/json.md +0 -62
  1457. package/node_modules/nan/doc/maybe_types.md +0 -583
  1458. package/node_modules/nan/doc/methods.md +0 -689
  1459. package/node_modules/nan/doc/new.md +0 -147
  1460. package/node_modules/nan/doc/node_misc.md +0 -123
  1461. package/node_modules/nan/doc/object_wrappers.md +0 -263
  1462. package/node_modules/nan/doc/persistent.md +0 -296
  1463. package/node_modules/nan/doc/scopes.md +0 -73
  1464. package/node_modules/nan/doc/script.md +0 -58
  1465. package/node_modules/nan/doc/string_bytes.md +0 -81
  1466. package/node_modules/nan/doc/v8_internals.md +0 -199
  1467. package/node_modules/nan/doc/v8_misc.md +0 -85
  1468. package/node_modules/nan/include_dirs.js +0 -1
  1469. package/node_modules/nan/nan.h +0 -3202
  1470. package/node_modules/nan/nan_callbacks.h +0 -141
  1471. package/node_modules/nan/nan_callbacks_12_inl.h +0 -690
  1472. package/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -524
  1473. package/node_modules/nan/nan_converters.h +0 -72
  1474. package/node_modules/nan/nan_converters_43_inl.h +0 -68
  1475. package/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
  1476. package/node_modules/nan/nan_define_own_property_helper.h +0 -29
  1477. package/node_modules/nan/nan_implementation_12_inl.h +0 -430
  1478. package/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
  1479. package/node_modules/nan/nan_json.h +0 -166
  1480. package/node_modules/nan/nan_maybe_43_inl.h +0 -360
  1481. package/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
  1482. package/node_modules/nan/nan_new.h +0 -340
  1483. package/node_modules/nan/nan_object_wrap.h +0 -156
  1484. package/node_modules/nan/nan_persistent_12_inl.h +0 -132
  1485. package/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
  1486. package/node_modules/nan/nan_private.h +0 -73
  1487. package/node_modules/nan/nan_scriptorigin.h +0 -97
  1488. package/node_modules/nan/nan_string_bytes.h +0 -305
  1489. package/node_modules/nan/nan_typedarray_contents.h +0 -96
  1490. package/node_modules/nan/nan_weak.h +0 -453
  1491. package/node_modules/nan/package.json +0 -38
  1492. package/node_modules/nan/tools/1to2.js +0 -412
  1493. package/node_modules/nan/tools/README.md +0 -14
  1494. package/node_modules/nan/tools/package.json +0 -19
  1495. package/node_modules/once/LICENSE +0 -15
  1496. package/node_modules/once/README.md +0 -79
  1497. package/node_modules/once/once.js +0 -42
  1498. package/node_modules/once/package.json +0 -33
  1499. package/node_modules/protobufjs/LICENSE +0 -39
  1500. package/node_modules/protobufjs/README.md +0 -727
  1501. package/node_modules/protobufjs/dist/light/protobuf.js +0 -7839
  1502. package/node_modules/protobufjs/dist/light/protobuf.js.map +0 -1
  1503. package/node_modules/protobufjs/dist/light/protobuf.min.js +0 -8
  1504. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +0 -1
  1505. package/node_modules/protobufjs/dist/minimal/protobuf.js +0 -2736
  1506. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +0 -1
  1507. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +0 -8
  1508. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +0 -1
  1509. package/node_modules/protobufjs/dist/protobuf.js +0 -9643
  1510. package/node_modules/protobufjs/dist/protobuf.js.map +0 -1
  1511. package/node_modules/protobufjs/dist/protobuf.min.js +0 -8
  1512. package/node_modules/protobufjs/dist/protobuf.min.js.map +0 -1
  1513. package/node_modules/protobufjs/ext/debug/README.md +0 -4
  1514. package/node_modules/protobufjs/ext/debug/index.js +0 -71
  1515. package/node_modules/protobufjs/ext/descriptor/README.md +0 -72
  1516. package/node_modules/protobufjs/ext/descriptor/index.d.ts +0 -191
  1517. package/node_modules/protobufjs/ext/descriptor/index.js +0 -1162
  1518. package/node_modules/protobufjs/ext/descriptor/test.js +0 -54
  1519. package/node_modules/protobufjs/google/LICENSE +0 -27
  1520. package/node_modules/protobufjs/google/README.md +0 -1
  1521. package/node_modules/protobufjs/google/api/annotations.json +0 -83
  1522. package/node_modules/protobufjs/google/api/annotations.proto +0 -11
  1523. package/node_modules/protobufjs/google/api/http.json +0 -86
  1524. package/node_modules/protobufjs/google/api/http.proto +0 -31
  1525. package/node_modules/protobufjs/google/protobuf/api.json +0 -118
  1526. package/node_modules/protobufjs/google/protobuf/api.proto +0 -34
  1527. package/node_modules/protobufjs/google/protobuf/descriptor.json +0 -1382
  1528. package/node_modules/protobufjs/google/protobuf/descriptor.proto +0 -535
  1529. package/node_modules/protobufjs/google/protobuf/source_context.json +0 -20
  1530. package/node_modules/protobufjs/google/protobuf/source_context.proto +0 -7
  1531. package/node_modules/protobufjs/google/protobuf/type.json +0 -202
  1532. package/node_modules/protobufjs/google/protobuf/type.proto +0 -89
  1533. package/node_modules/protobufjs/index.d.ts +0 -2799
  1534. package/node_modules/protobufjs/index.js +0 -4
  1535. package/node_modules/protobufjs/light.d.ts +0 -2
  1536. package/node_modules/protobufjs/light.js +0 -4
  1537. package/node_modules/protobufjs/minimal.d.ts +0 -2
  1538. package/node_modules/protobufjs/minimal.js +0 -4
  1539. package/node_modules/protobufjs/package.json +0 -114
  1540. package/node_modules/protobufjs/scripts/postinstall.js +0 -32
  1541. package/node_modules/protobufjs/src/common.js +0 -399
  1542. package/node_modules/protobufjs/src/converter.js +0 -301
  1543. package/node_modules/protobufjs/src/decoder.js +0 -127
  1544. package/node_modules/protobufjs/src/encoder.js +0 -100
  1545. package/node_modules/protobufjs/src/enum.js +0 -223
  1546. package/node_modules/protobufjs/src/field.js +0 -453
  1547. package/node_modules/protobufjs/src/index-light.js +0 -104
  1548. package/node_modules/protobufjs/src/index-minimal.js +0 -36
  1549. package/node_modules/protobufjs/src/index.js +0 -12
  1550. package/node_modules/protobufjs/src/mapfield.js +0 -126
  1551. package/node_modules/protobufjs/src/message.js +0 -143
  1552. package/node_modules/protobufjs/src/method.js +0 -160
  1553. package/node_modules/protobufjs/src/namespace.js +0 -546
  1554. package/node_modules/protobufjs/src/object.js +0 -378
  1555. package/node_modules/protobufjs/src/oneof.js +0 -222
  1556. package/node_modules/protobufjs/src/parse.js +0 -969
  1557. package/node_modules/protobufjs/src/reader.js +0 -416
  1558. package/node_modules/protobufjs/src/reader_buffer.js +0 -51
  1559. package/node_modules/protobufjs/src/root.js +0 -404
  1560. package/node_modules/protobufjs/src/roots.js +0 -18
  1561. package/node_modules/protobufjs/src/rpc/service.js +0 -142
  1562. package/node_modules/protobufjs/src/rpc.js +0 -36
  1563. package/node_modules/protobufjs/src/service.js +0 -189
  1564. package/node_modules/protobufjs/src/tokenize.js +0 -416
  1565. package/node_modules/protobufjs/src/type.js +0 -615
  1566. package/node_modules/protobufjs/src/types.js +0 -196
  1567. package/node_modules/protobufjs/src/typescript.jsdoc +0 -15
  1568. package/node_modules/protobufjs/src/util/longbits.js +0 -200
  1569. package/node_modules/protobufjs/src/util/minimal.js +0 -438
  1570. package/node_modules/protobufjs/src/util.js +0 -215
  1571. package/node_modules/protobufjs/src/verifier.js +0 -177
  1572. package/node_modules/protobufjs/src/wrappers.js +0 -102
  1573. package/node_modules/protobufjs/src/writer.js +0 -465
  1574. package/node_modules/protobufjs/src/writer_buffer.js +0 -85
  1575. package/node_modules/protobufjs/tsconfig.json +0 -8
  1576. package/node_modules/pump/.github/FUNDING.yml +0 -2
  1577. package/node_modules/pump/.travis.yml +0 -5
  1578. package/node_modules/pump/LICENSE +0 -21
  1579. package/node_modules/pump/README.md +0 -74
  1580. package/node_modules/pump/SECURITY.md +0 -5
  1581. package/node_modules/pump/empty.js +0 -1
  1582. package/node_modules/pump/index.js +0 -86
  1583. package/node_modules/pump/package.json +0 -30
  1584. package/node_modules/pump/test-browser.js +0 -66
  1585. package/node_modules/pump/test-node.js +0 -53
  1586. package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  1587. package/node_modules/readable-stream/GOVERNANCE.md +0 -136
  1588. package/node_modules/readable-stream/LICENSE +0 -47
  1589. package/node_modules/readable-stream/README.md +0 -106
  1590. package/node_modules/readable-stream/errors-browser.js +0 -127
  1591. package/node_modules/readable-stream/errors.js +0 -116
  1592. package/node_modules/readable-stream/experimentalWarning.js +0 -17
  1593. package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
  1594. package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
  1595. package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
  1596. package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
  1597. package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
  1598. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
  1599. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
  1600. package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
  1601. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
  1602. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
  1603. package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
  1604. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
  1605. package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
  1606. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  1607. package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  1608. package/node_modules/readable-stream/package.json +0 -68
  1609. package/node_modules/readable-stream/readable-browser.js +0 -9
  1610. package/node_modules/readable-stream/readable.js +0 -16
  1611. package/node_modules/require-directory/.jshintrc +0 -67
  1612. package/node_modules/require-directory/.npmignore +0 -1
  1613. package/node_modules/require-directory/.travis.yml +0 -3
  1614. package/node_modules/require-directory/LICENSE +0 -22
  1615. package/node_modules/require-directory/README.markdown +0 -184
  1616. package/node_modules/require-directory/index.js +0 -86
  1617. package/node_modules/require-directory/package.json +0 -40
  1618. package/node_modules/safe-buffer/LICENSE +0 -21
  1619. package/node_modules/safe-buffer/README.md +0 -584
  1620. package/node_modules/safe-buffer/index.d.ts +0 -187
  1621. package/node_modules/safe-buffer/index.js +0 -65
  1622. package/node_modules/safe-buffer/package.json +0 -51
  1623. package/node_modules/safer-buffer/LICENSE +0 -21
  1624. package/node_modules/safer-buffer/Porting-Buffer.md +0 -268
  1625. package/node_modules/safer-buffer/Readme.md +0 -156
  1626. package/node_modules/safer-buffer/dangerous.js +0 -58
  1627. package/node_modules/safer-buffer/package.json +0 -34
  1628. package/node_modules/safer-buffer/safer.js +0 -77
  1629. package/node_modules/safer-buffer/tests.js +0 -406
  1630. package/node_modules/skillgrade/LICENSE +0 -21
  1631. package/node_modules/skillgrade/README.md +0 -253
  1632. package/node_modules/skillgrade/bin/skillgrade.js +0 -2
  1633. package/node_modules/skillgrade/dist/agents/claude.d.ts +0 -5
  1634. package/node_modules/skillgrade/dist/agents/claude.js +0 -19
  1635. package/node_modules/skillgrade/dist/agents/codex.d.ts +0 -5
  1636. package/node_modules/skillgrade/dist/agents/codex.js +0 -19
  1637. package/node_modules/skillgrade/dist/agents/gemini.d.ts +0 -5
  1638. package/node_modules/skillgrade/dist/agents/gemini.js +0 -19
  1639. package/node_modules/skillgrade/dist/agents/registry.d.ts +0 -14
  1640. package/node_modules/skillgrade/dist/agents/registry.js +0 -27
  1641. package/node_modules/skillgrade/dist/analytics/engine.d.ts +0 -19
  1642. package/node_modules/skillgrade/dist/analytics/engine.js +0 -105
  1643. package/node_modules/skillgrade/dist/commands/init.d.ts +0 -4
  1644. package/node_modules/skillgrade/dist/commands/init.js +0 -335
  1645. package/node_modules/skillgrade/dist/commands/preview.d.ts +0 -2
  1646. package/node_modules/skillgrade/dist/commands/preview.js +0 -56
  1647. package/node_modules/skillgrade/dist/commands/run.d.ts +0 -16
  1648. package/node_modules/skillgrade/dist/commands/run.js +0 -302
  1649. package/node_modules/skillgrade/dist/core/config.d.ts +0 -10
  1650. package/node_modules/skillgrade/dist/core/config.js +0 -213
  1651. package/node_modules/skillgrade/dist/core/config.types.d.ts +0 -88
  1652. package/node_modules/skillgrade/dist/core/config.types.js +0 -9
  1653. package/node_modules/skillgrade/dist/core/skills.d.ts +0 -15
  1654. package/node_modules/skillgrade/dist/core/skills.js +0 -103
  1655. package/node_modules/skillgrade/dist/evalRunner.d.ts +0 -26
  1656. package/node_modules/skillgrade/dist/evalRunner.js +0 -316
  1657. package/node_modules/skillgrade/dist/graders/index.d.ts +0 -30
  1658. package/node_modules/skillgrade/dist/graders/index.js +0 -248
  1659. package/node_modules/skillgrade/dist/providers/docker.d.ts +0 -32
  1660. package/node_modules/skillgrade/dist/providers/docker.js +0 -255
  1661. package/node_modules/skillgrade/dist/providers/local.d.ts +0 -7
  1662. package/node_modules/skillgrade/dist/providers/local.js +0 -86
  1663. package/node_modules/skillgrade/dist/reporters/browser.d.ts +0 -2
  1664. package/node_modules/skillgrade/dist/reporters/browser.js +0 -90
  1665. package/node_modules/skillgrade/dist/reporters/cli.d.ts +0 -2
  1666. package/node_modules/skillgrade/dist/reporters/cli.js +0 -116
  1667. package/node_modules/skillgrade/dist/skillgrade.d.ts +0 -20
  1668. package/node_modules/skillgrade/dist/skillgrade.js +0 -179
  1669. package/node_modules/skillgrade/dist/types.d.ts +0 -72
  1670. package/node_modules/skillgrade/dist/types.js +0 -7
  1671. package/node_modules/skillgrade/dist/utils/cli.d.ts +0 -56
  1672. package/node_modules/skillgrade/dist/utils/cli.js +0 -141
  1673. package/node_modules/skillgrade/dist/utils/env.d.ts +0 -9
  1674. package/node_modules/skillgrade/dist/utils/env.js +0 -30
  1675. package/node_modules/skillgrade/dist/viewer.html +0 -791
  1676. package/node_modules/skillgrade/package.json +0 -69
  1677. package/node_modules/skillgrade/templates/eval.yaml.template +0 -61
  1678. package/node_modules/split-ca/.gitlab-ci.yml +0 -19
  1679. package/node_modules/split-ca/.npmignore +0 -1
  1680. package/node_modules/split-ca/Makefile +0 -4
  1681. package/node_modules/split-ca/README.md +0 -51
  1682. package/node_modules/split-ca/index.js +0 -27
  1683. package/node_modules/split-ca/package.json +0 -38
  1684. package/node_modules/split-ca/test/certs/empty.ca +0 -0
  1685. package/node_modules/split-ca/test/certs/garbage.ca +0 -16
  1686. package/node_modules/split-ca/test/certs/split0.ca +0 -18
  1687. package/node_modules/split-ca/test/certs/split1.ca +0 -13
  1688. package/node_modules/split-ca/test/certs/test-chain.bundle +0 -31
  1689. package/node_modules/split-ca/test/splitCa.test.js +0 -45
  1690. package/node_modules/ssh2/.eslintignore +0 -4
  1691. package/node_modules/ssh2/.eslintrc.js +0 -5
  1692. package/node_modules/ssh2/.github/workflows/ci.yml +0 -110
  1693. package/node_modules/ssh2/.github/workflows/lint.yml +0 -27
  1694. package/node_modules/ssh2/LICENSE +0 -19
  1695. package/node_modules/ssh2/README.md +0 -1529
  1696. package/node_modules/ssh2/SFTP.md +0 -413
  1697. package/node_modules/ssh2/examples/server-chat.js +0 -238
  1698. package/node_modules/ssh2/examples/sftp-server-download-only.js +0 -134
  1699. package/node_modules/ssh2/install.js +0 -27
  1700. package/node_modules/ssh2/lib/Channel.js +0 -295
  1701. package/node_modules/ssh2/lib/agent.js +0 -1123
  1702. package/node_modules/ssh2/lib/client.js +0 -2176
  1703. package/node_modules/ssh2/lib/http-agents.js +0 -84
  1704. package/node_modules/ssh2/lib/index.js +0 -44
  1705. package/node_modules/ssh2/lib/keygen.js +0 -582
  1706. package/node_modules/ssh2/lib/protocol/Protocol.js +0 -2136
  1707. package/node_modules/ssh2/lib/protocol/SFTP.js +0 -4052
  1708. package/node_modules/ssh2/lib/protocol/constants.js +0 -356
  1709. package/node_modules/ssh2/lib/protocol/crypto/binding.gyp +0 -23
  1710. package/node_modules/ssh2/lib/protocol/crypto/build/Makefile +0 -347
  1711. package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/obj.target/sshcrypto/src/binding.o.d +0 -273
  1712. package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/sshcrypto.node.d +0 -1
  1713. package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
  1714. package/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
  1715. package/node_modules/ssh2/lib/protocol/crypto/build/binding.Makefile +0 -6
  1716. package/node_modules/ssh2/lib/protocol/crypto/build/gyp-mac-tool +0 -766
  1717. package/node_modules/ssh2/lib/protocol/crypto/build/sshcrypto.target.mk +0 -187
  1718. package/node_modules/ssh2/lib/protocol/crypto/poly1305.js +0 -43
  1719. package/node_modules/ssh2/lib/protocol/crypto/src/binding.cc +0 -2300
  1720. package/node_modules/ssh2/lib/protocol/crypto.js +0 -1602
  1721. package/node_modules/ssh2/lib/protocol/handlers.js +0 -16
  1722. package/node_modules/ssh2/lib/protocol/handlers.misc.js +0 -1285
  1723. package/node_modules/ssh2/lib/protocol/kex.js +0 -1908
  1724. package/node_modules/ssh2/lib/protocol/keyParser.js +0 -1484
  1725. package/node_modules/ssh2/lib/protocol/node-fs-compat.js +0 -115
  1726. package/node_modules/ssh2/lib/protocol/utils.js +0 -356
  1727. package/node_modules/ssh2/lib/protocol/zlib.js +0 -255
  1728. package/node_modules/ssh2/lib/server.js +0 -1380
  1729. package/node_modules/ssh2/lib/utils.js +0 -336
  1730. package/node_modules/ssh2/package.json +0 -49
  1731. package/node_modules/ssh2/test/common.js +0 -316
  1732. package/node_modules/ssh2/test/fixtures/bad_rsa_private_key +0 -26
  1733. package/node_modules/ssh2/test/fixtures/https_cert.pem +0 -33
  1734. package/node_modules/ssh2/test/fixtures/https_key.pem +0 -52
  1735. package/node_modules/ssh2/test/fixtures/id_dsa +0 -12
  1736. package/node_modules/ssh2/test/fixtures/id_ecdsa +0 -5
  1737. package/node_modules/ssh2/test/fixtures/id_rsa +0 -15
  1738. package/node_modules/ssh2/test/fixtures/id_rsa.ppk +0 -26
  1739. package/node_modules/ssh2/test/fixtures/id_rsa_enc +0 -30
  1740. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa +0 -21
  1741. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub +0 -1
  1742. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub.result +0 -7
  1743. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.result +0 -7
  1744. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc +0 -22
  1745. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub +0 -1
  1746. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub.result +0 -7
  1747. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.result +0 -7
  1748. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm +0 -23
  1749. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub +0 -1
  1750. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub.result +0 -7
  1751. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.result +0 -7
  1752. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa +0 -9
  1753. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub +0 -1
  1754. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub.result +0 -7
  1755. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.result +0 -7
  1756. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc +0 -10
  1757. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub +0 -1
  1758. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub.result +0 -8
  1759. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.result +0 -7
  1760. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm +0 -10
  1761. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub +0 -1
  1762. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub.result +0 -8
  1763. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.result +0 -7
  1764. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519 +0 -7
  1765. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub +0 -1
  1766. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub.result +0 -7
  1767. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.result +0 -7
  1768. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa +0 -27
  1769. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub +0 -1
  1770. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub.result +0 -7
  1771. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.result +0 -7
  1772. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc +0 -28
  1773. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub +0 -1
  1774. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub.result +0 -8
  1775. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.result +0 -7
  1776. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm +0 -29
  1777. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub +0 -1
  1778. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub.result +0 -8
  1779. package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.result +0 -7
  1780. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa +0 -12
  1781. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub +0 -1
  1782. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub.result +0 -7
  1783. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.result +0 -7
  1784. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc +0 -15
  1785. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub +0 -1
  1786. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub.result +0 -8
  1787. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.result +0 -7
  1788. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa +0 -5
  1789. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub +0 -1
  1790. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub.result +0 -7
  1791. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.result +0 -7
  1792. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc +0 -8
  1793. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub +0 -1
  1794. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub.result +0 -8
  1795. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.result +0 -7
  1796. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa +0 -27
  1797. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub +0 -1
  1798. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub.result +0 -7
  1799. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.result +0 -7
  1800. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc +0 -30
  1801. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub +0 -1
  1802. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub.result +0 -8
  1803. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.result +0 -7
  1804. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256 +0 -54
  1805. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub +0 -1
  1806. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub.result +0 -6
  1807. package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.result +0 -6
  1808. package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc +0 -17
  1809. package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc.result +0 -7
  1810. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa +0 -26
  1811. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa.result +0 -7
  1812. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc +0 -18
  1813. package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc.result +0 -7
  1814. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub +0 -9
  1815. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub.result +0 -7
  1816. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub +0 -10
  1817. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub.result +0 -7
  1818. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub +0 -11
  1819. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub.result +0 -7
  1820. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub +0 -11
  1821. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub.result +0 -7
  1822. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub +0 -8
  1823. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub.result +0 -7
  1824. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub +0 -13
  1825. package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub.result +0 -7
  1826. package/node_modules/ssh2/test/fixtures/openssh_new_rsa +0 -27
  1827. package/node_modules/ssh2/test/fixtures/ssh_host_dsa_key +0 -12
  1828. package/node_modules/ssh2/test/fixtures/ssh_host_ecdsa_key +0 -5
  1829. package/node_modules/ssh2/test/fixtures/ssh_host_rsa_key +0 -15
  1830. package/node_modules/ssh2/test/test-exec.js +0 -578
  1831. package/node_modules/ssh2/test/test-integration-openssh.js +0 -486
  1832. package/node_modules/ssh2/test/test-keygen.js +0 -60
  1833. package/node_modules/ssh2/test/test-misc-client-server.js +0 -1460
  1834. package/node_modules/ssh2/test/test-openssh.js +0 -261
  1835. package/node_modules/ssh2/test/test-protocol-crypto.js +0 -631
  1836. package/node_modules/ssh2/test/test-protocol-keyparser.js +0 -177
  1837. package/node_modules/ssh2/test/test-server-hostkeys.js +0 -138
  1838. package/node_modules/ssh2/test/test-sftp.js +0 -842
  1839. package/node_modules/ssh2/test/test-shell.js +0 -109
  1840. package/node_modules/ssh2/test/test-userauth-agent-openssh.js +0 -110
  1841. package/node_modules/ssh2/test/test-userauth-agent.js +0 -171
  1842. package/node_modules/ssh2/test/test-userauth.js +0 -611
  1843. package/node_modules/ssh2/test/test-worker-imports.js +0 -25
  1844. package/node_modules/ssh2/test/test.js +0 -20
  1845. package/node_modules/ssh2/util/build_pagent.bat +0 -2
  1846. package/node_modules/ssh2/util/pagent.c +0 -88
  1847. package/node_modules/ssh2/util/pagent.exe +0 -0
  1848. package/node_modules/streamx/LICENSE +0 -21
  1849. package/node_modules/streamx/README.md +0 -490
  1850. package/node_modules/streamx/index.js +0 -1232
  1851. package/node_modules/streamx/package.json +0 -36
  1852. package/node_modules/string-width/index.d.ts +0 -29
  1853. package/node_modules/string-width/index.js +0 -47
  1854. package/node_modules/string-width/license +0 -9
  1855. package/node_modules/string-width/package.json +0 -56
  1856. package/node_modules/string-width/readme.md +0 -50
  1857. package/node_modules/string_decoder/LICENSE +0 -48
  1858. package/node_modules/string_decoder/README.md +0 -47
  1859. package/node_modules/string_decoder/lib/string_decoder.js +0 -296
  1860. package/node_modules/string_decoder/package.json +0 -34
  1861. package/node_modules/strip-ansi/index.d.ts +0 -17
  1862. package/node_modules/strip-ansi/index.js +0 -4
  1863. package/node_modules/strip-ansi/license +0 -9
  1864. package/node_modules/strip-ansi/package.json +0 -54
  1865. package/node_modules/strip-ansi/readme.md +0 -46
  1866. package/node_modules/tar-fs/.travis.yml +0 -6
  1867. package/node_modules/tar-fs/LICENSE +0 -21
  1868. package/node_modules/tar-fs/README.md +0 -165
  1869. package/node_modules/tar-fs/index.js +0 -363
  1870. package/node_modules/tar-fs/node_modules/tar-stream/LICENSE +0 -21
  1871. package/node_modules/tar-fs/node_modules/tar-stream/README.md +0 -168
  1872. package/node_modules/tar-fs/node_modules/tar-stream/extract.js +0 -257
  1873. package/node_modules/tar-fs/node_modules/tar-stream/headers.js +0 -295
  1874. package/node_modules/tar-fs/node_modules/tar-stream/index.js +0 -2
  1875. package/node_modules/tar-fs/node_modules/tar-stream/pack.js +0 -255
  1876. package/node_modules/tar-fs/node_modules/tar-stream/package.json +0 -58
  1877. package/node_modules/tar-fs/node_modules/tar-stream/sandbox.js +0 -11
  1878. package/node_modules/tar-fs/package.json +0 -41
  1879. package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
  1880. package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
  1881. package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
  1882. package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
  1883. package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
  1884. package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
  1885. package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
  1886. package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
  1887. package/node_modules/tar-fs/test/fixtures/e/file +0 -0
  1888. package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
  1889. package/node_modules/tar-fs/test/index.js +0 -346
  1890. package/node_modules/tar-stream/LICENSE +0 -21
  1891. package/node_modules/tar-stream/README.md +0 -183
  1892. package/node_modules/tar-stream/constants.js +0 -14
  1893. package/node_modules/tar-stream/extract.js +0 -406
  1894. package/node_modules/tar-stream/headers.js +0 -321
  1895. package/node_modules/tar-stream/index.js +0 -2
  1896. package/node_modules/tar-stream/pack.js +0 -287
  1897. package/node_modules/tar-stream/package.json +0 -42
  1898. package/node_modules/teex/LICENSE +0 -21
  1899. package/node_modules/teex/README.md +0 -31
  1900. package/node_modules/teex/example.js +0 -16
  1901. package/node_modules/teex/index.js +0 -52
  1902. package/node_modules/teex/package.json +0 -26
  1903. package/node_modules/teex/test.js +0 -68
  1904. package/node_modules/text-decoder/LICENSE +0 -201
  1905. package/node_modules/text-decoder/README.md +0 -36
  1906. package/node_modules/text-decoder/index.js +0 -64
  1907. package/node_modules/text-decoder/lib/pass-through-decoder.js +0 -19
  1908. package/node_modules/text-decoder/lib/utf8-decoder.js +0 -185
  1909. package/node_modules/text-decoder/package.json +0 -39
  1910. package/node_modules/tweetnacl/.npmignore +0 -4
  1911. package/node_modules/tweetnacl/AUTHORS.md +0 -28
  1912. package/node_modules/tweetnacl/CHANGELOG.md +0 -221
  1913. package/node_modules/tweetnacl/LICENSE +0 -24
  1914. package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +0 -20
  1915. package/node_modules/tweetnacl/README.md +0 -459
  1916. package/node_modules/tweetnacl/nacl-fast.js +0 -2388
  1917. package/node_modules/tweetnacl/nacl-fast.min.js +0 -2
  1918. package/node_modules/tweetnacl/nacl.d.ts +0 -98
  1919. package/node_modules/tweetnacl/nacl.js +0 -1175
  1920. package/node_modules/tweetnacl/nacl.min.js +0 -1
  1921. package/node_modules/tweetnacl/package.json +0 -58
  1922. package/node_modules/universalify/LICENSE +0 -20
  1923. package/node_modules/universalify/README.md +0 -76
  1924. package/node_modules/universalify/index.js +0 -24
  1925. package/node_modules/universalify/package.json +0 -34
  1926. package/node_modules/util-deprecate/History.md +0 -16
  1927. package/node_modules/util-deprecate/LICENSE +0 -24
  1928. package/node_modules/util-deprecate/README.md +0 -53
  1929. package/node_modules/util-deprecate/browser.js +0 -67
  1930. package/node_modules/util-deprecate/node.js +0 -6
  1931. package/node_modules/util-deprecate/package.json +0 -27
  1932. package/node_modules/uuid/CHANGELOG.md +0 -292
  1933. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  1934. package/node_modules/uuid/LICENSE.md +0 -9
  1935. package/node_modules/uuid/README.md +0 -584
  1936. package/node_modules/uuid/dist/bin/uuid +0 -2
  1937. package/node_modules/uuid/dist/commonjs-browser/index.js +0 -104
  1938. package/node_modules/uuid/dist/commonjs-browser/max.js +0 -7
  1939. package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -200
  1940. package/node_modules/uuid/dist/commonjs-browser/native.js +0 -10
  1941. package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -7
  1942. package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -44
  1943. package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -7
  1944. package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -23
  1945. package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -82
  1946. package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -38
  1947. package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -131
  1948. package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +0 -26
  1949. package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -11
  1950. package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -63
  1951. package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -32
  1952. package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -11
  1953. package/node_modules/uuid/dist/commonjs-browser/v6.js +0 -42
  1954. package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +0 -26
  1955. package/node_modules/uuid/dist/commonjs-browser/v7.js +0 -152
  1956. package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -12
  1957. package/node_modules/uuid/dist/commonjs-browser/version.js +0 -15
  1958. package/node_modules/uuid/dist/esm-browser/index.js +0 -14
  1959. package/node_modules/uuid/dist/esm-browser/max.js +0 -1
  1960. package/node_modules/uuid/dist/esm-browser/md5.js +0 -194
  1961. package/node_modules/uuid/dist/esm-browser/native.js +0 -4
  1962. package/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  1963. package/node_modules/uuid/dist/esm-browser/parse.js +0 -37
  1964. package/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  1965. package/node_modules/uuid/dist/esm-browser/rng.js +0 -17
  1966. package/node_modules/uuid/dist/esm-browser/sha1.js +0 -76
  1967. package/node_modules/uuid/dist/esm-browser/stringify.js +0 -31
  1968. package/node_modules/uuid/dist/esm-browser/v1.js +0 -125
  1969. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +0 -20
  1970. package/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  1971. package/node_modules/uuid/dist/esm-browser/v35.js +0 -55
  1972. package/node_modules/uuid/dist/esm-browser/v4.js +0 -25
  1973. package/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  1974. package/node_modules/uuid/dist/esm-browser/v6.js +0 -36
  1975. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +0 -20
  1976. package/node_modules/uuid/dist/esm-browser/v7.js +0 -146
  1977. package/node_modules/uuid/dist/esm-browser/validate.js +0 -5
  1978. package/node_modules/uuid/dist/esm-browser/version.js +0 -8
  1979. package/node_modules/uuid/dist/esm-node/index.js +0 -14
  1980. package/node_modules/uuid/dist/esm-node/max.js +0 -1
  1981. package/node_modules/uuid/dist/esm-node/md5.js +0 -10
  1982. package/node_modules/uuid/dist/esm-node/native.js +0 -4
  1983. package/node_modules/uuid/dist/esm-node/nil.js +0 -1
  1984. package/node_modules/uuid/dist/esm-node/parse.js +0 -37
  1985. package/node_modules/uuid/dist/esm-node/regex.js +0 -1
  1986. package/node_modules/uuid/dist/esm-node/rng.js +0 -10
  1987. package/node_modules/uuid/dist/esm-node/sha1.js +0 -10
  1988. package/node_modules/uuid/dist/esm-node/stringify.js +0 -31
  1989. package/node_modules/uuid/dist/esm-node/v1.js +0 -125
  1990. package/node_modules/uuid/dist/esm-node/v1ToV6.js +0 -20
  1991. package/node_modules/uuid/dist/esm-node/v3.js +0 -4
  1992. package/node_modules/uuid/dist/esm-node/v35.js +0 -55
  1993. package/node_modules/uuid/dist/esm-node/v4.js +0 -25
  1994. package/node_modules/uuid/dist/esm-node/v5.js +0 -4
  1995. package/node_modules/uuid/dist/esm-node/v6.js +0 -32
  1996. package/node_modules/uuid/dist/esm-node/v6ToV1.js +0 -20
  1997. package/node_modules/uuid/dist/esm-node/v7.js +0 -146
  1998. package/node_modules/uuid/dist/esm-node/validate.js +0 -5
  1999. package/node_modules/uuid/dist/esm-node/version.js +0 -8
  2000. package/node_modules/uuid/dist/index.js +0 -104
  2001. package/node_modules/uuid/dist/max.js +0 -7
  2002. package/node_modules/uuid/dist/md5-browser.js +0 -200
  2003. package/node_modules/uuid/dist/md5.js +0 -17
  2004. package/node_modules/uuid/dist/native-browser.js +0 -10
  2005. package/node_modules/uuid/dist/native.js +0 -11
  2006. package/node_modules/uuid/dist/nil.js +0 -7
  2007. package/node_modules/uuid/dist/parse.js +0 -44
  2008. package/node_modules/uuid/dist/regex.js +0 -7
  2009. package/node_modules/uuid/dist/rng-browser.js +0 -23
  2010. package/node_modules/uuid/dist/rng.js +0 -17
  2011. package/node_modules/uuid/dist/sha1-browser.js +0 -82
  2012. package/node_modules/uuid/dist/sha1.js +0 -17
  2013. package/node_modules/uuid/dist/stringify.js +0 -38
  2014. package/node_modules/uuid/dist/uuid-bin.js +0 -75
  2015. package/node_modules/uuid/dist/v1.js +0 -131
  2016. package/node_modules/uuid/dist/v1ToV6.js +0 -26
  2017. package/node_modules/uuid/dist/v3.js +0 -11
  2018. package/node_modules/uuid/dist/v35.js +0 -63
  2019. package/node_modules/uuid/dist/v4.js +0 -32
  2020. package/node_modules/uuid/dist/v5.js +0 -11
  2021. package/node_modules/uuid/dist/v6.js +0 -38
  2022. package/node_modules/uuid/dist/v6ToV1.js +0 -26
  2023. package/node_modules/uuid/dist/v7.js +0 -152
  2024. package/node_modules/uuid/dist/validate.js +0 -12
  2025. package/node_modules/uuid/dist/version.js +0 -15
  2026. package/node_modules/uuid/package.json +0 -142
  2027. package/node_modules/uuid/wrapper.mjs +0 -15
  2028. package/node_modules/wrap-ansi/index.js +0 -216
  2029. package/node_modules/wrap-ansi/license +0 -9
  2030. package/node_modules/wrap-ansi/package.json +0 -62
  2031. package/node_modules/wrap-ansi/readme.md +0 -91
  2032. package/node_modules/wrappy/LICENSE +0 -15
  2033. package/node_modules/wrappy/README.md +0 -36
  2034. package/node_modules/wrappy/package.json +0 -29
  2035. package/node_modules/wrappy/wrappy.js +0 -33
  2036. package/node_modules/y18n/LICENSE +0 -13
  2037. package/node_modules/y18n/README.md +0 -127
  2038. package/node_modules/y18n/build/index.cjs +0 -203
  2039. package/node_modules/y18n/build/lib/cjs.js +0 -6
  2040. package/node_modules/y18n/build/lib/index.js +0 -174
  2041. package/node_modules/y18n/build/lib/platform-shims/node.js +0 -19
  2042. package/node_modules/y18n/index.mjs +0 -8
  2043. package/node_modules/y18n/package.json +0 -70
  2044. package/node_modules/yargs/LICENSE +0 -21
  2045. package/node_modules/yargs/README.md +0 -204
  2046. package/node_modules/yargs/browser.d.ts +0 -5
  2047. package/node_modules/yargs/browser.mjs +0 -7
  2048. package/node_modules/yargs/build/index.cjs +0 -1
  2049. package/node_modules/yargs/build/lib/argsert.js +0 -62
  2050. package/node_modules/yargs/build/lib/command.js +0 -449
  2051. package/node_modules/yargs/build/lib/completion-templates.js +0 -48
  2052. package/node_modules/yargs/build/lib/completion.js +0 -243
  2053. package/node_modules/yargs/build/lib/middleware.js +0 -88
  2054. package/node_modules/yargs/build/lib/parse-command.js +0 -32
  2055. package/node_modules/yargs/build/lib/typings/common-types.js +0 -9
  2056. package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +0 -1
  2057. package/node_modules/yargs/build/lib/usage.js +0 -584
  2058. package/node_modules/yargs/build/lib/utils/apply-extends.js +0 -59
  2059. package/node_modules/yargs/build/lib/utils/is-promise.js +0 -5
  2060. package/node_modules/yargs/build/lib/utils/levenshtein.js +0 -34
  2061. package/node_modules/yargs/build/lib/utils/maybe-async-result.js +0 -17
  2062. package/node_modules/yargs/build/lib/utils/obj-filter.js +0 -10
  2063. package/node_modules/yargs/build/lib/utils/process-argv.js +0 -17
  2064. package/node_modules/yargs/build/lib/utils/set-blocking.js +0 -12
  2065. package/node_modules/yargs/build/lib/utils/which-module.js +0 -10
  2066. package/node_modules/yargs/build/lib/validation.js +0 -305
  2067. package/node_modules/yargs/build/lib/yargs-factory.js +0 -1512
  2068. package/node_modules/yargs/build/lib/yerror.js +0 -9
  2069. package/node_modules/yargs/helpers/helpers.mjs +0 -10
  2070. package/node_modules/yargs/helpers/index.js +0 -14
  2071. package/node_modules/yargs/helpers/package.json +0 -3
  2072. package/node_modules/yargs/index.cjs +0 -53
  2073. package/node_modules/yargs/index.mjs +0 -8
  2074. package/node_modules/yargs/lib/platform-shims/browser.mjs +0 -95
  2075. package/node_modules/yargs/lib/platform-shims/esm.mjs +0 -73
  2076. package/node_modules/yargs/locales/be.json +0 -46
  2077. package/node_modules/yargs/locales/cs.json +0 -51
  2078. package/node_modules/yargs/locales/de.json +0 -46
  2079. package/node_modules/yargs/locales/en.json +0 -55
  2080. package/node_modules/yargs/locales/es.json +0 -46
  2081. package/node_modules/yargs/locales/fi.json +0 -49
  2082. package/node_modules/yargs/locales/fr.json +0 -53
  2083. package/node_modules/yargs/locales/hi.json +0 -49
  2084. package/node_modules/yargs/locales/hu.json +0 -46
  2085. package/node_modules/yargs/locales/id.json +0 -50
  2086. package/node_modules/yargs/locales/it.json +0 -46
  2087. package/node_modules/yargs/locales/ja.json +0 -51
  2088. package/node_modules/yargs/locales/ko.json +0 -49
  2089. package/node_modules/yargs/locales/nb.json +0 -44
  2090. package/node_modules/yargs/locales/nl.json +0 -49
  2091. package/node_modules/yargs/locales/nn.json +0 -44
  2092. package/node_modules/yargs/locales/pirate.json +0 -13
  2093. package/node_modules/yargs/locales/pl.json +0 -49
  2094. package/node_modules/yargs/locales/pt.json +0 -45
  2095. package/node_modules/yargs/locales/pt_BR.json +0 -48
  2096. package/node_modules/yargs/locales/ru.json +0 -51
  2097. package/node_modules/yargs/locales/th.json +0 -46
  2098. package/node_modules/yargs/locales/tr.json +0 -48
  2099. package/node_modules/yargs/locales/uk_UA.json +0 -51
  2100. package/node_modules/yargs/locales/uz.json +0 -52
  2101. package/node_modules/yargs/locales/zh_CN.json +0 -48
  2102. package/node_modules/yargs/locales/zh_TW.json +0 -51
  2103. package/node_modules/yargs/package.json +0 -123
  2104. package/node_modules/yargs/yargs +0 -9
  2105. package/node_modules/yargs/yargs.mjs +0 -10
  2106. package/node_modules/yargs-parser/LICENSE.txt +0 -14
  2107. package/node_modules/yargs-parser/README.md +0 -518
  2108. package/node_modules/yargs-parser/browser.js +0 -29
  2109. package/node_modules/yargs-parser/build/index.cjs +0 -1050
  2110. package/node_modules/yargs-parser/build/lib/index.js +0 -62
  2111. package/node_modules/yargs-parser/build/lib/string-utils.js +0 -65
  2112. package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -40
  2113. package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -12
  2114. package/node_modules/yargs-parser/build/lib/yargs-parser.js +0 -1045
  2115. package/node_modules/yargs-parser/package.json +0 -92
@@ -1,4052 +0,0 @@
1
- 'use strict';
2
-
3
- const EventEmitter = require('events');
4
- const fs = require('fs');
5
- const { constants } = fs;
6
- const {
7
- Readable: ReadableStream,
8
- Writable: WritableStream
9
- } = require('stream');
10
- const { inherits, types: { isDate } } = require('util');
11
-
12
- const FastBuffer = Buffer[Symbol.species];
13
-
14
- const {
15
- bufferCopy,
16
- bufferSlice,
17
- makeBufferParser,
18
- writeUInt32BE,
19
- } = require('./utils.js');
20
-
21
- const ATTR = {
22
- SIZE: 0x00000001,
23
- UIDGID: 0x00000002,
24
- PERMISSIONS: 0x00000004,
25
- ACMODTIME: 0x00000008,
26
- EXTENDED: 0x80000000,
27
- };
28
-
29
- // Large enough to store all possible attributes
30
- const ATTRS_BUF = Buffer.alloc(28);
31
-
32
- const STATUS_CODE = {
33
- OK: 0,
34
- EOF: 1,
35
- NO_SUCH_FILE: 2,
36
- PERMISSION_DENIED: 3,
37
- FAILURE: 4,
38
- BAD_MESSAGE: 5,
39
- NO_CONNECTION: 6,
40
- CONNECTION_LOST: 7,
41
- OP_UNSUPPORTED: 8
42
- };
43
-
44
- const VALID_STATUS_CODES = new Map(
45
- Object.values(STATUS_CODE).map((n) => [n, 1])
46
- );
47
-
48
- const STATUS_CODE_STR = {
49
- [STATUS_CODE.OK]: 'No error',
50
- [STATUS_CODE.EOF]: 'End of file',
51
- [STATUS_CODE.NO_SUCH_FILE]: 'No such file or directory',
52
- [STATUS_CODE.PERMISSION_DENIED]: 'Permission denied',
53
- [STATUS_CODE.FAILURE]: 'Failure',
54
- [STATUS_CODE.BAD_MESSAGE]: 'Bad message',
55
- [STATUS_CODE.NO_CONNECTION]: 'No connection',
56
- [STATUS_CODE.CONNECTION_LOST]: 'Connection lost',
57
- [STATUS_CODE.OP_UNSUPPORTED]: 'Operation unsupported',
58
- };
59
-
60
- const REQUEST = {
61
- INIT: 1,
62
- OPEN: 3,
63
- CLOSE: 4,
64
- READ: 5,
65
- WRITE: 6,
66
- LSTAT: 7,
67
- FSTAT: 8,
68
- SETSTAT: 9,
69
- FSETSTAT: 10,
70
- OPENDIR: 11,
71
- READDIR: 12,
72
- REMOVE: 13,
73
- MKDIR: 14,
74
- RMDIR: 15,
75
- REALPATH: 16,
76
- STAT: 17,
77
- RENAME: 18,
78
- READLINK: 19,
79
- SYMLINK: 20,
80
- EXTENDED: 200
81
- };
82
-
83
- const RESPONSE = {
84
- VERSION: 2,
85
- STATUS: 101,
86
- HANDLE: 102,
87
- DATA: 103,
88
- NAME: 104,
89
- ATTRS: 105,
90
- EXTENDED: 201
91
- };
92
-
93
- const OPEN_MODE = {
94
- READ: 0x00000001,
95
- WRITE: 0x00000002,
96
- APPEND: 0x00000004,
97
- CREAT: 0x00000008,
98
- TRUNC: 0x00000010,
99
- EXCL: 0x00000020
100
- };
101
-
102
- const PKT_RW_OVERHEAD = 2 * 1024;
103
- const MAX_REQID = 2 ** 32 - 1;
104
- const CLIENT_VERSION_BUFFER = Buffer.from([
105
- 0, 0, 0, 5 /* length */,
106
- REQUEST.INIT,
107
- 0, 0, 0, 3 /* version */
108
- ]);
109
- const SERVER_VERSION_BUFFER = Buffer.from([
110
- 0, 0, 0, 5 /* length */,
111
- RESPONSE.VERSION,
112
- 0, 0, 0, 3 /* version */
113
- ]);
114
-
115
- const RE_OPENSSH = /^SSH-2.0-(?:OpenSSH|dropbear)/;
116
- const OPENSSH_MAX_PKT_LEN = 256 * 1024;
117
-
118
- const bufferParser = makeBufferParser();
119
-
120
- const fakeStderr = {
121
- readable: false,
122
- writable: false,
123
- push: (data) => {},
124
- once: () => {},
125
- on: () => {},
126
- emit: () => {},
127
- end: () => {},
128
- };
129
-
130
- function noop() {}
131
-
132
- // Emulates enough of `Channel` to be able to be used as a drop-in replacement
133
- // in order to process incoming data with as little overhead as possible
134
- class SFTP extends EventEmitter {
135
- constructor(client, chanInfo, cfg) {
136
- super();
137
-
138
- if (typeof cfg !== 'object' || !cfg)
139
- cfg = {};
140
-
141
- const remoteIdentRaw = client._protocol._remoteIdentRaw;
142
-
143
- this.server = !!cfg.server;
144
- this._debug = (typeof cfg.debug === 'function' ? cfg.debug : undefined);
145
- this._isOpenSSH = (remoteIdentRaw && RE_OPENSSH.test(remoteIdentRaw));
146
-
147
- this._version = -1;
148
- this._extensions = {};
149
- this._biOpt = cfg.biOpt;
150
- this._pktLenBytes = 0;
151
- this._pktLen = 0;
152
- this._pktPos = 0;
153
- this._pktType = 0;
154
- this._pktData = undefined;
155
- this._writeReqid = -1;
156
- this._requests = {};
157
- this._maxInPktLen = OPENSSH_MAX_PKT_LEN;
158
- this._maxOutPktLen = 34000;
159
- this._maxReadLen =
160
- (this._isOpenSSH ? OPENSSH_MAX_PKT_LEN : 34000) - PKT_RW_OVERHEAD;
161
- this._maxWriteLen =
162
- (this._isOpenSSH ? OPENSSH_MAX_PKT_LEN : 34000) - PKT_RW_OVERHEAD;
163
-
164
- this.maxOpenHandles = undefined;
165
-
166
- // Channel compatibility
167
- this._client = client;
168
- this._protocol = client._protocol;
169
- this._callbacks = [];
170
- this._hasX11 = false;
171
- this._exit = {
172
- code: undefined,
173
- signal: undefined,
174
- dump: undefined,
175
- desc: undefined,
176
- };
177
- this._waitWindow = false; // SSH-level backpressure
178
- this._chunkcb = undefined;
179
- this._buffer = [];
180
- this.type = chanInfo.type;
181
- this.subtype = undefined;
182
- this.incoming = chanInfo.incoming;
183
- this.outgoing = chanInfo.outgoing;
184
- this.stderr = fakeStderr;
185
- this.readable = true;
186
- }
187
-
188
- // This handles incoming data to parse
189
- push(data) {
190
- if (data === null) {
191
- cleanupRequests(this);
192
- if (!this.readable)
193
- return;
194
- // No more incoming data from the remote side
195
- this.readable = false;
196
- this.emit('end');
197
- return;
198
- }
199
- /*
200
- uint32 length
201
- byte type
202
- byte[length - 1] data payload
203
- */
204
- let p = 0;
205
-
206
- while (p < data.length) {
207
- if (this._pktLenBytes < 4) {
208
- let nb = Math.min(4 - this._pktLenBytes, data.length - p);
209
- this._pktLenBytes += nb;
210
-
211
- while (nb--)
212
- this._pktLen = (this._pktLen << 8) + data[p++];
213
-
214
- if (this._pktLenBytes < 4)
215
- return;
216
- if (this._pktLen === 0)
217
- return doFatalSFTPError(this, 'Invalid packet length');
218
- if (this._pktLen > this._maxInPktLen) {
219
- const max = this._maxInPktLen;
220
- return doFatalSFTPError(
221
- this,
222
- `Packet length ${this._pktLen} exceeds max length of ${max}`
223
- );
224
- }
225
- if (p >= data.length)
226
- return;
227
- }
228
- if (this._pktPos < this._pktLen) {
229
- const nb = Math.min(this._pktLen - this._pktPos, data.length - p);
230
- if (p !== 0 || nb !== data.length) {
231
- if (nb === this._pktLen) {
232
- this._pkt = new FastBuffer(data.buffer, data.byteOffset + p, nb);
233
- } else {
234
- if (!this._pkt)
235
- this._pkt = Buffer.allocUnsafe(this._pktLen);
236
- this._pkt.set(
237
- new Uint8Array(data.buffer, data.byteOffset + p, nb),
238
- this._pktPos
239
- );
240
- }
241
- } else if (nb === this._pktLen) {
242
- this._pkt = data;
243
- } else {
244
- if (!this._pkt)
245
- this._pkt = Buffer.allocUnsafe(this._pktLen);
246
- this._pkt.set(data, this._pktPos);
247
- }
248
- p += nb;
249
- this._pktPos += nb;
250
- if (this._pktPos < this._pktLen)
251
- return;
252
- }
253
-
254
- const type = this._pkt[0];
255
- const payload = this._pkt;
256
-
257
- // Prepare for next packet
258
- this._pktLen = 0;
259
- this._pktLenBytes = 0;
260
- this._pkt = undefined;
261
- this._pktPos = 0;
262
-
263
- const handler = (this.server
264
- ? SERVER_HANDLERS[type]
265
- : CLIENT_HANDLERS[type]);
266
- if (!handler)
267
- return doFatalSFTPError(this, `Unknown packet type ${type}`);
268
-
269
- if (this._version === -1) {
270
- if (this.server) {
271
- if (type !== REQUEST.INIT)
272
- return doFatalSFTPError(this, `Expected INIT packet, got ${type}`);
273
- } else if (type !== RESPONSE.VERSION) {
274
- return doFatalSFTPError(this, `Expected VERSION packet, got ${type}`);
275
- }
276
- }
277
-
278
- if (handler(this, payload) === false)
279
- return;
280
- }
281
- }
282
-
283
- end() {
284
- this.destroy();
285
- }
286
- destroy() {
287
- if (this.outgoing.state === 'open' || this.outgoing.state === 'eof') {
288
- this.outgoing.state = 'closing';
289
- this._protocol.channelClose(this.outgoing.id);
290
- }
291
- }
292
- _init() {
293
- this._init = noop;
294
- if (!this.server)
295
- sendOrBuffer(this, CLIENT_VERSION_BUFFER);
296
- }
297
-
298
- // ===========================================================================
299
- // Client-specific ===========================================================
300
- // ===========================================================================
301
- createReadStream(path, options) {
302
- if (this.server)
303
- throw new Error('Client-only method called in server mode');
304
-
305
- return new ReadStream(this, path, options);
306
- }
307
- createWriteStream(path, options) {
308
- if (this.server)
309
- throw new Error('Client-only method called in server mode');
310
-
311
- return new WriteStream(this, path, options);
312
- }
313
- open(path, flags_, attrs, cb) {
314
- if (this.server)
315
- throw new Error('Client-only method called in server mode');
316
-
317
- if (typeof attrs === 'function') {
318
- cb = attrs;
319
- attrs = undefined;
320
- }
321
-
322
- const flags = (typeof flags_ === 'number' ? flags_ : stringToFlags(flags_));
323
- if (flags === null)
324
- throw new Error(`Unknown flags string: ${flags_}`);
325
-
326
- let attrsFlags = 0;
327
- let attrsLen = 0;
328
- if (typeof attrs === 'string' || typeof attrs === 'number')
329
- attrs = { mode: attrs };
330
- if (typeof attrs === 'object' && attrs !== null) {
331
- attrs = attrsToBytes(attrs);
332
- attrsFlags = attrs.flags;
333
- attrsLen = attrs.nb;
334
- }
335
-
336
- /*
337
- uint32 id
338
- string filename
339
- uint32 pflags
340
- ATTRS attrs
341
- */
342
- const pathLen = Buffer.byteLength(path);
343
- let p = 9;
344
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen + 4 + 4 + attrsLen);
345
-
346
- writeUInt32BE(buf, buf.length - 4, 0);
347
- buf[4] = REQUEST.OPEN;
348
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
349
- writeUInt32BE(buf, reqid, 5);
350
-
351
- writeUInt32BE(buf, pathLen, p);
352
- buf.utf8Write(path, p += 4, pathLen);
353
- writeUInt32BE(buf, flags, p += pathLen);
354
- writeUInt32BE(buf, attrsFlags, p += 4);
355
- if (attrsLen) {
356
- p += 4;
357
-
358
- if (attrsLen === ATTRS_BUF.length)
359
- buf.set(ATTRS_BUF, p);
360
- else
361
- bufferCopy(ATTRS_BUF, buf, 0, attrsLen, p);
362
-
363
- p += attrsLen;
364
- }
365
- this._requests[reqid] = { cb };
366
-
367
- const isBuffered = sendOrBuffer(this, buf);
368
- this._debug && this._debug(
369
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} OPEN`
370
- );
371
- }
372
- close(handle, cb) {
373
- if (this.server)
374
- throw new Error('Client-only method called in server mode');
375
-
376
- if (!Buffer.isBuffer(handle))
377
- throw new Error('handle is not a Buffer');
378
-
379
- /*
380
- uint32 id
381
- string handle
382
- */
383
- const handleLen = handle.length;
384
- let p = 9;
385
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + handleLen);
386
-
387
- writeUInt32BE(buf, buf.length - 4, 0);
388
- buf[4] = REQUEST.CLOSE;
389
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
390
- writeUInt32BE(buf, reqid, 5);
391
-
392
- writeUInt32BE(buf, handleLen, p);
393
- buf.set(handle, p += 4);
394
-
395
- this._requests[reqid] = { cb };
396
-
397
- const isBuffered = sendOrBuffer(this, buf);
398
- this._debug && this._debug(
399
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} CLOSE`
400
- );
401
- }
402
- read(handle, buf, off, len, position, cb) {
403
- if (this.server)
404
- throw new Error('Client-only method called in server mode');
405
- if (!Buffer.isBuffer(handle))
406
- throw new Error('handle is not a Buffer');
407
- if (!Buffer.isBuffer(buf))
408
- throw new Error('buffer is not a Buffer');
409
- if (off >= buf.length)
410
- throw new Error('offset is out of bounds');
411
- if (off + len > buf.length)
412
- throw new Error('length extends beyond buffer');
413
- if (position === null)
414
- throw new Error('null position currently unsupported');
415
-
416
- read_(this, handle, buf, off, len, position, cb);
417
- }
418
- readData(handle, buf, off, len, position, cb) {
419
- // Backwards compatibility
420
- this.read(handle, buf, off, len, position, cb);
421
- }
422
- write(handle, buf, off, len, position, cb) {
423
- if (this.server)
424
- throw new Error('Client-only method called in server mode');
425
-
426
- if (!Buffer.isBuffer(handle))
427
- throw new Error('handle is not a Buffer');
428
- if (!Buffer.isBuffer(buf))
429
- throw new Error('buffer is not a Buffer');
430
- if (off > buf.length)
431
- throw new Error('offset is out of bounds');
432
- if (off + len > buf.length)
433
- throw new Error('length extends beyond buffer');
434
- if (position === null)
435
- throw new Error('null position currently unsupported');
436
-
437
- if (!len) {
438
- cb && process.nextTick(cb, undefined, 0);
439
- return;
440
- }
441
-
442
- const maxDataLen = this._maxWriteLen;
443
- const overflow = Math.max(len - maxDataLen, 0);
444
- const origPosition = position;
445
-
446
- if (overflow)
447
- len = maxDataLen;
448
-
449
- /*
450
- uint32 id
451
- string handle
452
- uint64 offset
453
- string data
454
- */
455
- const handleLen = handle.length;
456
- let p = 9;
457
- const out = Buffer.allocUnsafe(4 + 1 + 4 + 4 + handleLen + 8 + 4 + len);
458
-
459
- writeUInt32BE(out, out.length - 4, 0);
460
- out[4] = REQUEST.WRITE;
461
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
462
- writeUInt32BE(out, reqid, 5);
463
-
464
- writeUInt32BE(out, handleLen, p);
465
- out.set(handle, p += 4);
466
- p += handleLen;
467
- for (let i = 7; i >= 0; --i) {
468
- out[p + i] = position & 0xFF;
469
- position /= 256;
470
- }
471
- writeUInt32BE(out, len, p += 8);
472
- bufferCopy(buf, out, off, off + len, p += 4);
473
-
474
- this._requests[reqid] = {
475
- cb: (err) => {
476
- if (err) {
477
- if (typeof cb === 'function')
478
- cb(err);
479
- } else if (overflow) {
480
- this.write(handle,
481
- buf,
482
- off + len,
483
- overflow,
484
- origPosition + len,
485
- cb);
486
- } else if (typeof cb === 'function') {
487
- cb(undefined, off + len);
488
- }
489
- }
490
- };
491
-
492
- const isSent = sendOrBuffer(this, out);
493
- if (this._debug) {
494
- const how = (isSent ? 'Sent' : 'Buffered');
495
- this._debug(`SFTP: Outbound: ${how} WRITE (id:${reqid})`);
496
- }
497
- }
498
- writeData(handle, buf, off, len, position, cb) {
499
- // Backwards compatibility
500
- this.write(handle, buf, off, len, position, cb);
501
- }
502
- fastGet(remotePath, localPath, opts, cb) {
503
- if (this.server)
504
- throw new Error('Client-only method called in server mode');
505
-
506
- fastXfer(this, fs, remotePath, localPath, opts, cb);
507
- }
508
- fastPut(localPath, remotePath, opts, cb) {
509
- if (this.server)
510
- throw new Error('Client-only method called in server mode');
511
-
512
- fastXfer(fs, this, localPath, remotePath, opts, cb);
513
- }
514
- readFile(path, options, callback_) {
515
- if (this.server)
516
- throw new Error('Client-only method called in server mode');
517
-
518
- let callback;
519
- if (typeof callback_ === 'function') {
520
- callback = callback_;
521
- } else if (typeof options === 'function') {
522
- callback = options;
523
- options = undefined;
524
- }
525
-
526
- if (typeof options === 'string')
527
- options = { encoding: options, flag: 'r' };
528
- else if (!options)
529
- options = { encoding: null, flag: 'r' };
530
- else if (typeof options !== 'object')
531
- throw new TypeError('Bad arguments');
532
-
533
- const encoding = options.encoding;
534
- if (encoding && !Buffer.isEncoding(encoding))
535
- throw new Error(`Unknown encoding: ${encoding}`);
536
-
537
- // First stat the file, so we know the size.
538
- let size;
539
- let buffer; // Single buffer with file data
540
- let buffers; // List for when size is unknown
541
- let pos = 0;
542
- let handle;
543
-
544
- // SFTPv3 does not support using -1 for read position, so we have to track
545
- // read position manually
546
- let bytesRead = 0;
547
-
548
- const flag = options.flag || 'r';
549
-
550
- const read = () => {
551
- if (size === 0) {
552
- buffer = Buffer.allocUnsafe(8192);
553
- this.read(handle, buffer, 0, 8192, bytesRead, afterRead);
554
- } else {
555
- this.read(handle, buffer, pos, size - pos, bytesRead, afterRead);
556
- }
557
- };
558
-
559
- const afterRead = (er, nbytes) => {
560
- let eof;
561
- if (er) {
562
- eof = (er.code === STATUS_CODE.EOF);
563
- if (!eof) {
564
- return this.close(handle, () => {
565
- return callback && callback(er);
566
- });
567
- }
568
- } else {
569
- eof = false;
570
- }
571
-
572
- if (eof || (size === 0 && nbytes === 0))
573
- return close();
574
-
575
- bytesRead += nbytes;
576
- pos += nbytes;
577
- if (size !== 0) {
578
- if (pos === size)
579
- close();
580
- else
581
- read();
582
- } else {
583
- // Unknown size, just read until we don't get bytes.
584
- buffers.push(bufferSlice(buffer, 0, nbytes));
585
- read();
586
- }
587
- };
588
- afterRead._wantEOFError = true;
589
-
590
- const close = () => {
591
- this.close(handle, (er) => {
592
- if (size === 0) {
593
- // Collect the data into the buffers list.
594
- buffer = Buffer.concat(buffers, pos);
595
- } else if (pos < size) {
596
- buffer = bufferSlice(buffer, 0, pos);
597
- }
598
-
599
- if (encoding)
600
- buffer = buffer.toString(encoding);
601
- return callback && callback(er, buffer);
602
- });
603
- };
604
-
605
- this.open(path, flag, 0o666, (er, handle_) => {
606
- if (er)
607
- return callback && callback(er);
608
- handle = handle_;
609
-
610
- const tryStat = (er, st) => {
611
- if (er) {
612
- // Try stat() for sftp servers that may not support fstat() for
613
- // whatever reason
614
- this.stat(path, (er_, st_) => {
615
- if (er_) {
616
- return this.close(handle, () => {
617
- callback && callback(er);
618
- });
619
- }
620
- tryStat(null, st_);
621
- });
622
- return;
623
- }
624
-
625
- size = st.size || 0;
626
- if (size === 0) {
627
- // The kernel lies about many files.
628
- // Go ahead and try to read some bytes.
629
- buffers = [];
630
- return read();
631
- }
632
-
633
- buffer = Buffer.allocUnsafe(size);
634
- read();
635
- };
636
- this.fstat(handle, tryStat);
637
- });
638
- }
639
- writeFile(path, data, options, callback_) {
640
- if (this.server)
641
- throw new Error('Client-only method called in server mode');
642
-
643
- let callback;
644
- if (typeof callback_ === 'function') {
645
- callback = callback_;
646
- } else if (typeof options === 'function') {
647
- callback = options;
648
- options = undefined;
649
- }
650
-
651
- if (typeof options === 'string')
652
- options = { encoding: options, mode: 0o666, flag: 'w' };
653
- else if (!options)
654
- options = { encoding: 'utf8', mode: 0o666, flag: 'w' };
655
- else if (typeof options !== 'object')
656
- throw new TypeError('Bad arguments');
657
-
658
- if (options.encoding && !Buffer.isEncoding(options.encoding))
659
- throw new Error(`Unknown encoding: ${options.encoding}`);
660
-
661
- const flag = options.flag || 'w';
662
- this.open(path, flag, options.mode, (openErr, handle) => {
663
- if (openErr) {
664
- callback && callback(openErr);
665
- } else {
666
- const buffer = (Buffer.isBuffer(data)
667
- ? data
668
- : Buffer.from('' + data, options.encoding || 'utf8'));
669
- const position = (/a/.test(flag) ? null : 0);
670
-
671
- // SFTPv3 does not support the notion of 'current position'
672
- // (null position), so we just attempt to append to the end of the file
673
- // instead
674
- if (position === null) {
675
- const tryStat = (er, st) => {
676
- if (er) {
677
- // Try stat() for sftp servers that may not support fstat() for
678
- // whatever reason
679
- this.stat(path, (er_, st_) => {
680
- if (er_) {
681
- return this.close(handle, () => {
682
- callback && callback(er);
683
- });
684
- }
685
- tryStat(null, st_);
686
- });
687
- return;
688
- }
689
- writeAll(this, handle, buffer, 0, buffer.length, st.size, callback);
690
- };
691
- this.fstat(handle, tryStat);
692
- return;
693
- }
694
- writeAll(this, handle, buffer, 0, buffer.length, position, callback);
695
- }
696
- });
697
- }
698
- appendFile(path, data, options, callback_) {
699
- if (this.server)
700
- throw new Error('Client-only method called in server mode');
701
-
702
- let callback;
703
- if (typeof callback_ === 'function') {
704
- callback = callback_;
705
- } else if (typeof options === 'function') {
706
- callback = options;
707
- options = undefined;
708
- }
709
-
710
- if (typeof options === 'string')
711
- options = { encoding: options, mode: 0o666, flag: 'a' };
712
- else if (!options)
713
- options = { encoding: 'utf8', mode: 0o666, flag: 'a' };
714
- else if (typeof options !== 'object')
715
- throw new TypeError('Bad arguments');
716
-
717
- if (!options.flag)
718
- options = Object.assign({ flag: 'a' }, options);
719
- this.writeFile(path, data, options, callback);
720
- }
721
- exists(path, cb) {
722
- if (this.server)
723
- throw new Error('Client-only method called in server mode');
724
-
725
- this.stat(path, (err) => {
726
- cb && cb(err ? false : true);
727
- });
728
- }
729
- unlink(filename, cb) {
730
- if (this.server)
731
- throw new Error('Client-only method called in server mode');
732
-
733
- /*
734
- uint32 id
735
- string filename
736
- */
737
- const fnameLen = Buffer.byteLength(filename);
738
- let p = 9;
739
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + fnameLen);
740
-
741
- writeUInt32BE(buf, buf.length - 4, 0);
742
- buf[4] = REQUEST.REMOVE;
743
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
744
- writeUInt32BE(buf, reqid, 5);
745
-
746
- writeUInt32BE(buf, fnameLen, p);
747
- buf.utf8Write(filename, p += 4, fnameLen);
748
-
749
- this._requests[reqid] = { cb };
750
-
751
- const isBuffered = sendOrBuffer(this, buf);
752
- this._debug && this._debug(
753
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} REMOVE`
754
- );
755
- }
756
- rename(oldPath, newPath, cb) {
757
- if (this.server)
758
- throw new Error('Client-only method called in server mode');
759
-
760
- /*
761
- uint32 id
762
- string oldpath
763
- string newpath
764
- */
765
- const oldLen = Buffer.byteLength(oldPath);
766
- const newLen = Buffer.byteLength(newPath);
767
- let p = 9;
768
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + oldLen + 4 + newLen);
769
-
770
- writeUInt32BE(buf, buf.length - 4, 0);
771
- buf[4] = REQUEST.RENAME;
772
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
773
- writeUInt32BE(buf, reqid, 5);
774
-
775
- writeUInt32BE(buf, oldLen, p);
776
- buf.utf8Write(oldPath, p += 4, oldLen);
777
- writeUInt32BE(buf, newLen, p += oldLen);
778
- buf.utf8Write(newPath, p += 4, newLen);
779
-
780
- this._requests[reqid] = { cb };
781
-
782
- const isBuffered = sendOrBuffer(this, buf);
783
- this._debug && this._debug(
784
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} RENAME`
785
- );
786
- }
787
- mkdir(path, attrs, cb) {
788
- if (this.server)
789
- throw new Error('Client-only method called in server mode');
790
-
791
- let flags = 0;
792
- let attrsLen = 0;
793
-
794
- if (typeof attrs === 'function') {
795
- cb = attrs;
796
- attrs = undefined;
797
- }
798
- if (typeof attrs === 'object' && attrs !== null) {
799
- attrs = attrsToBytes(attrs);
800
- flags = attrs.flags;
801
- attrsLen = attrs.nb;
802
- }
803
-
804
- /*
805
- uint32 id
806
- string path
807
- ATTRS attrs
808
- */
809
- const pathLen = Buffer.byteLength(path);
810
- let p = 9;
811
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen + 4 + attrsLen);
812
-
813
- writeUInt32BE(buf, buf.length - 4, 0);
814
- buf[4] = REQUEST.MKDIR;
815
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
816
- writeUInt32BE(buf, reqid, 5);
817
-
818
- writeUInt32BE(buf, pathLen, p);
819
- buf.utf8Write(path, p += 4, pathLen);
820
- writeUInt32BE(buf, flags, p += pathLen);
821
- if (attrsLen) {
822
- p += 4;
823
-
824
- if (attrsLen === ATTRS_BUF.length)
825
- buf.set(ATTRS_BUF, p);
826
- else
827
- bufferCopy(ATTRS_BUF, buf, 0, attrsLen, p);
828
-
829
- p += attrsLen;
830
- }
831
-
832
- this._requests[reqid] = { cb };
833
-
834
- const isBuffered = sendOrBuffer(this, buf);
835
- this._debug && this._debug(
836
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} MKDIR`
837
- );
838
- }
839
- rmdir(path, cb) {
840
- if (this.server)
841
- throw new Error('Client-only method called in server mode');
842
-
843
- /*
844
- uint32 id
845
- string path
846
- */
847
- const pathLen = Buffer.byteLength(path);
848
- let p = 9;
849
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen);
850
-
851
- writeUInt32BE(buf, buf.length - 4, 0);
852
- buf[4] = REQUEST.RMDIR;
853
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
854
- writeUInt32BE(buf, reqid, 5);
855
-
856
- writeUInt32BE(buf, pathLen, p);
857
- buf.utf8Write(path, p += 4, pathLen);
858
-
859
- this._requests[reqid] = { cb };
860
-
861
- const isBuffered = sendOrBuffer(this, buf);
862
- this._debug && this._debug(
863
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} RMDIR`
864
- );
865
- }
866
- readdir(where, opts, cb) {
867
- if (this.server)
868
- throw new Error('Client-only method called in server mode');
869
-
870
- if (typeof opts === 'function') {
871
- cb = opts;
872
- opts = {};
873
- }
874
- if (typeof opts !== 'object' || opts === null)
875
- opts = {};
876
-
877
- const doFilter = (opts && opts.full ? false : true);
878
-
879
- if (!Buffer.isBuffer(where) && typeof where !== 'string')
880
- throw new Error('missing directory handle or path');
881
-
882
- if (typeof where === 'string') {
883
- const entries = [];
884
- let e = 0;
885
-
886
- const reread = (err, handle) => {
887
- if (err)
888
- return cb(err);
889
-
890
- this.readdir(handle, opts, (err, list) => {
891
- const eof = (err && err.code === STATUS_CODE.EOF);
892
-
893
- if (err && !eof)
894
- return this.close(handle, () => cb(err));
895
-
896
- if (eof) {
897
- return this.close(handle, (err) => {
898
- if (err)
899
- return cb(err);
900
- cb(undefined, entries);
901
- });
902
- }
903
-
904
- for (let i = 0; i < list.length; ++i, ++e)
905
- entries[e] = list[i];
906
-
907
- reread(undefined, handle);
908
- });
909
- };
910
- return this.opendir(where, reread);
911
- }
912
-
913
- /*
914
- uint32 id
915
- string handle
916
- */
917
- const handleLen = where.length;
918
- let p = 9;
919
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + handleLen);
920
-
921
- writeUInt32BE(buf, buf.length - 4, 0);
922
- buf[4] = REQUEST.READDIR;
923
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
924
- writeUInt32BE(buf, reqid, 5);
925
-
926
- writeUInt32BE(buf, handleLen, p);
927
- buf.set(where, p += 4);
928
-
929
- this._requests[reqid] = {
930
- cb: (doFilter
931
- ? (err, list) => {
932
- if (typeof cb !== 'function')
933
- return;
934
- if (err)
935
- return cb(err);
936
-
937
- for (let i = list.length - 1; i >= 0; --i) {
938
- if (list[i].filename === '.' || list[i].filename === '..')
939
- list.splice(i, 1);
940
- }
941
-
942
- cb(undefined, list);
943
- }
944
- : cb)
945
- };
946
-
947
- const isBuffered = sendOrBuffer(this, buf);
948
- this._debug && this._debug(
949
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} READDIR`
950
- );
951
- }
952
- fstat(handle, cb) {
953
- if (this.server)
954
- throw new Error('Client-only method called in server mode');
955
-
956
- if (!Buffer.isBuffer(handle))
957
- throw new Error('handle is not a Buffer');
958
-
959
- /*
960
- uint32 id
961
- string handle
962
- */
963
- const handleLen = handle.length;
964
- let p = 9;
965
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + handleLen);
966
-
967
- writeUInt32BE(buf, buf.length - 4, 0);
968
- buf[4] = REQUEST.FSTAT;
969
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
970
- writeUInt32BE(buf, reqid, 5);
971
-
972
- writeUInt32BE(buf, handleLen, p);
973
- buf.set(handle, p += 4);
974
-
975
- this._requests[reqid] = { cb };
976
-
977
- const isBuffered = sendOrBuffer(this, buf);
978
- this._debug && this._debug(
979
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} FSTAT`
980
- );
981
- }
982
- stat(path, cb) {
983
- if (this.server)
984
- throw new Error('Client-only method called in server mode');
985
-
986
- /*
987
- uint32 id
988
- string path
989
- */
990
- const pathLen = Buffer.byteLength(path);
991
- let p = 9;
992
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen);
993
-
994
- writeUInt32BE(buf, buf.length - 4, 0);
995
- buf[4] = REQUEST.STAT;
996
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
997
- writeUInt32BE(buf, reqid, 5);
998
-
999
- writeUInt32BE(buf, pathLen, p);
1000
- buf.utf8Write(path, p += 4, pathLen);
1001
-
1002
- this._requests[reqid] = { cb };
1003
-
1004
- const isBuffered = sendOrBuffer(this, buf);
1005
- this._debug && this._debug(
1006
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} STAT`
1007
- );
1008
- }
1009
- lstat(path, cb) {
1010
- if (this.server)
1011
- throw new Error('Client-only method called in server mode');
1012
-
1013
- /*
1014
- uint32 id
1015
- string path
1016
- */
1017
- const pathLen = Buffer.byteLength(path);
1018
- let p = 9;
1019
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen);
1020
-
1021
- writeUInt32BE(buf, buf.length - 4, 0);
1022
- buf[4] = REQUEST.LSTAT;
1023
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1024
- writeUInt32BE(buf, reqid, 5);
1025
-
1026
- writeUInt32BE(buf, pathLen, p);
1027
- buf.utf8Write(path, p += 4, pathLen);
1028
-
1029
- this._requests[reqid] = { cb };
1030
-
1031
- const isBuffered = sendOrBuffer(this, buf);
1032
- this._debug && this._debug(
1033
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} LSTAT`
1034
- );
1035
- }
1036
- opendir(path, cb) {
1037
- if (this.server)
1038
- throw new Error('Client-only method called in server mode');
1039
-
1040
- /*
1041
- uint32 id
1042
- string path
1043
- */
1044
- const pathLen = Buffer.byteLength(path);
1045
- let p = 9;
1046
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen);
1047
-
1048
- writeUInt32BE(buf, buf.length - 4, 0);
1049
- buf[4] = REQUEST.OPENDIR;
1050
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1051
- writeUInt32BE(buf, reqid, 5);
1052
-
1053
- writeUInt32BE(buf, pathLen, p);
1054
- buf.utf8Write(path, p += 4, pathLen);
1055
-
1056
- this._requests[reqid] = { cb };
1057
-
1058
- const isBuffered = sendOrBuffer(this, buf);
1059
- this._debug && this._debug(
1060
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} OPENDIR`
1061
- );
1062
- }
1063
- setstat(path, attrs, cb) {
1064
- if (this.server)
1065
- throw new Error('Client-only method called in server mode');
1066
-
1067
- let flags = 0;
1068
- let attrsLen = 0;
1069
-
1070
- if (typeof attrs === 'object' && attrs !== null) {
1071
- attrs = attrsToBytes(attrs);
1072
- flags = attrs.flags;
1073
- attrsLen = attrs.nb;
1074
- } else if (typeof attrs === 'function') {
1075
- cb = attrs;
1076
- }
1077
-
1078
- /*
1079
- uint32 id
1080
- string path
1081
- ATTRS attrs
1082
- */
1083
- const pathLen = Buffer.byteLength(path);
1084
- let p = 9;
1085
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen + 4 + attrsLen);
1086
-
1087
- writeUInt32BE(buf, buf.length - 4, 0);
1088
- buf[4] = REQUEST.SETSTAT;
1089
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1090
- writeUInt32BE(buf, reqid, 5);
1091
-
1092
- writeUInt32BE(buf, pathLen, p);
1093
- buf.utf8Write(path, p += 4, pathLen);
1094
- writeUInt32BE(buf, flags, p += pathLen);
1095
- if (attrsLen) {
1096
- p += 4;
1097
-
1098
- if (attrsLen === ATTRS_BUF.length)
1099
- buf.set(ATTRS_BUF, p);
1100
- else
1101
- bufferCopy(ATTRS_BUF, buf, 0, attrsLen, p);
1102
-
1103
- p += attrsLen;
1104
- }
1105
-
1106
- this._requests[reqid] = { cb };
1107
-
1108
- const isBuffered = sendOrBuffer(this, buf);
1109
- this._debug && this._debug(
1110
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} SETSTAT`
1111
- );
1112
- }
1113
- fsetstat(handle, attrs, cb) {
1114
- if (this.server)
1115
- throw new Error('Client-only method called in server mode');
1116
-
1117
- if (!Buffer.isBuffer(handle))
1118
- throw new Error('handle is not a Buffer');
1119
-
1120
- let flags = 0;
1121
- let attrsLen = 0;
1122
-
1123
- if (typeof attrs === 'object' && attrs !== null) {
1124
- attrs = attrsToBytes(attrs);
1125
- flags = attrs.flags;
1126
- attrsLen = attrs.nb;
1127
- } else if (typeof attrs === 'function') {
1128
- cb = attrs;
1129
- }
1130
-
1131
- /*
1132
- uint32 id
1133
- string handle
1134
- ATTRS attrs
1135
- */
1136
- const handleLen = handle.length;
1137
- let p = 9;
1138
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + handleLen + 4 + attrsLen);
1139
-
1140
- writeUInt32BE(buf, buf.length - 4, 0);
1141
- buf[4] = REQUEST.FSETSTAT;
1142
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1143
- writeUInt32BE(buf, reqid, 5);
1144
-
1145
- writeUInt32BE(buf, handleLen, p);
1146
- buf.set(handle, p += 4);
1147
- writeUInt32BE(buf, flags, p += handleLen);
1148
- if (attrsLen) {
1149
- p += 4;
1150
-
1151
- if (attrsLen === ATTRS_BUF.length)
1152
- buf.set(ATTRS_BUF, p);
1153
- else
1154
- bufferCopy(ATTRS_BUF, buf, 0, attrsLen, p);
1155
-
1156
- p += attrsLen;
1157
- }
1158
-
1159
- this._requests[reqid] = { cb };
1160
-
1161
- const isBuffered = sendOrBuffer(this, buf);
1162
- this._debug && this._debug(
1163
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} FSETSTAT`
1164
- );
1165
- }
1166
- futimes(handle, atime, mtime, cb) {
1167
- return this.fsetstat(handle, {
1168
- atime: toUnixTimestamp(atime),
1169
- mtime: toUnixTimestamp(mtime)
1170
- }, cb);
1171
- }
1172
- utimes(path, atime, mtime, cb) {
1173
- return this.setstat(path, {
1174
- atime: toUnixTimestamp(atime),
1175
- mtime: toUnixTimestamp(mtime)
1176
- }, cb);
1177
- }
1178
- fchown(handle, uid, gid, cb) {
1179
- return this.fsetstat(handle, {
1180
- uid: uid,
1181
- gid: gid
1182
- }, cb);
1183
- }
1184
- chown(path, uid, gid, cb) {
1185
- return this.setstat(path, {
1186
- uid: uid,
1187
- gid: gid
1188
- }, cb);
1189
- }
1190
- fchmod(handle, mode, cb) {
1191
- return this.fsetstat(handle, {
1192
- mode: mode
1193
- }, cb);
1194
- }
1195
- chmod(path, mode, cb) {
1196
- return this.setstat(path, {
1197
- mode: mode
1198
- }, cb);
1199
- }
1200
- readlink(path, cb) {
1201
- if (this.server)
1202
- throw new Error('Client-only method called in server mode');
1203
-
1204
- /*
1205
- uint32 id
1206
- string path
1207
- */
1208
- const pathLen = Buffer.byteLength(path);
1209
- let p = 9;
1210
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen);
1211
-
1212
- writeUInt32BE(buf, buf.length - 4, 0);
1213
- buf[4] = REQUEST.READLINK;
1214
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1215
- writeUInt32BE(buf, reqid, 5);
1216
-
1217
- writeUInt32BE(buf, pathLen, p);
1218
- buf.utf8Write(path, p += 4, pathLen);
1219
-
1220
- this._requests[reqid] = {
1221
- cb: (err, names) => {
1222
- if (typeof cb !== 'function')
1223
- return;
1224
- if (err)
1225
- return cb(err);
1226
- if (!names || !names.length)
1227
- return cb(new Error('Response missing link info'));
1228
- cb(undefined, names[0].filename);
1229
- }
1230
- };
1231
-
1232
- const isBuffered = sendOrBuffer(this, buf);
1233
- this._debug && this._debug(
1234
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} READLINK`
1235
- );
1236
- }
1237
- symlink(targetPath, linkPath, cb) {
1238
- if (this.server)
1239
- throw new Error('Client-only method called in server mode');
1240
-
1241
- /*
1242
- uint32 id
1243
- string linkpath
1244
- string targetpath
1245
- */
1246
- const linkLen = Buffer.byteLength(linkPath);
1247
- const targetLen = Buffer.byteLength(targetPath);
1248
- let p = 9;
1249
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + linkLen + 4 + targetLen);
1250
-
1251
- writeUInt32BE(buf, buf.length - 4, 0);
1252
- buf[4] = REQUEST.SYMLINK;
1253
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1254
- writeUInt32BE(buf, reqid, 5);
1255
-
1256
- if (this._isOpenSSH) {
1257
- // OpenSSH has linkpath and targetpath positions switched
1258
- writeUInt32BE(buf, targetLen, p);
1259
- buf.utf8Write(targetPath, p += 4, targetLen);
1260
- writeUInt32BE(buf, linkLen, p += targetLen);
1261
- buf.utf8Write(linkPath, p += 4, linkLen);
1262
- } else {
1263
- writeUInt32BE(buf, linkLen, p);
1264
- buf.utf8Write(linkPath, p += 4, linkLen);
1265
- writeUInt32BE(buf, targetLen, p += linkLen);
1266
- buf.utf8Write(targetPath, p += 4, targetLen);
1267
- }
1268
-
1269
- this._requests[reqid] = { cb };
1270
-
1271
- const isBuffered = sendOrBuffer(this, buf);
1272
- this._debug && this._debug(
1273
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} SYMLINK`
1274
- );
1275
- }
1276
- realpath(path, cb) {
1277
- if (this.server)
1278
- throw new Error('Client-only method called in server mode');
1279
-
1280
- /*
1281
- uint32 id
1282
- string path
1283
- */
1284
- const pathLen = Buffer.byteLength(path);
1285
- let p = 9;
1286
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + pathLen);
1287
-
1288
- writeUInt32BE(buf, buf.length - 4, 0);
1289
- buf[4] = REQUEST.REALPATH;
1290
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1291
- writeUInt32BE(buf, reqid, 5);
1292
-
1293
- writeUInt32BE(buf, pathLen, p);
1294
- buf.utf8Write(path, p += 4, pathLen);
1295
-
1296
- this._requests[reqid] = {
1297
- cb: (err, names) => {
1298
- if (typeof cb !== 'function')
1299
- return;
1300
- if (err)
1301
- return cb(err);
1302
- if (!names || !names.length)
1303
- return cb(new Error('Response missing path info'));
1304
- cb(undefined, names[0].filename);
1305
- }
1306
- };
1307
-
1308
- const isBuffered = sendOrBuffer(this, buf);
1309
- this._debug && this._debug(
1310
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} REALPATH`
1311
- );
1312
- }
1313
- // extended requests
1314
- ext_openssh_rename(oldPath, newPath, cb) {
1315
- if (this.server)
1316
- throw new Error('Client-only method called in server mode');
1317
-
1318
- const ext = this._extensions['posix-rename@openssh.com'];
1319
- if (!ext || ext !== '1')
1320
- throw new Error('Server does not support this extended request');
1321
-
1322
- /*
1323
- uint32 id
1324
- string "posix-rename@openssh.com"
1325
- string oldpath
1326
- string newpath
1327
- */
1328
- const oldLen = Buffer.byteLength(oldPath);
1329
- const newLen = Buffer.byteLength(newPath);
1330
- let p = 9;
1331
- const buf =
1332
- Buffer.allocUnsafe(4 + 1 + 4 + 4 + 24 + 4 + oldLen + 4 + newLen);
1333
-
1334
- writeUInt32BE(buf, buf.length - 4, 0);
1335
- buf[4] = REQUEST.EXTENDED;
1336
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1337
- writeUInt32BE(buf, reqid, 5);
1338
-
1339
- writeUInt32BE(buf, 24, p);
1340
- buf.utf8Write('posix-rename@openssh.com', p += 4, 24);
1341
- writeUInt32BE(buf, oldLen, p += 24);
1342
- buf.utf8Write(oldPath, p += 4, oldLen);
1343
- writeUInt32BE(buf, newLen, p += oldLen);
1344
- buf.utf8Write(newPath, p += 4, newLen);
1345
-
1346
- this._requests[reqid] = { cb };
1347
-
1348
- const isBuffered = sendOrBuffer(this, buf);
1349
- if (this._debug) {
1350
- const which = (isBuffered ? 'Buffered' : 'Sending');
1351
- this._debug(`SFTP: Outbound: ${which} posix-rename@openssh.com`);
1352
- }
1353
- }
1354
- ext_openssh_statvfs(path, cb) {
1355
- if (this.server)
1356
- throw new Error('Client-only method called in server mode');
1357
-
1358
- const ext = this._extensions['statvfs@openssh.com'];
1359
- if (!ext || ext !== '2')
1360
- throw new Error('Server does not support this extended request');
1361
-
1362
- /*
1363
- uint32 id
1364
- string "statvfs@openssh.com"
1365
- string path
1366
- */
1367
- const pathLen = Buffer.byteLength(path);
1368
- let p = 9;
1369
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + 19 + 4 + pathLen);
1370
-
1371
- writeUInt32BE(buf, buf.length - 4, 0);
1372
- buf[4] = REQUEST.EXTENDED;
1373
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1374
- writeUInt32BE(buf, reqid, 5);
1375
-
1376
- writeUInt32BE(buf, 19, p);
1377
- buf.utf8Write('statvfs@openssh.com', p += 4, 19);
1378
- writeUInt32BE(buf, pathLen, p += 19);
1379
- buf.utf8Write(path, p += 4, pathLen);
1380
-
1381
- this._requests[reqid] = { extended: 'statvfs@openssh.com', cb };
1382
-
1383
- const isBuffered = sendOrBuffer(this, buf);
1384
- if (this._debug) {
1385
- const which = (isBuffered ? 'Buffered' : 'Sending');
1386
- this._debug(`SFTP: Outbound: ${which} statvfs@openssh.com`);
1387
- }
1388
- }
1389
- ext_openssh_fstatvfs(handle, cb) {
1390
- if (this.server)
1391
- throw new Error('Client-only method called in server mode');
1392
-
1393
- const ext = this._extensions['fstatvfs@openssh.com'];
1394
- if (!ext || ext !== '2')
1395
- throw new Error('Server does not support this extended request');
1396
- if (!Buffer.isBuffer(handle))
1397
- throw new Error('handle is not a Buffer');
1398
-
1399
- /*
1400
- uint32 id
1401
- string "fstatvfs@openssh.com"
1402
- string handle
1403
- */
1404
- const handleLen = handle.length;
1405
- let p = 9;
1406
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + 20 + 4 + handleLen);
1407
-
1408
- writeUInt32BE(buf, buf.length - 4, 0);
1409
- buf[4] = REQUEST.EXTENDED;
1410
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1411
- writeUInt32BE(buf, reqid, 5);
1412
-
1413
- writeUInt32BE(buf, 20, p);
1414
- buf.utf8Write('fstatvfs@openssh.com', p += 4, 20);
1415
- writeUInt32BE(buf, handleLen, p += 20);
1416
- buf.set(handle, p += 4);
1417
-
1418
- this._requests[reqid] = { extended: 'fstatvfs@openssh.com', cb };
1419
-
1420
- const isBuffered = sendOrBuffer(this, buf);
1421
- if (this._debug) {
1422
- const which = (isBuffered ? 'Buffered' : 'Sending');
1423
- this._debug(`SFTP: Outbound: ${which} fstatvfs@openssh.com`);
1424
- }
1425
- }
1426
- ext_openssh_hardlink(oldPath, newPath, cb) {
1427
- if (this.server)
1428
- throw new Error('Client-only method called in server mode');
1429
-
1430
- const ext = this._extensions['hardlink@openssh.com'];
1431
- if (ext !== '1')
1432
- throw new Error('Server does not support this extended request');
1433
-
1434
- /*
1435
- uint32 id
1436
- string "hardlink@openssh.com"
1437
- string oldpath
1438
- string newpath
1439
- */
1440
- const oldLen = Buffer.byteLength(oldPath);
1441
- const newLen = Buffer.byteLength(newPath);
1442
- let p = 9;
1443
- const buf =
1444
- Buffer.allocUnsafe(4 + 1 + 4 + 4 + 20 + 4 + oldLen + 4 + newLen);
1445
-
1446
- writeUInt32BE(buf, buf.length - 4, 0);
1447
- buf[4] = REQUEST.EXTENDED;
1448
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1449
- writeUInt32BE(buf, reqid, 5);
1450
-
1451
- writeUInt32BE(buf, 20, p);
1452
- buf.utf8Write('hardlink@openssh.com', p += 4, 20);
1453
- writeUInt32BE(buf, oldLen, p += 20);
1454
- buf.utf8Write(oldPath, p += 4, oldLen);
1455
- writeUInt32BE(buf, newLen, p += oldLen);
1456
- buf.utf8Write(newPath, p += 4, newLen);
1457
-
1458
- this._requests[reqid] = { cb };
1459
-
1460
- const isBuffered = sendOrBuffer(this, buf);
1461
- if (this._debug) {
1462
- const which = (isBuffered ? 'Buffered' : 'Sending');
1463
- this._debug(`SFTP: Outbound: ${which} hardlink@openssh.com`);
1464
- }
1465
- }
1466
- ext_openssh_fsync(handle, cb) {
1467
- if (this.server)
1468
- throw new Error('Client-only method called in server mode');
1469
-
1470
- const ext = this._extensions['fsync@openssh.com'];
1471
- if (ext !== '1')
1472
- throw new Error('Server does not support this extended request');
1473
- if (!Buffer.isBuffer(handle))
1474
- throw new Error('handle is not a Buffer');
1475
-
1476
- /*
1477
- uint32 id
1478
- string "fsync@openssh.com"
1479
- string handle
1480
- */
1481
- const handleLen = handle.length;
1482
- let p = 9;
1483
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + 17 + 4 + handleLen);
1484
-
1485
- writeUInt32BE(buf, buf.length - 4, 0);
1486
- buf[4] = REQUEST.EXTENDED;
1487
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1488
- writeUInt32BE(buf, reqid, 5);
1489
-
1490
- writeUInt32BE(buf, 17, p);
1491
- buf.utf8Write('fsync@openssh.com', p += 4, 17);
1492
- writeUInt32BE(buf, handleLen, p += 17);
1493
- buf.set(handle, p += 4);
1494
-
1495
- this._requests[reqid] = { cb };
1496
-
1497
- const isBuffered = sendOrBuffer(this, buf);
1498
- this._debug && this._debug(
1499
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} fsync@openssh.com`
1500
- );
1501
- }
1502
- ext_openssh_lsetstat(path, attrs, cb) {
1503
- if (this.server)
1504
- throw new Error('Client-only method called in server mode');
1505
-
1506
- const ext = this._extensions['lsetstat@openssh.com'];
1507
- if (ext !== '1')
1508
- throw new Error('Server does not support this extended request');
1509
-
1510
- let flags = 0;
1511
- let attrsLen = 0;
1512
-
1513
- if (typeof attrs === 'object' && attrs !== null) {
1514
- attrs = attrsToBytes(attrs);
1515
- flags = attrs.flags;
1516
- attrsLen = attrs.nb;
1517
- } else if (typeof attrs === 'function') {
1518
- cb = attrs;
1519
- }
1520
-
1521
- /*
1522
- uint32 id
1523
- string "lsetstat@openssh.com"
1524
- string path
1525
- ATTRS attrs
1526
- */
1527
- const pathLen = Buffer.byteLength(path);
1528
- let p = 9;
1529
- const buf =
1530
- Buffer.allocUnsafe(4 + 1 + 4 + 4 + 20 + 4 + pathLen + 4 + attrsLen);
1531
-
1532
- writeUInt32BE(buf, buf.length - 4, 0);
1533
- buf[4] = REQUEST.EXTENDED;
1534
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1535
- writeUInt32BE(buf, reqid, 5);
1536
-
1537
- writeUInt32BE(buf, 20, p);
1538
- buf.utf8Write('lsetstat@openssh.com', p += 4, 20);
1539
-
1540
- writeUInt32BE(buf, pathLen, p += 20);
1541
- buf.utf8Write(path, p += 4, pathLen);
1542
-
1543
- writeUInt32BE(buf, flags, p += pathLen);
1544
- if (attrsLen) {
1545
- p += 4;
1546
-
1547
- if (attrsLen === ATTRS_BUF.length)
1548
- buf.set(ATTRS_BUF, p);
1549
- else
1550
- bufferCopy(ATTRS_BUF, buf, 0, attrsLen, p);
1551
-
1552
- p += attrsLen;
1553
- }
1554
-
1555
- this._requests[reqid] = { cb };
1556
-
1557
- const isBuffered = sendOrBuffer(this, buf);
1558
- if (this._debug) {
1559
- const status = (isBuffered ? 'Buffered' : 'Sending');
1560
- this._debug(`SFTP: Outbound: ${status} lsetstat@openssh.com`);
1561
- }
1562
- }
1563
- ext_openssh_expandPath(path, cb) {
1564
- if (this.server)
1565
- throw new Error('Client-only method called in server mode');
1566
-
1567
- const ext = this._extensions['expand-path@openssh.com'];
1568
- if (ext !== '1')
1569
- throw new Error('Server does not support this extended request');
1570
-
1571
- /*
1572
- uint32 id
1573
- string "expand-path@openssh.com"
1574
- string path
1575
- */
1576
- const pathLen = Buffer.byteLength(path);
1577
- let p = 9;
1578
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + 23 + 4 + pathLen);
1579
-
1580
- writeUInt32BE(buf, buf.length - 4, 0);
1581
- buf[4] = REQUEST.EXTENDED;
1582
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1583
- writeUInt32BE(buf, reqid, 5);
1584
-
1585
- writeUInt32BE(buf, 23, p);
1586
- buf.utf8Write('expand-path@openssh.com', p += 4, 23);
1587
-
1588
- writeUInt32BE(buf, pathLen, p += 20);
1589
- buf.utf8Write(path, p += 4, pathLen);
1590
-
1591
- this._requests[reqid] = {
1592
- cb: (err, names) => {
1593
- if (typeof cb !== 'function')
1594
- return;
1595
- if (err)
1596
- return cb(err);
1597
- if (!names || !names.length)
1598
- return cb(new Error('Response missing expanded path'));
1599
- cb(undefined, names[0].filename);
1600
- }
1601
- };
1602
-
1603
- const isBuffered = sendOrBuffer(this, buf);
1604
- if (this._debug) {
1605
- const status = (isBuffered ? 'Buffered' : 'Sending');
1606
- this._debug(`SFTP: Outbound: ${status} expand-path@openssh.com`);
1607
- }
1608
- }
1609
- ext_copy_data(srcHandle, srcOffset, len, dstHandle, dstOffset, cb) {
1610
- if (this.server)
1611
- throw new Error('Client-only method called in server mode');
1612
-
1613
- const ext = this._extensions['copy-data'];
1614
- if (ext !== '1')
1615
- throw new Error('Server does not support this extended request');
1616
-
1617
- if (!Buffer.isBuffer(srcHandle))
1618
- throw new Error('Source handle is not a Buffer');
1619
-
1620
- if (!Buffer.isBuffer(dstHandle))
1621
- throw new Error('Destination handle is not a Buffer');
1622
-
1623
- /*
1624
- uint32 id
1625
- string "copy-data"
1626
- string read-from-handle
1627
- uint64 read-from-offset
1628
- uint64 read-data-length
1629
- string write-to-handle
1630
- uint64 write-to-offset
1631
- */
1632
- let p = 0;
1633
- const buf = Buffer.allocUnsafe(
1634
- 4 + 1
1635
- + 4
1636
- + 4 + 9
1637
- + 4 + srcHandle.length
1638
- + 8
1639
- + 8
1640
- + 4 + dstHandle.length
1641
- + 8
1642
- );
1643
-
1644
- writeUInt32BE(buf, buf.length - 4, p);
1645
- p += 4;
1646
-
1647
- buf[p] = REQUEST.EXTENDED;
1648
- ++p;
1649
-
1650
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1651
- writeUInt32BE(buf, reqid, p);
1652
- p += 4;
1653
-
1654
- writeUInt32BE(buf, 9, p);
1655
- p += 4;
1656
- buf.utf8Write('copy-data', p, 9);
1657
- p += 9;
1658
-
1659
- writeUInt32BE(buf, srcHandle.length, p);
1660
- p += 4;
1661
- buf.set(srcHandle, p);
1662
- p += srcHandle.length;
1663
-
1664
- for (let i = 7; i >= 0; --i) {
1665
- buf[p + i] = srcOffset & 0xFF;
1666
- srcOffset /= 256;
1667
- }
1668
- p += 8;
1669
-
1670
- for (let i = 7; i >= 0; --i) {
1671
- buf[p + i] = len & 0xFF;
1672
- len /= 256;
1673
- }
1674
- p += 8;
1675
-
1676
- writeUInt32BE(buf, dstHandle.length, p);
1677
- p += 4;
1678
- buf.set(dstHandle, p);
1679
- p += dstHandle.length;
1680
-
1681
- for (let i = 7; i >= 0; --i) {
1682
- buf[p + i] = dstOffset & 0xFF;
1683
- dstOffset /= 256;
1684
- }
1685
-
1686
- this._requests[reqid] = { cb };
1687
-
1688
- const isBuffered = sendOrBuffer(this, buf);
1689
- if (this._debug) {
1690
- const status = (isBuffered ? 'Buffered' : 'Sending');
1691
- this._debug(`SFTP: Outbound: ${status} copy-data`);
1692
- }
1693
- }
1694
- ext_home_dir(username, cb) {
1695
- if (this.server)
1696
- throw new Error('Client-only method called in server mode');
1697
-
1698
- const ext = this._extensions['home-directory'];
1699
- if (ext !== '1')
1700
- throw new Error('Server does not support this extended request');
1701
-
1702
- if (typeof username !== 'string')
1703
- throw new TypeError('username is not a string');
1704
-
1705
- /*
1706
- uint32 id
1707
- string "home-directory"
1708
- string username
1709
- */
1710
- let p = 0;
1711
- const usernameLen = Buffer.byteLength(username);
1712
- const buf = Buffer.allocUnsafe(
1713
- 4 + 1
1714
- + 4
1715
- + 4 + 14
1716
- + 4 + usernameLen
1717
- );
1718
-
1719
- writeUInt32BE(buf, buf.length - 4, p);
1720
- p += 4;
1721
-
1722
- buf[p] = REQUEST.EXTENDED;
1723
- ++p;
1724
-
1725
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1726
- writeUInt32BE(buf, reqid, p);
1727
- p += 4;
1728
-
1729
- writeUInt32BE(buf, 14, p);
1730
- p += 4;
1731
- buf.utf8Write('home-directory', p, 14);
1732
- p += 14;
1733
-
1734
- writeUInt32BE(buf, usernameLen, p);
1735
- p += 4;
1736
- buf.utf8Write(username, p, usernameLen);
1737
- p += usernameLen;
1738
-
1739
- this._requests[reqid] = {
1740
- cb: (err, names) => {
1741
- if (typeof cb !== 'function')
1742
- return;
1743
- if (err)
1744
- return cb(err);
1745
- if (!names || !names.length)
1746
- return cb(new Error('Response missing home directory'));
1747
- cb(undefined, names[0].filename);
1748
- }
1749
- };
1750
-
1751
- const isBuffered = sendOrBuffer(this, buf);
1752
- if (this._debug) {
1753
- const status = (isBuffered ? 'Buffered' : 'Sending');
1754
- this._debug(`SFTP: Outbound: ${status} home-directory`);
1755
- }
1756
- }
1757
- ext_users_groups(uids, gids, cb) {
1758
- if (this.server)
1759
- throw new Error('Client-only method called in server mode');
1760
-
1761
- const ext = this._extensions['users-groups-by-id@openssh.com'];
1762
- if (ext !== '1')
1763
- throw new Error('Server does not support this extended request');
1764
-
1765
- if (!Array.isArray(uids))
1766
- throw new TypeError('uids is not an array');
1767
- for (const val of uids) {
1768
- if (!Number.isInteger(val) || val < 0 || val > (2 ** 32 - 1))
1769
- throw new Error('uid values must all be 32-bit unsigned integers');
1770
- }
1771
- if (!Array.isArray(gids))
1772
- throw new TypeError('gids is not an array');
1773
- for (const val of gids) {
1774
- if (!Number.isInteger(val) || val < 0 || val > (2 ** 32 - 1))
1775
- throw new Error('gid values must all be 32-bit unsigned integers');
1776
- }
1777
-
1778
- /*
1779
- uint32 id
1780
- string "users-groups-by-id@openssh.com"
1781
- string uids
1782
- uint32 uid1
1783
- ...
1784
- string gids
1785
- uint32 gid1
1786
- ...
1787
- */
1788
- let p = 0;
1789
- const buf = Buffer.allocUnsafe(
1790
- 4 + 1
1791
- + 4
1792
- + 4 + 30
1793
- + 4 + (4 * uids.length)
1794
- + 4 + (4 * gids.length)
1795
- );
1796
-
1797
- writeUInt32BE(buf, buf.length - 4, p);
1798
- p += 4;
1799
-
1800
- buf[p] = REQUEST.EXTENDED;
1801
- ++p;
1802
-
1803
- const reqid = this._writeReqid = (this._writeReqid + 1) & MAX_REQID;
1804
- writeUInt32BE(buf, reqid, p);
1805
- p += 4;
1806
-
1807
- writeUInt32BE(buf, 30, p);
1808
- p += 4;
1809
- buf.utf8Write('users-groups-by-id@openssh.com', p, 30);
1810
- p += 30;
1811
-
1812
- writeUInt32BE(buf, 4 * uids.length, p);
1813
- p += 4;
1814
- for (const val of uids) {
1815
- writeUInt32BE(buf, val, p);
1816
- p += 4;
1817
- }
1818
-
1819
- writeUInt32BE(buf, 4 * gids.length, p);
1820
- p += 4;
1821
- for (const val of gids) {
1822
- writeUInt32BE(buf, val, p);
1823
- p += 4;
1824
- }
1825
-
1826
- this._requests[reqid] = { extended: 'users-groups-by-id@openssh.com', cb };
1827
-
1828
- const isBuffered = sendOrBuffer(this, buf);
1829
- if (this._debug) {
1830
- const status = (isBuffered ? 'Buffered' : 'Sending');
1831
- this._debug(`SFTP: Outbound: ${status} users-groups-by-id@openssh.com`);
1832
- }
1833
- }
1834
- // ===========================================================================
1835
- // Server-specific ===========================================================
1836
- // ===========================================================================
1837
- handle(reqid, handle) {
1838
- if (!this.server)
1839
- throw new Error('Server-only method called in client mode');
1840
-
1841
- if (!Buffer.isBuffer(handle))
1842
- throw new Error('handle is not a Buffer');
1843
-
1844
- const handleLen = handle.length;
1845
-
1846
- if (handleLen > 256)
1847
- throw new Error('handle too large (> 256 bytes)');
1848
-
1849
- let p = 9;
1850
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + handleLen);
1851
-
1852
- writeUInt32BE(buf, buf.length - 4, 0);
1853
- buf[4] = RESPONSE.HANDLE;
1854
- writeUInt32BE(buf, reqid, 5);
1855
-
1856
- writeUInt32BE(buf, handleLen, p);
1857
- if (handleLen)
1858
- buf.set(handle, p += 4);
1859
-
1860
- const isBuffered = sendOrBuffer(this, buf);
1861
- this._debug && this._debug(
1862
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} HANDLE`
1863
- );
1864
- }
1865
- status(reqid, code, message) {
1866
- if (!this.server)
1867
- throw new Error('Server-only method called in client mode');
1868
-
1869
- if (!VALID_STATUS_CODES.has(code))
1870
- throw new Error(`Bad status code: ${code}`);
1871
-
1872
- message || (message = '');
1873
-
1874
- const msgLen = Buffer.byteLength(message);
1875
- let p = 9;
1876
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + 4 + msgLen + 4);
1877
-
1878
- writeUInt32BE(buf, buf.length - 4, 0);
1879
- buf[4] = RESPONSE.STATUS;
1880
- writeUInt32BE(buf, reqid, 5);
1881
-
1882
- writeUInt32BE(buf, code, p);
1883
-
1884
- writeUInt32BE(buf, msgLen, p += 4);
1885
- p += 4;
1886
- if (msgLen) {
1887
- buf.utf8Write(message, p, msgLen);
1888
- p += msgLen;
1889
- }
1890
-
1891
- writeUInt32BE(buf, 0, p); // Empty language tag
1892
-
1893
- const isBuffered = sendOrBuffer(this, buf);
1894
- this._debug && this._debug(
1895
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} STATUS`
1896
- );
1897
- }
1898
- data(reqid, data, encoding) {
1899
- if (!this.server)
1900
- throw new Error('Server-only method called in client mode');
1901
-
1902
- const isBuffer = Buffer.isBuffer(data);
1903
-
1904
- if (!isBuffer && typeof data !== 'string')
1905
- throw new Error('data is not a Buffer or string');
1906
-
1907
- let isUTF8;
1908
- if (!isBuffer && !encoding) {
1909
- encoding = undefined;
1910
- isUTF8 = true;
1911
- }
1912
-
1913
- const dataLen = (
1914
- isBuffer
1915
- ? data.length
1916
- : Buffer.byteLength(data, encoding)
1917
- );
1918
- let p = 9;
1919
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + dataLen);
1920
-
1921
- writeUInt32BE(buf, buf.length - 4, 0);
1922
- buf[4] = RESPONSE.DATA;
1923
- writeUInt32BE(buf, reqid, 5);
1924
-
1925
- writeUInt32BE(buf, dataLen, p);
1926
- if (dataLen) {
1927
- if (isBuffer)
1928
- buf.set(data, p += 4);
1929
- else if (isUTF8)
1930
- buf.utf8Write(data, p += 4, dataLen);
1931
- else
1932
- buf.write(data, p += 4, dataLen, encoding);
1933
- }
1934
-
1935
- const isBuffered = sendOrBuffer(this, buf);
1936
- this._debug && this._debug(
1937
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} DATA`
1938
- );
1939
- }
1940
- name(reqid, names) {
1941
- if (!this.server)
1942
- throw new Error('Server-only method called in client mode');
1943
-
1944
- if (!Array.isArray(names)) {
1945
- if (typeof names !== 'object' || names === null)
1946
- throw new Error('names is not an object or array');
1947
- names = [ names ];
1948
- }
1949
-
1950
- const count = names.length;
1951
- let namesLen = 0;
1952
- let nameAttrs;
1953
- const attrs = [];
1954
-
1955
- for (let i = 0; i < count; ++i) {
1956
- const name = names[i];
1957
- const filename = (
1958
- !name || !name.filename || typeof name.filename !== 'string'
1959
- ? ''
1960
- : name.filename
1961
- );
1962
- namesLen += 4 + Buffer.byteLength(filename);
1963
- const longname = (
1964
- !name || !name.longname || typeof name.longname !== 'string'
1965
- ? ''
1966
- : name.longname
1967
- );
1968
- namesLen += 4 + Buffer.byteLength(longname);
1969
-
1970
- if (typeof name.attrs === 'object' && name.attrs !== null) {
1971
- nameAttrs = attrsToBytes(name.attrs);
1972
- namesLen += 4 + nameAttrs.nb;
1973
-
1974
- if (nameAttrs.nb) {
1975
- let bytes;
1976
-
1977
- if (nameAttrs.nb === ATTRS_BUF.length) {
1978
- bytes = new Uint8Array(ATTRS_BUF);
1979
- } else {
1980
- bytes = new Uint8Array(nameAttrs.nb);
1981
- bufferCopy(ATTRS_BUF, bytes, 0, nameAttrs.nb, 0);
1982
- }
1983
-
1984
- nameAttrs.bytes = bytes;
1985
- }
1986
-
1987
- attrs.push(nameAttrs);
1988
- } else {
1989
- namesLen += 4;
1990
- attrs.push(null);
1991
- }
1992
- }
1993
-
1994
- let p = 9;
1995
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + namesLen);
1996
-
1997
- writeUInt32BE(buf, buf.length - 4, 0);
1998
- buf[4] = RESPONSE.NAME;
1999
- writeUInt32BE(buf, reqid, 5);
2000
-
2001
- writeUInt32BE(buf, count, p);
2002
-
2003
- p += 4;
2004
-
2005
- for (let i = 0; i < count; ++i) {
2006
- const name = names[i];
2007
-
2008
- {
2009
- const filename = (
2010
- !name || !name.filename || typeof name.filename !== 'string'
2011
- ? ''
2012
- : name.filename
2013
- );
2014
- const len = Buffer.byteLength(filename);
2015
- writeUInt32BE(buf, len, p);
2016
- p += 4;
2017
- if (len) {
2018
- buf.utf8Write(filename, p, len);
2019
- p += len;
2020
- }
2021
- }
2022
-
2023
- {
2024
- const longname = (
2025
- !name || !name.longname || typeof name.longname !== 'string'
2026
- ? ''
2027
- : name.longname
2028
- );
2029
- const len = Buffer.byteLength(longname);
2030
- writeUInt32BE(buf, len, p);
2031
- p += 4;
2032
- if (len) {
2033
- buf.utf8Write(longname, p, len);
2034
- p += len;
2035
- }
2036
- }
2037
-
2038
- const attr = attrs[i];
2039
- if (attr) {
2040
- writeUInt32BE(buf, attr.flags, p);
2041
- p += 4;
2042
- if (attr.flags && attr.bytes) {
2043
- buf.set(attr.bytes, p);
2044
- p += attr.nb;
2045
- }
2046
- } else {
2047
- writeUInt32BE(buf, 0, p);
2048
- p += 4;
2049
- }
2050
- }
2051
-
2052
- const isBuffered = sendOrBuffer(this, buf);
2053
- this._debug && this._debug(
2054
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} NAME`
2055
- );
2056
- }
2057
- attrs(reqid, attrs) {
2058
- if (!this.server)
2059
- throw new Error('Server-only method called in client mode');
2060
-
2061
- if (typeof attrs !== 'object' || attrs === null)
2062
- throw new Error('attrs is not an object');
2063
-
2064
- attrs = attrsToBytes(attrs);
2065
- const flags = attrs.flags;
2066
- const attrsLen = attrs.nb;
2067
- let p = 9;
2068
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + attrsLen);
2069
-
2070
- writeUInt32BE(buf, buf.length - 4, 0);
2071
- buf[4] = RESPONSE.ATTRS;
2072
- writeUInt32BE(buf, reqid, 5);
2073
-
2074
- writeUInt32BE(buf, flags, p);
2075
- if (attrsLen) {
2076
- p += 4;
2077
-
2078
- if (attrsLen === ATTRS_BUF.length)
2079
- buf.set(ATTRS_BUF, p);
2080
- else
2081
- bufferCopy(ATTRS_BUF, buf, 0, attrsLen, p);
2082
-
2083
- p += attrsLen;
2084
- }
2085
-
2086
- const isBuffered = sendOrBuffer(this, buf);
2087
- this._debug && this._debug(
2088
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} ATTRS`
2089
- );
2090
- }
2091
- }
2092
-
2093
- function tryCreateBuffer(size) {
2094
- try {
2095
- return Buffer.allocUnsafe(size);
2096
- } catch (ex) {
2097
- return ex;
2098
- }
2099
- }
2100
-
2101
- function read_(self, handle, buf, off, len, position, cb, req_) {
2102
- const maxDataLen = self._maxReadLen;
2103
- const overflow = Math.max(len - maxDataLen, 0);
2104
-
2105
- if (overflow)
2106
- len = maxDataLen;
2107
-
2108
- /*
2109
- uint32 id
2110
- string handle
2111
- uint64 offset
2112
- uint32 len
2113
- */
2114
- const handleLen = handle.length;
2115
- let p = 9;
2116
- let pos = position;
2117
- const out = Buffer.allocUnsafe(4 + 1 + 4 + 4 + handleLen + 8 + 4);
2118
-
2119
- writeUInt32BE(out, out.length - 4, 0);
2120
- out[4] = REQUEST.READ;
2121
- const reqid = self._writeReqid = (self._writeReqid + 1) & MAX_REQID;
2122
- writeUInt32BE(out, reqid, 5);
2123
-
2124
- writeUInt32BE(out, handleLen, p);
2125
- out.set(handle, p += 4);
2126
- p += handleLen;
2127
- for (let i = 7; i >= 0; --i) {
2128
- out[p + i] = pos & 0xFF;
2129
- pos /= 256;
2130
- }
2131
- writeUInt32BE(out, len, p += 8);
2132
-
2133
- if (typeof cb !== 'function')
2134
- cb = noop;
2135
-
2136
- const req = (req_ || {
2137
- nb: 0,
2138
- position,
2139
- off,
2140
- origOff: off,
2141
- len: undefined,
2142
- overflow: undefined,
2143
- cb: (err, data, nb) => {
2144
- const len = req.len;
2145
- const overflow = req.overflow;
2146
-
2147
- if (err) {
2148
- if (cb._wantEOFError || err.code !== STATUS_CODE.EOF)
2149
- return cb(err);
2150
- } else if (nb > len) {
2151
- return cb(new Error('Received more data than requested'));
2152
- } else if (nb === len && overflow) {
2153
- req.nb += nb;
2154
- req.position += nb;
2155
- req.off += nb;
2156
- read_(self, handle, buf, req.off, overflow, req.position, cb, req);
2157
- return;
2158
- }
2159
-
2160
- nb = (nb || 0);
2161
- if (req.origOff === 0 && buf.length === req.nb)
2162
- data = buf;
2163
- else
2164
- data = bufferSlice(buf, req.origOff, req.origOff + req.nb + nb);
2165
- cb(undefined, req.nb + nb, data, req.position);
2166
- },
2167
- buffer: undefined,
2168
- });
2169
-
2170
- req.len = len;
2171
- req.overflow = overflow;
2172
-
2173
- // TODO: avoid creating multiple buffer slices when we need to re-call read_()
2174
- // because of overflow
2175
- req.buffer = bufferSlice(buf, off, off + len);
2176
-
2177
- self._requests[reqid] = req;
2178
-
2179
- const isBuffered = sendOrBuffer(self, out);
2180
- self._debug && self._debug(
2181
- `SFTP: Outbound: ${isBuffered ? 'Buffered' : 'Sending'} READ`
2182
- );
2183
- }
2184
-
2185
- function fastXfer(src, dst, srcPath, dstPath, opts, cb) {
2186
- let concurrency = 64;
2187
- let chunkSize = 32768;
2188
- let onstep;
2189
- let mode;
2190
- let fileSize;
2191
-
2192
- if (typeof opts === 'function') {
2193
- cb = opts;
2194
- } else if (typeof opts === 'object' && opts !== null) {
2195
- if (typeof opts.concurrency === 'number'
2196
- && opts.concurrency > 0
2197
- && !isNaN(opts.concurrency)) {
2198
- concurrency = opts.concurrency;
2199
- }
2200
- if (typeof opts.chunkSize === 'number'
2201
- && opts.chunkSize > 0
2202
- && !isNaN(opts.chunkSize)) {
2203
- chunkSize = opts.chunkSize;
2204
- }
2205
- if (typeof opts.fileSize === 'number'
2206
- && opts.fileSize > 0
2207
- && !isNaN(opts.fileSize)) {
2208
- fileSize = opts.fileSize;
2209
- }
2210
- if (typeof opts.step === 'function')
2211
- onstep = opts.step;
2212
-
2213
- if (typeof opts.mode === 'string' || typeof opts.mode === 'number')
2214
- mode = modeNum(opts.mode);
2215
- }
2216
-
2217
- // Internal state variables
2218
- let fsize;
2219
- let pdst = 0;
2220
- let total = 0;
2221
- let hadError = false;
2222
- let srcHandle;
2223
- let dstHandle;
2224
- let readbuf;
2225
- let bufsize = chunkSize * concurrency;
2226
-
2227
- function onerror(err) {
2228
- if (hadError)
2229
- return;
2230
-
2231
- hadError = true;
2232
-
2233
- let left = 0;
2234
- let cbfinal;
2235
-
2236
- if (srcHandle || dstHandle) {
2237
- cbfinal = () => {
2238
- if (--left === 0)
2239
- cb(err);
2240
- };
2241
- if (srcHandle && (src === fs || src.outgoing.state === 'open'))
2242
- ++left;
2243
- if (dstHandle && (dst === fs || dst.outgoing.state === 'open'))
2244
- ++left;
2245
- if (srcHandle && (src === fs || src.outgoing.state === 'open'))
2246
- src.close(srcHandle, cbfinal);
2247
- if (dstHandle && (dst === fs || dst.outgoing.state === 'open'))
2248
- dst.close(dstHandle, cbfinal);
2249
- } else {
2250
- cb(err);
2251
- }
2252
- }
2253
-
2254
- src.open(srcPath, 'r', (err, sourceHandle) => {
2255
- if (err)
2256
- return onerror(err);
2257
-
2258
- srcHandle = sourceHandle;
2259
-
2260
- if (fileSize === undefined)
2261
- src.fstat(srcHandle, tryStat);
2262
- else
2263
- tryStat(null, { size: fileSize });
2264
-
2265
- function tryStat(err, attrs) {
2266
- if (err) {
2267
- if (src !== fs) {
2268
- // Try stat() for sftp servers that may not support fstat() for
2269
- // whatever reason
2270
- src.stat(srcPath, (err_, attrs_) => {
2271
- if (err_)
2272
- return onerror(err);
2273
- tryStat(null, attrs_);
2274
- });
2275
- return;
2276
- }
2277
- return onerror(err);
2278
- }
2279
- fsize = attrs.size;
2280
-
2281
- dst.open(dstPath, 'w', (err, destHandle) => {
2282
- if (err)
2283
- return onerror(err);
2284
-
2285
- dstHandle = destHandle;
2286
-
2287
- if (fsize <= 0)
2288
- return onerror();
2289
-
2290
- // Use less memory where possible
2291
- while (bufsize > fsize) {
2292
- if (concurrency === 1) {
2293
- bufsize = fsize;
2294
- break;
2295
- }
2296
- bufsize -= chunkSize;
2297
- --concurrency;
2298
- }
2299
-
2300
- readbuf = tryCreateBuffer(bufsize);
2301
- if (readbuf instanceof Error)
2302
- return onerror(readbuf);
2303
-
2304
- if (mode !== undefined) {
2305
- dst.fchmod(dstHandle, mode, function tryAgain(err) {
2306
- if (err) {
2307
- // Try chmod() for sftp servers that may not support fchmod()
2308
- // for whatever reason
2309
- dst.chmod(dstPath, mode, (err_) => tryAgain());
2310
- return;
2311
- }
2312
- startReads();
2313
- });
2314
- } else {
2315
- startReads();
2316
- }
2317
-
2318
- function onread(err, nb, data, dstpos, datapos, origChunkLen) {
2319
- if (err)
2320
- return onerror(err);
2321
-
2322
- datapos = datapos || 0;
2323
-
2324
- dst.write(dstHandle, readbuf, datapos, nb, dstpos, writeCb);
2325
-
2326
- function writeCb(err) {
2327
- if (err)
2328
- return onerror(err);
2329
-
2330
- total += nb;
2331
- onstep && onstep(total, nb, fsize);
2332
-
2333
- if (nb < origChunkLen)
2334
- return singleRead(datapos, dstpos + nb, origChunkLen - nb);
2335
-
2336
- if (total === fsize) {
2337
- dst.close(dstHandle, (err) => {
2338
- dstHandle = undefined;
2339
- if (err)
2340
- return onerror(err);
2341
- src.close(srcHandle, (err) => {
2342
- srcHandle = undefined;
2343
- if (err)
2344
- return onerror(err);
2345
- cb();
2346
- });
2347
- });
2348
- return;
2349
- }
2350
-
2351
- if (pdst >= fsize)
2352
- return;
2353
-
2354
- const chunk =
2355
- (pdst + chunkSize > fsize ? fsize - pdst : chunkSize);
2356
- singleRead(datapos, pdst, chunk);
2357
- pdst += chunk;
2358
- }
2359
- }
2360
-
2361
- function makeCb(psrc, pdst, chunk) {
2362
- return (err, nb, data) => {
2363
- onread(err, nb, data, pdst, psrc, chunk);
2364
- };
2365
- }
2366
-
2367
- function singleRead(psrc, pdst, chunk) {
2368
- src.read(srcHandle,
2369
- readbuf,
2370
- psrc,
2371
- chunk,
2372
- pdst,
2373
- makeCb(psrc, pdst, chunk));
2374
- }
2375
-
2376
- function startReads() {
2377
- let reads = 0;
2378
- let psrc = 0;
2379
- while (pdst < fsize && reads < concurrency) {
2380
- const chunk =
2381
- (pdst + chunkSize > fsize ? fsize - pdst : chunkSize);
2382
- singleRead(psrc, pdst, chunk);
2383
- psrc += chunk;
2384
- pdst += chunk;
2385
- ++reads;
2386
- }
2387
- }
2388
- });
2389
- }
2390
- });
2391
- }
2392
-
2393
- function writeAll(sftp, handle, buffer, offset, length, position, callback_) {
2394
- const callback = (typeof callback_ === 'function' ? callback_ : undefined);
2395
-
2396
- sftp.write(handle,
2397
- buffer,
2398
- offset,
2399
- length,
2400
- position,
2401
- (writeErr, written) => {
2402
- if (writeErr) {
2403
- return sftp.close(handle, () => {
2404
- callback && callback(writeErr);
2405
- });
2406
- }
2407
- if (written === length) {
2408
- sftp.close(handle, callback);
2409
- } else {
2410
- offset += written;
2411
- length -= written;
2412
- position += written;
2413
- writeAll(sftp, handle, buffer, offset, length, position, callback);
2414
- }
2415
- });
2416
- }
2417
-
2418
- class Stats {
2419
- constructor(initial) {
2420
- this.mode = (initial && initial.mode);
2421
- this.uid = (initial && initial.uid);
2422
- this.gid = (initial && initial.gid);
2423
- this.size = (initial && initial.size);
2424
- this.atime = (initial && initial.atime);
2425
- this.mtime = (initial && initial.mtime);
2426
- this.extended = (initial && initial.extended);
2427
- }
2428
- isDirectory() {
2429
- return ((this.mode & constants.S_IFMT) === constants.S_IFDIR);
2430
- }
2431
- isFile() {
2432
- return ((this.mode & constants.S_IFMT) === constants.S_IFREG);
2433
- }
2434
- isBlockDevice() {
2435
- return ((this.mode & constants.S_IFMT) === constants.S_IFBLK);
2436
- }
2437
- isCharacterDevice() {
2438
- return ((this.mode & constants.S_IFMT) === constants.S_IFCHR);
2439
- }
2440
- isSymbolicLink() {
2441
- return ((this.mode & constants.S_IFMT) === constants.S_IFLNK);
2442
- }
2443
- isFIFO() {
2444
- return ((this.mode & constants.S_IFMT) === constants.S_IFIFO);
2445
- }
2446
- isSocket() {
2447
- return ((this.mode & constants.S_IFMT) === constants.S_IFSOCK);
2448
- }
2449
- }
2450
-
2451
- function attrsToBytes(attrs) {
2452
- let flags = 0;
2453
- let nb = 0;
2454
-
2455
- if (typeof attrs === 'object' && attrs !== null) {
2456
- if (typeof attrs.size === 'number') {
2457
- flags |= ATTR.SIZE;
2458
- const val = attrs.size;
2459
- // Big Endian
2460
- ATTRS_BUF[nb++] = val / 72057594037927940; // 2**56
2461
- ATTRS_BUF[nb++] = val / 281474976710656; // 2**48
2462
- ATTRS_BUF[nb++] = val / 1099511627776; // 2**40
2463
- ATTRS_BUF[nb++] = val / 4294967296; // 2**32
2464
- ATTRS_BUF[nb++] = val / 16777216; // 2**24
2465
- ATTRS_BUF[nb++] = val / 65536; // 2**16
2466
- ATTRS_BUF[nb++] = val / 256; // 2**8
2467
- ATTRS_BUF[nb++] = val;
2468
- }
2469
- if (typeof attrs.uid === 'number' && typeof attrs.gid === 'number') {
2470
- flags |= ATTR.UIDGID;
2471
- const uid = attrs.uid;
2472
- const gid = attrs.gid;
2473
- // Big Endian
2474
- ATTRS_BUF[nb++] = uid >>> 24;
2475
- ATTRS_BUF[nb++] = uid >>> 16;
2476
- ATTRS_BUF[nb++] = uid >>> 8;
2477
- ATTRS_BUF[nb++] = uid;
2478
- ATTRS_BUF[nb++] = gid >>> 24;
2479
- ATTRS_BUF[nb++] = gid >>> 16;
2480
- ATTRS_BUF[nb++] = gid >>> 8;
2481
- ATTRS_BUF[nb++] = gid;
2482
- }
2483
- if (typeof attrs.mode === 'number' || typeof attrs.mode === 'string') {
2484
- const mode = modeNum(attrs.mode);
2485
- flags |= ATTR.PERMISSIONS;
2486
- // Big Endian
2487
- ATTRS_BUF[nb++] = mode >>> 24;
2488
- ATTRS_BUF[nb++] = mode >>> 16;
2489
- ATTRS_BUF[nb++] = mode >>> 8;
2490
- ATTRS_BUF[nb++] = mode;
2491
- }
2492
- if ((typeof attrs.atime === 'number' || isDate(attrs.atime))
2493
- && (typeof attrs.mtime === 'number' || isDate(attrs.mtime))) {
2494
- const atime = toUnixTimestamp(attrs.atime);
2495
- const mtime = toUnixTimestamp(attrs.mtime);
2496
-
2497
- flags |= ATTR.ACMODTIME;
2498
- // Big Endian
2499
- ATTRS_BUF[nb++] = atime >>> 24;
2500
- ATTRS_BUF[nb++] = atime >>> 16;
2501
- ATTRS_BUF[nb++] = atime >>> 8;
2502
- ATTRS_BUF[nb++] = atime;
2503
- ATTRS_BUF[nb++] = mtime >>> 24;
2504
- ATTRS_BUF[nb++] = mtime >>> 16;
2505
- ATTRS_BUF[nb++] = mtime >>> 8;
2506
- ATTRS_BUF[nb++] = mtime;
2507
- }
2508
- // TODO: extended attributes
2509
- }
2510
-
2511
- return { flags, nb };
2512
- }
2513
-
2514
- function toUnixTimestamp(time) {
2515
- // eslint-disable-next-line no-self-compare
2516
- if (typeof time === 'number' && time === time) // Valid, non-NaN number
2517
- return time;
2518
- if (isDate(time))
2519
- return parseInt(time.getTime() / 1000, 10);
2520
- throw new Error(`Cannot parse time: ${time}`);
2521
- }
2522
-
2523
- function modeNum(mode) {
2524
- // eslint-disable-next-line no-self-compare
2525
- if (typeof mode === 'number' && mode === mode) // Valid, non-NaN number
2526
- return mode;
2527
- if (typeof mode === 'string')
2528
- return modeNum(parseInt(mode, 8));
2529
- throw new Error(`Cannot parse mode: ${mode}`);
2530
- }
2531
-
2532
- const stringFlagMap = {
2533
- 'r': OPEN_MODE.READ,
2534
- 'r+': OPEN_MODE.READ | OPEN_MODE.WRITE,
2535
- 'w': OPEN_MODE.TRUNC | OPEN_MODE.CREAT | OPEN_MODE.WRITE,
2536
- 'wx': OPEN_MODE.TRUNC | OPEN_MODE.CREAT | OPEN_MODE.WRITE | OPEN_MODE.EXCL,
2537
- 'xw': OPEN_MODE.TRUNC | OPEN_MODE.CREAT | OPEN_MODE.WRITE | OPEN_MODE.EXCL,
2538
- 'w+': OPEN_MODE.TRUNC | OPEN_MODE.CREAT | OPEN_MODE.READ | OPEN_MODE.WRITE,
2539
- 'wx+': OPEN_MODE.TRUNC | OPEN_MODE.CREAT | OPEN_MODE.READ | OPEN_MODE.WRITE
2540
- | OPEN_MODE.EXCL,
2541
- 'xw+': OPEN_MODE.TRUNC | OPEN_MODE.CREAT | OPEN_MODE.READ | OPEN_MODE.WRITE
2542
- | OPEN_MODE.EXCL,
2543
- 'a': OPEN_MODE.APPEND | OPEN_MODE.CREAT | OPEN_MODE.WRITE,
2544
- 'ax': OPEN_MODE.APPEND | OPEN_MODE.CREAT | OPEN_MODE.WRITE | OPEN_MODE.EXCL,
2545
- 'xa': OPEN_MODE.APPEND | OPEN_MODE.CREAT | OPEN_MODE.WRITE | OPEN_MODE.EXCL,
2546
- 'a+': OPEN_MODE.APPEND | OPEN_MODE.CREAT | OPEN_MODE.READ | OPEN_MODE.WRITE,
2547
- 'ax+': OPEN_MODE.APPEND | OPEN_MODE.CREAT | OPEN_MODE.READ | OPEN_MODE.WRITE
2548
- | OPEN_MODE.EXCL,
2549
- 'xa+': OPEN_MODE.APPEND | OPEN_MODE.CREAT | OPEN_MODE.READ | OPEN_MODE.WRITE
2550
- | OPEN_MODE.EXCL
2551
- };
2552
-
2553
- function stringToFlags(str) {
2554
- const flags = stringFlagMap[str];
2555
- return (flags !== undefined ? flags : null);
2556
- }
2557
-
2558
- const flagsToString = (() => {
2559
- const stringFlagMapKeys = Object.keys(stringFlagMap);
2560
- return (flags) => {
2561
- for (let i = 0; i < stringFlagMapKeys.length; ++i) {
2562
- const key = stringFlagMapKeys[i];
2563
- if (stringFlagMap[key] === flags)
2564
- return key;
2565
- }
2566
- return null;
2567
- };
2568
- })();
2569
-
2570
- function readAttrs(biOpt) {
2571
- /*
2572
- uint32 flags
2573
- uint64 size present only if flag SSH_FILEXFER_ATTR_SIZE
2574
- uint32 uid present only if flag SSH_FILEXFER_ATTR_UIDGID
2575
- uint32 gid present only if flag SSH_FILEXFER_ATTR_UIDGID
2576
- uint32 permissions present only if flag SSH_FILEXFER_ATTR_PERMISSIONS
2577
- uint32 atime present only if flag SSH_FILEXFER_ACMODTIME
2578
- uint32 mtime present only if flag SSH_FILEXFER_ACMODTIME
2579
- uint32 extended_count present only if flag SSH_FILEXFER_ATTR_EXTENDED
2580
- string extended_type
2581
- string extended_data
2582
- ... more extended data (extended_type - extended_data pairs),
2583
- so that number of pairs equals extended_count
2584
- */
2585
- const flags = bufferParser.readUInt32BE();
2586
- if (flags === undefined)
2587
- return;
2588
-
2589
- const attrs = new Stats();
2590
- if (flags & ATTR.SIZE) {
2591
- const size = bufferParser.readUInt64BE(biOpt);
2592
- if (size === undefined)
2593
- return;
2594
- attrs.size = size;
2595
- }
2596
-
2597
- if (flags & ATTR.UIDGID) {
2598
- const uid = bufferParser.readUInt32BE();
2599
- const gid = bufferParser.readUInt32BE();
2600
- if (gid === undefined)
2601
- return;
2602
- attrs.uid = uid;
2603
- attrs.gid = gid;
2604
- }
2605
-
2606
- if (flags & ATTR.PERMISSIONS) {
2607
- const mode = bufferParser.readUInt32BE();
2608
- if (mode === undefined)
2609
- return;
2610
- attrs.mode = mode;
2611
- }
2612
-
2613
- if (flags & ATTR.ACMODTIME) {
2614
- const atime = bufferParser.readUInt32BE();
2615
- const mtime = bufferParser.readUInt32BE();
2616
- if (mtime === undefined)
2617
- return;
2618
- attrs.atime = atime;
2619
- attrs.mtime = mtime;
2620
- }
2621
-
2622
- if (flags & ATTR.EXTENDED) {
2623
- const count = bufferParser.readUInt32BE();
2624
- if (count === undefined)
2625
- return;
2626
- const extended = {};
2627
- for (let i = 0; i < count; ++i) {
2628
- const type = bufferParser.readString(true);
2629
- const data = bufferParser.readString();
2630
- if (data === undefined)
2631
- return;
2632
- extended[type] = data;
2633
- }
2634
- attrs.extended = extended;
2635
- }
2636
-
2637
- return attrs;
2638
- }
2639
-
2640
- function sendOrBuffer(sftp, payload) {
2641
- const ret = tryWritePayload(sftp, payload);
2642
- if (ret !== undefined) {
2643
- sftp._buffer.push(ret);
2644
- return false;
2645
- }
2646
- return true;
2647
- }
2648
-
2649
- function tryWritePayload(sftp, payload) {
2650
- const outgoing = sftp.outgoing;
2651
- if (outgoing.state !== 'open')
2652
- return;
2653
-
2654
- if (outgoing.window === 0) {
2655
- sftp._waitWindow = true;
2656
- sftp._chunkcb = drainBuffer;
2657
- return payload;
2658
- }
2659
-
2660
- let ret;
2661
- const len = payload.length;
2662
- let p = 0;
2663
-
2664
- while (len - p > 0 && outgoing.window > 0) {
2665
- const actualLen = Math.min(len - p, outgoing.window, outgoing.packetSize);
2666
- outgoing.window -= actualLen;
2667
- if (outgoing.window === 0) {
2668
- sftp._waitWindow = true;
2669
- sftp._chunkcb = drainBuffer;
2670
- }
2671
-
2672
- if (p === 0 && actualLen === len) {
2673
- sftp._protocol.channelData(sftp.outgoing.id, payload);
2674
- } else {
2675
- sftp._protocol.channelData(sftp.outgoing.id,
2676
- bufferSlice(payload, p, p + actualLen));
2677
- }
2678
-
2679
- p += actualLen;
2680
- }
2681
-
2682
- if (len - p > 0) {
2683
- if (p > 0)
2684
- ret = bufferSlice(payload, p, len);
2685
- else
2686
- ret = payload; // XXX: should never get here?
2687
- }
2688
-
2689
- return ret;
2690
- }
2691
-
2692
- function drainBuffer() {
2693
- this._chunkcb = undefined;
2694
- const buffer = this._buffer;
2695
- let i = 0;
2696
- while (i < buffer.length) {
2697
- const payload = buffer[i];
2698
- const ret = tryWritePayload(this, payload);
2699
- if (ret !== undefined) {
2700
- if (ret !== payload)
2701
- buffer[i] = ret;
2702
- if (i > 0)
2703
- this._buffer = buffer.slice(i);
2704
- return;
2705
- }
2706
- ++i;
2707
- }
2708
- if (i > 0)
2709
- this._buffer = [];
2710
- }
2711
-
2712
- function doFatalSFTPError(sftp, msg, noDebug) {
2713
- const err = new Error(msg);
2714
- err.level = 'sftp-protocol';
2715
- if (!noDebug && sftp._debug)
2716
- sftp._debug(`SFTP: Inbound: ${msg}`);
2717
- sftp.emit('error', err);
2718
- sftp.destroy();
2719
- cleanupRequests(sftp);
2720
- return false;
2721
- }
2722
-
2723
- function cleanupRequests(sftp) {
2724
- const keys = Object.keys(sftp._requests);
2725
- if (keys.length === 0)
2726
- return;
2727
-
2728
- const reqs = sftp._requests;
2729
- sftp._requests = {};
2730
- const err = new Error('No response from server');
2731
- for (let i = 0; i < keys.length; ++i) {
2732
- const req = reqs[keys[i]];
2733
- if (typeof req.cb === 'function')
2734
- req.cb(err);
2735
- }
2736
- }
2737
-
2738
- function requestLimits(sftp, cb) {
2739
- /*
2740
- uint32 id
2741
- string "limits@openssh.com"
2742
- */
2743
- let p = 9;
2744
- const buf = Buffer.allocUnsafe(4 + 1 + 4 + 4 + 18);
2745
-
2746
- writeUInt32BE(buf, buf.length - 4, 0);
2747
- buf[4] = REQUEST.EXTENDED;
2748
- const reqid = sftp._writeReqid = (sftp._writeReqid + 1) & MAX_REQID;
2749
- writeUInt32BE(buf, reqid, 5);
2750
-
2751
- writeUInt32BE(buf, 18, p);
2752
- buf.utf8Write('limits@openssh.com', p += 4, 18);
2753
-
2754
- sftp._requests[reqid] = { extended: 'limits@openssh.com', cb };
2755
-
2756
- const isBuffered = sendOrBuffer(sftp, buf);
2757
- if (sftp._debug) {
2758
- const which = (isBuffered ? 'Buffered' : 'Sending');
2759
- sftp._debug(`SFTP: Outbound: ${which} limits@openssh.com`);
2760
- }
2761
- }
2762
-
2763
- const CLIENT_HANDLERS = {
2764
- [RESPONSE.VERSION]: (sftp, payload) => {
2765
- if (sftp._version !== -1)
2766
- return doFatalSFTPError(sftp, 'Duplicate VERSION packet');
2767
-
2768
- const extensions = {};
2769
-
2770
- /*
2771
- uint32 version
2772
- <extension data>
2773
- */
2774
- bufferParser.init(payload, 1);
2775
- let version = bufferParser.readUInt32BE();
2776
- while (bufferParser.avail()) {
2777
- const extName = bufferParser.readString(true);
2778
- const extData = bufferParser.readString(true);
2779
- if (extData === undefined) {
2780
- version = undefined;
2781
- break;
2782
- }
2783
- extensions[extName] = extData;
2784
- }
2785
- bufferParser.clear();
2786
-
2787
- if (version === undefined)
2788
- return doFatalSFTPError(sftp, 'Malformed VERSION packet');
2789
-
2790
- if (sftp._debug) {
2791
- const names = Object.keys(extensions);
2792
- if (names.length) {
2793
- sftp._debug(
2794
- `SFTP: Inbound: Received VERSION (v${version}, exts:${names})`
2795
- );
2796
- } else {
2797
- sftp._debug(`SFTP: Inbound: Received VERSION (v${version})`);
2798
- }
2799
- }
2800
-
2801
- sftp._version = version;
2802
- sftp._extensions = extensions;
2803
-
2804
- if (extensions['limits@openssh.com'] === '1') {
2805
- return requestLimits(sftp, (err, limits) => {
2806
- if (!err) {
2807
- if (limits.maxPktLen > 0)
2808
- sftp._maxOutPktLen = limits.maxPktLen;
2809
- if (limits.maxReadLen > 0)
2810
- sftp._maxReadLen = limits.maxReadLen;
2811
- if (limits.maxWriteLen > 0)
2812
- sftp._maxWriteLen = limits.maxWriteLen;
2813
- sftp.maxOpenHandles = (
2814
- limits.maxOpenHandles > 0 ? limits.maxOpenHandles : Infinity
2815
- );
2816
- }
2817
- sftp.emit('ready');
2818
- });
2819
- }
2820
-
2821
- sftp.emit('ready');
2822
- },
2823
- [RESPONSE.STATUS]: (sftp, payload) => {
2824
- bufferParser.init(payload, 1);
2825
- const reqID = bufferParser.readUInt32BE();
2826
- /*
2827
- uint32 error/status code
2828
- string error message (ISO-10646 UTF-8)
2829
- string language tag
2830
- */
2831
- const errorCode = bufferParser.readUInt32BE();
2832
- const errorMsg = bufferParser.readString(true);
2833
- bufferParser.clear();
2834
-
2835
- // Note: we avoid checking that the error message and language tag are in
2836
- // the packet because there are some broken implementations that incorrectly
2837
- // omit them. The language tag in general was never really used amongst ssh
2838
- // implementations, so in the case of a missing error message we just
2839
- // default to something sensible.
2840
-
2841
- if (sftp._debug) {
2842
- const jsonMsg = JSON.stringify(errorMsg);
2843
- sftp._debug(
2844
- `SFTP: Inbound: Received STATUS (id:${reqID}, ${errorCode}, ${jsonMsg})`
2845
- );
2846
- }
2847
- const req = sftp._requests[reqID];
2848
- delete sftp._requests[reqID];
2849
- if (req && typeof req.cb === 'function') {
2850
- if (errorCode === STATUS_CODE.OK) {
2851
- req.cb();
2852
- return;
2853
- }
2854
- const err = new Error(errorMsg
2855
- || STATUS_CODE_STR[errorCode]
2856
- || 'Unknown status');
2857
- err.code = errorCode;
2858
- req.cb(err);
2859
- }
2860
- },
2861
- [RESPONSE.HANDLE]: (sftp, payload) => {
2862
- bufferParser.init(payload, 1);
2863
- const reqID = bufferParser.readUInt32BE();
2864
- /*
2865
- string handle
2866
- */
2867
- const handle = bufferParser.readString();
2868
- bufferParser.clear();
2869
-
2870
- if (handle === undefined) {
2871
- if (reqID !== undefined)
2872
- delete sftp._requests[reqID];
2873
- return doFatalSFTPError(sftp, 'Malformed HANDLE packet');
2874
- }
2875
-
2876
- sftp._debug && sftp._debug(`SFTP: Inbound: Received HANDLE (id:${reqID})`);
2877
-
2878
- const req = sftp._requests[reqID];
2879
- delete sftp._requests[reqID];
2880
- if (req && typeof req.cb === 'function')
2881
- req.cb(undefined, handle);
2882
- },
2883
- [RESPONSE.DATA]: (sftp, payload) => {
2884
- bufferParser.init(payload, 1);
2885
- const reqID = bufferParser.readUInt32BE();
2886
- let req;
2887
- if (reqID !== undefined) {
2888
- req = sftp._requests[reqID];
2889
- delete sftp._requests[reqID];
2890
- }
2891
- /*
2892
- string data
2893
- */
2894
- if (req && typeof req.cb === 'function') {
2895
- if (req.buffer) {
2896
- // We have already pre-allocated space to store the data
2897
-
2898
- const nb = bufferParser.readString(req.buffer);
2899
- bufferParser.clear();
2900
-
2901
- if (nb !== undefined) {
2902
- sftp._debug && sftp._debug(
2903
- `SFTP: Inbound: Received DATA (id:${reqID}, ${nb})`
2904
- );
2905
- req.cb(undefined, req.buffer, nb);
2906
- return;
2907
- }
2908
- } else {
2909
- const data = bufferParser.readString();
2910
- bufferParser.clear();
2911
-
2912
- if (data !== undefined) {
2913
- sftp._debug && sftp._debug(
2914
- `SFTP: Inbound: Received DATA (id:${reqID}, ${data.length})`
2915
- );
2916
- req.cb(undefined, data);
2917
- return;
2918
- }
2919
- }
2920
- } else {
2921
- const nb = bufferParser.skipString();
2922
- bufferParser.clear();
2923
- if (nb !== undefined) {
2924
- sftp._debug && sftp._debug(
2925
- `SFTP: Inbound: Received DATA (id:${reqID}, ${nb})`
2926
- );
2927
- return;
2928
- }
2929
- }
2930
-
2931
- return doFatalSFTPError(sftp, 'Malformed DATA packet');
2932
- },
2933
- [RESPONSE.NAME]: (sftp, payload) => {
2934
- bufferParser.init(payload, 1);
2935
- const reqID = bufferParser.readUInt32BE();
2936
- let req;
2937
- if (reqID !== undefined) {
2938
- req = sftp._requests[reqID];
2939
- delete sftp._requests[reqID];
2940
- }
2941
- /*
2942
- uint32 count
2943
- repeats count times:
2944
- string filename
2945
- string longname
2946
- ATTRS attrs
2947
- */
2948
- const count = bufferParser.readUInt32BE();
2949
- if (count !== undefined) {
2950
- let names = [];
2951
- for (let i = 0; i < count; ++i) {
2952
- // We are going to assume UTF-8 for filenames despite the SFTPv3
2953
- // spec not specifying an encoding because the specs for newer
2954
- // versions of the protocol all explicitly specify UTF-8 for
2955
- // filenames
2956
- const filename = bufferParser.readString(true);
2957
-
2958
- // `longname` only exists in SFTPv3 and since it typically will
2959
- // contain the filename, we assume it is also UTF-8
2960
- const longname = bufferParser.readString(true);
2961
-
2962
- const attrs = readAttrs(sftp._biOpt);
2963
- if (attrs === undefined) {
2964
- names = undefined;
2965
- break;
2966
- }
2967
- names.push({ filename, longname, attrs });
2968
- }
2969
- if (names !== undefined) {
2970
- sftp._debug && sftp._debug(
2971
- `SFTP: Inbound: Received NAME (id:${reqID}, ${names.length})`
2972
- );
2973
- bufferParser.clear();
2974
- if (req && typeof req.cb === 'function')
2975
- req.cb(undefined, names);
2976
- return;
2977
- }
2978
- }
2979
-
2980
- bufferParser.clear();
2981
- return doFatalSFTPError(sftp, 'Malformed NAME packet');
2982
- },
2983
- [RESPONSE.ATTRS]: (sftp, payload) => {
2984
- bufferParser.init(payload, 1);
2985
- const reqID = bufferParser.readUInt32BE();
2986
- let req;
2987
- if (reqID !== undefined) {
2988
- req = sftp._requests[reqID];
2989
- delete sftp._requests[reqID];
2990
- }
2991
- /*
2992
- ATTRS attrs
2993
- */
2994
- const attrs = readAttrs(sftp._biOpt);
2995
- bufferParser.clear();
2996
- if (attrs !== undefined) {
2997
- sftp._debug && sftp._debug(`SFTP: Inbound: Received ATTRS (id:${reqID})`);
2998
- if (req && typeof req.cb === 'function')
2999
- req.cb(undefined, attrs);
3000
- return;
3001
- }
3002
-
3003
- return doFatalSFTPError(sftp, 'Malformed ATTRS packet');
3004
- },
3005
- [RESPONSE.EXTENDED]: (sftp, payload) => {
3006
- bufferParser.init(payload, 1);
3007
- const reqID = bufferParser.readUInt32BE();
3008
- if (reqID !== undefined) {
3009
- const req = sftp._requests[reqID];
3010
- if (req) {
3011
- delete sftp._requests[reqID];
3012
- switch (req.extended) {
3013
- case 'statvfs@openssh.com':
3014
- case 'fstatvfs@openssh.com': {
3015
- /*
3016
- uint64 f_bsize // file system block size
3017
- uint64 f_frsize // fundamental fs block size
3018
- uint64 f_blocks // number of blocks (unit f_frsize)
3019
- uint64 f_bfree // free blocks in file system
3020
- uint64 f_bavail // free blocks for non-root
3021
- uint64 f_files // total file inodes
3022
- uint64 f_ffree // free file inodes
3023
- uint64 f_favail // free file inodes for to non-root
3024
- uint64 f_fsid // file system id
3025
- uint64 f_flag // bit mask of f_flag values
3026
- uint64 f_namemax // maximum filename length
3027
- */
3028
- const biOpt = sftp._biOpt;
3029
- const stats = {
3030
- f_bsize: bufferParser.readUInt64BE(biOpt),
3031
- f_frsize: bufferParser.readUInt64BE(biOpt),
3032
- f_blocks: bufferParser.readUInt64BE(biOpt),
3033
- f_bfree: bufferParser.readUInt64BE(biOpt),
3034
- f_bavail: bufferParser.readUInt64BE(biOpt),
3035
- f_files: bufferParser.readUInt64BE(biOpt),
3036
- f_ffree: bufferParser.readUInt64BE(biOpt),
3037
- f_favail: bufferParser.readUInt64BE(biOpt),
3038
- f_sid: bufferParser.readUInt64BE(biOpt),
3039
- f_flag: bufferParser.readUInt64BE(biOpt),
3040
- f_namemax: bufferParser.readUInt64BE(biOpt),
3041
- };
3042
- if (stats.f_namemax === undefined)
3043
- break;
3044
- if (sftp._debug) {
3045
- sftp._debug(
3046
- 'SFTP: Inbound: Received EXTENDED_REPLY '
3047
- + `(id:${reqID}, ${req.extended})`
3048
- );
3049
- }
3050
- bufferParser.clear();
3051
- if (typeof req.cb === 'function')
3052
- req.cb(undefined, stats);
3053
- return;
3054
- }
3055
- case 'limits@openssh.com': {
3056
- /*
3057
- uint64 max-packet-length
3058
- uint64 max-read-length
3059
- uint64 max-write-length
3060
- uint64 max-open-handles
3061
- */
3062
- const limits = {
3063
- maxPktLen: bufferParser.readUInt64BE(),
3064
- maxReadLen: bufferParser.readUInt64BE(),
3065
- maxWriteLen: bufferParser.readUInt64BE(),
3066
- maxOpenHandles: bufferParser.readUInt64BE(),
3067
- };
3068
- if (limits.maxOpenHandles === undefined)
3069
- break;
3070
- if (sftp._debug) {
3071
- sftp._debug(
3072
- 'SFTP: Inbound: Received EXTENDED_REPLY '
3073
- + `(id:${reqID}, ${req.extended})`
3074
- );
3075
- }
3076
- bufferParser.clear();
3077
- if (typeof req.cb === 'function')
3078
- req.cb(undefined, limits);
3079
- return;
3080
- }
3081
- case 'users-groups-by-id@openssh.com': {
3082
- /*
3083
- string usernames
3084
- string username1
3085
- ...
3086
- string groupnames
3087
- string groupname1
3088
- ...
3089
- */
3090
- const usernameCount = bufferParser.readUInt32BE();
3091
- if (usernameCount === undefined)
3092
- break;
3093
- const usernames = new Array(usernameCount);
3094
- for (let i = 0; i < usernames.length; ++i)
3095
- usernames[i] = bufferParser.readString(true);
3096
-
3097
- const groupnameCount = bufferParser.readUInt32BE();
3098
- if (groupnameCount === undefined)
3099
- break;
3100
- const groupnames = new Array(groupnameCount);
3101
- for (let i = 0; i < groupnames.length; ++i)
3102
- groupnames[i] = bufferParser.readString(true);
3103
- if (groupnames.length > 0
3104
- && groupnames[groupnames.length - 1] === undefined) {
3105
- break;
3106
- }
3107
-
3108
- if (sftp._debug) {
3109
- sftp._debug(
3110
- 'SFTP: Inbound: Received EXTENDED_REPLY '
3111
- + `(id:${reqID}, ${req.extended})`
3112
- );
3113
- }
3114
- bufferParser.clear();
3115
- if (typeof req.cb === 'function')
3116
- req.cb(undefined, usernames, groupnames);
3117
- return;
3118
- }
3119
- default:
3120
- // Unknown extended request
3121
- sftp._debug && sftp._debug(
3122
- `SFTP: Inbound: Received EXTENDED_REPLY (id:${reqID}, ???)`
3123
- );
3124
- bufferParser.clear();
3125
- if (typeof req.cb === 'function')
3126
- req.cb();
3127
- return;
3128
- }
3129
- } else {
3130
- sftp._debug && sftp._debug(
3131
- `SFTP: Inbound: Received EXTENDED_REPLY (id:${reqID}, ???)`
3132
- );
3133
- bufferParser.clear();
3134
- return;
3135
- }
3136
- }
3137
-
3138
- bufferParser.clear();
3139
- return doFatalSFTPError(sftp, 'Malformed EXTENDED_REPLY packet');
3140
- },
3141
- };
3142
- const SERVER_HANDLERS = {
3143
- [REQUEST.INIT]: (sftp, payload) => {
3144
- if (sftp._version !== -1)
3145
- return doFatalSFTPError(sftp, 'Duplicate INIT packet');
3146
-
3147
- const extensions = {};
3148
-
3149
- /*
3150
- uint32 version
3151
- <extension data>
3152
- */
3153
- bufferParser.init(payload, 1);
3154
- let version = bufferParser.readUInt32BE();
3155
- while (bufferParser.avail()) {
3156
- const extName = bufferParser.readString(true);
3157
- const extData = bufferParser.readString(true);
3158
- if (extData === undefined) {
3159
- version = undefined;
3160
- break;
3161
- }
3162
- extensions[extName] = extData;
3163
- }
3164
- bufferParser.clear();
3165
-
3166
- if (version === undefined)
3167
- return doFatalSFTPError(sftp, 'Malformed INIT packet');
3168
-
3169
- if (sftp._debug) {
3170
- const names = Object.keys(extensions);
3171
- if (names.length) {
3172
- sftp._debug(
3173
- `SFTP: Inbound: Received INIT (v${version}, exts:${names})`
3174
- );
3175
- } else {
3176
- sftp._debug(`SFTP: Inbound: Received INIT (v${version})`);
3177
- }
3178
- }
3179
-
3180
- sendOrBuffer(sftp, SERVER_VERSION_BUFFER);
3181
-
3182
- sftp._version = version;
3183
- sftp._extensions = extensions;
3184
- sftp.emit('ready');
3185
- },
3186
- [REQUEST.OPEN]: (sftp, payload) => {
3187
- bufferParser.init(payload, 1);
3188
- const reqID = bufferParser.readUInt32BE();
3189
- /*
3190
- string filename
3191
- uint32 pflags
3192
- ATTRS attrs
3193
- */
3194
- const filename = bufferParser.readString(true);
3195
- const pflags = bufferParser.readUInt32BE();
3196
- const attrs = readAttrs(sftp._biOpt);
3197
- bufferParser.clear();
3198
-
3199
- if (attrs === undefined)
3200
- return doFatalSFTPError(sftp, 'Malformed OPEN packet');
3201
-
3202
- sftp._debug && sftp._debug(`SFTP: Inbound: Received OPEN (id:${reqID})`);
3203
-
3204
- if (!sftp.emit('OPEN', reqID, filename, pflags, attrs)) {
3205
- // Automatically reject request if no handler for request type
3206
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3207
- }
3208
- },
3209
- [REQUEST.CLOSE]: (sftp, payload) => {
3210
- bufferParser.init(payload, 1);
3211
- const reqID = bufferParser.readUInt32BE();
3212
- /*
3213
- string handle
3214
- */
3215
- const handle = bufferParser.readString();
3216
- bufferParser.clear();
3217
-
3218
- if (handle === undefined || handle.length > 256)
3219
- return doFatalSFTPError(sftp, 'Malformed CLOSE packet');
3220
-
3221
- sftp._debug && sftp._debug(`SFTP: Inbound: Received CLOSE (id:${reqID})`);
3222
-
3223
- if (!sftp.emit('CLOSE', reqID, handle)) {
3224
- // Automatically reject request if no handler for request type
3225
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3226
- }
3227
- },
3228
- [REQUEST.READ]: (sftp, payload) => {
3229
- bufferParser.init(payload, 1);
3230
- const reqID = bufferParser.readUInt32BE();
3231
- /*
3232
- string handle
3233
- uint64 offset
3234
- uint32 len
3235
- */
3236
- const handle = bufferParser.readString();
3237
- const offset = bufferParser.readUInt64BE(sftp._biOpt);
3238
- const len = bufferParser.readUInt32BE();
3239
- bufferParser.clear();
3240
-
3241
- if (len === undefined || handle.length > 256)
3242
- return doFatalSFTPError(sftp, 'Malformed READ packet');
3243
-
3244
- sftp._debug && sftp._debug(`SFTP: Inbound: Received READ (id:${reqID})`);
3245
-
3246
- if (!sftp.emit('READ', reqID, handle, offset, len)) {
3247
- // Automatically reject request if no handler for request type
3248
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3249
- }
3250
- },
3251
- [REQUEST.WRITE]: (sftp, payload) => {
3252
- bufferParser.init(payload, 1);
3253
- const reqID = bufferParser.readUInt32BE();
3254
- /*
3255
- string handle
3256
- uint64 offset
3257
- string data
3258
- */
3259
- const handle = bufferParser.readString();
3260
- const offset = bufferParser.readUInt64BE(sftp._biOpt);
3261
- const data = bufferParser.readString();
3262
- bufferParser.clear();
3263
-
3264
- if (data === undefined || handle.length > 256)
3265
- return doFatalSFTPError(sftp, 'Malformed WRITE packet');
3266
-
3267
- sftp._debug && sftp._debug(`SFTP: Inbound: Received WRITE (id:${reqID})`);
3268
-
3269
- if (!sftp.emit('WRITE', reqID, handle, offset, data)) {
3270
- // Automatically reject request if no handler for request type
3271
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3272
- }
3273
- },
3274
- [REQUEST.LSTAT]: (sftp, payload) => {
3275
- bufferParser.init(payload, 1);
3276
- const reqID = bufferParser.readUInt32BE();
3277
- /*
3278
- string path
3279
- */
3280
- const path = bufferParser.readString(true);
3281
- bufferParser.clear();
3282
-
3283
- if (path === undefined)
3284
- return doFatalSFTPError(sftp, 'Malformed LSTAT packet');
3285
-
3286
- sftp._debug && sftp._debug(`SFTP: Inbound: Received LSTAT (id:${reqID})`);
3287
-
3288
- if (!sftp.emit('LSTAT', reqID, path)) {
3289
- // Automatically reject request if no handler for request type
3290
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3291
- }
3292
- },
3293
- [REQUEST.FSTAT]: (sftp, payload) => {
3294
- bufferParser.init(payload, 1);
3295
- const reqID = bufferParser.readUInt32BE();
3296
- /*
3297
- string handle
3298
- */
3299
- const handle = bufferParser.readString();
3300
- bufferParser.clear();
3301
-
3302
- if (handle === undefined || handle.length > 256)
3303
- return doFatalSFTPError(sftp, 'Malformed FSTAT packet');
3304
-
3305
- sftp._debug && sftp._debug(`SFTP: Inbound: Received FSTAT (id:${reqID})`);
3306
-
3307
- if (!sftp.emit('FSTAT', reqID, handle)) {
3308
- // Automatically reject request if no handler for request type
3309
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3310
- }
3311
- },
3312
- [REQUEST.SETSTAT]: (sftp, payload) => {
3313
- bufferParser.init(payload, 1);
3314
- const reqID = bufferParser.readUInt32BE();
3315
- /*
3316
- string path
3317
- ATTRS attrs
3318
- */
3319
- const path = bufferParser.readString(true);
3320
- const attrs = readAttrs(sftp._biOpt);
3321
- bufferParser.clear();
3322
-
3323
- if (attrs === undefined)
3324
- return doFatalSFTPError(sftp, 'Malformed SETSTAT packet');
3325
-
3326
- sftp._debug && sftp._debug(`SFTP: Inbound: Received SETSTAT (id:${reqID})`);
3327
-
3328
- if (!sftp.emit('SETSTAT', reqID, path, attrs)) {
3329
- // Automatically reject request if no handler for request type
3330
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3331
- }
3332
- },
3333
- [REQUEST.FSETSTAT]: (sftp, payload) => {
3334
- bufferParser.init(payload, 1);
3335
- const reqID = bufferParser.readUInt32BE();
3336
- /*
3337
- string handle
3338
- ATTRS attrs
3339
- */
3340
- const handle = bufferParser.readString();
3341
- const attrs = readAttrs(sftp._biOpt);
3342
- bufferParser.clear();
3343
-
3344
- if (attrs === undefined || handle.length > 256)
3345
- return doFatalSFTPError(sftp, 'Malformed FSETSTAT packet');
3346
-
3347
- sftp._debug && sftp._debug(
3348
- `SFTP: Inbound: Received FSETSTAT (id:${reqID})`
3349
- );
3350
-
3351
- if (!sftp.emit('FSETSTAT', reqID, handle, attrs)) {
3352
- // Automatically reject request if no handler for request type
3353
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3354
- }
3355
- },
3356
- [REQUEST.OPENDIR]: (sftp, payload) => {
3357
- bufferParser.init(payload, 1);
3358
- const reqID = bufferParser.readUInt32BE();
3359
- /*
3360
- string path
3361
- */
3362
- const path = bufferParser.readString(true);
3363
- bufferParser.clear();
3364
-
3365
- if (path === undefined)
3366
- return doFatalSFTPError(sftp, 'Malformed OPENDIR packet');
3367
-
3368
- sftp._debug && sftp._debug(`SFTP: Inbound: Received OPENDIR (id:${reqID})`);
3369
-
3370
- if (!sftp.emit('OPENDIR', reqID, path)) {
3371
- // Automatically reject request if no handler for request type
3372
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3373
- }
3374
- },
3375
- [REQUEST.READDIR]: (sftp, payload) => {
3376
- bufferParser.init(payload, 1);
3377
- const reqID = bufferParser.readUInt32BE();
3378
- /*
3379
- string handle
3380
- */
3381
- const handle = bufferParser.readString();
3382
- bufferParser.clear();
3383
-
3384
- if (handle === undefined || handle.length > 256)
3385
- return doFatalSFTPError(sftp, 'Malformed READDIR packet');
3386
-
3387
- sftp._debug && sftp._debug(`SFTP: Inbound: Received READDIR (id:${reqID})`);
3388
-
3389
- if (!sftp.emit('READDIR', reqID, handle)) {
3390
- // Automatically reject request if no handler for request type
3391
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3392
- }
3393
- },
3394
- [REQUEST.REMOVE]: (sftp, payload) => {
3395
- bufferParser.init(payload, 1);
3396
- const reqID = bufferParser.readUInt32BE();
3397
- /*
3398
- string path
3399
- */
3400
- const path = bufferParser.readString(true);
3401
- bufferParser.clear();
3402
-
3403
- if (path === undefined)
3404
- return doFatalSFTPError(sftp, 'Malformed REMOVE packet');
3405
-
3406
- sftp._debug && sftp._debug(`SFTP: Inbound: Received REMOVE (id:${reqID})`);
3407
-
3408
- if (!sftp.emit('REMOVE', reqID, path)) {
3409
- // Automatically reject request if no handler for request type
3410
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3411
- }
3412
- },
3413
- [REQUEST.MKDIR]: (sftp, payload) => {
3414
- bufferParser.init(payload, 1);
3415
- const reqID = bufferParser.readUInt32BE();
3416
- /*
3417
- string path
3418
- ATTRS attrs
3419
- */
3420
- const path = bufferParser.readString(true);
3421
- const attrs = readAttrs(sftp._biOpt);
3422
- bufferParser.clear();
3423
-
3424
- if (attrs === undefined)
3425
- return doFatalSFTPError(sftp, 'Malformed MKDIR packet');
3426
-
3427
- sftp._debug && sftp._debug(`SFTP: Inbound: Received MKDIR (id:${reqID})`);
3428
-
3429
- if (!sftp.emit('MKDIR', reqID, path, attrs)) {
3430
- // Automatically reject request if no handler for request type
3431
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3432
- }
3433
- },
3434
- [REQUEST.RMDIR]: (sftp, payload) => {
3435
- bufferParser.init(payload, 1);
3436
- const reqID = bufferParser.readUInt32BE();
3437
- /*
3438
- string path
3439
- */
3440
- const path = bufferParser.readString(true);
3441
- bufferParser.clear();
3442
-
3443
- if (path === undefined)
3444
- return doFatalSFTPError(sftp, 'Malformed RMDIR packet');
3445
-
3446
- sftp._debug && sftp._debug(`SFTP: Inbound: Received RMDIR (id:${reqID})`);
3447
-
3448
- if (!sftp.emit('RMDIR', reqID, path)) {
3449
- // Automatically reject request if no handler for request type
3450
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3451
- }
3452
- },
3453
- [REQUEST.REALPATH]: (sftp, payload) => {
3454
- bufferParser.init(payload, 1);
3455
- const reqID = bufferParser.readUInt32BE();
3456
- /*
3457
- string path
3458
- */
3459
- const path = bufferParser.readString(true);
3460
- bufferParser.clear();
3461
-
3462
- if (path === undefined)
3463
- return doFatalSFTPError(sftp, 'Malformed REALPATH packet');
3464
-
3465
- sftp._debug && sftp._debug(
3466
- `SFTP: Inbound: Received REALPATH (id:${reqID})`
3467
- );
3468
-
3469
- if (!sftp.emit('REALPATH', reqID, path)) {
3470
- // Automatically reject request if no handler for request type
3471
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3472
- }
3473
- },
3474
- [REQUEST.STAT]: (sftp, payload) => {
3475
- bufferParser.init(payload, 1);
3476
- const reqID = bufferParser.readUInt32BE();
3477
- /*
3478
- string path
3479
- */
3480
- const path = bufferParser.readString(true);
3481
- bufferParser.clear();
3482
-
3483
- if (path === undefined)
3484
- return doFatalSFTPError(sftp, 'Malformed STAT packet');
3485
-
3486
- sftp._debug && sftp._debug(`SFTP: Inbound: Received STAT (id:${reqID})`);
3487
-
3488
- if (!sftp.emit('STAT', reqID, path)) {
3489
- // Automatically reject request if no handler for request type
3490
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3491
- }
3492
- },
3493
- [REQUEST.RENAME]: (sftp, payload) => {
3494
- bufferParser.init(payload, 1);
3495
- const reqID = bufferParser.readUInt32BE();
3496
- /*
3497
- string oldpath
3498
- string newpath
3499
- */
3500
- const oldPath = bufferParser.readString(true);
3501
- const newPath = bufferParser.readString(true);
3502
- bufferParser.clear();
3503
-
3504
- if (newPath === undefined)
3505
- return doFatalSFTPError(sftp, 'Malformed RENAME packet');
3506
-
3507
- sftp._debug && sftp._debug(`SFTP: Inbound: Received RENAME (id:${reqID})`);
3508
-
3509
- if (!sftp.emit('RENAME', reqID, oldPath, newPath)) {
3510
- // Automatically reject request if no handler for request type
3511
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3512
- }
3513
- },
3514
- [REQUEST.READLINK]: (sftp, payload) => {
3515
- bufferParser.init(payload, 1);
3516
- const reqID = bufferParser.readUInt32BE();
3517
- /*
3518
- string path
3519
- */
3520
- const path = bufferParser.readString(true);
3521
- bufferParser.clear();
3522
-
3523
- if (path === undefined)
3524
- return doFatalSFTPError(sftp, 'Malformed READLINK packet');
3525
-
3526
- sftp._debug && sftp._debug(
3527
- `SFTP: Inbound: Received READLINK (id:${reqID})`
3528
- );
3529
-
3530
- if (!sftp.emit('READLINK', reqID, path)) {
3531
- // Automatically reject request if no handler for request type
3532
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3533
- }
3534
- },
3535
- [REQUEST.SYMLINK]: (sftp, payload) => {
3536
- bufferParser.init(payload, 1);
3537
- const reqID = bufferParser.readUInt32BE();
3538
- /*
3539
- string linkpath
3540
- string targetpath
3541
- */
3542
- const linkPath = bufferParser.readString(true);
3543
- const targetPath = bufferParser.readString(true);
3544
- bufferParser.clear();
3545
-
3546
- if (targetPath === undefined)
3547
- return doFatalSFTPError(sftp, 'Malformed SYMLINK packet');
3548
-
3549
- sftp._debug && sftp._debug(`SFTP: Inbound: Received SYMLINK (id:${reqID})`);
3550
-
3551
- let handled;
3552
- if (sftp._isOpenSSH) {
3553
- // OpenSSH has linkpath and targetpath positions switched
3554
- handled = sftp.emit('SYMLINK', reqID, targetPath, linkPath);
3555
- } else {
3556
- handled = sftp.emit('SYMLINK', reqID, linkPath, targetPath);
3557
- }
3558
- if (!handled) {
3559
- // Automatically reject request if no handler for request type
3560
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3561
- }
3562
- },
3563
- [REQUEST.EXTENDED]: (sftp, payload) => {
3564
- bufferParser.init(payload, 1);
3565
- const reqID = bufferParser.readUInt32BE();
3566
- /*
3567
- string extended-request
3568
- ... any request-specific data ...
3569
- */
3570
- const extName = bufferParser.readString(true);
3571
- if (extName === undefined) {
3572
- bufferParser.clear();
3573
- return doFatalSFTPError(sftp, 'Malformed EXTENDED packet');
3574
- }
3575
-
3576
- let extData;
3577
- if (bufferParser.avail())
3578
- extData = bufferParser.readRaw();
3579
- bufferParser.clear();
3580
-
3581
- sftp._debug && sftp._debug(
3582
- `SFTP: Inbound: Received EXTENDED (id:${reqID})`
3583
- );
3584
-
3585
- if (!sftp.emit('EXTENDED', reqID, extName, extData)) {
3586
- // Automatically reject request if no handler for request type
3587
- sftp.status(reqID, STATUS_CODE.OP_UNSUPPORTED);
3588
- }
3589
- },
3590
- };
3591
-
3592
- // =============================================================================
3593
- // ReadStream/WriteStream-related ==============================================
3594
- // =============================================================================
3595
- const {
3596
- ERR_INVALID_ARG_TYPE,
3597
- ERR_OUT_OF_RANGE,
3598
- validateNumber
3599
- } = require('./node-fs-compat');
3600
-
3601
- const kMinPoolSpace = 128;
3602
-
3603
- let pool;
3604
- // It can happen that we expect to read a large chunk of data, and reserve
3605
- // a large chunk of the pool accordingly, but the read() call only filled
3606
- // a portion of it. If a concurrently executing read() then uses the same pool,
3607
- // the "reserved" portion cannot be used, so we allow it to be re-used as a
3608
- // new pool later.
3609
- const poolFragments = [];
3610
-
3611
- function allocNewPool(poolSize) {
3612
- if (poolFragments.length > 0)
3613
- pool = poolFragments.pop();
3614
- else
3615
- pool = Buffer.allocUnsafe(poolSize);
3616
- pool.used = 0;
3617
- }
3618
-
3619
- // Check the `this.start` and `this.end` of stream.
3620
- function checkPosition(pos, name) {
3621
- if (!Number.isSafeInteger(pos)) {
3622
- validateNumber(pos, name);
3623
- if (!Number.isInteger(pos))
3624
- throw new ERR_OUT_OF_RANGE(name, 'an integer', pos);
3625
- throw new ERR_OUT_OF_RANGE(name, '>= 0 and <= 2 ** 53 - 1', pos);
3626
- }
3627
- if (pos < 0)
3628
- throw new ERR_OUT_OF_RANGE(name, '>= 0 and <= 2 ** 53 - 1', pos);
3629
- }
3630
-
3631
- function roundUpToMultipleOf8(n) {
3632
- return (n + 7) & ~7; // Align to 8 byte boundary.
3633
- }
3634
-
3635
- function ReadStream(sftp, path, options) {
3636
- if (options === undefined)
3637
- options = {};
3638
- else if (typeof options === 'string')
3639
- options = { encoding: options };
3640
- else if (options === null || typeof options !== 'object')
3641
- throw new TypeError('"options" argument must be a string or an object');
3642
- else
3643
- options = Object.create(options);
3644
-
3645
- // A little bit bigger buffer and water marks by default
3646
- if (options.highWaterMark === undefined)
3647
- options.highWaterMark = 64 * 1024;
3648
-
3649
- // For backwards compat do not emit close on destroy.
3650
- options.emitClose = false;
3651
- options.autoDestroy = false; // Node 14 major change.
3652
-
3653
- ReadableStream.call(this, options);
3654
-
3655
- this.path = path;
3656
- this.flags = options.flags === undefined ? 'r' : options.flags;
3657
- this.mode = options.mode === undefined ? 0o666 : options.mode;
3658
-
3659
- this.start = options.start;
3660
- this.end = options.end;
3661
- this.autoClose = options.autoClose === undefined ? true : options.autoClose;
3662
- this.pos = 0;
3663
- this.bytesRead = 0;
3664
- this.isClosed = false;
3665
-
3666
- this.handle = options.handle === undefined ? null : options.handle;
3667
- this.sftp = sftp;
3668
- this._opening = false;
3669
-
3670
- if (this.start !== undefined) {
3671
- checkPosition(this.start, 'start');
3672
-
3673
- this.pos = this.start;
3674
- }
3675
-
3676
- if (this.end === undefined) {
3677
- this.end = Infinity;
3678
- } else if (this.end !== Infinity) {
3679
- checkPosition(this.end, 'end');
3680
-
3681
- if (this.start !== undefined && this.start > this.end) {
3682
- throw new ERR_OUT_OF_RANGE(
3683
- 'start',
3684
- `<= "end" (here: ${this.end})`,
3685
- this.start
3686
- );
3687
- }
3688
- }
3689
-
3690
- this.on('end', function() {
3691
- if (this.autoClose)
3692
- this.destroy();
3693
- });
3694
-
3695
- if (!Buffer.isBuffer(this.handle))
3696
- this.open();
3697
- }
3698
- inherits(ReadStream, ReadableStream);
3699
-
3700
- ReadStream.prototype.open = function() {
3701
- if (this._opening)
3702
- return;
3703
-
3704
- this._opening = true;
3705
-
3706
- this.sftp.open(this.path, this.flags, this.mode, (er, handle) => {
3707
- this._opening = false;
3708
-
3709
- if (er) {
3710
- this.emit('error', er);
3711
- if (this.autoClose)
3712
- this.destroy();
3713
- return;
3714
- }
3715
-
3716
- this.handle = handle;
3717
- this.emit('open', handle);
3718
- this.emit('ready');
3719
- // Start the flow of data.
3720
- this.read();
3721
- });
3722
- };
3723
-
3724
- ReadStream.prototype._read = function(n) {
3725
- if (!Buffer.isBuffer(this.handle))
3726
- return this.once('open', () => this._read(n));
3727
-
3728
- // XXX: safe to remove this?
3729
- if (this.destroyed)
3730
- return;
3731
-
3732
- if (!pool || pool.length - pool.used < kMinPoolSpace) {
3733
- // Discard the old pool.
3734
- allocNewPool(this.readableHighWaterMark
3735
- || this._readableState.highWaterMark);
3736
- }
3737
-
3738
- // Grab another reference to the pool in the case that while we're
3739
- // in the thread pool another read() finishes up the pool, and
3740
- // allocates a new one.
3741
- const thisPool = pool;
3742
- let toRead = Math.min(pool.length - pool.used, n);
3743
- const start = pool.used;
3744
-
3745
- if (this.end !== undefined)
3746
- toRead = Math.min(this.end - this.pos + 1, toRead);
3747
-
3748
- // Already read everything we were supposed to read!
3749
- // treat as EOF.
3750
- if (toRead <= 0)
3751
- return this.push(null);
3752
-
3753
- // the actual read.
3754
- this.sftp.read(this.handle,
3755
- pool,
3756
- pool.used,
3757
- toRead,
3758
- this.pos,
3759
- (er, bytesRead) => {
3760
- if (er) {
3761
- this.emit('error', er);
3762
- if (this.autoClose)
3763
- this.destroy();
3764
- return;
3765
- }
3766
- let b = null;
3767
-
3768
- // Now that we know how much data we have actually read, re-wind the
3769
- // 'used' field if we can, and otherwise allow the remainder of our
3770
- // reservation to be used as a new pool later.
3771
- if (start + toRead === thisPool.used && thisPool === pool) {
3772
- thisPool.used = roundUpToMultipleOf8(thisPool.used + bytesRead - toRead);
3773
- } else {
3774
- // Round down to the next lowest multiple of 8 to ensure the new pool
3775
- // fragment start and end positions are aligned to an 8 byte boundary.
3776
- const alignedEnd = (start + toRead) & ~7;
3777
- const alignedStart = roundUpToMultipleOf8(start + bytesRead);
3778
- if (alignedEnd - alignedStart >= kMinPoolSpace)
3779
- poolFragments.push(thisPool.slice(alignedStart, alignedEnd));
3780
- }
3781
-
3782
- if (bytesRead > 0) {
3783
- this.bytesRead += bytesRead;
3784
- b = thisPool.slice(start, start + bytesRead);
3785
- }
3786
-
3787
- // Move the pool positions, and internal position for reading.
3788
- this.pos += bytesRead;
3789
-
3790
- this.push(b);
3791
- });
3792
-
3793
- pool.used = roundUpToMultipleOf8(pool.used + toRead);
3794
- };
3795
-
3796
- ReadStream.prototype._destroy = function(err, cb) {
3797
- if (this._opening && !Buffer.isBuffer(this.handle)) {
3798
- this.once('open', closeStream.bind(null, this, cb, err));
3799
- return;
3800
- }
3801
-
3802
- closeStream(this, cb, err);
3803
- this.handle = null;
3804
- this._opening = false;
3805
- };
3806
-
3807
- function closeStream(stream, cb, err) {
3808
- if (!stream.handle)
3809
- return onclose();
3810
-
3811
- stream.sftp.close(stream.handle, onclose);
3812
-
3813
- function onclose(er) {
3814
- er = er || err;
3815
- cb(er);
3816
- stream.isClosed = true;
3817
- if (!er)
3818
- stream.emit('close');
3819
- }
3820
- }
3821
-
3822
- ReadStream.prototype.close = function(cb) {
3823
- this.destroy(null, cb);
3824
- };
3825
-
3826
- Object.defineProperty(ReadStream.prototype, 'pending', {
3827
- get() {
3828
- return this.handle === null;
3829
- },
3830
- configurable: true
3831
- });
3832
-
3833
- // TODO: add `concurrency` setting to allow more than one in-flight WRITE
3834
- // request to server to improve throughput
3835
- function WriteStream(sftp, path, options) {
3836
- if (options === undefined)
3837
- options = {};
3838
- else if (typeof options === 'string')
3839
- options = { encoding: options };
3840
- else if (options === null || typeof options !== 'object')
3841
- throw new TypeError('"options" argument must be a string or an object');
3842
- else
3843
- options = Object.create(options);
3844
-
3845
- // For backwards compat do not emit close on destroy.
3846
- options.emitClose = false;
3847
- options.autoDestroy = false; // Node 14 major change.
3848
-
3849
- WritableStream.call(this, options);
3850
-
3851
- this.path = path;
3852
- this.flags = options.flags === undefined ? 'w' : options.flags;
3853
- this.mode = options.mode === undefined ? 0o666 : options.mode;
3854
-
3855
- this.start = options.start;
3856
- this.autoClose = options.autoClose === undefined ? true : options.autoClose;
3857
- this.pos = 0;
3858
- this.bytesWritten = 0;
3859
- this.isClosed = false;
3860
-
3861
- this.handle = options.handle === undefined ? null : options.handle;
3862
- this.sftp = sftp;
3863
- this._opening = false;
3864
-
3865
- if (this.start !== undefined) {
3866
- checkPosition(this.start, 'start');
3867
-
3868
- this.pos = this.start;
3869
- }
3870
-
3871
- if (options.encoding)
3872
- this.setDefaultEncoding(options.encoding);
3873
-
3874
- // Node v6.x only
3875
- this.on('finish', function() {
3876
- if (this._writableState.finalCalled)
3877
- return;
3878
- if (this.autoClose)
3879
- this.destroy();
3880
- });
3881
-
3882
- if (!Buffer.isBuffer(this.handle))
3883
- this.open();
3884
- }
3885
- inherits(WriteStream, WritableStream);
3886
-
3887
- WriteStream.prototype._final = function(cb) {
3888
- if (this.autoClose)
3889
- this.destroy();
3890
- cb();
3891
- };
3892
-
3893
- WriteStream.prototype.open = function() {
3894
- if (this._opening)
3895
- return;
3896
-
3897
- this._opening = true;
3898
-
3899
- this.sftp.open(this.path, this.flags, this.mode, (er, handle) => {
3900
- this._opening = false;
3901
-
3902
- if (er) {
3903
- this.emit('error', er);
3904
- if (this.autoClose)
3905
- this.destroy();
3906
- return;
3907
- }
3908
-
3909
- this.handle = handle;
3910
-
3911
- const tryAgain = (err) => {
3912
- if (err) {
3913
- // Try chmod() for sftp servers that may not support fchmod() for
3914
- // whatever reason
3915
- this.sftp.chmod(this.path, this.mode, (err_) => tryAgain());
3916
- return;
3917
- }
3918
-
3919
- // SFTPv3 requires absolute offsets, no matter the open flag used
3920
- if (this.flags[0] === 'a') {
3921
- const tryStat = (err, st) => {
3922
- if (err) {
3923
- // Try stat() for sftp servers that may not support fstat() for
3924
- // whatever reason
3925
- this.sftp.stat(this.path, (err_, st_) => {
3926
- if (err_) {
3927
- this.destroy();
3928
- this.emit('error', err);
3929
- return;
3930
- }
3931
- tryStat(null, st_);
3932
- });
3933
- return;
3934
- }
3935
-
3936
- this.pos = st.size;
3937
- this.emit('open', handle);
3938
- this.emit('ready');
3939
- };
3940
-
3941
- this.sftp.fstat(handle, tryStat);
3942
- return;
3943
- }
3944
-
3945
- this.emit('open', handle);
3946
- this.emit('ready');
3947
- };
3948
-
3949
- this.sftp.fchmod(handle, this.mode, tryAgain);
3950
- });
3951
- };
3952
-
3953
- WriteStream.prototype._write = function(data, encoding, cb) {
3954
- if (!Buffer.isBuffer(data)) {
3955
- const err = new ERR_INVALID_ARG_TYPE('data', 'Buffer', data);
3956
- return this.emit('error', err);
3957
- }
3958
-
3959
- if (!Buffer.isBuffer(this.handle)) {
3960
- return this.once('open', function() {
3961
- this._write(data, encoding, cb);
3962
- });
3963
- }
3964
-
3965
- this.sftp.write(this.handle,
3966
- data,
3967
- 0,
3968
- data.length,
3969
- this.pos,
3970
- (er, bytes) => {
3971
- if (er) {
3972
- if (this.autoClose)
3973
- this.destroy();
3974
- return cb(er);
3975
- }
3976
- this.bytesWritten += bytes;
3977
- cb();
3978
- });
3979
-
3980
- this.pos += data.length;
3981
- };
3982
-
3983
- WriteStream.prototype._writev = function(data, cb) {
3984
- if (!Buffer.isBuffer(this.handle)) {
3985
- return this.once('open', function() {
3986
- this._writev(data, cb);
3987
- });
3988
- }
3989
-
3990
- const sftp = this.sftp;
3991
- const handle = this.handle;
3992
- let writesLeft = data.length;
3993
-
3994
- const onwrite = (er, bytes) => {
3995
- if (er) {
3996
- this.destroy();
3997
- return cb(er);
3998
- }
3999
- this.bytesWritten += bytes;
4000
- if (--writesLeft === 0)
4001
- cb();
4002
- };
4003
-
4004
- // TODO: try to combine chunks to reduce number of requests to the server?
4005
- for (let i = 0; i < data.length; ++i) {
4006
- const chunk = data[i].chunk;
4007
-
4008
- sftp.write(handle, chunk, 0, chunk.length, this.pos, onwrite);
4009
- this.pos += chunk.length;
4010
- }
4011
- };
4012
-
4013
- if (typeof WritableStream.prototype.destroy !== 'function')
4014
- WriteStream.prototype.destroy = ReadStream.prototype.destroy;
4015
-
4016
- WriteStream.prototype._destroy = ReadStream.prototype._destroy;
4017
- WriteStream.prototype.close = function(cb) {
4018
- if (cb) {
4019
- if (this.isClosed) {
4020
- process.nextTick(cb);
4021
- return;
4022
- }
4023
- this.on('close', cb);
4024
- }
4025
-
4026
- // If we are not autoClosing, we should call
4027
- // destroy on 'finish'.
4028
- if (!this.autoClose)
4029
- this.on('finish', this.destroy.bind(this));
4030
-
4031
- this.end();
4032
- };
4033
-
4034
- // There is no shutdown() for files.
4035
- WriteStream.prototype.destroySoon = WriteStream.prototype.end;
4036
-
4037
- Object.defineProperty(WriteStream.prototype, 'pending', {
4038
- get() {
4039
- return this.handle === null;
4040
- },
4041
- configurable: true
4042
- });
4043
- // =============================================================================
4044
-
4045
- module.exports = {
4046
- flagsToString,
4047
- OPEN_MODE,
4048
- SFTP,
4049
- Stats,
4050
- STATUS_CODE,
4051
- stringToFlags,
4052
- };