Skip to content

Commit 4a8eba4

Browse files
authored
chore: kickoff release
2 parents abe8aae + db5e190 commit 4a8eba4

File tree

102 files changed

+1648
-401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1648
-401
lines changed

.github/composite_actions/run_xcodebuild_test/action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ inputs:
88
project_path:
99
required: false
1010
type: string
11+
xcode_path:
12+
required: false
13+
type: string
1114
destination:
1215
required: false
1316
type: string
@@ -28,7 +31,12 @@ runs:
2831
env:
2932
SCHEME: ${{ inputs.scheme }}
3033
PROJECT_PATH: ${{ inputs.project_path }}
34+
XCODE_PATH: ${{ inputs.xcode_path }}
3135
run: |
3236
cd $PROJECT_PATH
33-
xcodebuild test -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' ${{ inputs.other_flags }} | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
34-
shell: bash
37+
if [ ! -z "$XCODE_PATH" ]; then
38+
sudo xcode-select -s $XCODE_PATH
39+
fi
40+
xcodebuild -version
41+
xcodebuild test -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' ${{ inputs.other_flags }} | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
42+
shell: bash

.github/workflows/integ_test_datastore.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on:
66

77
permissions:
88
id-token: write
9-
contents: read
9+
contents: read
1010

1111
concurrency:
1212
group: ${{ github.head_ref || github.run_id }}
1313
cancel-in-progress: true
1414

1515
jobs:
1616
prepare-for-test:
17-
runs-on: macos-12
17+
runs-on: macos-13
1818
environment: IntegrationTest
1919
steps:
2020
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
@@ -32,7 +32,7 @@ jobs:
3232
datastore-integration-test:
3333
timeout-minutes: 30
3434
needs: prepare-for-test
35-
runs-on: macos-12
35+
runs-on: macos-13
3636
environment: IntegrationTest
3737
steps:
3838
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
@@ -55,5 +55,7 @@ jobs:
5555
with:
5656
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
5757
scheme: AWSDataStorePluginIntegrationTests
58+
destination: 'platform=iOS Simulator,name=iPhone 14,OS=latest'
59+
xcode_path: '/Applications/Xcode_14.3.app'
60+
5861

59-

.github/workflows/integ_test_datastore_v2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
permissions:
88
id-token: write
9-
contents: read
9+
contents: read
1010

1111
concurrency:
1212
group: ${{ github.head_ref || github.run_id }}
@@ -56,4 +56,4 @@ jobs:
5656
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
5757
scheme: AWSDataStorePluginV2Tests
5858

59-
59+

.github/workflows/new_issue_maintainer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
jobs:
1111
maintainer-opened:
1212
runs-on: ubuntu-latest
13-
if: ${{ !github.event.issue.pull_request && contains(fromJSON('["palpatim", "brennanMKE", "diegocstn", "lawmicha", "harsh62", "thisisabhash", "ameter", "royjit", "atierian", "ukhan-amazon", "ruisebas", "phantumcode"]'), github.event.issue.user.login) }}
13+
if: ${{ !github.event.issue.pull_request && contains(fromJSON('["palpatim", "5d", "jcjimenez", "lawmicha", "harsh62", "thisisabhash", "royjit", "atierian", "ukhan-amazon", "ruisebas", "phantumcode"]'), github.event.issue.user.login) }}
1414
steps:
1515
- name: add message if maintainer opened
1616
shell: bash

.github/workflows/notify_issue_comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# The type of runner that the job will run on
1919
runs-on: ubuntu-latest
2020

21-
if: ${{ !github.event.issue.pull_request && !contains(fromJSON('["palpatim", "jcjimenez", "5d", "lawmicha", "harsh62", "thisisabhash", "ameter", "royjit", "atierian", "ukhan-amazon", "ruisebas", "phantumcode"]'), github.event.comment.user.login) }}
21+
if: ${{ !github.event.issue.pull_request && !contains(fromJSON('["palpatim", "jcjimenez", "5d", "lawmicha", "harsh62", "thisisabhash", "royjit", "atierian", "ukhan-amazon", "ruisebas", "phantumcode"]'), github.event.comment.user.login) }}
2222

2323
# Steps represent a sequence of tasks that will be executed as part of the job
2424
steps:

Amplify/Amplify.swift

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,51 @@ import Foundation
1818
///
1919
/// There are two exceptions to this. The `Logging` and `Hub` categories are configured with a default plugin that is
2020
/// available at initialization.
21+
///
22+
/// - Tag: Amplify
2123
public class Amplify {
2224

2325
/// If `true`, `configure()` has already been invoked, and subsequent calls to `configure` will throw a
2426
/// ConfigurationError.amplifyAlreadyConfigured error.
27+
///
28+
/// - Tag: Amplify.isConfigured
2529
static var isConfigured = false
2630

2731
// Storage for the categories themselves, which will be instantiated during configuration, and cleared during reset.
2832
// It is not supported to mutate these category properties. They are `var` to support the `reset()` method for
2933
// ease of testing.
34+
35+
/// - Tag: Amplify.Analytics
3036
public static internal(set) var Analytics = AnalyticsCategory()
37+
38+
/// - Tag: Amplify.API
3139
public static internal(set) var API: APICategory = APICategory()
40+
41+
/// - Tag: Amplify.Auth
3242
public static internal(set) var Auth = AuthCategory()
43+
44+
/// - Tag: Amplify.DataStore
3345
public static internal(set) var DataStore = DataStoreCategory()
46+
47+
/// - Tag: Amplify.Geo
3448
public static internal(set) var Geo = GeoCategory()
49+
50+
/// - Tag: Amplify.Hub
3551
public static internal(set) var Hub = HubCategory()
52+
53+
/// - Tag: Amplify.Notifications
3654
public static internal(set) var Notifications = NotificationsCategory()
55+
56+
/// - Tag: Amplify.Predictions
3757
public static internal(set) var Predictions = PredictionsCategory()
58+
59+
/// - Tag: Amplify.Storage
3860
public static internal(set) var Storage = StorageCategory()
3961

40-
// Special case category. We protect this with an AtomicValue because it is used by reset()
41-
// methods during setup & teardown of tests
62+
/// Special case category. We protect this with an AtomicValue because it is used by reset()
63+
/// methods during setup & teardown of tests
64+
///
65+
/// - Tag: Amplify.Logging
4266
public static internal(set) var Logging: LoggingCategory {
4367
get {
4468
loggingAtomic.get()
@@ -51,7 +75,10 @@ public class Amplify {
5175

5276
/// Adds `plugin` to the category
5377
///
78+
/// See: [Category.removePlugin(for:)](x-source-tag://Category.removePlugin)
79+
///
5480
/// - Parameter plugin: The plugin to add
81+
/// - Tag: Amplify.add_plugin
5582
public static func add<P: Plugin>(plugin: P) throws {
5683
log.debug("Adding plugin: \(plugin))")
5784
switch plugin {

Amplify/Categories/Storage/Error/StorageError.swift

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,56 @@
55
// SPDX-License-Identifier: Apache-2.0
66
//
77

8+
/// Errors thrown by implementations of the
9+
/// [StorageCategoryPlugin](x-source-tag://StorageCategoryPlugin) protocol.
10+
///
11+
/// - Tag: StorageError
812
public enum StorageError {
13+
14+
/// Surfaced when a storage operation is attempted for either a file or a key to which the current user
15+
/// does not have access.
16+
///
17+
/// - Tag: StorageError.accessDenied
918
case accessDenied(ErrorDescription, RecoverySuggestion, Error? = nil)
19+
20+
/// Surfaced when a storage operation is unable to resolve the current user.
21+
///
22+
/// - Tag: StorageError.authError
1023
case authError(ErrorDescription, RecoverySuggestion, Error? = nil)
24+
25+
/// Surfaced when a storage plugin encounters an error during its configuration.
26+
///
27+
/// - Tag: StorageError.configuration
1128
case configuration(ErrorDescription, RecoverySuggestion, Error? = nil)
29+
30+
/// Surfaced when a storage operation encounters an HTTP status code it considers an error.
31+
///
32+
/// - Tag: StorageError.httpStatusError
1233
case httpStatusError(Int, RecoverySuggestion, Error? = nil)
34+
35+
/// Surfaced when a storage operation encounters an HTTP status code it considers an error.
36+
///
37+
/// - Tag: StorageError.keyNotFound
1338
case keyNotFound(Key, ErrorDescription, RecoverySuggestion, Error? = nil)
39+
40+
/// Surfaced when a storage operation is unable to find a local file, usually when attempting to upload.
41+
///
42+
/// - Tag: StorageError.localFileNotFound
1443
case localFileNotFound(ErrorDescription, RecoverySuggestion, Error? = nil)
44+
45+
/// Surfaced when a storage operation encounters an unexpected server-side error.
46+
///
47+
/// - Tag: StorageError.service
1548
case service(ErrorDescription, RecoverySuggestion, Error? = nil)
49+
50+
/// Surfaced when a storage operation encounters an general unexpected error.
51+
///
52+
/// - Tag: StorageError.unknown
1653
case unknown(ErrorDescription, Error? = nil)
54+
55+
/// Surfaced when a storage operation encounters invalid input.
56+
///
57+
/// - Tag: StorageError.validation
1758
case validation(Field, ErrorDescription, RecoverySuggestion, Error? = nil)
1859
}
1960

Amplify/Categories/Storage/Operation/Request/StorageGetURLRequest.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ public extension StorageGetURLRequest {
5656
/// - Tag: StorageListRequestOptions.expires
5757
public let expires: Int
5858

59-
/// Extra plugin specific options, only used in special circumstances when the existing options do not provide
60-
/// a way to utilize the underlying storage system's functionality. See plugin documentation for expected
61-
/// key/values
59+
/// Extra plugin specific options, only used in special circumstances when the existing options do
60+
/// not provide a way to utilize the underlying storage system's functionality. See plugin
61+
/// documentation or
62+
/// [AWSStorageGetURLOptions](x-source-tag://AWSStorageGetURLOptions) for
63+
/// expected key/values.
6264
///
6365
/// - Tag: StorageListRequestOptions.pluginOptions
6466
public let pluginOptions: Any?

Amplify/Categories/Storage/Operation/StorageDownloadDataOperation.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Foundation
99

10+
/// - Tag: StorageDownloadDataOperation
1011
public protocol StorageDownloadDataOperation: AmplifyInProcessReportingOperation<
1112
StorageDownloadDataRequest,
1213
Progress,
@@ -19,6 +20,7 @@ public extension HubPayload.EventName.Storage {
1920
static let downloadData = "Storage.downloadData"
2021
}
2122

23+
/// - Tag: StorageDownloadDataTask
2224
public typealias StorageDownloadDataTask = AmplifyInProcessReportingOperationTaskAdapter<StorageDownloadDataRequest,
2325
Progress,
2426
Data,

Amplify/Categories/Storage/Operation/StorageDownloadFileOperation.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import Foundation
1616
/// - Completed: `Void` - Receipt of a `.completed` event indicates the download is complete and the file has been
1717
/// successfully stored to the local URL supplied in the original `StorageDownloadFileRequest`
1818
/// - Error: `StorageError` - Emitted if the download encounters an error.
19+
///
20+
/// - Tag: StorageDownloadFileOperation
1921
public protocol StorageDownloadFileOperation: AmplifyInProcessReportingOperation<
2022
StorageDownloadFileRequest,
2123
Progress,
@@ -28,6 +30,7 @@ public extension HubPayload.EventName.Storage {
2830
static let downloadFile = "Storage.downloadFile"
2931
}
3032

33+
/// - Tag: StorageDownloadFileTask
3134
public typealias StorageDownloadFileTask = AmplifyInProcessReportingOperationTaskAdapter<StorageDownloadFileRequest,
3235
Progress,
3336
Void,

0 commit comments

Comments
 (0)