@drfed/web 0.1.0-dev.565 → 0.2.0-dev.567
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/.output/nitro.json +1 -1
- package/.output/public/.vite/manifest.json +181 -181
- package/.output/public/_build/assets/{ActorDetailQuery.graphql-D96mwq1k.js → ActorDetailQuery.graphql-BifVLgri.js} +1 -1
- package/.output/public/_build/assets/{ActorDetailQuery.graphql-DrxSNh1X.js → ActorDetailQuery.graphql-CCzXciWe.js} +1 -1
- package/.output/public/_build/assets/{CompleteLoginChallenge.graphql-C5Zq3wNh.js → CompleteLoginChallenge.graphql-BuIODTQe.js} +1 -1
- package/.output/public/_build/assets/{CopyButton-B2l484wE.js → CopyButton-BPA_AsfQ.js} +1 -1
- package/.output/public/_build/assets/{CreateInstanceMutation.graphql-B4CRy6cl.js → CreateInstanceMutation.graphql-BeuI_m9K.js} +1 -1
- package/.output/public/_build/assets/{CreateObjectMutation.graphql-B4A01dgV.js → CreateObjectMutation.graphql-slDMnVjt.js} +1 -1
- package/.output/public/_build/assets/{GenerateActorsMutation.graphql-mlHJNIbe.js → GenerateActorsMutation.graphql-vkoqVyL8.js} +1 -1
- package/.output/public/_build/assets/{GetHostQuery.graphql-CuzDdOdW.js → GetHostQuery.graphql-BzusRJ7N.js} +1 -1
- package/.output/public/_build/assets/{GetHostQuery.graphql-o9K0Qkg0.js → GetHostQuery.graphql-CKu9xX8-.js} +1 -1
- package/.output/public/_build/assets/{HomeViewerQuery.graphql-B903WWKs.js → HomeViewerQuery.graphql-BEP_urQ1.js} +1 -1
- package/.output/public/_build/assets/HttpStatusCode-FQmr-LGM.js +1 -0
- package/.output/public/_build/assets/{InstanceActorListQuery.graphql-paa7teUO.js → InstanceActorListQuery.graphql-ADOUh67G.js} +1 -1
- package/.output/public/_build/assets/{InstanceActorListQuery.graphql-DmNwiEhM.js → InstanceActorListQuery.graphql-Dmh71GI5.js} +1 -1
- package/.output/public/_build/assets/{InstanceDetailQuery.graphql-B52nR132.js → InstanceDetailQuery.graphql-BVIsRDhB.js} +1 -1
- package/.output/public/_build/assets/{InstanceDetailQuery.graphql-DSA2BcAV.js → InstanceDetailQuery.graphql-YvCDX6Vx.js} +1 -1
- package/.output/public/_build/assets/JNCCF6MP-C_2GhSaE.js +1 -0
- package/.output/public/_build/assets/{LP6E37CW-Cwv6G3n1.js → LP6E37CW-BBu2j5XX.js} +1 -1
- package/.output/public/_build/assets/{SignInMutation.graphql-BalZYNFu.js → SignInMutation.graphql-D-K99qj-.js} +1 -1
- package/.output/public/_build/assets/TSB6MOZK-D4_kp7T4.js +1 -0
- package/.output/public/_build/assets/Toast-tZxI6Kk3.js +1 -0
- package/.output/public/_build/assets/{WorkspaceQuery.graphql-UoI7QDs4.js → WorkspaceQuery.graphql-9H5uLyBt.js} +1 -1
- package/.output/public/_build/assets/_...404_-DMz-AmEz.js +1 -0
- package/.output/public/_build/assets/{_challengeId_-Dk-0l7zl.js → _challengeId_-BK-xeuYX.js} +1 -1
- package/.output/public/_build/assets/{_id_-bpxdclBj.js → _id_-Q9HBJzaf.js} +1 -1
- package/.output/public/_build/assets/_slug_-DrTnyM7j.js +200 -0
- package/.output/public/_build/assets/{about-DIrbzRsi.js → about-DtTGI6TG.js} +1 -1
- package/.output/public/_build/assets/actors-LmFNJfl8.js +24 -0
- package/.output/public/_build/assets/{client-CGFoRcqH.js → client-BVl87rV7.js} +2 -2
- package/.output/public/_build/assets/{components-5MVu7IcD.js → components-D1sEsgws.js} +1 -1
- package/.output/public/_build/assets/dist-CMub1v5w.js +1 -0
- package/.output/public/_build/assets/{dist-BrJ_B8nU.js → dist-DUCXQy4t.js} +1 -1
- package/.output/public/_build/assets/{dist-WrlGlK67.js → dist-IMcx10bF.js} +1 -1
- package/.output/public/_build/assets/{entry-client-Do7ocrsL.js → entry-client-DyU5h6Kf.js} +3 -3
- package/.output/public/_build/assets/form.module-DZJVksrR.js +1 -0
- package/.output/public/_build/assets/{index-BHn6sAgH.js → index-CsGHD4_w.js} +1 -1
- package/.output/public/_build/assets/{index-BSLqnqN7.js → index-xrNvEFEe.js} +1 -1
- package/.output/public/_build/assets/instance-CD2GuEFF.js +35 -0
- package/.output/public/_build/assets/objects-CSDLRgba.js +25 -0
- package/.output/public/_build/assets/relay-runtime-CW2Fi-vu.js +7 -0
- package/.output/public/_build/assets/routing-BOJUm5FP.js +1 -0
- package/.output/public/_build/assets/sign-in-6aWEq4t1.js +10 -0
- package/.output/public/_build/assets/web-BjwKY0xb.js +1 -0
- package/.output/server/{_...404_-DDEH5apf.mjs → _...404_-DM28Kka3.mjs} +2 -3
- package/.output/server/{_challengeId_-C_n_Bww9.mjs → _challengeId_-CHkjsE_y.mjs} +5 -5
- package/.output/server/_chunks/ssr-renderer.mjs +3 -3
- package/.output/server/{_id_-DqytvZEf.mjs → _id_-BjLFsMir.mjs} +3 -4
- package/.output/server/_libs/@shikijs/core+[...].mjs +24 -22
- package/.output/server/_libs/@shikijs/engine-javascript+[...].mjs +45 -40
- package/.output/server/_libs/faker-js__faker.mjs +6 -12
- package/.output/server/_libs/relay-runtime.mjs +189 -177
- package/.output/server/_libs/seroval-plugins.mjs +45 -43
- package/.output/server/_libs/seroval.mjs +16 -11
- package/.output/server/_libs/solid-js.mjs +28 -19
- package/.output/server/_libs/solid-relay+tiny-invariant.mjs +1 -3
- package/.output/server/_libs/valibot.mjs +5 -44
- package/.output/server/_runtime.mjs +1 -1
- package/.output/server/{_slug_-CBOaSqoF.mjs → _slug_-CamNffYc.mjs} +3 -4
- package/.output/server/_ssr/{LP6E37CW-D2Ih_b_K.mjs → LP6E37CW-Bs07BPsK.mjs} +2 -2
- package/.output/server/_ssr/{TSB6MOZK-D06WZb6o.mjs → TSB6MOZK-Dz16RpiS.mjs} +10 -6
- package/.output/server/_ssr/{about-CD3QIgf_.mjs → about-K4E3_OxN.mjs} +2 -2
- package/.output/server/_ssr/{actors-CMWf-xQU.mjs → actors-DQIzbpiq.mjs} +21 -21
- package/.output/server/_ssr/{form.module-CTvIl1lm.mjs → form.module-B3iJri2-.mjs} +8 -5
- package/.output/server/_ssr/{index-yuhuc6-X.mjs → index-DQYLULEn.mjs} +2 -2
- package/.output/server/_ssr/{index-C4crD6q-.mjs → index-DU0kuIH3.mjs} +2 -3
- package/.output/server/_ssr/{instance-ZYWGeWd3.mjs → instance-BXwV77PI.mjs} +5 -7
- package/.output/server/_ssr/{objects-D5MVukzB.mjs → objects-DNPuxUtN.mjs} +55 -38
- package/.output/server/_ssr/{sign-in-CNHZb_zL.mjs → sign-in-KJ_TNq1o.mjs} +5 -6
- package/.output/server/_ssr/ssr.mjs +2303 -224
- package/.output/server/index.mjs +246 -246
- package/package.json +9 -9
- package/.output/public/_build/assets/HttpStatusCode-bgaVzuLy.js +0 -1
- package/.output/public/_build/assets/JNCCF6MP-CNMywyiC.js +0 -1
- package/.output/public/_build/assets/TSB6MOZK-CpiH97G1.js +0 -1
- package/.output/public/_build/assets/Toast-C1zr9crB.js +0 -1
- package/.output/public/_build/assets/_...404_-WZ8kAljY.js +0 -1
- package/.output/public/_build/assets/_slug_-DXfRknzJ.js +0 -200
- package/.output/public/_build/assets/actors-HfZh_afh.js +0 -24
- package/.output/public/_build/assets/dist-DVo0HS5G.js +0 -1
- package/.output/public/_build/assets/form.module-BecmEfV_.js +0 -1
- package/.output/public/_build/assets/instance-tpMrvJNZ.js +0 -35
- package/.output/public/_build/assets/objects-DR9TfL-V.js +0 -25
- package/.output/public/_build/assets/relay-runtime-BX3uubtA.js +0 -7
- package/.output/public/_build/assets/routing-DMN2NHu6.js +0 -1
- package/.output/public/_build/assets/sign-in-B67sv7z8.js +0 -10
- package/.output/public/_build/assets/web-DB_Nkq2D.js +0 -1
- package/.output/server/_ssr/JNCCF6MP-BAZlBnvx.mjs +0 -419
- package/.output/server/_ssr/Toast-Bb1gcxED.mjs +0 -947
- package/.output/server/_ssr/dist-D6rgyh-L.mjs +0 -81
- package/.output/server/_ssr/routing-DKTLkkbY.mjs +0 -620
|
@@ -198,7 +198,7 @@ var require_getRelayHandleKey = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
198
198
|
var invariant = require_invariant();
|
|
199
199
|
function getRelayHandleKey(handleName, key, fieldName) {
|
|
200
200
|
if (key && key !== DEFAULT_HANDLE_KEY) return "__".concat(key, "_").concat(handleName);
|
|
201
|
-
|
|
201
|
+
fieldName ?? invariant(false);
|
|
202
202
|
return "__".concat(fieldName, "_").concat(handleName);
|
|
203
203
|
}
|
|
204
204
|
module.exports = getRelayHandleKey;
|
|
@@ -479,7 +479,7 @@ var require_RelayModernSelector = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
479
479
|
var invariant = require_invariant();
|
|
480
480
|
require_warning();
|
|
481
481
|
function getSingularSelector(fragment, item) {
|
|
482
|
-
|
|
482
|
+
(typeof item !== "object" || item === null || Array.isArray(item)) && invariant(false);
|
|
483
483
|
var dataID = item[ID_KEY];
|
|
484
484
|
var fragments = item[FRAGMENTS_KEY];
|
|
485
485
|
var mixedOwner = item[FRAGMENT_OWNER_KEY];
|
|
@@ -557,7 +557,7 @@ var require_RelayModernSelector = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
557
557
|
return ids;
|
|
558
558
|
}
|
|
559
559
|
function getDataID(fragment, item) {
|
|
560
|
-
|
|
560
|
+
(typeof item !== "object" || item === null || Array.isArray(item)) && invariant(false);
|
|
561
561
|
var dataID = item[ID_KEY];
|
|
562
562
|
if (typeof dataID === "string") return dataID;
|
|
563
563
|
return null;
|
|
@@ -683,8 +683,8 @@ var require_ResolverFragments = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
683
683
|
if (!contextStack.length) throw new Error("readFragment should be called only from within a Relay Resolver function.");
|
|
684
684
|
var context = contextStack[contextStack.length - 1];
|
|
685
685
|
var fragmentSelector = getSelector(getFragment(fragmentInput), fragmentKey);
|
|
686
|
-
|
|
687
|
-
|
|
686
|
+
fragmentSelector ?? invariant(false);
|
|
687
|
+
fragmentSelector.kind !== "SingularReaderSelector" && invariant(false);
|
|
688
688
|
var _context$getDataForRe = context.getDataForResolverFragment(fragmentSelector, fragmentKey), data = _context$getDataForRe.data, isMissingData = _context$getDataForRe.isMissingData, fieldErrors = _context$getDataForRe.fieldErrors;
|
|
689
689
|
if (isMissingData || fieldErrors != null && fieldErrors.some(eventShouldThrow)) throw RESOLVER_FRAGMENT_ERRORED_SENTINEL;
|
|
690
690
|
return data;
|
|
@@ -706,10 +706,12 @@ var require_resolverDataInjector = /* @__PURE__ */ __commonJSMin(((exports, modu
|
|
|
706
706
|
return function(fragmentKey, args, resolverContext) {
|
|
707
707
|
var data = readFragment(fragment, fragmentKey);
|
|
708
708
|
if (fieldName != null) {
|
|
709
|
-
if (data == null)
|
|
710
|
-
|
|
709
|
+
if (data == null) {
|
|
710
|
+
if (isRequiredField === true) invariant(false);
|
|
711
|
+
else return resolverFn(null, args, resolverContext);
|
|
712
|
+
}
|
|
711
713
|
if (fieldName in data) {
|
|
712
|
-
if (isRequiredField === true)
|
|
714
|
+
if (isRequiredField === true) data[fieldName] ?? invariant(false);
|
|
713
715
|
return resolverFn(data[fieldName], args, resolverContext);
|
|
714
716
|
} else invariant(false);
|
|
715
717
|
} else return resolverFn(null, args, resolverContext);
|
|
@@ -1193,7 +1195,7 @@ var require_fetchQueryInternal = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
1193
1195
|
cachedReq.subjectForInFlightStatus.unsubscribe();
|
|
1194
1196
|
}
|
|
1195
1197
|
});
|
|
1196
|
-
|
|
1198
|
+
cachedRequest ?? invariant(false);
|
|
1197
1199
|
return getObservableForCachedRequest(requestCache, cachedRequest).subscribe(sink);
|
|
1198
1200
|
});
|
|
1199
1201
|
}
|
|
@@ -1265,7 +1267,7 @@ var require_fetchQueryInternal = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
1265
1267
|
}
|
|
1266
1268
|
function getCachedRequest(requestCache, identifier) {
|
|
1267
1269
|
var cached = requestCache.get(identifier);
|
|
1268
|
-
|
|
1270
|
+
cached ?? invariant(false);
|
|
1269
1271
|
return cached;
|
|
1270
1272
|
}
|
|
1271
1273
|
module.exports = {
|
|
@@ -1315,7 +1317,7 @@ var require_observeFragmentExperimental = /* @__PURE__ */ __commonJSMin(((export
|
|
|
1315
1317
|
var _fragmentNode$metadat;
|
|
1316
1318
|
var fragmentNode = getFragment(fragment);
|
|
1317
1319
|
var fragmentSelector = getSelector(fragmentNode, fragmentRef);
|
|
1318
|
-
|
|
1320
|
+
fragmentSelector ?? invariant(false);
|
|
1319
1321
|
!(((_fragmentNode$metadat = fragmentNode.metadata) === null || _fragmentNode$metadat === void 0 ? void 0 : _fragmentNode$metadat.hasClientEdges) == null || fragmentSelectorUsesExecTimeResolver(fragmentSelector)) && invariant(false);
|
|
1320
1322
|
switch (fragmentSelector.kind) {
|
|
1321
1323
|
case "SingularReaderSelector": return observeSingularSelector(environment, fragment, fragmentSelector);
|
|
@@ -1385,7 +1387,7 @@ var require_observeFragmentExperimental = /* @__PURE__ */ __commonJSMin(((export
|
|
|
1385
1387
|
state: "error"
|
|
1386
1388
|
};
|
|
1387
1389
|
}
|
|
1388
|
-
|
|
1390
|
+
snapshot.data ?? invariant(false);
|
|
1389
1391
|
return {
|
|
1390
1392
|
state: "ok",
|
|
1391
1393
|
value: snapshot.data
|
|
@@ -1439,7 +1441,7 @@ var require_getRequestIdentifier = /* @__PURE__ */ __commonJSMin(((exports, modu
|
|
|
1439
1441
|
var invariant = require_invariant();
|
|
1440
1442
|
function getRequestIdentifier(parameters, variables) {
|
|
1441
1443
|
var requestID = parameters.cacheID != null ? parameters.cacheID : parameters.id;
|
|
1442
|
-
|
|
1444
|
+
requestID ?? invariant(false);
|
|
1443
1445
|
return requestID + JSON.stringify(stableCopy(variables));
|
|
1444
1446
|
}
|
|
1445
1447
|
module.exports = getRequestIdentifier;
|
|
@@ -1704,22 +1706,24 @@ var require_ConnectionHandler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
1704
1706
|
if (prevPageInfo) _connection.setLinkedRecord(prevPageInfo, PAGE_INFO);
|
|
1705
1707
|
var nextEdges = [];
|
|
1706
1708
|
var args = payload.args;
|
|
1707
|
-
if (prevEdges && _serverEdges)
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1709
|
+
if (prevEdges && _serverEdges) {
|
|
1710
|
+
if (args.after != null) {
|
|
1711
|
+
var _clientPageInfo;
|
|
1712
|
+
var clientEndCursor = (_clientPageInfo = clientPageInfo) === null || _clientPageInfo === void 0 ? void 0 : _clientPageInfo.getValue(END_CURSOR);
|
|
1713
|
+
var serverEndCursor = serverPageInfo === null || serverPageInfo === void 0 ? void 0 : serverPageInfo.getValue(END_CURSOR);
|
|
1714
|
+
if (clientPageInfo && args.after === clientEndCursor || clientPageInfo && clientEndCursor === serverEndCursor) {
|
|
1715
|
+
var nodeIDs = /* @__PURE__ */ new Set();
|
|
1716
|
+
mergeEdges(prevEdges, nextEdges, nodeIDs);
|
|
1717
|
+
mergeEdges(_serverEdges, nextEdges, nodeIDs);
|
|
1718
|
+
} else return;
|
|
1719
|
+
} else if (args.before != null) {
|
|
1720
|
+
if (clientPageInfo && args.before === clientPageInfo.getValue(START_CURSOR)) {
|
|
1721
|
+
var _nodeIDs = /* @__PURE__ */ new Set();
|
|
1722
|
+
mergeEdges(_serverEdges, nextEdges, _nodeIDs);
|
|
1723
|
+
mergeEdges(prevEdges, nextEdges, _nodeIDs);
|
|
1724
|
+
} else return;
|
|
1725
|
+
} else nextEdges = _serverEdges;
|
|
1726
|
+
} else if (_serverEdges) nextEdges = _serverEdges;
|
|
1723
1727
|
else nextEdges = prevEdges;
|
|
1724
1728
|
if (nextEdges != null && nextEdges !== prevEdges) _connection.setLinkedRecords(nextEdges, EDGES);
|
|
1725
1729
|
if (clientPageInfo && serverPageInfo) {
|
|
@@ -1821,7 +1825,7 @@ var require_ConnectionHandler = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
1821
1825
|
if (edge == null) return edge;
|
|
1822
1826
|
var EDGES = ConnectionInterface.get().EDGES;
|
|
1823
1827
|
var edgeIndex = connection.getValue(NEXT_EDGE_INDEX);
|
|
1824
|
-
|
|
1828
|
+
typeof edgeIndex !== "number" && invariant(false);
|
|
1825
1829
|
var edgeID = generateClientID(connection.getDataID(), EDGES, edgeIndex);
|
|
1826
1830
|
var connectionEdge = store.create(edgeID, edge.getType());
|
|
1827
1831
|
connectionEdge.copyFieldsFrom(edge);
|
|
@@ -1877,7 +1881,7 @@ var require_MutationHandlers = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
1877
1881
|
var record = store.get(payload.dataID);
|
|
1878
1882
|
if (record == null) return;
|
|
1879
1883
|
var connections = payload.handleArgs.connections;
|
|
1880
|
-
|
|
1884
|
+
connections ?? invariant(false);
|
|
1881
1885
|
var idOrIds = record.getValue(payload.fieldKey);
|
|
1882
1886
|
(Array.isArray(idOrIds) ? idOrIds : [idOrIds]).forEach(function(id) {
|
|
1883
1887
|
if (typeof id === "string") {
|
|
@@ -1907,7 +1911,7 @@ var require_MutationHandlers = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
1907
1911
|
var record = store.get(payload.dataID);
|
|
1908
1912
|
if (record == null) return;
|
|
1909
1913
|
var connections = payload.handleArgs.connections;
|
|
1910
|
-
|
|
1914
|
+
connections ?? invariant(false);
|
|
1911
1915
|
var singleServerEdge, serverEdges;
|
|
1912
1916
|
try {
|
|
1913
1917
|
singleServerEdge = record.getLinkedRecord(payload.fieldKey);
|
|
@@ -1937,7 +1941,7 @@ var require_MutationHandlers = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
1937
1941
|
return (edge === null || edge === void 0 ? void 0 : (_edge$getLinkedRecord = edge.getLinkedRecord(NODE)) === null || _edge$getLinkedRecord === void 0 ? void 0 : _edge$getLinkedRecord.getDataID()) === serverNodeId;
|
|
1938
1942
|
})) continue;
|
|
1939
1943
|
var clientEdge = ConnectionHandler.buildConnectionEdge(store, connection, serverEdge);
|
|
1940
|
-
|
|
1944
|
+
clientEdge ?? invariant(false);
|
|
1941
1945
|
insertFn(connection, clientEdge);
|
|
1942
1946
|
}
|
|
1943
1947
|
} catch (err) {
|
|
@@ -1963,8 +1967,8 @@ var require_MutationHandlers = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
1963
1967
|
var record = store.get(payload.dataID);
|
|
1964
1968
|
if (record == null) return;
|
|
1965
1969
|
var _payload$handleArgs = payload.handleArgs, connections = _payload$handleArgs.connections, edgeTypeName = _payload$handleArgs.edgeTypeName;
|
|
1966
|
-
|
|
1967
|
-
|
|
1970
|
+
connections ?? invariant(false);
|
|
1971
|
+
edgeTypeName ?? invariant(false);
|
|
1968
1972
|
var singleServerNode;
|
|
1969
1973
|
var serverNodes;
|
|
1970
1974
|
try {
|
|
@@ -1993,7 +1997,7 @@ var require_MutationHandlers = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
1993
1997
|
return (edge === null || edge === void 0 ? void 0 : (_edge$getLinkedRecord2 = edge.getLinkedRecord(NODE)) === null || _edge$getLinkedRecord2 === void 0 ? void 0 : _edge$getLinkedRecord2.getDataID()) === serverNodeId;
|
|
1994
1998
|
})) continue;
|
|
1995
1999
|
var clientEdge = ConnectionHandler.createEdge(store, connection, serverNode, edgeTypeName);
|
|
1996
|
-
|
|
2000
|
+
clientEdge ?? invariant(false);
|
|
1997
2001
|
insertFn(connection, clientEdge);
|
|
1998
2002
|
}
|
|
1999
2003
|
} catch (err) {
|
|
@@ -2091,7 +2095,6 @@ var require_RelayDeclarativeMutationConfig = /* @__PURE__ */ __commonJSMin(((exp
|
|
|
2091
2095
|
configOptimisticUpdates.push(rangeDeleteResult);
|
|
2092
2096
|
configUpdates.push(rangeDeleteResult);
|
|
2093
2097
|
}
|
|
2094
|
-
break;
|
|
2095
2098
|
}
|
|
2096
2099
|
});
|
|
2097
2100
|
return {
|
|
@@ -2144,10 +2147,7 @@ var require_RelayDeclarativeMutationConfig = /* @__PURE__ */ __commonJSMin(((exp
|
|
|
2144
2147
|
case "append":
|
|
2145
2148
|
ConnectionHandler.insertEdgeAfter(connection, clientEdge);
|
|
2146
2149
|
break;
|
|
2147
|
-
case "prepend":
|
|
2148
|
-
ConnectionHandler.insertEdgeBefore(connection, clientEdge);
|
|
2149
|
-
break;
|
|
2150
|
-
default: break;
|
|
2150
|
+
case "prepend": ConnectionHandler.insertEdgeBefore(connection, clientEdge);
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
2153
|
} catch (err) {
|
|
@@ -2456,7 +2456,7 @@ var require_fetchQuery = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2456
2456
|
function fetchQuery(environment, query, variables, options) {
|
|
2457
2457
|
var _options$fetchPolicy;
|
|
2458
2458
|
var queryNode = getRequest(query);
|
|
2459
|
-
|
|
2459
|
+
queryNode.params.operationKind !== "query" && invariant(false);
|
|
2460
2460
|
var operation = createOperationDescriptor(queryNode, variables, (0, _objectSpread2["default"])({ force: true }, options === null || options === void 0 ? void 0 : options.networkCacheConfig));
|
|
2461
2461
|
var fetchPolicy = (_options$fetchPolicy = options === null || options === void 0 ? void 0 : options.fetchPolicy) !== null && _options$fetchPolicy !== void 0 ? _options$fetchPolicy : "network-only";
|
|
2462
2462
|
function readData(snapshot) {
|
|
@@ -2705,12 +2705,13 @@ var require_RelayModernFragmentSpecResolver = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
2705
2705
|
if (ownedSelector == null) {
|
|
2706
2706
|
if (resolver != null) resolver.dispose();
|
|
2707
2707
|
resolver = null;
|
|
2708
|
-
} else if (ownedSelector.kind === "PluralReaderSelector")
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2708
|
+
} else if (ownedSelector.kind === "PluralReaderSelector") {
|
|
2709
|
+
if (resolver == null) resolver = new SelectorListResolver(this._context.environment, this._rootIsQueryRenderer, ownedSelector, this._callback != null, this._onChange);
|
|
2710
|
+
else {
|
|
2711
|
+
!(resolver instanceof SelectorListResolver) && invariant(false);
|
|
2712
|
+
resolver.setSelector(ownedSelector);
|
|
2713
|
+
}
|
|
2714
|
+
} else if (resolver == null) resolver = new SelectorResolver(this._context.environment, this._rootIsQueryRenderer, ownedSelector, this._callback != null, this._onChange);
|
|
2714
2715
|
else {
|
|
2715
2716
|
!(resolver instanceof SelectorResolver) && invariant(false);
|
|
2716
2717
|
resolver.setSelector(ownedSelector);
|
|
@@ -2761,19 +2762,21 @@ var require_RelayModernFragmentSpecResolver = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
2761
2762
|
if (this._isMissingData === true) {
|
|
2762
2763
|
var pendingOperationsResult = getPendingOperationsForFragment(this._environment, this._selector.node, this._selector.owner);
|
|
2763
2764
|
var promise = pendingOperationsResult === null || pendingOperationsResult === void 0 ? void 0 : pendingOperationsResult.promise;
|
|
2764
|
-
if (promise != null)
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2765
|
+
if (promise != null) {
|
|
2766
|
+
if (this._rootIsQueryRenderer) {} else {
|
|
2767
|
+
var _pendingOperationsRes;
|
|
2768
|
+
var pendingOperations = (_pendingOperationsRes = pendingOperationsResult === null || pendingOperationsResult === void 0 ? void 0 : pendingOperationsResult.pendingOperations) !== null && _pendingOperationsRes !== void 0 ? _pendingOperationsRes : [];
|
|
2769
|
+
this._environment.__log({
|
|
2770
|
+
name: "suspense.fragment",
|
|
2771
|
+
data: this._data,
|
|
2772
|
+
fragment: this._selector.node,
|
|
2773
|
+
isRelayHooks: false,
|
|
2774
|
+
isMissingData: this._isMissingData,
|
|
2775
|
+
isPromiseCached: false,
|
|
2776
|
+
pendingOperations
|
|
2777
|
+
});
|
|
2778
|
+
throw promise;
|
|
2779
|
+
}
|
|
2777
2780
|
}
|
|
2778
2781
|
}
|
|
2779
2782
|
handlePotentialSnapshotErrors(this._environment, this._fieldErrors);
|
|
@@ -2876,7 +2879,7 @@ var require_createRelayContext = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
2876
2879
|
relayContext = react.createContext(null);
|
|
2877
2880
|
firstReact = react;
|
|
2878
2881
|
}
|
|
2879
|
-
|
|
2882
|
+
react !== firstReact && invariant(false);
|
|
2880
2883
|
return relayContext;
|
|
2881
2884
|
}
|
|
2882
2885
|
module.exports = createRelayContext;
|
|
@@ -2892,7 +2895,7 @@ var require_createRelayLoggingContext = /* @__PURE__ */ __commonJSMin(((exports,
|
|
|
2892
2895
|
relayLoggingContext = react.createContext(null);
|
|
2893
2896
|
firstReact = react;
|
|
2894
2897
|
}
|
|
2895
|
-
|
|
2898
|
+
react !== firstReact && invariant(false);
|
|
2896
2899
|
return relayLoggingContext;
|
|
2897
2900
|
}
|
|
2898
2901
|
module.exports = createRelayLoggingContext;
|
|
@@ -2995,7 +2998,7 @@ var require_RelayModernRecord = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
2995
2998
|
}
|
|
2996
2999
|
function getValue(record, storageKey) {
|
|
2997
3000
|
var value = record[storageKey];
|
|
2998
|
-
if (value && typeof value === "object")
|
|
3001
|
+
if (value && typeof value === "object") (value.hasOwnProperty(REF_KEY) || value.hasOwnProperty(REFS_KEY)) && invariant(false);
|
|
2999
3002
|
return value;
|
|
3000
3003
|
}
|
|
3001
3004
|
function hasValue(record, storageKey) {
|
|
@@ -3086,9 +3089,10 @@ var require_RelayModernRecord = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
3086
3089
|
}
|
|
3087
3090
|
function setErrors(record, storageKey, errors) {
|
|
3088
3091
|
var errorsByStorageKey = record[ERRORS_KEY];
|
|
3089
|
-
if (errors != null && errors.length > 0)
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
+
if (errors != null && errors.length > 0) {
|
|
3093
|
+
if (errorsByStorageKey == null) record[ERRORS_KEY] = (0, _defineProperty2["default"])({}, storageKey, errors);
|
|
3094
|
+
else errorsByStorageKey[storageKey] = errors;
|
|
3095
|
+
} else if (errorsByStorageKey != null) {
|
|
3092
3096
|
if (delete errorsByStorageKey[storageKey]) {
|
|
3093
3097
|
for (var otherStorageKey in errorsByStorageKey) if (errorsByStorageKey.hasOwnProperty(otherStorageKey)) return;
|
|
3094
3098
|
delete record[ERRORS_KEY];
|
|
@@ -3117,14 +3121,14 @@ var require_RelayModernRecord = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
3117
3121
|
function getActorLinkedRecordID(record, storageKey) {
|
|
3118
3122
|
var link = record[storageKey];
|
|
3119
3123
|
if (link == null) return link;
|
|
3120
|
-
|
|
3124
|
+
(typeof link !== "object" || typeof link[REF_KEY] !== "string" || link[ACTOR_IDENTIFIER_KEY] == null) && invariant(false);
|
|
3121
3125
|
return [link[ACTOR_IDENTIFIER_KEY], link[REF_KEY]];
|
|
3122
3126
|
}
|
|
3123
3127
|
function getResolverLinkedRecordID(record, typeName) {
|
|
3124
3128
|
var id = getValue(record, RELAY_RESOLVER_VALUE_KEY);
|
|
3125
3129
|
if (id == null || isSuspenseSentinel(id)) return null;
|
|
3126
3130
|
if (typeof id === "object") id = id.id;
|
|
3127
|
-
|
|
3131
|
+
typeof id !== "string" && invariant(false);
|
|
3128
3132
|
return generateClientObjectClientID(typeName, id);
|
|
3129
3133
|
}
|
|
3130
3134
|
function getResolverLinkedRecordIDs(record, typeName) {
|
|
@@ -3134,7 +3138,7 @@ var require_RelayModernRecord = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
3134
3138
|
return resolverValue.map(function(id) {
|
|
3135
3139
|
if (id == null) return null;
|
|
3136
3140
|
if (typeof id === "object") id = id.id;
|
|
3137
|
-
|
|
3141
|
+
typeof id !== "string" && invariant(false);
|
|
3138
3142
|
return generateClientObjectClientID(typeName, id);
|
|
3139
3143
|
});
|
|
3140
3144
|
}
|
|
@@ -3562,7 +3566,7 @@ var require_ActorIdentifier = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
3562
3566
|
var invariant = require_invariant();
|
|
3563
3567
|
var INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE = "INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";
|
|
3564
3568
|
function assertInternalActorIdentifier(actorIdentifier) {
|
|
3565
|
-
|
|
3569
|
+
actorIdentifier !== INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE && invariant(false);
|
|
3566
3570
|
}
|
|
3567
3571
|
module.exports = {
|
|
3568
3572
|
INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,
|
|
@@ -3811,7 +3815,7 @@ var require_RelayResponseNormalizer = /* @__PURE__ */ __commonJSMin(((exports, m
|
|
|
3811
3815
|
};
|
|
3812
3816
|
_proto._getRecordType = function _getRecordType(data) {
|
|
3813
3817
|
var typeName = data[TYPENAME_KEY];
|
|
3814
|
-
|
|
3818
|
+
typeName ?? invariant(false);
|
|
3815
3819
|
return typeName;
|
|
3816
3820
|
};
|
|
3817
3821
|
_proto._traverseSelections = function _traverseSelections(node, record, data) {
|
|
@@ -3985,9 +3989,10 @@ var require_RelayResponseNormalizer = /* @__PURE__ */ __commonJSMin(((exports, m
|
|
|
3985
3989
|
else if (!this._treatMissingFieldsAsNull) return;
|
|
3986
3990
|
}
|
|
3987
3991
|
if (selection.kind === "ScalarField") this._validateConflictingFieldsWithIdenticalId(record, storageKey, null);
|
|
3988
|
-
if (isNoncompliantlyNullish)
|
|
3989
|
-
|
|
3990
|
-
|
|
3992
|
+
if (isNoncompliantlyNullish) {
|
|
3993
|
+
if (selection.kind === "LinkedField") RelayModernRecord.setLinkedRecordIDs(record, storageKey, []);
|
|
3994
|
+
else RelayModernRecord.setValue(record, storageKey, []);
|
|
3995
|
+
} else RelayModernRecord.setValue(record, storageKey, null);
|
|
3991
3996
|
var errorTrie = this._errorTrie;
|
|
3992
3997
|
if (errorTrie != null) {
|
|
3993
3998
|
var errors = getErrorsByKey(errorTrie, responseKey);
|
|
@@ -4030,7 +4035,7 @@ var require_RelayResponseNormalizer = /* @__PURE__ */ __commonJSMin(((exports, m
|
|
|
4030
4035
|
}
|
|
4031
4036
|
var typeName = (_field$concreteType = field.concreteType) !== null && _field$concreteType !== void 0 ? _field$concreteType : this._getRecordType(fieldValue);
|
|
4032
4037
|
var nextID = this._getDataId(fieldValue, typeName) || RelayModernRecord.getLinkedRecordID(record, storageKey) || generateClientID(RelayModernRecord.getDataID(record), storageKey);
|
|
4033
|
-
|
|
4038
|
+
typeof nextID !== "string" && invariant(false);
|
|
4034
4039
|
RelayModernRecord.setActorLinkedRecordID(record, storageKey, actorIdentifier, nextID);
|
|
4035
4040
|
this._followupPayloads.push({
|
|
4036
4041
|
actorIdentifier,
|
|
@@ -4047,7 +4052,7 @@ var require_RelayResponseNormalizer = /* @__PURE__ */ __commonJSMin(((exports, m
|
|
|
4047
4052
|
var _field$concreteType2;
|
|
4048
4053
|
!(typeof fieldValue === "object" && fieldValue) && invariant(false);
|
|
4049
4054
|
var nextID = this._getDataId(fieldValue, (_field$concreteType2 = field.concreteType) !== null && _field$concreteType2 !== void 0 ? _field$concreteType2 : this._getRecordType(fieldValue)) || RelayModernRecord.getLinkedRecordID(record, storageKey) || generateClientID(RelayModernRecord.getDataID(record), storageKey);
|
|
4050
|
-
|
|
4055
|
+
typeof nextID !== "string" && invariant(false);
|
|
4051
4056
|
this._validateConflictingLinkedFieldsWithIdenticalId(RelayModernRecord.getLinkedRecordID(record, storageKey), nextID, storageKey);
|
|
4052
4057
|
RelayModernRecord.setLinkedRecordID(record, storageKey, nextID);
|
|
4053
4058
|
var nextRecord = this._recordSource.get(nextID);
|
|
@@ -4072,9 +4077,9 @@ var require_RelayResponseNormalizer = /* @__PURE__ */ __commonJSMin(((exports, m
|
|
|
4072
4077
|
_this._path.push(String(nextIndex));
|
|
4073
4078
|
var oldErrorTrie = _this._errorTrie;
|
|
4074
4079
|
_this._errorTrie = oldErrorTrie == null ? null : getNestedErrorTrieByKey(oldErrorTrie, nextIndex);
|
|
4075
|
-
|
|
4080
|
+
typeof item !== "object" && invariant(false);
|
|
4076
4081
|
var nextID = _this._getDataId(item, (_field$concreteType3 = field.concreteType) !== null && _field$concreteType3 !== void 0 ? _field$concreteType3 : _this._getRecordType(item)) || prevIDs && prevIDs[nextIndex] || generateClientID(RelayModernRecord.getDataID(record), storageKey, nextIndex);
|
|
4077
|
-
|
|
4082
|
+
typeof nextID !== "string" && invariant(false);
|
|
4078
4083
|
nextIDs.push(nextID);
|
|
4079
4084
|
var nextRecord = _this._recordSource.get(nextID);
|
|
4080
4085
|
if (!nextRecord) {
|
|
@@ -4139,9 +4144,9 @@ var require_readInlineData = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
4139
4144
|
var _fragmentRef$FRAGMENT;
|
|
4140
4145
|
var inlineDataFragment = getInlineDataFragment(fragment);
|
|
4141
4146
|
if (fragmentRef == null) return fragmentRef;
|
|
4142
|
-
|
|
4147
|
+
typeof fragmentRef !== "object" && invariant(false);
|
|
4143
4148
|
var inlineData = (_fragmentRef$FRAGMENT = fragmentRef[FRAGMENTS_KEY]) === null || _fragmentRef$FRAGMENT === void 0 ? void 0 : _fragmentRef$FRAGMENT[inlineDataFragment.name];
|
|
4144
|
-
|
|
4149
|
+
inlineData ?? invariant(false);
|
|
4145
4150
|
return inlineData;
|
|
4146
4151
|
}
|
|
4147
4152
|
module.exports = readInlineData;
|
|
@@ -4326,7 +4331,7 @@ var require_RelayOperationTracker = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
4326
4331
|
var promise = new Promise(function(r) {
|
|
4327
4332
|
resolve = r;
|
|
4328
4333
|
});
|
|
4329
|
-
|
|
4334
|
+
resolve ?? invariant(false);
|
|
4330
4335
|
var pendingOperations = Array.from(pendingOperationsForOwner.values());
|
|
4331
4336
|
this._ownersToPendingPromise.set(ownerIdentifier, {
|
|
4332
4337
|
promise,
|
|
@@ -4743,21 +4748,23 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
4743
4748
|
var _x$extensions;
|
|
4744
4749
|
return ((_x$extensions = x.extensions) === null || _x$extensions === void 0 ? void 0 : _x$extensions.is_final) === true;
|
|
4745
4750
|
});
|
|
4746
|
-
if (isFinal)
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4751
|
+
if (isFinal) {
|
|
4752
|
+
if (this._useExecTimeResolvers && this._state !== "loading_final" && responses.some(function(x) {
|
|
4753
|
+
var _x$extensions2;
|
|
4754
|
+
return ((_x$extensions2 = x.extensions) === null || _x$extensions2 === void 0 ? void 0 : _x$extensions2.is_normalized) === true;
|
|
4755
|
+
})) {
|
|
4756
|
+
this._execTimeResolverResponseComplete = true;
|
|
4757
|
+
if (!this._isClientQuery && responses.some(function(x) {
|
|
4758
|
+
var _x$extensions3;
|
|
4759
|
+
return ((_x$extensions3 = x.extensions) === null || _x$extensions3 === void 0 ? void 0 : _x$extensions3.is_client_only) === true;
|
|
4760
|
+
})) this._isClientQuery = true;
|
|
4761
|
+
if (this._isClientQuery) this._state = "loading_final";
|
|
4762
|
+
this._updateActiveState();
|
|
4763
|
+
} else {
|
|
4764
|
+
this._state = "loading_final";
|
|
4765
|
+
this._updateActiveState();
|
|
4766
|
+
this._incrementalPayloadsPending = false;
|
|
4767
|
+
}
|
|
4761
4768
|
}
|
|
4762
4769
|
this._sink.next(response);
|
|
4763
4770
|
return;
|
|
@@ -4807,8 +4814,10 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
4807
4814
|
var _payloadFollowups2 = this._processIncrementalResponses(incrementalResponses);
|
|
4808
4815
|
this._processPayloadFollowups(_payloadFollowups2);
|
|
4809
4816
|
}
|
|
4810
|
-
if (this._isSubscriptionOperation)
|
|
4811
|
-
|
|
4817
|
+
if (this._isSubscriptionOperation) {
|
|
4818
|
+
if (responsesWithData[0].extensions == null) responsesWithData[0].extensions = { __relay_subscription_root_id: this._operation.fragment.dataID };
|
|
4819
|
+
else responsesWithData[0].extensions.__relay_subscription_root_id = this._operation.fragment.dataID;
|
|
4820
|
+
}
|
|
4812
4821
|
var updatedOwners = this._runPublishQueue(hasNonIncrementalResponses || hasNormalizedResponses ? this._operation : void 0);
|
|
4813
4822
|
if (hasNonIncrementalResponses) {
|
|
4814
4823
|
if (this._incrementalPayloadsPending) this._retainData();
|
|
@@ -4818,7 +4827,7 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
4818
4827
|
};
|
|
4819
4828
|
_proto._processOptimisticResponse = function _processOptimisticResponse(response, updater, treatMissingFieldsAsNull) {
|
|
4820
4829
|
var _this7 = this;
|
|
4821
|
-
|
|
4830
|
+
this._optimisticUpdates !== null && invariant(false);
|
|
4822
4831
|
if (response == null && updater == null) return;
|
|
4823
4832
|
var optimisticUpdates = [];
|
|
4824
4833
|
if (response) {
|
|
@@ -5117,7 +5126,7 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5117
5126
|
var fieldID = generateClientID(fieldPayload.dataID, fieldPayload.fieldKey);
|
|
5118
5127
|
return fieldPayload.dataID === parentID || fieldID === parentID;
|
|
5119
5128
|
});
|
|
5120
|
-
|
|
5129
|
+
parentRecord ?? invariant(false);
|
|
5121
5130
|
var nextParentRecord;
|
|
5122
5131
|
var nextParentPayloads;
|
|
5123
5132
|
var previousParentEntry = this._source.get(parentID);
|
|
@@ -5169,7 +5178,7 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5169
5178
|
return;
|
|
5170
5179
|
}
|
|
5171
5180
|
var placeholder = resultForPath.placeholder;
|
|
5172
|
-
|
|
5181
|
+
placeholder.kind !== "defer" && invariant(false);
|
|
5173
5182
|
relayPayloads.push(_this10._processDeferResponse(label, path, placeholder, response));
|
|
5174
5183
|
} else {
|
|
5175
5184
|
var _pathKey = path.slice(0, -2).map(String).join(".");
|
|
@@ -5186,7 +5195,7 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5186
5195
|
return;
|
|
5187
5196
|
}
|
|
5188
5197
|
var _placeholder = _resultForPath.placeholder;
|
|
5189
|
-
|
|
5198
|
+
_placeholder.kind !== "stream" && invariant(false);
|
|
5190
5199
|
relayPayloads.push(_this10._processStreamResponse(label, path, _placeholder, response));
|
|
5191
5200
|
}
|
|
5192
5201
|
});
|
|
@@ -5208,7 +5217,7 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5208
5217
|
}, this._useExecTimeResolvers);
|
|
5209
5218
|
this._getPublishQueueAndSaveActor().commitPayload(this._operation, relayPayload);
|
|
5210
5219
|
var parentEntry = this._source.get(parentID);
|
|
5211
|
-
|
|
5220
|
+
parentEntry ?? invariant(false);
|
|
5212
5221
|
var fieldPayloads = parentEntry.fieldPayloads;
|
|
5213
5222
|
if (fieldPayloads.length !== 0) {
|
|
5214
5223
|
var _response$extensions4;
|
|
@@ -5230,7 +5239,7 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5230
5239
|
var prevActorIdentifier = this._actorIdentifier;
|
|
5231
5240
|
this._actorIdentifier = actorIdentifier !== null && actorIdentifier !== void 0 ? actorIdentifier : this._actorIdentifier;
|
|
5232
5241
|
var field = node.selections[0];
|
|
5233
|
-
|
|
5242
|
+
(field == null || field.kind !== "LinkedField" || field.plural !== true) && invariant(false);
|
|
5234
5243
|
var _this$_normalizeStrea = this._normalizeStreamItem(response, parentID, field, variables, path, placeholder.path), fieldPayloads = _this$_normalizeStrea.fieldPayloads, itemID = _this$_normalizeStrea.itemID, itemIndex = _this$_normalizeStrea.itemIndex, prevIDs = _this$_normalizeStrea.prevIDs, relayPayload = _this$_normalizeStrea.relayPayload, storageKey = _this$_normalizeStrea.storageKey;
|
|
5235
5244
|
this._getPublishQueueAndSaveActor().commitPayload(this._operation, relayPayload, function(store) {
|
|
5236
5245
|
var currentParentRecord = store.get(parentID);
|
|
@@ -5261,21 +5270,21 @@ var require_OperationExecutor = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5261
5270
|
_proto._normalizeStreamItem = function _normalizeStreamItem(response, parentID, field, variables, path, normalizationPath) {
|
|
5262
5271
|
var _field$alias, _field$concreteType, _ref2, _this$_getDataID;
|
|
5263
5272
|
var data = response.data;
|
|
5264
|
-
|
|
5273
|
+
typeof data !== "object" && invariant(false);
|
|
5265
5274
|
var responseKey = (_field$alias = field.alias) !== null && _field$alias !== void 0 ? _field$alias : field.name;
|
|
5266
5275
|
var storageKey = getStorageKey(field, variables);
|
|
5267
5276
|
var parentEntry = this._source.get(parentID);
|
|
5268
|
-
|
|
5277
|
+
parentEntry ?? invariant(false);
|
|
5269
5278
|
var parentRecord = parentEntry.record, fieldPayloads = parentEntry.fieldPayloads;
|
|
5270
5279
|
var prevIDs = RelayModernRecord.getLinkedRecordIDs(parentRecord, storageKey);
|
|
5271
|
-
|
|
5280
|
+
prevIDs ?? invariant(false);
|
|
5272
5281
|
var finalPathEntry = path[path.length - 1];
|
|
5273
5282
|
var itemIndex = parseInt(finalPathEntry, 10);
|
|
5274
5283
|
!(itemIndex === finalPathEntry && itemIndex >= 0) && invariant(false);
|
|
5275
5284
|
var typeName = (_field$concreteType = field.concreteType) !== null && _field$concreteType !== void 0 ? _field$concreteType : data[TYPENAME_KEY];
|
|
5276
|
-
|
|
5285
|
+
typeof typeName !== "string" && invariant(false);
|
|
5277
5286
|
var itemID = (_ref2 = (_this$_getDataID = this._getDataID(data, typeName)) !== null && _this$_getDataID !== void 0 ? _this$_getDataID : prevIDs === null || prevIDs === void 0 ? void 0 : prevIDs[itemIndex]) !== null && _ref2 !== void 0 ? _ref2 : generateClientID(parentID, storageKey, itemIndex);
|
|
5278
|
-
|
|
5287
|
+
typeof itemID !== "string" && invariant(false);
|
|
5279
5288
|
var selector = createNormalizationSelector(field, itemID, variables);
|
|
5280
5289
|
var nextParentRecord = RelayModernRecord.clone(parentRecord);
|
|
5281
5290
|
var nextIDs = (0, _toConsumableArray2["default"])(prevIDs);
|
|
@@ -5479,7 +5488,7 @@ var require_RelayRecordSourceMutator = /* @__PURE__ */ __commonJSMin(((exports,
|
|
|
5479
5488
|
RelayModernRecord.copyFields(record, sink);
|
|
5480
5489
|
};
|
|
5481
5490
|
_proto.create = function create(dataID, typeName) {
|
|
5482
|
-
|
|
5491
|
+
(this._base.getStatus(dataID) === EXISTENT || this._sink.getStatus(dataID) === EXISTENT) && invariant(false);
|
|
5483
5492
|
var record = RelayModernRecord.create(dataID, typeName);
|
|
5484
5493
|
this._sink.set(dataID, record);
|
|
5485
5494
|
};
|
|
@@ -5764,7 +5773,7 @@ var require_readUpdatableFragment = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
5764
5773
|
var fragmentVariables = getVariablesFromFragment(updatableFragment, fragmentReference);
|
|
5765
5774
|
var id = fragmentReference[ID_KEY];
|
|
5766
5775
|
var fragmentRoot = proxy.get(id);
|
|
5767
|
-
|
|
5776
|
+
fragmentRoot ?? invariant(false);
|
|
5768
5777
|
return { updatableData: createUpdatableProxy(fragmentRoot, fragmentVariables, updatableFragment.selections, proxy, missingFieldHandlers) };
|
|
5769
5778
|
}
|
|
5770
5779
|
module.exports = { readUpdatableFragment };
|
|
@@ -5801,7 +5810,7 @@ var require_RelayRecordProxy = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5801
5810
|
};
|
|
5802
5811
|
_proto.getType = function getType() {
|
|
5803
5812
|
var type = this._mutator.getType(this._dataID);
|
|
5804
|
-
|
|
5813
|
+
type ?? invariant(false);
|
|
5805
5814
|
return type;
|
|
5806
5815
|
};
|
|
5807
5816
|
_proto.getValue = function getValue(name, args) {
|
|
@@ -5819,8 +5828,10 @@ var require_RelayRecordProxy = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
5819
5828
|
_proto.setValue__UNSAFE = function setValue__UNSAFE(value, name, args, errors) {
|
|
5820
5829
|
var storageKey = getStableStorageKey(name, args);
|
|
5821
5830
|
this._mutator.setValue(this._dataID, storageKey, value);
|
|
5822
|
-
if (errors != null)
|
|
5823
|
-
|
|
5831
|
+
if (errors != null) {
|
|
5832
|
+
if (errors.length === 0) this._mutator.setErrors(this._dataID, storageKey);
|
|
5833
|
+
else this._mutator.setErrors(this._dataID, storageKey, errors);
|
|
5834
|
+
}
|
|
5824
5835
|
return this;
|
|
5825
5836
|
};
|
|
5826
5837
|
_proto.getLinkedRecord = function getLinkedRecord(name, args) {
|
|
@@ -5926,7 +5937,7 @@ var require_RelayRecordSourceProxy = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
5926
5937
|
return record;
|
|
5927
5938
|
};
|
|
5928
5939
|
_proto["delete"] = function _delete(dataID) {
|
|
5929
|
-
|
|
5940
|
+
dataID === ROOT_ID && invariant(false);
|
|
5930
5941
|
delete this._proxies[dataID];
|
|
5931
5942
|
this.__mutator["delete"](dataID);
|
|
5932
5943
|
};
|
|
@@ -6220,7 +6231,7 @@ var require_DataChecker = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6220
6231
|
if (_this2._mutator.getType(dataID) === selection.type) _this2._traverseSelections(selection.selections, dataID);
|
|
6221
6232
|
} else {
|
|
6222
6233
|
var _recordType = _this2._mutator.getType(dataID);
|
|
6223
|
-
|
|
6234
|
+
_recordType ?? invariant(false);
|
|
6224
6235
|
var _typeID = generateTypeID(_recordType);
|
|
6225
6236
|
var _implementsInterface = _this2._mutator.getValue(_typeID, _abstractKey);
|
|
6226
6237
|
if (_implementsInterface === true) _this2._traverseSelections(selection.selections, dataID);
|
|
@@ -6257,7 +6268,7 @@ var require_DataChecker = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6257
6268
|
case "TypeDiscriminator":
|
|
6258
6269
|
var abstractKey = selection.abstractKey;
|
|
6259
6270
|
var recordType = _this2._mutator.getType(dataID);
|
|
6260
|
-
|
|
6271
|
+
recordType ?? invariant(false);
|
|
6261
6272
|
var typeID = generateTypeID(recordType);
|
|
6262
6273
|
if (_this2._mutator.getValue(typeID, abstractKey) == null) _this2._handleMissing();
|
|
6263
6274
|
break;
|
|
@@ -6281,7 +6292,7 @@ var require_DataChecker = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6281
6292
|
};
|
|
6282
6293
|
_proto._checkModuleImport = function _checkModuleImport(moduleImport, dataID) {
|
|
6283
6294
|
var operationLoader = this._operationLoader;
|
|
6284
|
-
|
|
6295
|
+
operationLoader === null && invariant(false);
|
|
6285
6296
|
var operationKey = getModuleOperationKey(moduleImport.documentName);
|
|
6286
6297
|
var operationReference = this._mutator.getValue(dataID, operationKey);
|
|
6287
6298
|
if (operationReference == null) {
|
|
@@ -6471,7 +6482,7 @@ var require_LiveResolverCache = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
6471
6482
|
RelayModernRecord.setValue(linkedRecord, RELAY_RESOLVER_ERROR_KEY, evaluationResult.error);
|
|
6472
6483
|
if (field.kind === RELAY_LIVE_RESOLVER) {
|
|
6473
6484
|
if (evaluationResult.resolverResult != null) {
|
|
6474
|
-
|
|
6485
|
+
evaluationResult.error != null && invariant(false);
|
|
6475
6486
|
var liveState = evaluationResult.resolverResult;
|
|
6476
6487
|
updatedDataIDs = this._setLiveStateValue(linkedRecord, linkedID, liveState, field, variables);
|
|
6477
6488
|
}
|
|
@@ -6530,7 +6541,7 @@ var require_LiveResolverCache = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
6530
6541
|
};
|
|
6531
6542
|
_proto.getLiveResolverPromise = function getLiveResolverPromise(liveStateID) {
|
|
6532
6543
|
var liveStateRecord = this._getRecordSource().get(liveStateID);
|
|
6533
|
-
|
|
6544
|
+
liveStateRecord ?? invariant(false);
|
|
6534
6545
|
var liveState = RelayModernRecord.getValue(liveStateRecord, RELAY_RESOLVER_LIVE_STATE_VALUE);
|
|
6535
6546
|
return new Promise(function(resolve) {
|
|
6536
6547
|
var unsubscribe = liveState.subscribe(function() {
|
|
@@ -6623,7 +6634,7 @@ var require_LiveResolverCache = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
6623
6634
|
for (var ii = 0; ii < value.length; ii++) {
|
|
6624
6635
|
var currentValue = value[ii];
|
|
6625
6636
|
if (currentValue == null) continue;
|
|
6626
|
-
|
|
6637
|
+
typeof currentValue !== "object" && invariant(false);
|
|
6627
6638
|
var typename = getConcreteTypename(normalizationInfo, currentValue);
|
|
6628
6639
|
var outputTypeDataID = generateClientObjectClientID(typename, RelayModernRecord.getDataID(resolverRecord), ii);
|
|
6629
6640
|
var source = this._normalizeOutputTypeValue(outputTypeDataID, currentValue, variables, normalizationInfo, [field.path, String(ii)], typename);
|
|
@@ -6643,7 +6654,7 @@ var require_LiveResolverCache = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
6643
6654
|
}
|
|
6644
6655
|
updatedDataIDs = updateCurrentSource(currentSource, nextSource, prevOutputTypeRecordIDs);
|
|
6645
6656
|
} else {
|
|
6646
|
-
|
|
6657
|
+
typeof value !== "object" && invariant(false);
|
|
6647
6658
|
var _typename = getConcreteTypename(normalizationInfo, value);
|
|
6648
6659
|
var _outputTypeDataID = generateClientObjectClientID(_typename, RelayModernRecord.getDataID(resolverRecord));
|
|
6649
6660
|
var _nextSource = this._normalizeOutputTypeValue(_outputTypeDataID, value, variables, normalizationInfo, [field.path], _typename);
|
|
@@ -6882,7 +6893,7 @@ var require_LiveResolverCache = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
6882
6893
|
}
|
|
6883
6894
|
function expectRecord(source, recordID) {
|
|
6884
6895
|
var record = source.get(recordID);
|
|
6885
|
-
|
|
6896
|
+
record ?? invariant(false);
|
|
6886
6897
|
return record;
|
|
6887
6898
|
}
|
|
6888
6899
|
function getUpdatedDataIDs(updatedRecords) {
|
|
@@ -6891,7 +6902,7 @@ var require_LiveResolverCache = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
6891
6902
|
function getConcreteTypename(normalizationInfo, currentValue) {
|
|
6892
6903
|
var _normalizationInfo$co;
|
|
6893
6904
|
var typename = (_normalizationInfo$co = normalizationInfo.concreteType) !== null && _normalizationInfo$co !== void 0 ? _normalizationInfo$co : currentValue.__typename;
|
|
6894
|
-
|
|
6905
|
+
typename ?? invariant(false);
|
|
6895
6906
|
return typename;
|
|
6896
6907
|
}
|
|
6897
6908
|
module.exports = {
|
|
@@ -6987,7 +6998,7 @@ var require_ResolverCache = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
6987
6998
|
function NoopResolverCache() {}
|
|
6988
6999
|
var _proto = NoopResolverCache.prototype;
|
|
6989
7000
|
_proto.readFromCacheOrEvaluate = function readFromCacheOrEvaluate(recordID, field, variables, evaluate, getDataForResolverFragment) {
|
|
6990
|
-
|
|
7001
|
+
field.kind === RELAY_LIVE_RESOLVER && invariant(false);
|
|
6991
7002
|
var _evaluate = evaluate(), resolverResult = _evaluate.resolverResult, snapshot = _evaluate.snapshot;
|
|
6992
7003
|
return [
|
|
6993
7004
|
resolverResult,
|
|
@@ -7214,10 +7225,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7214
7225
|
case "RESULT":
|
|
7215
7226
|
value = this._asResult(_value);
|
|
7216
7227
|
break;
|
|
7217
|
-
case "NULL":
|
|
7218
|
-
if (this._fieldErrors != null && this._fieldErrors.length > 0) value = null;
|
|
7219
|
-
break;
|
|
7220
|
-
default:
|
|
7228
|
+
case "NULL": if (this._fieldErrors != null && this._fieldErrors.length > 0) value = null;
|
|
7221
7229
|
}
|
|
7222
7230
|
var childrenFieldErrors = this._fieldErrors;
|
|
7223
7231
|
this._fieldErrors = previousResponseFields;
|
|
@@ -7267,7 +7275,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7267
7275
|
var catchFieldValue = this._readClientSideDirectiveField(selection, record, data);
|
|
7268
7276
|
var field = (_selection$field$back = (_selection$field = selection.field) === null || _selection$field === void 0 ? void 0 : _selection$field.backingField) !== null && _selection$field$back !== void 0 ? _selection$field$back : selection.field;
|
|
7269
7277
|
var fieldName = (_field$alias = field === null || field === void 0 ? void 0 : field.alias) !== null && _field$alias !== void 0 ? _field$alias : field === null || field === void 0 ? void 0 : field.name;
|
|
7270
|
-
|
|
7278
|
+
fieldName ?? invariant(false);
|
|
7271
7279
|
data[fieldName] = this._catchErrors(catchFieldValue, selection.to, previousResponseFields);
|
|
7272
7280
|
break;
|
|
7273
7281
|
case "ScalarField":
|
|
@@ -7459,7 +7467,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7459
7467
|
var _this3 = this;
|
|
7460
7468
|
var _backingField$alias;
|
|
7461
7469
|
var backingField = field.backingField;
|
|
7462
|
-
|
|
7470
|
+
backingField.kind === "ClientExtension" && invariant(false);
|
|
7463
7471
|
var fieldName = (_backingField$alias = backingField.alias) !== null && _backingField$alias !== void 0 ? _backingField$alias : backingField.name;
|
|
7464
7472
|
var backingFieldData = {};
|
|
7465
7473
|
this._traverseSelections([backingField], record, backingFieldData);
|
|
@@ -7471,17 +7479,17 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7471
7479
|
if (field.linkedField.plural) {
|
|
7472
7480
|
!Array.isArray(clientEdgeResolverResponse) && invariant(false);
|
|
7473
7481
|
var storeIDs;
|
|
7474
|
-
|
|
7482
|
+
field.kind !== "ClientEdgeToClientObject" && invariant(false);
|
|
7475
7483
|
if (field.backingField.normalizationInfo == null) storeIDs = clientEdgeResolverResponse.map(function(itemResponse) {
|
|
7476
7484
|
var _field$concreteType;
|
|
7477
7485
|
var concreteType = (_field$concreteType = field.concreteType) !== null && _field$concreteType !== void 0 ? _field$concreteType : itemResponse.__typename;
|
|
7478
|
-
|
|
7486
|
+
typeof concreteType !== "string" && invariant(false);
|
|
7479
7487
|
var localId = extractIdFromResponse(itemResponse, backingField.path, _this3._owner.identifier);
|
|
7480
7488
|
var id = _this3._resolverCache.ensureClientRecord(localId, concreteType);
|
|
7481
7489
|
var modelResolvers = field.modelResolvers;
|
|
7482
7490
|
if (modelResolvers != null) {
|
|
7483
7491
|
var modelResolver = modelResolvers[concreteType];
|
|
7484
|
-
|
|
7492
|
+
modelResolver === void 0 && invariant(false);
|
|
7485
7493
|
return _this3._readResolverFieldImpl(modelResolver, id) != null ? id : null;
|
|
7486
7494
|
}
|
|
7487
7495
|
return id;
|
|
@@ -7500,15 +7508,16 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7500
7508
|
var storeID;
|
|
7501
7509
|
var concreteType = (_field$concreteType2 = field.concreteType) !== null && _field$concreteType2 !== void 0 ? _field$concreteType2 : clientEdgeResolverResponse.__typename;
|
|
7502
7510
|
var traversalPathSegment;
|
|
7503
|
-
if (field.kind === "ClientEdgeToClientObject")
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7511
|
+
if (field.kind === "ClientEdgeToClientObject") {
|
|
7512
|
+
if (field.backingField.normalizationInfo == null) {
|
|
7513
|
+
typeof concreteType !== "string" && invariant(false);
|
|
7514
|
+
storeID = this._resolverCache.ensureClientRecord(id, concreteType);
|
|
7515
|
+
traversalPathSegment = null;
|
|
7516
|
+
} else {
|
|
7517
|
+
storeID = id;
|
|
7518
|
+
traversalPathSegment = null;
|
|
7519
|
+
}
|
|
7507
7520
|
} else {
|
|
7508
|
-
storeID = id;
|
|
7509
|
-
traversalPathSegment = null;
|
|
7510
|
-
}
|
|
7511
|
-
else {
|
|
7512
7521
|
storeID = id;
|
|
7513
7522
|
traversalPathSegment = {
|
|
7514
7523
|
clientEdgeDestinationID: id,
|
|
@@ -7517,9 +7526,9 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7517
7526
|
}
|
|
7518
7527
|
var modelResolvers = field.modelResolvers;
|
|
7519
7528
|
if (modelResolvers != null) {
|
|
7520
|
-
|
|
7529
|
+
typeof concreteType !== "string" && invariant(false);
|
|
7521
7530
|
var modelResolver = modelResolvers[concreteType];
|
|
7522
|
-
|
|
7531
|
+
modelResolver === void 0 && invariant(false);
|
|
7523
7532
|
if (this._readResolverFieldImpl(modelResolver, storeID) == null) {
|
|
7524
7533
|
data[fieldName] = null;
|
|
7525
7534
|
return null;
|
|
@@ -7527,7 +7536,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7527
7536
|
}
|
|
7528
7537
|
this._clientEdgeTraversalPath.push(traversalPathSegment);
|
|
7529
7538
|
var prevData = data[fieldName];
|
|
7530
|
-
|
|
7539
|
+
prevData != null && typeof prevData !== "object" && invariant(false);
|
|
7531
7540
|
var prevErrors = this._fieldErrors;
|
|
7532
7541
|
this._fieldErrors = null;
|
|
7533
7542
|
var edgeValue = this._traverse(field.linkedField, storeID, prevData);
|
|
@@ -7561,7 +7570,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7561
7570
|
return linkedID;
|
|
7562
7571
|
}
|
|
7563
7572
|
var prevData = data[fieldName];
|
|
7564
|
-
|
|
7573
|
+
prevData != null && typeof prevData !== "object" && invariant(false);
|
|
7565
7574
|
var prevErrors = this._fieldErrors;
|
|
7566
7575
|
this._fieldErrors = null;
|
|
7567
7576
|
var value = this._traverse(field, linkedID, prevData);
|
|
@@ -7629,7 +7638,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7629
7638
|
return;
|
|
7630
7639
|
}
|
|
7631
7640
|
var prevItem = linkedArray[nextIndex];
|
|
7632
|
-
|
|
7641
|
+
prevItem != null && typeof prevItem !== "object" && invariant(false);
|
|
7633
7642
|
var prevErrors = _this4._fieldErrors;
|
|
7634
7643
|
_this4._fieldErrors = null;
|
|
7635
7644
|
linkedArray[nextIndex] = _this4._traverse(field, linkedID, prevItem);
|
|
@@ -7671,12 +7680,13 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7671
7680
|
return data;
|
|
7672
7681
|
}
|
|
7673
7682
|
var abstractKey = inlineFragment.abstractKey;
|
|
7674
|
-
if (abstractKey == null)
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7683
|
+
if (abstractKey == null) {
|
|
7684
|
+
if (!this._recordMatchesTypeCondition(record, inlineFragment.type)) return null;
|
|
7685
|
+
else {
|
|
7686
|
+
var hasExpectedData = this._traverseSelections(inlineFragment.selections, record, data);
|
|
7687
|
+
if (!hasExpectedData) return false;
|
|
7688
|
+
}
|
|
7689
|
+
} else {
|
|
7680
7690
|
var implementsInterface = this._implementsInterface(record, abstractKey);
|
|
7681
7691
|
if (implementsInterface === false && skipUnmatchedAbstractTypes) return null;
|
|
7682
7692
|
var parentIsMissingData = this._isMissingData;
|
|
@@ -7699,7 +7709,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7699
7709
|
_proto._createFragmentPointer = function _createFragmentPointer(fragmentSpread, record, data) {
|
|
7700
7710
|
var fragmentPointers = data[FRAGMENTS_KEY];
|
|
7701
7711
|
if (fragmentPointers == null) fragmentPointers = data[FRAGMENTS_KEY] = {};
|
|
7702
|
-
|
|
7712
|
+
(typeof fragmentPointers !== "object" || fragmentPointers == null) && invariant(false);
|
|
7703
7713
|
if (data[ID_KEY] == null) data[ID_KEY] = RelayModernRecord.getDataID(record);
|
|
7704
7714
|
var args = getArgumentValues(fragmentSpread.args, this._variables, this._isWithinUnmatchedTypeRefinement);
|
|
7705
7715
|
fragmentPointers[fragmentSpread.name] = args;
|
|
@@ -7717,7 +7727,7 @@ var require_RelayReader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7717
7727
|
_proto._createInlineDataOrResolverFragmentPointer = function _createInlineDataOrResolverFragmentPointer(fragmentSpreadOrFragment, record, data) {
|
|
7718
7728
|
var fragmentPointers = data[FRAGMENTS_KEY];
|
|
7719
7729
|
if (fragmentPointers == null) fragmentPointers = data[FRAGMENTS_KEY] = {};
|
|
7720
|
-
|
|
7730
|
+
(typeof fragmentPointers !== "object" || fragmentPointers == null) && invariant(false);
|
|
7721
7731
|
if (data[ID_KEY] == null) data[ID_KEY] = RelayModernRecord.getDataID(record);
|
|
7722
7732
|
var inlineData = {};
|
|
7723
7733
|
var parentFragmentName = this._fragmentName;
|
|
@@ -7948,7 +7958,7 @@ var require_RelayReferenceMarker = /* @__PURE__ */ __commonJSMin(((exports, modu
|
|
|
7948
7958
|
};
|
|
7949
7959
|
_proto._traverseModuleImport = function _traverseModuleImport(moduleImport, record) {
|
|
7950
7960
|
var operationLoader = this._operationLoader;
|
|
7951
|
-
|
|
7961
|
+
operationLoader === null && invariant(false);
|
|
7952
7962
|
var operationKey = getModuleOperationKey(moduleImport.documentName);
|
|
7953
7963
|
var operationReference = RelayModernRecord.getValue(record, operationKey);
|
|
7954
7964
|
if (operationReference == null) return;
|
|
@@ -8172,8 +8182,10 @@ var require_RelayModernStore = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
8172
8182
|
var _this = this;
|
|
8173
8183
|
var _options$gcReleaseBuf, _options$shouldRetain, _options$gcScheduler, _options$getDataID, _options$log, _options$operationLoa, _options$shouldProces, _options$treatMissing, _options$deferDedupli;
|
|
8174
8184
|
(0, _defineProperty2["default"])(this, "_gcStep", function() {
|
|
8175
|
-
if (_this._gcRun)
|
|
8176
|
-
|
|
8185
|
+
if (_this._gcRun) {
|
|
8186
|
+
if (_this._gcRun.next().done) _this._gcRun = null;
|
|
8187
|
+
else _this._gcScheduler(_this._gcStep);
|
|
8188
|
+
}
|
|
8177
8189
|
});
|
|
8178
8190
|
this._currentWriteEpoch = 0;
|
|
8179
8191
|
this._gcHoldCounter = 0;
|
|
@@ -8497,7 +8509,7 @@ var require_RelayModernStore = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
8497
8509
|
callback();
|
|
8498
8510
|
};
|
|
8499
8511
|
_proto.snapshot = function snapshot() {
|
|
8500
|
-
|
|
8512
|
+
this._optimisticSource != null && invariant(false);
|
|
8501
8513
|
var log = this.__log;
|
|
8502
8514
|
if (log != null) log({ name: "store.snapshot" });
|
|
8503
8515
|
this._storeSubscriptions.snapshotSubscriptions(this.getSource());
|
|
@@ -8547,7 +8559,7 @@ var require_RelayModernStore = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
8547
8559
|
var _step3$value = _step3.value, _dataID = _step3$value[0], _step3$value$ = _step3$value[1], operation = _step3$value$.operation, refCount = _step3$value$.refCount, fetchTime = _step3$value$.fetchTime;
|
|
8548
8560
|
if (this._shouldRetainWithinTTL_EXPERIMENTAL) {
|
|
8549
8561
|
var _queryCacheExpirationTime = this._queryCacheExpirationTime;
|
|
8550
|
-
|
|
8562
|
+
_queryCacheExpirationTime ?? invariant(false);
|
|
8551
8563
|
if ((fetchTime == null || fetchTime <= Date.now() - _queryCacheExpirationTime) && refCount === 0 && !this._releaseBuffer.includes(_dataID)) continue;
|
|
8552
8564
|
}
|
|
8553
8565
|
var selector = operation.root;
|
|
@@ -8708,7 +8720,7 @@ var require_RelayRecordSourceSelectorProxy = /* @__PURE__ */ __commonJSMin(((exp
|
|
|
8708
8720
|
});
|
|
8709
8721
|
if (field && field.kind === "RequiredField") field = field.field;
|
|
8710
8722
|
!(field && field.kind === "LinkedField") && invariant(false);
|
|
8711
|
-
|
|
8723
|
+
field.plural !== plural && invariant(false);
|
|
8712
8724
|
return field;
|
|
8713
8725
|
};
|
|
8714
8726
|
_proto.getRootField = function getRootField(fieldName) {
|
|
@@ -8764,7 +8776,7 @@ var require_RelayPublishQueue = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
8764
8776
|
}
|
|
8765
8777
|
var _proto = RelayPublishQueue.prototype;
|
|
8766
8778
|
_proto.applyUpdate = function applyUpdate(updater) {
|
|
8767
|
-
|
|
8779
|
+
(this._appliedOptimisticUpdates.has(updater) || this._pendingOptimisticUpdates.has(updater)) && invariant(false);
|
|
8768
8780
|
this._pendingOptimisticUpdates.add(updater);
|
|
8769
8781
|
};
|
|
8770
8782
|
_proto.revertUpdate = function revertUpdate(updater) {
|
|
@@ -8805,7 +8817,7 @@ var require_RelayPublishQueue = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
8805
8817
|
_proto.run = function run(sourceOperation) {
|
|
8806
8818
|
var runWillClearGcHold = this._appliedOptimisticUpdates === 0 && !!this._gcHold;
|
|
8807
8819
|
var runIsANoop = !this._pendingBackupRebase && this._pendingOptimisticUpdates.size === 0 && !runWillClearGcHold;
|
|
8808
|
-
RelayFeatureFlags.DISALLOW_NESTED_UPDATES &&
|
|
8820
|
+
RelayFeatureFlags.DISALLOW_NESTED_UPDATES && this._isRunning === true && invariant(false);
|
|
8809
8821
|
this._isRunning = true;
|
|
8810
8822
|
if (runIsANoop) {
|
|
8811
8823
|
this._isRunning = false;
|
|
@@ -8848,7 +8860,7 @@ var require_RelayPublishQueue = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
8848
8860
|
});
|
|
8849
8861
|
if (updater) {
|
|
8850
8862
|
var selector = operation.fragment;
|
|
8851
|
-
|
|
8863
|
+
selector ?? invariant(false);
|
|
8852
8864
|
updater(new RelayRecordSourceSelectorProxy(mutator, recordSourceProxy, selector, this._missingFieldHandlers), lookupSelector(source, selector));
|
|
8853
8865
|
}
|
|
8854
8866
|
var idsMarkedForInvalidation = recordSourceProxy.getIDsMarkedForInvalidation();
|
|
@@ -9067,7 +9079,7 @@ var require_RelayModernEnvironment = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
9067
9079
|
};
|
|
9068
9080
|
_proto.experimental_batchUpdates = function experimental_batchUpdates(callback) {
|
|
9069
9081
|
var batchFn = this._store.experimental_batchUpdates;
|
|
9070
|
-
|
|
9082
|
+
typeof batchFn !== "function" && invariant(false);
|
|
9071
9083
|
batchFn.call(this._store, callback);
|
|
9072
9084
|
};
|
|
9073
9085
|
_proto.isServer = function isServer() {
|
|
@@ -9313,16 +9325,16 @@ var require_getRefetchMetadata = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
9313
9325
|
var invariant = require_invariant();
|
|
9314
9326
|
function getRefetchMetadata(fragmentNode, componentDisplayName) {
|
|
9315
9327
|
var _fragmentNode$metadat, _fragmentNode$metadat2;
|
|
9316
|
-
|
|
9328
|
+
((_fragmentNode$metadat = fragmentNode.metadata) === null || _fragmentNode$metadat === void 0 ? void 0 : _fragmentNode$metadat.plural) === true && invariant(false);
|
|
9317
9329
|
var refetchMetadata = (_fragmentNode$metadat2 = fragmentNode.metadata) === null || _fragmentNode$metadat2 === void 0 ? void 0 : _fragmentNode$metadat2.refetch;
|
|
9318
|
-
|
|
9330
|
+
refetchMetadata ?? invariant(false);
|
|
9319
9331
|
var refetchableRequest = refetchMetadata.operation["default"] ? refetchMetadata.operation["default"] : refetchMetadata.operation;
|
|
9320
9332
|
var fragmentRefPathInResponse = refetchMetadata.fragmentPathInResult;
|
|
9321
|
-
|
|
9333
|
+
typeof refetchableRequest === "string" && invariant(false);
|
|
9322
9334
|
var identifierInfo = refetchMetadata.identifierInfo;
|
|
9323
9335
|
if (identifierInfo != null) {
|
|
9324
|
-
|
|
9325
|
-
|
|
9336
|
+
identifierInfo.identifierField != null && typeof identifierInfo.identifierField !== "string" && invariant(false);
|
|
9337
|
+
identifierInfo.identifierQueryVariableName != null && typeof identifierInfo.identifierQueryVariableName !== "string" && invariant(false);
|
|
9326
9338
|
}
|
|
9327
9339
|
return {
|
|
9328
9340
|
fragmentRefPathInResponse,
|
|
@@ -9342,12 +9354,12 @@ var require_getPaginationMetadata = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
9342
9354
|
var _fragmentNode$metadat, _fragmentNode$metadat2;
|
|
9343
9355
|
var _getRefetchMetadata = getRefetchMetadata(fragmentNode, componentDisplayName), paginationRequest = _getRefetchMetadata.refetchableRequest, refetchMetadata = _getRefetchMetadata.refetchMetadata;
|
|
9344
9356
|
var paginationMetadata = refetchMetadata.connection;
|
|
9345
|
-
|
|
9357
|
+
paginationMetadata ?? invariant(false);
|
|
9346
9358
|
var connectionPathInFragmentData = paginationMetadata.path;
|
|
9347
9359
|
var connectionMetadata = ((_fragmentNode$metadat = (_fragmentNode$metadat2 = fragmentNode.metadata) === null || _fragmentNode$metadat2 === void 0 ? void 0 : _fragmentNode$metadat2.connection) !== null && _fragmentNode$metadat !== void 0 ? _fragmentNode$metadat : [])[0];
|
|
9348
|
-
|
|
9360
|
+
connectionMetadata ?? invariant(false);
|
|
9349
9361
|
var identifierInfo = refetchMetadata.identifierInfo;
|
|
9350
|
-
|
|
9362
|
+
(identifierInfo === null || identifierInfo === void 0 ? void 0 : identifierInfo.identifierField) != null && typeof identifierInfo.identifierField !== "string" && invariant(false);
|
|
9351
9363
|
return {
|
|
9352
9364
|
connectionPathInFragmentData,
|
|
9353
9365
|
identifierField: identifierInfo === null || identifierInfo === void 0 ? void 0 : identifierInfo.identifierField,
|
|
@@ -9371,13 +9383,13 @@ var require_getPaginationVariables = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
9371
9383
|
var backwardMetadata = paginationMetadata.backward, forwardMetadata = paginationMetadata.forward;
|
|
9372
9384
|
if (direction === "backward") {
|
|
9373
9385
|
var _objectSpread2;
|
|
9374
|
-
|
|
9386
|
+
(backwardMetadata == null || backwardMetadata.count == null || backwardMetadata.cursor == null) && invariant(false);
|
|
9375
9387
|
var _paginationVariables = (0, _objectSpread4["default"])((0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, baseVariables), extraVariables), {}, (_objectSpread2 = {}, (0, _defineProperty2["default"])(_objectSpread2, backwardMetadata.cursor, cursor), (0, _defineProperty2["default"])(_objectSpread2, backwardMetadata.count, count), _objectSpread2));
|
|
9376
9388
|
if (forwardMetadata && forwardMetadata.cursor) _paginationVariables[forwardMetadata.cursor] = null;
|
|
9377
9389
|
if (forwardMetadata && forwardMetadata.count) _paginationVariables[forwardMetadata.count] = null;
|
|
9378
9390
|
return _paginationVariables;
|
|
9379
9391
|
}
|
|
9380
|
-
|
|
9392
|
+
(forwardMetadata == null || forwardMetadata.count == null || forwardMetadata.cursor == null) && invariant(false);
|
|
9381
9393
|
var paginationVariables = (0, _objectSpread4["default"])((0, _objectSpread4["default"])((0, _objectSpread4["default"])({}, baseVariables), extraVariables), {}, (_objectSpread3 = {}, (0, _defineProperty2["default"])(_objectSpread3, forwardMetadata.cursor, cursor), (0, _defineProperty2["default"])(_objectSpread3, forwardMetadata.count, count), _objectSpread3));
|
|
9382
9394
|
if (backwardMetadata && backwardMetadata.cursor) paginationVariables[backwardMetadata.cursor] = null;
|
|
9383
9395
|
if (backwardMetadata && backwardMetadata.count) paginationVariables[backwardMetadata.count] = null;
|
|
@@ -9402,7 +9414,7 @@ var require_getValueAtPath = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
9402
9414
|
!Array.isArray(result) && invariant(false);
|
|
9403
9415
|
result = result[key];
|
|
9404
9416
|
} else {
|
|
9405
|
-
|
|
9417
|
+
(typeof result !== "object" || Array.isArray(result)) && invariant(false);
|
|
9406
9418
|
result = result[key];
|
|
9407
9419
|
}
|
|
9408
9420
|
}
|