@webiny/api-event-handler-aws-ddb 6.6.0-alpha.0 → 6.6.0-alpha.2

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.
@@ -3,7 +3,15 @@
3
3
  *
4
4
  * Thin variant over the storage-agnostic base (@webiny/api-event-handler-aws): supplies the DynamoDB
5
5
  * storage wiring (core + CMS + audit-logs + ACO + websockets storage operations). No OpenSearch.
6
+ *
7
+ * Two entry points share that wiring: the buffered API Gateway handler and the response-streaming
8
+ * Function URL handler. They are separate Lambda functions built from the same bundle.
6
9
  */
7
10
  import { type CreateWebinyApiHandlerConfig as BaseConfig } from "@webiny/api-event-handler-aws";
8
11
  export type CreateAwsDdbApiHandlerConfig = Pick<BaseConfig, "extensions" | "documentClient">;
9
12
  export declare function createAwsDdbApiHandler(config: CreateAwsDdbApiHandlerConfig): (event: any, context?: import("aws-lambda").Context) => Promise<any>;
13
+ /**
14
+ * Response-streaming counterpart, for the Lambda function whose Function URL uses
15
+ * `InvokeMode: RESPONSE_STREAM`. Identical storage; only the transport differs.
16
+ */
17
+ export declare function createAwsDdbStreamApiHandler(config: CreateAwsDdbApiHandlerConfig): import("@webiny/event-handler-aws").StreamLambdaHandler;
@@ -1,23 +1,30 @@
1
- import { createWebinyApiHandler } from "@webiny/api-event-handler-aws";
1
+ import { createWebinyApiHandler, createWebinyStreamApiHandler } from "@webiny/api-event-handler-aws";
2
2
  import { ApiCoreDdbFeature } from "@webiny/api-core-ddb";
3
3
  import { HeadlessCmsDdbFeature } from "@webiny/api-headless-cms-ddb";
4
4
  import { AuditLogsDdbFeature } from "@webiny/api-audit-logs-ddb";
5
5
  import { AcoDdbFeature } from "@webiny/api-aco-ddb";
6
- import { WebsocketsDdbFeature } from "@webiny/api-websockets-ddb";
6
+ import { WebsocketsDdbFeature } from "@webiny/api-websockets-aws";
7
+ const registerRootStorage = (container, { documentClient })=>{
8
+ ApiCoreDdbFeature.register(container, {
9
+ documentClient
10
+ });
11
+ HeadlessCmsDdbFeature.register(container);
12
+ AuditLogsDdbFeature.register(container, {});
13
+ AcoDdbFeature.register(container);
14
+ WebsocketsDdbFeature.register(container);
15
+ };
7
16
  function createAwsDdbApiHandler(config) {
8
17
  return createWebinyApiHandler({
9
18
  ...config,
10
- registerRootStorage: (container, { documentClient })=>{
11
- ApiCoreDdbFeature.register(container, {
12
- documentClient
13
- });
14
- HeadlessCmsDdbFeature.register(container);
15
- AuditLogsDdbFeature.register(container, {});
16
- AcoDdbFeature.register(container);
17
- WebsocketsDdbFeature.register(container);
18
- }
19
+ registerRootStorage: registerRootStorage
20
+ });
21
+ }
22
+ function createAwsDdbStreamApiHandler(config) {
23
+ return createWebinyStreamApiHandler({
24
+ ...config,
25
+ registerRootStorage: registerRootStorage
19
26
  });
20
27
  }
21
- export { createAwsDdbApiHandler };
28
+ export { createAwsDdbApiHandler, createAwsDdbStreamApiHandler };
22
29
 
23
30
  //# sourceMappingURL=createWebinyApiHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createWebinyApiHandler.js","sources":["../src/createWebinyApiHandler.ts"],"sourcesContent":["/**\n * Webiny API handler for AWS Lambda with DynamoDB storage.\n *\n * Thin variant over the storage-agnostic base (@webiny/api-event-handler-aws): supplies the DynamoDB\n * storage wiring (core + CMS + audit-logs + ACO + websockets storage operations). No OpenSearch.\n */\nimport {\n createWebinyApiHandler as createBaseHandler,\n type CreateWebinyApiHandlerConfig as BaseConfig\n} from \"@webiny/api-event-handler-aws\";\nimport { ApiCoreDdbFeature } from \"@webiny/api-core-ddb\";\nimport { HeadlessCmsDdbFeature } from \"@webiny/api-headless-cms-ddb\";\nimport { AuditLogsDdbFeature } from \"@webiny/api-audit-logs-ddb\";\nimport { AcoDdbFeature } from \"@webiny/api-aco-ddb\";\nimport { WebsocketsDdbFeature } from \"@webiny/api-websockets-ddb\";\n\nexport type CreateAwsDdbApiHandlerConfig = Pick<BaseConfig, \"extensions\" | \"documentClient\">;\n\nexport function createAwsDdbApiHandler(config: CreateAwsDdbApiHandlerConfig) {\n return createBaseHandler({\n ...config,\n registerRootStorage: (container, { documentClient }) => {\n ApiCoreDdbFeature.register(container, { documentClient });\n HeadlessCmsDdbFeature.register(container);\n AuditLogsDdbFeature.register(container, {});\n AcoDdbFeature.register(container);\n WebsocketsDdbFeature.register(container);\n }\n });\n}\n"],"names":["createAwsDdbApiHandler","config","createBaseHandler","container","documentClient","ApiCoreDdbFeature","HeadlessCmsDdbFeature","AuditLogsDdbFeature","AcoDdbFeature","WebsocketsDdbFeature"],"mappings":";;;;;;AAkBO,SAASA,uBAAuBC,MAAoC;IACvE,OAAOC,uBAAkB;QACrB,GAAGD,MAAM;QACT,qBAAqB,CAACE,WAAW,EAAEC,cAAc,EAAE;YAC/CC,kBAAkB,QAAQ,CAACF,WAAW;gBAAEC;YAAe;YACvDE,sBAAsB,QAAQ,CAACH;YAC/BI,oBAAoB,QAAQ,CAACJ,WAAW,CAAC;YACzCK,cAAc,QAAQ,CAACL;YACvBM,qBAAqB,QAAQ,CAACN;QAClC;IACJ;AACJ"}
1
+ {"version":3,"file":"createWebinyApiHandler.js","sources":["../src/createWebinyApiHandler.ts"],"sourcesContent":["/**\n * Webiny API handler for AWS Lambda with DynamoDB storage.\n *\n * Thin variant over the storage-agnostic base (@webiny/api-event-handler-aws): supplies the DynamoDB\n * storage wiring (core + CMS + audit-logs + ACO + websockets storage operations). No OpenSearch.\n *\n * Two entry points share that wiring: the buffered API Gateway handler and the response-streaming\n * Function URL handler. They are separate Lambda functions built from the same bundle.\n */\nimport {\n createWebinyApiHandler as createBaseHandler,\n createWebinyStreamApiHandler as createBaseStreamHandler,\n type CreateWebinyApiHandlerConfig as BaseConfig\n} from \"@webiny/api-event-handler-aws\";\nimport { ApiCoreDdbFeature } from \"@webiny/api-core-ddb\";\nimport { HeadlessCmsDdbFeature } from \"@webiny/api-headless-cms-ddb\";\nimport { AuditLogsDdbFeature } from \"@webiny/api-audit-logs-ddb\";\nimport { AcoDdbFeature } from \"@webiny/api-aco-ddb\";\nimport { WebsocketsDdbFeature } from \"@webiny/api-websockets-aws\";\n\nexport type CreateAwsDdbApiHandlerConfig = Pick<BaseConfig, \"extensions\" | \"documentClient\">;\n\nconst registerRootStorage: BaseConfig[\"registerRootStorage\"] = (container, { documentClient }) => {\n ApiCoreDdbFeature.register(container, { documentClient });\n HeadlessCmsDdbFeature.register(container);\n AuditLogsDdbFeature.register(container, {});\n AcoDdbFeature.register(container);\n WebsocketsDdbFeature.register(container);\n};\n\nexport function createAwsDdbApiHandler(config: CreateAwsDdbApiHandlerConfig) {\n return createBaseHandler({ ...config, registerRootStorage });\n}\n\n/**\n * Response-streaming counterpart, for the Lambda function whose Function URL uses\n * `InvokeMode: RESPONSE_STREAM`. Identical storage; only the transport differs.\n */\nexport function createAwsDdbStreamApiHandler(config: CreateAwsDdbApiHandlerConfig) {\n return createBaseStreamHandler({ ...config, registerRootStorage });\n}\n"],"names":["registerRootStorage","container","documentClient","ApiCoreDdbFeature","HeadlessCmsDdbFeature","AuditLogsDdbFeature","AcoDdbFeature","WebsocketsDdbFeature","createAwsDdbApiHandler","config","createBaseHandler","createAwsDdbStreamApiHandler","createBaseStreamHandler"],"mappings":";;;;;;AAsBA,MAAMA,sBAAyD,CAACC,WAAW,EAAEC,cAAc,EAAE;IACzFC,kBAAkB,QAAQ,CAACF,WAAW;QAAEC;IAAe;IACvDE,sBAAsB,QAAQ,CAACH;IAC/BI,oBAAoB,QAAQ,CAACJ,WAAW,CAAC;IACzCK,cAAc,QAAQ,CAACL;IACvBM,qBAAqB,QAAQ,CAACN;AAClC;AAEO,SAASO,uBAAuBC,MAAoC;IACvE,OAAOC,uBAAkB;QAAE,GAAGD,MAAM;QAAET,qBAAAA;IAAoB;AAC9D;AAMO,SAASW,6BAA6BF,MAAoC;IAC7E,OAAOG,6BAAwB;QAAE,GAAGH,MAAM;QAAET,qBAAAA;IAAoB;AACpE"}
package/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { createAwsDdbApiHandler } from "./createWebinyApiHandler.js";
2
+ export { createAwsDdbStreamApiHandler } from "./createWebinyApiHandler.js";
2
3
  export type { CreateAwsDdbApiHandlerConfig } from "./createWebinyApiHandler.js";
package/index.js CHANGED
@@ -1 +1 @@
1
- export { createAwsDdbApiHandler } from "./createWebinyApiHandler.js";
1
+ export { createAwsDdbApiHandler, createAwsDdbStreamApiHandler } from "./createWebinyApiHandler.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-event-handler-aws-ddb",
3
- "version": "6.6.0-alpha.0",
3
+ "version": "6.6.0-alpha.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -18,23 +18,23 @@
18
18
  ],
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@webiny/api-aco-ddb": "6.6.0-alpha.0",
22
- "@webiny/api-audit-logs-ddb": "6.6.0-alpha.0",
23
- "@webiny/api-core-ddb": "6.6.0-alpha.0",
24
- "@webiny/api-event-handler-aws": "6.6.0-alpha.0",
25
- "@webiny/api-headless-cms-ddb": "6.6.0-alpha.0",
26
- "@webiny/api-websockets-ddb": "6.6.0-alpha.0"
21
+ "@webiny/api-aco-ddb": "6.6.0-alpha.2",
22
+ "@webiny/api-audit-logs-ddb": "6.6.0-alpha.2",
23
+ "@webiny/api-core-ddb": "6.6.0-alpha.2",
24
+ "@webiny/api-event-handler-aws": "6.6.0-alpha.2",
25
+ "@webiny/api-headless-cms-ddb": "6.6.0-alpha.2",
26
+ "@webiny/api-websockets-aws": "6.6.0-alpha.2"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@webiny/di": ">=0.2.3"
30
30
  },
31
31
  "devDependencies": {
32
- "@webiny/build-tools": "6.6.0-alpha.0",
33
- "@webiny/di": "1.0.2",
34
- "@webiny/project-utils": "6.6.0-alpha.0",
32
+ "@webiny/build-tools": "6.6.0-alpha.2",
33
+ "@webiny/db-dynamodb": "6.6.0-alpha.2",
34
+ "@webiny/di": "1.1.0",
35
35
  "rimraf": "6.1.3",
36
36
  "typescript": "7.0.2",
37
- "vitest": "4.1.10"
37
+ "vitest": "4.1.11"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"