@powerhousedao/reactor-browser 6.2.3-dev.48 → 6.2.3-dev.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attachment-service-CkxtGxj8.d.ts → attachment-service-B-nLR114.d.ts} +135 -6
- package/dist/attachment-service-B-nLR114.d.ts.map +1 -0
- package/dist/{client-BYd9eNbA.d.ts → client-C-tRLfRN.d.ts} +2 -2
- package/dist/client-C-tRLfRN.d.ts.map +1 -0
- package/dist/{client-CSOLwWU9.js → client-CZyHv02L.js} +57 -13
- package/dist/client-CZyHv02L.js.map +1 -0
- package/dist/{document-operations-EccUl4Zm.js → document-operations-CpzMebZ3.js} +451 -9
- package/dist/document-operations-CpzMebZ3.js.map +1 -0
- package/dist/{global-BUpRlWcM.d.ts → global-BvawOKrQ.d.ts} +2 -2
- package/dist/{global-BUpRlWcM.d.ts.map → global-BvawOKrQ.d.ts.map} +1 -1
- package/dist/{index-rWaqlBoo.d.ts → index-Cjf5TGen.d.ts} +2 -2
- package/dist/{index-rWaqlBoo.d.ts.map → index-Cjf5TGen.d.ts.map} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +3 -3
- package/dist/src/graphql/client.d.ts +2 -2
- package/dist/src/graphql/client.js +1 -1
- package/dist/src/graphql-client/entry.d.ts +4 -4
- package/dist/src/graphql-client/entry.js +2 -2
- package/dist/src/renown/index.d.ts +1 -1
- package/dist/{types-Cww0HJmz.d.ts → types-D0ugg0E1.d.ts} +123 -1
- package/dist/types-D0ugg0E1.d.ts.map +1 -0
- package/package.json +9 -9
- package/dist/attachment-service-CkxtGxj8.d.ts.map +0 -1
- package/dist/client-BYd9eNbA.d.ts.map +0 -1
- package/dist/client-CSOLwWU9.js.map +0 -1
- package/dist/document-operations-EccUl4Zm.js.map +0 -1
- package/dist/types-Cww0HJmz.d.ts.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { C as queueOperations, S as queueActions, a as useDocumentCache, d as DocumentCache, f as IDLE_OPERATIONS_ENTRY, g as DOCUMENT_CHANGE_TYPE, m as isOperationCache, n as addDocumentCacheEventHandler, r as setDocumentCache, w as uploadOperations } from "./dispatch-C1VVTn5S.js";
|
|
2
2
|
import { B as ambientRenownTokenProvider, I as DocumentModelNotFoundError, V as makeAuthMiddleware, _ as addSetSelectedNodeOnPopStateEventHandler, a as setVetraPackageManager, b as addDrivesEventHandler, c as addSelectedDriveIdEventHandler, g as addSelectedNodeIdEventHandler, h as addResetSelectedNodeEventHandler, l as addSetSelectedDriveOnPopStateEventHandler, p as useSelectedDriveId, r as addVetraPackageManagerEventHandler, z as UnsupportedDocumentTypeError } from "./document-model-modules-Gsh1Xr7j.js";
|
|
3
3
|
import { t as makePHEventFunctions } from "./make-ph-event-functions-CdsvEl5t.js";
|
|
4
|
-
import { i as PhDocumentFieldsFragmentDoc, n as DocumentChangesDocument, t as createClient$1 } from "./client-
|
|
4
|
+
import { i as PhDocumentFieldsFragmentDoc, n as DocumentChangesDocument, t as createClient$1 } from "./client-CZyHv02L.js";
|
|
5
5
|
import { f as addLoadingEventHandler, t as addRenownEventHandler } from "./renown-D05wkobG.js";
|
|
6
6
|
import { logger } from "document-model";
|
|
7
7
|
import { addFolder, copyNode, generateNodesCopy, handleTargetNameCollisions, isFileNode, isFolderNode, moveNode, updateNode } from "@powerhousedao/shared/document-drive";
|
|
8
|
-
import { UnsupportedDocumentModelVersionError, actionSignerIdentity, actionSigningTarget, assertAuthPreservedOnDuplicate, baseLoadFromInput, baseLoadFromInputVersioned, baseSaveToFileHandle, createCopyHeader, createPresignedHeader, createZip, deserializeSignature, documentModelDocumentType, generateId, hasDerivedDocumentId, hashDocumentStateForScope, normalizeDocumentModelVersion, replayDocumentVersioned, setName, setPreferredEditor, signaturePolicyOf, toTransportAction, withSignaturePolicy } from "@powerhousedao/shared/document-model";
|
|
8
|
+
import { UnsupportedDocumentModelVersionError, actionSignerIdentity, actionSigningTarget, actions, assertAuthPreservedOnDuplicate, baseLoadFromInput, baseLoadFromInputVersioned, baseSaveToFileHandle, createCopyHeader, createPresignedHeader, createZip, deserializeSignature, documentModelDocumentType, generateId, hasDerivedDocumentId, hashDocumentStateForScope, normalizeDocumentModelVersion, replayDocumentVersioned, setName, setPreferredEditor, signaturePolicyOf, toTransportAction, withSignaturePolicy } from "@powerhousedao/shared/document-model";
|
|
9
9
|
import { allPass, conditional, constant, forEachObj, funnel, isDefined, isNot, isStrictEqual, isString, isTruthy, once } from "remeda";
|
|
10
10
|
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
11
11
|
import { GraphQLClient } from "graphql-request";
|
|
@@ -840,7 +840,9 @@ function phDocumentHeaderFromGetDocument(document, branch) {
|
|
|
840
840
|
name: document.name,
|
|
841
841
|
branch: branch ?? defaultBranch,
|
|
842
842
|
revision: revisionMapFromRevisionsList(document.revisionsList),
|
|
843
|
-
lastModifiedAtUtcIso: isoStringFromDateTime(document.lastModifiedAtUtcIso)
|
|
843
|
+
lastModifiedAtUtcIso: isoStringFromDateTime(document.lastModifiedAtUtcIso),
|
|
844
|
+
...document.meta != null ? { meta: document.meta } : {},
|
|
845
|
+
...document.protocolVersions != null ? { protocolVersions: document.protocolVersions } : {}
|
|
844
846
|
};
|
|
845
847
|
}
|
|
846
848
|
function emptyOperationsForScopes(revisionsList) {
|
|
@@ -851,6 +853,41 @@ function isoStringFromDateTime(value) {
|
|
|
851
853
|
return value instanceof Date ? value.toISOString() : value;
|
|
852
854
|
}
|
|
853
855
|
//#endregion
|
|
856
|
+
//#region src/graphql-client/errors.ts
|
|
857
|
+
/** A call the Switchboard GraphQL surface cannot express. */
|
|
858
|
+
var GraphQLOperationNotSupportedError = class extends Error {
|
|
859
|
+
name = "GraphQLOperationNotSupportedError";
|
|
860
|
+
operation;
|
|
861
|
+
constructor(operation, reason) {
|
|
862
|
+
super(`GraphQLReactorClient.${operation} is not supported: ${reason}`);
|
|
863
|
+
this.operation = operation;
|
|
864
|
+
}
|
|
865
|
+
static isError(error) {
|
|
866
|
+
return Error.isError(error) && error.name === "GraphQLOperationNotSupportedError";
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
/**
|
|
870
|
+
* The reactor's `BatchJobFailedError`, rebuilt from a batch result; this entry
|
|
871
|
+
* imports the reactor for types only. The shared name lets either `isError`
|
|
872
|
+
* recognise it.
|
|
873
|
+
*/
|
|
874
|
+
var BatchJobFailedError = class extends Error {
|
|
875
|
+
name = "BatchJobFailedError";
|
|
876
|
+
key;
|
|
877
|
+
jobs;
|
|
878
|
+
constructor(key, jobs) {
|
|
879
|
+
const failure = jobs[key].error;
|
|
880
|
+
const cause = new Error(failure?.message ?? "Job failed");
|
|
881
|
+
cause.name = failure?.name ?? "Error";
|
|
882
|
+
super(failure?.message ?? "Job failed", { cause });
|
|
883
|
+
this.key = key;
|
|
884
|
+
this.jobs = jobs;
|
|
885
|
+
}
|
|
886
|
+
static isError(error) {
|
|
887
|
+
return Error.isError(error) && error.name === "BatchJobFailedError" && typeof error.key === "string" && typeof error.jobs === "object";
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
//#endregion
|
|
854
891
|
//#region src/graphql-client/operations.ts
|
|
855
892
|
/**
|
|
856
893
|
* The operation selection of `GetDocumentOperations`, lifted into a fragment so
|
|
@@ -1016,9 +1053,9 @@ const unsupportedBatchActions = /* @__PURE__ */ new Set([
|
|
|
1016
1053
|
* carries none.
|
|
1017
1054
|
*
|
|
1018
1055
|
* `baseReducer` reads `baseReducerVersion(document.header)` for every action and
|
|
1019
|
-
* throws when the header has no `protocolVersions
|
|
1020
|
-
* {@link phDocumentFromGetDocument}
|
|
1021
|
-
*
|
|
1056
|
+
* throws when the header has no `protocolVersions`, which a header built by
|
|
1057
|
+
* {@link phDocumentFromGetDocument} lacks when the server sends none. The
|
|
1058
|
+
* version only selects between the v1
|
|
1022
1059
|
* and v2 UNDO/NOOP branches, and every action reaching the prediction loop is an
|
|
1023
1060
|
* ordinary append-only one, so it cannot change the predicted state here; it is
|
|
1024
1061
|
* passed purely so the lookup does not throw.
|
|
@@ -1401,6 +1438,7 @@ const defaultPaging = {
|
|
|
1401
1438
|
cursor: "0",
|
|
1402
1439
|
limit: 100
|
|
1403
1440
|
};
|
|
1441
|
+
const JOB_POLL_INTERVAL_MS = 250;
|
|
1404
1442
|
/**
|
|
1405
1443
|
* The marker {@link isGraphQLReactorClient} looks for.
|
|
1406
1444
|
*
|
|
@@ -1478,6 +1516,87 @@ var GraphQLReactorClient = class {
|
|
|
1478
1516
|
}, signal) : void 0
|
|
1479
1517
|
};
|
|
1480
1518
|
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Filters documents by criteria over the Switchboard's `findDocuments` query.
|
|
1521
|
+
*
|
|
1522
|
+
* The query filters by `type` and `parentId` only, at head. A search naming
|
|
1523
|
+
* `ids` or `slugs` (present, whatever its length) and a point-in-time view are
|
|
1524
|
+
* each by-contract limitations the query cannot express -- running it anyway
|
|
1525
|
+
* would return every document instead of the named ones, or head instead of
|
|
1526
|
+
* the asked-for revision, a silently wrong answer. {@link findIsServableOverGraphQL}
|
|
1527
|
+
* is the single predicate that decides this, and an unservable `find` throws
|
|
1528
|
+
* {@link GraphQLOperationNotSupportedError}. Drive enumeration itself filters
|
|
1529
|
+
* by `type` at head, which is served.
|
|
1530
|
+
*/
|
|
1531
|
+
async find(search, view, paging, signal) {
|
|
1532
|
+
if (!findIsServableOverGraphQL(search, view)) throw new GraphQLOperationNotSupportedError("find", searchNamesIdentifiers(search) ? "it cannot filter by ids or slugs: the Switchboard findDocuments query filters only by type and parentId" : "point-in-time views are not supported by GraphQLReactorClient");
|
|
1533
|
+
const viewInput = viewFilterInputFromViewFilter(view);
|
|
1534
|
+
const effectivePaging = paging ?? defaultPaging;
|
|
1535
|
+
const result = await this.sdk.FindDocuments({
|
|
1536
|
+
search: {
|
|
1537
|
+
type: search.type,
|
|
1538
|
+
parentId: search.parentId
|
|
1539
|
+
},
|
|
1540
|
+
view: viewInput,
|
|
1541
|
+
paging: pagingInputFromPaging(effectivePaging)
|
|
1542
|
+
}, void 0, signal);
|
|
1543
|
+
return this.toDocumentResults(result.findDocuments, effectivePaging, view?.branch, (cursor, limit) => this.find(search, view, {
|
|
1544
|
+
cursor,
|
|
1545
|
+
limit
|
|
1546
|
+
}, signal));
|
|
1547
|
+
}
|
|
1548
|
+
async getOutgoingRelationships(sourceIdentifier, relationshipType, view, paging, signal) {
|
|
1549
|
+
const viewInput = viewFilterInputFromViewFilter(view);
|
|
1550
|
+
const result = await this.sdk.GetDocumentOutgoingRelationships({
|
|
1551
|
+
sourceIdentifier,
|
|
1552
|
+
relationshipType,
|
|
1553
|
+
view: viewInput,
|
|
1554
|
+
paging: pagingInputFromPaging(paging)
|
|
1555
|
+
}, void 0, signal);
|
|
1556
|
+
return this.toDocumentResults(result.documentOutgoingRelationships, paging ?? defaultPaging, view?.branch, (cursor, limit) => this.getOutgoingRelationships(sourceIdentifier, relationshipType, view, {
|
|
1557
|
+
cursor,
|
|
1558
|
+
limit
|
|
1559
|
+
}, signal));
|
|
1560
|
+
}
|
|
1561
|
+
async getIncomingRelationships(targetIdentifier, relationshipType, view, paging, signal) {
|
|
1562
|
+
const viewInput = viewFilterInputFromViewFilter(view);
|
|
1563
|
+
const result = await this.sdk.GetDocumentIncomingRelationships({
|
|
1564
|
+
targetIdentifier,
|
|
1565
|
+
relationshipType,
|
|
1566
|
+
view: viewInput,
|
|
1567
|
+
paging: pagingInputFromPaging(paging)
|
|
1568
|
+
}, void 0, signal);
|
|
1569
|
+
return this.toDocumentResults(result.documentIncomingRelationships, paging ?? defaultPaging, view?.branch, (cursor, limit) => this.getIncomingRelationships(targetIdentifier, relationshipType, view, {
|
|
1570
|
+
cursor,
|
|
1571
|
+
limit
|
|
1572
|
+
}, signal));
|
|
1573
|
+
}
|
|
1574
|
+
async getOutgoingRelationshipEdges(sourceIdentifier, relationshipType, view, paging, signal) {
|
|
1575
|
+
const viewInput = viewFilterInputFromViewFilter(view);
|
|
1576
|
+
const result = await this.sdk.GetDocumentOutgoingRelationshipEdges({
|
|
1577
|
+
sourceIdentifier,
|
|
1578
|
+
relationshipType,
|
|
1579
|
+
view: viewInput,
|
|
1580
|
+
paging: pagingInputFromPaging(paging)
|
|
1581
|
+
}, void 0, signal);
|
|
1582
|
+
return this.toRelationshipResults(result.documentOutgoingRelationshipEdges, paging ?? defaultPaging, (cursor, limit) => this.getOutgoingRelationshipEdges(sourceIdentifier, relationshipType, view, {
|
|
1583
|
+
cursor,
|
|
1584
|
+
limit
|
|
1585
|
+
}, signal));
|
|
1586
|
+
}
|
|
1587
|
+
async getIncomingRelationshipEdges(targetIdentifier, relationshipType, view, paging, signal) {
|
|
1588
|
+
const viewInput = viewFilterInputFromViewFilter(view);
|
|
1589
|
+
const result = await this.sdk.GetDocumentIncomingRelationshipEdges({
|
|
1590
|
+
targetIdentifier,
|
|
1591
|
+
relationshipType,
|
|
1592
|
+
view: viewInput,
|
|
1593
|
+
paging: pagingInputFromPaging(paging)
|
|
1594
|
+
}, void 0, signal);
|
|
1595
|
+
return this.toRelationshipResults(result.documentIncomingRelationshipEdges, paging ?? defaultPaging, (cursor, limit) => this.getIncomingRelationshipEdges(targetIdentifier, relationshipType, view, {
|
|
1596
|
+
cursor,
|
|
1597
|
+
limit
|
|
1598
|
+
}, signal));
|
|
1599
|
+
}
|
|
1481
1600
|
async create(document, parentIdentifier, signal) {
|
|
1482
1601
|
const created = phDocumentFromGetDocument((await this.sdk.CreateDocument({
|
|
1483
1602
|
document,
|
|
@@ -1530,6 +1649,174 @@ var GraphQLReactorClient = class {
|
|
|
1530
1649
|
return updated;
|
|
1531
1650
|
}
|
|
1532
1651
|
/**
|
|
1652
|
+
* Runs multiple mutation jobs in dependency order over the Switchboard's
|
|
1653
|
+
* `executeBatch` mutation and waits for all to settle, returning the result
|
|
1654
|
+
* shaped like `IReactor.executeBatch`'s so the reference `DriveClient`
|
|
1655
|
+
* consumes it unchanged.
|
|
1656
|
+
*
|
|
1657
|
+
* Not atomic: each job commits on its own and a failed job still releases
|
|
1658
|
+
* its dependents. A FAILED job throws {@link BatchJobFailedError}, naming the
|
|
1659
|
+
* first failed plan key and carrying every job's final state.
|
|
1660
|
+
*
|
|
1661
|
+
* Each job's actions are signed independently for the job's own
|
|
1662
|
+
* `(documentId, branch)` target -- the per-action signing the reactor's own
|
|
1663
|
+
* `signActions` does, not the batch state-prediction `execute` uses for a
|
|
1664
|
+
* multi-action push. A drive job such as `addFile`'s is `CREATE_DOCUMENT` +
|
|
1665
|
+
* `UPGRADE_DOCUMENT` + `ADD_RELATIONSHIP`, which the prediction path rejects
|
|
1666
|
+
* outright and which has no fetchable baseline to stamp against. The reactor
|
|
1667
|
+
* records but does not verify the stamped previous-state head, so signing
|
|
1668
|
+
* each action bare is exactly what the in-process `DriveClient` relies on.
|
|
1669
|
+
*
|
|
1670
|
+
* The mutation is synchronous server-side: a job it returns is already
|
|
1671
|
+
* settled, so {@link waitForJob} resolves from it without polling.
|
|
1672
|
+
*/
|
|
1673
|
+
async executeBatch(request, signal) {
|
|
1674
|
+
const signer = this.signer ?? resolveAmbientSigner();
|
|
1675
|
+
const jobInputs = await Promise.all(request.jobs.map(async (job, index) => {
|
|
1676
|
+
const documentId = await this.batchWriteTarget(job, request.jobs.slice(0, index), signer, signal);
|
|
1677
|
+
const actions = await this.signBatchJobActions({
|
|
1678
|
+
...job,
|
|
1679
|
+
documentId
|
|
1680
|
+
}, signer, signal);
|
|
1681
|
+
return {
|
|
1682
|
+
key: job.key,
|
|
1683
|
+
documentIdOrSlug: documentId,
|
|
1684
|
+
scope: job.scope,
|
|
1685
|
+
branch: job.branch,
|
|
1686
|
+
actions: actions.map(toTransportAction),
|
|
1687
|
+
dependsOn: job.dependsOn
|
|
1688
|
+
};
|
|
1689
|
+
}));
|
|
1690
|
+
const result = await this.sdk.ExecuteBatch({ jobs: jobInputs }, void 0, signal);
|
|
1691
|
+
const jobs = {};
|
|
1692
|
+
for (const entry of result.executeBatch.jobs) jobs[entry.key] = jobInfoFromGql(entry.job);
|
|
1693
|
+
await this.announceBatch(request, jobs, signal);
|
|
1694
|
+
const failed = request.jobs.find((job) => jobs[job.key]?.status === "FAILED");
|
|
1695
|
+
if (failed) throw new BatchJobFailedError(failed.key, jobs);
|
|
1696
|
+
return { jobs };
|
|
1697
|
+
}
|
|
1698
|
+
/** Polls `jobStatus` until the job is READ_READY or FAILED. */
|
|
1699
|
+
async waitForJob(jobOrId, signal) {
|
|
1700
|
+
if (typeof jobOrId !== "string" && isSettled(jobOrId)) return jobOrId;
|
|
1701
|
+
const jobId = typeof jobOrId === "string" ? jobOrId : jobOrId.id;
|
|
1702
|
+
for (;;) {
|
|
1703
|
+
const result = await this.sdk.GetJobStatus({ jobId }, void 0, signal);
|
|
1704
|
+
if (!result.jobStatus) throw new Error(`Job not found: ${jobId}`);
|
|
1705
|
+
const job = jobInfoFromGql(result.jobStatus);
|
|
1706
|
+
if (isSettled(job)) return job;
|
|
1707
|
+
await delay(JOB_POLL_INTERVAL_MS, signal);
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Not served: the Switchboard has no query for the policy it gives new
|
|
1712
|
+
* documents, and a guessed default would under-sign on a stricter host.
|
|
1713
|
+
*/
|
|
1714
|
+
getCreateSignaturePolicy() {
|
|
1715
|
+
return Promise.reject(new GraphQLOperationNotSupportedError("getCreateSignaturePolicy", "the Switchboard exposes no create signature policy"));
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Not served: the versions a new document takes come from the host's peer
|
|
1719
|
+
* agreement, which the Switchboard does not expose. A parent's own versions
|
|
1720
|
+
* are not that answer.
|
|
1721
|
+
*/
|
|
1722
|
+
getCreateProtocolVersions(_parentIdentifier, _signal) {
|
|
1723
|
+
return Promise.reject(new GraphQLOperationNotSupportedError("getCreateProtocolVersions", "the Switchboard exposes no create protocol versions"));
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* Sets or, with `null`, clears the preferred editor as a client-signed
|
|
1727
|
+
* action, as the in-process client does.
|
|
1728
|
+
*/
|
|
1729
|
+
setPreferredEditor(documentIdentifier, preferredEditor, branch = "main", signal) {
|
|
1730
|
+
return this.execute(documentIdentifier, branch, [actions.setPreferredEditor(preferredEditor)], signal);
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Emits the changes the batch's settled jobs made, as `create` and `execute`
|
|
1734
|
+
* do, so a cache is invalidated without a realtime socket. The documents a
|
|
1735
|
+
* job wrote to are its own and those its consistency token names.
|
|
1736
|
+
*/
|
|
1737
|
+
async announceBatch(request, jobs, signal) {
|
|
1738
|
+
if (this.listeners.length === 0) return;
|
|
1739
|
+
const deleted = /* @__PURE__ */ new Set();
|
|
1740
|
+
const created = /* @__PURE__ */ new Map();
|
|
1741
|
+
const touched = /* @__PURE__ */ new Map();
|
|
1742
|
+
const keyOf = (written) => `${written.branch}\u0000${written.documentId}`;
|
|
1743
|
+
for (const job of request.jobs) {
|
|
1744
|
+
const info = jobs[job.key];
|
|
1745
|
+
if (!info || info.status !== "READ_READY") continue;
|
|
1746
|
+
const types = new Set(job.actions.map((action) => action.type));
|
|
1747
|
+
if (types.has("DELETE_DOCUMENT")) {
|
|
1748
|
+
deleted.add(info.documentId);
|
|
1749
|
+
continue;
|
|
1750
|
+
}
|
|
1751
|
+
const own = {
|
|
1752
|
+
documentId: info.documentId,
|
|
1753
|
+
branch: job.branch
|
|
1754
|
+
};
|
|
1755
|
+
if (types.has("CREATE_DOCUMENT")) created.set(keyOf(own), own);
|
|
1756
|
+
touched.set(keyOf(own), own);
|
|
1757
|
+
for (const { documentId, branch } of info.consistencyToken.coordinates) touched.set(keyOf({
|
|
1758
|
+
documentId,
|
|
1759
|
+
branch
|
|
1760
|
+
}), {
|
|
1761
|
+
documentId,
|
|
1762
|
+
branch
|
|
1763
|
+
});
|
|
1764
|
+
}
|
|
1765
|
+
for (const documentId of deleted) this.emitChange({
|
|
1766
|
+
type: DOCUMENT_CHANGE_TYPE.Deleted,
|
|
1767
|
+
documents: [],
|
|
1768
|
+
context: { childId: documentId }
|
|
1769
|
+
});
|
|
1770
|
+
const read = async ({ documentId, branch }) => {
|
|
1771
|
+
try {
|
|
1772
|
+
return await this.get(documentId, { branch }, signal);
|
|
1773
|
+
} catch (error) {
|
|
1774
|
+
logger.warn("GraphQLReactorClient: could not read @documentId on @branch to announce a batch change: @error", documentId, branch, error);
|
|
1775
|
+
return;
|
|
1776
|
+
}
|
|
1777
|
+
};
|
|
1778
|
+
const readAll = async (written) => (await Promise.all(written.map(read))).filter((document) => document !== void 0);
|
|
1779
|
+
const [createdDocuments, updatedDocuments] = await Promise.all([readAll([...created.values()].filter((w) => !deleted.has(w.documentId))), readAll([...touched.entries()].filter(([key, w]) => !deleted.has(w.documentId) && !created.has(key)).map(([, w]) => w))]);
|
|
1780
|
+
if (createdDocuments.length > 0) this.emitChange({
|
|
1781
|
+
type: DOCUMENT_CHANGE_TYPE.Created,
|
|
1782
|
+
documents: createdDocuments
|
|
1783
|
+
});
|
|
1784
|
+
if (updatedDocuments.length > 0) this.emitChange({
|
|
1785
|
+
type: DOCUMENT_CHANGE_TYPE.Updated,
|
|
1786
|
+
documents: updatedDocuments
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* The id a job's actions are signed for: a signature covers the document id,
|
|
1791
|
+
* and the server resolves a slug before verifying. A document created by this
|
|
1792
|
+
* job or an earlier one is named by its id. When the server has no such
|
|
1793
|
+
* document the identifier is used as given, and the server decides; any
|
|
1794
|
+
* other failure to read it throws, so nothing is signed for a slug.
|
|
1795
|
+
*/
|
|
1796
|
+
async batchWriteTarget(job, earlier, signer, signal) {
|
|
1797
|
+
const creates = (plan) => plan.documentId === job.documentId && plan.actions.some((action) => action.type === "CREATE_DOCUMENT");
|
|
1798
|
+
if (!signer || job.actions.every(isActionSigned) || creates(job) || earlier.some(creates)) return job.documentId;
|
|
1799
|
+
return (await this.sdk.GetDocument({
|
|
1800
|
+
identifier: job.documentId,
|
|
1801
|
+
view: viewFilterInputFromViewFilter({ branch: job.branch })
|
|
1802
|
+
}, void 0, signal)).document?.document.id ?? job.documentId;
|
|
1803
|
+
}
|
|
1804
|
+
/**
|
|
1805
|
+
* Signs one batch job's actions for the job's own log.
|
|
1806
|
+
*
|
|
1807
|
+
* Each action is signed on its own for `(documentId, branch)`, the same
|
|
1808
|
+
* per-action signing the reactor's `signActions` does: no state prediction
|
|
1809
|
+
* across the job, so a job carrying a `CREATE_DOCUMENT` the push-prediction
|
|
1810
|
+
* path rejects still signs. An action already signed under a key is left
|
|
1811
|
+
* as it is: the reference `DriveClient` signs its jobs before handing them
|
|
1812
|
+
* here. With no signer the actions pass through unsigned, matching
|
|
1813
|
+
* {@link execute}.
|
|
1814
|
+
*/
|
|
1815
|
+
async signBatchJobActions(job, signer, signal) {
|
|
1816
|
+
if (!signer) return job.actions;
|
|
1817
|
+
return Promise.all(job.actions.map((action) => isActionSigned(action) ? Promise.resolve(action) : signStampedAction(action, signer, actionSigningTarget(action, job.documentId, job.branch), signal)));
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1533
1820
|
* Deletes a document and announces it as a `Deleted` event.
|
|
1534
1821
|
*
|
|
1535
1822
|
* Pass a document id. The server resolves a slug just as happily, but
|
|
@@ -1638,6 +1925,35 @@ var GraphQLReactorClient = class {
|
|
|
1638
1925
|
});
|
|
1639
1926
|
}
|
|
1640
1927
|
/**
|
|
1928
|
+
* Shapes a document result page into the reactor's {@link PagedResults}.
|
|
1929
|
+
*
|
|
1930
|
+
* The items carry the same `PHDocumentFields` fragment as `get`, so the same
|
|
1931
|
+
* adapter rebuilds each one. `hasNextPage` gates the cursor exactly as
|
|
1932
|
+
* `getOperations` does: no cursor means no `next`.
|
|
1933
|
+
*/
|
|
1934
|
+
toDocumentResults(page, effectivePaging, branch, next) {
|
|
1935
|
+
const nextCursor = page.hasNextPage ? page.cursor ?? void 0 : void 0;
|
|
1936
|
+
return {
|
|
1937
|
+
results: page.items.map((item) => phDocumentFromGetDocument(item, branch)),
|
|
1938
|
+
options: effectivePaging,
|
|
1939
|
+
nextCursor,
|
|
1940
|
+
next: nextCursor ? () => next(nextCursor, effectivePaging.limit) : void 0
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
/**
|
|
1944
|
+
* Shapes a relationship-edge result page into the reactor's
|
|
1945
|
+
* {@link PagedResults}, restoring each edge's `Date` fields.
|
|
1946
|
+
*/
|
|
1947
|
+
toRelationshipResults(page, effectivePaging, next) {
|
|
1948
|
+
const nextCursor = page.hasNextPage ? page.cursor ?? void 0 : void 0;
|
|
1949
|
+
return {
|
|
1950
|
+
results: page.items.map((edge) => documentRelationshipFromEdge(edge)),
|
|
1951
|
+
options: effectivePaging,
|
|
1952
|
+
nextCursor,
|
|
1953
|
+
next: nextCursor ? () => next(nextCursor, effectivePaging.limit) : void 0
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1956
|
+
/**
|
|
1641
1957
|
* Opens the realtime socket on the first subscriber.
|
|
1642
1958
|
*
|
|
1643
1959
|
* The subscription is a firehose - no `search` argument - and this client
|
|
@@ -1809,7 +2125,7 @@ function eventMatchesSearch(event, search) {
|
|
|
1809
2125
|
*/
|
|
1810
2126
|
function viewFilterInputFromViewFilter(view) {
|
|
1811
2127
|
if (!view) return;
|
|
1812
|
-
if (view
|
|
2128
|
+
if (viewIsPointInTime(view)) throw new GraphQLOperationNotSupportedError("view", "point-in-time views are not supported by GraphQLReactorClient");
|
|
1813
2129
|
if (view.branch === void 0 && view.scopes === void 0) return;
|
|
1814
2130
|
return {
|
|
1815
2131
|
branch: view.branch,
|
|
@@ -1824,6 +2140,71 @@ function pagingInputFromPaging(paging) {
|
|
|
1824
2140
|
};
|
|
1825
2141
|
}
|
|
1826
2142
|
/**
|
|
2143
|
+
* Whether a search names `ids` or `slugs`, which the Switchboard `findDocuments`
|
|
2144
|
+
* query cannot honour (it filters by `type` and `parentId`).
|
|
2145
|
+
*
|
|
2146
|
+
* The test is PRESENCE, not length: the reactor `find` contract
|
|
2147
|
+
* (`packages/reactor/src/core/reactor.ts`) dispatches on `search.ids` /
|
|
2148
|
+
* `search.slugs` being present, so `find({ ids: [] })` is an identifier search
|
|
2149
|
+
* that must yield the empty set -- not a plain type query over every document.
|
|
2150
|
+
* The GraphQL surface cannot express an identifier search at all, so a present
|
|
2151
|
+
* (even empty) `ids`/`slugs` is refused rather than served as the wrong query.
|
|
2152
|
+
*/
|
|
2153
|
+
function searchNamesIdentifiers(search) {
|
|
2154
|
+
return search.ids !== void 0 || search.slugs !== void 0;
|
|
2155
|
+
}
|
|
2156
|
+
/** Whether a view asks for a point-in-time read the GraphQL surface cannot express. */
|
|
2157
|
+
function viewIsPointInTime(view) {
|
|
2158
|
+
return view?.revision !== void 0;
|
|
2159
|
+
}
|
|
2160
|
+
/**
|
|
2161
|
+
* The single source of truth for whether the Switchboard `findDocuments` query
|
|
2162
|
+
* can serve a `find`. It is servable iff the search names neither `ids` nor
|
|
2163
|
+
* `slugs` (present, regardless of length) AND the view is not point-in-time:
|
|
2164
|
+
* each is a by-contract limitation of a surface that filters only by
|
|
2165
|
+
* `type`/`parentId` at head. Exported so a caller can route around an
|
|
2166
|
+
* unservable search instead of catching the error `find` throws for it.
|
|
2167
|
+
*/
|
|
2168
|
+
function findIsServableOverGraphQL(search, view) {
|
|
2169
|
+
return !searchNamesIdentifiers(search) && !viewIsPointInTime(view);
|
|
2170
|
+
}
|
|
2171
|
+
/** Rebuilds a relationship edge from its GraphQL fields. */
|
|
2172
|
+
function documentRelationshipFromEdge(edge) {
|
|
2173
|
+
const relationship = {
|
|
2174
|
+
sourceId: edge.sourceId,
|
|
2175
|
+
targetId: edge.targetId,
|
|
2176
|
+
relationshipType: edge.relationshipType,
|
|
2177
|
+
createdAt: dateFromDateTime(edge.createdAt),
|
|
2178
|
+
updatedAt: dateFromDateTime(edge.updatedAt)
|
|
2179
|
+
};
|
|
2180
|
+
const metadata = edge.metadata;
|
|
2181
|
+
if (isPlainObject(metadata)) relationship.metadata = metadata;
|
|
2182
|
+
return relationship;
|
|
2183
|
+
}
|
|
2184
|
+
/**
|
|
2185
|
+
* Restores a `Date` from the `DateTime` scalar, which deserializes as either an
|
|
2186
|
+
* ISO string or a `Date`, reusing the get-path's {@link isoStringFromDateTime}.
|
|
2187
|
+
*
|
|
2188
|
+
* A null, absent or unparseable value is a malformed timestamp from the server,
|
|
2189
|
+
* not something to coerce to the epoch or an `Invalid Date`: it throws, so the
|
|
2190
|
+
* malformed edge surfaces as a genuine failure rather than a silently-wrong
|
|
2191
|
+
* `DocumentRelationship`.
|
|
2192
|
+
*/
|
|
2193
|
+
function dateFromDateTime(value) {
|
|
2194
|
+
if (value === null || value === void 0) throw new Error("relationship edge is missing a required DateTime timestamp");
|
|
2195
|
+
const date = new Date(isoStringFromDateTime(value));
|
|
2196
|
+
if (Number.isNaN(date.getTime())) throw new Error(`relationship edge carries an unparseable DateTime timestamp: ${String(value)}`);
|
|
2197
|
+
return date;
|
|
2198
|
+
}
|
|
2199
|
+
/**
|
|
2200
|
+
* Whether a JSON value is a plain object, so relationship `metadata` is assigned
|
|
2201
|
+
* only when it is one. A non-object JSON scalar (string, number, array, null)
|
|
2202
|
+
* is dropped exactly as a null is, rather than cast to `Record` and trusted.
|
|
2203
|
+
*/
|
|
2204
|
+
function isPlainObject(value) {
|
|
2205
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2206
|
+
}
|
|
2207
|
+
/**
|
|
1827
2208
|
* The reactor and the GraphQL schema disagree on the enum: the reactor's
|
|
1828
2209
|
* `None` is the schema's `ORPHAN`. This is the inverse of the server's
|
|
1829
2210
|
* `toReactorPropagationMode`.
|
|
@@ -1866,6 +2247,67 @@ function documentModelVersion(document) {
|
|
|
1866
2247
|
const documentScope = document.state.document;
|
|
1867
2248
|
return normalizeDocumentModelVersion(documentScope?.version);
|
|
1868
2249
|
}
|
|
2250
|
+
/**
|
|
2251
|
+
* Rebuilds a reactor {@link JobInfo} from what the server reported. An unknown
|
|
2252
|
+
* job arrives as the reactor's own: FAILED with an empty `documentId`.
|
|
2253
|
+
*/
|
|
2254
|
+
function jobInfoFromGql(job) {
|
|
2255
|
+
const token = job.consistencyToken;
|
|
2256
|
+
if (token.version !== 1) throw new Error(`Job ${job.id} carries consistency token version ${token.version}, which this client cannot read`);
|
|
2257
|
+
const info = {
|
|
2258
|
+
id: job.id,
|
|
2259
|
+
documentId: job.documentId,
|
|
2260
|
+
status: job.status,
|
|
2261
|
+
createdAtUtcIso: isoStringFromDateTime(job.createdAt),
|
|
2262
|
+
consistencyToken: {
|
|
2263
|
+
version: 1,
|
|
2264
|
+
createdAtUtcIso: token.createdAtUtcIso,
|
|
2265
|
+
coordinates: token.coordinates.map((coordinate) => ({ ...coordinate }))
|
|
2266
|
+
},
|
|
2267
|
+
meta: {
|
|
2268
|
+
batchId: job.meta.batchId,
|
|
2269
|
+
batchJobIds: [...job.meta.batchJobIds]
|
|
2270
|
+
}
|
|
2271
|
+
};
|
|
2272
|
+
if (job.completedAt != null) info.completedAtUtcIso = isoStringFromDateTime(job.completedAt);
|
|
2273
|
+
if (job.result != null) info.result = job.result;
|
|
2274
|
+
if (job.error != null) info.error = {
|
|
2275
|
+
name: job.errorName ?? "Error",
|
|
2276
|
+
message: job.error,
|
|
2277
|
+
stack: ""
|
|
2278
|
+
};
|
|
2279
|
+
return info;
|
|
2280
|
+
}
|
|
2281
|
+
function isSettled(job) {
|
|
2282
|
+
const status = job.status;
|
|
2283
|
+
return status === "READ_READY" || status === "FAILED";
|
|
2284
|
+
}
|
|
2285
|
+
function abortReason(signal) {
|
|
2286
|
+
const reason = signal.reason;
|
|
2287
|
+
return reason instanceof Error ? reason : new Error(String(reason));
|
|
2288
|
+
}
|
|
2289
|
+
function delay(ms, signal) {
|
|
2290
|
+
return new Promise((resolve, reject) => {
|
|
2291
|
+
if (signal?.aborted) {
|
|
2292
|
+
reject(abortReason(signal));
|
|
2293
|
+
return;
|
|
2294
|
+
}
|
|
2295
|
+
const onAbort = () => {
|
|
2296
|
+
clearTimeout(timer);
|
|
2297
|
+
if (signal) reject(abortReason(signal));
|
|
2298
|
+
};
|
|
2299
|
+
const timer = setTimeout(() => {
|
|
2300
|
+
signal?.removeEventListener("abort", onAbort);
|
|
2301
|
+
resolve();
|
|
2302
|
+
}, ms);
|
|
2303
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
/** As the reactor's `signAction` reads it: the last tuple names a key. */
|
|
2307
|
+
function isActionSigned(action) {
|
|
2308
|
+
const signer = action.context?.signer;
|
|
2309
|
+
return Boolean(signer?.app?.key && signer.signatures.at(-1)?.[1]);
|
|
2310
|
+
}
|
|
1869
2311
|
/** Resolves the signer of the logged-in user, if there is one. */
|
|
1870
2312
|
function resolveAmbientSigner() {
|
|
1871
2313
|
if (typeof window === "undefined") return;
|
|
@@ -2625,6 +3067,6 @@ function useDocumentOperations(documentId, scope, options = {}) {
|
|
|
2625
3067
|
return legacy ? legacyResult : primary;
|
|
2626
3068
|
}
|
|
2627
3069
|
//#endregion
|
|
2628
|
-
export { addDefaultDrivesUrlEventHandler as $, useIsAddLocalDrivesEnabled as $n,
|
|
3070
|
+
export { addDefaultDrivesUrlEventHandler as $, useIsAddLocalDrivesEnabled as $n, viewFilterInputFromViewFilter as $r, setEnabledEditors as $t, useReactorClientModule as A, copyNode$1 as Ai, setRenownUrl as An, useSentryRelease as Ar, addRenownAdaptersEventHandler as At, useDragNode as B, setPreferredEditorOnNode as Bi, setWarnOutdatedApp as Bn, phAppConfigHooks as Br, addSwitchboardUrlEventHandler as Bt, addReactorClientModuleEventHandler as C, convertRemoteOperations as Ci, setIsRelationalProcessorsEnabled as Cn, useRenownChainId as Cr, addIsExternalRelationalProcessorsEnabledEventHandler as Ct, useModelRegistry as D, addDocument as Di, setRenownAdapters as Dn, useRouterBasename as Dr, addIsSentryTracingEnabledEventHandler as Dt, useDatabase as E, screamingSnakeToCamel as Ei, setLogLevel as En, useRequiresHardRefresh as Er, addIsRelationalProcessorsEnabledEventHandler as Et, usePackageDiscoveryService as F, getDocumentExtension as Fi, setSentryRelease as Fn, useWarnOutdatedApp as Fr, addRouterBasenameEventHandler as Ft, useFeatures as G, closePHModal as Gi, useDefaultDrivesUrl as Gn, setIsDragAndDropEnabled as Gr, phGlobalConfigSetters as Gt, useDropTarget as H, getUserPermissions as Hi, useAnalyticsDatabaseName as Hn, phDocumentEditorConfigHooks as Hr, addVersionEventHandler as Ht, addGraphQLReactorClientEventHandler as I, loadFile as Ii, setStudioMode as In, addAllowedDocumentTypesEventHandler as Ir, addSentryDsnEventHandler as It, useAttachmentService as J, showDeleteNodeModal as Ji, useEnabledEditors as Jn, useIsDragAndDropEnabled as Jr, setBasePath as Jt, addAttachmentServiceEventHandler as K, setPHModal as Ki, useDisabledEditors as Kn, setIsExternalControlsEnabled as Kr, setAllowList as Kt, setGraphQLReactorClient as L, moveNode$1 as Li, setSwitchboardUrl as Ln, addIsDragAndDropEnabledEventHandler as Lr, addSentryEnvEventHandler as Lt, useSyncList as M, exportFile as Mi, setRouterBasename as Mn, useSwitchboardUrl as Mr, addRenownNetworkIdEventHandler as Mt, addPackageDiscoveryServiceEventHandler as N, extractInitialState as Ni, setSentryDsn as Nn, useVersion as Nr, addRenownUrlEventHandler as Nt, usePGlite as O, addFileWithProgress as Oi, setRenownChainId as On, useSentryDsn as Or, addLocalDrivesEnabledEventHandler as Ot, setPackageDiscoveryService as P, fetchDocumentOperations as Pi, setSentryEnv as Pn, useVersionCheckInterval as Pr, addRequiresHardRefreshEventHandler as Pt, addCliVersionEventHandler as Q, useIsAddDriveEnabled as Qn, isGraphQLReactorClient as Qr, setDrivesPreserveStrategy as Qt, useGraphQLReactorClient as R, renameDriveNode as Ri, setVersion as Rn, addIsExternalControlsEnabledEventHandler as Rr, addSentryReleaseEventHandler as Rt, addReactorClientEventHandler as S, buildPulledDocument as Si, setIsPublicDrivesEnabled as Sn, useRenownAdapters as Sr, addIsExternalProcessorsEnabledEventHandler as St, setReactorClientModule as T, hasRevisionConflict as Ti, setLocalDrivesEnabled as Tn, useRenownUrl as Tr, addIsPublicDrivesEnabledEventHandler as Tt, addFeaturesEventHandler as U, isDocumentTypeSupported as Ui, useBasePath as Un, phDocumentEditorConfigSetters as Ur, addWarnOutdatedAppEventHandler as Ut, useDropNode as V, upgradeDocument as Vi, useAllowList as Vn, phAppConfigSetters as Vr, addVersionCheckIntervalEventHandler as Vt, setFeatures as W, addModalEventHandler as Wi, useCliVersion as Wn, setAllowedDocumentTypes as Wr, phGlobalConfigHooks as Wt, addAnalyticsDatabaseNameEventHandler as X, usePHModal as Xi, useGaTrackingId as Xn, GraphQLReactorClient as Xr, setDefaultDrivesUrl as Xt, addAllowListEventHandler as Y, showPHModal as Yi, useFileUploadOperationsChunkSize as Yn, useIsExternalControlsEnabled as Yr, setCliVersion as Yt, addBasePathEventHandler as Z, useIsAddCloudDrivesEnabled as Zn, findIsServableOverGraphQL as Zr, setDisabledEditors as Zt, addRevisionHistoryVisibleEventHandler as _, isoStringFromDateTime as _i, setIsEditorReadModeEnabled as _n, useIsPublicDrivesEnabled as _r, addIsDocumentModelSelectionSettingsEnabledEventHandler as _t, addPHEventHandlers as a, describeGraphQLDocument as ai, setIsAddPublicDrivesEnabled as an, useIsDeleteCloudDrivesEnabled as ar, addIsAddCloudDrivesEnabledEventHandler as at, showRevisionHistory as b, revisionMapFromRevisionsList as bi, setIsExternalRelationalProcessorsEnabled as bn, useLocalDrivesEnabled as br, addIsEditorReadModeEnabledEventHandler as bt, addToastEventHandler as c, packageFromDocumentModels as ci, setIsAnalyticsExternalProcessorsEnabled as cn, useIsDiffAnalyticsEnabled as cr, addIsAddPublicDrivesEnabledEventHandler as ct, addSelectedTimelineRevisionEventHandler as d, signStampedAction as di, setIsDeleteLocalDrivesEnabled as dn, useIsEditorDebugModeEnabled as dr, addIsAnalyticsExternalProcessorsEnabledEventHandler as dt, isAuthRefusalClose as ei, setFileUploadOperationsChunkSize as en, useIsAddPublicDrivesEnabled as er, addDisabledEditorsEventHandler as et, setSelectedTimelineRevision as f, stampAction as fi, setIsDeletePublicDrivesEnabled as fn, useIsEditorReadModeEnabled as fr, addIsCloudDrivesEnabledEventHandler as ft, useSelectedTimelineItem as g, GraphQLOperationNotSupportedError as gi, setIsEditorDebugModeEnabled as gn, useIsLocalDrivesEnabled as gr, addIsDiffAnalyticsEnabledEventHandler as gt, setSelectedTimelineItem as h, BatchJobFailedError as hi, setIsDriveAnalyticsEnabled as hn, useIsExternalRelationalProcessorsEnabled as hr, addIsDeletePublicDrivesEnabledEventHandler as ht, useSwitchboardClient as i, SubgraphSdkRegistry as ii, setIsAddLocalDrivesEnabled as in, useIsCloudDrivesEnabled as ir, addGaTrackingIdEventHandler as it, useSync as j, deleteNode as ji, setRequiresHardRefresh as jn, useStudioMode as jr, addRenownChainIdEventHandler as jt, useReactorClient as k, addFolder$1 as ki, setRenownNetworkId as kn, useSentryEnv as kr, addLogLevelEventHandler as kt, setPHToast as l, resolveDocumentModelModule as li, setIsCloudDrivesEnabled as ln, useIsDocumentModelSelectionSettingsEnabled as lr, addIsAnalyticsDatabaseWorkerEnabledEventHandler as lt, addSelectedTimelineItemEventHandler as m, ReactorOperationFieldsFragmentDoc as mi, setIsDocumentModelSelectionSettingsEnabled as mn, useIsExternalProcessorsEnabled as mr, addIsDeleteLocalDrivesEnabledEventHandler as mt, GraphQLReactorProvider as n, startDocumentChangesSubscription as ni, setIsAddCloudDrivesEnabled as nn, useIsAnalyticsEnabled as nr, addEnabledEditorsEventHandler as nt, callEventHandlerRegisterFunctions as o, subgraphUrlFromGraphqlUrl as oi, setIsAnalyticsDatabaseWorkerEnabled as on, useIsDeleteLocalDrivesEnabled as or, addIsAddDriveEnabledEventHandler as ot, useSelectedTimelineRevision as p, MutateDocumentWithOperationsDocument as pi, setIsDiffAnalyticsEnabled as pn, useIsExternalPackagesEnabled as pr, addIsDeleteCloudDrivesEnabledEventHandler as pt, setAttachmentService as q, showCreateDocumentModal as qi, useDrivesPreserveStrategy as qn, useAllowedDocumentTypes as qr, setAnalyticsDatabaseName as qt, ensurePHEventHandlers as r, subscriptionsUrlFromGraphqlUrl as ri, setIsAddDriveEnabled as rn, useIsAnalyticsExternalProcessorsEnabled as rr, addFileUploadOperationsChunkSizeEventHandler as rt, commonGlobalEventHandlerFunctions as s, StaticPackageManager as si, setIsAnalyticsEnabled as sn, useIsDeletePublicDrivesEnabled as sr, addIsAddLocalDrivesEnabledEventHandler as st, useDocumentOperations as t, makeAuthConnectionParams as ti, setGaTrackingId as tn, useIsAnalyticsDatabaseWorkerEnabled as tr, addDrivesPreserveStrategyEventHandler as tt, usePHToast as u, prepareSignedActions as ui, setIsDeleteCloudDrivesEnabled as un, useIsDriveAnalyticsEnabled as ur, addIsAnalyticsEnabledEventHandler as ut, hideRevisionHistory as v, phDocumentFromGetDocument as vi, setIsExternalPackagesEnabled as vn, useIsRelationalProcessorsEnabled as vr, addIsDriveAnalyticsEnabledEventHandler as vt, setReactorClient as w, extractRevisionMap as wi, setIsSentryTracingEnabled as wn, useRenownNetworkId as wr, addIsLocalDrivesEnabledEventHandler as wt, useRevisionHistoryVisible as x, ConflictError as xi, setIsLocalDrivesEnabled as xn, useLogLevel as xr, addIsExternalPackagesEnabledEventHandler as xt, setRevisionHistoryVisible as y, phDocumentFromMutation as yi, setIsExternalProcessorsEnabled as yn, useIsSentryTracingEnabled as yr, addIsEditorDebugModeEnabledEventHandler as yt, addDraggingNodeEventHandler as z, renameNode as zi, setVersionCheckInterval as zn, isExternalControlsEnabledEventFunctions as zr, addStudioModeEventHandler as zt };
|
|
2629
3071
|
|
|
2630
|
-
//# sourceMappingURL=document-operations-
|
|
3072
|
+
//# sourceMappingURL=document-operations-CpzMebZ3.js.map
|