@aws-amplify/api-graphql 4.0.1-console-preview.d745d43.0 → 4.0.1-ssr-api.df60e41.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/lib/GraphQLAPI.d.ts +1 -1
- package/lib/GraphQLAPI.js +23 -30
- package/lib/Providers/AWSAppSyncRealTimeProvider/index.js +467 -582
- package/lib/index.js +1 -1
- package/lib/internals/InternalGraphQLAPI.d.ts +1 -1
- package/lib/internals/InternalGraphQLAPI.js +204 -246
- package/lib/internals/v6.js +3 -3
- package/lib/tsconfig.tsbuildinfo +180 -20
- package/lib/types/index.d.ts +17 -3
- package/lib/utils/ConnectionStateMonitor.js +51 -64
- package/lib/utils/ReachabilityMonitor/index.js +2 -2
- package/lib/utils/ReachabilityMonitor/index.native.js +4 -6
- package/lib/utils/ReconnectionMonitor.js +20 -24
- package/lib/utils/errors/APIError.js +7 -11
- package/lib/utils/errors/assertValidationError.js +4 -4
- package/lib/utils/errors/validation.js +5 -6
- package/lib/utils/resolveConfig.js +9 -10
- package/lib/utils/resolveLibraryOptions.js +4 -5
- package/lib-esm/GraphQLAPI.d.ts +1 -1
- package/lib-esm/GraphQLAPI.js +22 -30
- package/lib-esm/Providers/AWSAppSyncRealTimeProvider/index.js +458 -574
- package/lib-esm/Providers/constants.js +10 -10
- package/lib-esm/internals/InternalGraphQLAPI.d.ts +1 -1
- package/lib-esm/internals/InternalGraphQLAPI.js +201 -244
- package/lib-esm/internals/v6.js +1 -1
- package/lib-esm/tsconfig.tsbuildinfo +180 -20
- package/lib-esm/types/index.d.ts +17 -3
- package/lib-esm/types/index.js +1 -1
- package/lib-esm/utils/ConnectionStateMonitor.js +49 -63
- package/lib-esm/utils/ReachabilityMonitor/index.js +1 -1
- package/lib-esm/utils/ReachabilityMonitor/index.native.js +1 -3
- package/lib-esm/utils/ReconnectionMonitor.js +19 -24
- package/lib-esm/utils/errors/APIError.js +6 -11
- package/lib-esm/utils/errors/assertValidationError.js +2 -2
- package/lib-esm/utils/errors/validation.js +5 -6
- package/lib-esm/utils/resolveConfig.js +8 -9
- package/lib-esm/utils/resolveLibraryOptions.js +4 -5
- package/package.json +6 -6
- package/src/GraphQLAPI.ts +3 -2
- package/src/internals/InternalGraphQLAPI.ts +35 -10
- package/src/types/index.ts +38 -8
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
"version": "4a44be5b17ae6385fcc9a486361f50231992d556c9298373ae0d38cfae9f4056",
|
|
134
134
|
"signature": "4a44be5b17ae6385fcc9a486361f50231992d556c9298373ae0d38cfae9f4056"
|
|
135
135
|
},
|
|
136
|
-
"
|
|
137
|
-
"version": "
|
|
138
|
-
"signature": "
|
|
136
|
+
"../../../node_modules/tslib/tslib.d.ts": {
|
|
137
|
+
"version": "7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900",
|
|
138
|
+
"signature": "7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900"
|
|
139
139
|
},
|
|
140
140
|
"../../core/lib-esm/Hub/types/AuthTypes.d.ts": {
|
|
141
141
|
"version": "a04a1debf29ca7be5a11859eca422ede0355a7ffac49027843c21a1566aacc2a",
|
|
@@ -678,8 +678,8 @@
|
|
|
678
678
|
"signature": "e4e57c7707a3fcd8f9e05b019f657731c14ee6eac1e1c4b8658e64874b4389ca"
|
|
679
679
|
},
|
|
680
680
|
"../../core/lib-esm/providers/pinpoint/types/pinpoint.d.ts": {
|
|
681
|
-
"version": "
|
|
682
|
-
"signature": "
|
|
681
|
+
"version": "bb2da4c524dd4d114d7093ce40fde2d8d0dc994edf56d59dda1a5718c2d18413",
|
|
682
|
+
"signature": "bb2da4c524dd4d114d7093ce40fde2d8d0dc994edf56d59dda1a5718c2d18413"
|
|
683
683
|
},
|
|
684
684
|
"../../core/lib-esm/providers/pinpoint/types/index.d.ts": {
|
|
685
685
|
"version": "9192d7d0b94661bf5076dfc22a6bb30d0af8f775530092a06ec0ce671a51ee9b",
|
|
@@ -1057,13 +1057,17 @@
|
|
|
1057
1057
|
"version": "8e4d32325135c680f916d32c4b34a0c364b3b58c8b5eb8e6ae1d272809740b6b",
|
|
1058
1058
|
"signature": "8e4d32325135c680f916d32c4b34a0c364b3b58c8b5eb8e6ae1d272809740b6b"
|
|
1059
1059
|
},
|
|
1060
|
+
"../../core/lib-esm/utils/sessionListener/constants.d.ts": {
|
|
1061
|
+
"version": "6180c552b315823294a11e45aaa42b86c79d749e0dcdd981efda053e4e752e75",
|
|
1062
|
+
"signature": "6180c552b315823294a11e45aaa42b86c79d749e0dcdd981efda053e4e752e75"
|
|
1063
|
+
},
|
|
1060
1064
|
"../../core/lib-esm/utils/sessionListener/index.d.ts": {
|
|
1061
|
-
"version": "
|
|
1062
|
-
"signature": "
|
|
1065
|
+
"version": "1a9624c46a3b64dc2615a8ffa78bdbe28aae8e2de0cabfcd9ba2b9eea6501e39",
|
|
1066
|
+
"signature": "1a9624c46a3b64dc2615a8ffa78bdbe28aae8e2de0cabfcd9ba2b9eea6501e39"
|
|
1063
1067
|
},
|
|
1064
1068
|
"../../core/lib-esm/libraryUtils.d.ts": {
|
|
1065
|
-
"version": "
|
|
1066
|
-
"signature": "
|
|
1069
|
+
"version": "9df2a97493448c62383cd65a13163752683badbbc5c8ca4daa2d457ee02ee685",
|
|
1070
|
+
"signature": "9df2a97493448c62383cd65a13163752683badbbc5c8ca4daa2d457ee02ee685"
|
|
1067
1071
|
},
|
|
1068
1072
|
"../../../node_modules/graphql/version.d.ts": {
|
|
1069
1073
|
"version": "fd179d7b68260caf075aaabe202dfd39622403405beec3c7a697dec1df338cb2",
|
|
@@ -1461,13 +1465,49 @@
|
|
|
1461
1465
|
"version": "05f82884018fbd03c6512b56d11a712c0282dd1df6338473a2ca5bcacffa8fb9",
|
|
1462
1466
|
"signature": "05f82884018fbd03c6512b56d11a712c0282dd1df6338473a2ca5bcacffa8fb9"
|
|
1463
1467
|
},
|
|
1468
|
+
"../../core/lib-esm/adapterCore/serverContext/types/amplifyServer.d.ts": {
|
|
1469
|
+
"version": "fa0df0aa55822780f1eb238625908041bed3890d6dfd89167434ef1074fa6e54",
|
|
1470
|
+
"signature": "fa0df0aa55822780f1eb238625908041bed3890d6dfd89167434ef1074fa6e54"
|
|
1471
|
+
},
|
|
1472
|
+
"../../../node_modules/@types/cookie/index.d.ts": {
|
|
1473
|
+
"version": "4a547783c826c1dec10d96734687ae4db2e89d40261e91b5c327b60748315dc1",
|
|
1474
|
+
"signature": "4a547783c826c1dec10d96734687ae4db2e89d40261e91b5c327b60748315dc1"
|
|
1475
|
+
},
|
|
1476
|
+
"../../core/lib-esm/adapterCore/serverContext/types/cookieStorage.d.ts": {
|
|
1477
|
+
"version": "d76bfcad6afaf55bdcde2c48d0bbc8d22bfce20397164ebe02e532f869889918",
|
|
1478
|
+
"signature": "d76bfcad6afaf55bdcde2c48d0bbc8d22bfce20397164ebe02e532f869889918"
|
|
1479
|
+
},
|
|
1480
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts": {
|
|
1481
|
+
"version": "2ee585d269d3bb98d20d4b9284dc8683c205a720dd4703ab9b39c07d56ab54c0",
|
|
1482
|
+
"signature": "2ee585d269d3bb98d20d4b9284dc8683c205a720dd4703ab9b39c07d56ab54c0"
|
|
1483
|
+
},
|
|
1484
|
+
"../../core/lib-esm/adapterCore/serverContext/serverContext.d.ts": {
|
|
1485
|
+
"version": "866cf9006a9dedb20f66d40ffd6ea9ac56b8e2fa432206f7965b05ef2429df5a",
|
|
1486
|
+
"signature": "866cf9006a9dedb20f66d40ffd6ea9ac56b8e2fa432206f7965b05ef2429df5a"
|
|
1487
|
+
},
|
|
1488
|
+
"../../core/lib-esm/adapterCore/serverContext/index.d.ts": {
|
|
1489
|
+
"version": "6043adb29092ac8654ed10de65b010c65f0f4fe1c116514df134cd50e2c92a82",
|
|
1490
|
+
"signature": "6043adb29092ac8654ed10de65b010c65f0f4fe1c116514df134cd50e2c92a82"
|
|
1491
|
+
},
|
|
1492
|
+
"../../core/lib-esm/adapterCore/error/AmplifyServerContextError.d.ts": {
|
|
1493
|
+
"version": "85af50f664da9fcd22122bed7f787cb11d88a5f688e04cbb31aca43b34dcb002",
|
|
1494
|
+
"signature": "85af50f664da9fcd22122bed7f787cb11d88a5f688e04cbb31aca43b34dcb002"
|
|
1495
|
+
},
|
|
1496
|
+
"../../core/lib-esm/adapterCore/error/index.d.ts": {
|
|
1497
|
+
"version": "eee76cf795f4a766ec78426a7cdfa5cae02b6068e74078d4d53b65199c3555c7",
|
|
1498
|
+
"signature": "eee76cf795f4a766ec78426a7cdfa5cae02b6068e74078d4d53b65199c3555c7"
|
|
1499
|
+
},
|
|
1500
|
+
"../../core/lib-esm/adapterCore/index.d.ts": {
|
|
1501
|
+
"version": "7015f34b121b665b08b991a17764d8b03c32375234ce1eb9a8b251c01732908f",
|
|
1502
|
+
"signature": "7015f34b121b665b08b991a17764d8b03c32375234ce1eb9a8b251c01732908f"
|
|
1503
|
+
},
|
|
1464
1504
|
"../src/types/PubSub.ts": {
|
|
1465
1505
|
"version": "14b4a96cd324440e30040d2a8d147af5f71ac1603546e16a9e0b56aa705aeb05",
|
|
1466
1506
|
"signature": "69998b609508e9a6a8acbba64b5e4cdbe313c53451b349fe049d56786c2afd14"
|
|
1467
1507
|
},
|
|
1468
1508
|
"../src/types/index.ts": {
|
|
1469
|
-
"version": "
|
|
1470
|
-
"signature": "
|
|
1509
|
+
"version": "ac3e47208a36a9ba3e9ade2a4572348ab9e2f319442f57dca057193f22b88f86",
|
|
1510
|
+
"signature": "ecbeb4a8292223fc7c7ef4b1358cfbb3be7acd7ad1b7b53f2c25b7c508c5416f"
|
|
1471
1511
|
},
|
|
1472
1512
|
"../../api-rest/lib-esm/errors/RestApiError.d.ts": {
|
|
1473
1513
|
"version": "c7401c76b7d4c6fed3f63c48bc367e0f1bb73239c9f6927cd3563eb2c852285b",
|
|
@@ -1546,8 +1586,8 @@
|
|
|
1546
1586
|
"signature": "d3cb3737739afb769396e6e216ef999596415ce2ef5050142ee36656d60c7e10"
|
|
1547
1587
|
},
|
|
1548
1588
|
"../src/internals/InternalGraphQLAPI.ts": {
|
|
1549
|
-
"version": "
|
|
1550
|
-
"signature": "
|
|
1589
|
+
"version": "7348d15e1d5c00d6cffff3cec8c6438ed5ce4b7030292a230b5a5b4d8c041c93",
|
|
1590
|
+
"signature": "92eb44000634e192dd176711288edfbb818dcec0890a01233a60c27667f94e91"
|
|
1551
1591
|
},
|
|
1552
1592
|
"../src/internals/v6.ts": {
|
|
1553
1593
|
"version": "2702b21509656ebfaf99f9b3e11e6e7c0b147d17320d109245f244033775e758",
|
|
@@ -1558,8 +1598,8 @@
|
|
|
1558
1598
|
"signature": "60c49aaa36553821d12c4dabba54609c41f4254aed660ccaa5cc6495d4b24bd9"
|
|
1559
1599
|
},
|
|
1560
1600
|
"../src/GraphQLAPI.ts": {
|
|
1561
|
-
"version": "
|
|
1562
|
-
"signature": "
|
|
1601
|
+
"version": "94ba5874597866300a949301590e3ba22df46e8c00709103e78639a9fb2315c3",
|
|
1602
|
+
"signature": "65dc09cc82987a4f9bd0ccf039761444bc00610756a3f02e11e37d93341f6f0f"
|
|
1563
1603
|
},
|
|
1564
1604
|
"../src/index.ts": {
|
|
1565
1605
|
"version": "98d8433766c112c8658d03649ac495f403979234c503594a7b7baf3b5f8e5a02",
|
|
@@ -1595,7 +1635,7 @@
|
|
|
1595
1635
|
"lib.es2020.promise.d.ts"
|
|
1596
1636
|
],
|
|
1597
1637
|
"downlevelIteration": true,
|
|
1598
|
-
"target":
|
|
1638
|
+
"target": 7,
|
|
1599
1639
|
"moduleResolution": 2,
|
|
1600
1640
|
"declaration": true,
|
|
1601
1641
|
"noEmitOnError": true,
|
|
@@ -1744,7 +1784,7 @@
|
|
|
1744
1784
|
"../../../node_modules/@types/node/base.d.ts",
|
|
1745
1785
|
"../../../node_modules/@types/node/index.d.ts"
|
|
1746
1786
|
],
|
|
1747
|
-
"
|
|
1787
|
+
"../../../node_modules/tslib/tslib.d.ts": [
|
|
1748
1788
|
"../../../node_modules/@types/node/base.d.ts",
|
|
1749
1789
|
"../../../node_modules/@types/node/index.d.ts"
|
|
1750
1790
|
],
|
|
@@ -3038,8 +3078,13 @@
|
|
|
3038
3078
|
"../../../node_modules/@types/node/base.d.ts",
|
|
3039
3079
|
"../../../node_modules/@types/node/index.d.ts"
|
|
3040
3080
|
],
|
|
3081
|
+
"../../core/lib-esm/utils/sessionListener/constants.d.ts": [
|
|
3082
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3083
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3084
|
+
],
|
|
3041
3085
|
"../../core/lib-esm/utils/sessionListener/index.d.ts": [
|
|
3042
3086
|
"../../core/lib-esm/utils/sessionListener/SessionListener.d.ts",
|
|
3087
|
+
"../../core/lib-esm/utils/sessionListener/constants.d.ts",
|
|
3043
3088
|
"../../../node_modules/@types/node/base.d.ts",
|
|
3044
3089
|
"../../../node_modules/@types/node/index.d.ts"
|
|
3045
3090
|
],
|
|
@@ -3772,6 +3817,55 @@
|
|
|
3772
3817
|
"../../../node_modules/@types/node/base.d.ts",
|
|
3773
3818
|
"../../../node_modules/@types/node/index.d.ts"
|
|
3774
3819
|
],
|
|
3820
|
+
"../../core/lib-esm/adapterCore/serverContext/types/amplifyServer.d.ts": [
|
|
3821
|
+
"../../core/lib-esm/singleton/index.d.ts",
|
|
3822
|
+
"../../core/lib-esm/singleton/types.d.ts",
|
|
3823
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3824
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3825
|
+
],
|
|
3826
|
+
"../../../node_modules/@types/cookie/index.d.ts": [
|
|
3827
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3828
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3829
|
+
],
|
|
3830
|
+
"../../core/lib-esm/adapterCore/serverContext/types/cookieStorage.d.ts": [
|
|
3831
|
+
"../../../node_modules/@types/cookie/index.d.ts",
|
|
3832
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3833
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3834
|
+
],
|
|
3835
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts": [
|
|
3836
|
+
"../../core/lib-esm/adapterCore/serverContext/types/amplifyServer.d.ts",
|
|
3837
|
+
"../../core/lib-esm/adapterCore/serverContext/types/cookieStorage.d.ts",
|
|
3838
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3839
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3840
|
+
],
|
|
3841
|
+
"../../core/lib-esm/adapterCore/serverContext/serverContext.d.ts": [
|
|
3842
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts",
|
|
3843
|
+
"../../core/lib-esm/singleton/types.d.ts",
|
|
3844
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3845
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3846
|
+
],
|
|
3847
|
+
"../../core/lib-esm/adapterCore/serverContext/index.d.ts": [
|
|
3848
|
+
"../../core/lib-esm/adapterCore/serverContext/serverContext.d.ts",
|
|
3849
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts",
|
|
3850
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3851
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3852
|
+
],
|
|
3853
|
+
"../../core/lib-esm/adapterCore/error/AmplifyServerContextError.d.ts": [
|
|
3854
|
+
"../../core/lib-esm/errors/index.d.ts",
|
|
3855
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3856
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3857
|
+
],
|
|
3858
|
+
"../../core/lib-esm/adapterCore/error/index.d.ts": [
|
|
3859
|
+
"../../core/lib-esm/adapterCore/error/AmplifyServerContextError.d.ts",
|
|
3860
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3861
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3862
|
+
],
|
|
3863
|
+
"../../core/lib-esm/adapterCore/index.d.ts": [
|
|
3864
|
+
"../../core/lib-esm/adapterCore/serverContext/index.d.ts",
|
|
3865
|
+
"../../core/lib-esm/adapterCore/error/index.d.ts",
|
|
3866
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
3867
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
3868
|
+
],
|
|
3775
3869
|
"../src/types/PubSub.ts": [
|
|
3776
3870
|
"../../../node_modules/@types/node/base.d.ts",
|
|
3777
3871
|
"../../../node_modules/@types/node/index.d.ts"
|
|
@@ -3780,6 +3874,7 @@
|
|
|
3780
3874
|
"../../core/lib-esm/index.d.ts",
|
|
3781
3875
|
"../../../node_modules/graphql/index.d.ts",
|
|
3782
3876
|
"../../core/lib-esm/libraryUtils.d.ts",
|
|
3877
|
+
"../../core/lib-esm/adapterCore/index.d.ts",
|
|
3783
3878
|
"../src/types/PubSub.ts",
|
|
3784
3879
|
"../../../node_modules/@types/node/base.d.ts",
|
|
3785
3880
|
"../../../node_modules/@types/node/index.d.ts"
|
|
@@ -4089,7 +4184,7 @@
|
|
|
4089
4184
|
"../../../node_modules/@types/node/base.d.ts",
|
|
4090
4185
|
"../../../node_modules/@types/node/index.d.ts"
|
|
4091
4186
|
],
|
|
4092
|
-
"
|
|
4187
|
+
"../../../node_modules/tslib/tslib.d.ts": [
|
|
4093
4188
|
"../../../node_modules/@types/node/base.d.ts",
|
|
4094
4189
|
"../../../node_modules/@types/node/index.d.ts"
|
|
4095
4190
|
],
|
|
@@ -4175,7 +4270,8 @@
|
|
|
4175
4270
|
"../../../node_modules/graphql/index.d.ts",
|
|
4176
4271
|
"../src/types/PubSub.ts",
|
|
4177
4272
|
"../../core/lib-esm/libraryUtils.d.ts",
|
|
4178
|
-
"../../core/lib-esm/index.d.ts"
|
|
4273
|
+
"../../core/lib-esm/index.d.ts",
|
|
4274
|
+
"../../core/lib-esm/adapterCore/index.d.ts"
|
|
4179
4275
|
],
|
|
4180
4276
|
"../../core/lib-esm/Hub/index.d.ts": [
|
|
4181
4277
|
"../../core/lib-esm/Hub/types/index.d.ts",
|
|
@@ -4290,6 +4386,36 @@
|
|
|
4290
4386
|
"../../../node_modules/@types/node/base.d.ts",
|
|
4291
4387
|
"../../../node_modules/@types/node/index.d.ts"
|
|
4292
4388
|
],
|
|
4389
|
+
"../../core/lib-esm/adapterCore/serverContext/types/amplifyServer.d.ts": [
|
|
4390
|
+
"../../core/lib-esm/singleton/index.d.ts",
|
|
4391
|
+
"../../core/lib-esm/singleton/types.d.ts",
|
|
4392
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
4393
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
4394
|
+
],
|
|
4395
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts": [
|
|
4396
|
+
"../../core/lib-esm/adapterCore/serverContext/types/amplifyServer.d.ts",
|
|
4397
|
+
"../../core/lib-esm/adapterCore/serverContext/types/cookieStorage.d.ts",
|
|
4398
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
4399
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
4400
|
+
],
|
|
4401
|
+
"../../core/lib-esm/adapterCore/serverContext/index.d.ts": [
|
|
4402
|
+
"../../core/lib-esm/adapterCore/serverContext/serverContext.d.ts",
|
|
4403
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts",
|
|
4404
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
4405
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
4406
|
+
],
|
|
4407
|
+
"../../core/lib-esm/adapterCore/index.d.ts": [
|
|
4408
|
+
"../../core/lib-esm/adapterCore/serverContext/index.d.ts",
|
|
4409
|
+
"../../core/lib-esm/adapterCore/error/index.d.ts",
|
|
4410
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
4411
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
4412
|
+
],
|
|
4413
|
+
"../../core/lib-esm/adapterCore/serverContext/serverContext.d.ts": [
|
|
4414
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts",
|
|
4415
|
+
"../../core/lib-esm/singleton/types.d.ts",
|
|
4416
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
4417
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
4418
|
+
],
|
|
4293
4419
|
"../../core/lib-esm/singleton/Auth/index.d.ts": [
|
|
4294
4420
|
"../../core/lib-esm/singleton/Auth/types.d.ts",
|
|
4295
4421
|
"../../../node_modules/@types/node/base.d.ts",
|
|
@@ -5001,6 +5127,25 @@
|
|
|
5001
5127
|
"../../../node_modules/@types/node/base.d.ts",
|
|
5002
5128
|
"../../../node_modules/@types/node/index.d.ts"
|
|
5003
5129
|
],
|
|
5130
|
+
"../../core/lib-esm/adapterCore/error/index.d.ts": [
|
|
5131
|
+
"../../core/lib-esm/adapterCore/error/AmplifyServerContextError.d.ts",
|
|
5132
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
5133
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
5134
|
+
],
|
|
5135
|
+
"../../core/lib-esm/adapterCore/error/AmplifyServerContextError.d.ts": [
|
|
5136
|
+
"../../core/lib-esm/errors/index.d.ts",
|
|
5137
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
5138
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
5139
|
+
],
|
|
5140
|
+
"../../core/lib-esm/adapterCore/serverContext/types/cookieStorage.d.ts": [
|
|
5141
|
+
"../../../node_modules/@types/cookie/index.d.ts",
|
|
5142
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
5143
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
5144
|
+
],
|
|
5145
|
+
"../../../node_modules/@types/cookie/index.d.ts": [
|
|
5146
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
5147
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
5148
|
+
],
|
|
5004
5149
|
"../../../node_modules/graphql/index.d.ts": [
|
|
5005
5150
|
"../../../node_modules/graphql/version.d.ts",
|
|
5006
5151
|
"../../../node_modules/graphql/graphql.d.ts",
|
|
@@ -5703,6 +5848,11 @@
|
|
|
5703
5848
|
],
|
|
5704
5849
|
"../../core/lib-esm/utils/sessionListener/index.d.ts": [
|
|
5705
5850
|
"../../core/lib-esm/utils/sessionListener/SessionListener.d.ts",
|
|
5851
|
+
"../../core/lib-esm/utils/sessionListener/constants.d.ts",
|
|
5852
|
+
"../../../node_modules/@types/node/base.d.ts",
|
|
5853
|
+
"../../../node_modules/@types/node/index.d.ts"
|
|
5854
|
+
],
|
|
5855
|
+
"../../core/lib-esm/utils/sessionListener/constants.d.ts": [
|
|
5706
5856
|
"../../../node_modules/@types/node/base.d.ts",
|
|
5707
5857
|
"../../../node_modules/@types/node/index.d.ts"
|
|
5708
5858
|
],
|
|
@@ -6237,7 +6387,7 @@
|
|
|
6237
6387
|
]
|
|
6238
6388
|
},
|
|
6239
6389
|
"semanticDiagnosticsPerFile": [
|
|
6240
|
-
"
|
|
6390
|
+
"../../../node_modules/tslib/tslib.d.ts",
|
|
6241
6391
|
"../../core/lib-esm/Hub/types/AuthTypes.d.ts",
|
|
6242
6392
|
"../../core/lib-esm/Hub/types/HubTypes.d.ts",
|
|
6243
6393
|
"../../core/lib-esm/Hub/types/index.d.ts",
|
|
@@ -6468,6 +6618,7 @@
|
|
|
6468
6618
|
"../../core/lib-esm/utils/globalHelpers/index.d.ts",
|
|
6469
6619
|
"../../core/lib-esm/utils/sessionListener/types.d.ts",
|
|
6470
6620
|
"../../core/lib-esm/utils/sessionListener/SessionListener.d.ts",
|
|
6621
|
+
"../../core/lib-esm/utils/sessionListener/constants.d.ts",
|
|
6471
6622
|
"../../core/lib-esm/utils/sessionListener/index.d.ts",
|
|
6472
6623
|
"../../core/lib-esm/libraryUtils.d.ts",
|
|
6473
6624
|
"../../../node_modules/graphql/version.d.ts",
|
|
@@ -6569,6 +6720,15 @@
|
|
|
6569
6720
|
"../../../node_modules/graphql/utilities/findDeprecatedUsages.d.ts",
|
|
6570
6721
|
"../../../node_modules/graphql/utilities/index.d.ts",
|
|
6571
6722
|
"../../../node_modules/graphql/index.d.ts",
|
|
6723
|
+
"../../core/lib-esm/adapterCore/serverContext/types/amplifyServer.d.ts",
|
|
6724
|
+
"../../../node_modules/@types/cookie/index.d.ts",
|
|
6725
|
+
"../../core/lib-esm/adapterCore/serverContext/types/cookieStorage.d.ts",
|
|
6726
|
+
"../../core/lib-esm/adapterCore/serverContext/types/index.d.ts",
|
|
6727
|
+
"../../core/lib-esm/adapterCore/serverContext/serverContext.d.ts",
|
|
6728
|
+
"../../core/lib-esm/adapterCore/serverContext/index.d.ts",
|
|
6729
|
+
"../../core/lib-esm/adapterCore/error/AmplifyServerContextError.d.ts",
|
|
6730
|
+
"../../core/lib-esm/adapterCore/error/index.d.ts",
|
|
6731
|
+
"../../core/lib-esm/adapterCore/index.d.ts",
|
|
6572
6732
|
"../src/types/PubSub.ts",
|
|
6573
6733
|
"../src/types/index.ts",
|
|
6574
6734
|
"../../api-rest/lib-esm/errors/RestApiError.d.ts",
|
package/lib-esm/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Source, DocumentNode, GraphQLError } from 'graphql';
|
|
|
3
3
|
export { OperationTypeNode } from 'graphql';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { GraphQLAuthMode, DocumentType } from '@aws-amplify/core/internals/utils';
|
|
6
|
+
import { AmplifyServer } from '@aws-amplify/core/internals/adapter-core';
|
|
6
7
|
export { CONTROL_MSG, ConnectionState } from './PubSub';
|
|
7
8
|
/**
|
|
8
9
|
* Loose/Unknown options for raw GraphQLAPICategory `graphql()`.
|
|
@@ -279,11 +280,24 @@ declare type ExcludeNeverFields<O> = {
|
|
|
279
280
|
[K in FilteredKeys<O>]: O[K];
|
|
280
281
|
};
|
|
281
282
|
export declare const __amplify: unique symbol;
|
|
283
|
+
/**
|
|
284
|
+
* TODO: Refactor these 2. Pull out `graphQL` into its own type
|
|
285
|
+
*/
|
|
282
286
|
export declare type V6Client<T extends Record<any, any> = never> = ExcludeNeverFields<{
|
|
283
287
|
[__amplify]: AmplifyClassV6;
|
|
284
|
-
graphql:
|
|
285
|
-
|
|
286
|
-
|
|
288
|
+
graphql: GraphQLMethod;
|
|
289
|
+
cancel: (promise: Promise<any>, message?: string) => boolean;
|
|
290
|
+
isCancelError: (error: any) => boolean;
|
|
291
|
+
}>;
|
|
292
|
+
export declare type V6ClientSSR<T extends Record<any, any> = never> = ExcludeNeverFields<{
|
|
293
|
+
[__amplify]: AmplifyClassV6;
|
|
294
|
+
graphql: GraphQLMethodSSR;
|
|
287
295
|
cancel: (promise: Promise<any>, message?: string) => boolean;
|
|
288
296
|
isCancelError: (error: any) => boolean;
|
|
289
297
|
}>;
|
|
298
|
+
export declare type GraphQLMethod = <FALLBACK_TYPES = unknown, TYPED_GQL_STRING extends string = string>(options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>, additionalHeaders?: {
|
|
299
|
+
[key: string]: string;
|
|
300
|
+
} | undefined) => GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>;
|
|
301
|
+
export declare type GraphQLMethodSSR = <FALLBACK_TYPES = unknown, TYPED_GQL_STRING extends string = string>(contextSpec: AmplifyServer.ContextSpec, options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>, additionalHeaders?: {
|
|
302
|
+
[key: string]: string;
|
|
303
|
+
} | undefined) => GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>;
|
package/lib-esm/types/index.js
CHANGED
|
@@ -7,4 +7,4 @@ export var GraphQLAuthError;
|
|
|
7
7
|
GraphQLAuthError["NO_FEDERATED_JWT"] = "No federated jwt";
|
|
8
8
|
GraphQLAuthError["NO_AUTH_TOKEN"] = "No auth token specified";
|
|
9
9
|
})(GraphQLAuthError || (GraphQLAuthError = {}));
|
|
10
|
-
export
|
|
10
|
+
export const __amplify = Symbol('amplify');
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { __assign } from "tslib";
|
|
4
3
|
import { Observable, map, filter } from 'rxjs';
|
|
5
4
|
import { ConnectionState } from '../types/PubSub';
|
|
6
5
|
import { ReachabilityMonitor } from './ReachabilityMonitor';
|
|
7
|
-
export
|
|
6
|
+
export const CONNECTION_CHANGE = {
|
|
8
7
|
KEEP_ALIVE_MISSED: { keepAliveState: 'unhealthy' },
|
|
9
8
|
KEEP_ALIVE: { keepAliveState: 'healthy' },
|
|
10
9
|
CONNECTION_ESTABLISHED: { connectionState: 'connected' },
|
|
@@ -21,9 +20,8 @@ export var CONNECTION_CHANGE = {
|
|
|
21
20
|
ONLINE: { networkState: 'connected' },
|
|
22
21
|
OFFLINE: { networkState: 'disconnected' },
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _this = this;
|
|
23
|
+
export class ConnectionStateMonitor {
|
|
24
|
+
constructor() {
|
|
27
25
|
this._networkMonitoringSubscription = undefined;
|
|
28
26
|
this._linkedConnectionState = {
|
|
29
27
|
networkState: 'connected',
|
|
@@ -32,73 +30,61 @@ var ConnectionStateMonitor = /** @class */ (function () {
|
|
|
32
30
|
keepAliveState: 'healthy',
|
|
33
31
|
};
|
|
34
32
|
// Attempt to update the state with the current actual network state
|
|
35
|
-
this._initialNetworkStateSubscription = ReachabilityMonitor().subscribe(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);
|
|
39
|
-
(_b = _this._initialNetworkStateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
33
|
+
this._initialNetworkStateSubscription = ReachabilityMonitor().subscribe(({ online }) => {
|
|
34
|
+
this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);
|
|
35
|
+
this._initialNetworkStateSubscription?.unsubscribe();
|
|
40
36
|
});
|
|
41
37
|
this._linkedConnectionStateObservable =
|
|
42
|
-
new Observable(
|
|
43
|
-
connectionStateObserver.next(
|
|
44
|
-
|
|
38
|
+
new Observable(connectionStateObserver => {
|
|
39
|
+
connectionStateObserver.next(this._linkedConnectionState);
|
|
40
|
+
this._linkedConnectionStateObserver = connectionStateObserver;
|
|
45
41
|
});
|
|
46
42
|
}
|
|
47
43
|
/**
|
|
48
44
|
* Turn network state monitoring on if it isn't on already
|
|
49
45
|
*/
|
|
50
|
-
|
|
51
|
-
var _this = this;
|
|
52
|
-
var _a;
|
|
46
|
+
enableNetworkMonitoring() {
|
|
53
47
|
// If no initial network state was discovered, stop trying
|
|
54
|
-
|
|
48
|
+
this._initialNetworkStateSubscription?.unsubscribe();
|
|
55
49
|
// Maintain the network state based on the reachability monitor
|
|
56
50
|
if (this._networkMonitoringSubscription === undefined) {
|
|
57
|
-
this._networkMonitoringSubscription = ReachabilityMonitor().subscribe(
|
|
58
|
-
|
|
59
|
-
_this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);
|
|
51
|
+
this._networkMonitoringSubscription = ReachabilityMonitor().subscribe(({ online }) => {
|
|
52
|
+
this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);
|
|
60
53
|
});
|
|
61
54
|
}
|
|
62
|
-
}
|
|
55
|
+
}
|
|
63
56
|
/**
|
|
64
57
|
* Turn network state monitoring off if it isn't off already
|
|
65
58
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
(_a = this._networkMonitoringSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
59
|
+
disableNetworkMonitoring() {
|
|
60
|
+
this._networkMonitoringSubscription?.unsubscribe();
|
|
69
61
|
this._networkMonitoringSubscription = undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return this.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}));
|
|
93
|
-
},
|
|
94
|
-
enumerable: true,
|
|
95
|
-
configurable: true
|
|
96
|
-
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get the observable that allows us to monitor the connection state
|
|
65
|
+
*
|
|
66
|
+
* @returns {Observable<ConnectionState>} - The observable that emits ConnectionState updates
|
|
67
|
+
*/
|
|
68
|
+
get connectionStateObservable() {
|
|
69
|
+
let previous;
|
|
70
|
+
// The linked state aggregates state changes to any of the network, connection,
|
|
71
|
+
// intendedConnection and keepAliveHealth. Some states will change these independent
|
|
72
|
+
// states without changing the overall connection state.
|
|
73
|
+
// After translating from linked states to ConnectionState, then remove any duplicates
|
|
74
|
+
return this._linkedConnectionStateObservable
|
|
75
|
+
.pipe(map(value => {
|
|
76
|
+
return this.connectionStatesTranslator(value);
|
|
77
|
+
}))
|
|
78
|
+
.pipe(filter(current => {
|
|
79
|
+
const toInclude = current !== previous;
|
|
80
|
+
previous = current;
|
|
81
|
+
return toInclude;
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
97
84
|
/*
|
|
98
85
|
* Updates local connection state and emits the full state to the observer.
|
|
99
86
|
*/
|
|
100
|
-
|
|
101
|
-
var _a;
|
|
87
|
+
record(statusUpdates) {
|
|
102
88
|
// Maintain the network monitor
|
|
103
89
|
if (statusUpdates.intendedConnectionState === 'connected') {
|
|
104
90
|
this.enableNetworkMonitoring();
|
|
@@ -107,15 +93,17 @@ var ConnectionStateMonitor = /** @class */ (function () {
|
|
|
107
93
|
this.disableNetworkMonitoring();
|
|
108
94
|
}
|
|
109
95
|
// Maintain the socket state
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
96
|
+
const newSocketStatus = {
|
|
97
|
+
...this._linkedConnectionState,
|
|
98
|
+
...statusUpdates,
|
|
99
|
+
};
|
|
100
|
+
this._linkedConnectionState = { ...newSocketStatus };
|
|
101
|
+
this._linkedConnectionStateObserver?.next(this._linkedConnectionState);
|
|
102
|
+
}
|
|
114
103
|
/*
|
|
115
104
|
* Translate the ConnectionState structure into a specific ConnectionState string literal union
|
|
116
105
|
*/
|
|
117
|
-
|
|
118
|
-
var connectionState = _a.connectionState, networkState = _a.networkState, intendedConnectionState = _a.intendedConnectionState, keepAliveState = _a.keepAliveState;
|
|
106
|
+
connectionStatesTranslator({ connectionState, networkState, intendedConnectionState, keepAliveState, }) {
|
|
119
107
|
if (connectionState === 'connected' && networkState === 'disconnected')
|
|
120
108
|
return ConnectionState.ConnectedPendingNetwork;
|
|
121
109
|
if (connectionState === 'connected' &&
|
|
@@ -136,7 +124,5 @@ var ConnectionStateMonitor = /** @class */ (function () {
|
|
|
136
124
|
if (connectionState === 'disconnected')
|
|
137
125
|
return ConnectionState.Disconnected;
|
|
138
126
|
return ConnectionState.Connected;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
}());
|
|
142
|
-
export { ConnectionStateMonitor };
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { Reachability } from '@aws-amplify/core/internals/utils';
|
|
4
|
-
export
|
|
4
|
+
export const ReachabilityMonitor = () => new Reachability().networkMonitor();
|
|
@@ -2,6 +2,4 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { Reachability } from '@aws-amplify/core/internals/utils';
|
|
4
4
|
import { default as NetInfo } from '@react-native-community/netinfo';
|
|
5
|
-
export
|
|
6
|
-
return new Reachability().networkMonitor(NetInfo);
|
|
7
|
-
};
|
|
5
|
+
export const ReachabilityMonitor = () => new Reachability().networkMonitor(NetInfo);
|