@aws/lsp-codewhisperer 0.0.9 → 0.0.11

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 (323) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/node_modules/@amzn/codewhisperer-streaming/package.json +4 -4
  3. package/node_modules/@aws/lsp-fqn/out/common/commonFqnWorkerPool.js +12 -25
  4. package/node_modules/@aws/lsp-fqn/out/common/commonFqnWorkerPool.js.map +1 -1
  5. package/node_modules/@aws/lsp-fqn/out/common/fqnExtractor.js +1 -2
  6. package/node_modules/@aws/lsp-fqn/out/common/fqnExtractor.js.map +1 -1
  7. package/node_modules/@aws/lsp-fqn/package.json +1 -1
  8. package/node_modules/@aws/lsp-fqn/tsconfig.tsbuildinfo +1 -1
  9. package/out/client/streamingClient/codewhispererStreamingClient.d.ts +5 -0
  10. package/out/client/streamingClient/codewhispererStreamingClient.js +25 -0
  11. package/out/client/streamingClient/codewhispererStreamingClient.js.map +1 -0
  12. package/out/client/token/bearer-token-service.json +55 -2
  13. package/out/index.d.ts +1 -0
  14. package/out/index.js +1 -0
  15. package/out/index.js.map +1 -1
  16. package/out/language-server/chat/chatController.js +104 -108
  17. package/out/language-server/chat/chatController.js.map +1 -1
  18. package/out/language-server/chat/chatController.test.js +16 -1
  19. package/out/language-server/chat/chatController.test.js.map +1 -1
  20. package/out/language-server/chat/chatEventParser.js +28 -34
  21. package/out/language-server/chat/chatEventParser.js.map +1 -1
  22. package/out/language-server/chat/chatSessionManagementService.js +22 -36
  23. package/out/language-server/chat/chatSessionManagementService.js.map +1 -1
  24. package/out/language-server/chat/chatSessionService.js +24 -37
  25. package/out/language-server/chat/chatSessionService.js.map +1 -1
  26. package/out/language-server/chat/constants.d.ts +2 -0
  27. package/out/language-server/chat/constants.js +32 -0
  28. package/out/language-server/chat/constants.js.map +1 -0
  29. package/out/language-server/chat/contexts/documentContext.js +11 -24
  30. package/out/language-server/chat/contexts/documentContext.js.map +1 -1
  31. package/out/language-server/chat/contexts/documentFqnExtractor.js +67 -78
  32. package/out/language-server/chat/contexts/documentFqnExtractor.js.map +1 -1
  33. package/out/language-server/chat/contexts/triggerContext.js +32 -44
  34. package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
  35. package/out/language-server/chat/quickActions.d.ts +0 -1
  36. package/out/language-server/chat/quickActions.js +1 -28
  37. package/out/language-server/chat/quickActions.js.map +1 -1
  38. package/out/language-server/chat/telemetry/chatTelemetryController.js +114 -126
  39. package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
  40. package/out/language-server/chat/utils.d.ts +6 -0
  41. package/out/language-server/chat/utils.js +60 -0
  42. package/out/language-server/chat/utils.js.map +1 -0
  43. package/out/language-server/codeWhispererService.js +13 -11
  44. package/out/language-server/codeWhispererService.js.map +1 -1
  45. package/out/language-server/constants.d.ts +3 -0
  46. package/out/language-server/constants.js +7 -0
  47. package/out/language-server/constants.js.map +1 -0
  48. package/out/language-server/dependencyGraph/csharpDependencyGraph.js +2 -2
  49. package/out/language-server/dependencyGraph/csharpDependencyGraph.js.map +1 -1
  50. package/out/language-server/dependencyGraph/dependencyGraph.js +12 -9
  51. package/out/language-server/dependencyGraph/dependencyGraph.js.map +1 -1
  52. package/out/language-server/dependencyGraph/gitIgnoreFilter.js +1 -0
  53. package/out/language-server/dependencyGraph/gitIgnoreFilter.js.map +1 -1
  54. package/out/language-server/netTransform/artifactManager.d.ts +29 -0
  55. package/out/language-server/netTransform/artifactManager.js +191 -0
  56. package/out/language-server/netTransform/artifactManager.js.map +1 -0
  57. package/out/language-server/netTransform/converter.d.ts +9 -0
  58. package/out/language-server/netTransform/converter.js +108 -0
  59. package/out/language-server/netTransform/converter.js.map +1 -0
  60. package/out/language-server/netTransform/metrics.d.ts +17 -0
  61. package/out/language-server/netTransform/metrics.js +222 -0
  62. package/out/language-server/netTransform/metrics.js.map +1 -0
  63. package/out/language-server/netTransform/models.d.ts +84 -0
  64. package/out/language-server/netTransform/models.js +12 -0
  65. package/out/language-server/netTransform/models.js.map +1 -0
  66. package/out/language-server/netTransform/resources/SupportedProjects.d.ts +2 -0
  67. package/out/language-server/netTransform/resources/SupportedProjects.js +26 -0
  68. package/out/language-server/netTransform/resources/SupportedProjects.js.map +1 -0
  69. package/out/language-server/netTransform/tests/converter.test.d.ts +1 -0
  70. package/out/language-server/netTransform/tests/converter.test.js +265 -0
  71. package/out/language-server/netTransform/tests/converter.test.js.map +1 -0
  72. package/out/language-server/netTransform/tests/mockData.d.ts +21 -0
  73. package/out/language-server/netTransform/tests/mockData.js +60 -0
  74. package/out/language-server/netTransform/tests/mockData.js.map +1 -0
  75. package/out/language-server/netTransform/tests/transformHandler.test.d.ts +1 -0
  76. package/out/language-server/netTransform/tests/transformHandler.test.js +242 -0
  77. package/out/language-server/netTransform/tests/transformHandler.test.js.map +1 -0
  78. package/out/language-server/netTransform/tests/validation.test.d.ts +1 -0
  79. package/out/language-server/netTransform/tests/validation.test.js +80 -0
  80. package/out/language-server/netTransform/tests/validation.test.js.map +1 -0
  81. package/out/language-server/netTransform/transformHandler.d.ts +27 -0
  82. package/out/language-server/netTransform/transformHandler.js +315 -0
  83. package/out/language-server/netTransform/transformHandler.js.map +1 -0
  84. package/out/language-server/netTransform/validation.d.ts +9 -0
  85. package/out/language-server/netTransform/validation.js +79 -0
  86. package/out/language-server/netTransform/validation.js.map +1 -0
  87. package/out/language-server/netTransformServer.d.ts +5 -6
  88. package/out/language-server/netTransformServer.js +149 -15
  89. package/out/language-server/netTransformServer.js.map +1 -1
  90. package/out/language-server/proxy-server.d.ts +1 -0
  91. package/out/language-server/proxy-server.js +16 -1
  92. package/out/language-server/proxy-server.js.map +1 -1
  93. package/out/language-server/securityScan/securityScanDiagnosticsProvider.js +10 -6
  94. package/out/language-server/securityScan/securityScanDiagnosticsProvider.js.map +1 -1
  95. package/out/language-server/securityScan/securityScanHandler.js +4 -0
  96. package/out/language-server/securityScan/securityScanHandler.js.map +1 -1
  97. package/out/language-server/session/sessionManager.js +35 -15
  98. package/out/language-server/session/sessionManager.js.map +1 -1
  99. package/out/language-server/telemetry/codeDiffTracker.js +69 -80
  100. package/out/language-server/telemetry/codeDiffTracker.js.map +1 -1
  101. package/out/language-server/telemetry/codePercentage.js +3 -0
  102. package/out/language-server/telemetry/codePercentage.js.map +1 -1
  103. package/out/language-server/telemetry/metric.js +8 -21
  104. package/out/language-server/telemetry/metric.js.map +1 -1
  105. package/out/language-server/telemetry/types.d.ts +38 -0
  106. package/out/language-server/telemetry/types.js.map +1 -1
  107. package/out/language-server/utils.d.ts +2 -5
  108. package/out/language-server/utils.js +25 -49
  109. package/out/language-server/utils.js.map +1 -1
  110. package/package.json +5 -2
  111. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/HISTORY.md +0 -395
  112. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/LICENSE +0 -201
  113. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/README.md +0 -530
  114. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.js +0 -288
  115. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.js.map +0 -1
  116. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.min.js +0 -2
  117. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.min.js.map +0 -1
  118. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.js +0 -1737
  119. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.js.map +0 -1
  120. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.min.js +0 -3
  121. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.min.js.LICENSE.txt +0 -24
  122. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.min.js.map +0 -1
  123. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/package.json +0 -57
  124. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/Pool.js +0 -476
  125. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/Promise.js +0 -293
  126. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/WorkerHandler.js +0 -547
  127. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/debug-port-allocator.js +0 -28
  128. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/environment.js +0 -30
  129. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/generated/embeddedWorker.js +0 -6
  130. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/header.js +0 -24
  131. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/index.js +0 -60
  132. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/requireFoolWebpack.js +0 -8
  133. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/transfer.js +0 -12
  134. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/types.js +0 -46
  135. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/validateOptions.js +0 -51
  136. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/worker.js +0 -256
  137. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/Pool.d.ts +0 -130
  138. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/Promise.d.ts +0 -125
  139. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/WorkerHandler.d.ts +0 -89
  140. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/debug-port-allocator.d.ts +0 -8
  141. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/environment.d.ts +0 -4
  142. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/generated/embeddedWorker.d.ts +0 -2
  143. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/index.d.ts +0 -43
  144. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/transfer.d.ts +0 -19
  145. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/types.d.ts +0 -99
  146. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/validateOptions.d.ts +0 -4
  147. package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/worker.d.ts +0 -8
  148. package/node_modules/@aws-sdk/middleware-recursion-detection/LICENSE +0 -201
  149. package/node_modules/@aws-sdk/middleware-recursion-detection/README.md +0 -10
  150. package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +0 -39
  151. package/node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js +0 -34
  152. package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/index.d.ts +0 -18
  153. package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/ts3.4/index.d.ts +0 -18
  154. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +0 -59
  155. package/node_modules/@aws-sdk/middleware-user-agent/LICENSE +0 -201
  156. package/node_modules/@aws-sdk/middleware-user-agent/README.md +0 -4
  157. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/configurations.js +0 -10
  158. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/constants.js +0 -10
  159. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +0 -5
  160. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/user-agent-middleware.js +0 -79
  161. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js +0 -6
  162. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js +0 -7
  163. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js +0 -2
  164. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js +0 -72
  165. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/configurations.d.ts +0 -31
  166. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/constants.d.ts +0 -7
  167. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/index.d.ts +0 -2
  168. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/configurations.d.ts +0 -17
  169. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/constants.d.ts +0 -7
  170. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/index.d.ts +0 -2
  171. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/user-agent-middleware.d.ts +0 -20
  172. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/user-agent-middleware.d.ts +0 -17
  173. package/node_modules/@aws-sdk/middleware-user-agent/package.json +0 -61
  174. package/node_modules/@aws-sdk/util-locate-window/LICENSE +0 -201
  175. package/node_modules/@aws-sdk/util-locate-window/README.md +0 -4
  176. package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -41
  177. package/node_modules/@aws-sdk/util-locate-window/dist-es/index.js +0 -10
  178. package/node_modules/@aws-sdk/util-locate-window/dist-types/index.d.ts +0 -6
  179. package/node_modules/@aws-sdk/util-locate-window/dist-types/ts3.4/index.d.ts +0 -1
  180. package/node_modules/@aws-sdk/util-locate-window/package.json +0 -52
  181. package/node_modules/@smithy/eventstream-serde-config-resolver/LICENSE +0 -201
  182. package/node_modules/@smithy/eventstream-serde-config-resolver/README.md +0 -10
  183. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/EventStreamSerdeConfig.js +0 -1
  184. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +0 -37
  185. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js +0 -4
  186. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js +0 -1
  187. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/EventStreamSerdeConfig.d.ts +0 -24
  188. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/index.d.ts +0 -4
  189. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/ts3.4/EventStreamSerdeConfig.d.ts +0 -24
  190. package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/ts3.4/index.d.ts +0 -4
  191. package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +0 -61
  192. package/node_modules/@smithy/util-utf8/LICENSE +0 -201
  193. package/node_modules/@smithy/util-utf8/README.md +0 -4
  194. package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +0 -1
  195. package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +0 -1
  196. package/node_modules/@smithy/util-utf8/dist-cjs/index.js +0 -65
  197. package/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +0 -1
  198. package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +0 -1
  199. package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +0 -1
  200. package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +0 -1
  201. package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js +0 -5
  202. package/node_modules/@smithy/util-utf8/dist-es/index.js +0 -3
  203. package/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +0 -10
  204. package/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +0 -9
  205. package/node_modules/@smithy/util-utf8/dist-es/toUtf8.js +0 -10
  206. package/node_modules/@smithy/util-utf8/dist-types/fromUtf8.browser.d.ts +0 -1
  207. package/node_modules/@smithy/util-utf8/dist-types/fromUtf8.d.ts +0 -1
  208. package/node_modules/@smithy/util-utf8/dist-types/index.d.ts +0 -3
  209. package/node_modules/@smithy/util-utf8/dist-types/toUint8Array.d.ts +0 -1
  210. package/node_modules/@smithy/util-utf8/dist-types/toUtf8.browser.d.ts +0 -7
  211. package/node_modules/@smithy/util-utf8/dist-types/toUtf8.d.ts +0 -7
  212. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.browser.d.ts +0 -1
  213. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.d.ts +0 -1
  214. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/index.d.ts +0 -3
  215. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUint8Array.d.ts +0 -1
  216. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts +0 -7
  217. package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.d.ts +0 -7
  218. package/node_modules/@smithy/util-utf8/package.json +0 -66
  219. package/node_modules/bowser/CHANGELOG.md +0 -218
  220. package/node_modules/bowser/LICENSE +0 -39
  221. package/node_modules/bowser/README.md +0 -179
  222. package/node_modules/bowser/bundled.js +0 -1
  223. package/node_modules/bowser/es5.js +0 -1
  224. package/node_modules/bowser/index.d.ts +0 -250
  225. package/node_modules/bowser/package.json +0 -83
  226. package/node_modules/bowser/src/bowser.js +0 -77
  227. package/node_modules/bowser/src/constants.js +0 -116
  228. package/node_modules/bowser/src/parser-browsers.js +0 -700
  229. package/node_modules/bowser/src/parser-engines.js +0 -120
  230. package/node_modules/bowser/src/parser-os.js +0 -199
  231. package/node_modules/bowser/src/parser-platforms.js +0 -266
  232. package/node_modules/bowser/src/parser.js +0 -496
  233. package/node_modules/bowser/src/utils.js +0 -309
  234. package/node_modules/tslib/CopyrightNotice.txt +0 -15
  235. package/node_modules/tslib/LICENSE.txt +0 -12
  236. package/node_modules/tslib/README.md +0 -164
  237. package/node_modules/tslib/SECURITY.md +0 -41
  238. package/node_modules/tslib/modules/index.d.ts +0 -37
  239. package/node_modules/tslib/modules/index.js +0 -68
  240. package/node_modules/tslib/modules/package.json +0 -3
  241. package/node_modules/tslib/package.json +0 -47
  242. package/node_modules/tslib/tslib.d.ts +0 -453
  243. package/node_modules/tslib/tslib.es6.html +0 -1
  244. package/node_modules/tslib/tslib.es6.js +0 -374
  245. package/node_modules/tslib/tslib.es6.mjs +0 -373
  246. package/node_modules/tslib/tslib.html +0 -1
  247. package/node_modules/tslib/tslib.js +0 -424
  248. package/node_modules/uuid/CHANGELOG.md +0 -274
  249. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  250. package/node_modules/uuid/LICENSE.md +0 -9
  251. package/node_modules/uuid/README.md +0 -466
  252. package/node_modules/uuid/dist/bin/uuid +0 -2
  253. package/node_modules/uuid/dist/commonjs-browser/index.js +0 -79
  254. package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -223
  255. package/node_modules/uuid/dist/commonjs-browser/native.js +0 -11
  256. package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -8
  257. package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -45
  258. package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -8
  259. package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -25
  260. package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -104
  261. package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -44
  262. package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -107
  263. package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -16
  264. package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -80
  265. package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -43
  266. package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -16
  267. package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -17
  268. package/node_modules/uuid/dist/commonjs-browser/version.js +0 -21
  269. package/node_modules/uuid/dist/esm-browser/index.js +0 -9
  270. package/node_modules/uuid/dist/esm-browser/md5.js +0 -215
  271. package/node_modules/uuid/dist/esm-browser/native.js +0 -4
  272. package/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  273. package/node_modules/uuid/dist/esm-browser/parse.js +0 -35
  274. package/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  275. package/node_modules/uuid/dist/esm-browser/rng.js +0 -18
  276. package/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
  277. package/node_modules/uuid/dist/esm-browser/stringify.js +0 -33
  278. package/node_modules/uuid/dist/esm-browser/v1.js +0 -95
  279. package/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  280. package/node_modules/uuid/dist/esm-browser/v35.js +0 -66
  281. package/node_modules/uuid/dist/esm-browser/v4.js +0 -29
  282. package/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  283. package/node_modules/uuid/dist/esm-browser/validate.js +0 -7
  284. package/node_modules/uuid/dist/esm-browser/version.js +0 -11
  285. package/node_modules/uuid/dist/esm-node/index.js +0 -9
  286. package/node_modules/uuid/dist/esm-node/md5.js +0 -13
  287. package/node_modules/uuid/dist/esm-node/native.js +0 -4
  288. package/node_modules/uuid/dist/esm-node/nil.js +0 -1
  289. package/node_modules/uuid/dist/esm-node/parse.js +0 -35
  290. package/node_modules/uuid/dist/esm-node/regex.js +0 -1
  291. package/node_modules/uuid/dist/esm-node/rng.js +0 -12
  292. package/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  293. package/node_modules/uuid/dist/esm-node/stringify.js +0 -33
  294. package/node_modules/uuid/dist/esm-node/v1.js +0 -95
  295. package/node_modules/uuid/dist/esm-node/v3.js +0 -4
  296. package/node_modules/uuid/dist/esm-node/v35.js +0 -66
  297. package/node_modules/uuid/dist/esm-node/v4.js +0 -29
  298. package/node_modules/uuid/dist/esm-node/v5.js +0 -4
  299. package/node_modules/uuid/dist/esm-node/validate.js +0 -7
  300. package/node_modules/uuid/dist/esm-node/version.js +0 -11
  301. package/node_modules/uuid/dist/index.js +0 -79
  302. package/node_modules/uuid/dist/md5-browser.js +0 -223
  303. package/node_modules/uuid/dist/md5.js +0 -23
  304. package/node_modules/uuid/dist/native-browser.js +0 -11
  305. package/node_modules/uuid/dist/native.js +0 -15
  306. package/node_modules/uuid/dist/nil.js +0 -8
  307. package/node_modules/uuid/dist/parse.js +0 -45
  308. package/node_modules/uuid/dist/regex.js +0 -8
  309. package/node_modules/uuid/dist/rng-browser.js +0 -25
  310. package/node_modules/uuid/dist/rng.js +0 -24
  311. package/node_modules/uuid/dist/sha1-browser.js +0 -104
  312. package/node_modules/uuid/dist/sha1.js +0 -23
  313. package/node_modules/uuid/dist/stringify.js +0 -44
  314. package/node_modules/uuid/dist/uuid-bin.js +0 -85
  315. package/node_modules/uuid/dist/v1.js +0 -107
  316. package/node_modules/uuid/dist/v3.js +0 -16
  317. package/node_modules/uuid/dist/v35.js +0 -80
  318. package/node_modules/uuid/dist/v4.js +0 -43
  319. package/node_modules/uuid/dist/v5.js +0 -16
  320. package/node_modules/uuid/dist/validate.js +0 -17
  321. package/node_modules/uuid/dist/version.js +0 -21
  322. package/node_modules/uuid/package.json +0 -135
  323. package/node_modules/uuid/wrapper.mjs +0 -10
@@ -1,89 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- export = WorkerHandler;
4
- /**
5
- * A WorkerHandler controls a single worker. This worker can be a child process
6
- * on node.js or a WebWorker in a browser environment.
7
- * @param {String} [script] If no script is provided, a default worker with a
8
- * function run will be created.
9
- * @param {import('./types.js').WorkerPoolOptions} [_options] See docs
10
- * @constructor
11
- */
12
- declare function WorkerHandler(script?: string | undefined, _options?: import("./types.js").WorkerPoolOptions | undefined): void;
13
- declare class WorkerHandler {
14
- /**
15
- * A WorkerHandler controls a single worker. This worker can be a child process
16
- * on node.js or a WebWorker in a browser environment.
17
- * @param {String} [script] If no script is provided, a default worker with a
18
- * function run will be created.
19
- * @param {import('./types.js').WorkerPoolOptions} [_options] See docs
20
- * @constructor
21
- */
22
- constructor(script?: string | undefined, _options?: import("./types.js").WorkerPoolOptions | undefined);
23
- script: any;
24
- worker: any;
25
- debugPort: any;
26
- forkOpts: import("child_process").ForkOptions | undefined;
27
- forkArgs: string[] | undefined;
28
- workerOpts: WorkerOptions | undefined;
29
- workerThreadOpts: import("worker_threads").WorkerOptions | undefined;
30
- workerTerminateTimeout: number | undefined;
31
- requestQueue: any[];
32
- processing: any;
33
- terminating: boolean;
34
- terminated: boolean;
35
- cleaning: boolean;
36
- terminationHandler: Function | null;
37
- lastId: number;
38
- /**
39
- * Get a list with methods available on the worker.
40
- * @return {Promise.<String[], Error>} methods
41
- */
42
- methods(): Promise<string[], Error>;
43
- /**
44
- * Execute a method with given parameters on the worker
45
- * @param {String} method
46
- * @param {Array} [params]
47
- * @param {{resolve: Function, reject: Function}} [resolver]
48
- * @param {import('./types.js').ExecOptions} [options]
49
- * @return {Promise.<*, Error>} result
50
- */
51
- exec(method: string, params?: any[] | undefined, resolver?: {
52
- resolve: Function;
53
- reject: Function;
54
- } | undefined, options?: import("./types.js").ExecOptions | undefined): Promise<any, Error>;
55
- /**
56
- * Test whether the worker is processing any tasks or cleaning up before termination.
57
- * @return {boolean} Returns true if the worker is busy
58
- */
59
- busy(): boolean;
60
- /**
61
- * Terminate the worker.
62
- * @param {boolean} [force=false] If false (default), the worker is terminated
63
- * after finishing all tasks currently in
64
- * progress. If true, the worker will be
65
- * terminated immediately.
66
- * @param {function} [callback=null] If provided, will be called when process terminates.
67
- */
68
- terminate(force?: boolean | undefined, callback?: Function | undefined): void;
69
- /**
70
- * Terminate the worker, returning a Promise that resolves when the termination has been done.
71
- * @param {boolean} [force=false] If false (default), the worker is terminated
72
- * after finishing all tasks currently in
73
- * progress. If true, the worker will be
74
- * terminated immediately.
75
- * @param {number} [timeout] If provided and non-zero, worker termination promise will be rejected
76
- * after timeout if worker process has not been terminated.
77
- * @return {Promise.<WorkerHandler, Error>}
78
- */
79
- terminateAndNotify(force?: boolean | undefined, timeout?: number | undefined): Promise<WorkerHandler, Error>;
80
- }
81
- declare namespace WorkerHandler {
82
- export { tryRequireWorkerThreads as _tryRequireWorkerThreads, setupProcessWorker as _setupProcessWorker, setupBrowserWorker as _setupBrowserWorker, setupWorkerThreadWorker as _setupWorkerThreadWorker, ensureWorkerThreads };
83
- }
84
- import { Promise } from "./Promise";
85
- declare function tryRequireWorkerThreads(): typeof import("worker_threads") | null;
86
- declare function setupProcessWorker(script: any, options: any, child_process: any): any;
87
- declare function setupBrowserWorker(script: any, workerOpts: any, Worker: any): any;
88
- declare function setupWorkerThreadWorker(script: any, WorkerThreads: any, options: any): any;
89
- declare function ensureWorkerThreads(): typeof import("worker_threads");
@@ -1,8 +0,0 @@
1
- export = DebugPortAllocator;
2
- declare function DebugPortAllocator(): void;
3
- declare class DebugPortAllocator {
4
- ports: any;
5
- length: number;
6
- nextAvailableStartingAt(starting: any): any;
7
- releasePort(port: any): void;
8
- }
@@ -1,4 +0,0 @@
1
- export const platform: "node" | "browser";
2
- export const isMainThread: boolean;
3
- export const cpus: number;
4
- export function isNode(nodeProcess: any): boolean;
@@ -1,2 +0,0 @@
1
- declare const _exports: string;
2
- export = _exports;
@@ -1,43 +0,0 @@
1
- export const Transfer: typeof import("./transfer");
2
- export type Pool = import("./Pool");
3
- export type WorkerPoolOptions = import("./types.js").WorkerPoolOptions;
4
- export type WorkerRegisterOptions = import("./types.js").WorkerRegisterOptions;
5
- /**
6
- * <T>
7
- */
8
- export type Proxy<T extends {
9
- [k: string]: (...args: any[]) => any;
10
- }> = import('./types.js').Proxy<T>;
11
- /**
12
- * @overload
13
- * Create a new worker pool
14
- * @param {WorkerPoolOptions} [script]
15
- * @returns {Pool} pool
16
- */
17
- export function pool(script?: import("./types.js").WorkerPoolOptions | undefined): import("./Pool");
18
- /**
19
- * @overload
20
- * Create a new worker pool
21
- * @param {string} [script]
22
- * @param {WorkerPoolOptions} [options]
23
- * @returns {Pool} pool
24
- */
25
- export function pool(script?: string | undefined, options?: import("./types.js").WorkerPoolOptions | undefined): import("./Pool");
26
- /**
27
- * Create a worker and optionally register a set of methods to the worker.
28
- * @param {{ [k: string]: (...args: any[]) => any }} [methods]
29
- * @param {WorkerRegisterOptions} [options]
30
- */
31
- export function worker(methods?: {
32
- [k: string]: (...args: any[]) => any;
33
- } | undefined, options?: import("./types.js").WorkerRegisterOptions | undefined): void;
34
- /**
35
- * Sends an event to the parent worker pool.
36
- * @param {any} payload
37
- */
38
- export function workerEmit(payload: any): void;
39
- import { Promise } from "./Promise";
40
- import { platform } from "./environment";
41
- import { isMainThread } from "./environment";
42
- import { cpus } from "./environment";
43
- export { Promise, platform, isMainThread, cpus };
@@ -1,19 +0,0 @@
1
- export = Transfer;
2
- /**
3
- * The helper class for transferring data from the worker to the main thread.
4
- *
5
- * @param {Object} message The object to deliver to the main thread.
6
- * @param {Object[]} transfer An array of transferable Objects to transfer ownership of.
7
- */
8
- declare function Transfer(message: Object, transfer: Object[]): void;
9
- declare class Transfer {
10
- /**
11
- * The helper class for transferring data from the worker to the main thread.
12
- *
13
- * @param {Object} message The object to deliver to the main thread.
14
- * @param {Object[]} transfer An array of transferable Objects to transfer ownership of.
15
- */
16
- constructor(message: Object, transfer: Object[]);
17
- message: Object;
18
- transfer: Object[];
19
- }
@@ -1,99 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- export type WorkerArg = {
4
- /**
5
- * The `forkArgs` option of this pool
6
- */
7
- forkArgs?: string[] | undefined;
8
- /**
9
- * The `forkOpts` option of this pool
10
- */
11
- forkOpts?: import("child_process").ForkOptions | undefined;
12
- /**
13
- * The `workerOpts` option of this pool
14
- */
15
- workerOpts?: WorkerOptions | undefined;
16
- /**
17
- * The `workerThreadOpts` option of this pool
18
- */
19
- workerThreadOpts?: import("worker_threads").WorkerOptions | undefined;
20
- /**
21
- * The `script` option of this pool
22
- */
23
- script?: string | undefined;
24
- };
25
- export type WorkerPoolOptions = {
26
- /**
27
- * The minimum number of workers that must be initialized and kept available. Setting this to `'max'` will create `maxWorkers` default workers
28
- */
29
- minWorkers?: number | "max" | undefined;
30
- /**
31
- * The default number of maxWorkers is the number of CPU's minus one. When the number of CPU's could not be determined (for example in older browsers), `maxWorkers` is set to 3.
32
- */
33
- maxWorkers?: number | undefined;
34
- /**
35
- * The maximum number of tasks allowed to be queued. Can be used to prevent running out of memory. If the maximum is exceeded, adding a new task will throw an error. The default value is `Infinity`.
36
- */
37
- maxQueueSize?: number | undefined;
38
- /**
39
- * - In case of `'auto'` (default), workerpool will automatically pick a suitable type of worker: when in a browser environment, `'web'` will be used. When in a node.js environment, `worker_threads` will be used if available (Node.js >= 11.7.0), else `child_process` will be used.
40
- * - In case of `'web'`, a Web Worker will be used. Only available in a browser environment.
41
- * - In case of `'process'`, `child_process` will be used. Only available in a node.js environment.
42
- * - In case of `'thread'`, `worker_threads` will be used. If `worker_threads` are not available, an error is thrown. Only available in a node.js environment.
43
- */
44
- workerType?: "auto" | "web" | "process" | "thread" | undefined;
45
- /**
46
- * The timeout in milliseconds to wait for a worker to clean up it's resources on termination before stopping it forcefully. Default value is `1000`.
47
- */
48
- workerTerminateTimeout?: number | undefined;
49
- /**
50
- * For `process` worker type. An array passed as `args` to [child_process.fork](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options)
51
- */
52
- forkArgs?: string[] | undefined;
53
- /**
54
- * For `process` worker type. An object passed as `options` to [child_process.fork](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options).
55
- */
56
- forkOpts?: import("child_process").ForkOptions | undefined;
57
- /**
58
- * For `web` worker type. An object passed to the [constructor of the web worker](https://html.spec.whatwg.org/multipage/workers.html#dom-worker). See [WorkerOptions specification](https://html.spec.whatwg.org/multipage/workers.html#workeroptions) for available options.
59
- */
60
- workerOpts?: WorkerOptions | undefined;
61
- /**
62
- * Object`. For `worker` worker type. An object passed to [worker_threads.options](https://nodejs.org/api/worker_threads.html#new-workerfilename-options).
63
- */
64
- workerThreadOpts?: import("worker_threads").WorkerOptions | undefined;
65
- /**
66
- * Capture stdout and stderr from the worker and emit them via the `stdout` and `stderr` events. Not supported by the `web` worker type.
67
- */
68
- emitStdStreams?: boolean | undefined;
69
- /**
70
- * A callback that is called whenever a worker is being created. It can be used to allocate resources for each worker for example. Optionally, this callback can return an object containing one or more of the `WorkerArg` properties. The provided properties will be used to override the Pool properties for the worker being created.
71
- */
72
- onCreateWorker?: ((arg: WorkerArg) => WorkerArg | undefined) | undefined;
73
- /**
74
- * A callback that is called whenever a worker is being terminated. It can be used to release resources that might have been allocated for this specific worker. The callback is passed as argument an object as described for `onCreateWorker`, with each property sets with the value for the worker being terminated.
75
- */
76
- onTerminateWorker?: ((arg: WorkerArg) => void) | undefined;
77
- };
78
- export type ExecOptions = {
79
- /**
80
- * An event listener, to handle events sent by the worker for this execution.
81
- */
82
- on?: ((payload: any) => unknown) | undefined;
83
- /**
84
- * A list of transferable objects to send to the worker. Not supported by `process` worker type. See ./examples/transferableObjects.js for usage.
85
- */
86
- transfer?: Object[] | undefined;
87
- };
88
- export type WorkerRegisterOptions = {
89
- /**
90
- * A callback that is called whenever a worker is being terminated. It can be used to release resources that might have been allocated for this specific worker. The difference with pool's `onTerminateWorker` is that this callback runs in the worker context, while onTerminateWorker is executed on the main thread.
91
- */
92
- onTerminate?: ((code: number | undefined) => PromiseLike<void> | void) | undefined;
93
- };
94
- /**
95
- * <T>
96
- */
97
- export type Proxy<T extends {
98
- [k: string]: (...args: any[]) => any;
99
- }> = { [M in keyof T]: (...args: Parameters<T[M]>) => import("./Promise.js").Promise<ReturnType<T[M]>, Error>; };
@@ -1,4 +0,0 @@
1
- export function validateOptions(options: Object | undefined, allowedOptionNames: string[], objectName: string): Object | undefined;
2
- export const workerOptsNames: string[];
3
- export const forkOptsNames: string[];
4
- export const workerThreadOptsNames: string[];
@@ -1,8 +0,0 @@
1
- /**
2
- * Register methods to the worker
3
- * @param {Object} [methods]
4
- * @param {import('./types.js').WorkerRegisterOptions} [options]
5
- */
6
- declare function register(methods?: Object | undefined, options?: import("./types.js").WorkerRegisterOptions | undefined): void;
7
- export function emit(payload: any): void;
8
- export { register as add };
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "{}"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,10 +0,0 @@
1
- # @aws-sdk/middleware-recursion-detection
2
-
3
- [![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-recursion-detection/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-recursion-detection)
4
- [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-recursion-detection.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-recursion-detection)
5
-
6
- > An internal package
7
-
8
- ## Usage
9
-
10
- You probably shouldn't, at least directly.
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRecursionDetectionPlugin = exports.addRecursionDetectionMiddlewareOptions = exports.recursionDetectionMiddleware = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
5
- const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
6
- const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
7
- const ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
8
- const recursionDetectionMiddleware = (options) => (next) => async (args) => {
9
- const { request } = args;
10
- if (!protocol_http_1.HttpRequest.isInstance(request) ||
11
- options.runtime !== "node" ||
12
- request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) {
13
- return next(args);
14
- }
15
- const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
16
- const traceId = process.env[ENV_TRACE_ID];
17
- const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
18
- if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
19
- request.headers[TRACE_ID_HEADER_NAME] = traceId;
20
- }
21
- return next({
22
- ...args,
23
- request,
24
- });
25
- };
26
- exports.recursionDetectionMiddleware = recursionDetectionMiddleware;
27
- exports.addRecursionDetectionMiddlewareOptions = {
28
- step: "build",
29
- tags: ["RECURSION_DETECTION"],
30
- name: "recursionDetectionMiddleware",
31
- override: true,
32
- priority: "low",
33
- };
34
- const getRecursionDetectionPlugin = (options) => ({
35
- applyToStack: (clientStack) => {
36
- clientStack.add((0, exports.recursionDetectionMiddleware)(options), exports.addRecursionDetectionMiddlewareOptions);
37
- },
38
- });
39
- exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin;
@@ -1,34 +0,0 @@
1
- import { HttpRequest } from "@smithy/protocol-http";
2
- const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
3
- const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
4
- const ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
5
- export const recursionDetectionMiddleware = (options) => (next) => async (args) => {
6
- const { request } = args;
7
- if (!HttpRequest.isInstance(request) ||
8
- options.runtime !== "node" ||
9
- request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) {
10
- return next(args);
11
- }
12
- const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
13
- const traceId = process.env[ENV_TRACE_ID];
14
- const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
15
- if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
16
- request.headers[TRACE_ID_HEADER_NAME] = traceId;
17
- }
18
- return next({
19
- ...args,
20
- request,
21
- });
22
- };
23
- export const addRecursionDetectionMiddlewareOptions = {
24
- step: "build",
25
- tags: ["RECURSION_DETECTION"],
26
- name: "recursionDetectionMiddleware",
27
- override: true,
28
- priority: "low",
29
- };
30
- export const getRecursionDetectionPlugin = (options) => ({
31
- applyToStack: (clientStack) => {
32
- clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);
33
- },
34
- });
@@ -1,18 +0,0 @@
1
- import { AbsoluteLocation, BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types";
2
- interface PreviouslyResolved {
3
- runtime: string;
4
- }
5
- /**
6
- * Inject to trace ID to request header to detect recursion invocation in Lambda.
7
- * @internal
8
- */
9
- export declare const recursionDetectionMiddleware: (options: PreviouslyResolved) => BuildMiddleware<any, any>;
10
- /**
11
- * @internal
12
- */
13
- export declare const addRecursionDetectionMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation;
14
- /**
15
- * @internal
16
- */
17
- export declare const getRecursionDetectionPlugin: (options: PreviouslyResolved) => Pluggable<any, any>;
18
- export {};
@@ -1,18 +0,0 @@
1
- import {
2
- AbsoluteLocation,
3
- BuildHandlerOptions,
4
- BuildMiddleware,
5
- Pluggable,
6
- } from "@smithy/types";
7
- interface PreviouslyResolved {
8
- runtime: string;
9
- }
10
- export declare const recursionDetectionMiddleware: (
11
- options: PreviouslyResolved
12
- ) => BuildMiddleware<any, any>;
13
- export declare const addRecursionDetectionMiddlewareOptions: BuildHandlerOptions &
14
- AbsoluteLocation;
15
- export declare const getRecursionDetectionPlugin: (
16
- options: PreviouslyResolved
17
- ) => Pluggable<any, any>;
18
- export {};