-
Notifications
You must be signed in to change notification settings - Fork 153
Bug: Idempotency Package has No Exports #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @brianhyder thanks for opening the issue. At the moment this is intentional as we hadn't gotten yet to the point of building the utility for npm. We will prioritize this item as soon as #1474 is merged, which should happen sometime tomorrow or Monday at the latest. |
Hi @brianhyder, I've started working on this but I will need a bit more time as I want to make sure the exports are as isolated as possible and avoid running into future issues. For context: customers should be able to import & build the project regardless of whether they use Middy or DynamoDB as persistence layer, and so we need to build the exports accordingly. In the meantime, after running import { makeFunctionIdempotent } from '@aws-lambda-powertools/idempotency/lib/makeFunctionIdempotent';
import { DynamoDBPersistenceLayer } from '@aws-lambda-powertools/idempotency/lib/persistence/DynamoDBPersistenceLayer';
import { IdempotencyConfig } from '@aws-lambda-powertools/idempotency/lib/IdempotencyConfig'; The solution is not optimal and will change in the coming days, however it'll allow you to start playing with the module. |
Excellent. I really appreciate the reply and workaround. |
|
Hi Brian, I have merged some changes that include a new structure for exports. The PR description has some examples. You should be able to access all the modules and types. This is a new structure that we haven't used in other utilities, so if there's any issue module/type that you need to access and it's not exposed, please don't hesitate to let me know and I'll fix it. Thank you again for opening the issue and for the patience! |
Expected Behaviour
The Idempotency package exports the functions and classes necessary to utilize the idempotency package.
Current Behaviour
The idempotency package does not seem to export any of the functions/classes as the other packages do.
If you look at the package.json for the idempotency implementation, it specifies that
lib/index.js
is the main entry point. However, that file does not exist. When you look at the other packges (logging, metrics, etc) it has the same package.json configuration but the index file exists.Code snippet
See the links above.
Steps to Reproduce
See the links above.
Possible Solution
Add the index.ts file to the idempotency package and export the necessary types and functions.
Powertools for AWS Lambda (TypeScript) version
main
AWS Lambda function runtime
18.x
Packaging format used
npm
Execution logs
No response
The text was updated successfully, but these errors were encountered: