Skip to content

(deprecated) Feat (Auth): Implementation for fetchCurrentDevice #5064

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

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9d7d3a0
chore: added boilerplate for api implementation
hahnandrew Jun 10, 2024
be2ca18
chore: fixing todo comment per flutter specs by ci/cd pipeline
hahnandrew Jun 10, 2024
5b76486
chore: fixing todo DOCS comment per flutter specs by ci/cd pipeline
hahnandrew Jun 10, 2024
4225df3
chore: added gh issues link fix todo comment style by ci/cd pipeline
hahnandrew Jun 10, 2024
8625f40
chore: removed todo comment
hahnandrew Jun 10, 2024
321d413
feat: added implementation for getCurrentDevice API
hahnandrew Jun 11, 2024
54930db
feat: added unit tests for getCurrentDevice API
hahnandrew Jun 20, 2024
0e5aae4
feat: added integration tests for getCurrentDevice
hahnandrew Jun 20, 2024
d48ea07
feat: Fixing unit test exception bug
hahnandrew Jun 21, 2024
5c2f22d
feat: added networkexception handling to getCurrentDevice
hahnandrew Jun 21, 2024
3bdf61b
feat: added networkexception exception unit tests
hahnandrew Jun 21, 2024
731bc3f
feat: added exception handling to getCurrentDevice API
hahnandrew Jun 24, 2024
5b3e38d
chore: updated unit test and implementation to reflect api name change
hahnandrew Jun 24, 2024
faa6199
chore: updating integration tests to reflect api name change
hahnandrew Jun 24, 2024
dc0d2ed
feat: added core docs for fetchCurrentDevice API
hahnandrew Jun 24, 2024
ff55f65
feat: added plugin and interface implementation for fetchCurrentDevic…
hahnandrew Jun 24, 2024
98768b1
feat: added category method for fetchCurrentDevice API
hahnandrew Jun 24, 2024
bc33222
feat: added fetchCurrentDevice name change
hahnandrew Jun 24, 2024
0326706
feat: added api to example dir
hahnandrew Jun 24, 2024
442fdca
feat: added unit tests for fetchCurrentDevice
hahnandrew Jun 24, 2024
2cdd4c4
feat: added fetchCurrentDevice parent method to integration tests
hahnandrew Jun 24, 2024
476a2fe
feat: added getDevice cognito mock client for unit testing
hahnandrew Jun 24, 2024
6fc9baa
feat: changed try catch scope to include only network call
hahnandrew Jun 24, 2024
9796479
chore: update expired link (#5015)
magisystem0408 Jun 11, 2024
2de8c95
fix(core): improve amplify configure api error message (#5021)
NikaHsn Jun 13, 2024
41afcfb
chore(datastore): cleaned up generic types shadowing the keyword Stri…
tyllark Jun 14, 2024
c4dfaea
fix: fixed trailing comma formatting
hahnandrew Jun 24, 2024
92457a5
fix: removed unused import directives
hahnandrew Jun 24, 2024
ce811e9
fix: fixing trailing comma
hahnandrew Jun 24, 2024
35bb61d
fix: fixing dart formatting issues
hahnandrew Jun 24, 2024
3c1d06d
chore (ci): fixing ios simulator actions ver
hahnandrew Jun 24, 2024
cb9737d
feat (auth): added i-test for signed-out exception
hahnandrew Jun 24, 2024
c0ef42f
fix: fixing formatting in i-test suite
hahnandrew Jun 24, 2024
8359ce4
fix: revert ios version in gh actions
hahnandrew Jun 24, 2024
e9475b7
fix: fixed function return type in unit tests
Jun 25, 2024
45b0f06
fix (TEMP): fixing xcodes cli for ios simulator runtime
Jun 25, 2024
b3e33bf
fix (TEMP): debugging actions ci wf for xcodes cli
hahnandrew Jun 25, 2024
ceeddbe
fix (TEMP): added phantomato/patched/xcodes xcodes branch for ci fix
hahnandrew Jun 25, 2024
dc12580
fix (test): amplify_storage_s3 getUrl(), changed function call to lambda
Jun 25, 2024
8737b98
fix (test): added timeout to streams testing
Jun 25, 2024
c3a600e
fix: adding xcodes fork for ci ios runtime
hahnandrew Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/composite_actions/log_cw_metric/dist/main.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/composite_actions/log_cw_metric/dist/main.cjs.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,9 @@ $ aft bootstrap

#### Packages inside Amplify Flutter

- [amplify_flutter](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_flutter)
- [amplify_auth_plugin_interface](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_auth_plugin_interface)
- [amplify_auth_cognito](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_auth_cognito)
- [amplify_analytics_plugin_interface](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_analytics_plugin_interface)
- [amplify_analytics_pinpoint](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify_analytics_pinpoint)
- [amplify_flutter](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/amplify/amplify_flutter)
- [amplify_auth_cognito](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/auth/amplify_auth_cognito)
- [amplify_analytics_pinpoint](https://github.com/aws-amplify/amplify-flutter/tree/main/packages/analytics/amplify_analytics_pinpoint)

### Platform Setup

Expand Down
2 changes: 1 addition & 1 deletion actions/bin/launch_ios_simulator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Future<String?> getRuntimeId(String iosVersion) async {
Future<void> installXcodes() => core.withGroup('Install xcodes', () async {
final res = await exec.exec(
'brew',
['install', 'xcodesorg/made/xcodes', 'aria2'],
['install', 'phantomato/patched/xcodes', 'aria2'],
);
if (res.exitCode != 0) {
throw Exception('Could not install xcodes');
Expand Down
7 changes: 4 additions & 3 deletions actions/lib/src/android/shell_script.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ extension type ShellScript(String script) {
set -eo pipefail
$script
''';
core.info('Running script:\n$fullScript\n=======================================');
core.info(
'Running script:\n$fullScript\n=======================================');
await fs.withTempDir('launch_android_emulator', (tempDir) async {
final scriptPath = p.join(tempDir, 'script.sh');
fs.writeFileSync(scriptPath, fullScript);
final result = await processManager.start(
['/bin/bash', scriptPath],
['/bin/bash', scriptPath],
mode: ProcessStartMode.inheritStdio,
);
final exitCode = await result.exitCode;
if (exitCode != 0) {
throw ProcessException(
'/bin/bash',
[script],
'Script failed with exit code',
'Script failed with exit code',
exitCode,
);
}
Expand Down
14 changes: 7 additions & 7 deletions actions/lib/src/node/actions/cache.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ import 'dart:js_interop';
external Cache get cache;

/// Tools for interacting with the GitHub Actions cache.
///
///
/// See: https://www.npmjs.com/package/@actions/cache
@JS()
@anonymous
extension type Cache._(JSObject it) {
/// Returns true if Actions cache service feature is available, otherwise false.
external bool isFeatureAvailable();

@JS('restoreCache')
external JSPromise _restoreCache(
JSArray paths,
String primaryKey,[
String primaryKey, [
JSArray? restoreKeys,
]);

/// Restores cache from keys
///
///
/// @param paths a list of file paths to restore from the cache
/// @param primaryKey an explicit key for restoring the cache
/// @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key
Expand All @@ -34,7 +34,7 @@ extension type Cache._(JSObject it) {
List<String>? restoreKeys,
}) async {
final promise = _restoreCache(
paths.map((p) => p.toJS).toList().toJS,
paths.map((p) => p.toJS).toList().toJS,
primaryKey,
restoreKeys?.map((key) => key.toJS).toList().toJS,
);
Expand All @@ -49,7 +49,7 @@ extension type Cache._(JSObject it) {
);

/// Saves a list of files with the specified key
///
///
/// @param paths a list of file paths to be cached
/// @param primaryKey an explicit key for restoring the cache
/// @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
Expand All @@ -58,7 +58,7 @@ extension type Cache._(JSObject it) {
required String primaryKey,
}) async {
final promise = _saveCache(
paths.map((path) => path.toJS).toList().toJS,
paths.map((path) => path.toJS).toList().toJS,
primaryKey,
);
final result = await promise.toDart;
Expand Down
7 changes: 5 additions & 2 deletions actions/lib/src/node/actions/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ extension type Core._(JSObject it) {

String getRequiredInput(String name) {
final inputValue = _getInput(name);
return inputValue.isEmpty ? (throw StateError('Input "$name" was required but no value was passed')) : inputValue;
return inputValue.isEmpty
? (throw StateError(
'Input "$name" was required but no value was passed'))
: inputValue;
}

T getTypedInput<T>(
Expand Down Expand Up @@ -50,7 +53,7 @@ extension type Core._(JSObject it) {
external void endGroup();

Future<R> withGroup<R>(
String name,
String name,
Future<R> Function() action,
) async {
startGroup(name);
Expand Down
2 changes: 1 addition & 1 deletion actions/lib/src/node/actions/exec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extension type Exec._(JSObject it) {
try {
final exitCode = await promiseToFuture<int>(
_exec(
commandLine,
commandLine,
args.map((arg) => arg.toJS).toList().toJS,
options,
),
Expand Down
Loading
Loading