@webiny/api-aco-ddb 0.0.0-unstable.b6d7105cee → 6.6.0-alpha.1
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/AcoDdbFeature.d.ts +5 -0
- package/AcoDdbFeature.js +18 -0
- package/AcoDdbFeature.js.map +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +10 -9
package/AcoDdbFeature.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/api";
|
|
2
|
+
import { DynamoDBClient } from "@webiny/db-dynamodb";
|
|
3
|
+
import { FlpStorageOperations } from "@webiny/api-aco/features/folder/shared/abstractions.js";
|
|
4
|
+
import { FolderLevelPermissionsStorageOperations } from "./FolderLevelPermissionsStorageOperations.js";
|
|
5
|
+
const AcoDdbFeature = createFeature({
|
|
6
|
+
name: "AcoDdb",
|
|
7
|
+
register (container) {
|
|
8
|
+
container.registerFactory(FlpStorageOperations, ()=>{
|
|
9
|
+
const db = container.resolve(DynamoDBClient);
|
|
10
|
+
return new FolderLevelPermissionsStorageOperations({
|
|
11
|
+
documentClient: db.client
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export { AcoDdbFeature };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=AcoDdbFeature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcoDdbFeature.js","sources":["../src/AcoDdbFeature.ts"],"sourcesContent":["import { type Container, createFeature } from \"@webiny/feature/api\";\nimport { DynamoDBClient } from \"@webiny/db-dynamodb\";\nimport { FlpStorageOperations } from \"@webiny/api-aco/features/folder/shared/abstractions.js\";\nimport { FolderLevelPermissionsStorageOperations } from \"./FolderLevelPermissionsStorageOperations.js\";\n\nexport const AcoDdbFeature = createFeature({\n name: \"AcoDdb\",\n register(container: Container) {\n // Lazy factory: DynamoDBClient is resolved at first use\n container.registerFactory(FlpStorageOperations, () => {\n const db = container.resolve(DynamoDBClient);\n return new FolderLevelPermissionsStorageOperations({\n documentClient: db.client\n });\n });\n }\n});\n"],"names":["AcoDdbFeature","createFeature","container","FlpStorageOperations","db","DynamoDBClient","FolderLevelPermissionsStorageOperations"],"mappings":";;;;AAKO,MAAMA,gBAAgBC,cAAc;IACvC,MAAM;IACN,UAASC,SAAoB;QAEzBA,UAAU,eAAe,CAACC,sBAAsB;YAC5C,MAAMC,KAAKF,UAAU,OAAO,CAACG;YAC7B,OAAO,IAAIC,wCAAwC;gBAC/C,gBAAgBF,GAAG,MAAM;YAC7B;QACJ;IACJ;AACJ"}
|
package/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ interface RegisterAcoDdbStorageOperationsParams {
|
|
|
3
3
|
documentClient: DynamoDBDocument;
|
|
4
4
|
}
|
|
5
5
|
export declare const registerAcoDdbStorageOperations: (params: RegisterAcoDdbStorageOperationsParams) => import("@webiny/handler").RegisterExtensionPlugin<import("@webiny/handler/types.js").Context>;
|
|
6
|
-
export {};
|
|
6
|
+
export { AcoDdbFeature } from "./AcoDdbFeature.js";
|
package/index.js
CHANGED
|
@@ -7,6 +7,7 @@ const registerAcoDdbStorageOperations = (params)=>createRegisterExtensionPlugin(
|
|
|
7
7
|
});
|
|
8
8
|
context.container.registerInstance(FlpStorageOperations, flpStorageOperations);
|
|
9
9
|
});
|
|
10
|
+
export { AcoDdbFeature } from "./AcoDdbFeature.js";
|
|
10
11
|
export { registerAcoDdbStorageOperations };
|
|
11
12
|
|
|
12
13
|
//# 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 { FolderLevelPermissionsStorageOperations } from \"./FolderLevelPermissionsStorageOperations.js\";\nimport { FlpStorageOperations } from \"@webiny/api-aco/features/folder/shared/abstractions.js\";\n\ninterface RegisterAcoDdbStorageOperationsParams {\n documentClient: DynamoDBDocument;\n}\n\nexport const registerAcoDdbStorageOperations = (params: RegisterAcoDdbStorageOperationsParams) => {\n return createRegisterExtensionPlugin(context => {\n const flpStorageOperations = new FolderLevelPermissionsStorageOperations({\n documentClient: params.documentClient\n });\n\n context.container.registerInstance(FlpStorageOperations, flpStorageOperations);\n });\n};\n"],"names":["registerAcoDdbStorageOperations","params","createRegisterExtensionPlugin","context","flpStorageOperations","FolderLevelPermissionsStorageOperations","FlpStorageOperations"],"mappings":";;;AASO,MAAMA,kCAAkC,CAACC,SACrCC,8BAA8BC,CAAAA;QACjC,MAAMC,uBAAuB,IAAIC,wCAAwC;YACrE,gBAAgBJ,OAAO,cAAc;QACzC;QAEAE,QAAQ,SAAS,CAAC,gBAAgB,CAACG,sBAAsBF;IAC7D"}
|
|
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 { FolderLevelPermissionsStorageOperations } from \"./FolderLevelPermissionsStorageOperations.js\";\nimport { FlpStorageOperations } from \"@webiny/api-aco/features/folder/shared/abstractions.js\";\n\ninterface RegisterAcoDdbStorageOperationsParams {\n documentClient: DynamoDBDocument;\n}\n\nexport const registerAcoDdbStorageOperations = (params: RegisterAcoDdbStorageOperationsParams) => {\n return createRegisterExtensionPlugin(context => {\n const flpStorageOperations = new FolderLevelPermissionsStorageOperations({\n documentClient: params.documentClient\n });\n\n context.container.registerInstance(FlpStorageOperations, flpStorageOperations);\n });\n};\nexport { AcoDdbFeature } from \"./AcoDdbFeature.js\";\n"],"names":["registerAcoDdbStorageOperations","params","createRegisterExtensionPlugin","context","flpStorageOperations","FolderLevelPermissionsStorageOperations","FlpStorageOperations"],"mappings":";;;AASO,MAAMA,kCAAkC,CAACC,SACrCC,8BAA8BC,CAAAA;QACjC,MAAMC,uBAAuB,IAAIC,wCAAwC;YACrE,gBAAgBJ,OAAO,cAAc;QACzC;QAEAE,QAAQ,SAAS,CAAC,gBAAgB,CAACG,sBAAsBF;IAC7D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-aco-ddb",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.6.0-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-aco",
|
|
@@ -21,16 +21,17 @@
|
|
|
21
21
|
"./*": "./*"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@webiny/api-aco": "
|
|
25
|
-
"@webiny/aws-sdk": "
|
|
26
|
-
"@webiny/db-dynamodb": "
|
|
27
|
-
"@webiny/error": "
|
|
28
|
-
"@webiny/
|
|
29
|
-
"@webiny/
|
|
24
|
+
"@webiny/api-aco": "6.6.0-alpha.1",
|
|
25
|
+
"@webiny/aws-sdk": "6.6.0-alpha.1",
|
|
26
|
+
"@webiny/db-dynamodb": "6.6.0-alpha.1",
|
|
27
|
+
"@webiny/error": "6.6.0-alpha.1",
|
|
28
|
+
"@webiny/feature": "6.6.0-alpha.1",
|
|
29
|
+
"@webiny/handler": "6.6.0-alpha.1",
|
|
30
|
+
"@webiny/utils": "6.6.0-alpha.1"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@webiny/
|
|
33
|
-
"@webiny/
|
|
33
|
+
"@webiny/api-core": "6.6.0-alpha.1",
|
|
34
|
+
"@webiny/build-tools": "6.6.0-alpha.1",
|
|
34
35
|
"rimraf": "6.1.3",
|
|
35
36
|
"typescript": "7.0.2"
|
|
36
37
|
},
|