From da998b589c1b54389e36cfca48738e351bdd2653 Mon Sep 17 00:00:00 2001 From: Andrey Frolov Date: Thu, 2 May 2024 10:19:03 +0200 Subject: [PATCH] SPT-1998 fix pr --- Example/Example.xcodeproj/project.pbxproj | 103 +++++------------- .../Auth/LoginResponseProvider.swift | 0 .../Error/ErrorResponseProvider.swift | 0 .../Group/GroupResponseProvider.swift | 0 .../MockServer/MockServer/MockServer.swift | 0 .../PaginationResponseProvider.swift | 0 .../MockServer/ServerConstants.swift | 0 .../{ => Modules}/MockServer/Package.swift | 2 +- .../Requests/Auth/AuthRequestEntity.swift | 0 .../Requests/Auth/AuthRequestEntry.swift | 0 .../Pagination/PaginationRequestEntity.swift | 0 .../Pagination/PaginationRequestEntry.swift | 0 .../Auth/AuthTokenResponseEntity.swift | 0 .../Auth/AuthTokenResponseEntry.swift | 0 .../Group/GroupBodyResponseEntity.swift | 0 .../Group/GroupBodyResponseEntry.swift | 0 .../Group/GroupFooterResponseEntity.swift | 0 .../Group/GroupFooterResponseEntry.swift | 0 .../Group/GroupHeaderResponseEntity.swift | 0 .../Group/GroupHeaderResponseEntry.swift | 0 .../Pagination/PaginationResponseEntity.swift | 0 .../Pagination/PaginationResponseEntry.swift | 0 Example/{ => Modules}/Models/Package.swift | 2 +- Example/{ => Modules}/Services/Package.swift | 2 +- .../Services/AuthService/AuthService.swift | 0 .../AuthService/AuthURLProvider.swift | 0 .../Services/GroupService/GroupService.swift | 0 .../GroupService/GroupURLProvider.swift | 0 .../PaginationContentDataProvider.swift | 0 .../PaginationURLProvider.swift | 0 .../Services/Services/URLProviders.swift | 0 .../AsyncIterator/AsyncPagerIterator.swift | 4 - .../AsyncPagerIteratorTests.swift | 4 +- 33 files changed, 35 insertions(+), 82 deletions(-) rename Example/{ => Modules}/MockServer/MockServer/Auth/LoginResponseProvider.swift (100%) rename Example/{ => Modules}/MockServer/MockServer/Error/ErrorResponseProvider.swift (100%) rename Example/{ => Modules}/MockServer/MockServer/Group/GroupResponseProvider.swift (100%) rename Example/{ => Modules}/MockServer/MockServer/MockServer.swift (100%) rename Example/{ => Modules}/MockServer/MockServer/Pagination/PaginationResponseProvider.swift (100%) rename Example/{ => Modules}/MockServer/MockServer/ServerConstants.swift (100%) rename Example/{ => Modules}/MockServer/Package.swift (92%) rename Example/{ => Modules}/Models/Models/Requests/Auth/AuthRequestEntity.swift (100%) rename Example/{ => Modules}/Models/Models/Requests/Auth/AuthRequestEntry.swift (100%) rename Example/{ => Modules}/Models/Models/Requests/Pagination/PaginationRequestEntity.swift (100%) rename Example/{ => Modules}/Models/Models/Requests/Pagination/PaginationRequestEntry.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Auth/AuthTokenResponseEntity.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Auth/AuthTokenResponseEntry.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Group/GroupBodyResponseEntity.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Group/GroupBodyResponseEntry.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Group/GroupFooterResponseEntity.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Group/GroupFooterResponseEntry.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Group/GroupHeaderResponseEntity.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Group/GroupHeaderResponseEntry.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Pagination/PaginationResponseEntity.swift (100%) rename Example/{ => Modules}/Models/Models/Responses/Pagination/PaginationResponseEntry.swift (100%) rename Example/{ => Modules}/Models/Package.swift (91%) rename Example/{ => Modules}/Services/Package.swift (92%) rename Example/{ => Modules}/Services/Services/AuthService/AuthService.swift (100%) rename Example/{ => Modules}/Services/Services/AuthService/AuthURLProvider.swift (100%) rename Example/{ => Modules}/Services/Services/GroupService/GroupService.swift (100%) rename Example/{ => Modules}/Services/Services/GroupService/GroupURLProvider.swift (100%) rename Example/{ => Modules}/Services/Services/PaginationService/PaginationContentDataProvider.swift (100%) rename Example/{ => Modules}/Services/Services/PaginationService/PaginationURLProvider.swift (100%) rename Example/{ => Modules}/Services/Services/URLProviders.swift (100%) diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 9a62a9c0..54e93b41 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -12,13 +12,11 @@ 4F1DDBD3207B2D2500E0CEB4 /* PaginationPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F1DDBD2207B2D2500E0CEB4 /* PaginationPresenter.swift */; }; 4FA424222075D346004AEDF6 /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FA424202075D346004AEDF6 /* Message.swift */; }; 4FA424232075D346004AEDF6 /* Message.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FA424212075D346004AEDF6 /* Message.xib */; }; + 504E74BC2BE37EA400CFEB2E /* MockServer in Frameworks */ = {isa = PBXBuildFile; productRef = 504E74BB2BE37EA400CFEB2E /* MockServer */; }; + 504E74BE2BE37EA800CFEB2E /* Models in Frameworks */ = {isa = PBXBuildFile; productRef = 504E74BD2BE37EA800CFEB2E /* Models */; }; + 504E74C02BE37EAB00CFEB2E /* Services in Frameworks */ = {isa = PBXBuildFile; productRef = 504E74BF2BE37EAB00CFEB2E /* Services */; }; 50816A1D2BC6E6DE00A43F3D /* NodeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 50816A1C2BC6E6DE00A43F3D /* NodeKit */; }; - 50816B2B2BC70ACB00A43F3D /* NodeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 50816B2A2BC70ACB00A43F3D /* NodeKit */; }; - 5097DF3F2BCD614A00D422EE /* NodeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DF3E2BCD614A00D422EE /* NodeKit */; }; - 5097DF422BCD624700D422EE /* NodeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DF412BCD624700D422EE /* NodeKit */; }; 5097DF442BCD624700D422EE /* NodeKitMock in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DF432BCD624700D422EE /* NodeKitMock */; }; - 5097DF492BCD62AA00D422EE /* NodeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DF482BCD62AA00D422EE /* NodeKit */; }; - 5097DF4B2BCD62AA00D422EE /* NodeKitMock in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DF4A2BCD62AA00D422EE /* NodeKitMock */; }; 5097DF502BCD641D00D422EE /* LoginRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5097DF4F2BCD641D00D422EE /* LoginRouter.swift */; }; 5097DF522BCD65E600D422EE /* FeatureListConfigurator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5097DF512BCD65E600D422EE /* FeatureListConfigurator.swift */; }; 5097DF562BCD666000D422EE /* FeatureListViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5097DF552BCD666000D422EE /* FeatureListViewController.storyboard */; }; @@ -41,10 +39,6 @@ 5097DF852BCDA58C00D422EE /* GroupViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5097DF842BCDA58C00D422EE /* GroupViewController.storyboard */; }; 5097DF872BCDA5A300D422EE /* GroupPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5097DF862BCDA5A300D422EE /* GroupPresenter.swift */; }; 5097DF892BCDA5B900D422EE /* GroupConfigurator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5097DF882BCDA5B900D422EE /* GroupConfigurator.swift */; }; - 5097DF9D2BCDAB2500D422EE /* Models in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DF9C2BCDAB2500D422EE /* Models */; }; - 5097DFA02BCDAD9500D422EE /* Services in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DF9F2BCDAD9500D422EE /* Services */; }; - 5097DFA32BCDADAB00D422EE /* Services in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DFA22BCDADAB00D422EE /* Services */; }; - 5097DFA62BCDB0BE00D422EE /* MockServer in Frameworks */ = {isa = PBXBuildFile; productRef = 5097DFA52BCDB0BE00D422EE /* MockServer */; }; 5097DFB22BCE00AB00D422EE /* GroupViewModelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5097DFB12BCE00AB00D422EE /* GroupViewModelProvider.swift */; }; 50B569802BD183F00054DC09 /* Utils in Frameworks */ = {isa = PBXBuildFile; productRef = 50B5697F2BD183F00054DC09 /* Utils */; }; 50B569832BD184150054DC09 /* Nuke in Frameworks */ = {isa = PBXBuildFile; productRef = 50B569822BD184150054DC09 /* Nuke */; }; @@ -68,6 +62,9 @@ 4F1DDBD2207B2D2500E0CEB4 /* PaginationPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginationPresenter.swift; sourceTree = ""; }; 4FA424202075D346004AEDF6 /* Message.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = ""; }; 4FA424212075D346004AEDF6 /* Message.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Message.xib; sourceTree = ""; }; + 509656A72BE37DD700808890 /* Services */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Services; path = Modules/Services; sourceTree = ""; }; + 509656A82BE37DD700808890 /* Models */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Models; path = Modules/Models; sourceTree = ""; }; + 509656A92BE37DD700808890 /* MockServer */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = MockServer; path = Modules/MockServer; sourceTree = ""; }; 5097DF4F2BCD641D00D422EE /* LoginRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginRouter.swift; sourceTree = ""; }; 5097DF512BCD65E600D422EE /* FeatureListConfigurator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeatureListConfigurator.swift; sourceTree = ""; }; 5097DF552BCD666000D422EE /* FeatureListViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = FeatureListViewController.storyboard; sourceTree = ""; }; @@ -108,29 +105,33 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5097DFA02BCDAD9500D422EE /* Services in Frameworks */, + 504E74BE2BE37EA800CFEB2E /* Models in Frameworks */, + 504E74BC2BE37EA400CFEB2E /* MockServer in Frameworks */, 50B569852BD184AD0054DC09 /* NukeExtensions in Frameworks */, - 5097DF9D2BCDAB2500D422EE /* Models in Frameworks */, - 50816B2B2BC70ACB00A43F3D /* NodeKit in Frameworks */, - 5097DFA62BCDB0BE00D422EE /* MockServer in Frameworks */, 50C445A82BC8202700C515E6 /* ReactiveDataDisplayManager in Frameworks */, - 5097DF492BCD62AA00D422EE /* NodeKit in Frameworks */, 5097DF442BCD624700D422EE /* NodeKitMock in Frameworks */, - 5097DF3F2BCD614A00D422EE /* NodeKit in Frameworks */, 50C445A22BC81FB300C515E6 /* SwiftMessages in Frameworks */, 50B569832BD184150054DC09 /* Nuke in Frameworks */, 50B5698C2BD18F040054DC09 /* SnapKit in Frameworks */, 50816A1D2BC6E6DE00A43F3D /* NodeKit in Frameworks */, - 5097DF422BCD624700D422EE /* NodeKit in Frameworks */, + 504E74C02BE37EAB00CFEB2E /* Services in Frameworks */, 50B569802BD183F00054DC09 /* Utils in Frameworks */, - 5097DFA32BCDADAB00D422EE /* Services in Frameworks */, - 5097DF4B2BCD62AA00D422EE /* NodeKitMock in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 509656A62BE37DCC00808890 /* Modules */ = { + isa = PBXGroup; + children = ( + 509656A92BE37DD700808890 /* MockServer */, + 509656A82BE37DD700808890 /* Models */, + 509656A72BE37DD700808890 /* Services */, + ); + name = Modules; + sourceTree = ""; + }; 5097DF4C2BCD63AA00D422EE /* Flows */ = { isa = PBXGroup; children = ( @@ -248,6 +249,7 @@ B96CD4401FDC5B1600F5A107 = { isa = PBXGroup; children = ( + 509656A62BE37DCC00808890 /* Modules */, B96CD44B1FDC5B1600F5A107 /* Example */, B96CD44A1FDC5B1600F5A107 /* Products */, 50C445B52BC8363F00C515E6 /* Frameworks */, @@ -305,22 +307,16 @@ name = Example; packageProductDependencies = ( 50816A1C2BC6E6DE00A43F3D /* NodeKit */, - 50816B2A2BC70ACB00A43F3D /* NodeKit */, 50C445A12BC81FB300C515E6 /* SwiftMessages */, 50C445A72BC8202700C515E6 /* ReactiveDataDisplayManager */, - 5097DF3E2BCD614A00D422EE /* NodeKit */, - 5097DF412BCD624700D422EE /* NodeKit */, 5097DF432BCD624700D422EE /* NodeKitMock */, - 5097DF482BCD62AA00D422EE /* NodeKit */, - 5097DF4A2BCD62AA00D422EE /* NodeKitMock */, - 5097DF9C2BCDAB2500D422EE /* Models */, - 5097DF9F2BCDAD9500D422EE /* Services */, - 5097DFA22BCDADAB00D422EE /* Services */, - 5097DFA52BCDB0BE00D422EE /* MockServer */, 50B5697F2BD183F00054DC09 /* Utils */, 50B569822BD184150054DC09 /* Nuke */, 50B569842BD184AD0054DC09 /* NukeExtensions */, 50B5698B2BD18F040054DC09 /* SnapKit */, + 504E74BB2BE37EA400CFEB2E /* MockServer */, + 504E74BD2BE37EA800CFEB2E /* Models */, + 504E74BF2BE37EAB00CFEB2E /* Services */, ); productName = Example; productReference = B96CD4491FDC5B1600F5A107 /* Example.app */; @@ -355,9 +351,6 @@ 50C445A02BC81FB300C515E6 /* XCRemoteSwiftPackageReference "SwiftMessages" */, 50C445A62BC8202600C515E6 /* XCRemoteSwiftPackageReference "ReactiveDataDisplayManager" */, 5097DF472BCD62AA00D422EE /* XCLocalSwiftPackageReference "../NodeKit" */, - 5097DF9B2BCDAB2500D422EE /* XCLocalSwiftPackageReference "Models" */, - 5097DFA12BCDADAB00D422EE /* XCLocalSwiftPackageReference "Services" */, - 5097DFA42BCDB0BE00D422EE /* XCLocalSwiftPackageReference "MockServer" */, 50B5697E2BD183F00054DC09 /* XCRemoteSwiftPackageReference "iOS-Utils" */, 50B569812BD184150054DC09 /* XCRemoteSwiftPackageReference "Nuke" */, 50B5698A2BD18F040054DC09 /* XCRemoteSwiftPackageReference "SnapKit" */, @@ -615,18 +608,6 @@ isa = XCLocalSwiftPackageReference; relativePath = ../NodeKit; }; - 5097DF9B2BCDAB2500D422EE /* XCLocalSwiftPackageReference "Models" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = Models; - }; - 5097DFA12BCDADAB00D422EE /* XCLocalSwiftPackageReference "Services" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = Services; - }; - 5097DFA42BCDB0BE00D422EE /* XCLocalSwiftPackageReference "MockServer" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = MockServer; - }; /* End XCLocalSwiftPackageReference section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -673,19 +654,19 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 50816A1C2BC6E6DE00A43F3D /* NodeKit */ = { + 504E74BB2BE37EA400CFEB2E /* MockServer */ = { isa = XCSwiftPackageProductDependency; - productName = NodeKit; + productName = MockServer; }; - 50816B2A2BC70ACB00A43F3D /* NodeKit */ = { + 504E74BD2BE37EA800CFEB2E /* Models */ = { isa = XCSwiftPackageProductDependency; - productName = NodeKit; + productName = Models; }; - 5097DF3E2BCD614A00D422EE /* NodeKit */ = { + 504E74BF2BE37EAB00CFEB2E /* Services */ = { isa = XCSwiftPackageProductDependency; - productName = NodeKit; + productName = Services; }; - 5097DF412BCD624700D422EE /* NodeKit */ = { + 50816A1C2BC6E6DE00A43F3D /* NodeKit */ = { isa = XCSwiftPackageProductDependency; productName = NodeKit; }; @@ -693,30 +674,6 @@ isa = XCSwiftPackageProductDependency; productName = NodeKitMock; }; - 5097DF482BCD62AA00D422EE /* NodeKit */ = { - isa = XCSwiftPackageProductDependency; - productName = NodeKit; - }; - 5097DF4A2BCD62AA00D422EE /* NodeKitMock */ = { - isa = XCSwiftPackageProductDependency; - productName = NodeKitMock; - }; - 5097DF9C2BCDAB2500D422EE /* Models */ = { - isa = XCSwiftPackageProductDependency; - productName = Models; - }; - 5097DF9F2BCDAD9500D422EE /* Services */ = { - isa = XCSwiftPackageProductDependency; - productName = Services; - }; - 5097DFA22BCDADAB00D422EE /* Services */ = { - isa = XCSwiftPackageProductDependency; - productName = Services; - }; - 5097DFA52BCDB0BE00D422EE /* MockServer */ = { - isa = XCSwiftPackageProductDependency; - productName = MockServer; - }; 50B5697F2BD183F00054DC09 /* Utils */ = { isa = XCSwiftPackageProductDependency; package = 50B5697E2BD183F00054DC09 /* XCRemoteSwiftPackageReference "iOS-Utils" */; diff --git a/Example/MockServer/MockServer/Auth/LoginResponseProvider.swift b/Example/Modules/MockServer/MockServer/Auth/LoginResponseProvider.swift similarity index 100% rename from Example/MockServer/MockServer/Auth/LoginResponseProvider.swift rename to Example/Modules/MockServer/MockServer/Auth/LoginResponseProvider.swift diff --git a/Example/MockServer/MockServer/Error/ErrorResponseProvider.swift b/Example/Modules/MockServer/MockServer/Error/ErrorResponseProvider.swift similarity index 100% rename from Example/MockServer/MockServer/Error/ErrorResponseProvider.swift rename to Example/Modules/MockServer/MockServer/Error/ErrorResponseProvider.swift diff --git a/Example/MockServer/MockServer/Group/GroupResponseProvider.swift b/Example/Modules/MockServer/MockServer/Group/GroupResponseProvider.swift similarity index 100% rename from Example/MockServer/MockServer/Group/GroupResponseProvider.swift rename to Example/Modules/MockServer/MockServer/Group/GroupResponseProvider.swift diff --git a/Example/MockServer/MockServer/MockServer.swift b/Example/Modules/MockServer/MockServer/MockServer.swift similarity index 100% rename from Example/MockServer/MockServer/MockServer.swift rename to Example/Modules/MockServer/MockServer/MockServer.swift diff --git a/Example/MockServer/MockServer/Pagination/PaginationResponseProvider.swift b/Example/Modules/MockServer/MockServer/Pagination/PaginationResponseProvider.swift similarity index 100% rename from Example/MockServer/MockServer/Pagination/PaginationResponseProvider.swift rename to Example/Modules/MockServer/MockServer/Pagination/PaginationResponseProvider.swift diff --git a/Example/MockServer/MockServer/ServerConstants.swift b/Example/Modules/MockServer/MockServer/ServerConstants.swift similarity index 100% rename from Example/MockServer/MockServer/ServerConstants.swift rename to Example/Modules/MockServer/MockServer/ServerConstants.swift diff --git a/Example/MockServer/Package.swift b/Example/Modules/MockServer/Package.swift similarity index 92% rename from Example/MockServer/Package.swift rename to Example/Modules/MockServer/Package.swift index bd1bd62b..11fb8722 100644 --- a/Example/MockServer/Package.swift +++ b/Example/Modules/MockServer/Package.swift @@ -14,7 +14,7 @@ let package = Package( ) ], dependencies: [ - .package(path: "../../NodeKit"), + .package(path: "../../../NodeKit"), .package(path: "../Models") ], targets: [ diff --git a/Example/Models/Models/Requests/Auth/AuthRequestEntity.swift b/Example/Modules/Models/Models/Requests/Auth/AuthRequestEntity.swift similarity index 100% rename from Example/Models/Models/Requests/Auth/AuthRequestEntity.swift rename to Example/Modules/Models/Models/Requests/Auth/AuthRequestEntity.swift diff --git a/Example/Models/Models/Requests/Auth/AuthRequestEntry.swift b/Example/Modules/Models/Models/Requests/Auth/AuthRequestEntry.swift similarity index 100% rename from Example/Models/Models/Requests/Auth/AuthRequestEntry.swift rename to Example/Modules/Models/Models/Requests/Auth/AuthRequestEntry.swift diff --git a/Example/Models/Models/Requests/Pagination/PaginationRequestEntity.swift b/Example/Modules/Models/Models/Requests/Pagination/PaginationRequestEntity.swift similarity index 100% rename from Example/Models/Models/Requests/Pagination/PaginationRequestEntity.swift rename to Example/Modules/Models/Models/Requests/Pagination/PaginationRequestEntity.swift diff --git a/Example/Models/Models/Requests/Pagination/PaginationRequestEntry.swift b/Example/Modules/Models/Models/Requests/Pagination/PaginationRequestEntry.swift similarity index 100% rename from Example/Models/Models/Requests/Pagination/PaginationRequestEntry.swift rename to Example/Modules/Models/Models/Requests/Pagination/PaginationRequestEntry.swift diff --git a/Example/Models/Models/Responses/Auth/AuthTokenResponseEntity.swift b/Example/Modules/Models/Models/Responses/Auth/AuthTokenResponseEntity.swift similarity index 100% rename from Example/Models/Models/Responses/Auth/AuthTokenResponseEntity.swift rename to Example/Modules/Models/Models/Responses/Auth/AuthTokenResponseEntity.swift diff --git a/Example/Models/Models/Responses/Auth/AuthTokenResponseEntry.swift b/Example/Modules/Models/Models/Responses/Auth/AuthTokenResponseEntry.swift similarity index 100% rename from Example/Models/Models/Responses/Auth/AuthTokenResponseEntry.swift rename to Example/Modules/Models/Models/Responses/Auth/AuthTokenResponseEntry.swift diff --git a/Example/Models/Models/Responses/Group/GroupBodyResponseEntity.swift b/Example/Modules/Models/Models/Responses/Group/GroupBodyResponseEntity.swift similarity index 100% rename from Example/Models/Models/Responses/Group/GroupBodyResponseEntity.swift rename to Example/Modules/Models/Models/Responses/Group/GroupBodyResponseEntity.swift diff --git a/Example/Models/Models/Responses/Group/GroupBodyResponseEntry.swift b/Example/Modules/Models/Models/Responses/Group/GroupBodyResponseEntry.swift similarity index 100% rename from Example/Models/Models/Responses/Group/GroupBodyResponseEntry.swift rename to Example/Modules/Models/Models/Responses/Group/GroupBodyResponseEntry.swift diff --git a/Example/Models/Models/Responses/Group/GroupFooterResponseEntity.swift b/Example/Modules/Models/Models/Responses/Group/GroupFooterResponseEntity.swift similarity index 100% rename from Example/Models/Models/Responses/Group/GroupFooterResponseEntity.swift rename to Example/Modules/Models/Models/Responses/Group/GroupFooterResponseEntity.swift diff --git a/Example/Models/Models/Responses/Group/GroupFooterResponseEntry.swift b/Example/Modules/Models/Models/Responses/Group/GroupFooterResponseEntry.swift similarity index 100% rename from Example/Models/Models/Responses/Group/GroupFooterResponseEntry.swift rename to Example/Modules/Models/Models/Responses/Group/GroupFooterResponseEntry.swift diff --git a/Example/Models/Models/Responses/Group/GroupHeaderResponseEntity.swift b/Example/Modules/Models/Models/Responses/Group/GroupHeaderResponseEntity.swift similarity index 100% rename from Example/Models/Models/Responses/Group/GroupHeaderResponseEntity.swift rename to Example/Modules/Models/Models/Responses/Group/GroupHeaderResponseEntity.swift diff --git a/Example/Models/Models/Responses/Group/GroupHeaderResponseEntry.swift b/Example/Modules/Models/Models/Responses/Group/GroupHeaderResponseEntry.swift similarity index 100% rename from Example/Models/Models/Responses/Group/GroupHeaderResponseEntry.swift rename to Example/Modules/Models/Models/Responses/Group/GroupHeaderResponseEntry.swift diff --git a/Example/Models/Models/Responses/Pagination/PaginationResponseEntity.swift b/Example/Modules/Models/Models/Responses/Pagination/PaginationResponseEntity.swift similarity index 100% rename from Example/Models/Models/Responses/Pagination/PaginationResponseEntity.swift rename to Example/Modules/Models/Models/Responses/Pagination/PaginationResponseEntity.swift diff --git a/Example/Models/Models/Responses/Pagination/PaginationResponseEntry.swift b/Example/Modules/Models/Models/Responses/Pagination/PaginationResponseEntry.swift similarity index 100% rename from Example/Models/Models/Responses/Pagination/PaginationResponseEntry.swift rename to Example/Modules/Models/Models/Responses/Pagination/PaginationResponseEntry.swift diff --git a/Example/Models/Package.swift b/Example/Modules/Models/Package.swift similarity index 91% rename from Example/Models/Package.swift rename to Example/Modules/Models/Package.swift index 11d7924c..8c397720 100644 --- a/Example/Models/Package.swift +++ b/Example/Modules/Models/Package.swift @@ -14,7 +14,7 @@ let package = Package( ) ], dependencies: [ - .package(path: "../../NodeKit") + .package(path: "../../../NodeKit") ], targets: [ .target( diff --git a/Example/Services/Package.swift b/Example/Modules/Services/Package.swift similarity index 92% rename from Example/Services/Package.swift rename to Example/Modules/Services/Package.swift index 3c4dff02..bf5f91be 100644 --- a/Example/Services/Package.swift +++ b/Example/Modules/Services/Package.swift @@ -15,7 +15,7 @@ let package = Package( ], dependencies: [ .package(path: "../Models"), - .package(path: "../../NodeKit") + .package(path: "../../../NodeKit") ], targets: [ .target( diff --git a/Example/Services/Services/AuthService/AuthService.swift b/Example/Modules/Services/Services/AuthService/AuthService.swift similarity index 100% rename from Example/Services/Services/AuthService/AuthService.swift rename to Example/Modules/Services/Services/AuthService/AuthService.swift diff --git a/Example/Services/Services/AuthService/AuthURLProvider.swift b/Example/Modules/Services/Services/AuthService/AuthURLProvider.swift similarity index 100% rename from Example/Services/Services/AuthService/AuthURLProvider.swift rename to Example/Modules/Services/Services/AuthService/AuthURLProvider.swift diff --git a/Example/Services/Services/GroupService/GroupService.swift b/Example/Modules/Services/Services/GroupService/GroupService.swift similarity index 100% rename from Example/Services/Services/GroupService/GroupService.swift rename to Example/Modules/Services/Services/GroupService/GroupService.swift diff --git a/Example/Services/Services/GroupService/GroupURLProvider.swift b/Example/Modules/Services/Services/GroupService/GroupURLProvider.swift similarity index 100% rename from Example/Services/Services/GroupService/GroupURLProvider.swift rename to Example/Modules/Services/Services/GroupService/GroupURLProvider.swift diff --git a/Example/Services/Services/PaginationService/PaginationContentDataProvider.swift b/Example/Modules/Services/Services/PaginationService/PaginationContentDataProvider.swift similarity index 100% rename from Example/Services/Services/PaginationService/PaginationContentDataProvider.swift rename to Example/Modules/Services/Services/PaginationService/PaginationContentDataProvider.swift diff --git a/Example/Services/Services/PaginationService/PaginationURLProvider.swift b/Example/Modules/Services/Services/PaginationService/PaginationURLProvider.swift similarity index 100% rename from Example/Services/Services/PaginationService/PaginationURLProvider.swift rename to Example/Modules/Services/Services/PaginationService/PaginationURLProvider.swift diff --git a/Example/Services/Services/URLProviders.swift b/Example/Modules/Services/Services/URLProviders.swift similarity index 100% rename from Example/Services/Services/URLProviders.swift rename to Example/Modules/Services/Services/URLProviders.swift diff --git a/NodeKit/NodeKit/Utils/AsyncIterator/AsyncPagerIterator.swift b/NodeKit/NodeKit/Utils/AsyncIterator/AsyncPagerIterator.swift index fddf2615..578e3681 100644 --- a/NodeKit/NodeKit/Utils/AsyncIterator/AsyncPagerIterator.swift +++ b/NodeKit/NodeKit/Utils/AsyncIterator/AsyncPagerIterator.swift @@ -38,10 +38,6 @@ public actor AsyncPagerIterator: AsyncIterator, StateStorable { currentState.hasNext = data.len != 0 && data.len >= currentState.pageSize return .success(data.value) } - .mapError { - currentState.hasNext = false - return $0 - } } /// Возвращает есть ли еще данные для текущего состояния. diff --git a/NodeKit/NodeKitTests/UnitTests/AsyncIterator/AsyncPagerIteratorTests.swift b/NodeKit/NodeKitTests/UnitTests/AsyncIterator/AsyncPagerIteratorTests.swift index aaefd532..d3ead35c 100644 --- a/NodeKit/NodeKitTests/UnitTests/AsyncIterator/AsyncPagerIteratorTests.swift +++ b/NodeKit/NodeKitTests/UnitTests/AsyncIterator/AsyncPagerIteratorTests.swift @@ -170,7 +170,7 @@ final class AsyncPagerIteratorTests: XCTestCase { XCTAssertFalse(hasNext) } - func testHasNext_whenFailure_thenHasNotNext() async throws { + func testHasNext_whenFailure_thenHasNext() async throws { // given dataProviderMock.stubbedProvideResult = .failure(MockError.firstError) @@ -182,7 +182,7 @@ final class AsyncPagerIteratorTests: XCTestCase { // then - XCTAssertFalse(hasNext) + XCTAssertTrue(hasNext) } func testRenew_thenZeroIndexReceived() async throws {