From e7cfb74f017ae2fc80d1f93aac4f55871bebdb9e Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Tue, 23 Jul 2024 17:00:40 -0400 Subject: [PATCH] chore: remove was_forced from CreatePatchRequest (#2370) --- .../shorebird_code_push_client/lib/src/code_push_client.dart | 1 - .../lib/src/messages/create_patch/create_patch_request.dart | 4 ---- .../lib/src/messages/create_patch/create_patch_request.g.dart | 4 +--- .../src/messages/create_patch/create_patch_request_test.dart | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/shorebird_code_push_client/lib/src/code_push_client.dart b/packages/shorebird_code_push_client/lib/src/code_push_client.dart index 892553ed..1ac3aa48 100644 --- a/packages/shorebird_code_push_client/lib/src/code_push_client.dart +++ b/packages/shorebird_code_push_client/lib/src/code_push_client.dart @@ -263,7 +263,6 @@ class CodePushClient { }) async { final request = CreatePatchRequest( releaseId: releaseId, - wasForced: false, metadata: metadata, ); final response = await _httpClient.post( diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart index 4d606fda..e48eeeed 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.dart @@ -11,7 +11,6 @@ class CreatePatchRequest { /// {@macro create_patch_request} const CreatePatchRequest({ required this.releaseId, - required this.wasForced, required this.metadata, }); @@ -25,9 +24,6 @@ class CreatePatchRequest { /// The ID of the release. final int releaseId; - /// Whether the user used the --force flag when authoring this patch. - final bool? wasForced; - /// Additional information about the command that was run to create the patch /// and the environment in which it was run. final Json metadata; diff --git a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.g.dart b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.g.dart index ccf08dd6..6d03cb5d 100644 --- a/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.g.dart +++ b/packages/shorebird_code_push_protocol/lib/src/messages/create_patch/create_patch_request.g.dart @@ -15,18 +15,16 @@ CreatePatchRequest _$CreatePatchRequestFromJson(Map json) => ($checkedConvert) { final val = CreatePatchRequest( releaseId: $checkedConvert('release_id', (v) => v as int), - wasForced: $checkedConvert('was_forced', (v) => v as bool?), metadata: $checkedConvert('metadata', (v) => v as Map), ); return val; }, - fieldKeyMap: const {'releaseId': 'release_id', 'wasForced': 'was_forced'}, + fieldKeyMap: const {'releaseId': 'release_id'}, ); Map _$CreatePatchRequestToJson(CreatePatchRequest instance) => { 'release_id': instance.releaseId, - 'was_forced': instance.wasForced, 'metadata': instance.metadata, }; diff --git a/packages/shorebird_code_push_protocol/test/src/messages/create_patch/create_patch_request_test.dart b/packages/shorebird_code_push_protocol/test/src/messages/create_patch/create_patch_request_test.dart index 29946e24..1630c6f7 100644 --- a/packages/shorebird_code_push_protocol/test/src/messages/create_patch/create_patch_request_test.dart +++ b/packages/shorebird_code_push_protocol/test/src/messages/create_patch/create_patch_request_test.dart @@ -6,7 +6,6 @@ void main() { test('can be (de)serialized', () { final request = CreatePatchRequest( releaseId: 1234, - wasForced: true, metadata: const CreatePatchMetadata( releasePlatform: ReleasePlatform.android, usedIgnoreAssetChangesFlag: true, @@ -32,7 +31,6 @@ void main() { test('can be (de)serialized without metadata', () { final request = CreatePatchRequest( releaseId: 1234, - wasForced: true, metadata: CreatePatchMetadata.forTest().toJson(), ); expect(