@contember/binding-legacy 2.2.0-alpha.1 → 2.2.0-alpha.10
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/development/index.cjs +2 -0
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +2 -0
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/core/AccessorErrorManager.cjs +1 -3
- package/dist/development/src/core/AccessorErrorManager.cjs.map +1 -1
- package/dist/development/src/core/AccessorErrorManager.js +1 -3
- package/dist/development/src/core/AccessorErrorManager.js.map +1 -1
- package/dist/development/src/core/DataBinding.cjs +10 -8
- package/dist/development/src/core/DataBinding.cjs.map +1 -1
- package/dist/development/src/core/DataBinding.js +10 -8
- package/dist/development/src/core/DataBinding.js.map +1 -1
- package/dist/development/src/core/ErrorsPreprocessor.cjs +1 -1
- package/dist/development/src/core/ErrorsPreprocessor.cjs.map +1 -1
- package/dist/development/src/core/ErrorsPreprocessor.js +1 -1
- package/dist/development/src/core/ErrorsPreprocessor.js.map +1 -1
- package/dist/production/index.cjs +2 -0
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +2 -0
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/core/AccessorErrorManager.cjs +1 -3
- package/dist/production/src/core/AccessorErrorManager.cjs.map +1 -1
- package/dist/production/src/core/AccessorErrorManager.js +1 -3
- package/dist/production/src/core/AccessorErrorManager.js.map +1 -1
- package/dist/production/src/core/DataBinding.cjs +10 -8
- package/dist/production/src/core/DataBinding.cjs.map +1 -1
- package/dist/production/src/core/DataBinding.js +10 -8
- package/dist/production/src/core/DataBinding.js.map +1 -1
- package/dist/production/src/core/ErrorsPreprocessor.cjs +1 -1
- package/dist/production/src/core/ErrorsPreprocessor.cjs.map +1 -1
- package/dist/production/src/core/ErrorsPreprocessor.js +1 -1
- package/dist/production/src/core/ErrorsPreprocessor.js.map +1 -1
- package/dist/types/accessorTree/NormalizedPersistedData.d.ts.map +1 -1
- package/dist/types/accessors/EntityAccessorImpl.d.ts +2 -2
- package/dist/types/accessors/EntityAccessorImpl.d.ts.map +1 -1
- package/dist/types/accessors/EntityListAccessorImpl.d.ts +1 -1
- package/dist/types/accessors/EntityListAccessorImpl.d.ts.map +1 -1
- package/dist/types/accessors/FieldAccessorImpl.d.ts +1 -1
- package/dist/types/accessors/FieldAccessorImpl.d.ts.map +1 -1
- package/dist/types/core/AccessorErrorManager.d.ts.map +1 -1
- package/dist/types/core/Config.d.ts.map +1 -1
- package/dist/types/core/DataBinding.d.ts.map +1 -1
- package/dist/types/core/DirtinessTracker.d.ts.map +1 -1
- package/dist/types/core/ErrorsPreprocessor.d.ts.map +1 -1
- package/dist/types/core/EventManager.d.ts.map +1 -1
- package/dist/types/core/MutationGenerator.d.ts.map +1 -1
- package/dist/types/core/QueryGenerator.d.ts.map +1 -1
- package/dist/types/core/RealmKeyGenerator.d.ts.map +1 -1
- package/dist/types/core/RequestResponseNormalizer.d.ts.map +1 -1
- package/dist/types/core/StateInitializer.d.ts.map +1 -1
- package/dist/types/core/TreeAugmenter.d.ts.map +1 -1
- package/dist/types/core/TreeStore.d.ts.map +1 -1
- package/dist/types/core/exceptions/ErrorLocator.d.ts.map +1 -1
- package/dist/types/core/exceptions/MarkerSugarer.d.ts.map +1 -1
- package/dist/types/core/exceptions/TreeParameterSugarer.d.ts.map +1 -1
- package/dist/types/core/factories/createBatchUpdatesOptions.d.ts.map +1 -1
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/index.d.ts.map +1 -1
- package/dist/types/core/operations/EntityOperations.d.ts.map +1 -1
- package/dist/types/core/operations/FieldOperations.d.ts.map +1 -1
- package/dist/types/core/operations/ListOperations.d.ts.map +1 -1
- package/dist/types/core/operations/OperationsHelpers.d.ts.map +1 -1
- package/dist/types/core/requestAliases/MutationAlias.d.ts.map +1 -1
- package/dist/types/core/state/StateIterator.d.ts.map +1 -1
- package/dist/types/core/state/getEntityMarker.d.ts +1 -1
- package/dist/types/core/state/getEntityMarker.d.ts.map +1 -1
- package/dist/types/core/utils/getCombinedSignal.d.ts.map +1 -1
- package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts.map +1 -1
- package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +1 -1
- package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts.map +1 -1
- package/dist/types/utils/isEmptyObject.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/core/AccessorErrorManager.ts +2 -3
- package/src/core/DataBinding.ts +10 -8
- package/src/core/ErrorsPreprocessor.ts +1 -1
- package/src/core/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBinding.js","sources":["../../../../../packages/binding-legacy/src/core/DataBinding.ts"],"sourcesContent":["import { ContentClient, ContentQueryBuilder, GraphQlClient, GraphQlClientError } from '@contember/client'\nimport type {\n\tDataBindingEventListenerMap,\n\tDataBindingTransactionResult,\n\tEntityId,\n\tEnvironment,\n\tMarkerTreeRoot,\n\tTreeRootId,\n} from '@contember/binding-common'\nimport {\n\tassertNever,\n\tAsyncBatchUpdatesOptions,\n\tBatchUpdatesOptions,\n\tBindingOperations,\n\tErrorPersistResult,\n\tEventListenersStore,\n\tExtendTreeOptions,\n\tMarkerMerger,\n\tPersistOptions,\n\tPersistSuccessOptions,\n\tReceivedDataTree,\n\tSuccessfulPersistResult,\n\tTreeRootAccessor,\n} from '@contember/binding-common'\nimport { generateEnumerabilityPreventingEntropy } from '../utils/index.js'\nimport { AccessorErrorManager } from './AccessorErrorManager.js'\nimport { Config } from './Config.js'\nimport { DirtinessTracker } from './DirtinessTracker.js'\nimport { EventManager } from './EventManager.js'\nimport { createBatchUpdatesOptions } from './factories/index.js'\nimport { MutationGenerator, SubMutationOperation } from './MutationGenerator.js'\nimport { QueryGenerator } from './QueryGenerator.js'\nimport { StateIterator } from './state/index.js'\nimport { StateInitializer } from './StateInitializer.js'\nimport { TreeAugmenter } from './TreeAugmenter.js'\nimport { TreeStore } from './TreeStore.js'\nimport type { UpdateMetadata } from './UpdateMetadata.js'\nimport { getCombinedSignal } from './utils/index.js'\nimport { createQueryBuilder } from '@contember/binding-common'\nimport { DataBindingExtendAborted } from '@contember/binding-common'\n\nexport class DataBinding<Node> {\n\tprivate readonly accessorErrorManager: AccessorErrorManager\n\tprivate readonly batchUpdatesOptions: BatchUpdatesOptions\n\tprivate readonly asyncBatchUpdatesOptions: AsyncBatchUpdatesOptions\n\tprivate readonly bindingOperations: BindingOperations<Node>\n\tprivate readonly config: Config\n\tprivate readonly dirtinessTracker: DirtinessTracker\n\tprivate readonly eventManager: EventManager\n\tprivate readonly stateInitializer: StateInitializer\n\tprivate readonly treeAugmenter: TreeAugmenter\n\tprivate readonly queryBuilder: ContentQueryBuilder\n\tprivate readonly contentClient: ContentClient\n\tprivate readonly eventListenerStore = new EventListenersStore<DataBindingEventListenerMap>()\n\n\t// private treeRootListeners: {\n\t// \teventListeners: {}\n\t// } = {\n\t// \teventListeners: {},\n\t// }\n\n\tpublic constructor(\n\t\tprivate readonly contentApiClient: GraphQlClient,\n\t\tprivate readonly systemApiClient: GraphQlClient,\n\t\tprivate readonly tenantApiClient: GraphQlClient,\n\t\tprivate readonly treeStore: TreeStore,\n\t\tprivate readonly environment: Environment,\n\t\tprivate readonly createMarkerTree: (node: Node, environment: Environment) => MarkerTreeRoot,\n\t\tprivate readonly batchedUpdates: (callback: () => any) => void,\n\t\tprivate readonly onUpdate: (newData: TreeRootAccessor<Node>, binding: DataBinding<Node>) => void,\n\t\tprivate readonly onError: (error: GraphQlClientError, binding: DataBinding<Node>) => void,\n\t\tprivate readonly onPersistSuccess: (result: SuccessfulPersistResult, binding: DataBinding<Node>) => void,\n\t\tprivate readonly options: {\n\t\t\tskipStateUpdateAfterPersist: boolean\n\t\t},\n\t) {\n\t\tthis.config = new Config()\n\t\tthis.batchUpdatesOptions = createBatchUpdatesOptions(environment, this.treeStore)\n\t\tthis.asyncBatchUpdatesOptions = {\n\t\t\t...this.batchUpdatesOptions,\n\t\t\tcontentClient: contentApiClient,\n\t\t\tsystemClient: systemApiClient,\n\t\t\ttenantClient: tenantApiClient,\n\t\t}\n\t\tthis.dirtinessTracker = new DirtinessTracker()\n\t\tthis.eventManager = new EventManager(\n\t\t\tthis.asyncBatchUpdatesOptions,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.config,\n\t\t\tthis.dirtinessTracker,\n\t\t\tthis.resolvedOnUpdate,\n\t\t\tthis.treeStore,\n\t\t\tthis.batchedUpdates,\n\t\t)\n\t\tthis.accessorErrorManager = new AccessorErrorManager(this.eventManager, this.treeStore)\n\t\tthis.stateInitializer = new StateInitializer(\n\t\t\tthis.accessorErrorManager,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.eventManager,\n\t\t\tthis.treeStore,\n\t\t)\n\t\tthis.treeAugmenter = new TreeAugmenter(this.eventManager, this.stateInitializer, this.treeStore, options.skipStateUpdateAfterPersist)\n\n\t\t// TODO move this elsewhere\n\t\tthis.bindingOperations = Object.freeze<BindingOperations<Node>>({\n\t\t\t...this.asyncBatchUpdatesOptions,\n\t\t\taddEventListener: (type, listener) => this.eventListenerStore.add({ type }, listener),\n\t\t\tbatchDeferredUpdates: performUpdates => {\n\t\t\t\tthis.eventManager.syncTransaction(() => performUpdates(this.bindingOperations))\n\t\t\t},\n\t\t\textendTree: async (...args) => await this.extendTree(...args),\n\t\t\tpersist: async options => await this.persist(options),\n\t\t\tfetchData: async (...args) => await this.fetchData(...args),\n\t\t})\n\t\tthis.queryBuilder = createQueryBuilder(this.environment.getSchema())\n\t\tthis.contentClient = new ContentClient(contentApiClient)\n\t}\n\n\tprivate async persist({ onPersistError, onPersistSuccess, signal }: PersistOptions = {}) {\n\t\treturn await this.eventManager.persistOperation(async () => {\n\t\t\t// TODO if the tree is in an inconsistent state, wait for lock releases\n\n\t\t\tthis.eventManager.syncTransaction(() => {\n\t\t\t\tthis.accessorErrorManager.clearErrors()\n\t\t\t})\n\t\t\tawait this.eventManager.triggerOnBeforePersist()\n\n\t\t\tawait this.checkErrorsBeforePersist(onPersistError)\n\n\t\t\tconst mutationResult = MutationGenerator.getPersistMutation(this.treeStore, this.queryBuilder)\n\n\t\t\tif (mutationResult.operations.length === 0) {\n\t\t\t\treturn await this.processEmptyPersistMutation(onPersistSuccess)\n\t\t\t}\n\n\t\t\tconst { mutations, operations } = mutationResult\n\n\t\t\tlet response: DataBindingTransactionResult\n\t\t\ttry {\n\t\t\t\tresponse = await this.contentClient.mutate(\n\t\t\t\t\tthis.queryBuilder.transaction(mutations, {\n\t\t\t\t\t\tdeferForeignKeyConstraints: true,\n\t\t\t\t\t}),\n\t\t\t\t\t{\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\tonBeforeRequest: ({ query, variables }) => {\n\t\t\t\t\t\t\tconsole.debug(query, variables)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\t\tthis.onError(e, this)\n\t\t\t\t\tthrow await this.persistFail({\n\t\t\t\t\t\terrors: [e],\n\t\t\t\t\t\ttype: 'invalidResponse',\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (response.ok && Object.values(response.data).every(it => it.ok)) {\n\t\t\t\treturn await this.processSuccessfulPersistResult(response, operations, onPersistSuccess)\n\t\t\t} else {\n\t\t\t\tif (response.errorMessage) {\n\t\t\t\t\tconsole.debug(response.errorMessage)\n\t\t\t\t}\n\n\t\t\t\tthis.eventManager.syncTransaction(() => this.accessorErrorManager.replaceErrors(response, operations))\n\n\t\t\t\tawait this.eventManager.triggerOnPersistError(this.bindingOperations)\n\t\t\t\tawait onPersistError?.(this.bindingOperations)\n\t\t\t\tthrow await this.persistFail({\n\t\t\t\t\terrors: this.accessorErrorManager.getErrors(),\n\t\t\t\t\ttype: 'invalidInput',\n\t\t\t\t\tresponse,\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate async checkErrorsBeforePersist(onPersistError: PersistOptions['onPersistError']) {\n\t\tif (this.accessorErrorManager.hasErrors()) {\n\t\t\tawait this.eventManager.triggerOnPersistError(this.bindingOperations)\n\t\t\tawait onPersistError?.(this.bindingOperations)\n\t\t\tthrow await this.persistFail({\n\t\t\t\terrors: this.accessorErrorManager.getErrors(),\n\t\t\t\ttype: 'invalidInput',\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate async processEmptyPersistMutation(onPersistSuccess: PersistOptions['onPersistSuccess']): Promise<SuccessfulPersistResult> {\n\t\tthis.dirtinessTracker.reset() // TODO This ideally shouldn't be necessary but given the current limitations, this makes for better UX.\n\t\tconst persistSuccessOptions: PersistSuccessOptions = {\n\t\t\t...this.bindingOperations,\n\t\t\tsuccessType: 'nothingToPersist',\n\t\t}\n\t\tawait this.eventManager.triggerOnPersistSuccess(persistSuccessOptions)\n\t\tawait onPersistSuccess?.(persistSuccessOptions)\n\t\tconst result: SuccessfulPersistResult = { type: 'nothingToPersist' }\n\t\tawait this.eventListenerStore.invoke({ type: 'persistSuccess' }, result)\n\t\treturn result\n\t}\n\n\tprivate async processSuccessfulPersistResult(\n\t\tmutationData: DataBindingTransactionResult,\n\t\toperations: SubMutationOperation[],\n\t\tonPersistSuccess: PersistOptions['onPersistSuccess'],\n\t) {\n\t\tconst persistedEntityIds = Object.values(mutationData.data).map(it => it.node?.id).filter((id): id is EntityId => id !== undefined)\n\t\tconst result: SuccessfulPersistResult = {\n\t\t\ttype: 'justSuccess',\n\t\t\tpersistedEntityIds,\n\t\t}\n\n\t\ttry {\n\t\t\tawait this.eventManager.asyncTransaction(async () => {\n\t\t\t\tthis.resetTreeAfterSuccessfulPersist()\n\t\t\t\tthis.treeAugmenter.updatePersistedData(\n\t\t\t\t\tObject.fromEntries(\n\t\t\t\t\t\tObject.entries(mutationData.data).map(([placeholderName, subTreeResponse]) => [\n\t\t\t\t\t\t\tplaceholderName,\n\t\t\t\t\t\t\tsubTreeResponse.node,\n\t\t\t\t\t\t]),\n\t\t\t\t\t),\n\t\t\t\t\toperations,\n\t\t\t\t)\n\t\t\t\tconst persistSuccessOptions: PersistSuccessOptions = {\n\t\t\t\t\t...this.bindingOperations,\n\t\t\t\t\tsuccessType: result.type,\n\t\t\t\t}\n\t\t\t\tawait this.eventManager.triggerOnPersistSuccess(persistSuccessOptions)\n\t\t\t\tawait onPersistSuccess?.(persistSuccessOptions)\n\t\t\t\tawait this.eventListenerStore.invoke({ type: 'persistSuccess' }, result)\n\n\t\t\t\tthis.treeAugmenter.resetCreatingSubTrees()\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\tconst resultWithError = {\n\t\t\t\t...result,\n\t\t\t\tafterPersistError: e,\n\t\t\t}\n\t\t\tthis.onPersistSuccess(resultWithError, this)\n\t\t\treturn resultWithError\n\t\t}\n\t\tthis.onPersistSuccess(result, this)\n\t\treturn result\n\t}\n\n\tprivate async persistFail(error: ErrorPersistResult): Promise<ErrorPersistResult> {\n\t\tawait this.eventListenerStore.invoke({ type: 'persistError' }, error)\n\t\treturn error\n\t}\n\n\tprivate resolvedOnUpdate = ({ isMutating }: UpdateMetadata) => {\n\t\tthis.onUpdate(new TreeRootAccessor<Node>(this.dirtinessTracker.hasChanges(), isMutating, this.bindingOperations), this)\n\t}\n\n\t// This is currently useless but potentially future-compatible\n\t// private readonly addTreeRootEventListener: TreeRootAccessor.AddTreeRootEventListener = this.getAddEventListener(\n\t// \tthis.treeRootListeners,\n\t// )\n\n\tprivate pendingExtensions: Set<{\n\t\tmarkerTreeRoot: MarkerTreeRoot\n\t\tnewFragment: Node\n\t\tnewTreeRootId: TreeRootId | undefined\n\t\toptions: ExtendTreeOptions\n\t\tonError?: (error: Error) => void\n\t}> = new Set()\n\n\tprivate flushResult: Promise<boolean> | undefined\n\n\tpublic async extendTree(newFragment: Node, options: ExtendTreeOptions = {}): Promise<TreeRootId | undefined> {\n\t\tif (options.signal?.aborted) {\n\t\t\treturn Promise.reject(DataBindingExtendAborted)\n\t\t}\n\t\tconst markerTreeRoot = this.createMarkerTree(newFragment, options.environment ?? this.environment)\n\n\t\tif (!options.force && this.treeStore.effectivelyHasTreeRoot(markerTreeRoot)) {\n\t\t\t// This isn't perfectly accurate as theoretically, we could already have all the data necessary but this\n\t\t\t// could still be false.\n\n\t\t\treturn this.eventManager.syncOperation(() => {\n\t\t\t\tconst newTreeRootId = this.getNewTreeRootId()\n\t\t\t\tthis.treeAugmenter.extendTreeStates(newTreeRootId, markerTreeRoot)\n\t\t\t\treturn newTreeRootId\n\t\t\t})\n\t\t}\n\n\t\treturn await new Promise(async (resolve, reject) => {\n\t\t\tconst treeRootId = this.getNewTreeRootId()\n\t\t\tthis.pendingExtensions.add({\n\t\t\t\tmarkerTreeRoot,\n\t\t\t\tnewFragment,\n\t\t\t\tnewTreeRootId: treeRootId,\n\t\t\t\toptions,\n\t\t\t\tonError: options.onError,\n\t\t\t})\n\t\t\tthis.flushResult ??= (async () => {\n\t\t\t\tawait Promise.resolve()\n\t\t\t\tthis.flushResult = undefined\n\t\t\t\treturn await this.flushBatchedTreeExtensions()\n\t\t\t})()\n\n\t\t\tif (!(await this.flushResult) || options.signal?.aborted) {\n\t\t\t\treturn reject(DataBindingExtendAborted)\n\t\t\t}\n\n\t\t\tresolve(treeRootId)\n\t\t})\n\t}\n\n\tpublic async fetchData(fragment: Node, options?: { signal?: AbortSignal; environment?: Environment }): Promise<{\n\t\tdata: ReceivedDataTree\n\t\tmarkerTreeRoot: MarkerTreeRoot\n\t}> {\n\t\tconst markerTreeRoot = this.createMarkerTree(fragment, options?.environment ?? this.environment)\n\t\tconst data = await this.fetchPersistedData(markerTreeRoot, options?.signal)\n\n\t\treturn {\n\t\t\tdata: data,\n\t\t\tmarkerTreeRoot,\n\t\t}\n\t}\n\n\tprivate async flushBatchedTreeExtensions(): Promise<boolean> {\n\t\t// This is an async operation so we just take whatever pendingExtensions there are now and let any new ones\n\t\t// accumulate in an empty set.\n\t\tconst pendingExtensions = Array.from(this.pendingExtensions).filter(extension => {\n\t\t\treturn !extension.options.signal?.aborted\n\t\t})\n\t\tthis.pendingExtensions.clear()\n\n\t\tconst aggregateMarkerTreeRoot = pendingExtensions.reduce<MarkerTreeRoot | undefined>(\n\t\t\t(previousValue, currentValue) => {\n\t\t\t\tif (previousValue === undefined) {\n\t\t\t\t\treturn currentValue.markerTreeRoot\n\t\t\t\t}\n\t\t\t\treturn MarkerMerger.mergeMarkerTreeRoots(previousValue, currentValue.markerTreeRoot)\n\t\t\t},\n\t\t\tundefined,\n\t\t)\n\n\t\tif (aggregateMarkerTreeRoot === undefined) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst aggregateSignal = getCombinedSignal(pendingExtensions.map(extension => extension.options.signal))\n\n\t\tlet aggregatePersistedData: ReceivedDataTree\n\t\ttry {\n\t\t\taggregatePersistedData = await this.fetchPersistedData(aggregateMarkerTreeRoot, aggregateSignal)\n\t\t} catch (e) {\n\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\tif (e.type === 'aborted') {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tfor (const extension of pendingExtensions) {\n\t\t\t\t\textension.onError?.(e)\n\t\t\t\t}\n\t\t\t\tif (!pendingExtensions.every(it => !!it.onError)) {\n\t\t\t\t\tthis.onError(e, this)\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t} else {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\n\t\tif (aggregateSignal?.aborted) {\n\t\t\treturn false\n\t\t}\n\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tthis.treeAugmenter.extendPersistedData(aggregatePersistedData, aggregateMarkerTreeRoot)\n\n\t\t\tfor (const extension of pendingExtensions) {\n\t\t\t\tthis.treeAugmenter.extendTreeStates(extension.newTreeRootId, extension.markerTreeRoot)\n\t\t\t}\n\t\t})\n\t\treturn true\n\t}\n\n\tprivate async fetchPersistedData(\n\t\ttree: MarkerTreeRoot,\n\t\tsignal?: AbortSignal,\n\t): Promise<ReceivedDataTree> {\n\t\tconst queryGenerator = new QueryGenerator(tree, this.queryBuilder)\n\t\tconst query = queryGenerator.getReadQuery()\n\n\t\treturn await this.contentClient.query(query, {\n\t\t\tsignal,\n\t\t\tonBeforeRequest: ({ query, variables }) => {\n\t\t\t\tconsole.debug(query, variables)\n\t\t\t},\n\t\t})\n\t}\n\n\tprivate resetTreeAfterSuccessfulPersist() {\n\t\tthis.eventManager.syncTransaction(() => {\n\t\t\tthis.accessorErrorManager.clearErrors()\n\t\t\tthis.dirtinessTracker.reset()\n\n\t\t\tfor (const [, rootState] of StateIterator.eachRootState(this.treeStore)) {\n\t\t\t\tfor (const state of StateIterator.depthFirstAllNodes(rootState)) {\n\t\t\t\t\tswitch (state.type) {\n\t\t\t\t\t\tcase 'field': {\n\t\t\t\t\t\t\tif (state.hasUnpersistedChanges || state.touchLog?.size) {\n\t\t\t\t\t\t\t\tstate.touchLog?.clear()\n\t\t\t\t\t\t\t\tstate.hasUnpersistedChanges = false\n\t\t\t\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'entityList':\n\t\t\t\t\t\t\tif (state.unpersistedChangesCount > 0 || state.plannedRemovals?.size) {\n\t\t\t\t\t\t\t\tstate.unpersistedChangesCount = 0\n\t\t\t\t\t\t\t\tstate.plannedRemovals?.clear()\n\t\t\t\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\t\t\tif (state.unpersistedChangesCount > 0 || state.plannedHasOneDeletions?.size) {\n\t\t\t\t\t\t\t\tstate.unpersistedChangesCount = 0\n\t\t\t\t\t\t\t\tstate.plannedHasOneDeletions?.clear()\n\t\t\t\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tassertNever(state)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate static getNextTreeRootIdSeed = (() => {\n\t\tlet seed = 1\n\t\treturn () => seed++\n\t})()\n\n\tprivate getNewTreeRootId() {\n\t\t// TODO this is an awful, awful hack.\n\t\t// TODO the particular shape of the alias is relied on in MutationAlias. If you change this, change it there too.\n\t\treturn this.treeStore.markerTrees.size === 0\n\t\t\t? undefined\n\t\t\t: `${generateEnumerabilityPreventingEntropy()}-${DataBinding.getNextTreeRootIdSeed()}`\n\t}\n}\n"],"names":["_DataBinding","options","query"],"mappings":";;;;;;;;;;;;;;;;;AAyCO,MAAM,eAAN,MAAMA,cAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBvB,YACW,kBACA,iBACA,iBACA,WACA,aACA,kBACA,gBACA,UACA,SACA,kBACA,SAGhB;AAbgB,SAAA,mBAAA;AACA,SAAA,kBAAA;AACA,SAAA,kBAAA;AACA,SAAA,YAAA;AACA,SAAA,cAAA;AACA,SAAA,mBAAA;AACA,SAAA,iBAAA;AACA,SAAA,WAAA;AACA,SAAA,UAAA;AACA,SAAA,mBAAA;AACA,SAAA,UAAA;AA9BlB,kBAAA,MAAiB,sBAAA;AACjB,kBAAA,MAAiB,qBAAA;AACjB,kBAAA,MAAiB,0BAAA;AACjB,kBAAA,MAAiB,mBAAA;AACjB,kBAAA,MAAiB,QAAA;AACjB,kBAAA,MAAiB,kBAAA;AACjB,kBAAA,MAAiB,cAAA;AACjB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AACvC,WAAK,qBAAqB,YAAA;AAC1B,WAAK,iBAAiB,MAAA;AAEtB,iBAAW,CAAA,EAAG,SAAS,KAAK,cAAc,cAAc,KAAK,SAAS,GAAG;AACxE,mBAAW,SAAS,cAAc,mBAAmB,SAAS,GAAG;AAChE,kBAAQ,MAAM,MAAA;AAAA,YACb,KAAK,SAAS;AACb,kBAAI,MAAM,yBAAyB,MAAM,UAAU,MAAM;AACxD,sBAAM,UAAU,MAAA;AAChB,sBAAM,wBAAwB;AAC9B,qBAAK,aAAa,oBAAoB,OAAO,aAAa,qBAAqB;AAAA,cAChF;AACA;AAAA,YACD;AAAA,YACA,KAAK;AACJ,kBAAI,MAAM,0BAA0B,KAAK,MAAM,iBAAiB,MAAM;AACrE,sBAAM,0BAA0B;AAChC,sBAAM,iBAAiB,MAAA;AACvB,qBAAK,aAAa,oBAAoB,OAAO,aAAa,qBAAqB;AAAA,cAChF;AACA;AAAA,YACD,KAAK,eAAe;AACnB,kBAAI,MAAM,0BAA0B,KAAK,MAAM,wBAAwB,MAAM;AAC5E,sBAAM,0BAA0B;AAChC,sBAAM,wBAAwB,MAAA;AAC9B,qBAAK,aAAa,oBAAoB,OAAO,aAAa,qBAAqB;AAAA,cAChF;AACA;AAAA,YACD;AAAA,YACA;AACC,0BAAY,KAAK;AAAA,UAAA;AAAA,QAEpB;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AAAA,EAOQ,mBAAmB;AAG1B,WAAO,KAAK,UAAU,YAAY,SAAS,IACxC,SACA,GAAG,uCAAA,CAAwC,IAAIF,cAAY,sBAAA,CAAuB;AAAA,EACtF;AACD;AAZC,cAhZY,cAgZG,yBAAyB,uBAAM;AAC7C,MAAI,OAAO;AACX,SAAO,MAAM;AACd,IAAG;AAnZG,IAAM,cAAN;"}
|
|
1
|
+
{"version":3,"file":"DataBinding.js","sources":["../../../../../packages/binding-legacy/src/core/DataBinding.ts"],"sourcesContent":["import { ContentClient, ContentQueryBuilder, GraphQlClient, GraphQlClientError } from '@contember/client'\nimport type {\n\tDataBindingEventListenerMap,\n\tDataBindingTransactionResult,\n\tEntityId,\n\tEnvironment,\n\tMarkerTreeRoot,\n\tTreeRootId,\n} from '@contember/binding-common'\nimport {\n\tassertNever,\n\tAsyncBatchUpdatesOptions,\n\tBatchUpdatesOptions,\n\tBindingOperations,\n\tErrorPersistResult,\n\tEventListenersStore,\n\tExtendTreeOptions,\n\tMarkerMerger,\n\tPersistOptions,\n\tPersistSuccessOptions,\n\tReceivedDataTree,\n\tSuccessfulPersistResult,\n\tTreeRootAccessor,\n} from '@contember/binding-common'\nimport { generateEnumerabilityPreventingEntropy } from '../utils/index.js'\nimport { AccessorErrorManager } from './AccessorErrorManager.js'\nimport { Config } from './Config.js'\nimport { DirtinessTracker } from './DirtinessTracker.js'\nimport { EventManager } from './EventManager.js'\nimport { createBatchUpdatesOptions } from './factories/index.js'\nimport { MutationGenerator, SubMutationOperation } from './MutationGenerator.js'\nimport { QueryGenerator } from './QueryGenerator.js'\nimport { StateIterator } from './state/index.js'\nimport { StateInitializer } from './StateInitializer.js'\nimport { TreeAugmenter } from './TreeAugmenter.js'\nimport { TreeStore } from './TreeStore.js'\nimport type { UpdateMetadata } from './UpdateMetadata.js'\nimport { getCombinedSignal } from './utils/index.js'\nimport { createQueryBuilder } from '@contember/binding-common'\nimport { DataBindingExtendAborted } from '@contember/binding-common'\n\nexport class DataBinding<Node> {\n\tprivate readonly accessorErrorManager: AccessorErrorManager\n\tprivate readonly batchUpdatesOptions: BatchUpdatesOptions\n\tprivate readonly asyncBatchUpdatesOptions: AsyncBatchUpdatesOptions\n\tprivate readonly bindingOperations: BindingOperations<Node>\n\tprivate readonly config: Config\n\tprivate readonly dirtinessTracker: DirtinessTracker\n\tprivate readonly eventManager: EventManager\n\tprivate readonly stateInitializer: StateInitializer\n\tprivate readonly treeAugmenter: TreeAugmenter\n\tprivate readonly queryBuilder: ContentQueryBuilder\n\tprivate readonly contentClient: ContentClient\n\tprivate readonly eventListenerStore = new EventListenersStore<DataBindingEventListenerMap>()\n\n\t// private treeRootListeners: {\n\t// \teventListeners: {}\n\t// } = {\n\t// \teventListeners: {},\n\t// }\n\n\tpublic constructor(\n\t\tprivate readonly contentApiClient: GraphQlClient,\n\t\tprivate readonly systemApiClient: GraphQlClient,\n\t\tprivate readonly tenantApiClient: GraphQlClient,\n\t\tprivate readonly treeStore: TreeStore,\n\t\tprivate readonly environment: Environment,\n\t\tprivate readonly createMarkerTree: (node: Node, environment: Environment) => MarkerTreeRoot,\n\t\tprivate readonly batchedUpdates: (callback: () => any) => void,\n\t\tprivate readonly onUpdate: (newData: TreeRootAccessor<Node>, binding: DataBinding<Node>) => void,\n\t\tprivate readonly onError: (error: GraphQlClientError, binding: DataBinding<Node>) => void,\n\t\tprivate readonly onPersistSuccess: (result: SuccessfulPersistResult, binding: DataBinding<Node>) => void,\n\t\tprivate readonly options: {\n\t\t\tskipStateUpdateAfterPersist: boolean\n\t\t},\n\t) {\n\t\tthis.config = new Config()\n\t\tthis.batchUpdatesOptions = createBatchUpdatesOptions(environment, this.treeStore)\n\t\tthis.asyncBatchUpdatesOptions = {\n\t\t\t...this.batchUpdatesOptions,\n\t\t\tcontentClient: contentApiClient,\n\t\t\tsystemClient: systemApiClient,\n\t\t\ttenantClient: tenantApiClient,\n\t\t}\n\t\tthis.dirtinessTracker = new DirtinessTracker()\n\t\tthis.eventManager = new EventManager(\n\t\t\tthis.asyncBatchUpdatesOptions,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.config,\n\t\t\tthis.dirtinessTracker,\n\t\t\tthis.resolvedOnUpdate,\n\t\t\tthis.treeStore,\n\t\t\tthis.batchedUpdates,\n\t\t)\n\t\tthis.accessorErrorManager = new AccessorErrorManager(this.eventManager, this.treeStore)\n\t\tthis.stateInitializer = new StateInitializer(\n\t\t\tthis.accessorErrorManager,\n\t\t\tthis.batchUpdatesOptions,\n\t\t\tthis.eventManager,\n\t\t\tthis.treeStore,\n\t\t)\n\t\tthis.treeAugmenter = new TreeAugmenter(this.eventManager, this.stateInitializer, this.treeStore, options.skipStateUpdateAfterPersist)\n\n\t\t// TODO move this elsewhere\n\t\tthis.bindingOperations = Object.freeze<BindingOperations<Node>>({\n\t\t\t...this.asyncBatchUpdatesOptions,\n\t\t\taddEventListener: (type, listener) => this.eventListenerStore.add({ type }, listener),\n\t\t\tbatchDeferredUpdates: performUpdates => {\n\t\t\t\tthis.eventManager.syncTransaction(() => performUpdates(this.bindingOperations))\n\t\t\t},\n\t\t\textendTree: async (...args) => await this.extendTree(...args),\n\t\t\tpersist: async options => await this.persist(options),\n\t\t\tfetchData: async (...args) => await this.fetchData(...args),\n\t\t})\n\t\tthis.queryBuilder = createQueryBuilder(this.environment.getSchema())\n\t\tthis.contentClient = new ContentClient(contentApiClient)\n\t}\n\n\tprivate async persist({ onPersistError, onPersistSuccess, signal, silentErrors }: PersistOptions = {}) {\n\t\treturn await this.eventManager.persistOperation(async () => {\n\t\t\t// TODO if the tree is in an inconsistent state, wait for lock releases\n\n\t\t\tthis.eventManager.syncTransaction(() => {\n\t\t\t\tthis.accessorErrorManager.clearErrors()\n\t\t\t})\n\t\t\tawait this.eventManager.triggerOnBeforePersist()\n\n\t\t\tawait this.checkErrorsBeforePersist(onPersistError, silentErrors)\n\n\t\t\tconst mutationResult = MutationGenerator.getPersistMutation(this.treeStore, this.queryBuilder)\n\n\t\t\tif (mutationResult.operations.length === 0) {\n\t\t\t\treturn await this.processEmptyPersistMutation(onPersistSuccess)\n\t\t\t}\n\n\t\t\tconst { mutations, operations } = mutationResult\n\n\t\t\tlet response: DataBindingTransactionResult\n\t\t\ttry {\n\t\t\t\tresponse = await this.contentClient.mutate(\n\t\t\t\t\tthis.queryBuilder.transaction(mutations, {\n\t\t\t\t\t\tdeferForeignKeyConstraints: true,\n\t\t\t\t\t}),\n\t\t\t\t\t{\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\tonBeforeRequest: ({ query, variables }) => {\n\t\t\t\t\t\t\tconsole.debug(query, variables)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\t\tthis.onError(e, this)\n\t\t\t\t\tthrow await this.persistFail({\n\t\t\t\t\t\terrors: [e],\n\t\t\t\t\t\ttype: 'invalidResponse',\n\t\t\t\t\t}, silentErrors)\n\t\t\t\t} else {\n\t\t\t\t\tthrow e\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (response.ok && Object.values(response.data).every(it => it.ok)) {\n\t\t\t\treturn await this.processSuccessfulPersistResult(response, operations, onPersistSuccess)\n\t\t\t} else {\n\t\t\t\tif (response.errorMessage) {\n\t\t\t\t\tconsole.debug(response.errorMessage)\n\t\t\t\t}\n\n\t\t\t\tthis.eventManager.syncTransaction(() => this.accessorErrorManager.replaceErrors(response, operations))\n\n\t\t\t\tawait this.eventManager.triggerOnPersistError(this.bindingOperations)\n\t\t\t\tawait onPersistError?.(this.bindingOperations)\n\t\t\t\tthrow await this.persistFail({\n\t\t\t\t\terrors: this.accessorErrorManager.getErrors(),\n\t\t\t\t\ttype: 'invalidInput',\n\t\t\t\t\tresponse,\n\t\t\t\t}, silentErrors)\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate async checkErrorsBeforePersist(onPersistError: PersistOptions['onPersistError'], silentErrors?: boolean) {\n\t\tif (this.accessorErrorManager.hasErrors()) {\n\t\t\tawait this.eventManager.triggerOnPersistError(this.bindingOperations)\n\t\t\tawait onPersistError?.(this.bindingOperations)\n\t\t\tthrow await this.persistFail({\n\t\t\t\terrors: this.accessorErrorManager.getErrors(),\n\t\t\t\ttype: 'invalidInput',\n\t\t\t}, silentErrors)\n\t\t}\n\t}\n\n\tprivate async processEmptyPersistMutation(onPersistSuccess: PersistOptions['onPersistSuccess']): Promise<SuccessfulPersistResult> {\n\t\tthis.dirtinessTracker.reset() // TODO This ideally shouldn't be necessary but given the current limitations, this makes for better UX.\n\t\tconst persistSuccessOptions: PersistSuccessOptions = {\n\t\t\t...this.bindingOperations,\n\t\t\tsuccessType: 'nothingToPersist',\n\t\t}\n\t\tawait this.eventManager.triggerOnPersistSuccess(persistSuccessOptions)\n\t\tawait onPersistSuccess?.(persistSuccessOptions)\n\t\tconst result: SuccessfulPersistResult = { type: 'nothingToPersist' }\n\t\tawait this.eventListenerStore.invoke({ type: 'persistSuccess' }, result)\n\t\treturn result\n\t}\n\n\tprivate async processSuccessfulPersistResult(\n\t\tmutationData: DataBindingTransactionResult,\n\t\toperations: SubMutationOperation[],\n\t\tonPersistSuccess: PersistOptions['onPersistSuccess'],\n\t) {\n\t\tconst persistedEntityIds = Object.values(mutationData.data).map(it => it.node?.id).filter((id): id is EntityId => id !== undefined)\n\t\tconst result: SuccessfulPersistResult = {\n\t\t\ttype: 'justSuccess',\n\t\t\tpersistedEntityIds,\n\t\t}\n\n\t\ttry {\n\t\t\tawait this.eventManager.asyncTransaction(async () => {\n\t\t\t\tthis.resetTreeAfterSuccessfulPersist()\n\t\t\t\tthis.treeAugmenter.updatePersistedData(\n\t\t\t\t\tObject.fromEntries(\n\t\t\t\t\t\tObject.entries(mutationData.data).map(([placeholderName, subTreeResponse]) => [\n\t\t\t\t\t\t\tplaceholderName,\n\t\t\t\t\t\t\tsubTreeResponse.node,\n\t\t\t\t\t\t]),\n\t\t\t\t\t),\n\t\t\t\t\toperations,\n\t\t\t\t)\n\t\t\t\tconst persistSuccessOptions: PersistSuccessOptions = {\n\t\t\t\t\t...this.bindingOperations,\n\t\t\t\t\tsuccessType: result.type,\n\t\t\t\t}\n\t\t\t\tawait this.eventManager.triggerOnPersistSuccess(persistSuccessOptions)\n\t\t\t\tawait onPersistSuccess?.(persistSuccessOptions)\n\t\t\t\tawait this.eventListenerStore.invoke({ type: 'persistSuccess' }, result)\n\n\t\t\t\tthis.treeAugmenter.resetCreatingSubTrees()\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\tconst resultWithError = {\n\t\t\t\t...result,\n\t\t\t\tafterPersistError: e,\n\t\t\t}\n\t\t\tthis.onPersistSuccess(resultWithError, this)\n\t\t\treturn resultWithError\n\t\t}\n\t\tthis.onPersistSuccess(result, this)\n\t\treturn result\n\t}\n\n\tprivate async persistFail(error: ErrorPersistResult, silentErrors?: boolean): Promise<ErrorPersistResult> {\n\t\tif (!silentErrors) {\n\t\t\tawait this.eventListenerStore.invoke({ type: 'persistError' }, error)\n\t\t}\n\t\treturn error\n\t}\n\n\tprivate resolvedOnUpdate = ({ isMutating }: UpdateMetadata) => {\n\t\tthis.onUpdate(new TreeRootAccessor<Node>(this.dirtinessTracker.hasChanges(), isMutating, this.bindingOperations), this)\n\t}\n\n\t// This is currently useless but potentially future-compatible\n\t// private readonly addTreeRootEventListener: TreeRootAccessor.AddTreeRootEventListener = this.getAddEventListener(\n\t// \tthis.treeRootListeners,\n\t// )\n\n\tprivate pendingExtensions: Set<{\n\t\tmarkerTreeRoot: MarkerTreeRoot\n\t\tnewFragment: Node\n\t\tnewTreeRootId: TreeRootId | undefined\n\t\toptions: ExtendTreeOptions\n\t\tonError?: (error: Error) => void\n\t}> = new Set()\n\n\tprivate flushResult: Promise<boolean> | undefined\n\n\tpublic async extendTree(newFragment: Node, options: ExtendTreeOptions = {}): Promise<TreeRootId | undefined> {\n\t\tif (options.signal?.aborted) {\n\t\t\treturn Promise.reject(DataBindingExtendAborted)\n\t\t}\n\t\tconst markerTreeRoot = this.createMarkerTree(newFragment, options.environment ?? this.environment)\n\n\t\tif (!options.force && this.treeStore.effectivelyHasTreeRoot(markerTreeRoot)) {\n\t\t\t// This isn't perfectly accurate as theoretically, we could already have all the data necessary but this\n\t\t\t// could still be false.\n\n\t\t\treturn this.eventManager.syncOperation(() => {\n\t\t\t\tconst newTreeRootId = this.getNewTreeRootId()\n\t\t\t\tthis.treeAugmenter.extendTreeStates(newTreeRootId, markerTreeRoot)\n\t\t\t\treturn newTreeRootId\n\t\t\t})\n\t\t}\n\n\t\treturn await new Promise(async (resolve, reject) => {\n\t\t\tconst treeRootId = this.getNewTreeRootId()\n\t\t\tthis.pendingExtensions.add({\n\t\t\t\tmarkerTreeRoot,\n\t\t\t\tnewFragment,\n\t\t\t\tnewTreeRootId: treeRootId,\n\t\t\t\toptions,\n\t\t\t\tonError: options.onError,\n\t\t\t})\n\t\t\tthis.flushResult ??= (async () => {\n\t\t\t\tawait Promise.resolve()\n\t\t\t\tthis.flushResult = undefined\n\t\t\t\treturn await this.flushBatchedTreeExtensions()\n\t\t\t})()\n\n\t\t\tif (!(await this.flushResult) || options.signal?.aborted) {\n\t\t\t\treturn reject(DataBindingExtendAborted)\n\t\t\t}\n\n\t\t\tresolve(treeRootId)\n\t\t})\n\t}\n\n\tpublic async fetchData(fragment: Node, options?: { signal?: AbortSignal; environment?: Environment }): Promise<{\n\t\tdata: ReceivedDataTree\n\t\tmarkerTreeRoot: MarkerTreeRoot\n\t}> {\n\t\tconst markerTreeRoot = this.createMarkerTree(fragment, options?.environment ?? this.environment)\n\t\tconst data = await this.fetchPersistedData(markerTreeRoot, options?.signal)\n\n\t\treturn {\n\t\t\tdata: data,\n\t\t\tmarkerTreeRoot,\n\t\t}\n\t}\n\n\tprivate async flushBatchedTreeExtensions(): Promise<boolean> {\n\t\t// This is an async operation so we just take whatever pendingExtensions there are now and let any new ones\n\t\t// accumulate in an empty set.\n\t\tconst pendingExtensions = Array.from(this.pendingExtensions).filter(extension => {\n\t\t\treturn !extension.options.signal?.aborted\n\t\t})\n\t\tthis.pendingExtensions.clear()\n\n\t\tconst aggregateMarkerTreeRoot = pendingExtensions.reduce<MarkerTreeRoot | undefined>(\n\t\t\t(previousValue, currentValue) => {\n\t\t\t\tif (previousValue === undefined) {\n\t\t\t\t\treturn currentValue.markerTreeRoot\n\t\t\t\t}\n\t\t\t\treturn MarkerMerger.mergeMarkerTreeRoots(previousValue, currentValue.markerTreeRoot)\n\t\t\t},\n\t\t\tundefined,\n\t\t)\n\n\t\tif (aggregateMarkerTreeRoot === undefined) {\n\t\t\treturn false\n\t\t}\n\n\t\tconst aggregateSignal = getCombinedSignal(pendingExtensions.map(extension => extension.options.signal))\n\n\t\tlet aggregatePersistedData: ReceivedDataTree\n\t\ttry {\n\t\t\taggregatePersistedData = await this.fetchPersistedData(aggregateMarkerTreeRoot, aggregateSignal)\n\t\t} catch (e) {\n\t\t\tif (e instanceof GraphQlClientError) {\n\t\t\t\tif (e.type === 'aborted') {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tfor (const extension of pendingExtensions) {\n\t\t\t\t\textension.onError?.(e)\n\t\t\t\t}\n\t\t\t\tif (!pendingExtensions.every(it => !!it.onError)) {\n\t\t\t\t\tthis.onError(e, this)\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t} else {\n\t\t\t\tthrow e\n\t\t\t}\n\t\t}\n\n\t\tif (aggregateSignal?.aborted) {\n\t\t\treturn false\n\t\t}\n\n\t\tthis.eventManager.syncOperation(() => {\n\t\t\tthis.treeAugmenter.extendPersistedData(aggregatePersistedData, aggregateMarkerTreeRoot)\n\n\t\t\tfor (const extension of pendingExtensions) {\n\t\t\t\tthis.treeAugmenter.extendTreeStates(extension.newTreeRootId, extension.markerTreeRoot)\n\t\t\t}\n\t\t})\n\t\treturn true\n\t}\n\n\tprivate async fetchPersistedData(\n\t\ttree: MarkerTreeRoot,\n\t\tsignal?: AbortSignal,\n\t): Promise<ReceivedDataTree> {\n\t\tconst queryGenerator = new QueryGenerator(tree, this.queryBuilder)\n\t\tconst query = queryGenerator.getReadQuery()\n\n\t\treturn await this.contentClient.query(query, {\n\t\t\tsignal,\n\t\t\tonBeforeRequest: ({ query, variables }) => {\n\t\t\t\tconsole.debug(query, variables)\n\t\t\t},\n\t\t})\n\t}\n\n\tprivate resetTreeAfterSuccessfulPersist() {\n\t\tthis.eventManager.syncTransaction(() => {\n\t\t\tthis.accessorErrorManager.clearErrors()\n\t\t\tthis.dirtinessTracker.reset()\n\n\t\t\tfor (const [, rootState] of StateIterator.eachRootState(this.treeStore)) {\n\t\t\t\tfor (const state of StateIterator.depthFirstAllNodes(rootState)) {\n\t\t\t\t\tswitch (state.type) {\n\t\t\t\t\t\tcase 'field': {\n\t\t\t\t\t\t\tif (state.hasUnpersistedChanges || state.touchLog?.size) {\n\t\t\t\t\t\t\t\tstate.touchLog?.clear()\n\t\t\t\t\t\t\t\tstate.hasUnpersistedChanges = false\n\t\t\t\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'entityList':\n\t\t\t\t\t\t\tif (state.unpersistedChangesCount > 0 || state.plannedRemovals?.size) {\n\t\t\t\t\t\t\t\tstate.unpersistedChangesCount = 0\n\t\t\t\t\t\t\t\tstate.plannedRemovals?.clear()\n\t\t\t\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\t\t\tif (state.unpersistedChangesCount > 0 || state.plannedHasOneDeletions?.size) {\n\t\t\t\t\t\t\t\tstate.unpersistedChangesCount = 0\n\t\t\t\t\t\t\t\tstate.plannedHasOneDeletions?.clear()\n\t\t\t\t\t\t\t\tthis.eventManager.registerJustUpdated(state, EventManager.NO_CHANGES_DIFFERENCE)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tassertNever(state)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate static getNextTreeRootIdSeed = (() => {\n\t\tlet seed = 1\n\t\treturn () => seed++\n\t})()\n\n\tprivate getNewTreeRootId() {\n\t\t// TODO this is an awful, awful hack.\n\t\t// TODO the particular shape of the alias is relied on in MutationAlias. If you change this, change it there too.\n\t\treturn this.treeStore.markerTrees.size === 0\n\t\t\t? undefined\n\t\t\t: `${generateEnumerabilityPreventingEntropy()}-${DataBinding.getNextTreeRootIdSeed()}`\n\t}\n}\n"],"names":["_DataBinding","options","query"],"mappings":";;;;;;;;;;;;;;;;;AAyCO,MAAM,eAAN,MAAMA,cAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBvB,YACW,kBACA,iBACA,iBACA,WACA,aACA,kBACA,gBACA,UACA,SACA,kBACA,SAGhB;AAbgB,SAAA,mBAAA;AACA,SAAA,kBAAA;AACA,SAAA,kBAAA;AACA,SAAA,YAAA;AACA,SAAA,cAAA;AACA,SAAA,mBAAA;AACA,SAAA,iBAAA;AACA,SAAA,WAAA;AACA,SAAA,UAAA;AACA,SAAA,mBAAA;AACA,SAAA,UAAA;AA9BlB,kBAAA,MAAiB,sBAAA;AACjB,kBAAA,MAAiB,qBAAA;AACjB,kBAAA,MAAiB,0BAAA;AACjB,kBAAA,MAAiB,mBAAA;AACjB,kBAAA,MAAiB,QAAA;AACjB,kBAAA,MAAiB,kBAAA;AACjB,kBAAA,MAAiB,cAAA;AACjB,kBAAA,MAAiB,kBAAA;AACjB,kBAAA,MAAiB,eAAA;AACjB,kBAAA,MAAiB,cAAA;AACjB,kBAAA,MAAiB,eAAA;AACjB,kBAAA,MAAiB,sBAAqB,IAAI,oBAAA,CAAiD;AA8M3F,kBAAA,MAAQ,oBAAmB,CAAC,EAAE,WAAA,MAAiC;AAC9D,WAAK,SAAS,IAAI,iBAAuB,KAAK,iBAAiB,WAAA,GAAc,YAAY,KAAK,iBAAiB,GAAG,IAAI;AAAA,IACvH,CAAA;AAOA,kBAAA,MAAQ,yCAMC,IAAA,CAAI;AAEb,kBAAA,MAAQ,aAAA;AAxMP,SAAK,SAAS,IAAI,OAAA;AAClB,SAAK,sBAAsB,0BAA0B,aAAa,KAAK,SAAS;AAChF,SAAK,2BAA2B;AAAA,MAC/B,GAAG,KA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,0BAA0B,KAAK,MAAM,iBAAiB,MAAM;AACrE,sBAAM,0BAA0B;AAChC,sBAAM,iBAAiB,MAAA;AACvB,qBAAK,aAAa,oBAAoB,OAAO,aAAa,qBAAqB;AAAA,cAChF;AACA;AAAA,YACD,KAAK,eAAe;AACnB,kBAAI,MAAM,0BAA0B,KAAK,MAAM,wBAAwB,MAAM;AAC5E,sBAAM,0BAA0B;AAChC,sBAAM,wBAAwB,MAAA;AAC9B,qBAAK,aAAa,oBAAoB,OAAO,aAAa,qBAAqB;AAAA,cAChF;AACA;AAAA,YACD;AAAA,YACA;AACC,0BAAY,KAAK;AAAA,UAAA;AAAA,QAEpB;AAAA,MACD;AAAA,IACD,CAAC;AAAA,EACF;AAAA,EAOQ,mBAAmB;AAG1B,WAAO,KAAK,UAAU,YAAY,SAAS,IACxC,SACA,GAAG,uCAAA,CAAwC,IAAIF,cAAY,sBAAA,CAAuB;AAAA,EACtF;AACD;AAZC,cAlZY,cAkZG,yBAAyB,uBAAM;AAC7C,MAAI,OAAO;AACX,SAAO,MAAM;AACd,IAAG;AArZG,IAAM,cAAN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorsPreprocessor.cjs","sources":["../../../../../packages/binding-legacy/src/core/ErrorsPreprocessor.ts"],"sourcesContent":["import type { EntityId, ErrorAccessor, FieldName, PlaceholderName } from '@contember/binding-common'\nimport { DataBindingTransactionResult } from '@contember/binding-common'\nimport { assertNever } from '@contember/binding-common'\nimport { MutationAlias } from './requestAliases/index.js'\nimport { SubMutationOperation } from './MutationGenerator.js'\nimport { MutationError, MutationResult, ValidationError } from '@contember/client'\n\nclass ErrorsPreprocessor {\n\tpublic constructor(\n\t\tprivate readonly requestResponse: DataBindingTransactionResult,\n\t\tprivate readonly operations: SubMutationOperation[],\n\t) {}\n\n\tpublic preprocess(): ErrorsPreprocessor.ErrorTreeRoot {\n\t\tconst treeRoot: ErrorsPreprocessor.ErrorTreeRoot = new Map()\n\n\t\tif (this.requestResponse === undefined) {\n\t\t\treturn treeRoot\n\t\t}\n\n\t\tfor (const operation of this.operations) {\n\t\t\tconst mutationResponse = this.requestResponse.data[operation.alias]\n\t\t\tconst processedResponse = this.processMutationResponse(mutationResponse)\n\n\t\t\tif (processedResponse === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst { subTreeType, subTreePlaceholder, id } = operation\n\n\t\t\tif (subTreeType === 'single') {\n\t\t\t\tif (treeRoot.has(subTreePlaceholder)) {\n\t\t\t\t\treturn this.rejectCorruptData()\n\t\t\t\t}\n\t\t\t\ttreeRoot.set(subTreePlaceholder, processedResponse)\n\t\t\t} else if (subTreeType === 'list') {\n\t\t\t\tconst child = treeRoot.get(subTreePlaceholder)\n\n\t\t\t\tif (child === undefined) {\n\t\t\t\t\ttreeRoot.set(subTreePlaceholder, {\n\t\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\t\tchildren: new Map([[id, processedResponse]]),\n\t\t\t\t\t\tvalidation: [],\n\t\t\t\t\t\texecution: [],\n\t\t\t\t\t})\n\t\t\t\t} else if (child.nodeType === 'iNode') {\n\t\t\t\t\tchild.children.set(id, processedResponse)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn assertNever(subTreeType)\n\t\t\t}\n\t\t}\n\t\treturn treeRoot\n\t}\n\n\tprivate processMutationResponse(mutationResponse: MutationResult): ErrorsPreprocessor.ErrorNode | undefined {\n\t\tif (mutationResponse.ok && mutationResponse.validation?.valid && mutationResponse.errors.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (mutationResponse.validation?.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.validation?.errors)\n\t\t}\n\t\tif (mutationResponse.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.errors)\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate getErrorNode(errors: ValidationError[] | MutationError[]): ErrorsPreprocessor.ErrorNode {\n\t\tconst [head, ...tail] = errors\n\n\t\tlet rootNode = this.getRootNode(head)\n\n\t\terrorLoop: for (const error of tail) {\n\t\t\tlet currentNode = rootNode\n\n\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\n\t\t\tfor (let i = 0, pathLength = path.length; i < pathLength; i++) {\n\t\t\t\tconst pathNode = path[i]\n\n\t\t\t\tif (currentNode.nodeType === 'leaf') {\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).nodeType = 'iNode'\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).children = new Map()\n\t\t\t\t}\n\n\t\t\t\tif ('field' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tlet alias = pathNode.field\n\t\t\t\t\t\tlet nextIndex = i + 1\n\t\t\t\t\t\tif (nextIndex in path) {\n\t\t\t\t\t\t\tconst nextPathNode = path[nextIndex]\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'index' in nextPathNode\n\t\t\t\t\t\t\t\t&& typeof nextPathNode.alias === 'string'\n\t\t\t\t\t\t\t\t&& nextPathNode.alias.startsWith(pathNode.field)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// We're dealing with a reduced hasMany relation.\n\t\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\t\tnextIndex++\n\t\t\t\t\t\t\t\talias = nextPathNode.alias\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!currentNode.children.has(alias)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(alias, this.getRootNode(error, nextIndex))\n\t\t\t\t\t\t\tif (nextIndex <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(alias)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t} else if ('index' in path) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\t\t\tif (alias === null) {\n\t\t\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst entityId = MutationAlias.decodeEntityId(alias)\n\n\t\t\t\t\t\tif (!currentNode.children.has(entityId)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(entityId, this.getRootNode(error, i + 1))\n\t\t\t\t\t\t\tif (i + 1 <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(entityId)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.isExecutionError(error)) {\n\t\t\t\tcurrentNode.execution.push({ type: 'execution', code: error.type, developerMessage: error.message })\n\t\t\t} else {\n\t\t\t\tcurrentNode.validation.push(this.createValidationError(error.message.text))\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate getRootNode(error: ValidationError | MutationError, startIndex: number = 0): ErrorsPreprocessor.ErrorNode {\n\t\tlet rootNode: ErrorsPreprocessor.ErrorNode = {\n\t\t\tvalidation: this.isExecutionError(error) ? [] : [this.createValidationError(error.message.text)],\n\t\t\texecution: this.isExecutionError(error) ? [{ type: 'execution', code: error.type, developerMessage: error.message }] : [],\n\t\t\tnodeType: 'leaf',\n\t\t}\n\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\tfor (let i = path.length - 1; i >= startIndex; i--) {\n\t\t\tconst pathNode = path[i]\n\t\t\tif ('field' in pathNode) {\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[pathNode.field, rootNode]]),\n\t\t\t\t}\n\t\t\t} else if ('index' in pathNode) {\n\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\tif (alias === null) {\n\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[MutationAlias.decodeEntityId(alias), rootNode]]),\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tassertNever(pathNode)\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate createValidationError(message: string): ErrorAccessor.ValidationError {\n\t\tif (message === 'Field is required') {\n\t\t\t// TODO this is just awful. Validation errors currently don't have error codes which makes it more difficult\n\t\t\t// \tto translate the error messages. This is the most common such error, and so we just make up a code\n\t\t\t// \tin order to facilitate error handling further downstream.\n\t\t\treturn {\n\t\t\t\ttype: 'validation',\n\t\t\t\tcode: 'fieldRequired',\n\t\t\t\tmessage,\n\t\t\t}\n\t\t}\n\t\treturn { type: 'validation', message, code: undefined }\n\t}\n\n\tprivate isExecutionError(error: ValidationError | MutationError): error is MutationError {\n\t\treturn 'type' in error\n\t}\n\n\tprivate rejectCorruptData(): never {\n\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t'Received corrupted data: a node cannot be simultaneously field-indexed and path-indexed.',\n\t\t)\n\t}\n}\n\nnamespace ErrorsPreprocessor {\n\texport interface BaseErrorNode {\n\t\tvalidation: ErrorAccessor.ValidationError[]\n\t\texecution: ErrorAccessor.ExecutionError[]\n\t}\n\n\texport interface LeafErrorNode extends BaseErrorNode {\n\t\tnodeType: 'leaf'\n\t}\n\n\texport interface ErrorINode extends BaseErrorNode {\n\t\tnodeType: 'iNode'\n\t\tchildren: Map<FieldName | EntityId, ErrorNode>\n\t}\n\n\texport type ErrorNode = ErrorINode | LeafErrorNode\n\n\texport type ErrorTreeRoot = Map<PlaceholderName, ErrorNode>\n\n\texport class ErrorsPreprocessorError extends Error {}\n}\n\nexport { ErrorsPreprocessor }\n"],"names":["assertNever","MutationAlias","ErrorsPreprocessor"],"mappings":";;;;AAOA,MAAM,mBAAmB;AAAA,EACjB,YACW,iBACA,YAChB;AAFgB,SAAA,kBAAA;AACA,SAAA,aAAA;AAAA,EACf;AAAA,EAEI,aAA+C;AACrD,UAAM,+BAAiD,IAAA;AAEvD,QAAI,KAAK,oBAAoB,QAAW;AACvC,aAAO;AAAA,IACR;AAEA,eAAW,aAAa,KAAK,YAAY;AACxC,YAAM,mBAAmB,KAAK,gBAAgB,KAAK,UAAU,KAAK;AAClE,YAAM,oBAAoB,KAAK,wBAAwB,gBAAgB;AAEvE,UAAI,sBAAsB,QAAW;AACpC;AAAA,MACD;AACA,YAAM,EAAE,aAAa,oBAAoB,GAAA,IAAO;AAEhD,UAAI,gBAAgB,UAAU;AAC7B,YAAI,SAAS,IAAI,kBAAkB,GAAG;AACrC,iBAAO,KAAK,kBAAA;AAAA,QACb;AACA,iBAAS,IAAI,oBAAoB,iBAAiB;AAAA,MACnD,WAAW,gBAAgB,QAAQ;AAClC,cAAM,QAAQ,SAAS,IAAI,kBAAkB;AAE7C,YAAI,UAAU,QAAW;AACxB,mBAAS,IAAI,oBAAoB;AAAA,YAChC,UAAU;AAAA,YACV,8BAAc,IAAI,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC;AAAA,YAC3C,YAAY,CAAA;AAAA,YACZ,WAAW,CAAA;AAAA,UAAC,CACZ;AAAA,QACF,WAAW,MAAM,aAAa,SAAS;AACtC,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CAEA,CAAUE,wBAAV;AAAA,EAmBQ,MAAM,gCAAgC,MAAM;AAAA,EAAA;AAA5CA,sBAAM,0BAAA;AAAA,GAnBJ,uBAAA,qBAAA,CAAA,EAAA;;"}
|
|
1
|
+
{"version":3,"file":"ErrorsPreprocessor.cjs","sources":["../../../../../packages/binding-legacy/src/core/ErrorsPreprocessor.ts"],"sourcesContent":["import type { EntityId, ErrorAccessor, FieldName, PlaceholderName } from '@contember/binding-common'\nimport { DataBindingTransactionResult } from '@contember/binding-common'\nimport { assertNever } from '@contember/binding-common'\nimport { MutationAlias } from './requestAliases/index.js'\nimport { SubMutationOperation } from './MutationGenerator.js'\nimport { MutationError, MutationResult, ValidationError } from '@contember/client'\n\nclass ErrorsPreprocessor {\n\tpublic constructor(\n\t\tprivate readonly requestResponse: DataBindingTransactionResult,\n\t\tprivate readonly operations: SubMutationOperation[],\n\t) {}\n\n\tpublic preprocess(): ErrorsPreprocessor.ErrorTreeRoot {\n\t\tconst treeRoot: ErrorsPreprocessor.ErrorTreeRoot = new Map()\n\n\t\tif (this.requestResponse === undefined) {\n\t\t\treturn treeRoot\n\t\t}\n\n\t\tfor (const operation of this.operations) {\n\t\t\tconst mutationResponse = this.requestResponse.data[operation.alias]\n\t\t\tconst processedResponse = this.processMutationResponse(mutationResponse)\n\n\t\t\tif (processedResponse === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst { subTreeType, subTreePlaceholder, id } = operation\n\n\t\t\tif (subTreeType === 'single') {\n\t\t\t\tif (treeRoot.has(subTreePlaceholder)) {\n\t\t\t\t\treturn this.rejectCorruptData()\n\t\t\t\t}\n\t\t\t\ttreeRoot.set(subTreePlaceholder, processedResponse)\n\t\t\t} else if (subTreeType === 'list') {\n\t\t\t\tconst child = treeRoot.get(subTreePlaceholder)\n\n\t\t\t\tif (child === undefined) {\n\t\t\t\t\ttreeRoot.set(subTreePlaceholder, {\n\t\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\t\tchildren: new Map([[id, processedResponse]]),\n\t\t\t\t\t\tvalidation: [],\n\t\t\t\t\t\texecution: [],\n\t\t\t\t\t})\n\t\t\t\t} else if (child.nodeType === 'iNode') {\n\t\t\t\t\tchild.children.set(id, processedResponse)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn assertNever(subTreeType)\n\t\t\t}\n\t\t}\n\t\treturn treeRoot\n\t}\n\n\tprivate processMutationResponse(mutationResponse: MutationResult): ErrorsPreprocessor.ErrorNode | undefined {\n\t\tif (mutationResponse.ok && mutationResponse.validation?.valid && mutationResponse.errors.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (mutationResponse.validation?.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.validation?.errors)\n\t\t}\n\t\tif (mutationResponse.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.errors)\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate getErrorNode(errors: ValidationError[] | MutationError[]): ErrorsPreprocessor.ErrorNode {\n\t\tconst [head, ...tail] = errors\n\n\t\tlet rootNode = this.getRootNode(head)\n\n\t\terrorLoop: for (const error of tail) {\n\t\t\tlet currentNode = rootNode\n\n\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\n\t\t\tfor (let i = 0, pathLength = path.length; i < pathLength; i++) {\n\t\t\t\tconst pathNode = path[i]\n\n\t\t\t\tif (currentNode.nodeType === 'leaf') {\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).nodeType = 'iNode'\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).children = new Map()\n\t\t\t\t}\n\n\t\t\t\tif ('field' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tlet alias = pathNode.field\n\t\t\t\t\t\tlet nextIndex = i + 1\n\t\t\t\t\t\tif (nextIndex in path) {\n\t\t\t\t\t\t\tconst nextPathNode = path[nextIndex]\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'index' in nextPathNode\n\t\t\t\t\t\t\t\t&& typeof nextPathNode.alias === 'string'\n\t\t\t\t\t\t\t\t&& nextPathNode.alias.startsWith(pathNode.field)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// We're dealing with a reduced hasMany relation.\n\t\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\t\tnextIndex++\n\t\t\t\t\t\t\t\talias = nextPathNode.alias\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!currentNode.children.has(alias)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(alias, this.getRootNode(error, nextIndex))\n\t\t\t\t\t\t\tif (nextIndex <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(alias)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t} else if ('index' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\t\t\tif (alias === null) {\n\t\t\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst entityId = MutationAlias.decodeEntityId(alias)\n\n\t\t\t\t\t\tif (!currentNode.children.has(entityId)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(entityId, this.getRootNode(error, i + 1))\n\t\t\t\t\t\t\tif (i + 1 <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(entityId)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.isExecutionError(error)) {\n\t\t\t\tcurrentNode.execution.push({ type: 'execution', code: error.type, developerMessage: error.message })\n\t\t\t} else {\n\t\t\t\tcurrentNode.validation.push(this.createValidationError(error.message.text))\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate getRootNode(error: ValidationError | MutationError, startIndex: number = 0): ErrorsPreprocessor.ErrorNode {\n\t\tlet rootNode: ErrorsPreprocessor.ErrorNode = {\n\t\t\tvalidation: this.isExecutionError(error) ? [] : [this.createValidationError(error.message.text)],\n\t\t\texecution: this.isExecutionError(error) ? [{ type: 'execution', code: error.type, developerMessage: error.message }] : [],\n\t\t\tnodeType: 'leaf',\n\t\t}\n\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\tfor (let i = path.length - 1; i >= startIndex; i--) {\n\t\t\tconst pathNode = path[i]\n\t\t\tif ('field' in pathNode) {\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[pathNode.field, rootNode]]),\n\t\t\t\t}\n\t\t\t} else if ('index' in pathNode) {\n\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\tif (alias === null) {\n\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[MutationAlias.decodeEntityId(alias), rootNode]]),\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tassertNever(pathNode)\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate createValidationError(message: string): ErrorAccessor.ValidationError {\n\t\tif (message === 'Field is required') {\n\t\t\t// TODO this is just awful. Validation errors currently don't have error codes which makes it more difficult\n\t\t\t// \tto translate the error messages. This is the most common such error, and so we just make up a code\n\t\t\t// \tin order to facilitate error handling further downstream.\n\t\t\treturn {\n\t\t\t\ttype: 'validation',\n\t\t\t\tcode: 'fieldRequired',\n\t\t\t\tmessage,\n\t\t\t}\n\t\t}\n\t\treturn { type: 'validation', message, code: undefined }\n\t}\n\n\tprivate isExecutionError(error: ValidationError | MutationError): error is MutationError {\n\t\treturn 'type' in error\n\t}\n\n\tprivate rejectCorruptData(): never {\n\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t'Received corrupted data: a node cannot be simultaneously field-indexed and path-indexed.',\n\t\t)\n\t}\n}\n\nnamespace ErrorsPreprocessor {\n\texport interface BaseErrorNode {\n\t\tvalidation: ErrorAccessor.ValidationError[]\n\t\texecution: ErrorAccessor.ExecutionError[]\n\t}\n\n\texport interface LeafErrorNode extends BaseErrorNode {\n\t\tnodeType: 'leaf'\n\t}\n\n\texport interface ErrorINode extends BaseErrorNode {\n\t\tnodeType: 'iNode'\n\t\tchildren: Map<FieldName | EntityId, ErrorNode>\n\t}\n\n\texport type ErrorNode = ErrorINode | LeafErrorNode\n\n\texport type ErrorTreeRoot = Map<PlaceholderName, ErrorNode>\n\n\texport class ErrorsPreprocessorError extends Error {}\n}\n\nexport { ErrorsPreprocessor }\n"],"names":["assertNever","MutationAlias","ErrorsPreprocessor"],"mappings":";;;;AAOA,MAAM,mBAAmB;AAAA,EACjB,YACW,iBACA,YAChB;AAFgB,SAAA,kBAAA;AACA,SAAA,aAAA;AAAA,EACf;AAAA,EAEI,aAA+C;AACrD,UAAM,+BAAiD,IAAA;AAEvD,QAAI,KAAK,oBAAoB,QAAW;AACvC,aAAO;AAAA,IACR;AAEA,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,SAAS,KAAK;AAAA,UAAA;AAAA,QAErE;AAEA,mBAAW;AAAA,UACV,YAAY,CAAA;AAAA,UACZ,WAAW,CAAA;AAAA,UACX,UAAU;AAAA,UACV,UAAU,oBAAI,IAAI,CAAC,CAACA,cAAAA,cAAc,eAAe,KAAK,GAAG,QAAQ,CAAC,CAAC;AAAA,QAAA;AAAA,MAErE,OAAO;AACND,sBAAAA,YAAY,QAAQ;AAAA,MACrB;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AAAA,EAEQ,sBAAsB,SAAgD;AAC7E,QAAI,YAAY,qBAAqB;AAIpC,aAAO;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN;AAAA,MAAA;AAAA,IAEF;AACA,WAAO,EAAE,MAAM,cAAc,SAAS,MAAM,OAAA;AAAA,EAC7C;AAAA,EAEQ,iBAAiB,OAAgE;AACxF,WAAO,UAAU;AAAA,EAClB;AAAA,EAEQ,oBAA2B;AAClC,UAAM,IAAI,mBAAmB;AAAA,MAC5B;AAAA,IAAA;AAAA,EAEF;AACD;AAAA,CAEA,CAAUE,wBAAV;AAAA,EAmBQ,MAAM,gCAAgC,MAAM;AAAA,EAAA;AAA5CA,sBAAM,0BAAA;AAAA,GAnBJ,uBAAA,qBAAA,CAAA,EAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorsPreprocessor.js","sources":["../../../../../packages/binding-legacy/src/core/ErrorsPreprocessor.ts"],"sourcesContent":["import type { EntityId, ErrorAccessor, FieldName, PlaceholderName } from '@contember/binding-common'\nimport { DataBindingTransactionResult } from '@contember/binding-common'\nimport { assertNever } from '@contember/binding-common'\nimport { MutationAlias } from './requestAliases/index.js'\nimport { SubMutationOperation } from './MutationGenerator.js'\nimport { MutationError, MutationResult, ValidationError } from '@contember/client'\n\nclass ErrorsPreprocessor {\n\tpublic constructor(\n\t\tprivate readonly requestResponse: DataBindingTransactionResult,\n\t\tprivate readonly operations: SubMutationOperation[],\n\t) {}\n\n\tpublic preprocess(): ErrorsPreprocessor.ErrorTreeRoot {\n\t\tconst treeRoot: ErrorsPreprocessor.ErrorTreeRoot = new Map()\n\n\t\tif (this.requestResponse === undefined) {\n\t\t\treturn treeRoot\n\t\t}\n\n\t\tfor (const operation of this.operations) {\n\t\t\tconst mutationResponse = this.requestResponse.data[operation.alias]\n\t\t\tconst processedResponse = this.processMutationResponse(mutationResponse)\n\n\t\t\tif (processedResponse === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst { subTreeType, subTreePlaceholder, id } = operation\n\n\t\t\tif (subTreeType === 'single') {\n\t\t\t\tif (treeRoot.has(subTreePlaceholder)) {\n\t\t\t\t\treturn this.rejectCorruptData()\n\t\t\t\t}\n\t\t\t\ttreeRoot.set(subTreePlaceholder, processedResponse)\n\t\t\t} else if (subTreeType === 'list') {\n\t\t\t\tconst child = treeRoot.get(subTreePlaceholder)\n\n\t\t\t\tif (child === undefined) {\n\t\t\t\t\ttreeRoot.set(subTreePlaceholder, {\n\t\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\t\tchildren: new Map([[id, processedResponse]]),\n\t\t\t\t\t\tvalidation: [],\n\t\t\t\t\t\texecution: [],\n\t\t\t\t\t})\n\t\t\t\t} else if (child.nodeType === 'iNode') {\n\t\t\t\t\tchild.children.set(id, processedResponse)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn assertNever(subTreeType)\n\t\t\t}\n\t\t}\n\t\treturn treeRoot\n\t}\n\n\tprivate processMutationResponse(mutationResponse: MutationResult): ErrorsPreprocessor.ErrorNode | undefined {\n\t\tif (mutationResponse.ok && mutationResponse.validation?.valid && mutationResponse.errors.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (mutationResponse.validation?.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.validation?.errors)\n\t\t}\n\t\tif (mutationResponse.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.errors)\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate getErrorNode(errors: ValidationError[] | MutationError[]): ErrorsPreprocessor.ErrorNode {\n\t\tconst [head, ...tail] = errors\n\n\t\tlet rootNode = this.getRootNode(head)\n\n\t\terrorLoop: for (const error of tail) {\n\t\t\tlet currentNode = rootNode\n\n\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\n\t\t\tfor (let i = 0, pathLength = path.length; i < pathLength; i++) {\n\t\t\t\tconst pathNode = path[i]\n\n\t\t\t\tif (currentNode.nodeType === 'leaf') {\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).nodeType = 'iNode'\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).children = new Map()\n\t\t\t\t}\n\n\t\t\t\tif ('field' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tlet alias = pathNode.field\n\t\t\t\t\t\tlet nextIndex = i + 1\n\t\t\t\t\t\tif (nextIndex in path) {\n\t\t\t\t\t\t\tconst nextPathNode = path[nextIndex]\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'index' in nextPathNode\n\t\t\t\t\t\t\t\t&& typeof nextPathNode.alias === 'string'\n\t\t\t\t\t\t\t\t&& nextPathNode.alias.startsWith(pathNode.field)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// We're dealing with a reduced hasMany relation.\n\t\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\t\tnextIndex++\n\t\t\t\t\t\t\t\talias = nextPathNode.alias\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!currentNode.children.has(alias)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(alias, this.getRootNode(error, nextIndex))\n\t\t\t\t\t\t\tif (nextIndex <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(alias)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t} else if ('index' in path) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\t\t\tif (alias === null) {\n\t\t\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst entityId = MutationAlias.decodeEntityId(alias)\n\n\t\t\t\t\t\tif (!currentNode.children.has(entityId)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(entityId, this.getRootNode(error, i + 1))\n\t\t\t\t\t\t\tif (i + 1 <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(entityId)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.isExecutionError(error)) {\n\t\t\t\tcurrentNode.execution.push({ type: 'execution', code: error.type, developerMessage: error.message })\n\t\t\t} else {\n\t\t\t\tcurrentNode.validation.push(this.createValidationError(error.message.text))\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate getRootNode(error: ValidationError | MutationError, startIndex: number = 0): ErrorsPreprocessor.ErrorNode {\n\t\tlet rootNode: ErrorsPreprocessor.ErrorNode = {\n\t\t\tvalidation: this.isExecutionError(error) ? [] : [this.createValidationError(error.message.text)],\n\t\t\texecution: this.isExecutionError(error) ? [{ type: 'execution', code: error.type, developerMessage: error.message }] : [],\n\t\t\tnodeType: 'leaf',\n\t\t}\n\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\tfor (let i = path.length - 1; i >= startIndex; i--) {\n\t\t\tconst pathNode = path[i]\n\t\t\tif ('field' in pathNode) {\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[pathNode.field, rootNode]]),\n\t\t\t\t}\n\t\t\t} else if ('index' in pathNode) {\n\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\tif (alias === null) {\n\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[MutationAlias.decodeEntityId(alias), rootNode]]),\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tassertNever(pathNode)\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate createValidationError(message: string): ErrorAccessor.ValidationError {\n\t\tif (message === 'Field is required') {\n\t\t\t// TODO this is just awful. Validation errors currently don't have error codes which makes it more difficult\n\t\t\t// \tto translate the error messages. This is the most common such error, and so we just make up a code\n\t\t\t// \tin order to facilitate error handling further downstream.\n\t\t\treturn {\n\t\t\t\ttype: 'validation',\n\t\t\t\tcode: 'fieldRequired',\n\t\t\t\tmessage,\n\t\t\t}\n\t\t}\n\t\treturn { type: 'validation', message, code: undefined }\n\t}\n\n\tprivate isExecutionError(error: ValidationError | MutationError): error is MutationError {\n\t\treturn 'type' in error\n\t}\n\n\tprivate rejectCorruptData(): never {\n\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t'Received corrupted data: a node cannot be simultaneously field-indexed and path-indexed.',\n\t\t)\n\t}\n}\n\nnamespace ErrorsPreprocessor {\n\texport interface BaseErrorNode {\n\t\tvalidation: ErrorAccessor.ValidationError[]\n\t\texecution: ErrorAccessor.ExecutionError[]\n\t}\n\n\texport interface LeafErrorNode extends BaseErrorNode {\n\t\tnodeType: 'leaf'\n\t}\n\n\texport interface ErrorINode extends BaseErrorNode {\n\t\tnodeType: 'iNode'\n\t\tchildren: Map<FieldName | EntityId, ErrorNode>\n\t}\n\n\texport type ErrorNode = ErrorINode | LeafErrorNode\n\n\texport type ErrorTreeRoot = Map<PlaceholderName, ErrorNode>\n\n\texport class ErrorsPreprocessorError extends Error {}\n}\n\nexport { ErrorsPreprocessor }\n"],"names":["ErrorsPreprocessor"],"mappings":";;AAOA,MAAM,mBAAmB;AAAA,EACjB,YACW,iBACA,YAChB;AAFgB,SAAA,kBAAA;AACA,SAAA,aAAA;AAAA,EACf;AAAA,EAEI,aAA+C;AACrD,UAAM,+BAAiD,IAAA;AAEvD,QAAI,KAAK,oBAAoB,QAAW;AACvC,aAAO;AAAA,IACR;AAEA,eAAW,aAAa,KAAK,YAAY;AACxC,YAAM,mBAAmB,KAAK,gBAAgB,KAAK,UAAU,KAAK;AAClE,YAAM,oBAAoB,KAAK,wBAAwB,gBAAgB;AAEvE,UAAI,sBAAsB,QAAW;AACpC;AAAA,MACD;AACA,YAAM,EAAE,aAAa,oBAAoB,GAAA,IAAO;AAEhD,UAAI,gBAAgB,UAAU;AAC7B,YAAI,SAAS,IAAI,kBAAkB,GAAG;AACrC,iBAAO,KAAK,kBAAA;AAAA,QACb;AACA,iBAAS,IAAI,oBAAoB,iBAAiB;AAAA,MACnD,WAAW,gBAAgB,QAAQ;AAClC,cAAM,QAAQ,SAAS,IAAI,kBAAkB;AAE7C,YAAI,UAAU,QAAW;AACxB,mBAAS,IAAI,oBAAoB;AAAA,YAChC,UAAU;AAAA,YACV,8BAAc,IAAI,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC;AAAA,YAC3C,YA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AAI,mBAAmB;AAAA,MAC5B;AAAA,IAAA;AAAA,EAEF;AACD;AAAA,CAEA,CAAUA,wBAAV;AAAA,EAmBQ,MAAM,gCAAgC,MAAM;AAAA,EAAA;AAA5CA,sBAAM,0BAAA;AAAA,GAnBJ,uBAAA,qBAAA,CAAA,EAAA;"}
|
|
1
|
+
{"version":3,"file":"ErrorsPreprocessor.js","sources":["../../../../../packages/binding-legacy/src/core/ErrorsPreprocessor.ts"],"sourcesContent":["import type { EntityId, ErrorAccessor, FieldName, PlaceholderName } from '@contember/binding-common'\nimport { DataBindingTransactionResult } from '@contember/binding-common'\nimport { assertNever } from '@contember/binding-common'\nimport { MutationAlias } from './requestAliases/index.js'\nimport { SubMutationOperation } from './MutationGenerator.js'\nimport { MutationError, MutationResult, ValidationError } from '@contember/client'\n\nclass ErrorsPreprocessor {\n\tpublic constructor(\n\t\tprivate readonly requestResponse: DataBindingTransactionResult,\n\t\tprivate readonly operations: SubMutationOperation[],\n\t) {}\n\n\tpublic preprocess(): ErrorsPreprocessor.ErrorTreeRoot {\n\t\tconst treeRoot: ErrorsPreprocessor.ErrorTreeRoot = new Map()\n\n\t\tif (this.requestResponse === undefined) {\n\t\t\treturn treeRoot\n\t\t}\n\n\t\tfor (const operation of this.operations) {\n\t\t\tconst mutationResponse = this.requestResponse.data[operation.alias]\n\t\t\tconst processedResponse = this.processMutationResponse(mutationResponse)\n\n\t\t\tif (processedResponse === undefined) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst { subTreeType, subTreePlaceholder, id } = operation\n\n\t\t\tif (subTreeType === 'single') {\n\t\t\t\tif (treeRoot.has(subTreePlaceholder)) {\n\t\t\t\t\treturn this.rejectCorruptData()\n\t\t\t\t}\n\t\t\t\ttreeRoot.set(subTreePlaceholder, processedResponse)\n\t\t\t} else if (subTreeType === 'list') {\n\t\t\t\tconst child = treeRoot.get(subTreePlaceholder)\n\n\t\t\t\tif (child === undefined) {\n\t\t\t\t\ttreeRoot.set(subTreePlaceholder, {\n\t\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\t\tchildren: new Map([[id, processedResponse]]),\n\t\t\t\t\t\tvalidation: [],\n\t\t\t\t\t\texecution: [],\n\t\t\t\t\t})\n\t\t\t\t} else if (child.nodeType === 'iNode') {\n\t\t\t\t\tchild.children.set(id, processedResponse)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn assertNever(subTreeType)\n\t\t\t}\n\t\t}\n\t\treturn treeRoot\n\t}\n\n\tprivate processMutationResponse(mutationResponse: MutationResult): ErrorsPreprocessor.ErrorNode | undefined {\n\t\tif (mutationResponse.ok && mutationResponse.validation?.valid && mutationResponse.errors.length === 0) {\n\t\t\treturn undefined\n\t\t}\n\t\tif (mutationResponse.validation?.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.validation?.errors)\n\t\t}\n\t\tif (mutationResponse.errors.length) {\n\t\t\treturn this.getErrorNode(mutationResponse.errors)\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate getErrorNode(errors: ValidationError[] | MutationError[]): ErrorsPreprocessor.ErrorNode {\n\t\tconst [head, ...tail] = errors\n\n\t\tlet rootNode = this.getRootNode(head)\n\n\t\terrorLoop: for (const error of tail) {\n\t\t\tlet currentNode = rootNode\n\n\t\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\n\t\t\tfor (let i = 0, pathLength = path.length; i < pathLength; i++) {\n\t\t\t\tconst pathNode = path[i]\n\n\t\t\t\tif (currentNode.nodeType === 'leaf') {\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).nodeType = 'iNode'\n\t\t\t\t\t;(currentNode as any as ErrorsPreprocessor.ErrorINode).children = new Map()\n\t\t\t\t}\n\n\t\t\t\tif ('field' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tlet alias = pathNode.field\n\t\t\t\t\t\tlet nextIndex = i + 1\n\t\t\t\t\t\tif (nextIndex in path) {\n\t\t\t\t\t\t\tconst nextPathNode = path[nextIndex]\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'index' in nextPathNode\n\t\t\t\t\t\t\t\t&& typeof nextPathNode.alias === 'string'\n\t\t\t\t\t\t\t\t&& nextPathNode.alias.startsWith(pathNode.field)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// We're dealing with a reduced hasMany relation.\n\t\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\t\tnextIndex++\n\t\t\t\t\t\t\t\talias = nextPathNode.alias\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!currentNode.children.has(alias)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(alias, this.getRootNode(error, nextIndex))\n\t\t\t\t\t\t\tif (nextIndex <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(alias)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t} else if ('index' in pathNode) {\n\t\t\t\t\tif (currentNode.nodeType === 'iNode') {\n\t\t\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\t\t\tif (alias === null) {\n\t\t\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst entityId = MutationAlias.decodeEntityId(alias)\n\n\t\t\t\t\t\tif (!currentNode.children.has(entityId)) {\n\t\t\t\t\t\t\tcurrentNode.children.set(entityId, this.getRootNode(error, i + 1))\n\t\t\t\t\t\t\tif (i + 1 <= path.length) {\n\t\t\t\t\t\t\t\t// This path has been handled by getRootNode\n\t\t\t\t\t\t\t\tcontinue errorLoop\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentNode = currentNode.children.get(entityId)!\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rejectCorruptData()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.isExecutionError(error)) {\n\t\t\t\tcurrentNode.execution.push({ type: 'execution', code: error.type, developerMessage: error.message })\n\t\t\t} else {\n\t\t\t\tcurrentNode.validation.push(this.createValidationError(error.message.text))\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate getRootNode(error: ValidationError | MutationError, startIndex: number = 0): ErrorsPreprocessor.ErrorNode {\n\t\tlet rootNode: ErrorsPreprocessor.ErrorNode = {\n\t\t\tvalidation: this.isExecutionError(error) ? [] : [this.createValidationError(error.message.text)],\n\t\t\texecution: this.isExecutionError(error) ? [{ type: 'execution', code: error.type, developerMessage: error.message }] : [],\n\t\t\tnodeType: 'leaf',\n\t\t}\n\t\tconst path = 'paths' in error ? (error.paths[0] ?? []) : error.path\n\t\tfor (let i = path.length - 1; i >= startIndex; i--) {\n\t\t\tconst pathNode = path[i]\n\t\t\tif ('field' in pathNode) {\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[pathNode.field, rootNode]]),\n\t\t\t\t}\n\t\t\t} else if ('index' in pathNode) {\n\t\t\t\tconst alias = pathNode.alias\n\n\t\t\t\tif (alias === null) {\n\t\t\t\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t\t\t\t`Corrupt data: undefined alias for node with index ${pathNode.index}.`,\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trootNode = {\n\t\t\t\t\tvalidation: [],\n\t\t\t\t\texecution: [],\n\t\t\t\t\tnodeType: 'iNode',\n\t\t\t\t\tchildren: new Map([[MutationAlias.decodeEntityId(alias), rootNode]]),\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tassertNever(pathNode)\n\t\t\t}\n\t\t}\n\n\t\treturn rootNode\n\t}\n\n\tprivate createValidationError(message: string): ErrorAccessor.ValidationError {\n\t\tif (message === 'Field is required') {\n\t\t\t// TODO this is just awful. Validation errors currently don't have error codes which makes it more difficult\n\t\t\t// \tto translate the error messages. This is the most common such error, and so we just make up a code\n\t\t\t// \tin order to facilitate error handling further downstream.\n\t\t\treturn {\n\t\t\t\ttype: 'validation',\n\t\t\t\tcode: 'fieldRequired',\n\t\t\t\tmessage,\n\t\t\t}\n\t\t}\n\t\treturn { type: 'validation', message, code: undefined }\n\t}\n\n\tprivate isExecutionError(error: ValidationError | MutationError): error is MutationError {\n\t\treturn 'type' in error\n\t}\n\n\tprivate rejectCorruptData(): never {\n\t\tthrow new ErrorsPreprocessor.ErrorsPreprocessorError(\n\t\t\t'Received corrupted data: a node cannot be simultaneously field-indexed and path-indexed.',\n\t\t)\n\t}\n}\n\nnamespace ErrorsPreprocessor {\n\texport interface BaseErrorNode {\n\t\tvalidation: ErrorAccessor.ValidationError[]\n\t\texecution: ErrorAccessor.ExecutionError[]\n\t}\n\n\texport interface LeafErrorNode extends BaseErrorNode {\n\t\tnodeType: 'leaf'\n\t}\n\n\texport interface ErrorINode extends BaseErrorNode {\n\t\tnodeType: 'iNode'\n\t\tchildren: Map<FieldName | EntityId, ErrorNode>\n\t}\n\n\texport type ErrorNode = ErrorINode | LeafErrorNode\n\n\texport type ErrorTreeRoot = Map<PlaceholderName, ErrorNode>\n\n\texport class ErrorsPreprocessorError extends Error {}\n}\n\nexport { ErrorsPreprocessor }\n"],"names":["ErrorsPreprocessor"],"mappings":";;AAOA,MAAM,mBAAmB;AAAA,EACjB,YACW,iBACA,YAChB;AAFgB,SAAA,kBAAA;AACA,SAAA,aAAA;AAAA,EACf;AAAA,EAEI,aAA+C;AACrD,UAAM,+BAAiD,IAAA;AAEvD,QAAI,KAAK,oB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GAAG,CAAC,cAAc,EAAE,yBAAyB,CAAC,CAAA;AAGrF,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,eAAe,EAAE,QAAQ,GAAG,uBAAuB,CAAC,CAAA;AAEvF,qBAAa,uBAAuB;aAElB,gBAAgB,EAAE,gBAAgB;aAClC,wBAAwB,EAAE,wBAAwB;IAFnE,YACiB,gBAAgB,EAAE,gBAAgB,EAClC,wBAAwB,EAAE,wBAAwB,EAC/D;CACJ"}
|
|
@@ -15,7 +15,7 @@ export declare class EntityAccessorImpl implements EntityAccessor {
|
|
|
15
15
|
readonly errors: ErrorAccessor | undefined;
|
|
16
16
|
readonly environment: Environment;
|
|
17
17
|
readonly getAccessor: EntityAccessor.GetEntityAccessor;
|
|
18
|
-
readonly __type:
|
|
18
|
+
readonly __type: 'EntityAccessor';
|
|
19
19
|
constructor(state: EntityRealmState, operations: EntityOperations, runtimeId: RuntimeId, key: EntityRealmKey, // ⚠️ This is *NOT* the id! ⚠️
|
|
20
20
|
name: EntityName, fieldData: EntityAccessor.FieldData, dataFromServer: SingleEntityPersistedData | undefined, hasUnpersistedChanges: boolean, errors: ErrorAccessor | undefined, environment: Environment, getAccessor: EntityAccessor.GetEntityAccessor);
|
|
21
21
|
get idOnServer(): EntityId | undefined;
|
|
@@ -47,7 +47,7 @@ export declare class EntityAccessorImpl implements EntityAccessor {
|
|
|
47
47
|
private createHintMessage;
|
|
48
48
|
private getMarkersOfType;
|
|
49
49
|
getParent(): EntityAccessor | EntityListAccessor | undefined;
|
|
50
|
-
getMarker():
|
|
50
|
+
getMarker(): import("@contember/binding-common").EntityListSubTreeMarker | import("@contember/binding-common").EntitySubTreeMarker | HasManyRelationMarker | HasOneRelationMarker;
|
|
51
51
|
getFieldMeta(field: string): {
|
|
52
52
|
readable: boolean | undefined;
|
|
53
53
|
updatable: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityAccessorImpl.d.ts","sourceRoot":"","sources":["../../../src/accessors/EntityAccessorImpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,wBAAwB,CAAA;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EAEN,kBAAkB,EAClB,aAAa,EACb,UAAU,EAEV,qBAAqB,EAErB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAEN,cAAc,EACd,QAAQ,EACR,UAAU,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,oBAAoB,EAIpB,SAAS,EACT,2BAA2B,EAE3B,MAAM,2BAA2B,CAAA;AAElC,qBAAa,kBAAmB,YAAW,cAAc;IAIvD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,QAAQ,CAAC,GAAG,EAAE,cAAc;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,QAAQ,CAAC,qBAAqB,EAAE,OAAO;IACvC,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS;IAC1C,QAAQ,CAAC,WAAW,EAAE,WAAW;IACjC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC,iBAAiB;IAbvD,SAAgB,MAAM,EAAG,gBAAgB,CAAS;
|
|
1
|
+
{"version":3,"file":"EntityAccessorImpl.d.ts","sourceRoot":"","sources":["../../../src/accessors/EntityAccessorImpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,wBAAwB,CAAA;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE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C;IAYxC,OAAO,CAAC,2BAA2B;IAanC,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,gBAAgB;IASxB,SAAS,IAAI,cAAc,GAAG,kBAAkB,GAAG,SAAS,CAM3D;IAED,SAAS,yKAER;IAED,YAAY,CAAC,KAAK,EAAE,MAAM;QAGxB,QAAQ;QACR,SAAS;MAEV;CACD"}
|
|
@@ -12,7 +12,7 @@ export declare class EntityListAccessorImpl implements EntityListAccessor {
|
|
|
12
12
|
readonly errors: ErrorAccessor | undefined;
|
|
13
13
|
readonly environment: Environment;
|
|
14
14
|
readonly getAccessor: EntityListAccessor.GetEntityListAccessor;
|
|
15
|
-
readonly __type:
|
|
15
|
+
readonly __type: 'EntityListAccessor';
|
|
16
16
|
constructor(state: EntityListState, operations: ListOperations, name: EntityName, _children: ReadonlyMap<EntityId, {
|
|
17
17
|
getAccessor: EntityAccessor.GetEntityAccessor;
|
|
18
18
|
}>, _idsPersistedOnServer: ReadonlySet<EntityId>, hasUnpersistedChanges: boolean, errors: ErrorAccessor | undefined, environment: Environment, getAccessor: EntityListAccessor.GetEntityListAccessor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityListAccessorImpl.d.ts","sourceRoot":"","sources":["../../../src/accessors/EntityListAccessorImpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EACN,cAAc,EACd,QAAQ,EACR,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,qBAAa,sBAAuB,YAAW,kBAAkB;IAI/D,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC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,CAAC,cAGrD;IAEM,YAAY,CAAC,cAAc,EAAE,kBAAkB,CAAC,mBAAmB,GAAG,IAAI,CAEhF;IAEM,aAAa,CAAC,eAAe,EAAE,cAAc,GAAG,IAAI,CAE1D;IAEM,eAAe,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,mBAAmB,GAAG,SAAS,CAEjF;IAEM,gBAAgB,CAAC,WAAW,EAAE,cAAc,EAAE,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,IAAI,CAEhG;IAEM,kBAAkB,CAAC,EAAE,EAAE,QAAQ,GAAG,cAAc,CAEtD;IAEM,SAAS,IAAI,cAAc,GAAG,SAAS,CAE7C;IAEM,SAAS,IAAI,uBAAuB,GAAG,qBAAqB,CAElE;CACD"}
|
|
@@ -14,7 +14,7 @@ export declare class FieldAccessorImpl<Value extends FieldValue = FieldValue> im
|
|
|
14
14
|
private readonly touchLog;
|
|
15
15
|
readonly getAccessor: FieldAccessor.GetFieldAccessor<Value>;
|
|
16
16
|
readonly schema: SchemaColumn;
|
|
17
|
-
readonly __type:
|
|
17
|
+
readonly __type: 'FieldAccessor';
|
|
18
18
|
constructor(state: FieldState<Value>, operations: FieldOperations, fieldName: FieldName, value: Value | null, valueOnServer: Value | null, defaultValue: Value | undefined, errors: ErrorAccessor | undefined, hasUnpersistedChanges: boolean, touchLog: ReadonlySet<string> | undefined, getAccessor: FieldAccessor.GetFieldAccessor<Value>, schema: SchemaColumn);
|
|
19
19
|
addError(error: ErrorAccessor.Error | string): () => void;
|
|
20
20
|
clearErrors(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldAccessorImpl.d.ts","sourceRoot":"","sources":["../../../src/accessors/FieldAccessorImpl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,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,GAAG,IAAI,CAEtF;IAEM,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,WAE/C;IAED,IAAW,SAAS,YAEnB;IAID,IAAW,UAAU,IAAI,mBAAmB,CAE3C;IAED,IAAW,MAAM,IAAI,eAAe,CAEnC;IAEM,SAAS,IAAI,cAAc,CAEjC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessorErrorManager.d.ts","sourceRoot":"","sources":["../../../src/core/AccessorErrorManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAsD,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAChG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAGxE,qBAAa,oBAAoB;IASb,OAAO,CAAC,QAAQ,CAAC,YAAY;IAAgB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAR1F,OAAO,CAAC,aAAa,CAAsD;IAE3E,OAAO,CAAC,aAAa,CAIjB;
|
|
1
|
+
{"version":3,"file":"AccessorErrorManager.d.ts","sourceRoot":"","sources":["../../../src/core/AccessorErrorManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAsD,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAChG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAGxE,qBAAa,oBAAoB;IASb,OAAO,CAAC,QAAQ,CAAC,YAAY;IAAgB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAR1F,OAAO,CAAC,aAAa,CAAsD;IAE3E,OAAO,CAAC,aAAa,CAIjB;IAEJ,YAAoC,YAAY,EAAE,YAAY,EAAmB,SAAS,EAAE,SAAS,EAAI;IAElG,SAAS,YAEf;IAEM,SAAS,IAAI,aAAa,CAAC,KAAK,EAAE,CAExC;IAEM,WAAW,SAQjB;IAEM,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAShD;IAEM,aAAa,CAAC,IAAI,EAAE,4BAA4B,EAAE,UAAU,EAAE,oBAAoB,EAAE,QAW1F;IAEM,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,GAAG,MAAM,IAAI,CA4BxE;IAED,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,kBAAkB;IAsB1B,OAAO,CAAC,oBAAoB;IAqD5B,OAAO,CAAC,wBAAwB;IA0BhC,OAAO,CAAC,aAAa;CAgCrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/core/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE1D,qBAAa,MAAM;IAClB,OAAO,CAAC,MAAM,CAAC,aAAa,CAI3B;IAED,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../../src/core/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE1D,qBAAa,MAAM;IAClB,OAAO,CAAC,MAAM,CAAC,aAAa,CAI3B;IAED,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC,YAA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F,OAAO,EAAE;QACzB,2BAA2B,EAAE,OAAO,CAAA;KACpC,EA0CD;YAEa,OAAO;YAgEP,wBAAwB;YAWxB,2BAA2B;YAa3B,8BAA8B;YA8C9B,WAAW;IAOzB,OAAO,CAAC,gBAAgB,CAEvB;IAOD,OAAO,CAAC,iBAAiB,CAMX;IAEd,OAAO,CAAC,WAAW,CAA8B;IAEpC,UAAU,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAsC3G;IAEY,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,WAAW,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC;QAC9G,IAAI,EAAE,gBAAgB,CAAA;QACtB,cAAc,EAAE,cAAc,CAAA;KAC9B,CAAC,CAQD;YAEa,0BAA0B;YA0D1B,kBAAkB;IAehC,OAAO,CAAC,+BAA+B;IAuCvC,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAGhC;IAEJ,OAAO,CAAC,gBAAgB;CAOxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DirtinessTracker.d.ts","sourceRoot":"","sources":["../../../src/core/DirtinessTracker.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IAC5B,OAAO,CAAC,YAAY,CAAI;IACxB,OAAO,CAAC,YAAY,CAAI;IAEjB,kBAAkB;
|
|
1
|
+
{"version":3,"file":"DirtinessTracker.d.ts","sourceRoot":"","sources":["../../../src/core/DirtinessTracker.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IAC5B,OAAO,CAAC,YAAY,CAAI;IACxB,OAAO,CAAC,YAAY,CAAI;IAEjB,kBAAkB,WAExB;IAEM,UAAU,YAEhB;IAEM,KAAK,SAEX;IAEM,UAAU,CAAC,KAAK,EAAE,MAAM,QAG9B;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorsPreprocessor.d.ts","sourceRoot":"","sources":["../../../src/core/ErrorsPreprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACpG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D,cAAM,kBAAkB;IAEtB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"ErrorsPreprocessor.d.ts","sourceRoot":"","sources":["../../../src/core/ErrorsPreprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACpG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D,cAAM,kBAAkB;IAEtB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAF5B,YACkB,eAAe,EAAE,4BAA4B,EAC7C,UAAU,EAAE,oBAAoB,EAAE,EAChD;IAEG,UAAU,IAAI,kBAAkB,CAAC,aAAa,CAuCpD;IAED,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,YAAY;IAmFpB,OAAO,CAAC,WAAW;IAuCnB,OAAO,CAAC,qBAAqB;IAc7B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,iBAAiB;CAKzB;AAED,kBAAU,kBAAkB,CAAC;IAC5B,UAAiB,aAAa;QAC7B,UAAU,EAAE,aAAa,CAAC,eAAe,EAAE,CAAA;QAC3C,SAAS,EAAE,aAAa,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ACZ,OAAO,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"QueryGenerator.d.ts","sourceRoot":"","sources":["../../../src/core/QueryGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,kBAAkB,EAOlB,cAAc,EAEd,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE7F,qBAAa,cAAc;IAEzB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,EAAE;IAFX,YACS,IAAI,EAAE,cAAc,EACpB,EAAE,EAAE,mBAAmB,EAC5B;IAEG,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAavD;IAED,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,eAAe;IAgBvB,OAAc,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,sBAAsB,GAAG,sBAAsB,CAsDrH;IAED,OAAO,CAAC,MAAM,CAAC,aAAa;CAM5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealmKeyGenerator.d.ts","sourceRoot":"","sources":["../../../src/core/RealmKeyGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8D,cAAc,EAAmB,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAElJ,OAAO,KAAK,EAAmB,oBAAoB,EAAoB,MAAM,kBAAkB,CAAA;AAM/F,qBAAa,iBAAiB;IAG7B,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAwD;IACzF,OAAO,CAAC,MAAM,CAAC,aAAa,CAAiD;
|
|
1
|
+
{"version":3,"file":"RealmKeyGenerator.d.ts","sourceRoot":"","sources":["../../../src/core/RealmKeyGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8D,cAAc,EAAmB,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAElJ,OAAO,KAAK,EAAmB,oBAAoB,EAAoB,MAAM,kBAAkB,CAAA;AAM/F,qBAAa,iBAAiB;IAG7B,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAwD;IACzF,OAAO,CAAC,MAAM,CAAC,aAAa,CAAiD;IAE7E,OAAc,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAG/D;IAED,OAAO,CAAC,MAAM,CAAC,WAAW;IAc1B,OAAc,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,oBAAoB,GAAG,cAAc,CAmBxF;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestResponseNormalizer.d.ts","sourceRoot":"","sources":["../../../src/core/RequestResponseNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgC,MAAM,2BAA2B,CAAA;AAI1F,OAAO,EAON,cAAc,EACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,EAAE,uBAAuB,EAAuD,MAAM,0BAA0B,CAAA;AAEvH,qBAAa,yBAAyB;
|
|
1
|
+
{"version":3,"file":"RequestResponseNormalizer.d.ts","sourceRoot":"","sources":["../../../src/core/RequestResponseNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAgC,MAAM,2BAA2B,CAAA;AAI1F,OAAO,EAON,cAAc,EACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,EAAE,uBAAuB,EAAuD,MAAM,0BAA0B,CAAA;AAEvH,qBAAa,yBAAyB;IACrC,OAAc,oBAAoB,CACjC,QAAQ,EAAE,uBAAuB,EACjC,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,cAAc,GACxB,IAAI,CA6BN;IAED,OAAc,uBAAuB,CACpC,QAAQ,EAAE,uBAAuB,EACjC,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,oBAAoB,EAAE,GAChC,IAAI,CAyDN;IAED,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAkDhC,OAAO,CAAC,MAAM,CAAC,SAAS;CASxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateInitializer.d.ts","sourceRoot":"","sources":["../../../src/core/StateInitializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAiB,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EAAE,SAAS,EAAsC,MAAM,2BAA2B,CAAA;AAEzF,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAA4D,MAAM,2BAA2B,CAAA;AAElJ,OAAO,KAAK,EACX,wBAAwB,EAGxB,UAAU,EAIV,MAAM,2BAA2B,CAAA;AAGlC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,OAAO,EAGN,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EAGX,aAAa,EACb,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAI/C,qBAAa,gBAAgB;IAQ3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAR3B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IACjD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;
|
|
1
|
+
{"version":3,"file":"StateInitializer.d.ts","sourceRoot":"","sources":["../../../src/core/StateInitializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAiB,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EAAE,SAAS,EAAsC,MAAM,2BAA2B,CAAA;AAEzF,OA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AC,yBAAyB;IAuDjC,OAAO,CAAC,oBAAoB;IAgD5B,OAAO,CAAC,yBAAyB;IAwBjC,OAAO,CAAC,kCAAkC;IA+B1C,OAAO,CAAC,mCAAmC;IAgC3C,OAAO,CAAC,2BAA2B;IAQ5B,8BAA8B,CACpC,KAAK,EAAE,gBAAgB,GAAG,oBAAoB,EAC9C,UAAU,EAAE,cAAc,CAAC,mBAAmB,GAAG,SAAS,QAa1D;IAEM,kCAAkC,CAAC,SAAS,EAAE,oBAAoB,GAAG,wBAAwB,GAAG,SAAS,CAiB/G;IAED,OAAO,CAAC,sCAAsC;IAW9C,OAAO,CAAC,2CAA2C;IAWnD,OAAO,CAAC,iCAAiC;CAGzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeAugmenter.d.ts","sourceRoot":"","sources":["../../../src/core/TreeAugmenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,gBAAgB,EAAiD,MAAM,2BAA2B,CAAA;AAEtJ,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAA6B,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAEtF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D,qBAAa,aAAa;IAExB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,2BAA2B;
|
|
1
|
+
{"version":3,"file":"TreeAugmenter.d.ts","sourceRoot":"","sources":["../../../src/core/TreeAugmenter.ts"],"names":[],"mappings":"AAAA,OA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C5B,MAAM,EAAE,gBAAgB,CAAA;KACxB,GACC,SAAS,CAsCX;IAEM,eAAe,CACrB,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,iBAAiB,EAAE,KAAK,GAAG,4BAA4B,GAAG,yCAAyC,EACnG,WAAW,EAAE,WAAW,GACtB,gBAAgB,CAAA;IACZ,eAAe,CACrB,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,iBAAiB,EAAE,KAAK,GAAG,0BAA0B,GAAG,uCAAuC,EAC/F,WAAW,EAAE,WAAW,GACtB,eAAe,CAAA;IAgEX,yBAAyB,CAAC,KAAK,EAAE,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,CAS9E;IAEM,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,oBAAoB,QA6B9E;IAEM,eAAe,CAAC,MAAM,EAAE,WAAW,QAMzC;IAEM,sBAAsB,CAAC,aAAa,EAAE,cAAc,GAAG,OAAO,CAiBpE;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorLocator.d.ts","sourceRoot":"","sources":["../../../../src/core/exceptions/ErrorLocator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAIjE,qBAAa,YAAY;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAM;
|
|
1
|
+
{"version":3,"file":"ErrorLocator.d.ts","sourceRoot":"","sources":["../../../../src/core/exceptions/ErrorLocator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAIjE,qBAAa,YAAY;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAM;IAElC,OAAc,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAE/D;IAED,OAAc,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CA2C1D;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkerSugarer.d.ts","sourceRoot":"","sources":["../../../../src/core/exceptions/MarkerSugarer.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,2BAA2B,CAAA;AAIlC,qBAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"MarkerSugarer.d.ts","sourceRoot":"","sources":["../../../../src/core/exceptions/MarkerSugarer.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,2BAA2B,CAAA;AAIlC,qBAAa,aAAa;IACzB,OAAc,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAiB1D;IAED,OAAc,gBAAgB,CAAC,KAAK,EAAE,WAAW,UAEhD;IAED,OAAc,yBAAyB,CAAC,MAAM,EAAE,oBAAoB,UAMnE;IAED,OAAc,0BAA0B,CAAC,OAAO,EAAE,qBAAqB,UAEtE;IAED,OAAc,wBAAwB,CAAC,OAAO,EAAE,mBAAmB,UAKlE;IAED,OAAc,4BAA4B,CAAC,OAAO,EAAE,uBAAuB,UAK1E;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeParameterSugarer.d.ts","sourceRoot":"","sources":["../../../../src/core/exceptions/TreeParameterSugarer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE3F,qBAAa,oBAAoB;
|
|
1
|
+
{"version":3,"file":"TreeParameterSugarer.d.ts","sourceRoot":"","sources":["../../../../src/core/exceptions/TreeParameterSugarer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE3F,qBAAa,oBAAoB;IAChC,OAAc,UAAU,CAAC,SAAS,EAAE,SAAS,UAE5C;IAED,OAAc,mBAAmB,CAChC,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,MAAM,EAAE,MAAM,GAAG,SAAS,UAG1B;IAED,OAAc,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,UAElF;IAED,OAAc,eAAe,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,GAAG,SAAS,UAEnF;IAED,OAAc,mBAAmB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,UAEnF;IAED,OAAc,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAKrE;IAED,OAAc,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAK5D;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBatchUpdatesOptions.d.ts","sourceRoot":"","sources":["../../../../src/core/factories/createBatchUpdatesOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAsC,MAAM,2BAA2B,CAAA;AAExG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAS5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"createBatchUpdatesOptions.d.ts","sourceRoot":"","sources":["../../../../src/core/factories/createBatchUpdatesOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAsC,MAAM,2BAA2B,CAAA;AAExG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAS5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,eAAO,MAAM,yBAAyB,oBAAqB,WAAW,aAAa,SAAS,KAAG,mBA2B5F,CAAA"}
|
|
@@ -2,6 +2,7 @@ export * from './Config.js';
|
|
|
2
2
|
export * from './DataBinding.js';
|
|
3
3
|
export * from './DirtinessTracker.js';
|
|
4
4
|
export * from './EventManager.js';
|
|
5
|
+
export * from './MutationGenerator.js';
|
|
5
6
|
export * from './QueryGenerator.js';
|
|
6
7
|
export * from './StateInitializer.js';
|
|
7
8
|
export * from './TreeAugmenter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityOperations.d.ts","sourceRoot":"","sources":["../../../../src/core/operations/EntityOperations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAInG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGtD,OAAO,EAAmB,gBAAgB,EAAwD,MAAM,mBAAmB,CAAA;AAC3H,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAKhD,qBAAa,gBAAgB;IAE3B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"EntityOperations.d.ts","sourceRoot":"","sources":["../../../../src/core/operations/EntityOperations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAInG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGtD,OAAO,EAAmB,gBAAgB,EAAwD,MAAM,mBAAmB,CAAA;AAC3H,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAKhD,qBAAa,gBAAg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