@webiny/api-audit-logs-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 +2 -3
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/package.json +10 -11
- package/AuditLogsDdbFeature.d.ts +0 -8
- package/AuditLogsDdbFeature.js +0 -24
- package/AuditLogsDdbFeature.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -3,6 +3,5 @@ interface RegisterAuditLogsDdbStorageOperationsParams {
|
|
|
3
3
|
documentClient: DynamoDBDocument;
|
|
4
4
|
tableName?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const registerAuditLogsDdbStorageOperations: (params: RegisterAuditLogsDdbStorageOperationsParams) => import("@webiny/handler").RegisterExtensionPlugin<import("@webiny/handler/types
|
|
7
|
-
export {
|
|
8
|
-
export type { AuditLogsDdbFeatureConfig } from "./AuditLogsDdbFeature.js";
|
|
6
|
+
export declare const registerAuditLogsDdbStorageOperations: (params: RegisterAuditLogsDdbStorageOperationsParams) => import("@webiny/handler").RegisterExtensionPlugin<import("@webiny/handler/types").Context>;
|
|
7
|
+
export {};
|
package/index.js
CHANGED
|
@@ -11,7 +11,6 @@ const registerAuditLogsDdbStorageOperations = (params)=>createRegisterExtensionP
|
|
|
11
11
|
});
|
|
12
12
|
context.container.registerInstance(AuditLogsStorage, storage);
|
|
13
13
|
});
|
|
14
|
-
export { AuditLogsDdbFeature } from "./AuditLogsDdbFeature.js";
|
|
15
14
|
export { registerAuditLogsDdbStorageOperations };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +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 { createStorage } from \"~/Storage.js\";\nimport { AuditLogsStorage } from \"@webiny/api-audit-logs/abstractions.js\";\nimport { CompressionHandler } from \"@webiny/utils/exports/api.js\";\n\ninterface RegisterAuditLogsDdbStorageOperationsParams {\n documentClient: DynamoDBDocument;\n tableName?: string;\n}\n\nexport const registerAuditLogsDdbStorageOperations = (\n params: RegisterAuditLogsDdbStorageOperationsParams\n) => {\n return createRegisterExtensionPlugin(context => {\n const compressionHandler = context.container.resolve(CompressionHandler);\n const storage = createStorage({\n client: params.documentClient,\n tableName: params.tableName,\n compressionHandler\n });\n context.container.registerInstance(AuditLogsStorage, storage);\n });\n};\
|
|
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 { createStorage } from \"~/Storage.js\";\nimport { AuditLogsStorage } from \"@webiny/api-audit-logs/abstractions.js\";\nimport { CompressionHandler } from \"@webiny/utils/exports/api.js\";\n\ninterface RegisterAuditLogsDdbStorageOperationsParams {\n documentClient: DynamoDBDocument;\n tableName?: string;\n}\n\nexport const registerAuditLogsDdbStorageOperations = (\n params: RegisterAuditLogsDdbStorageOperationsParams\n) => {\n return createRegisterExtensionPlugin(context => {\n const compressionHandler = context.container.resolve(CompressionHandler);\n const storage = createStorage({\n client: params.documentClient,\n tableName: params.tableName,\n compressionHandler\n });\n context.container.registerInstance(AuditLogsStorage, storage);\n });\n};\n"],"names":["registerAuditLogsDdbStorageOperations","params","createRegisterExtensionPlugin","context","compressionHandler","CompressionHandler","storage","createStorage","AuditLogsStorage"],"mappings":";;;;AAWO,MAAMA,wCAAwC,CACjDC,SAEOC,8BAA8BC,CAAAA;QACjC,MAAMC,qBAAqBD,QAAQ,SAAS,CAAC,OAAO,CAACE;QACrD,MAAMC,UAAUC,cAAc;YAC1B,QAAQN,OAAO,cAAc;YAC7B,WAAWA,OAAO,SAAS;YAC3BG;QACJ;QACAD,QAAQ,SAAS,CAAC,gBAAgB,CAACK,kBAAkBF;IACzD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-audit-logs-ddb",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.a4f3e4ea8b",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-audit-logs",
|
|
@@ -21,19 +21,18 @@
|
|
|
21
21
|
"./*": "./*"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@webiny/api": "0.0.0-unstable.
|
|
25
|
-
"@webiny/api-audit-logs": "0.0.0-unstable.
|
|
26
|
-
"@webiny/aws-sdk": "0.0.0-unstable.
|
|
27
|
-
"@webiny/db-dynamodb": "0.0.0-unstable.
|
|
28
|
-
"@webiny/error": "0.0.0-unstable.
|
|
29
|
-
"@webiny/
|
|
30
|
-
"@webiny/
|
|
31
|
-
"@webiny/utils": "0.0.0-unstable.0d717d18dd",
|
|
24
|
+
"@webiny/api": "0.0.0-unstable.a4f3e4ea8b",
|
|
25
|
+
"@webiny/api-audit-logs": "0.0.0-unstable.a4f3e4ea8b",
|
|
26
|
+
"@webiny/aws-sdk": "0.0.0-unstable.a4f3e4ea8b",
|
|
27
|
+
"@webiny/db-dynamodb": "0.0.0-unstable.a4f3e4ea8b",
|
|
28
|
+
"@webiny/error": "0.0.0-unstable.a4f3e4ea8b",
|
|
29
|
+
"@webiny/handler": "0.0.0-unstable.a4f3e4ea8b",
|
|
30
|
+
"@webiny/utils": "0.0.0-unstable.a4f3e4ea8b",
|
|
32
31
|
"zod": "4.4.3"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
|
-
"@webiny/build-tools": "0.0.0-unstable.
|
|
36
|
-
"@webiny/project-utils": "0.0.0-unstable.
|
|
34
|
+
"@webiny/build-tools": "0.0.0-unstable.a4f3e4ea8b",
|
|
35
|
+
"@webiny/project-utils": "0.0.0-unstable.a4f3e4ea8b",
|
|
37
36
|
"rimraf": "6.1.3",
|
|
38
37
|
"typescript": "7.0.2"
|
|
39
38
|
},
|
package/AuditLogsDdbFeature.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type Container } from "@webiny/feature/api";
|
|
2
|
-
export interface AuditLogsDdbFeatureConfig {
|
|
3
|
-
tableName?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const AuditLogsDdbFeature: {
|
|
6
|
-
name: string;
|
|
7
|
-
register(container: Container, context?: AuditLogsDdbFeatureConfig | undefined): void;
|
|
8
|
-
};
|
package/AuditLogsDdbFeature.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createFeature } from "@webiny/feature/api";
|
|
2
|
-
import { DynamoDBClient } from "@webiny/db-dynamodb";
|
|
3
|
-
import { CompressionHandler } from "@webiny/utils/exports/api.js";
|
|
4
|
-
import { CompressionFeature } from "@webiny/utils/features/compression/feature.js";
|
|
5
|
-
import { AuditLogsStorage } from "@webiny/api-audit-logs/abstractions.js";
|
|
6
|
-
import { createStorage } from "./Storage.js";
|
|
7
|
-
const AuditLogsDdbFeature = createFeature({
|
|
8
|
-
name: "AuditLogsDdb",
|
|
9
|
-
register (container, config = {}) {
|
|
10
|
-
CompressionFeature.register(container);
|
|
11
|
-
container.registerFactory(AuditLogsStorage, ()=>{
|
|
12
|
-
const db = container.resolve(DynamoDBClient);
|
|
13
|
-
const compressionHandler = container.resolve(CompressionHandler);
|
|
14
|
-
return createStorage({
|
|
15
|
-
client: db.client,
|
|
16
|
-
tableName: config.tableName ?? process.env.DB_TABLE,
|
|
17
|
-
compressionHandler
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
export { AuditLogsDdbFeature };
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=AuditLogsDdbFeature.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|