@webiny/api-websockets-ddb 0.0.0-unstable.0d717d18dd → 0.0.0-unstable.a4f3e4ea8b

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.
package/index.d.ts CHANGED
@@ -1,2 +1,6 @@
1
+ import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
1
2
  export { WebsocketsConnectionRegistry } from "./WebsocketsConnectionRegistry.js";
2
- export { WebsocketsDdbFeature } from "./WebsocketsDdbFeature.js";
3
+ interface RegisterWebsocketsDdbStorageOperationsParams {
4
+ documentClient: DynamoDBDocument;
5
+ }
6
+ export declare const registerWebsocketsDdbStorageOperations: (params: RegisterWebsocketsDdbStorageOperationsParams) => import("@webiny/handler").RegisterExtensionPlugin<import("@webiny/handler/types.js").Context>;
package/index.js CHANGED
@@ -1,2 +1,10 @@
1
- export { WebsocketsConnectionRegistry } from "./WebsocketsConnectionRegistry.js";
2
- export { WebsocketsDdbFeature } from "./WebsocketsDdbFeature.js";
1
+ import { createRegisterExtensionPlugin } from "@webiny/handler";
2
+ import { WebsocketsConnectionRegistry } from "./WebsocketsConnectionRegistry.js";
3
+ import { ConnectionRegistry } from "@webiny/api-websockets/features/ConnectionRegistry/abstractions.js";
4
+ const registerWebsocketsDdbStorageOperations = (params)=>createRegisterExtensionPlugin((context)=>{
5
+ const registry = new WebsocketsConnectionRegistry(params.documentClient);
6
+ context.container.registerInstance(ConnectionRegistry, registry);
7
+ });
8
+ export { WebsocketsConnectionRegistry, registerWebsocketsDdbStorageOperations };
9
+
10
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport { createRegisterExtensionPlugin } from \"@webiny/handler\";\nimport { WebsocketsConnectionRegistry } from \"./WebsocketsConnectionRegistry.js\";\nimport { ConnectionRegistry } from \"@webiny/api-websockets/features/ConnectionRegistry/abstractions.js\";\n\nexport { WebsocketsConnectionRegistry } from \"./WebsocketsConnectionRegistry.js\";\n\ninterface RegisterWebsocketsDdbStorageOperationsParams {\n documentClient: DynamoDBDocument;\n}\n\nexport const registerWebsocketsDdbStorageOperations = (\n params: RegisterWebsocketsDdbStorageOperationsParams\n) => {\n return createRegisterExtensionPlugin(context => {\n const registry = new WebsocketsConnectionRegistry(params.documentClient);\n context.container.registerInstance(ConnectionRegistry, registry);\n });\n};\n"],"names":["registerWebsocketsDdbStorageOperations","params","createRegisterExtensionPlugin","context","registry","WebsocketsConnectionRegistry","ConnectionRegistry"],"mappings":";;;AAWO,MAAMA,yCAAyC,CAClDC,SAEOC,8BAA8BC,CAAAA;QACjC,MAAMC,WAAW,IAAIC,6BAA6BJ,OAAO,cAAc;QACvEE,QAAQ,SAAS,CAAC,gBAAgB,CAACG,oBAAoBF;IAC3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-websockets-ddb",
3
- "version": "0.0.0-unstable.0d717d18dd",
3
+ "version": "0.0.0-unstable.a4f3e4ea8b",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "@webiny/api-websockets",
@@ -21,15 +21,15 @@
21
21
  "./*": "./*"
22
22
  },
23
23
  "dependencies": {
24
- "@webiny/api-websockets": "0.0.0-unstable.0d717d18dd",
25
- "@webiny/aws-sdk": "0.0.0-unstable.0d717d18dd",
26
- "@webiny/db-dynamodb": "0.0.0-unstable.0d717d18dd",
27
- "@webiny/error": "0.0.0-unstable.0d717d18dd",
28
- "@webiny/feature": "0.0.0-unstable.0d717d18dd"
24
+ "@webiny/api-websockets": "0.0.0-unstable.a4f3e4ea8b",
25
+ "@webiny/aws-sdk": "0.0.0-unstable.a4f3e4ea8b",
26
+ "@webiny/db-dynamodb": "0.0.0-unstable.a4f3e4ea8b",
27
+ "@webiny/error": "0.0.0-unstable.a4f3e4ea8b",
28
+ "@webiny/handler": "0.0.0-unstable.a4f3e4ea8b"
29
29
  },
30
30
  "devDependencies": {
31
- "@webiny/build-tools": "0.0.0-unstable.0d717d18dd",
32
- "@webiny/project-utils": "0.0.0-unstable.0d717d18dd",
31
+ "@webiny/build-tools": "0.0.0-unstable.a4f3e4ea8b",
32
+ "@webiny/project-utils": "0.0.0-unstable.a4f3e4ea8b",
33
33
  "rimraf": "6.1.3",
34
34
  "typescript": "7.0.2",
35
35
  "vitest": "4.1.10"
@@ -1,5 +0,0 @@
1
- import { type Container } from "@webiny/feature/api";
2
- export declare const WebsocketsDdbFeature: {
3
- name: string;
4
- register(container: Container): void;
5
- };
@@ -1,16 +0,0 @@
1
- import { createFeature } from "@webiny/feature/api";
2
- import { DynamoDBClient } from "@webiny/db-dynamodb";
3
- import { ConnectionRegistry } from "@webiny/api-websockets/features/ConnectionRegistry/abstractions.js";
4
- import { WebsocketsConnectionRegistry } from "./WebsocketsConnectionRegistry.js";
5
- const WebsocketsDdbFeature = createFeature({
6
- name: "WebsocketsDdb",
7
- register (container) {
8
- container.registerFactory(ConnectionRegistry, ()=>{
9
- const db = container.resolve(DynamoDBClient);
10
- return new WebsocketsConnectionRegistry(db.client);
11
- });
12
- }
13
- });
14
- export { WebsocketsDdbFeature };
15
-
16
- //# sourceMappingURL=WebsocketsDdbFeature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebsocketsDdbFeature.js","sources":["../src/WebsocketsDdbFeature.ts"],"sourcesContent":["import { type Container, createFeature } from \"@webiny/feature/api\";\nimport { DynamoDBClient } from \"@webiny/db-dynamodb\";\nimport { ConnectionRegistry } from \"@webiny/api-websockets/features/ConnectionRegistry/abstractions.js\";\nimport { WebsocketsConnectionRegistry } from \"./WebsocketsConnectionRegistry.js\";\n\nexport const WebsocketsDdbFeature = createFeature({\n name: \"WebsocketsDdb\",\n register(container: Container) {\n container.registerFactory(ConnectionRegistry, () => {\n const db = container.resolve(DynamoDBClient);\n return new WebsocketsConnectionRegistry(db.client);\n });\n }\n});\n"],"names":["WebsocketsDdbFeature","createFeature","container","ConnectionRegistry","db","DynamoDBClient","WebsocketsConnectionRegistry"],"mappings":";;;;AAKO,MAAMA,uBAAuBC,cAAc;IAC9C,MAAM;IACN,UAASC,SAAoB;QACzBA,UAAU,eAAe,CAACC,oBAAoB;YAC1C,MAAMC,KAAKF,UAAU,OAAO,CAACG;YAC7B,OAAO,IAAIC,6BAA6BF,GAAG,MAAM;QACrD;IACJ;AACJ"}