serverless-spy 0.0.10 → 0.0.13

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 (172) hide show
  1. package/.jsii +7 -4
  2. package/lib/{cjs/cli → cli}/cli.d.ts +0 -0
  3. package/lib/cli/cli.js +87 -0
  4. package/lib/cli/cli.mjs +85 -0
  5. package/lib/{cjs/cli → cli}/ws.d.ts +0 -0
  6. package/lib/cli/ws.js +68 -0
  7. package/lib/cli/ws.mjs +66 -0
  8. package/lib/{cjs/common → common}/getWebSocketUrl.d.ts +0 -0
  9. package/lib/common/getWebSocketUrl.js +57 -0
  10. package/lib/common/getWebSocketUrl.mjs +53 -0
  11. package/lib/common/spyEvents/DynamoDBSpyEvent.d.ts +10 -0
  12. package/lib/common/spyEvents/DynamoDBSpyEvent.js +3 -0
  13. package/lib/common/spyEvents/DynamoDBSpyEvent.mjs +2 -0
  14. package/lib/common/spyEvents/EventBridgeRuleSpyEvent.d.ts +9 -0
  15. package/lib/common/spyEvents/EventBridgeRuleSpyEvent.js +3 -0
  16. package/lib/common/spyEvents/EventBridgeRuleSpyEvent.mjs +2 -0
  17. package/lib/common/spyEvents/EventBridgeSpyEvent.d.ts +9 -0
  18. package/lib/common/spyEvents/EventBridgeSpyEvent.js +3 -0
  19. package/lib/common/spyEvents/EventBridgeSpyEvent.mjs +2 -0
  20. package/lib/common/spyEvents/FunctionConsoleSpyEvent.d.ts +10 -0
  21. package/lib/common/spyEvents/FunctionConsoleSpyEvent.js +3 -0
  22. package/lib/common/spyEvents/FunctionConsoleSpyEvent.mjs +2 -0
  23. package/lib/common/spyEvents/FunctionContext.d.ts +7 -0
  24. package/lib/common/spyEvents/FunctionContext.js +3 -0
  25. package/lib/common/spyEvents/FunctionContext.mjs +2 -0
  26. package/lib/common/spyEvents/FunctionErrorSpyEvent.d.ts +8 -0
  27. package/lib/common/spyEvents/FunctionErrorSpyEvent.js +3 -0
  28. package/lib/common/spyEvents/FunctionErrorSpyEvent.mjs +2 -0
  29. package/lib/common/spyEvents/FunctionRequestSpyEvent.d.ts +7 -0
  30. package/lib/common/spyEvents/FunctionRequestSpyEvent.js +3 -0
  31. package/lib/common/spyEvents/FunctionRequestSpyEvent.mjs +2 -0
  32. package/lib/common/spyEvents/FunctionResponseSpyEvent.d.ts +8 -0
  33. package/lib/common/spyEvents/FunctionResponseSpyEvent.js +3 -0
  34. package/lib/common/spyEvents/FunctionResponseSpyEvent.mjs +2 -0
  35. package/lib/common/spyEvents/S3SpyEvent.d.ts +8 -0
  36. package/lib/common/spyEvents/S3SpyEvent.js +3 -0
  37. package/lib/common/spyEvents/S3SpyEvent.mjs +2 -0
  38. package/lib/common/spyEvents/SnsSubscriptionSpyEvent.d.ts +11 -0
  39. package/lib/common/spyEvents/SnsSubscriptionSpyEvent.js +3 -0
  40. package/lib/common/spyEvents/SnsSubscriptionSpyEvent.mjs +2 -0
  41. package/lib/common/spyEvents/SnsTopicSpyEvent.d.ts +11 -0
  42. package/lib/common/spyEvents/SnsTopicSpyEvent.js +3 -0
  43. package/lib/common/spyEvents/SnsTopicSpyEvent.mjs +2 -0
  44. package/lib/common/spyEvents/SpyEvent.d.ts +3 -0
  45. package/lib/common/spyEvents/SpyEvent.js +3 -0
  46. package/lib/common/spyEvents/SpyEvent.mjs +2 -0
  47. package/lib/common/spyEvents/SpyMessage.d.ts +6 -0
  48. package/lib/common/spyEvents/SpyMessage.js +3 -0
  49. package/lib/common/spyEvents/SpyMessage.mjs +2 -0
  50. package/lib/common/spyEvents/SqsSpyEvent.d.ts +7 -0
  51. package/lib/common/spyEvents/SqsSpyEvent.js +3 -0
  52. package/lib/common/spyEvents/SqsSpyEvent.mjs +2 -0
  53. package/lib/{cjs/index.d.ts → index.d.ts} +0 -0
  54. package/lib/{cjs/index.js → index.js} +1 -1
  55. package/lib/index.mjs +3 -0
  56. package/lib/{cjs/listener → listener}/PrettifyForDisplay.d.ts +0 -0
  57. package/lib/listener/PrettifyForDisplay.js +3 -0
  58. package/lib/listener/PrettifyForDisplay.mjs +2 -0
  59. package/lib/{cjs/listener → listener}/RecursivePartial.d.ts +0 -0
  60. package/lib/listener/RecursivePartial.js +3 -0
  61. package/lib/listener/RecursivePartial.mjs +2 -0
  62. package/lib/{mjs/listener → listener}/SpyHandlers.ts.d.ts +11 -11
  63. package/lib/listener/SpyHandlers.ts.js +3 -0
  64. package/lib/listener/SpyHandlers.ts.mjs +2 -0
  65. package/lib/{mjs/listener → listener}/SpyListener.d.ts +10 -10
  66. package/lib/listener/SpyListener.js +3 -0
  67. package/lib/listener/SpyListener.mjs +2 -0
  68. package/lib/{mjs/listener → listener}/createServerlessSpyListener.d.ts +1 -1
  69. package/lib/listener/createServerlessSpyListener.js +167 -0
  70. package/lib/listener/createServerlessSpyListener.mjs +163 -0
  71. package/lib/{cjs/listener → listener}/index.d.ts +0 -0
  72. package/lib/{cjs/listener → listener}/index.js +1 -1
  73. package/lib/listener/index.mjs +3 -0
  74. package/lib/{cjs/listener → listener}/matchers.d.ts +0 -0
  75. package/lib/listener/matchers.js +55 -0
  76. package/lib/listener/matchers.mjs +55 -0
  77. package/lib/{cjs/listener → listener}/setup.d.ts +0 -0
  78. package/lib/listener/setup.js +21 -0
  79. package/lib/listener/setup.mjs +21 -0
  80. package/lib/{cjs/src → src}/ServerlessSpy.d.ts +0 -0
  81. package/lib/{cjs/src → src}/ServerlessSpy.js +1 -1
  82. package/lib/src/ServerlessSpy.mjs +293 -0
  83. package/lib/{cjs/src → src}/index.d.ts +0 -0
  84. package/lib/{cjs/src → src}/index.js +0 -0
  85. package/lib/src/index.mjs +2 -0
  86. package/listener/SpyHandlers.ts.ts +11 -11
  87. package/listener/SpyListener.ts +10 -10
  88. package/listener/createServerlessSpyListener.ts +4 -5
  89. package/{cli/node_modules → node_modules}/ws/LICENSE +0 -0
  90. package/{cli/node_modules → node_modules}/ws/README.md +0 -0
  91. package/{cli/node_modules → node_modules}/ws/browser.js +0 -0
  92. package/{cli/node_modules → node_modules}/ws/index.js +0 -0
  93. package/{cli/node_modules → node_modules}/ws/lib/buffer-util.js +0 -0
  94. package/{cli/node_modules → node_modules}/ws/lib/constants.js +0 -0
  95. package/{cli/node_modules → node_modules}/ws/lib/event-target.js +0 -0
  96. package/{cli/node_modules → node_modules}/ws/lib/extension.js +0 -0
  97. package/{cli/node_modules → node_modules}/ws/lib/limiter.js +0 -0
  98. package/{cli/node_modules → node_modules}/ws/lib/permessage-deflate.js +0 -0
  99. package/{cli/node_modules → node_modules}/ws/lib/receiver.js +0 -0
  100. package/{cli/node_modules → node_modules}/ws/lib/sender.js +0 -0
  101. package/{cli/node_modules → node_modules}/ws/lib/stream.js +0 -0
  102. package/{cli/node_modules → node_modules}/ws/lib/subprotocol.js +0 -0
  103. package/{cli/node_modules → node_modules}/ws/lib/validation.js +0 -0
  104. package/{cli/node_modules → node_modules}/ws/lib/websocket-server.js +0 -0
  105. package/{cli/node_modules → node_modules}/ws/lib/websocket.js +0 -0
  106. package/{cli/node_modules → node_modules}/ws/package.json +0 -0
  107. package/{cli/node_modules → node_modules}/ws/wrapper.mjs +0 -0
  108. package/package.json +17 -14
  109. package/tsconfig.npm.json +1 -0
  110. package/cli/package-lock.json +0 -2356
  111. package/cli/package.json +0 -14
  112. package/common/package.json +0 -22
  113. package/lib/cjs/cli/cli.js +0 -87
  114. package/lib/cjs/cli/ws.js +0 -68
  115. package/lib/cjs/common/getWebSocketUrl.js +0 -57
  116. package/lib/cjs/listener/PrettifyForDisplay.js +0 -3
  117. package/lib/cjs/listener/RecursivePartial.js +0 -3
  118. package/lib/cjs/listener/SpyHandlers.ts.d.ts +0 -109
  119. package/lib/cjs/listener/SpyHandlers.ts.js +0 -3
  120. package/lib/cjs/listener/SpyListener.d.ts +0 -40
  121. package/lib/cjs/listener/SpyListener.js +0 -3
  122. package/lib/cjs/listener/createServerlessSpyListener.d.ts +0 -13
  123. package/lib/cjs/listener/createServerlessSpyListener.js +0 -167
  124. package/lib/cjs/listener/matchers.js +0 -55
  125. package/lib/cjs/listener/setup.js +0 -21
  126. package/lib/mjs/cli/cli.d.ts +0 -1
  127. package/lib/mjs/cli/cli.js +0 -85
  128. package/lib/mjs/cli/ws.d.ts +0 -1
  129. package/lib/mjs/cli/ws.js +0 -66
  130. package/lib/mjs/common/getWebSocketUrl.d.ts +0 -2
  131. package/lib/mjs/common/getWebSocketUrl.js +0 -53
  132. package/lib/mjs/index.d.ts +0 -2
  133. package/lib/mjs/index.js +0 -3
  134. package/lib/mjs/listener/PrettifyForDisplay.d.ts +0 -3
  135. package/lib/mjs/listener/PrettifyForDisplay.js +0 -2
  136. package/lib/mjs/listener/RecursivePartial.d.ts +0 -4
  137. package/lib/mjs/listener/RecursivePartial.js +0 -2
  138. package/lib/mjs/listener/SpyHandlers.ts.js +0 -2
  139. package/lib/mjs/listener/SpyListener.js +0 -2
  140. package/lib/mjs/listener/createServerlessSpyListener.js +0 -163
  141. package/lib/mjs/listener/index.d.ts +0 -2
  142. package/lib/mjs/listener/index.js +0 -3
  143. package/lib/mjs/listener/matchers.d.ts +0 -0
  144. package/lib/mjs/listener/matchers.js +0 -55
  145. package/lib/mjs/listener/setup.d.ts +0 -0
  146. package/lib/mjs/listener/setup.js +0 -21
  147. package/lib/mjs/src/ServerlessSpy.d.ts +0 -27
  148. package/lib/mjs/src/ServerlessSpy.js +0 -293
  149. package/lib/mjs/src/index.d.ts +0 -1
  150. package/lib/mjs/src/index.js +0 -2
  151. package/listener/node_modules/ws/LICENSE +0 -19
  152. package/listener/node_modules/ws/README.md +0 -495
  153. package/listener/node_modules/ws/browser.js +0 -8
  154. package/listener/node_modules/ws/index.js +0 -13
  155. package/listener/node_modules/ws/lib/buffer-util.js +0 -127
  156. package/listener/node_modules/ws/lib/constants.js +0 -12
  157. package/listener/node_modules/ws/lib/event-target.js +0 -266
  158. package/listener/node_modules/ws/lib/extension.js +0 -203
  159. package/listener/node_modules/ws/lib/limiter.js +0 -55
  160. package/listener/node_modules/ws/lib/permessage-deflate.js +0 -511
  161. package/listener/node_modules/ws/lib/receiver.js +0 -618
  162. package/listener/node_modules/ws/lib/sender.js +0 -478
  163. package/listener/node_modules/ws/lib/stream.js +0 -159
  164. package/listener/node_modules/ws/lib/subprotocol.js +0 -62
  165. package/listener/node_modules/ws/lib/validation.js +0 -125
  166. package/listener/node_modules/ws/lib/websocket-server.js +0 -535
  167. package/listener/node_modules/ws/lib/websocket.js +0 -1305
  168. package/listener/node_modules/ws/package.json +0 -61
  169. package/listener/node_modules/ws/wrapper.mjs +0 -8
  170. package/listener/package.json +0 -19
  171. package/listener/tsconfig.dev.json +0 -16
  172. package/listener/tsconfig.json +0 -16
@@ -1,61 +0,0 @@
1
- {
2
- "name": "ws",
3
- "version": "8.8.1",
4
- "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
5
- "keywords": [
6
- "HyBi",
7
- "Push",
8
- "RFC-6455",
9
- "WebSocket",
10
- "WebSockets",
11
- "real-time"
12
- ],
13
- "homepage": "https://github.com/websockets/ws",
14
- "bugs": "https://github.com/websockets/ws/issues",
15
- "repository": "websockets/ws",
16
- "author": "Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)",
17
- "license": "MIT",
18
- "main": "index.js",
19
- "exports": {
20
- "import": "./wrapper.mjs",
21
- "require": "./index.js"
22
- },
23
- "browser": "browser.js",
24
- "engines": {
25
- "node": ">=10.0.0"
26
- },
27
- "files": [
28
- "browser.js",
29
- "index.js",
30
- "lib/*.js",
31
- "wrapper.mjs"
32
- ],
33
- "scripts": {
34
- "test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js",
35
- "integration": "mocha --throw-deprecation test/*.integration.js",
36
- "lint": "eslint --ignore-path .gitignore . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
37
- },
38
- "peerDependencies": {
39
- "bufferutil": "^4.0.1",
40
- "utf-8-validate": "^5.0.2"
41
- },
42
- "peerDependenciesMeta": {
43
- "bufferutil": {
44
- "optional": true
45
- },
46
- "utf-8-validate": {
47
- "optional": true
48
- }
49
- },
50
- "devDependencies": {
51
- "benchmark": "^2.1.4",
52
- "bufferutil": "^4.0.1",
53
- "eslint": "^8.0.0",
54
- "eslint-config-prettier": "^8.1.0",
55
- "eslint-plugin-prettier": "^4.0.0",
56
- "mocha": "^8.4.0",
57
- "nyc": "^15.0.0",
58
- "prettier": "^2.0.5",
59
- "utf-8-validate": "^5.0.2"
60
- }
61
- }
@@ -1,8 +0,0 @@
1
- import createWebSocketStream from './lib/stream.js';
2
- import Receiver from './lib/receiver.js';
3
- import Sender from './lib/sender.js';
4
- import WebSocket from './lib/websocket.js';
5
- import WebSocketServer from './lib/websocket-server.js';
6
-
7
- export { createWebSocketStream, Receiver, Sender, WebSocket, WebSocketServer };
8
- export default WebSocket;
@@ -1,19 +0,0 @@
1
- {
2
- "name": "serverless-spy-listener",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "author": "",
10
- "license": "ISC",
11
- "dependencies": {
12
- "ws": "^8.8.1",
13
- "serverless-spy-common": "*",
14
- "@aws-sdk/types": "^3.127.0"
15
- },
16
- "devDependencies": {
17
- "@types/ws": "^8.5.3"
18
- }
19
- }
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Node 16",
4
- "compilerOptions": {
5
- "lib": ["es2021"],
6
- "module": "esnext",
7
- "target": "es2021",
8
- "strict": true,
9
- "allowSyntheticDefaultImports": true,
10
- "esModuleInterop": true,
11
- "skipLibCheck": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "moduleResolution": "node",
14
- "resolveJsonModule": true
15
- }
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Node 16",
4
- "compilerOptions": {
5
- "lib": ["es2021"],
6
- "module": "esnext",
7
- "target": "es2021",
8
- "strict": true,
9
- "allowSyntheticDefaultImports": true,
10
- "esModuleInterop": true,
11
- "skipLibCheck": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "moduleResolution": "node",
14
- "resolveJsonModule": true
15
- }
16
- }