@aws-amplify/core 6.10.2 → 6.10.3-unstable.580740.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/libraryUtils.d.ts +1 -1
- package/dist/esm/parseAmplifyOutputs.d.ts +3 -3
- package/dist/esm/singleton/Amplify.d.ts +2 -2
- package/dist/esm/singleton/AmplifyOutputs/types.d.ts +11 -0
- package/dist/esm/singleton/types.d.ts +1 -1
- package/dist/esm/utils/parseAmplifyConfig.d.ts +2 -2
- package/package.json +3 -3
- package/src/Platform/version.ts +1 -1
- package/src/libraryUtils.ts +4 -1
- package/src/parseAmplifyOutputs.ts +18 -10
- package/src/singleton/Amplify.ts +2 -2
- package/src/singleton/AmplifyOutputs/types.ts +12 -0
- package/src/singleton/types.ts +1 -1
- package/src/utils/parseAmplifyConfig.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.13.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.13.3-unstable.0580740.0+0580740';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,mCAAmC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.13.
|
|
1
|
+
export declare const version = "6.13.3-unstable.0580740.0+0580740";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.13.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.13.3-unstable.0580740.0+0580740';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -2,7 +2,7 @@ export { generateRandomString, isBrowser, isNonRetryableError, isTokenExpired, i
|
|
|
2
2
|
export { parseAWSExports } from './parseAWSExports';
|
|
3
3
|
export { isAmplifyOutputs, parseAmplifyOutputs } from './parseAmplifyOutputs';
|
|
4
4
|
export { LegacyConfig } from './singleton/types';
|
|
5
|
-
export { AmplifyOutputs } from './singleton/AmplifyOutputs/types';
|
|
5
|
+
export { AmplifyOutputs, AmplifyOutputsUnknown, } from './singleton/AmplifyOutputs/types';
|
|
6
6
|
export { ADD_OAUTH_LISTENER } from './singleton/constants';
|
|
7
7
|
export { amplifyUuid } from './utils/amplifyUuid';
|
|
8
8
|
export { AmplifyUrl, AmplifyUrlSearchParams } from './utils/amplifyUrl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AmplifyOutputsAnalyticsProperties, AmplifyOutputsUnknown } from './singleton/AmplifyOutputs/types';
|
|
2
2
|
import { AnalyticsConfig, LegacyConfig, ResourcesConfig } from './singleton/types';
|
|
3
|
-
export declare function isAmplifyOutputs(config: ResourcesConfig | LegacyConfig |
|
|
3
|
+
export declare function isAmplifyOutputs(config: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown): config is AmplifyOutputsUnknown;
|
|
4
4
|
export declare function parseAnalytics(amplifyOutputsAnalyticsProperties?: AmplifyOutputsAnalyticsProperties): AnalyticsConfig | undefined;
|
|
5
|
-
export declare function parseAmplifyOutputs(amplifyOutputs:
|
|
5
|
+
export declare function parseAmplifyOutputs(amplifyOutputs: AmplifyOutputsUnknown): ResourcesConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AmplifyOutputsUnknown, AuthConfig, LegacyConfig, LibraryOptions, ResourcesConfig } from './types';
|
|
2
2
|
import { AuthClass } from './Auth';
|
|
3
3
|
import { ADD_OAUTH_LISTENER } from './constants';
|
|
4
4
|
export declare class AmplifyClass {
|
|
@@ -25,7 +25,7 @@ export declare class AmplifyClass {
|
|
|
25
25
|
* @param resourceConfig - Back-end resource configuration. Typically provided via the `aws-exports.js` file.
|
|
26
26
|
* @param libraryOptions - Additional options for customizing the behavior of the library.
|
|
27
27
|
*/
|
|
28
|
-
configure(resourcesConfig: ResourcesConfig | LegacyConfig |
|
|
28
|
+
configure(resourcesConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown, libraryOptions?: LibraryOptions): void;
|
|
29
29
|
/**
|
|
30
30
|
* Provides access to the current back-end resource configuration for the Library.
|
|
31
31
|
*
|
|
@@ -95,6 +95,7 @@ export interface AmplifyOutputsNotificationsProperties {
|
|
|
95
95
|
amazon_pinpoint_app_id: string;
|
|
96
96
|
channels: string[];
|
|
97
97
|
}
|
|
98
|
+
/** @deprecated This type is deprecated and will be removed in future versions. */
|
|
98
99
|
export interface AmplifyOutputs {
|
|
99
100
|
version?: string;
|
|
100
101
|
storage?: AmplifyOutputsStorageProperties;
|
|
@@ -105,4 +106,14 @@ export interface AmplifyOutputs {
|
|
|
105
106
|
custom?: AmplifyOutputsCustomProperties;
|
|
106
107
|
notifications?: AmplifyOutputsNotificationsProperties;
|
|
107
108
|
}
|
|
109
|
+
export interface AmplifyOutputsUnknown {
|
|
110
|
+
version?: string;
|
|
111
|
+
storage?: unknown;
|
|
112
|
+
auth?: unknown;
|
|
113
|
+
analytics?: unknown;
|
|
114
|
+
geo?: unknown;
|
|
115
|
+
data?: unknown;
|
|
116
|
+
custom?: unknown;
|
|
117
|
+
notifications?: unknown;
|
|
118
|
+
}
|
|
108
119
|
export {};
|
|
@@ -6,7 +6,7 @@ import { PredictionsConfig } from './Predictions/types';
|
|
|
6
6
|
import { BucketInfo, LibraryStorageOptions, StorageAccessLevel, StorageConfig } from './Storage/types';
|
|
7
7
|
import { NotificationsConfig } from './Notifications/types';
|
|
8
8
|
import { InteractionsConfig } from './Interactions/types';
|
|
9
|
-
export {
|
|
9
|
+
export { AmplifyOutputsUnknown } from './AmplifyOutputs/types';
|
|
10
10
|
/**
|
|
11
11
|
* Compatibility type representing the Amplify Gen 1 configuration file schema. This type should not be used directly.
|
|
12
12
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResourcesConfig } from '../index';
|
|
2
|
-
import {
|
|
2
|
+
import { AmplifyOutputsUnknown } from '../singleton/AmplifyOutputs/types';
|
|
3
3
|
import { LegacyConfig } from '../singleton/types';
|
|
4
4
|
/**
|
|
5
5
|
* Parses the variety of configuration shapes that Amplify can accept into a ResourcesConfig.
|
|
@@ -7,4 +7,4 @@ import { LegacyConfig } from '../singleton/types';
|
|
|
7
7
|
* @param amplifyConfig An Amplify configuration object conforming to one of the supported schemas.
|
|
8
8
|
* @return A ResourcesConfig for the provided configuration object.
|
|
9
9
|
*/
|
|
10
|
-
export declare const parseAmplifyConfig: (amplifyConfig: ResourcesConfig | LegacyConfig |
|
|
10
|
+
export declare const parseAmplifyConfig: (amplifyConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown) => ResourcesConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.3-unstable.0580740.0+0580740",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"uuid": "^9.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@aws-amplify/react-native": "1.1.
|
|
63
|
+
"@aws-amplify/react-native": "1.1.8-unstable.0580740.0+0580740",
|
|
64
64
|
"@types/js-cookie": "3.0.2",
|
|
65
65
|
"genversion": "^2.2.0",
|
|
66
66
|
"typescript": "5.0.2"
|
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "0580740b0f19fd20fe03a6c8ee8f5a8c6cd91a37"
|
|
196
196
|
}
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.13.
|
|
2
|
+
export const version = '6.13.3-unstable.0580740.0+0580740';
|
package/src/libraryUtils.ts
CHANGED
|
@@ -24,7 +24,10 @@ export {
|
|
|
24
24
|
export { parseAWSExports } from './parseAWSExports';
|
|
25
25
|
export { isAmplifyOutputs, parseAmplifyOutputs } from './parseAmplifyOutputs';
|
|
26
26
|
export { LegacyConfig } from './singleton/types';
|
|
27
|
-
export {
|
|
27
|
+
export {
|
|
28
|
+
AmplifyOutputs,
|
|
29
|
+
AmplifyOutputsUnknown,
|
|
30
|
+
} from './singleton/AmplifyOutputs/types';
|
|
28
31
|
export { ADD_OAUTH_LISTENER } from './singleton/constants';
|
|
29
32
|
export { amplifyUuid } from './utils/amplifyUuid';
|
|
30
33
|
export { AmplifyUrl, AmplifyUrlSearchParams } from './utils/amplifyUrl';
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
} from './singleton/Auth/types';
|
|
20
20
|
import { NotificationsConfig } from './singleton/Notifications/types';
|
|
21
21
|
import {
|
|
22
|
-
AmplifyOutputs,
|
|
23
22
|
AmplifyOutputsAnalyticsProperties,
|
|
24
23
|
AmplifyOutputsAuthProperties,
|
|
25
24
|
AmplifyOutputsCustomProperties,
|
|
@@ -28,6 +27,7 @@ import {
|
|
|
28
27
|
AmplifyOutputsNotificationsProperties,
|
|
29
28
|
AmplifyOutputsStorageBucketProperties,
|
|
30
29
|
AmplifyOutputsStorageProperties,
|
|
30
|
+
AmplifyOutputsUnknown,
|
|
31
31
|
} from './singleton/AmplifyOutputs/types';
|
|
32
32
|
import {
|
|
33
33
|
AnalyticsConfig,
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
} from './singleton/types';
|
|
41
41
|
|
|
42
42
|
export function isAmplifyOutputs(
|
|
43
|
-
config: ResourcesConfig | LegacyConfig |
|
|
44
|
-
): config is
|
|
43
|
+
config: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown,
|
|
44
|
+
): config is AmplifyOutputsUnknown {
|
|
45
45
|
// version format initially will be '1' but is expected to be something like x.y where x is major and y minor version
|
|
46
|
-
const { version } = config as
|
|
46
|
+
const { version } = config as AmplifyOutputsUnknown;
|
|
47
47
|
|
|
48
48
|
if (!version) {
|
|
49
49
|
return false;
|
|
@@ -291,16 +291,20 @@ function parseNotifications(
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
export function parseAmplifyOutputs(
|
|
294
|
-
amplifyOutputs:
|
|
294
|
+
amplifyOutputs: AmplifyOutputsUnknown,
|
|
295
295
|
): ResourcesConfig {
|
|
296
296
|
const resourcesConfig: ResourcesConfig = {};
|
|
297
297
|
|
|
298
298
|
if (amplifyOutputs.storage) {
|
|
299
|
-
resourcesConfig.Storage = parseStorage(
|
|
299
|
+
resourcesConfig.Storage = parseStorage(
|
|
300
|
+
amplifyOutputs.storage as AmplifyOutputsStorageProperties,
|
|
301
|
+
);
|
|
300
302
|
}
|
|
301
303
|
|
|
302
304
|
if (amplifyOutputs.auth) {
|
|
303
|
-
resourcesConfig.Auth = parseAuth(
|
|
305
|
+
resourcesConfig.Auth = parseAuth(
|
|
306
|
+
amplifyOutputs.auth as AmplifyOutputsAuthProperties,
|
|
307
|
+
);
|
|
304
308
|
}
|
|
305
309
|
|
|
306
310
|
if (amplifyOutputs.analytics) {
|
|
@@ -308,11 +312,15 @@ export function parseAmplifyOutputs(
|
|
|
308
312
|
}
|
|
309
313
|
|
|
310
314
|
if (amplifyOutputs.geo) {
|
|
311
|
-
resourcesConfig.Geo = parseGeo(
|
|
315
|
+
resourcesConfig.Geo = parseGeo(
|
|
316
|
+
amplifyOutputs.geo as AmplifyOutputsGeoProperties,
|
|
317
|
+
);
|
|
312
318
|
}
|
|
313
319
|
|
|
314
320
|
if (amplifyOutputs.data) {
|
|
315
|
-
resourcesConfig.API = parseData(
|
|
321
|
+
resourcesConfig.API = parseData(
|
|
322
|
+
amplifyOutputs.data as AmplifyOutputsDataProperties,
|
|
323
|
+
);
|
|
316
324
|
}
|
|
317
325
|
|
|
318
326
|
if (amplifyOutputs.custom) {
|
|
@@ -325,7 +333,7 @@ export function parseAmplifyOutputs(
|
|
|
325
333
|
|
|
326
334
|
if (amplifyOutputs.notifications) {
|
|
327
335
|
resourcesConfig.Notifications = parseNotifications(
|
|
328
|
-
amplifyOutputs.notifications,
|
|
336
|
+
amplifyOutputs.notifications as AmplifyOutputsNotificationsProperties,
|
|
329
337
|
);
|
|
330
338
|
}
|
|
331
339
|
|
package/src/singleton/Amplify.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { deepFreeze } from '../utils';
|
|
|
5
5
|
import { parseAmplifyConfig } from '../libraryUtils';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
AmplifyOutputsUnknown,
|
|
9
9
|
AuthConfig,
|
|
10
10
|
LegacyConfig,
|
|
11
11
|
LibraryOptions,
|
|
@@ -49,7 +49,7 @@ export class AmplifyClass {
|
|
|
49
49
|
* @param libraryOptions - Additional options for customizing the behavior of the library.
|
|
50
50
|
*/
|
|
51
51
|
configure(
|
|
52
|
-
resourcesConfig: ResourcesConfig | LegacyConfig |
|
|
52
|
+
resourcesConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown,
|
|
53
53
|
libraryOptions?: LibraryOptions,
|
|
54
54
|
): void {
|
|
55
55
|
const resolvedResourceConfig = parseAmplifyConfig(resourcesConfig);
|
|
@@ -115,6 +115,7 @@ export interface AmplifyOutputsNotificationsProperties {
|
|
|
115
115
|
channels: string[];
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
/** @deprecated This type is deprecated and will be removed in future versions. */
|
|
118
119
|
export interface AmplifyOutputs {
|
|
119
120
|
version?: string;
|
|
120
121
|
storage?: AmplifyOutputsStorageProperties;
|
|
@@ -125,3 +126,14 @@ export interface AmplifyOutputs {
|
|
|
125
126
|
custom?: AmplifyOutputsCustomProperties;
|
|
126
127
|
notifications?: AmplifyOutputsNotificationsProperties;
|
|
127
128
|
}
|
|
129
|
+
|
|
130
|
+
export interface AmplifyOutputsUnknown {
|
|
131
|
+
version?: string;
|
|
132
|
+
storage?: unknown;
|
|
133
|
+
auth?: unknown;
|
|
134
|
+
analytics?: unknown;
|
|
135
|
+
geo?: unknown;
|
|
136
|
+
data?: unknown;
|
|
137
|
+
custom?: unknown;
|
|
138
|
+
notifications?: unknown;
|
|
139
|
+
}
|
package/src/singleton/types.ts
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { NotificationsConfig } from './Notifications/types';
|
|
28
28
|
import { InteractionsConfig } from './Interactions/types';
|
|
29
29
|
|
|
30
|
-
export {
|
|
30
|
+
export { AmplifyOutputsUnknown } from './AmplifyOutputs/types';
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Compatibility type representing the Amplify Gen 1 configuration file schema. This type should not be used directly.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { ResourcesConfig } from '../index';
|
|
5
|
-
import {
|
|
5
|
+
import { AmplifyOutputsUnknown } from '../singleton/AmplifyOutputs/types';
|
|
6
6
|
import { LegacyConfig } from '../singleton/types';
|
|
7
7
|
import { parseAWSExports } from '../parseAWSExports';
|
|
8
8
|
import { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs';
|
|
@@ -14,7 +14,7 @@ import { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs';
|
|
|
14
14
|
* @return A ResourcesConfig for the provided configuration object.
|
|
15
15
|
*/
|
|
16
16
|
export const parseAmplifyConfig = (
|
|
17
|
-
amplifyConfig: ResourcesConfig | LegacyConfig |
|
|
17
|
+
amplifyConfig: ResourcesConfig | LegacyConfig | AmplifyOutputsUnknown,
|
|
18
18
|
): ResourcesConfig => {
|
|
19
19
|
if (Object.keys(amplifyConfig).some(key => key.startsWith('aws_'))) {
|
|
20
20
|
return parseAWSExports(amplifyConfig);
|