@webiny/api-websockets-ddb 0.0.0-unstable.9f53ea597d → 6.6.0-alpha.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.
@@ -0,0 +1,5 @@
1
+ import { type Container } from "@webiny/feature/api";
2
+ export declare const WebsocketsDdbFeature: {
3
+ name: string;
4
+ register(container: Container): void;
5
+ };
@@ -0,0 +1,16 @@
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
@@ -0,0 +1 @@
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"}
package/index.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
2
1
  export { WebsocketsConnectionRegistry } from "./WebsocketsConnectionRegistry.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>;
2
+ export { WebsocketsDdbFeature } from "./WebsocketsDdbFeature.js";
package/index.js CHANGED
@@ -1,10 +1,2 @@
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
1
+ export { WebsocketsConnectionRegistry } from "./WebsocketsConnectionRegistry.js";
2
+ export { WebsocketsDdbFeature } from "./WebsocketsDdbFeature.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-websockets-ddb",
3
- "version": "0.0.0-unstable.9f53ea597d",
3
+ "version": "6.6.0-alpha.0",
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.9f53ea597d",
25
- "@webiny/aws-sdk": "0.0.0-unstable.9f53ea597d",
26
- "@webiny/db-dynamodb": "0.0.0-unstable.9f53ea597d",
27
- "@webiny/error": "0.0.0-unstable.9f53ea597d",
28
- "@webiny/handler": "0.0.0-unstable.9f53ea597d"
24
+ "@webiny/api-websockets": "6.6.0-alpha.0",
25
+ "@webiny/aws-sdk": "6.6.0-alpha.0",
26
+ "@webiny/db-dynamodb": "6.6.0-alpha.0",
27
+ "@webiny/error": "6.6.0-alpha.0",
28
+ "@webiny/feature": "6.6.0-alpha.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@webiny/build-tools": "0.0.0-unstable.9f53ea597d",
32
- "@webiny/project-utils": "0.0.0-unstable.9f53ea597d",
31
+ "@webiny/build-tools": "6.6.0-alpha.0",
32
+ "@webiny/project-utils": "6.6.0-alpha.0",
33
33
  "rimraf": "6.1.3",
34
34
  "typescript": "7.0.2",
35
35
  "vitest": "4.1.10"
package/index.js.map DELETED
@@ -1 +0,0 @@
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"}