@webiny/api-audit-logs-ddb 0.0.0-unstable.0d717d18dd → 0.0.0-unstable.5387e5f7c8

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.
@@ -13,7 +13,7 @@ const AuditLogsDdbFeature = createFeature({
13
13
  const compressionHandler = container.resolve(CompressionHandler);
14
14
  return createStorage({
15
15
  client: db.client,
16
- tableName: config.tableName ?? process.env.DB_TABLE,
16
+ tableName: config.tableName,
17
17
  compressionHandler
18
18
  });
19
19
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AuditLogsDdbFeature.js","sources":["../src/AuditLogsDdbFeature.ts"],"sourcesContent":["import { type Container, createFeature } from \"@webiny/feature/api\";\nimport { DynamoDBClient } from \"@webiny/db-dynamodb\";\nimport { CompressionHandler } from \"@webiny/utils/exports/api.js\";\nimport { CompressionFeature } from \"@webiny/utils/features/compression/feature.js\";\nimport { AuditLogsStorage } from \"@webiny/api-audit-logs/abstractions.js\";\nimport { createStorage } from \"./Storage.js\";\n\nexport interface AuditLogsDdbFeatureConfig {\n tableName?: string;\n}\n\nexport const AuditLogsDdbFeature = createFeature({\n name: \"AuditLogsDdb\",\n register(container: Container, config: AuditLogsDdbFeatureConfig = {}) {\n CompressionFeature.register(container);\n // Lazy factory: DynamoDBClient and CompressionHandler are resolved at first use\n container.registerFactory(AuditLogsStorage, () => {\n const db = container.resolve(DynamoDBClient);\n const compressionHandler = container.resolve(CompressionHandler);\n return createStorage({\n client: db.client,\n tableName: config.tableName ?? process.env.DB_TABLE,\n compressionHandler\n });\n });\n }\n});\n"],"names":["AuditLogsDdbFeature","createFeature","container","config","CompressionFeature","AuditLogsStorage","db","DynamoDBClient","compressionHandler","CompressionHandler","createStorage","process"],"mappings":";;;;;;AAWO,MAAMA,sBAAsBC,cAAc;IAC7C,MAAM;IACN,UAASC,SAAoB,EAAEC,SAAoC,CAAC,CAAC;QACjEC,mBAAmB,QAAQ,CAACF;QAE5BA,UAAU,eAAe,CAACG,kBAAkB;YACxC,MAAMC,KAAKJ,UAAU,OAAO,CAACK;YAC7B,MAAMC,qBAAqBN,UAAU,OAAO,CAACO;YAC7C,OAAOC,cAAc;gBACjB,QAAQJ,GAAG,MAAM;gBACjB,WAAWH,OAAO,SAAS,IAAIQ,QAAQ,GAAG,CAAC,QAAQ;gBACnDH;YACJ;QACJ;IACJ;AACJ"}
1
+ {"version":3,"file":"AuditLogsDdbFeature.js","sources":["../src/AuditLogsDdbFeature.ts"],"sourcesContent":["import { type Container, createFeature } from \"@webiny/feature/api\";\nimport { DynamoDBClient } from \"@webiny/db-dynamodb\";\nimport { CompressionHandler } from \"@webiny/utils/exports/api.js\";\nimport { CompressionFeature } from \"@webiny/utils/features/compression/feature.js\";\nimport { AuditLogsStorage } from \"@webiny/api-audit-logs/abstractions.js\";\nimport { createStorage } from \"./Storage.js\";\n\nexport interface AuditLogsDdbFeatureConfig {\n tableName?: string;\n}\n\nexport const AuditLogsDdbFeature = createFeature({\n name: \"AuditLogsDdb\",\n register(container: Container, config: AuditLogsDdbFeatureConfig = {}) {\n CompressionFeature.register(container);\n // Lazy factory: DynamoDBClient and CompressionHandler are resolved at first use\n container.registerFactory(AuditLogsStorage, () => {\n const db = container.resolve(DynamoDBClient);\n const compressionHandler = container.resolve(CompressionHandler);\n return createStorage({\n client: db.client,\n // Audit logs have their own table (`DB_TABLE_AUDIT_LOGS`, which the entity falls back\n // to), with numeric index sort keys. Passing `DB_TABLE` here sent them to the main\n // table, whose GSI1_SK is a string, and every audited write failed there.\n tableName: config.tableName,\n compressionHandler\n });\n });\n }\n});\n"],"names":["AuditLogsDdbFeature","createFeature","container","config","CompressionFeature","AuditLogsStorage","db","DynamoDBClient","compressionHandler","CompressionHandler","createStorage"],"mappings":";;;;;;AAWO,MAAMA,sBAAsBC,cAAc;IAC7C,MAAM;IACN,UAASC,SAAoB,EAAEC,SAAoC,CAAC,CAAC;QACjEC,mBAAmB,QAAQ,CAACF;QAE5BA,UAAU,eAAe,CAACG,kBAAkB;YACxC,MAAMC,KAAKJ,UAAU,OAAO,CAACK;YAC7B,MAAMC,qBAAqBN,UAAU,OAAO,CAACO;YAC7C,OAAOC,cAAc;gBACjB,QAAQJ,GAAG,MAAM;gBAIjB,WAAWH,OAAO,SAAS;gBAC3BK;YACJ;QACJ;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-audit-logs-ddb",
3
- "version": "0.0.0-unstable.0d717d18dd",
3
+ "version": "0.0.0-unstable.5387e5f7c8",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "@webiny/api-audit-logs",
@@ -21,19 +21,19 @@
21
21
  "./*": "./*"
22
22
  },
23
23
  "dependencies": {
24
- "@webiny/api": "0.0.0-unstable.0d717d18dd",
25
- "@webiny/api-audit-logs": "0.0.0-unstable.0d717d18dd",
26
- "@webiny/aws-sdk": "0.0.0-unstable.0d717d18dd",
27
- "@webiny/db-dynamodb": "0.0.0-unstable.0d717d18dd",
28
- "@webiny/error": "0.0.0-unstable.0d717d18dd",
29
- "@webiny/feature": "0.0.0-unstable.0d717d18dd",
30
- "@webiny/handler": "0.0.0-unstable.0d717d18dd",
31
- "@webiny/utils": "0.0.0-unstable.0d717d18dd",
24
+ "@webiny/api": "0.0.0-unstable.5387e5f7c8",
25
+ "@webiny/api-audit-logs": "0.0.0-unstable.5387e5f7c8",
26
+ "@webiny/aws-sdk": "0.0.0-unstable.5387e5f7c8",
27
+ "@webiny/db-dynamodb": "0.0.0-unstable.5387e5f7c8",
28
+ "@webiny/error": "0.0.0-unstable.5387e5f7c8",
29
+ "@webiny/feature": "0.0.0-unstable.5387e5f7c8",
30
+ "@webiny/handler": "0.0.0-unstable.5387e5f7c8",
31
+ "@webiny/utils": "0.0.0-unstable.5387e5f7c8",
32
32
  "zod": "4.4.3"
33
33
  },
34
34
  "devDependencies": {
35
- "@webiny/build-tools": "0.0.0-unstable.0d717d18dd",
36
- "@webiny/project-utils": "0.0.0-unstable.0d717d18dd",
35
+ "@webiny/api-core": "0.0.0-unstable.5387e5f7c8",
36
+ "@webiny/build-tools": "0.0.0-unstable.5387e5f7c8",
37
37
  "rimraf": "6.1.3",
38
38
  "typescript": "7.0.2"
39
39
  },