aws-samples / aws-tools-for-babylonjs-editor

AWS Tools for Babylon.JS Editor is a suite of tools meant to interact with Babylon.JS Editor by utilizing the capabilities of AWS products.
Apache License 2.0
32 stars 9 forks source link

add pagination for ListAppsCommand #5

Closed eherozhao closed 2 years ago

eherozhao commented 2 years ago

What was the problem/requirement? (What/Why)

Current publish to Amplify plugin didn't include pagination feature for ListAppsCommand API call which will mistakenly overwrite customer's Amplify application.

What was the solution? (How)

Added the pagination by checking the nextToken argument is null or not.

Revision 1

Added two tests for pagination after test code was merged.

What is the impact of this change? (Focus on the customer experience)

Avoid app to be overwritten when it is not listed in the first page.

Are you adding any new dependencies to the system?

N/A

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

eherozhao commented 2 years ago

https://github.com/aws/aws-sdk-js-v3/issues/3540 Raised an issue on JS v3 GitHub about missing a paginator of ListAppsCommand. Once SDK provide the paginator, we can transfer to that way by what Preston suggested.