-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(idempotency): add esmodule support (#1743)
* feat(idempotency): add esmodule support
- Loading branch information
1 parent
6838cc2
commit 1a38862
Showing
41 changed files
with
219 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
export * from './errors'; | ||
export * from './IdempotencyConfig'; | ||
export * from './makeIdempotent'; | ||
export * from './idempotencyDecorator'; | ||
export { IdempotencyRecordStatus } from './constants'; | ||
export { | ||
IdempotencyItemAlreadyExistsError, | ||
IdempotencyItemNotFoundError, | ||
IdempotencyAlreadyInProgressError, | ||
IdempotencyInvalidStatusError, | ||
IdempotencyValidationError, | ||
IdempotencyInconsistentStateError, | ||
IdempotencyPersistenceLayerError, | ||
IdempotencyKeyError, | ||
} from './errors.js'; | ||
export { IdempotencyConfig } from './IdempotencyConfig.js'; | ||
export { makeIdempotent } from './makeIdempotent.js'; | ||
export { idempotent } from './idempotencyDecorator.js'; | ||
export { IdempotencyRecordStatus } from './constants.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
packages/idempotency/src/persistence/BasePersistenceLayerInterface.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './BasePersistenceLayer'; | ||
export * from './BasePersistenceLayerInterface'; | ||
export * from './IdempotencyRecord'; | ||
export { BasePersistenceLayer } from './BasePersistenceLayer.js'; | ||
export { IdempotencyRecord } from './IdempotencyRecord.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
import { IdempotencyConfig } from '../IdempotencyConfig'; | ||
import { IdempotencyRecord } from '../persistence/IdempotencyRecord.js'; | ||
import { IdempotencyConfig } from '../IdempotencyConfig.js'; | ||
|
||
type BasePersistenceLayerOptions = { | ||
config: IdempotencyConfig; | ||
functionName?: string; | ||
}; | ||
|
||
export { BasePersistenceLayerOptions }; | ||
interface BasePersistenceLayerInterface { | ||
configure(options?: BasePersistenceLayerOptions): void; | ||
isPayloadValidationEnabled(): boolean; | ||
saveInProgress(data: unknown, remainingTimeInMillis?: number): Promise<void>; | ||
saveSuccess(data: unknown, result: unknown): Promise<void>; | ||
deleteRecord(data: unknown): Promise<void>; | ||
getRecord(data: unknown): Promise<IdempotencyRecord>; | ||
} | ||
|
||
export { BasePersistenceLayerOptions, BasePersistenceLayerInterface }; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
export * from './IdempotencyRecord'; | ||
export * from './BasePersistenceLayer'; | ||
export * from './IdempotencyOptions'; | ||
export * from './DynamoDBPersistence'; | ||
export * from './LRUCache'; | ||
export { | ||
IdempotencyRecordOptions, | ||
IdempotencyRecordStatusValue, | ||
} from './IdempotencyRecord.js'; | ||
export { | ||
BasePersistenceLayerInterface, | ||
BasePersistenceLayerOptions, | ||
} from './BasePersistenceLayer.js'; | ||
export { | ||
IdempotencyConfigOptions, | ||
IdempotencyLambdaHandlerOptions, | ||
IdempotencyHandlerOptions, | ||
} from './IdempotencyOptions.js'; |
8 changes: 4 additions & 4 deletions
8
packages/idempotency/tests/e2e/idempotentDecorator.test.FunctionCode.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.