@prisma/orm-framework 8.0.0-rc.18-dev.4 → 8.0.0-rc.18-dev.6
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/components.d.mts +2 -2
- package/dist/components.mjs +2 -2
- package/dist/components__runtime.d.mts +2 -2
- package/dist/components__runtime.mjs +2 -2
- package/dist/{runtime-CdqTpkAC.d.mts → runtime-CNRjjEnO.d.mts} +143 -46
- package/dist/runtime-CNRjjEnO.d.mts.map +1 -0
- package/dist/{runtime-DoZkleC9.mjs → runtime-DZVNxupx.mjs} +252 -56
- package/dist/runtime-DZVNxupx.mjs.map +1 -0
- package/package.json +17 -16
- package/dist/runtime-CdqTpkAC.d.mts.map +0 -1
- package/dist/runtime-DoZkleC9.mjs.map +0 -1
package/dist/components.d.mts
CHANGED
|
@@ -18,6 +18,6 @@ import { a as RuntimeDriverDescriptor, c as RuntimeExtensionInstance, d as Runti
|
|
|
18
18
|
import { t as isPlainRecord } from "./is-plain-record-C9BWiqcw.mjs";
|
|
19
19
|
import { S as promoteBuiltinKinds, _ as domainElementCoordinates, a as IRNode, b as freezeNode, c as NamespaceBase, d as Storage, f as StorageType, g as coordinateKey, h as buildSingleNamespaceView, i as EntityKindDescriptor, l as NamespacedEntities, m as buildNamespacedEntities, n as DefaultNamespaceEntries, o as IRNodeBase, p as UNBOUND_NAMESPACE_ID, r as EntityCoordinate, s as Namespace, t as AnyEntityKindDescriptor, u as SingleNamespaceView, v as elementCoordinates, x as hydrateNamespaceEntities, y as entityAt } from "./ir-LV4tXsw3.mjs";
|
|
20
20
|
import "./psl-ast-Dho77tVl.mjs";
|
|
21
|
-
import { $ as
|
|
21
|
+
import { $ as RuntimeStatementStats, A as GeneratorStability, B as QueryPlan, C as ClientActivityRegistry, Ct as defineAnnotation, D as DefineAnnotationOptions, Dt as startClientActivity, E as CrossFamilyMiddleware, Et as runtimeAborted, F as MutationDefaultsOp, G as RuntimeAbortedPhase, H as RelationKeys, I as MutationDefaultsOptions, J as RuntimeExecuteOptions, K as RuntimeCore, L as OperationKind, M as MetaBuilder, N as MutationDefaultGeneratorContributor, O as ExecuteInterceptResult, Ot as startTransactionActivity, P as MutationDefaults, Q as RuntimeMutationDefaultGenerator, R as ParamRefMutator, S as ClientActivityOptions, St as createStateStore, T as ClientActivityRun, Tt as raceAgainstAbort, U as RelationNamesOf, V as RUNTIME_ABORTED, W as ResultType, X as RuntimeLog, Y as RuntimeExecutor, Z as RuntimeMiddleware, _ as AsyncIterableResult, _t as checkAborted, a as ActivityContext, at as StatementActivityRun, b as ClientActivityEnded, bt as createContextBeneath, c as ActivityFinalizedResult, ct as TransactionActivity, d as ActivityParent, dt as TransactionEnded, et as Scalars, f as ActivityStateStore, ft as TransactionSettlement, g as AppliedMutationDefault, gt as assertMutationDefaultGeneratorsAvailable, h as AnnotationValue, ht as assertAnnotationsApplicable, i as ActivityChildSlot, it as StatementActivity, j as LaneMetaBuilder, k as ExecutionPlan, kt as streamStatement, l as ActivityInterceptResult, lt as TransactionActivityOptions, m as AnnotationSource, mt as applyMutationDefaults, n as ActivityBase, nt as ShapeSpec, o as ActivityContextFields, ot as StatementEnded, p as AnnotationHandle, pt as ValidAnnotations, q as RuntimeCoreOptions, r as ActivityChild, rt as StartActivity, s as ActivityEndedResult, st as StatementOptions, t as Activity, tt as Shape, u as ActivityObserver, ut as TransactionActivityRun, v as ClientActivity, vt as checkMiddlewareCompatibility, w as ClientActivityResult, wt as executeStatement, x as ClientActivityKind, xt as createMetaBuilder, y as ClientActivityEnd, yt as collectMutationDefaultGenerators, z as QueryInterceptResult } from "./runtime-CNRjjEnO.mjs";
|
|
22
22
|
import { t as canonicalizeJson } from "./utils-DeWL_zD9.mjs";
|
|
23
|
-
export { APP_SPACE_ID, type ActivityBase, type ActivityChild, type ActivityContext, type ActivityContextFields, type ActivityEndedResult, type ActivityFinalizedResult, type ActivityObserver, type ActivityParent, type ActivityStateStore, type AdapterDescriptor, type AdapterInstance, type AdapterPackRef, type AggregateCodecTraits, type AggregateDescriptor, type AggregateInputMatch, type AggregateOutputCodec, type AggregateOverloadAmbiguity, type AggregateOverloadDuplicate, type AggregateResultNullability, type AnnotationHandle, type AnnotationSource, type AnnotationValue, type AnyCodecDescriptor, type AnyCodecDescriptorTemplate, type AnyEntityKindDescriptor, type AnyInputAggregateDescriptor, type AppliedMigrationStatement, type AppliedMutationDefault, type AssembledAuthoringContributions, AsyncIterableResult, type AuthoringArgRef, type AuthoringArgumentDescriptor, type AuthoringAttributeSpecContributions, type AuthoringColumnDefaultTemplate, type AuthoringContributions, type AuthoringDiagnosticSink, type AuthoringEntityContext, type AuthoringEntityTypeDescriptor, type AuthoringEntityTypeFactoryOutput, type AuthoringEntityTypeNamespace, type AuthoringEntityTypeTemplateOutput, type AuthoringFieldNamespace, type AuthoringFieldPresetDescriptor, type AuthoringFieldPresetOutput, type AuthoringModelAttributeContext, type AuthoringModelAttributeDescriptor, type AuthoringModelAttributeDescriptorNamespace, type AuthoringModelAttributeEntityOutput, type AuthoringModelAttributeIndexOutput, type AuthoringModelAttributeLoweringOutput, type AuthoringOption, type AuthoringPslBlockDescriptor, type AuthoringPslBlockDescriptorNamespace, type AuthoringSelectRef, type AuthoringStorageTypeTemplate, type AuthoringTemplateValue, type AuthoringTypeConstructorCall, type AuthoringTypeConstructorDescriptor, type AuthoringTypeConstructorEntityRef, type AuthoringTypeConstructorOutput, type AuthoringTypeNamespace, type AuthoringWarning, type AuthoringWarningSink, BUILTIN_PSL_KIND_KEYS, type BigIntRange, CONTRACT_CODEC_DESCRIPTOR_MISSING, CONTRACT_SNAPSHOTS_DIRNAME, type CapabilityMatrix, type Cast, type CastRefusal, type Codec, type CodecCallContext, type CodecDescriptor, CodecDescriptorImpl, type CodecDescriptorRef, type CodecDescriptorTemplate, CodecDescriptorTemplateImpl, CodecImpl, type CodecInstanceContext, type CodecLookup, type CodecLookupWithDescriptors, type CodecRef, type CodecRegistry, type CodecTrait, type ColumnHelperFor, type ColumnHelperForStrict, type ColumnSpec, type ColumnTypeDescriptor, type ComponentDescriptor, type ComponentMetadata, type ContractComponentRequirementsCheckInput, type ContractComponentRequirementsCheckResult, type ContractSerializer, type ContractSpace, type ContractSpaceHeadRef, type ContributedPslDiagnosticCode, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverConnectOptions, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlMutationDefaultEntry, type ControlMutationDefaultRegistry, type ControlMutationDefaults, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type CrossFamilyMiddleware, DATA_TYPE_ID_PATTERN, type DataType, type DataTypeAuthoringEntry, type DataTypeId, type DataTypeInvariantInput, type DataTypeLookup, type DataTypeSpec, type DataTypeSupport, type DataTypeWrittenForm, type DecodedEnum, type DefaultFunctionLoweringContext, type DefaultNamespaceEntries, type DefineAnnotationOptions, type DiffSubjectGranularity, type DiffableNode, type DriverDescriptor, type DriverInstance, type DriverPackRef, type DuplicateStoredValue, type EmissionSpi, type EmitContractResult, type EncodedEnumMember, type EntityCoordinate, type EntityKindDescriptor, type EnumBlockDiagnostic, type EnumBlockMember, type EnumBlockSite, type EnumMemberProblem, type ExecuteInterceptResult, type ExecutionPlan, type ExecutionStack, type ExecutionStackInstance, type ExpectationFailureReason, type ExtensionDescriptor, type ExtensionInstance, type ExtensionPackRef, type FailedCast, type FailedConversion, type FailedTypeChange, type FamilyDescriptor, type FamilyInstance, type FamilyPackRef, type FieldCoordinate, type FieldCoordinateJson, type GenerateContractTypesOptions, type GeneratorStability, INT32_RANGE, INT64_RANGE, type IRNode, IRNodeBase, type ImportRequirement, type ImportSpecifierResolver, type IntegerRange, type IntrospectSchemaResult, type LaneMetaBuilder, type ListCast, type LoweredDefaultResult, type LoweredDefaultValue, type MarkerHashes, type MetaBuilder, type MigratableTargetDescriptor, type MigrationAccessChange, type MigrationDataLoss, type MigrationDataLossKind, type MigrationMetadata, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationOperationSubject, type MigrationPackage, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanSubjects, type MigrationPlanWithAuthoringSurface, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerPerSpaceOptions, type MigrationRunnerPerSpaceSuccessValue, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type MigrationScaffoldContext, type MigrationStatementJson, type MigrationSubject, type MigrationSubjectJson, type MigrationTemporaryValue, type ModelCoordinate, type ModelCoordinateJson, type MutationDefaultGeneratorContributor, type MutationDefaultGeneratorDescriptor, type MutationDefaults, type MutationDefaultsOp, type MutationDefaultsOptions, type NamedAggregateOutput, type Namespace, NamespaceBase, type NamespacedEntities, type NoInputAggregateDescriptor, type OpFactoryCall, type OperationContext, type OperationKind, type OperationPreview, type OperationPreviewCapable, type OperationPreviewStatement, type PackRefBase, type ParamRefMutator, type ParsedPslExtensionBlock, type PlanOrigin, type PresetStorageTemplate, PslAttribute, PslAttributeArgument, PslAttributeNamedArgument, PslAttributePositionalArgument, PslAttributeTarget, PslCompositeType, type PslContractBuildCapable, type PslContractDocument, type PslContractInferCapable, PslDefaultFunctionValue, PslDefaultLiteralValue, PslDefaultValue, PslDiagnostic, type PslDiagnosticCode, PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParsedAttribute, type PslExtensionBlockPrintEntry, PslField, PslFieldAttribute, PslIndexConstraint, PslModel, PslModelAttribute, PslNamedTypeDeclaration, PslNamespace, PslNamespaceEntry, type PslPosition, PslReferentialAction, type PslSourceSettings, type PslSpan, PslTypeConstructorCall, PslTypesBlock, PslUniqueConstraint, type QueryInterceptResult, type QueryPlan, RUNTIME_ABORTED, type ReadRefusal, type RefusalDescription, type RefusalGuidance, RelationKeys, type RelationNamesOf, type ResolvedFieldBackfillStatement, type ResolvedFieldConvertStatement, type ResolvedFieldRenameStatement, type ResolvedMigrationStatement, type ResolvedModelRenameStatement, type ResolvedRenameStatement, type ResultType, type RowsWithoutValue, type RuntimeAbortedPhase, type RuntimeActivity, type RuntimeAdapterDescriptor, type RuntimeAdapterInstance, RuntimeCore, type RuntimeCoreOptions, type RuntimeDriverDescriptor, type RuntimeDriverInstance, type RuntimeErrorEnvelope, type RuntimeExecuteOptions, type RuntimeExecutor, type RuntimeExtensionDescriptor, type RuntimeExtensionInstance, type RuntimeFamilyDescriptor, type RuntimeFamilyInstance, type RuntimeLog, type RuntimeMiddleware, type RuntimeMutationDefaultGenerator, type RuntimeStatementStats, type RuntimeTargetDescriptor, type RuntimeTargetInstance, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, type ScalarFieldDeclaration, type ScalarFieldDeclarationBuilder, type ScalarTypeConstructorOutput, type Scalars, SchemaDiff, type SchemaDiffIssue, type SchemaEntityCoordinate, type SchemaNodeRef, type SchemaOwnership, type SchemaSubjectClassifierCapable, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerifier, type SchemaVerifyOptions, type SchemaVerifyResult, type SchemaViewCapable, type SchemaViewNodeKind, type SelfAggregateOutput, type SettledAggregateOperation, type SettledAggregateOverloads, type Shape, type ShapeSpec, type SingleNamespaceView, type SourceDiagnostic, type SourceSpan, type SpaceMarkerConflict, type SpaceSignature, type SpaceSigned, type SpaceToSign, type StatementActivity, type StatementActivityRun, type StatementEnded, type StatementOptions, type Storage, type StorageType, type StoredEnumMember, TAGGED_LITERAL_MAX_BYTES, TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, type TaggedLiteralCanonicalization, type TargetBoundComponentDescriptor, type TargetDescriptor, type TargetInstance, type TargetMigrationsCapability, type TargetPackRef, type ToCanonicalForm, type TransactionActivity, type TransactionActivityOptions, type TransactionActivityRun, type TransactionEnded, type TransactionSettlement, type TypedDefaultFunctionCall, type TypedValue, type TypesImportSpec, UNBOUND_NAMESPACE_ID, UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type ValidAnnotations, type ValueInputAggregateDescriptor, type VerificationStatus, type VerifierIssueCategory, type VerifierOutcome, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, type WrittenForm, type WrittenScalar, type WrittenValue, admittedForms, admittedTags, aggregateDescriptorKey, applyMutationDefaults, assembleAuthoringContributions, assembleAuthoringDataTypes, assembleControlMutationDefaults, assembleDataTypes, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, assertRuntimeContractRequirementsSatisfied, assertUniqueCodecOwner, authoringEntryType, buildExtensionLoadOrder, buildNamespacedEntities, buildSingleNamespaceView, canonicalFormOf, canonicalizeJson, canonicalizeTaggedLiteralBody, castTypedValue, checkAborted, checkContractComponentRequirements, checkMiddlewareCompatibility, classifyEnumMemberType, codecForRef, collectMutationDefaultGenerators, collectScalarTypeConstructors, column, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, coordinateKey, createControlStack, createDataTypeLookup, createExecutionStack, createMetaBuilder, createStateStore, dataType, dataTypeId, decodeJsonBoolean, decodeJsonFloat, decodeJsonInteger, decodeJsonIntegerText, decodeJsonMatching, decodeJsonString, defineAnnotation, describeAdmittedForms, describeExpected, describeMigrationStatement, describeRefusal, describeRefusedValueType, describeTaggedLiteralFailure, diffSchemas, dispositionForCategory, domainElementCoordinates, duplicateStoredMembers, elementCoordinates, emptyCodecLookup, encodeEnumMembers, encodeJsonFloat, enforceDataTypeInvariants, entityAt, entryForPlain, entryForTag, enumMemberProblemDiagnostic, enumRefusalOf, exactRewrite, executeStatement, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, fieldPresetSpellings, fieldStatementText, findAuthoringTypeConstructorCall, flatPslCompositeTypes, flatPslModels, flushAuthoringWarnings, freezeNode, getAuthoringFieldPreset, getAuthoringTypeConstructor, hasMigrations, hasOperationPreview, hasPslContractBuild, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, hydrateNamespaceEntities, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, instantiateExecutionStack, isAggregateDescriptor, isAnyInputAggregateDescriptor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor, isIntegerIn, isNoInputAggregateDescriptor, isNonFiniteText, isPlainRecord, isRenameStatement, isRuntimeError, isStorageHashHex, isTagEntryKey, issueOutcome, keepInternalSpecifiers, knownTags, makePslNamespace, makePslNamespaceEntries, materializeCodec, mergeAuthoringNamespaces, mergeCapabilityMatrices, migrationStatementJson, migrationSubjectJson, migrationSubjectKey, modelDisplayName, modelStatementText, namespacePslExtensionBlocks, objectSchemaKeys, orderIssuesByDependencies, planOriginOf, printTaggedLiteral, printedTaggedLiteralReadsBack, promoteBuiltinKinds, raceAgainstAbort, readEnumBlockMembers, readWrittenValue, refuseJsonValue, renderTsLiteral, requiredParamKeys, requiredSchemaKeys, resolveAuthoringTemplateValue, resolveCodecDescriptorOrThrow, resolveEnumCodecId, resolvePslBacktickEscapes, resolveRequirementSpecifiers, resolveTemplateTagEscapes, runtimeAborted, runtimeError, sameMarkerHashes, settleAggregateOverloads, startTransactionActivity, storageHashHex, streamStatement, tagEntryKey, tagForm, temporalAuthoringPresets, temporalCodecPreset, temporalPhaseTemplate, timestampNowControlDescriptor, tsTaggedTemplateSource, validateAuthoringHelperArguments, validateAuthoringTypeParams, validateCodecTypeParams };
|
|
23
|
+
export { APP_SPACE_ID, type Activity, type ActivityBase, type ActivityChild, type ActivityChildSlot, type ActivityContext, type ActivityContextFields, type ActivityEndedResult, type ActivityFinalizedResult, type ActivityInterceptResult, type ActivityObserver, type ActivityParent, type ActivityStateStore, type AdapterDescriptor, type AdapterInstance, type AdapterPackRef, type AggregateCodecTraits, type AggregateDescriptor, type AggregateInputMatch, type AggregateOutputCodec, type AggregateOverloadAmbiguity, type AggregateOverloadDuplicate, type AggregateResultNullability, type AnnotationHandle, type AnnotationSource, type AnnotationValue, type AnyCodecDescriptor, type AnyCodecDescriptorTemplate, type AnyEntityKindDescriptor, type AnyInputAggregateDescriptor, type AppliedMigrationStatement, type AppliedMutationDefault, type AssembledAuthoringContributions, AsyncIterableResult, type AuthoringArgRef, type AuthoringArgumentDescriptor, type AuthoringAttributeSpecContributions, type AuthoringColumnDefaultTemplate, type AuthoringContributions, type AuthoringDiagnosticSink, type AuthoringEntityContext, type AuthoringEntityTypeDescriptor, type AuthoringEntityTypeFactoryOutput, type AuthoringEntityTypeNamespace, type AuthoringEntityTypeTemplateOutput, type AuthoringFieldNamespace, type AuthoringFieldPresetDescriptor, type AuthoringFieldPresetOutput, type AuthoringModelAttributeContext, type AuthoringModelAttributeDescriptor, type AuthoringModelAttributeDescriptorNamespace, type AuthoringModelAttributeEntityOutput, type AuthoringModelAttributeIndexOutput, type AuthoringModelAttributeLoweringOutput, type AuthoringOption, type AuthoringPslBlockDescriptor, type AuthoringPslBlockDescriptorNamespace, type AuthoringSelectRef, type AuthoringStorageTypeTemplate, type AuthoringTemplateValue, type AuthoringTypeConstructorCall, type AuthoringTypeConstructorDescriptor, type AuthoringTypeConstructorEntityRef, type AuthoringTypeConstructorOutput, type AuthoringTypeNamespace, type AuthoringWarning, type AuthoringWarningSink, BUILTIN_PSL_KIND_KEYS, type BigIntRange, CONTRACT_CODEC_DESCRIPTOR_MISSING, CONTRACT_SNAPSHOTS_DIRNAME, type CapabilityMatrix, type Cast, type CastRefusal, type ClientActivity, type ClientActivityEnd, type ClientActivityEnded, type ClientActivityKind, type ClientActivityOptions, type ClientActivityRegistry, type ClientActivityResult, type ClientActivityRun, type Codec, type CodecCallContext, type CodecDescriptor, CodecDescriptorImpl, type CodecDescriptorRef, type CodecDescriptorTemplate, CodecDescriptorTemplateImpl, CodecImpl, type CodecInstanceContext, type CodecLookup, type CodecLookupWithDescriptors, type CodecRef, type CodecRegistry, type CodecTrait, type ColumnHelperFor, type ColumnHelperForStrict, type ColumnSpec, type ColumnTypeDescriptor, type ComponentDescriptor, type ComponentMetadata, type ContractComponentRequirementsCheckInput, type ContractComponentRequirementsCheckResult, type ContractSerializer, type ContractSpace, type ContractSpaceHeadRef, type ContributedPslDiagnosticCode, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverConnectOptions, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlMutationDefaultEntry, type ControlMutationDefaultRegistry, type ControlMutationDefaults, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type CrossFamilyMiddleware, DATA_TYPE_ID_PATTERN, type DataType, type DataTypeAuthoringEntry, type DataTypeId, type DataTypeInvariantInput, type DataTypeLookup, type DataTypeSpec, type DataTypeSupport, type DataTypeWrittenForm, type DecodedEnum, type DefaultFunctionLoweringContext, type DefaultNamespaceEntries, type DefineAnnotationOptions, type DiffSubjectGranularity, type DiffableNode, type DriverDescriptor, type DriverInstance, type DriverPackRef, type DuplicateStoredValue, type EmissionSpi, type EmitContractResult, type EncodedEnumMember, type EntityCoordinate, type EntityKindDescriptor, type EnumBlockDiagnostic, type EnumBlockMember, type EnumBlockSite, type EnumMemberProblem, type ExecuteInterceptResult, type ExecutionPlan, type ExecutionStack, type ExecutionStackInstance, type ExpectationFailureReason, type ExtensionDescriptor, type ExtensionInstance, type ExtensionPackRef, type FailedCast, type FailedConversion, type FailedTypeChange, type FamilyDescriptor, type FamilyInstance, type FamilyPackRef, type FieldCoordinate, type FieldCoordinateJson, type GenerateContractTypesOptions, type GeneratorStability, INT32_RANGE, INT64_RANGE, type IRNode, IRNodeBase, type ImportRequirement, type ImportSpecifierResolver, type IntegerRange, type IntrospectSchemaResult, type LaneMetaBuilder, type ListCast, type LoweredDefaultResult, type LoweredDefaultValue, type MarkerHashes, type MetaBuilder, type MigratableTargetDescriptor, type MigrationAccessChange, type MigrationDataLoss, type MigrationDataLossKind, type MigrationMetadata, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationOperationSubject, type MigrationPackage, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanSubjects, type MigrationPlanWithAuthoringSurface, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerPerSpaceOptions, type MigrationRunnerPerSpaceSuccessValue, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type MigrationScaffoldContext, type MigrationStatementJson, type MigrationSubject, type MigrationSubjectJson, type MigrationTemporaryValue, type ModelCoordinate, type ModelCoordinateJson, type MutationDefaultGeneratorContributor, type MutationDefaultGeneratorDescriptor, type MutationDefaults, type MutationDefaultsOp, type MutationDefaultsOptions, type NamedAggregateOutput, type Namespace, NamespaceBase, type NamespacedEntities, type NoInputAggregateDescriptor, type OpFactoryCall, type OperationContext, type OperationKind, type OperationPreview, type OperationPreviewCapable, type OperationPreviewStatement, type PackRefBase, type ParamRefMutator, type ParsedPslExtensionBlock, type PlanOrigin, type PresetStorageTemplate, PslAttribute, PslAttributeArgument, PslAttributeNamedArgument, PslAttributePositionalArgument, PslAttributeTarget, PslCompositeType, type PslContractBuildCapable, type PslContractDocument, type PslContractInferCapable, PslDefaultFunctionValue, PslDefaultLiteralValue, PslDefaultValue, PslDiagnostic, type PslDiagnosticCode, PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParsedAttribute, type PslExtensionBlockPrintEntry, PslField, PslFieldAttribute, PslIndexConstraint, PslModel, PslModelAttribute, PslNamedTypeDeclaration, PslNamespace, PslNamespaceEntry, type PslPosition, PslReferentialAction, type PslSourceSettings, type PslSpan, PslTypeConstructorCall, PslTypesBlock, PslUniqueConstraint, type QueryInterceptResult, type QueryPlan, RUNTIME_ABORTED, type ReadRefusal, type RefusalDescription, type RefusalGuidance, RelationKeys, type RelationNamesOf, type ResolvedFieldBackfillStatement, type ResolvedFieldConvertStatement, type ResolvedFieldRenameStatement, type ResolvedMigrationStatement, type ResolvedModelRenameStatement, type ResolvedRenameStatement, type ResultType, type RowsWithoutValue, type RuntimeAbortedPhase, type RuntimeAdapterDescriptor, type RuntimeAdapterInstance, RuntimeCore, type RuntimeCoreOptions, type RuntimeDriverDescriptor, type RuntimeDriverInstance, type RuntimeErrorEnvelope, type RuntimeExecuteOptions, type RuntimeExecutor, type RuntimeExtensionDescriptor, type RuntimeExtensionInstance, type RuntimeFamilyDescriptor, type RuntimeFamilyInstance, type RuntimeLog, type RuntimeMiddleware, type RuntimeMutationDefaultGenerator, type RuntimeStatementStats, type RuntimeTargetDescriptor, type RuntimeTargetInstance, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, type ScalarFieldDeclaration, type ScalarFieldDeclarationBuilder, type ScalarTypeConstructorOutput, type Scalars, SchemaDiff, type SchemaDiffIssue, type SchemaEntityCoordinate, type SchemaNodeRef, type SchemaOwnership, type SchemaSubjectClassifierCapable, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerifier, type SchemaVerifyOptions, type SchemaVerifyResult, type SchemaViewCapable, type SchemaViewNodeKind, type SelfAggregateOutput, type SettledAggregateOperation, type SettledAggregateOverloads, type Shape, type ShapeSpec, type SingleNamespaceView, type SourceDiagnostic, type SourceSpan, type SpaceMarkerConflict, type SpaceSignature, type SpaceSigned, type SpaceToSign, type StartActivity, type StatementActivity, type StatementActivityRun, type StatementEnded, type StatementOptions, type Storage, type StorageType, type StoredEnumMember, TAGGED_LITERAL_MAX_BYTES, TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, type TaggedLiteralCanonicalization, type TargetBoundComponentDescriptor, type TargetDescriptor, type TargetInstance, type TargetMigrationsCapability, type TargetPackRef, type ToCanonicalForm, type TransactionActivity, type TransactionActivityOptions, type TransactionActivityRun, type TransactionEnded, type TransactionSettlement, type TypedDefaultFunctionCall, type TypedValue, type TypesImportSpec, UNBOUND_NAMESPACE_ID, UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type ValidAnnotations, type ValueInputAggregateDescriptor, type VerificationStatus, type VerifierIssueCategory, type VerifierOutcome, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, type WrittenForm, type WrittenScalar, type WrittenValue, admittedForms, admittedTags, aggregateDescriptorKey, applyMutationDefaults, assembleAuthoringContributions, assembleAuthoringDataTypes, assembleControlMutationDefaults, assembleDataTypes, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, assertRuntimeContractRequirementsSatisfied, assertUniqueCodecOwner, authoringEntryType, buildExtensionLoadOrder, buildNamespacedEntities, buildSingleNamespaceView, canonicalFormOf, canonicalizeJson, canonicalizeTaggedLiteralBody, castTypedValue, checkAborted, checkContractComponentRequirements, checkMiddlewareCompatibility, classifyEnumMemberType, codecForRef, collectMutationDefaultGenerators, collectScalarTypeConstructors, column, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, coordinateKey, createContextBeneath, createControlStack, createDataTypeLookup, createExecutionStack, createMetaBuilder, createStateStore, dataType, dataTypeId, decodeJsonBoolean, decodeJsonFloat, decodeJsonInteger, decodeJsonIntegerText, decodeJsonMatching, decodeJsonString, defineAnnotation, describeAdmittedForms, describeExpected, describeMigrationStatement, describeRefusal, describeRefusedValueType, describeTaggedLiteralFailure, diffSchemas, dispositionForCategory, domainElementCoordinates, duplicateStoredMembers, elementCoordinates, emptyCodecLookup, encodeEnumMembers, encodeJsonFloat, enforceDataTypeInvariants, entityAt, entryForPlain, entryForTag, enumMemberProblemDiagnostic, enumRefusalOf, exactRewrite, executeStatement, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, fieldPresetSpellings, fieldStatementText, findAuthoringTypeConstructorCall, flatPslCompositeTypes, flatPslModels, flushAuthoringWarnings, freezeNode, getAuthoringFieldPreset, getAuthoringTypeConstructor, hasMigrations, hasOperationPreview, hasPslContractBuild, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, hydrateNamespaceEntities, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, instantiateExecutionStack, isAggregateDescriptor, isAnyInputAggregateDescriptor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor, isIntegerIn, isNoInputAggregateDescriptor, isNonFiniteText, isPlainRecord, isRenameStatement, isRuntimeError, isStorageHashHex, isTagEntryKey, issueOutcome, keepInternalSpecifiers, knownTags, makePslNamespace, makePslNamespaceEntries, materializeCodec, mergeAuthoringNamespaces, mergeCapabilityMatrices, migrationStatementJson, migrationSubjectJson, migrationSubjectKey, modelDisplayName, modelStatementText, namespacePslExtensionBlocks, objectSchemaKeys, orderIssuesByDependencies, planOriginOf, printTaggedLiteral, printedTaggedLiteralReadsBack, promoteBuiltinKinds, raceAgainstAbort, readEnumBlockMembers, readWrittenValue, refuseJsonValue, renderTsLiteral, requiredParamKeys, requiredSchemaKeys, resolveAuthoringTemplateValue, resolveCodecDescriptorOrThrow, resolveEnumCodecId, resolvePslBacktickEscapes, resolveRequirementSpecifiers, resolveTemplateTagEscapes, runtimeAborted, runtimeError, sameMarkerHashes, settleAggregateOverloads, startClientActivity, startTransactionActivity, storageHashHex, streamStatement, tagEntryKey, tagForm, temporalAuthoringPresets, temporalCodecPreset, temporalPhaseTemplate, timestampNowControlDescriptor, tsTaggedTemplateSource, validateAuthoringHelperArguments, validateAuthoringTypeParams, validateCodecTypeParams };
|
package/dist/components.mjs
CHANGED
|
@@ -17,5 +17,5 @@ import { t as settleAggregateOverloads } from "./components-VMbwq7D8.mjs";
|
|
|
17
17
|
import { n as resolveRequirementSpecifiers, t as keepInternalSpecifiers } from "./emission-CeoAV9mj.mjs";
|
|
18
18
|
import { n as createExecutionStack, r as instantiateExecutionStack, t as assertRuntimeContractRequirementsSatisfied } from "./execution-BNwBzmRd.mjs";
|
|
19
19
|
import { a as flatPslModels, c as namespacePslExtensionBlocks, i as flatPslCompositeTypes, n as UNBOUND_PSL_NAMESPACE_NAME, o as makePslNamespace, r as UNSPECIFIED_PSL_NAMESPACE_ID, s as makePslNamespaceEntries, t as BUILTIN_PSL_KIND_KEYS } from "./psl-ast-CyvE6CR-.mjs";
|
|
20
|
-
import { _ as
|
|
21
|
-
export { APP_SPACE_ID, AsyncIterableResult, BUILTIN_PSL_KIND_KEYS, CONTRACT_CODEC_DESCRIPTOR_MISSING, CONTRACT_SNAPSHOTS_DIRNAME, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, DATA_TYPE_ID_PATTERN, INT32_RANGE, INT64_RANGE, IRNodeBase, NamespaceBase, RUNTIME_ABORTED, RelationKeys, RuntimeCore, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, SchemaDiff, SchemaTreeNode, TAGGED_LITERAL_MAX_BYTES, TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, UNBOUND_NAMESPACE_ID, UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, admittedForms, admittedTags, aggregateDescriptorKey, applyMutationDefaults, assembleAuthoringContributions, assembleAuthoringDataTypes, assembleControlMutationDefaults, assembleDataTypes, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, assertRuntimeContractRequirementsSatisfied, assertUniqueCodecOwner, authoringEntryType, buildExtensionLoadOrder, buildNamespacedEntities, buildSingleNamespaceView, canonicalFormOf, canonicalizeJson, canonicalizeTaggedLiteralBody, castTypedValue, checkAborted, checkContractComponentRequirements, checkMiddlewareCompatibility, classifyEnumMemberType, codecForRef, collectMutationDefaultGenerators, collectScalarTypeConstructors, column, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, coordinateKey, createControlStack, createDataTypeLookup, createExecutionStack, createMetaBuilder, createStateStore, dataType, dataTypeId, decodeJsonBoolean, decodeJsonFloat, decodeJsonInteger, decodeJsonIntegerText, decodeJsonMatching, decodeJsonString, defineAnnotation, describeAdmittedForms, describeExpected, describeMigrationStatement, describeRefusal, describeRefusedValueType, describeTaggedLiteralFailure, diffSchemas, dispositionForCategory, domainElementCoordinates, duplicateStoredMembers, elementCoordinates, emptyCodecLookup, encodeEnumMembers, encodeJsonFloat, enforceDataTypeInvariants, entityAt, entryForPlain, entryForTag, enumMemberProblemDiagnostic, enumRefusalOf, exactRewrite, executeStatement, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, fieldPresetSpellings, fieldStatementText, findAuthoringTypeConstructorCall, flatPslCompositeTypes, flatPslModels, flushAuthoringWarnings, freezeNode, getAuthoringFieldPreset, getAuthoringTypeConstructor, hasMigrations, hasOperationPreview, hasPslContractBuild, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, hydrateNamespaceEntities, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, instantiateExecutionStack, isAggregateDescriptor, isAnyInputAggregateDescriptor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor, isIntegerIn, isNoInputAggregateDescriptor, isNonFiniteText, isPlainRecord, isRenameStatement, isRuntimeError, isStorageHashHex, isTagEntryKey, issueOutcome, keepInternalSpecifiers, knownTags, makePslNamespace, makePslNamespaceEntries, materializeCodec, mergeAuthoringNamespaces, mergeCapabilityMatrices, migrationStatementJson, migrationSubjectJson, migrationSubjectKey, modelDisplayName, modelStatementText, namespacePslExtensionBlocks, objectSchemaKeys, orderIssuesByDependencies, planOriginOf, printTaggedLiteral, printedTaggedLiteralReadsBack, promoteBuiltinKinds, raceAgainstAbort, readEnumBlockMembers, readWrittenValue, refuseJsonValue, renderTsLiteral, requiredParamKeys, requiredSchemaKeys, resolveAuthoringTemplateValue, resolveCodecDescriptorOrThrow, resolveEnumCodecId, resolvePslBacktickEscapes, resolveRequirementSpecifiers, resolveTemplateTagEscapes, runtimeAborted, runtimeError, sameMarkerHashes, settleAggregateOverloads, startTransactionActivity, storageHashHex, streamStatement, tagEntryKey, tagForm, temporalAuthoringPresets, temporalCodecPreset, temporalPhaseTemplate, timestampNowControlDescriptor, tsTaggedTemplateSource, validateAuthoringHelperArguments, validateAuthoringTypeParams, validateCodecTypeParams };
|
|
20
|
+
import { _ as runtimeAborted, a as applyMutationDefaults, b as streamStatement, c as checkAborted, d as createContextBeneath, f as createMetaBuilder, g as raceAgainstAbort, h as executeStatement, i as RuntimeCore, l as checkMiddlewareCompatibility, m as defineAnnotation, n as RUNTIME_ABORTED, o as assertAnnotationsApplicable, p as createStateStore, r as RelationKeys, s as assertMutationDefaultGeneratorsAvailable, t as AsyncIterableResult, u as collectMutationDefaultGenerators, v as startClientActivity, y as startTransactionActivity } from "./runtime-DZVNxupx.mjs";
|
|
21
|
+
export { APP_SPACE_ID, AsyncIterableResult, BUILTIN_PSL_KIND_KEYS, CONTRACT_CODEC_DESCRIPTOR_MISSING, CONTRACT_SNAPSHOTS_DIRNAME, CodecDescriptorImpl, CodecDescriptorTemplateImpl, CodecImpl, DATA_TYPE_ID_PATTERN, INT32_RANGE, INT64_RANGE, IRNodeBase, NamespaceBase, RUNTIME_ABORTED, RelationKeys, RuntimeCore, SAFE_INTEGER_BIGINT_RANGE, SAFE_INTEGER_RANGE, SchemaDiff, SchemaTreeNode, TAGGED_LITERAL_MAX_BYTES, TEMPORAL_ON_CREATE_ARG, TEMPORAL_ON_UPDATE_ARG, TIMESTAMP_NOW_GENERATOR_ID, UNBOUND_NAMESPACE_ID, UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, admittedForms, admittedTags, aggregateDescriptorKey, applyMutationDefaults, assembleAuthoringContributions, assembleAuthoringDataTypes, assembleControlMutationDefaults, assembleDataTypes, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, assertNoCrossRegistryCollisions, assertResolvableTypeConstructorTemplates, assertRuntimeContractRequirementsSatisfied, assertUniqueCodecOwner, authoringEntryType, buildExtensionLoadOrder, buildNamespacedEntities, buildSingleNamespaceView, canonicalFormOf, canonicalizeJson, canonicalizeTaggedLiteralBody, castTypedValue, checkAborted, checkContractComponentRequirements, checkMiddlewareCompatibility, classifyEnumMemberType, codecForRef, collectMutationDefaultGenerators, collectScalarTypeConstructors, column, contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, coordinateKey, createContextBeneath, createControlStack, createDataTypeLookup, createExecutionStack, createMetaBuilder, createStateStore, dataType, dataTypeId, decodeJsonBoolean, decodeJsonFloat, decodeJsonInteger, decodeJsonIntegerText, decodeJsonMatching, decodeJsonString, defineAnnotation, describeAdmittedForms, describeExpected, describeMigrationStatement, describeRefusal, describeRefusedValueType, describeTaggedLiteralFailure, diffSchemas, dispositionForCategory, domainElementCoordinates, duplicateStoredMembers, elementCoordinates, emptyCodecLookup, encodeEnumMembers, encodeJsonFloat, enforceDataTypeInvariants, entityAt, entryForPlain, entryForTag, enumMemberProblemDiagnostic, enumRefusalOf, exactRewrite, executeStatement, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractQueryOperationTypeImports, fieldPresetSpellings, fieldStatementText, findAuthoringTypeConstructorCall, flatPslCompositeTypes, flatPslModels, flushAuthoringWarnings, freezeNode, getAuthoringFieldPreset, getAuthoringTypeConstructor, hasMigrations, hasOperationPreview, hasPslContractBuild, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, hydrateNamespaceEntities, instantiateAuthoringEntityType, instantiateAuthoringFieldPreset, instantiateAuthoringTypeConstructor, instantiateExecutionStack, isAggregateDescriptor, isAnyInputAggregateDescriptor, isAuthoringArgRef, isAuthoringEntityTypeDescriptor, isAuthoringFieldPresetDescriptor, isAuthoringModelAttributeDescriptor, isAuthoringPslBlockDescriptor, isAuthoringTypeConstructorDescriptor, isIntegerIn, isNoInputAggregateDescriptor, isNonFiniteText, isPlainRecord, isRenameStatement, isRuntimeError, isStorageHashHex, isTagEntryKey, issueOutcome, keepInternalSpecifiers, knownTags, makePslNamespace, makePslNamespaceEntries, materializeCodec, mergeAuthoringNamespaces, mergeCapabilityMatrices, migrationStatementJson, migrationSubjectJson, migrationSubjectKey, modelDisplayName, modelStatementText, namespacePslExtensionBlocks, objectSchemaKeys, orderIssuesByDependencies, planOriginOf, printTaggedLiteral, printedTaggedLiteralReadsBack, promoteBuiltinKinds, raceAgainstAbort, readEnumBlockMembers, readWrittenValue, refuseJsonValue, renderTsLiteral, requiredParamKeys, requiredSchemaKeys, resolveAuthoringTemplateValue, resolveCodecDescriptorOrThrow, resolveEnumCodecId, resolvePslBacktickEscapes, resolveRequirementSpecifiers, resolveTemplateTagEscapes, runtimeAborted, runtimeError, sameMarkerHashes, settleAggregateOverloads, startClientActivity, startTransactionActivity, storageHashHex, streamStatement, tagEntryKey, tagForm, temporalAuthoringPresets, temporalCodecPreset, temporalPhaseTemplate, timestampNowControlDescriptor, tsTaggedTemplateSource, validateAuthoringHelperArguments, validateAuthoringTypeParams, validateCodecTypeParams };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as isRuntimeError, r as runtimeError, t as RuntimeErrorEnvelope } from "./runtime-error-CO4MA3Px-YW5SCUcH.mjs";
|
|
2
|
-
import { $ as
|
|
3
|
-
export { type ActivityBase, type ActivityChild, type ActivityContext, type ActivityContextFields, type ActivityEndedResult, type ActivityFinalizedResult, type ActivityObserver, type ActivityParent, type ActivityStateStore, type AnnotationHandle, type AnnotationSource, type AnnotationValue, type AppliedMutationDefault, AsyncIterableResult, type CrossFamilyMiddleware, type DefineAnnotationOptions, type ExecuteInterceptResult, type ExecutionPlan, type GeneratorStability, type LaneMetaBuilder, type MetaBuilder, type MutationDefaultGeneratorContributor, type MutationDefaults, type MutationDefaultsOp, type MutationDefaultsOptions, type OperationKind, type ParamRefMutator, type QueryInterceptResult, type QueryPlan, RUNTIME_ABORTED, RelationKeys, type RelationNamesOf, type ResultType, type RuntimeAbortedPhase,
|
|
2
|
+
import { $ as RuntimeStatementStats, A as GeneratorStability, B as QueryPlan, C as ClientActivityRegistry, Ct as defineAnnotation, D as DefineAnnotationOptions, Dt as startClientActivity, E as CrossFamilyMiddleware, Et as runtimeAborted, F as MutationDefaultsOp, G as RuntimeAbortedPhase, H as RelationKeys, I as MutationDefaultsOptions, J as RuntimeExecuteOptions, K as RuntimeCore, L as OperationKind, M as MetaBuilder, N as MutationDefaultGeneratorContributor, O as ExecuteInterceptResult, Ot as startTransactionActivity, P as MutationDefaults, Q as RuntimeMutationDefaultGenerator, R as ParamRefMutator, S as ClientActivityOptions, St as createStateStore, T as ClientActivityRun, Tt as raceAgainstAbort, U as RelationNamesOf, V as RUNTIME_ABORTED, W as ResultType, X as RuntimeLog, Y as RuntimeExecutor, Z as RuntimeMiddleware, _ as AsyncIterableResult, _t as checkAborted, a as ActivityContext, at as StatementActivityRun, b as ClientActivityEnded, bt as createContextBeneath, c as ActivityFinalizedResult, ct as TransactionActivity, d as ActivityParent, dt as TransactionEnded, et as Scalars, f as ActivityStateStore, ft as TransactionSettlement, g as AppliedMutationDefault, gt as assertMutationDefaultGeneratorsAvailable, h as AnnotationValue, ht as assertAnnotationsApplicable, i as ActivityChildSlot, it as StatementActivity, j as LaneMetaBuilder, k as ExecutionPlan, kt as streamStatement, l as ActivityInterceptResult, lt as TransactionActivityOptions, m as AnnotationSource, mt as applyMutationDefaults, n as ActivityBase, nt as ShapeSpec, o as ActivityContextFields, ot as StatementEnded, p as AnnotationHandle, pt as ValidAnnotations, q as RuntimeCoreOptions, r as ActivityChild, rt as StartActivity, s as ActivityEndedResult, st as StatementOptions, t as Activity, tt as Shape, u as ActivityObserver, ut as TransactionActivityRun, v as ClientActivity, vt as checkMiddlewareCompatibility, w as ClientActivityResult, wt as executeStatement, x as ClientActivityKind, xt as createMetaBuilder, y as ClientActivityEnd, yt as collectMutationDefaultGenerators, z as QueryInterceptResult } from "./runtime-CNRjjEnO.mjs";
|
|
3
|
+
export { type Activity, type ActivityBase, type ActivityChild, type ActivityChildSlot, type ActivityContext, type ActivityContextFields, type ActivityEndedResult, type ActivityFinalizedResult, type ActivityInterceptResult, type ActivityObserver, type ActivityParent, type ActivityStateStore, type AnnotationHandle, type AnnotationSource, type AnnotationValue, type AppliedMutationDefault, AsyncIterableResult, type ClientActivity, type ClientActivityEnd, type ClientActivityEnded, type ClientActivityKind, type ClientActivityOptions, type ClientActivityRegistry, type ClientActivityResult, type ClientActivityRun, type CrossFamilyMiddleware, type DefineAnnotationOptions, type ExecuteInterceptResult, type ExecutionPlan, type GeneratorStability, type LaneMetaBuilder, type MetaBuilder, type MutationDefaultGeneratorContributor, type MutationDefaults, type MutationDefaultsOp, type MutationDefaultsOptions, type OperationKind, type ParamRefMutator, type QueryInterceptResult, type QueryPlan, RUNTIME_ABORTED, RelationKeys, type RelationNamesOf, type ResultType, type RuntimeAbortedPhase, RuntimeCore, type RuntimeCoreOptions, type RuntimeErrorEnvelope, type RuntimeExecuteOptions, type RuntimeExecutor, type RuntimeLog, type RuntimeMiddleware, type RuntimeMutationDefaultGenerator, type RuntimeStatementStats, type Scalars, type Shape, type ShapeSpec, type StartActivity, type StatementActivity, type StatementActivityRun, type StatementEnded, type StatementOptions, type TransactionActivity, type TransactionActivityOptions, type TransactionActivityRun, type TransactionEnded, type TransactionSettlement, type ValidAnnotations, applyMutationDefaults, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, createContextBeneath, createMetaBuilder, createStateStore, defineAnnotation, executeStatement, isRuntimeError, raceAgainstAbort, runtimeAborted, runtimeError, startClientActivity, startTransactionActivity, streamStatement };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as runtimeError, t as isRuntimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
2
|
-
import { _ as
|
|
3
|
-
export { AsyncIterableResult, RUNTIME_ABORTED, RelationKeys, RuntimeCore, applyMutationDefaults, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, createMetaBuilder, createStateStore, defineAnnotation, executeStatement, isRuntimeError, raceAgainstAbort, runtimeAborted, runtimeError, startTransactionActivity, streamStatement };
|
|
2
|
+
import { _ as runtimeAborted, a as applyMutationDefaults, b as streamStatement, c as checkAborted, d as createContextBeneath, f as createMetaBuilder, g as raceAgainstAbort, h as executeStatement, i as RuntimeCore, l as checkMiddlewareCompatibility, m as defineAnnotation, n as RUNTIME_ABORTED, o as assertAnnotationsApplicable, p as createStateStore, r as RelationKeys, s as assertMutationDefaultGeneratorsAvailable, t as AsyncIterableResult, u as collectMutationDefaultGenerators, v as startClientActivity, y as startTransactionActivity } from "./runtime-DZVNxupx.mjs";
|
|
3
|
+
export { AsyncIterableResult, RUNTIME_ABORTED, RelationKeys, RuntimeCore, applyMutationDefaults, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, createContextBeneath, createMetaBuilder, createStateStore, defineAnnotation, executeStatement, isRuntimeError, raceAgainstAbort, runtimeAborted, runtimeError, startClientActivity, startTransactionActivity, streamStatement };
|
|
@@ -237,6 +237,35 @@ type ValidAnnotations<K extends OperationKind, As extends readonly AnnotationVal
|
|
|
237
237
|
*/
|
|
238
238
|
declare function assertAnnotationsApplicable(annotations: readonly AnnotationValue<unknown, OperationKind>[], kind: OperationKind, terminalName: string): void;
|
|
239
239
|
//#endregion
|
|
240
|
+
//#region src/execution/runtime-error.d.ts
|
|
241
|
+
/**
|
|
242
|
+
* Stable code emitted by the runtime when an in-flight `execute()`
|
|
243
|
+
* is cancelled via the per-query `AbortSignal`. The envelope's
|
|
244
|
+
* `details.phase` distinguishes where the abort was observed:
|
|
245
|
+
*
|
|
246
|
+
* - `'encode'` — abort fired during `encodeParams` (SQL) or
|
|
247
|
+
* `resolveValue` (Mongo).
|
|
248
|
+
* - `'decode'` — abort fired during `decodeRow` / `decodeField`.
|
|
249
|
+
* - `'stream'` — abort fired between rows or before any codec call
|
|
250
|
+
* (already-aborted at entry).
|
|
251
|
+
* - `'beforeEncode'` / `'onRow'` — abort fired on entry to or during
|
|
252
|
+
* the corresponding middleware phase
|
|
253
|
+
* (cooperative cancellation per the param-transform seam).
|
|
254
|
+
*/
|
|
255
|
+
declare const RUNTIME_ABORTED: "RUNTIME.ABORTED";
|
|
256
|
+
/** Discriminator placed in `details.phase` of a `RUNTIME.ABORTED` envelope. */
|
|
257
|
+
type RuntimeAbortedPhase = 'encode' | 'decode' | 'stream' | 'beforeEncode' | 'onRow';
|
|
258
|
+
/**
|
|
259
|
+
* Construct a `RUNTIME.ABORTED` envelope. Phase distinguishes where the
|
|
260
|
+
* abort was observed — codec call sites (`encode` / `decode` / `stream`)
|
|
261
|
+
* or operation-specific middleware seams, as
|
|
262
|
+
* enumerated on {@link RuntimeAbortedPhase}. Cause carries
|
|
263
|
+
* `signal.reason` verbatim from the platform — native abort produces a
|
|
264
|
+
* `DOMException`, explicit `controller.abort(reason)` produces whatever
|
|
265
|
+
* the caller passed. No synthesis happens here.
|
|
266
|
+
*/
|
|
267
|
+
declare function runtimeAborted(phase: RuntimeAbortedPhase, cause?: unknown): RuntimeErrorEnvelope;
|
|
268
|
+
//#endregion
|
|
240
269
|
//#region src/execution/async-iterable-result.d.ts
|
|
241
270
|
declare class AsyncIterableResult<Row> implements AsyncIterable<Row>, PromiseLike<Row[]> {
|
|
242
271
|
private readonly generator;
|
|
@@ -326,7 +355,36 @@ interface StatementActivity<TPlan extends QueryPlan = QueryPlan> extends Activit
|
|
|
326
355
|
interface TransactionActivity extends ActivityBase {
|
|
327
356
|
readonly kind: 'transaction';
|
|
328
357
|
}
|
|
329
|
-
|
|
358
|
+
/** The kind of an activity a client starts. A client kind contains a hyphen, such as `orm-call`, so it is never `statement` or `transaction`. */
|
|
359
|
+
type ClientActivityKind = `${string}-${string}`;
|
|
360
|
+
/**
|
|
361
|
+
* The result types of the client kinds packages register. It types the handle side only, `intercepted.result` and `end({ result })`; in middleware hooks a client activity's result is `unknown`, even after narrowing on its kind, because the hook types accept every kind. An extension registers a kind by augmenting the published entry:
|
|
362
|
+
*
|
|
363
|
+
* ```ts
|
|
364
|
+
* declare module '@prisma/orm-framework/components/runtime' {
|
|
365
|
+
* interface ClientActivityRegistry { 'orm-call': { result: unknown } }
|
|
366
|
+
* }
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
interface ClientActivityRegistry extends Record<never, never> {}
|
|
370
|
+
/** The result a client activity of kind `K` ends with: the registered type, or `unknown` for an unregistered kind. */
|
|
371
|
+
type ClientActivityResult<K extends ClientActivityKind> = K extends keyof ClientActivityRegistry ? ClientActivityRegistry[K] extends {
|
|
372
|
+
readonly result: infer R;
|
|
373
|
+
} ? R : unknown : unknown;
|
|
374
|
+
/** An act a client started through the runtime, such as an ORM call. */
|
|
375
|
+
interface ClientActivity<K extends ClientActivityKind = ClientActivityKind> extends ActivityBase {
|
|
376
|
+
readonly kind: K;
|
|
377
|
+
/** An opaque digest of what the activity does, supplied by the client. */
|
|
378
|
+
readonly contentHash: string;
|
|
379
|
+
}
|
|
380
|
+
type Activity = StatementActivity | TransactionActivity | ClientActivity;
|
|
381
|
+
/** What a client gives to start an activity. */
|
|
382
|
+
interface StartActivity<K extends ClientActivityKind = ClientActivityKind> {
|
|
383
|
+
readonly kind: K;
|
|
384
|
+
/** An opaque digest of what the activity does. */
|
|
385
|
+
readonly contentHash: string;
|
|
386
|
+
readonly annotations?: ReadonlyMap<string, AnnotationValue<unknown, OperationKind>>;
|
|
387
|
+
}
|
|
330
388
|
/**
|
|
331
389
|
* The context of one activity. Every hook of the activity receives the same object.
|
|
332
390
|
*/
|
|
@@ -370,7 +428,15 @@ type StatementEnded = {
|
|
|
370
428
|
readonly returns: 'stats';
|
|
371
429
|
readonly stats?: RuntimeStatementStats;
|
|
372
430
|
});
|
|
373
|
-
|
|
431
|
+
interface ClientActivityEnded<K extends ClientActivityKind = ClientActivityKind> {
|
|
432
|
+
readonly kind: K;
|
|
433
|
+
readonly outcome: 'succeeded' | 'failed' | 'stopped';
|
|
434
|
+
/** `middleware` when an `intercept.onActivity` handler supplied the result and the client passed none, or when the handler threw. */
|
|
435
|
+
readonly source: 'client' | 'middleware';
|
|
436
|
+
/** The value the client returns to its caller. The runtime does not read it. */
|
|
437
|
+
readonly result?: ClientActivityResult<K>;
|
|
438
|
+
}
|
|
439
|
+
type ActivityEndedResult = TransactionEnded | StatementEnded | ClientActivityEnded;
|
|
374
440
|
interface ActivityFinalizedResult {
|
|
375
441
|
/** `unknown` when the runtime cannot tell whether the writes landed; treat it like `committed` when a committed write must not be missed. */
|
|
376
442
|
readonly outcome: 'committed' | 'rolled-back' | 'unknown';
|
|
@@ -378,6 +444,9 @@ interface ActivityFinalizedResult {
|
|
|
378
444
|
interface QueryInterceptResult {
|
|
379
445
|
readonly rows: AsyncIterable<Record<string, unknown>> | Iterable<Record<string, unknown>>;
|
|
380
446
|
}
|
|
447
|
+
interface ActivityInterceptResult {
|
|
448
|
+
readonly result: unknown;
|
|
449
|
+
}
|
|
381
450
|
interface ExecuteInterceptResult {
|
|
382
451
|
readonly stats: RuntimeStatementStats;
|
|
383
452
|
}
|
|
@@ -392,11 +461,11 @@ type ParamRefMutator = {
|
|
|
392
461
|
interface ActivityObserver {
|
|
393
462
|
readonly name: string;
|
|
394
463
|
/** The act begins. */
|
|
395
|
-
activityStarted?(activity:
|
|
464
|
+
activityStarted?(activity: Activity, ctx: ActivityContext): Promise<void>;
|
|
396
465
|
/** The act ends, with its outcome as the actor saw it. An error thrown when the activity succeeded fails it and reaches the caller; after a failure it is swallowed. */
|
|
397
|
-
activityEnded?(activity:
|
|
466
|
+
activityEnded?(activity: Activity, result: ActivityEndedResult, ctx: ActivityContext): Promise<void>;
|
|
398
467
|
/** The act's effects are final. A thrown error is passed to `ctx.log.error` and swallowed; later middleware still run. */
|
|
399
|
-
activityFinalized?(activity:
|
|
468
|
+
activityFinalized?(activity: Activity, result: ActivityFinalizedResult, ctx: ActivityContext): Promise<void>;
|
|
400
469
|
}
|
|
401
470
|
/**
|
|
402
471
|
* Family-agnostic middleware. `TPlan` is the encoded execution plan the statement interceptors receive; `TMutator` is the family's parameter mutator.
|
|
@@ -410,6 +479,8 @@ interface RuntimeMiddleware<TPlan extends QueryPlan = QueryPlan, TMutator extend
|
|
|
410
479
|
intercept?: {
|
|
411
480
|
onQuery?(plan: TPlan, ctx: ActivityContext): Promise<QueryInterceptResult | undefined>;
|
|
412
481
|
onExecute?(plan: TPlan, ctx: ActivityContext): Promise<ExecuteInterceptResult | undefined>;
|
|
482
|
+
/** Supplies the result of an activity a client started, after its `activityStarted` hooks. The client checks what it receives. */
|
|
483
|
+
onActivity?(activity: ClientActivity, ctx: ActivityContext): Promise<ActivityInterceptResult | undefined>;
|
|
413
484
|
};
|
|
414
485
|
/** Runs for each row the driver returns; not for intercepted rows. Throw to stop the stream. */
|
|
415
486
|
onRow?(row: Record<string, unknown>, plan: TPlan, ctx: ActivityContext): Promise<void>;
|
|
@@ -442,22 +513,73 @@ declare function checkMiddlewareCompatibility(middleware: RuntimeMiddleware, run
|
|
|
442
513
|
//#region src/execution/activity-lifecycle.d.ts
|
|
443
514
|
/** An open activity that new activities can start beneath. */
|
|
444
515
|
interface ActivityParent {
|
|
445
|
-
readonly activity:
|
|
516
|
+
readonly activity: ActivityBase;
|
|
446
517
|
readonly ctx: ActivityContext;
|
|
447
|
-
/**
|
|
448
|
-
|
|
518
|
+
/** Whether statements and activities may still start beneath this parent. A transaction stops accepting children when its `commit()` or `rollback()` is called; a client activity, when it ends or its transaction stops accepting children. */
|
|
519
|
+
acceptsChildren(): boolean;
|
|
520
|
+
/** Records `child` in start order and returns how the child reports to this parent. Throws `RUNTIME.ACTIVITY_NOT_ACCEPTING_CHILDREN` when the parent no longer accepts children. */
|
|
521
|
+
adopt(child: ActivityChild): ActivityChildSlot;
|
|
449
522
|
}
|
|
450
|
-
/** What a parent holds of a child activity until it
|
|
523
|
+
/** What a parent holds of a child activity until it is finalized. */
|
|
451
524
|
interface ActivityChild {
|
|
452
|
-
/** Runs the
|
|
525
|
+
/** Runs the `activityFinalized` hooks of the children it holds, in the order they started and depth first, then its own. A second call does nothing. */
|
|
453
526
|
finalize(result: ActivityFinalizedResult): Promise<void>;
|
|
454
527
|
}
|
|
528
|
+
/** How a child reports to its parent. */
|
|
529
|
+
interface ActivityChildSlot {
|
|
530
|
+
/** A statement at or beneath the child failed. The report travels up to the nearest transaction. */
|
|
531
|
+
statementFailed(): void;
|
|
532
|
+
/** The child has ended. `own` is its finalized result when no transaction finalizes it. Resolves once the child is finalized, or held for its transaction. */
|
|
533
|
+
ended(own: ActivityFinalizedResult): Promise<void>;
|
|
534
|
+
/** Whether the nearest transaction at or above the parent still accepts children; `true` outside any transaction. */
|
|
535
|
+
transactionAcceptsChildren(): boolean;
|
|
536
|
+
}
|
|
455
537
|
/** The per-activity state behind `ctx.state(key)`: one object per key, created empty on first use. */
|
|
456
538
|
interface ActivityStateStore {
|
|
457
539
|
state(key: string | symbol): Record<string | symbol, unknown>;
|
|
458
540
|
clear(): void;
|
|
459
541
|
}
|
|
460
542
|
declare function createStateStore(): ActivityStateStore;
|
|
543
|
+
/**
|
|
544
|
+
* The context of work that belongs to no activity but runs beneath `parent`, such as compiling a plan outside any statement: `parent` and `inTransaction()` as a child of `parent` would have them, and state of its own.
|
|
545
|
+
*/
|
|
546
|
+
declare function createContextBeneath<TContext extends ActivityContext>(fields: ActivityContextFields<TContext>, parent: ActivityParent | undefined): TContext;
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region src/execution/client-activity.d.ts
|
|
549
|
+
/** What a client passes to end its activity. */
|
|
550
|
+
interface ClientActivityEnd<K extends ClientActivityKind> {
|
|
551
|
+
readonly outcome: 'succeeded' | 'failed' | 'stopped';
|
|
552
|
+
/** The value the client returns to its caller. When omitted after an interception, the intercepted result. */
|
|
553
|
+
readonly result?: ClientActivityResult<K>;
|
|
554
|
+
}
|
|
555
|
+
/** An open client activity. Pass it as the `parent` of every statement, transaction and client activity started beneath it. */
|
|
556
|
+
interface ClientActivityRun<K extends ClientActivityKind, TContext extends ActivityContext = ActivityContext> extends ActivityParent {
|
|
557
|
+
readonly activity: ClientActivity<K>;
|
|
558
|
+
readonly ctx: TContext;
|
|
559
|
+
/** Set when an `intercept.onActivity` handler supplied the result. */
|
|
560
|
+
readonly intercepted: {
|
|
561
|
+
readonly result: ClientActivityResult<K>;
|
|
562
|
+
} | undefined;
|
|
563
|
+
/** Throws `RUNTIME.ACTIVITY_NOT_ACCEPTING_CHILDREN` when the activity no longer accepts children. */
|
|
564
|
+
assertAcceptsChildren(): void;
|
|
565
|
+
/**
|
|
566
|
+
* Ends the activity: its `activityEnded` hooks, then its finalization. Outside a transaction it is finalized at once: `committed` when it succeeded and everything beneath it was finalized `committed`, otherwise `unknown`. Inside one, its transaction finalizes it. When a child has not ended, the activity ends `failed`, is finalized, and `end` rejects with `RUNTIME.ACTIVITY_CHILDREN_OPEN`. A second call rejects with `RUNTIME.ACTIVITY_ALREADY_ENDED`.
|
|
567
|
+
*/
|
|
568
|
+
end(end: ClientActivityEnd<K>): Promise<void>;
|
|
569
|
+
}
|
|
570
|
+
/** How a runtime runs a client activity. */
|
|
571
|
+
interface ClientActivityOptions<TContext extends ActivityContext> {
|
|
572
|
+
readonly middleware: ReadonlyArray<ActivityObserver & Pick<RuntimeMiddleware, 'intercept'>>;
|
|
573
|
+
readonly context: ActivityContextFields<TContext>;
|
|
574
|
+
/** The open activity the client activity starts beneath. */
|
|
575
|
+
readonly parent: ActivityParent | undefined;
|
|
576
|
+
/** As for a transaction: whether finished children inside a transaction are kept for it to finalize. */
|
|
577
|
+
readonly holdFinishedChildren: boolean;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Starts a client activity: its `activityStarted` hooks, then each `intercept.onActivity` handler in registration order until one returns a result. When a hook or a handler throws, the activity ends `failed`, is finalized, and the error is rethrown. Rejects at once, running no hook, when `kind` has no hyphen (such as `statement` or `transaction`) or when `parent` no longer accepts children.
|
|
581
|
+
*/
|
|
582
|
+
declare function startClientActivity<K extends ClientActivityKind, TContext extends ActivityContext = ActivityContext>(activity: StartActivity<K>, options: ClientActivityOptions<TContext>): Promise<ClientActivityRun<K, TContext>>;
|
|
461
583
|
//#endregion
|
|
462
584
|
//#region src/execution/mutation-defaults.d.ts
|
|
463
585
|
/**
|
|
@@ -508,35 +630,6 @@ declare function assertMutationDefaultGeneratorsAvailable(execution: ContractExe
|
|
|
508
630
|
*/
|
|
509
631
|
declare function applyMutationDefaults(execution: ContractExecutionSection | undefined, generatorRegistry: ReadonlyMap<string, RuntimeMutationDefaultGenerator>, options: MutationDefaultsOptions): ReadonlyArray<AppliedMutationDefault>;
|
|
510
632
|
//#endregion
|
|
511
|
-
//#region src/execution/runtime-error.d.ts
|
|
512
|
-
/**
|
|
513
|
-
* Stable code emitted by the runtime when an in-flight `execute()`
|
|
514
|
-
* is cancelled via the per-query `AbortSignal`. The envelope's
|
|
515
|
-
* `details.phase` distinguishes where the abort was observed:
|
|
516
|
-
*
|
|
517
|
-
* - `'encode'` — abort fired during `encodeParams` (SQL) or
|
|
518
|
-
* `resolveValue` (Mongo).
|
|
519
|
-
* - `'decode'` — abort fired during `decodeRow` / `decodeField`.
|
|
520
|
-
* - `'stream'` — abort fired between rows or before any codec call
|
|
521
|
-
* (already-aborted at entry).
|
|
522
|
-
* - `'beforeEncode'` / `'onRow'` — abort fired on entry to or during
|
|
523
|
-
* the corresponding middleware phase
|
|
524
|
-
* (cooperative cancellation per the param-transform seam).
|
|
525
|
-
*/
|
|
526
|
-
declare const RUNTIME_ABORTED: "RUNTIME.ABORTED";
|
|
527
|
-
/** Discriminator placed in `details.phase` of a `RUNTIME.ABORTED` envelope. */
|
|
528
|
-
type RuntimeAbortedPhase = 'encode' | 'decode' | 'stream' | 'beforeEncode' | 'onRow';
|
|
529
|
-
/**
|
|
530
|
-
* Construct a `RUNTIME.ABORTED` envelope. Phase distinguishes where the
|
|
531
|
-
* abort was observed — codec call sites (`encode` / `decode` / `stream`)
|
|
532
|
-
* or operation-specific middleware seams, as
|
|
533
|
-
* enumerated on {@link RuntimeAbortedPhase}. Cause carries
|
|
534
|
-
* `signal.reason` verbatim from the platform — native abort produces a
|
|
535
|
-
* `DOMException`, explicit `controller.abort(reason)` produces whatever
|
|
536
|
-
* the caller passed. No synthesis happens here.
|
|
537
|
-
*/
|
|
538
|
-
declare function runtimeAborted(phase: RuntimeAbortedPhase, cause?: unknown): RuntimeErrorEnvelope;
|
|
539
|
-
//#endregion
|
|
540
633
|
//#region src/execution/race-against-abort.d.ts
|
|
541
634
|
/**
|
|
542
635
|
* Throw a phase-tagged `RUNTIME.ABORTED` envelope if the supplied
|
|
@@ -605,11 +698,11 @@ interface StatementActivityRun<TExec extends ExecutionPlan, TMutator extends Par
|
|
|
605
698
|
runExecute(exec: TExec, runDriver: () => Promise<RuntimeStatementStats>): Promise<RuntimeStatementStats>;
|
|
606
699
|
}
|
|
607
700
|
/**
|
|
608
|
-
* Runs one `query()` statement as an activity. The activity starts on the first `next()`: `activityStarted`, then `body`'s rows, then `activityEnded` and,
|
|
701
|
+
* Runs one `query()` statement as an activity. The activity starts on the first `next()`: `activityStarted`, then `body`'s rows, then `activityEnded` and, unless a transaction holds it, `activityFinalized`. Each fires exactly once, whether the body succeeds, throws (`failed`) or the caller stops reading (`stopped`). When the parent no longer accepts work, the first `next()` rejects and no hook runs.
|
|
609
702
|
*/
|
|
610
703
|
declare function streamStatement<TExec extends ExecutionPlan, TMutator extends ParamRefMutator, TContext extends ActivityContext, Row>(options: StatementOptions<TExec, TMutator, TContext>, body: (statement: StatementActivityRun<TExec, TMutator, TContext>) => AsyncIterable<Row>): AsyncIterable<Row>;
|
|
611
704
|
/**
|
|
612
|
-
* Runs one `execute()` statement as an activity: `activityStarted`, then `body`, then `activityEnded` and,
|
|
705
|
+
* Runs one `execute()` statement as an activity: `activityStarted`, then `body`, then `activityEnded` and, unless a transaction holds it, `activityFinalized`, each exactly once. When the parent no longer accepts work, it rejects and no hook runs.
|
|
613
706
|
*/
|
|
614
707
|
declare function executeStatement<TExec extends ExecutionPlan, TMutator extends ParamRefMutator, TContext extends ActivityContext>(options: StatementOptions<TExec, TMutator, TContext>, body: (statement: StatementActivityRun<TExec, TMutator, TContext>) => Promise<RuntimeStatementStats>): Promise<RuntimeStatementStats>;
|
|
615
708
|
//#endregion
|
|
@@ -722,19 +815,23 @@ type TransactionSettlement = {
|
|
|
722
815
|
interface TransactionActivityRun<TContext extends ActivityContext = ActivityContext> extends ActivityParent {
|
|
723
816
|
readonly activity: TransactionActivity;
|
|
724
817
|
readonly ctx: TContext;
|
|
818
|
+
/** Stops accepting children: new work beneath the transaction, and beneath the client activities inside it, is refused from now on. `end` does this too. */
|
|
819
|
+
stopAcceptingChildren(): void;
|
|
725
820
|
/**
|
|
726
|
-
* Ends the transaction: its `activityEnded` hooks, then the `activityFinalized` hooks of
|
|
821
|
+
* Ends the transaction: its `activityEnded` hooks, then the `activityFinalized` hooks of the activities beneath it that have ended, in post-order (each activity's children in the order they started, depth first, then the activity), then its own. Resolves after those hooks have run. An activity still open is finalized when it ends, with this transaction's outcome; `end` does not wait for it. A second call does nothing. An `activityEnded` error after a successful settlement is rethrown once finalization has run.
|
|
727
822
|
*/
|
|
728
823
|
end(settlement: TransactionSettlement): Promise<void>;
|
|
729
824
|
}
|
|
730
825
|
interface TransactionActivityOptions<TContext extends ActivityContext> {
|
|
731
826
|
readonly middleware: ReadonlyArray<ActivityObserver>;
|
|
732
827
|
readonly context: ActivityContextFields<TContext>;
|
|
733
|
-
/**
|
|
828
|
+
/** The open activity the transaction starts beneath, such as a client activity. */
|
|
829
|
+
readonly parent: ActivityParent | undefined;
|
|
830
|
+
/** Whether the transaction keeps its finished children to finalize them when it ends. A runtime decides this once, when it is created: only when a middleware implements `activityFinalized`. Without it, the transaction keeps nothing but whether a statement beneath it failed. */
|
|
734
831
|
readonly holdFinishedChildren: boolean;
|
|
735
832
|
}
|
|
736
833
|
/**
|
|
737
|
-
* Starts a transaction activity and runs its `activityStarted` hooks. When one of them throws, the transaction ends `failed`, is finalized `rolled-back`, and the error is rethrown.
|
|
834
|
+
* Starts a transaction activity and runs its `activityStarted` hooks. When one of them throws, the transaction ends `failed`, is finalized `rolled-back`, and the error is rethrown. Rejects at once, running no hook, when `parent` no longer accepts children.
|
|
738
835
|
*/
|
|
739
836
|
declare function startTransactionActivity<TContext extends ActivityContext>(options: TransactionActivityOptions<TContext>): Promise<TransactionActivityRun<TContext>>;
|
|
740
837
|
//#endregion
|
|
@@ -796,5 +893,5 @@ interface LaneMetaBuilder<K extends OperationKind> extends MetaBuilder<K> {
|
|
|
796
893
|
*/
|
|
797
894
|
declare function createMetaBuilder<K extends OperationKind>(kind: K, terminalName: string): LaneMetaBuilder<K>;
|
|
798
895
|
//#endregion
|
|
799
|
-
export {
|
|
800
|
-
//# sourceMappingURL=runtime-
|
|
896
|
+
export { RuntimeStatementStats as $, GeneratorStability as A, QueryPlan as B, ClientActivityRegistry as C, defineAnnotation as Ct, DefineAnnotationOptions as D, startClientActivity as Dt, CrossFamilyMiddleware as E, runtimeAborted as Et, MutationDefaultsOp as F, RuntimeAbortedPhase as G, RelationKeys as H, MutationDefaultsOptions as I, RuntimeExecuteOptions as J, RuntimeCore as K, OperationKind as L, MetaBuilder as M, MutationDefaultGeneratorContributor as N, ExecuteInterceptResult as O, startTransactionActivity as Ot, MutationDefaults as P, RuntimeMutationDefaultGenerator as Q, ParamRefMutator as R, ClientActivityOptions as S, createStateStore as St, ClientActivityRun as T, raceAgainstAbort as Tt, RelationNamesOf as U, RUNTIME_ABORTED as V, ResultType as W, RuntimeLog as X, RuntimeExecutor as Y, RuntimeMiddleware as Z, AsyncIterableResult as _, checkAborted as _t, ActivityContext as a, StatementActivityRun as at, ClientActivityEnded as b, createContextBeneath as bt, ActivityFinalizedResult as c, TransactionActivity as ct, ActivityParent as d, TransactionEnded as dt, Scalars as et, ActivityStateStore as f, TransactionSettlement as ft, AppliedMutationDefault as g, assertMutationDefaultGeneratorsAvailable as gt, AnnotationValue as h, assertAnnotationsApplicable as ht, ActivityChildSlot as i, StatementActivity as it, LaneMetaBuilder as j, ExecutionPlan as k, streamStatement as kt, ActivityInterceptResult as l, TransactionActivityOptions as lt, AnnotationSource as m, applyMutationDefaults as mt, ActivityBase as n, ShapeSpec as nt, ActivityContextFields as o, StatementEnded as ot, AnnotationHandle as p, ValidAnnotations as pt, RuntimeCoreOptions as q, ActivityChild as r, StartActivity as rt, ActivityEndedResult as s, StatementOptions as st, Activity as t, Shape as tt, ActivityObserver as u, TransactionActivityRun as ut, ClientActivity as v, checkMiddlewareCompatibility as vt, ClientActivityResult as w, executeStatement as wt, ClientActivityKind as x, createMetaBuilder as xt, ClientActivityEnd as y, collectMutationDefaultGenerators as yt, QueryInterceptResult as z };
|
|
897
|
+
//# sourceMappingURL=runtime-CNRjjEnO.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-CNRjjEnO.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KAqBK;;;;;;;;;;;;UAYK,gBAAgB,SAAS,cAAc;WACtC;WACA;WACA,OAAO;WACP,cAAc,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2C3B,iBAAiB,SAAS,cAAc;GAC/C,OAAO,UAAU,gBAAgB,SAAS;WAClC;WACA,cAAc,YAAY;EACnC,KAAK,QAAQ,mBAAmB;;;KAG7B;WACM;aACE,cAAc;;;WAGhB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;UAwBd,wBAAwB,cAAc;WACrC;WACA,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCjB,iBAAiB,mBAAmB,cAAc,eAAe,SAAS,wBAAwB,WAAW,iBAAiB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsDnJ,iBAAiB,UAAU,eAAe,oBAAoB,yBAAyB,gCAAgC,WAAW,KAAK,GAAG,WAAW,sBAAsB,SAAS,SAAS,UAAU,QAAQ,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;iBAwBtN,4BAA4B,sBAAsB,yBAAyB,kBAAkB,MAAM,eAAe;;;;;;;;;;;;;;;;;cAiBrH;;KAET;;;;;;;;;;iBAU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d;;;;EAIA,IAAI,YAAY,wBAAwB;;UAEhC,2BAA2B,iBAAiB;WAC3C,YAAY,cAAc;WAC1B,SAAS,sBAAsB;;WAE/B,QAAQ;;WAER;;;;;iBAKM,yBAAyB,iBAAiB,iBAAiB,SAAS,2BAA2B,YAAY,QAAQ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiCjJ,YAAY,UAAU;EAC9B,SAAS,GAAG,cAAc,eAAe,YAAY,UAAU,QAAQ,gBAAgB,GAAG;;;;;;;;;;;;UAYlF,gBAAgB,UAAU,uBAAuB,YAAY;WAC5D,aAAa,oBAAoB,yBAAyB;;;;;;;;;;;iBAWpD,kBAAkB,UAAU,eAAe,MAAM,GAAG,uBAAuB,gBAAgB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
3
3
|
import { n as runtimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
4
4
|
//#region ../../../1-framework/1-core/framework-components/dist/runtime.mjs
|
|
5
5
|
/**
|
|
@@ -147,6 +147,56 @@ function isAnnotationValue(value) {
|
|
|
147
147
|
if (value === null || typeof value !== "object") return false;
|
|
148
148
|
return value.__annotation === true;
|
|
149
149
|
}
|
|
150
|
+
/** The children of a transaction or a client activity: which are open, and which have ended and wait to be finalized. */
|
|
151
|
+
var ActivityChildren = class {
|
|
152
|
+
#options;
|
|
153
|
+
#held = [];
|
|
154
|
+
#open = 0;
|
|
155
|
+
#finalized;
|
|
156
|
+
constructor(options) {
|
|
157
|
+
this.#options = options;
|
|
158
|
+
}
|
|
159
|
+
/** The children that have started and not ended. */
|
|
160
|
+
get open() {
|
|
161
|
+
return this.#open;
|
|
162
|
+
}
|
|
163
|
+
add(child) {
|
|
164
|
+
const options = this.#options;
|
|
165
|
+
const entry = options.inTransaction && options.holdFinishedChildren ? {
|
|
166
|
+
child,
|
|
167
|
+
ended: false
|
|
168
|
+
} : void 0;
|
|
169
|
+
if (entry !== void 0) this.#held.push(entry);
|
|
170
|
+
this.#open++;
|
|
171
|
+
let ended = false;
|
|
172
|
+
return {
|
|
173
|
+
statementFailed: options.statementFailed,
|
|
174
|
+
transactionAcceptsChildren: options.transactionAcceptsChildren,
|
|
175
|
+
ended: async (own) => {
|
|
176
|
+
if (ended) return;
|
|
177
|
+
ended = true;
|
|
178
|
+
this.#open--;
|
|
179
|
+
if (!options.inTransaction) {
|
|
180
|
+
options.childFinalized(own);
|
|
181
|
+
await child.finalize(own);
|
|
182
|
+
} else if (this.#finalized !== void 0) await child.finalize(this.#finalized);
|
|
183
|
+
else if (entry !== void 0) entry.ended = true;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/** Finalizes the children that have ended, in start order, with `result`; a child that ends later is finalized with it then. */
|
|
188
|
+
async finalize(result) {
|
|
189
|
+
if (this.#finalized !== void 0) return;
|
|
190
|
+
this.#finalized = result;
|
|
191
|
+
for (const { child, ended } of this.#held.splice(0)) if (ended) await child.finalize(result);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
function notAcceptingChildrenError(parent, reason) {
|
|
195
|
+
return runtimeError("RUNTIME.ACTIVITY_NOT_ACCEPTING_CHILDREN", `An activity was started beneath ${parent.kind === "transaction" ? "a transaction" : `a '${parent.kind}' activity`} ${parent.kind === "transaction" ? "that no longer accepts children: its commit() or rollback() has been called" : reason === "parent" ? "that has ended" : "whose transaction no longer accepts children"}`, {
|
|
196
|
+
parentKind: parent.kind,
|
|
197
|
+
parentId: parent.id
|
|
198
|
+
});
|
|
199
|
+
}
|
|
150
200
|
function createStateStore() {
|
|
151
201
|
let states;
|
|
152
202
|
return {
|
|
@@ -168,14 +218,7 @@ function createActivityRecord(middleware, activity, fields, parent) {
|
|
|
168
218
|
const store = createStateStore();
|
|
169
219
|
let finalized = false;
|
|
170
220
|
let started = middleware.length;
|
|
171
|
-
const
|
|
172
|
-
const parentIsTransaction = parent?.activity.kind === "transaction";
|
|
173
|
-
const ctx = blindCast({
|
|
174
|
-
...fields,
|
|
175
|
-
parent: parentCtx,
|
|
176
|
-
state: store.state,
|
|
177
|
-
inTransaction: () => parentIsTransaction || (parentCtx?.inTransaction() ?? false)
|
|
178
|
-
});
|
|
221
|
+
const ctx = contextBeneath(fields, parent, store);
|
|
179
222
|
return {
|
|
180
223
|
activity,
|
|
181
224
|
ctx,
|
|
@@ -221,6 +264,22 @@ function createActivityRecord(middleware, activity, fields, parent) {
|
|
|
221
264
|
}
|
|
222
265
|
};
|
|
223
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* The context of work that belongs to no activity but runs beneath `parent`, such as compiling a plan outside any statement: `parent` and `inTransaction()` as a child of `parent` would have them, and state of its own.
|
|
269
|
+
*/
|
|
270
|
+
function createContextBeneath(fields, parent) {
|
|
271
|
+
return contextBeneath(fields, parent, createStateStore());
|
|
272
|
+
}
|
|
273
|
+
function contextBeneath(fields, parent, store) {
|
|
274
|
+
const parentCtx = parent?.ctx;
|
|
275
|
+
const parentIsTransaction = parent?.activity.kind === "transaction";
|
|
276
|
+
return blindCast({
|
|
277
|
+
...fields,
|
|
278
|
+
parent: parentCtx,
|
|
279
|
+
state: store.state,
|
|
280
|
+
inTransaction: () => parentIsTransaction || (parentCtx?.inTransaction() ?? false)
|
|
281
|
+
});
|
|
282
|
+
}
|
|
224
283
|
function logHookError(ctx, event, middleware, error) {
|
|
225
284
|
try {
|
|
226
285
|
ctx.log.error({
|
|
@@ -231,17 +290,17 @@ function logHookError(ctx, event, middleware, error) {
|
|
|
231
290
|
} catch {}
|
|
232
291
|
}
|
|
233
292
|
/**
|
|
234
|
-
* Ends an activity: its `activityEnded` hooks, then its finalization, which
|
|
293
|
+
* Ends an activity: its `activityEnded` hooks, then its finalization, which its parent holds or performs, or which happens at once with `own` when it has no parent. The finalization runs even when an `activityEnded` hook fails the activity; that error is rethrown afterwards.
|
|
235
294
|
*/
|
|
236
|
-
async function endActivity(record, result,
|
|
295
|
+
async function endActivity(record, result, own, slot, finalize) {
|
|
237
296
|
let endedError;
|
|
238
297
|
try {
|
|
239
298
|
await record.ended(result);
|
|
240
299
|
} catch (error) {
|
|
241
300
|
endedError = { error };
|
|
242
301
|
}
|
|
243
|
-
if (
|
|
244
|
-
else await
|
|
302
|
+
if (slot === void 0) await finalize(own);
|
|
303
|
+
else await slot.ended(own);
|
|
245
304
|
if (endedError !== void 0) throw endedError.error;
|
|
246
305
|
}
|
|
247
306
|
var AsyncIterableResult = class {
|
|
@@ -288,6 +347,139 @@ var AsyncIterableResult = class {
|
|
|
288
347
|
return this.toArray().then(onfulfilled, onrejected);
|
|
289
348
|
}
|
|
290
349
|
};
|
|
350
|
+
/**
|
|
351
|
+
* Starts a client activity: its `activityStarted` hooks, then each `intercept.onActivity` handler in registration order until one returns a result. When a hook or a handler throws, the activity ends `failed`, is finalized, and the error is rethrown. Rejects at once, running no hook, when `kind` has no hyphen (such as `statement` or `transaction`) or when `parent` no longer accepts children.
|
|
352
|
+
*/
|
|
353
|
+
async function startClientActivity(activity, options) {
|
|
354
|
+
const kind = activity.kind;
|
|
355
|
+
if (!kind.includes("-")) throw runtimeError("RUNTIME.ACTIVITY_KIND_RESERVED", `A client activity kind contains a hyphen, such as 'orm-call', and '${kind}' does not. Kinds without one, such as 'statement' and 'transaction', belong to the runtime.`, { kind });
|
|
356
|
+
const run = new ClientActivityRunImpl(activity, options);
|
|
357
|
+
try {
|
|
358
|
+
await run.start();
|
|
359
|
+
} catch (error) {
|
|
360
|
+
await run.finish({
|
|
361
|
+
outcome: "failed",
|
|
362
|
+
source: "client"
|
|
363
|
+
});
|
|
364
|
+
throw error;
|
|
365
|
+
}
|
|
366
|
+
for (const mw of options.middleware) {
|
|
367
|
+
const intercept = mw.intercept;
|
|
368
|
+
if (intercept?.onActivity === void 0) continue;
|
|
369
|
+
let intercepted;
|
|
370
|
+
try {
|
|
371
|
+
intercepted = await intercept.onActivity(run.activity, run.ctx);
|
|
372
|
+
} catch (error) {
|
|
373
|
+
await run.finish({
|
|
374
|
+
outcome: "failed",
|
|
375
|
+
source: "middleware"
|
|
376
|
+
});
|
|
377
|
+
throw error;
|
|
378
|
+
}
|
|
379
|
+
if (intercepted === void 0) continue;
|
|
380
|
+
run.ctx.log.debug?.({
|
|
381
|
+
event: "middleware.intercept.onActivity",
|
|
382
|
+
middleware: mw.name
|
|
383
|
+
});
|
|
384
|
+
run.intercept(intercepted.result);
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
return run;
|
|
388
|
+
}
|
|
389
|
+
var ClientActivityRunImpl = class {
|
|
390
|
+
activity;
|
|
391
|
+
ctx;
|
|
392
|
+
#record;
|
|
393
|
+
#children;
|
|
394
|
+
#slot;
|
|
395
|
+
#intercepted;
|
|
396
|
+
#ended = false;
|
|
397
|
+
#everythingBeneathCommitted = true;
|
|
398
|
+
constructor(activity, options) {
|
|
399
|
+
this.activity = {
|
|
400
|
+
id: crypto.randomUUID(),
|
|
401
|
+
kind: activity.kind,
|
|
402
|
+
contentHash: activity.contentHash,
|
|
403
|
+
annotations: activity.annotations ?? brandedAnnotations(void 0)
|
|
404
|
+
};
|
|
405
|
+
this.#record = createActivityRecord(options.middleware, this.activity, options.context, options.parent);
|
|
406
|
+
this.ctx = this.#record.ctx;
|
|
407
|
+
this.#children = new ActivityChildren({
|
|
408
|
+
inTransaction: this.ctx.inTransaction(),
|
|
409
|
+
holdFinishedChildren: options.holdFinishedChildren,
|
|
410
|
+
statementFailed: () => this.#slot?.statementFailed(),
|
|
411
|
+
transactionAcceptsChildren: () => this.#slot?.transactionAcceptsChildren() ?? true,
|
|
412
|
+
childFinalized: (result) => {
|
|
413
|
+
if (result.outcome !== "committed") this.#everythingBeneathCommitted = false;
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
this.#slot = options.parent?.adopt(this);
|
|
417
|
+
}
|
|
418
|
+
get intercepted() {
|
|
419
|
+
return this.#intercepted;
|
|
420
|
+
}
|
|
421
|
+
start() {
|
|
422
|
+
return this.#record.started();
|
|
423
|
+
}
|
|
424
|
+
intercept(result) {
|
|
425
|
+
this.#intercepted = { result: blindCast(result) };
|
|
426
|
+
}
|
|
427
|
+
acceptsChildren() {
|
|
428
|
+
return !this.#ended && (this.#slot?.transactionAcceptsChildren() ?? true);
|
|
429
|
+
}
|
|
430
|
+
assertAcceptsChildren() {
|
|
431
|
+
if (this.#ended) throw notAcceptingChildrenError(this.activity, "parent");
|
|
432
|
+
if (!(this.#slot?.transactionAcceptsChildren() ?? true)) throw notAcceptingChildrenError(this.activity, "transaction");
|
|
433
|
+
}
|
|
434
|
+
adopt(child) {
|
|
435
|
+
this.assertAcceptsChildren();
|
|
436
|
+
return this.#children.add(child);
|
|
437
|
+
}
|
|
438
|
+
async end(end) {
|
|
439
|
+
if (this.#ended) throw runtimeError("RUNTIME.ACTIVITY_ALREADY_ENDED", `The '${this.activity.kind}' activity has already ended`, {
|
|
440
|
+
kind: this.activity.kind,
|
|
441
|
+
id: this.activity.id
|
|
442
|
+
});
|
|
443
|
+
const openChildren = this.#children.open;
|
|
444
|
+
if (openChildren > 0) {
|
|
445
|
+
await this.finish({
|
|
446
|
+
outcome: "failed",
|
|
447
|
+
source: "client"
|
|
448
|
+
});
|
|
449
|
+
throw runtimeError("RUNTIME.ACTIVITY_CHILDREN_OPEN", `The '${this.activity.kind}' activity ended while ${openChildren} ${openChildren === 1 ? "activity" : "activities"} beneath it had not ended`, {
|
|
450
|
+
kind: this.activity.kind,
|
|
451
|
+
id: this.activity.id,
|
|
452
|
+
openChildren
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
const intercepted = this.#intercepted;
|
|
456
|
+
if (end.result === void 0 && intercepted !== void 0) await this.finish({
|
|
457
|
+
outcome: end.outcome,
|
|
458
|
+
source: "middleware",
|
|
459
|
+
result: intercepted.result
|
|
460
|
+
});
|
|
461
|
+
else await this.finish({
|
|
462
|
+
outcome: end.outcome,
|
|
463
|
+
source: "client",
|
|
464
|
+
result: end.result
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
async finish(ended) {
|
|
468
|
+
this.#ended = true;
|
|
469
|
+
const result = {
|
|
470
|
+
kind: this.activity.kind,
|
|
471
|
+
outcome: ended.outcome,
|
|
472
|
+
source: ended.source,
|
|
473
|
+
...ifDefined("result", ended.result)
|
|
474
|
+
};
|
|
475
|
+
const own = { outcome: ended.outcome === "succeeded" && this.#everythingBeneathCommitted ? "committed" : "unknown" };
|
|
476
|
+
await endActivity(this.#record, result, own, this.#slot, (finalized) => this.finalize(finalized));
|
|
477
|
+
}
|
|
478
|
+
async finalize(result) {
|
|
479
|
+
await this.#children.finalize(result);
|
|
480
|
+
await this.#record.finalize(result);
|
|
481
|
+
}
|
|
482
|
+
};
|
|
291
483
|
/** Registers every generator the contributors provide, by id. Two contributors providing one id is an error naming both. */
|
|
292
484
|
function collectMutationDefaultGenerators(contributors) {
|
|
293
485
|
const generators = /* @__PURE__ */ new Map();
|
|
@@ -447,7 +639,7 @@ async function raceAgainstAbort(work, signal, phase) {
|
|
|
447
639
|
}
|
|
448
640
|
}
|
|
449
641
|
/**
|
|
450
|
-
* Runs one `query()` statement as an activity. The activity starts on the first `next()`: `activityStarted`, then `body`'s rows, then `activityEnded` and,
|
|
642
|
+
* Runs one `query()` statement as an activity. The activity starts on the first `next()`: `activityStarted`, then `body`'s rows, then `activityEnded` and, unless a transaction holds it, `activityFinalized`. Each fires exactly once, whether the body succeeds, throws (`failed`) or the caller stops reading (`stopped`). When the parent no longer accepts work, the first `next()` rejects and no hook runs.
|
|
451
643
|
*/
|
|
452
644
|
function streamStatement(options, body) {
|
|
453
645
|
return { [Symbol.asyncIterator]() {
|
|
@@ -465,6 +657,7 @@ function streamStatement(options, body) {
|
|
|
465
657
|
}
|
|
466
658
|
async function* streamStatementRows(options, body, isThrownByCaller) {
|
|
467
659
|
const statement = new StatementActivityRunImpl(options, "rows");
|
|
660
|
+
statement.attach();
|
|
468
661
|
let outcome = "stopped";
|
|
469
662
|
try {
|
|
470
663
|
await statement.start();
|
|
@@ -478,10 +671,11 @@ async function* streamStatementRows(options, body, isThrownByCaller) {
|
|
|
478
671
|
}
|
|
479
672
|
}
|
|
480
673
|
/**
|
|
481
|
-
* Runs one `execute()` statement as an activity: `activityStarted`, then `body`, then `activityEnded` and,
|
|
674
|
+
* Runs one `execute()` statement as an activity: `activityStarted`, then `body`, then `activityEnded` and, unless a transaction holds it, `activityFinalized`, each exactly once. When the parent no longer accepts work, it rejects and no hook runs.
|
|
482
675
|
*/
|
|
483
676
|
async function executeStatement(options, body) {
|
|
484
677
|
const statement = new StatementActivityRunImpl(options, "stats");
|
|
678
|
+
statement.attach();
|
|
485
679
|
let outcome = "failed";
|
|
486
680
|
try {
|
|
487
681
|
await statement.start();
|
|
@@ -498,7 +692,7 @@ var StatementActivityRunImpl = class {
|
|
|
498
692
|
#middleware;
|
|
499
693
|
#parent;
|
|
500
694
|
#record;
|
|
501
|
-
#
|
|
695
|
+
#slot;
|
|
502
696
|
#runStartedAt;
|
|
503
697
|
#source = "driver";
|
|
504
698
|
#rowCount = 0;
|
|
@@ -521,12 +715,16 @@ var StatementActivityRunImpl = class {
|
|
|
521
715
|
this.#record = createActivityRecord(options.middleware, this.activity, options.context, options.parent);
|
|
522
716
|
this.ctx = this.#record.ctx;
|
|
523
717
|
}
|
|
718
|
+
/** Adopts the statement into its parent; throws when the parent no longer accepts work. */
|
|
719
|
+
attach() {
|
|
720
|
+
this.#slot = this.#parent?.adopt(this.#record);
|
|
721
|
+
}
|
|
524
722
|
start() {
|
|
525
|
-
this.#childEnded = this.#parent?.adopt(this.#record);
|
|
526
723
|
return this.#record.started();
|
|
527
724
|
}
|
|
528
725
|
end(outcome) {
|
|
529
|
-
|
|
726
|
+
if (outcome === "failed") this.#slot?.statementFailed();
|
|
727
|
+
return endActivity(this.#record, this.#endedResult(outcome), { outcome: outcome === "succeeded" ? "committed" : "unknown" }, this.#slot, this.#record.finalize);
|
|
530
728
|
}
|
|
531
729
|
async beforeEncode(draft, params) {
|
|
532
730
|
for (const mw of this.#middleware) {
|
|
@@ -696,7 +894,7 @@ function checkMiddlewareCompatibility(middleware, runtimeFamilyId, runtimeTarget
|
|
|
696
894
|
*/
|
|
697
895
|
const RelationKeys = Symbol("RelationKeys");
|
|
698
896
|
/**
|
|
699
|
-
* Starts a transaction activity and runs its `activityStarted` hooks. When one of them throws, the transaction ends `failed`, is finalized `rolled-back`, and the error is rethrown.
|
|
897
|
+
* Starts a transaction activity and runs its `activityStarted` hooks. When one of them throws, the transaction ends `failed`, is finalized `rolled-back`, and the error is rethrown. Rejects at once, running no hook, when `parent` no longer accepts children.
|
|
700
898
|
*/
|
|
701
899
|
async function startTransactionActivity(options) {
|
|
702
900
|
const run = new TransactionActivityRunImpl(options);
|
|
@@ -716,61 +914,59 @@ var TransactionActivityRunImpl = class {
|
|
|
716
914
|
activity;
|
|
717
915
|
ctx;
|
|
718
916
|
#record;
|
|
719
|
-
#children
|
|
720
|
-
#
|
|
917
|
+
#children;
|
|
918
|
+
#slot;
|
|
919
|
+
#aStatementFailed = false;
|
|
721
920
|
#ended = false;
|
|
722
|
-
#
|
|
723
|
-
#holdFinishedChildren;
|
|
921
|
+
#acceptingChildren = true;
|
|
724
922
|
constructor(options) {
|
|
725
923
|
this.activity = {
|
|
726
924
|
id: crypto.randomUUID(),
|
|
727
925
|
kind: "transaction",
|
|
728
926
|
annotations: brandedAnnotations(void 0)
|
|
729
927
|
};
|
|
730
|
-
this.#record = createActivityRecord(options.middleware, this.activity, options.context,
|
|
928
|
+
this.#record = createActivityRecord(options.middleware, this.activity, options.context, options.parent);
|
|
731
929
|
this.ctx = this.#record.ctx;
|
|
732
|
-
this.#
|
|
930
|
+
this.#children = new ActivityChildren({
|
|
931
|
+
inTransaction: true,
|
|
932
|
+
holdFinishedChildren: options.holdFinishedChildren,
|
|
933
|
+
statementFailed: () => {
|
|
934
|
+
this.#aStatementFailed = true;
|
|
935
|
+
},
|
|
936
|
+
transactionAcceptsChildren: () => this.#acceptingChildren,
|
|
937
|
+
childFinalized: () => {}
|
|
938
|
+
});
|
|
939
|
+
this.#slot = options.parent?.adopt(this);
|
|
733
940
|
}
|
|
734
941
|
start() {
|
|
735
942
|
return this.#record.started();
|
|
736
943
|
}
|
|
944
|
+
acceptsChildren() {
|
|
945
|
+
return this.#acceptingChildren;
|
|
946
|
+
}
|
|
737
947
|
adopt(child) {
|
|
738
|
-
if (this.#
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
child,
|
|
744
|
-
ended: false
|
|
745
|
-
};
|
|
746
|
-
this.#children.push(entry);
|
|
747
|
-
return async (outcome) => {
|
|
748
|
-
entry.ended = true;
|
|
749
|
-
if (outcome === "failed") this.#aChildFailed = true;
|
|
750
|
-
if (this.#finalized !== void 0) await child.finalize(this.#finalized);
|
|
751
|
-
};
|
|
948
|
+
if (!this.#acceptingChildren) throw notAcceptingChildrenError(this.activity, "parent");
|
|
949
|
+
return this.#children.add(child);
|
|
950
|
+
}
|
|
951
|
+
stopAcceptingChildren() {
|
|
952
|
+
this.#acceptingChildren = false;
|
|
752
953
|
}
|
|
753
954
|
async end(settlement) {
|
|
754
955
|
if (this.#ended) return;
|
|
755
956
|
this.#ended = true;
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
const finalized = this.#finalizedResult(settlement);
|
|
766
|
-
this.#finalized = finalized;
|
|
767
|
-
for (const { child, ended } of this.#children.splice(0)) if (ended) await child.finalize(finalized);
|
|
768
|
-
await this.#record.finalize(finalized);
|
|
769
|
-
if (endedError !== void 0) throw endedError.error;
|
|
957
|
+
this.#acceptingChildren = false;
|
|
958
|
+
await endActivity(this.#record, {
|
|
959
|
+
kind: "transaction",
|
|
960
|
+
outcome: settlement.outcome
|
|
961
|
+
}, this.#finalizedResult(settlement), this.#slot, (result) => this.finalize(result));
|
|
962
|
+
}
|
|
963
|
+
async finalize(result) {
|
|
964
|
+
await this.#children.finalize(result);
|
|
965
|
+
await this.#record.finalize(result);
|
|
770
966
|
}
|
|
771
967
|
#finalizedResult(settlement) {
|
|
772
968
|
if (settlement.by === "rollback") return { outcome: settlement.commitAttempted ? "unknown" : "rolled-back" };
|
|
773
|
-
return { outcome: settlement.outcome === "succeeded" && !this.#
|
|
969
|
+
return { outcome: settlement.outcome === "succeeded" && !this.#aStatementFailed ? "committed" : "unknown" };
|
|
774
970
|
}
|
|
775
971
|
};
|
|
776
972
|
var MetaBuilderImpl = class {
|
|
@@ -804,6 +1000,6 @@ function createMetaBuilder(kind, terminalName) {
|
|
|
804
1000
|
return new MetaBuilderImpl(kind, terminalName);
|
|
805
1001
|
}
|
|
806
1002
|
//#endregion
|
|
807
|
-
export {
|
|
1003
|
+
export { runtimeAborted as _, applyMutationDefaults as a, streamStatement as b, checkAborted as c, createContextBeneath as d, createMetaBuilder as f, raceAgainstAbort as g, executeStatement as h, RuntimeCore as i, checkMiddlewareCompatibility as l, defineAnnotation as m, RUNTIME_ABORTED as n, assertAnnotationsApplicable as o, createStateStore as p, RelationKeys as r, assertMutationDefaultGeneratorsAvailable as s, AsyncIterableResult as t, collectMutationDefaultGenerators as u, startClientActivity as v, startTransactionActivity as y };
|
|
808
1004
|
|
|
809
|
-
//# sourceMappingURL=runtime-
|
|
1005
|
+
//# sourceMappingURL=runtime-DZVNxupx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-DZVNxupx.mjs","names":["#options","#open","#held","#finalized","#record","#children","#slot","#everythingBeneathCommitted","#intercepted","#ended","#middleware","#parent","#endedResult","#runStartedAt","#source","#rowCount","#stats","#aStatementFailed","#acceptingChildren","#finalizedResult","#kind","#terminalName","#annotations"],"sources":["../../../../1-framework/1-core/framework-components/dist/runtime.mjs"],"sourcesContent":["import { n as runtimeError, t as isRuntimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/execution/runtime-error.ts\n/**\n* Stable code emitted by the runtime when an in-flight `execute()`\n* is cancelled via the per-query `AbortSignal`. The envelope's\n* `details.phase` distinguishes where the abort was observed:\n*\n* - `'encode'` — abort fired during `encodeParams` (SQL) or\n* `resolveValue` (Mongo).\n* - `'decode'` — abort fired during `decodeRow` / `decodeField`.\n* - `'stream'` — abort fired between rows or before any codec call\n* (already-aborted at entry).\n* - `'beforeEncode'` / `'onRow'` — abort fired on entry to or during\n* the corresponding middleware phase\n* (cooperative cancellation per the param-transform seam).\n*/\nconst RUNTIME_ABORTED = \"RUNTIME.ABORTED\";\n/**\n* Construct a `RUNTIME.ABORTED` envelope. Phase distinguishes where the\n* abort was observed — codec call sites (`encode` / `decode` / `stream`)\n* or operation-specific middleware seams, as\n* enumerated on {@link RuntimeAbortedPhase}. Cause carries\n* `signal.reason` verbatim from the platform — native abort produces a\n* `DOMException`, explicit `controller.abort(reason)` produces whatever\n* the caller passed. No synthesis happens here.\n*/\nfunction runtimeAborted(phase, cause) {\n\tconst envelope = runtimeError(RUNTIME_ABORTED, `Operation aborted during ${phase}`, { phase });\n\treturn Object.assign(envelope, { cause });\n}\n//#endregion\n//#region src/annotations.ts\n/**\n* Defines a typed annotation handle.\n*\n* Two-step call form. The first step takes the `Payload` type argument\n* (TypeScript cannot infer `Payload` from anything in the options, so it\n* must be supplied explicitly); the second step takes the runtime options\n* and infers `Kinds` from the `applicableTo` array via a `const` type\n* parameter, so the operation kinds appear exactly once at the call site.\n*\n* @example\n* ```typescript\n* // Read-only annotation. Lane terminals like `db.User.first(...)` accept\n* // it; `db.User.create(...)` rejects it at the type level.\n* const cacheAnnotation = defineAnnotation<{ ttl?: number; skip?: boolean }>()({\n* namespace: 'cache',\n* applicableTo: ['read'],\n* }); // Kinds inferred as 'read'\n*\n* // Write-only annotation. Mirror image.\n* const auditAnnotation = defineAnnotation<{ actor: string }>()({\n* namespace: 'audit',\n* applicableTo: ['write'],\n* }); // Kinds inferred as 'write'\n*\n* // Annotation applicable to both kinds (e.g. tracing).\n* const otelAnnotation = defineAnnotation<{ traceId: string }>()({\n* namespace: 'otel',\n* applicableTo: ['read', 'write'],\n* }); // Kinds inferred as 'read' | 'write'\n* ```\n*\n* **Reserved namespaces.** See `DefineAnnotationOptions.namespace` for the\n* list of framework-internal namespaces (`codecs`, target-specific keys).\n* `defineAnnotation` does not structurally prevent a user from naming a\n* reserved namespace, but the framework makes no compatibility guarantee\n* about handles that do.\n*/\nfunction defineAnnotation() {\n\treturn (options) => {\n\t\tconst namespace = options.namespace;\n\t\tconst applicableTo = Object.freeze(new Set(options.applicableTo));\n\t\tfunction handle(value) {\n\t\t\treturn Object.freeze({\n\t\t\t\t__annotation: true,\n\t\t\t\tnamespace,\n\t\t\t\tvalue,\n\t\t\t\tapplicableTo\n\t\t\t});\n\t\t}\n\t\tfunction read(source) {\n\t\t\tconst stored = \"meta\" in source ? source.meta.annotations?.[namespace] : source.annotations.get(namespace);\n\t\t\tif (!isAnnotationValue(stored)) return;\n\t\t\tif (stored.namespace !== namespace) return;\n\t\t\treturn stored.value;\n\t\t}\n\t\treturn Object.freeze(Object.assign(handle, {\n\t\t\tnamespace,\n\t\t\tapplicableTo,\n\t\t\tread\n\t\t}));\n\t};\n}\n/**\n* Runtime applicability gate. Throws `RUNTIME.ANNOTATION_INAPPLICABLE` if\n* any annotation in `annotations` declares an `applicableTo` set that does\n* not include `kind`. Used by lane terminals (SQL DSL builders' `.build()`,\n* ORM `Collection` terminals) to fail closed when the type-level\n* `ValidAnnotations` gate is bypassed via cast / `any` / dynamic\n* invocation.\n*\n* Passes silently on:\n* - empty arrays\n* - annotations whose `applicableTo` includes `kind`\n*\n* Throws on:\n* - any annotation whose `applicableTo` does not include `kind`. The\n* error names the offending annotation's `namespace` and the\n* `terminalName` so users can locate the misuse.\n*\n* @example\n* ```typescript\n* // Inside an ORM read terminal:\n* assertAnnotationsApplicable(annotations, 'read', 'first');\n* ```\n*/\nfunction assertAnnotationsApplicable(annotations, kind, terminalName) {\n\tfor (const annotation of annotations) if (!annotation.applicableTo.has(kind)) throw runtimeError(\"RUNTIME.ANNOTATION_INAPPLICABLE\", `Annotation '${annotation.namespace}' is not applicable to '${kind}' operations (terminal: '${terminalName}'). The annotation declares applicableTo = [${Array.from(annotation.applicableTo).map((k) => `'${k}'`).join(\", \")}].`, {\n\t\tnamespace: annotation.namespace,\n\t\tterminalName,\n\t\tkind,\n\t\tapplicableTo: Array.from(annotation.applicableTo)\n\t});\n}\nconst noAnnotations = /* @__PURE__ */ new Map();\n/** The branded annotation values in a plan's `meta.annotations`, keyed by namespace. */\nfunction brandedAnnotations(annotations) {\n\tif (annotations === void 0) return noAnnotations;\n\tlet branded;\n\tfor (const [namespace, value] of Object.entries(annotations)) {\n\t\tif (!isAnnotationValue(value)) continue;\n\t\tbranded ??= /* @__PURE__ */ new Map();\n\t\tbranded.set(namespace, value);\n\t}\n\treturn branded ?? noAnnotations;\n}\n/**\n* Type guard for branded annotation values stored in `plan.meta.annotations`.\n*\n* Internal — used by `AnnotationHandle.read` to distinguish user\n* annotations (created by calling a handle returned from\n* `defineAnnotation(...)`) from framework-internal metadata that may\n* happen to live under the same namespace key.\n*/\nfunction isAnnotationValue(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\treturn value.__annotation === true;\n}\n//#endregion\n//#region src/execution/activity-lifecycle.ts\n/** The children of a transaction or a client activity: which are open, and which have ended and wait to be finalized. */\nvar ActivityChildren = class {\n\t#options;\n\t#held = [];\n\t#open = 0;\n\t#finalized;\n\tconstructor(options) {\n\t\tthis.#options = options;\n\t}\n\t/** The children that have started and not ended. */\n\tget open() {\n\t\treturn this.#open;\n\t}\n\tadd(child) {\n\t\tconst options = this.#options;\n\t\tconst entry = options.inTransaction && options.holdFinishedChildren ? {\n\t\t\tchild,\n\t\t\tended: false\n\t\t} : void 0;\n\t\tif (entry !== void 0) this.#held.push(entry);\n\t\tthis.#open++;\n\t\tlet ended = false;\n\t\treturn {\n\t\t\tstatementFailed: options.statementFailed,\n\t\t\ttransactionAcceptsChildren: options.transactionAcceptsChildren,\n\t\t\tended: async (own) => {\n\t\t\t\tif (ended) return;\n\t\t\t\tended = true;\n\t\t\t\tthis.#open--;\n\t\t\t\tif (!options.inTransaction) {\n\t\t\t\t\toptions.childFinalized(own);\n\t\t\t\t\tawait child.finalize(own);\n\t\t\t\t} else if (this.#finalized !== void 0) await child.finalize(this.#finalized);\n\t\t\t\telse if (entry !== void 0) entry.ended = true;\n\t\t\t}\n\t\t};\n\t}\n\t/** Finalizes the children that have ended, in start order, with `result`; a child that ends later is finalized with it then. */\n\tasync finalize(result) {\n\t\tif (this.#finalized !== void 0) return;\n\t\tthis.#finalized = result;\n\t\tfor (const { child, ended } of this.#held.splice(0)) if (ended) await child.finalize(result);\n\t}\n};\nfunction notAcceptingChildrenError(parent, reason) {\n\treturn runtimeError(\"RUNTIME.ACTIVITY_NOT_ACCEPTING_CHILDREN\", `An activity was started beneath ${parent.kind === \"transaction\" ? \"a transaction\" : `a '${parent.kind}' activity`} ${parent.kind === \"transaction\" ? \"that no longer accepts children: its commit() or rollback() has been called\" : reason === \"parent\" ? \"that has ended\" : \"whose transaction no longer accepts children\"}`, {\n\t\tparentKind: parent.kind,\n\t\tparentId: parent.id\n\t});\n}\nfunction createStateStore() {\n\tlet states;\n\treturn {\n\t\tstate(key) {\n\t\t\tstates ??= /* @__PURE__ */ new Map();\n\t\t\tlet state = states.get(key);\n\t\t\tif (state === void 0) {\n\t\t\t\tstate = {};\n\t\t\t\tstates.set(key, state);\n\t\t\t}\n\t\t\treturn state;\n\t\t},\n\t\tclear() {\n\t\t\tstates = void 0;\n\t\t}\n\t};\n}\nfunction createActivityRecord(middleware, activity, fields, parent) {\n\tconst store = createStateStore();\n\tlet finalized = false;\n\tlet started = middleware.length;\n\tconst ctx = contextBeneath(fields, parent, store);\n\treturn {\n\t\tactivity,\n\t\tctx,\n\t\tasync started() {\n\t\t\tfor (let index = 0; index < middleware.length; index++) {\n\t\t\t\tconst mw = middleware[index];\n\t\t\t\tif (!mw?.activityStarted) continue;\n\t\t\t\ttry {\n\t\t\t\t\tawait mw.activityStarted(activity, ctx);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tstarted = index + 1;\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync ended(result) {\n\t\t\tlet firstError;\n\t\t\tfor (let index = 0; index < started; index++) {\n\t\t\t\tconst mw = middleware[index];\n\t\t\t\tif (!mw?.activityEnded) continue;\n\t\t\t\ttry {\n\t\t\t\t\tawait mw.activityEnded(activity, result, ctx);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (result.outcome === \"succeeded\") firstError ??= { error };\n\t\t\t\t\telse logHookError(ctx, \"middleware.activityEnded.error\", mw.name, error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (firstError !== void 0) throw firstError.error;\n\t\t},\n\t\tasync finalize(result) {\n\t\t\tif (finalized) return;\n\t\t\tfinalized = true;\n\t\t\tfor (let index = 0; index < started; index++) {\n\t\t\t\tconst mw = middleware[index];\n\t\t\t\tif (!mw?.activityFinalized) continue;\n\t\t\t\ttry {\n\t\t\t\t\tawait mw.activityFinalized(activity, result, ctx);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tlogHookError(ctx, \"middleware.activityFinalized.error\", mw.name, error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstore.clear();\n\t\t}\n\t};\n}\n/**\n* The context of work that belongs to no activity but runs beneath `parent`, such as compiling a plan outside any statement: `parent` and `inTransaction()` as a child of `parent` would have them, and state of its own.\n*/\nfunction createContextBeneath(fields, parent) {\n\treturn contextBeneath(fields, parent, createStateStore());\n}\nfunction contextBeneath(fields, parent, store) {\n\tconst parentCtx = parent?.ctx;\n\tconst parentIsTransaction = parent?.activity.kind === \"transaction\";\n\treturn blindCast({\n\t\t...fields,\n\t\tparent: parentCtx,\n\t\tstate: store.state,\n\t\tinTransaction: () => parentIsTransaction || (parentCtx?.inTransaction() ?? false)\n\t});\n}\nfunction logHookError(ctx, event, middleware, error) {\n\ttry {\n\t\tctx.log.error({\n\t\t\tevent,\n\t\t\tmiddleware,\n\t\t\terror\n\t\t});\n\t} catch {}\n}\n/**\n* Ends an activity: its `activityEnded` hooks, then its finalization, which its parent holds or performs, or which happens at once with `own` when it has no parent. The finalization runs even when an `activityEnded` hook fails the activity; that error is rethrown afterwards.\n*/\nasync function endActivity(record, result, own, slot, finalize) {\n\tlet endedError;\n\ttry {\n\t\tawait record.ended(result);\n\t} catch (error) {\n\t\tendedError = { error };\n\t}\n\tif (slot === void 0) await finalize(own);\n\telse await slot.ended(own);\n\tif (endedError !== void 0) throw endedError.error;\n}\n//#endregion\n//#region src/execution/async-iterable-result.ts\nvar AsyncIterableResult = class {\n\tgenerator;\n\tconsumed = false;\n\tconsumedBy;\n\tbufferedArrayPromise;\n\tconstructor(generator) {\n\t\tthis.generator = generator;\n\t}\n\t[Symbol.asyncIterator]() {\n\t\tif (this.consumed) throw runtimeError(\"RUNTIME.ITERATOR_CONSUMED\", `AsyncIterableResult iterator has already been consumed via ${this.consumedBy === \"bufferedArray\" ? \"toArray()/then()\" : \"for-await loop\"}. Each AsyncIterableResult can only be iterated once.`, {\n\t\t\tconsumedBy: this.consumedBy,\n\t\t\tsuggestion: this.consumedBy === \"bufferedArray\" ? \"If you need to iterate multiple times, store the results from toArray() in a variable and reuse that.\" : \"If you need to iterate multiple times, use toArray() to collect all results first.\"\n\t\t});\n\t\tthis.consumed = true;\n\t\tthis.consumedBy = \"iterator\";\n\t\treturn this.generator;\n\t}\n\ttoArray() {\n\t\tif (this.consumedBy === \"iterator\") return Promise.reject(runtimeError(\"RUNTIME.ITERATOR_CONSUMED\", \"AsyncIterableResult iterator has already been consumed via for-await loop. Each AsyncIterableResult can only be iterated once.\", {\n\t\t\tconsumedBy: this.consumedBy,\n\t\t\tsuggestion: \"The iterator was already consumed by a for-await loop. Use toArray() or await the result before iterating.\"\n\t\t}));\n\t\tif (this.bufferedArrayPromise) return this.bufferedArrayPromise;\n\t\tthis.consumed = true;\n\t\tthis.consumedBy = \"bufferedArray\";\n\t\tthis.bufferedArrayPromise = (async () => {\n\t\t\tconst out = [];\n\t\t\tfor await (const item of this.generator) out.push(item);\n\t\t\treturn out;\n\t\t})();\n\t\treturn this.bufferedArrayPromise;\n\t}\n\tasync first() {\n\t\treturn (await this.toArray())[0] ?? null;\n\t}\n\tasync firstOrThrow() {\n\t\tconst row = await this.first();\n\t\tif (row === null) throw runtimeError(\"RUNTIME.NO_ROWS\", \"Expected at least one row, but none were returned\", {});\n\t\treturn row;\n\t}\n\tthen(onfulfilled, onrejected) {\n\t\treturn this.toArray().then(onfulfilled, onrejected);\n\t}\n};\n//#endregion\n//#region src/execution/client-activity.ts\n/**\n* Starts a client activity: its `activityStarted` hooks, then each `intercept.onActivity` handler in registration order until one returns a result. When a hook or a handler throws, the activity ends `failed`, is finalized, and the error is rethrown. Rejects at once, running no hook, when `kind` has no hyphen (such as `statement` or `transaction`) or when `parent` no longer accepts children.\n*/\nasync function startClientActivity(activity, options) {\n\tconst kind = activity.kind;\n\tif (!kind.includes(\"-\")) throw runtimeError(\"RUNTIME.ACTIVITY_KIND_RESERVED\", `A client activity kind contains a hyphen, such as 'orm-call', and '${kind}' does not. Kinds without one, such as 'statement' and 'transaction', belong to the runtime.`, { kind });\n\tconst run = new ClientActivityRunImpl(activity, options);\n\ttry {\n\t\tawait run.start();\n\t} catch (error) {\n\t\tawait run.finish({\n\t\t\toutcome: \"failed\",\n\t\t\tsource: \"client\"\n\t\t});\n\t\tthrow error;\n\t}\n\tfor (const mw of options.middleware) {\n\t\tconst intercept = mw.intercept;\n\t\tif (intercept?.onActivity === void 0) continue;\n\t\tlet intercepted;\n\t\ttry {\n\t\t\tintercepted = await intercept.onActivity(run.activity, run.ctx);\n\t\t} catch (error) {\n\t\t\tawait run.finish({\n\t\t\t\toutcome: \"failed\",\n\t\t\t\tsource: \"middleware\"\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t\tif (intercepted === void 0) continue;\n\t\trun.ctx.log.debug?.({\n\t\t\tevent: \"middleware.intercept.onActivity\",\n\t\t\tmiddleware: mw.name\n\t\t});\n\t\trun.intercept(intercepted.result);\n\t\tbreak;\n\t}\n\treturn run;\n}\nvar ClientActivityRunImpl = class {\n\tactivity;\n\tctx;\n\t#record;\n\t#children;\n\t#slot;\n\t#intercepted;\n\t#ended = false;\n\t#everythingBeneathCommitted = true;\n\tconstructor(activity, options) {\n\t\tthis.activity = {\n\t\t\tid: crypto.randomUUID(),\n\t\t\tkind: activity.kind,\n\t\t\tcontentHash: activity.contentHash,\n\t\t\tannotations: activity.annotations ?? brandedAnnotations(void 0)\n\t\t};\n\t\tthis.#record = createActivityRecord(options.middleware, this.activity, options.context, options.parent);\n\t\tthis.ctx = this.#record.ctx;\n\t\tthis.#children = new ActivityChildren({\n\t\t\tinTransaction: this.ctx.inTransaction(),\n\t\t\tholdFinishedChildren: options.holdFinishedChildren,\n\t\t\tstatementFailed: () => this.#slot?.statementFailed(),\n\t\t\ttransactionAcceptsChildren: () => this.#slot?.transactionAcceptsChildren() ?? true,\n\t\t\tchildFinalized: (result) => {\n\t\t\t\tif (result.outcome !== \"committed\") this.#everythingBeneathCommitted = false;\n\t\t\t}\n\t\t});\n\t\tthis.#slot = options.parent?.adopt(this);\n\t}\n\tget intercepted() {\n\t\treturn this.#intercepted;\n\t}\n\tstart() {\n\t\treturn this.#record.started();\n\t}\n\tintercept(result) {\n\t\tthis.#intercepted = { result: blindCast(result) };\n\t}\n\tacceptsChildren() {\n\t\treturn !this.#ended && (this.#slot?.transactionAcceptsChildren() ?? true);\n\t}\n\tassertAcceptsChildren() {\n\t\tif (this.#ended) throw notAcceptingChildrenError(this.activity, \"parent\");\n\t\tif (!(this.#slot?.transactionAcceptsChildren() ?? true)) throw notAcceptingChildrenError(this.activity, \"transaction\");\n\t}\n\tadopt(child) {\n\t\tthis.assertAcceptsChildren();\n\t\treturn this.#children.add(child);\n\t}\n\tasync end(end) {\n\t\tif (this.#ended) throw runtimeError(\"RUNTIME.ACTIVITY_ALREADY_ENDED\", `The '${this.activity.kind}' activity has already ended`, {\n\t\t\tkind: this.activity.kind,\n\t\t\tid: this.activity.id\n\t\t});\n\t\tconst openChildren = this.#children.open;\n\t\tif (openChildren > 0) {\n\t\t\tawait this.finish({\n\t\t\t\toutcome: \"failed\",\n\t\t\t\tsource: \"client\"\n\t\t\t});\n\t\t\tthrow runtimeError(\"RUNTIME.ACTIVITY_CHILDREN_OPEN\", `The '${this.activity.kind}' activity ended while ${openChildren} ${openChildren === 1 ? \"activity\" : \"activities\"} beneath it had not ended`, {\n\t\t\t\tkind: this.activity.kind,\n\t\t\t\tid: this.activity.id,\n\t\t\t\topenChildren\n\t\t\t});\n\t\t}\n\t\tconst intercepted = this.#intercepted;\n\t\tif (end.result === void 0 && intercepted !== void 0) await this.finish({\n\t\t\toutcome: end.outcome,\n\t\t\tsource: \"middleware\",\n\t\t\tresult: intercepted.result\n\t\t});\n\t\telse await this.finish({\n\t\t\toutcome: end.outcome,\n\t\t\tsource: \"client\",\n\t\t\tresult: end.result\n\t\t});\n\t}\n\tasync finish(ended) {\n\t\tthis.#ended = true;\n\t\tconst result = {\n\t\t\tkind: this.activity.kind,\n\t\t\toutcome: ended.outcome,\n\t\t\tsource: ended.source,\n\t\t\t...ifDefined(\"result\", ended.result)\n\t\t};\n\t\tconst own = { outcome: ended.outcome === \"succeeded\" && this.#everythingBeneathCommitted ? \"committed\" : \"unknown\" };\n\t\tawait endActivity(this.#record, result, own, this.#slot, (finalized) => this.finalize(finalized));\n\t}\n\tasync finalize(result) {\n\t\tawait this.#children.finalize(result);\n\t\tawait this.#record.finalize(result);\n\t}\n};\n//#endregion\n//#region src/execution/mutation-defaults.ts\n/** Registers every generator the contributors provide, by id. Two contributors providing one id is an error naming both. */\nfunction collectMutationDefaultGenerators(contributors) {\n\tconst generators = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const contributor of contributors) {\n\t\tconst nextGenerators = contributor.mutationDefaultGenerators?.() ?? [];\n\t\tfor (const generator of nextGenerators) {\n\t\t\tconst existingOwner = owners.get(generator.id);\n\t\t\tif (existingOwner !== void 0) throw runtimeError(\"RUNTIME.DUPLICATE_MUTATION_DEFAULT_GENERATOR\", `Duplicate mutation default generator '${generator.id}'.`, {\n\t\t\t\tid: generator.id,\n\t\t\t\texistingOwner,\n\t\t\t\tincomingOwner: contributor.id\n\t\t\t});\n\t\t\tgenerators.set(generator.id, generator);\n\t\t\towners.set(generator.id, contributor.id);\n\t\t}\n\t}\n\treturn generators;\n}\n/** Fails when the contract's mutation defaults name a generator the registry does not hold, listing every missing id and the fields that need it. */\nfunction assertMutationDefaultGeneratorsAvailable(execution, generatorRegistry) {\n\tconst defaults = execution?.mutations.defaults ?? [];\n\tif (defaults.length === 0) return;\n\tconst fieldsById = /* @__PURE__ */ new Map();\n\tfor (const mutationDefault of defaults) {\n\t\tconst phaseIds = new Set([mutationDefault.onCreate, mutationDefault.onUpdate].flatMap((phase) => phase?.kind === \"generator\" && !generatorRegistry.has(phase.id) ? [phase.id] : []));\n\t\tfor (const id of phaseIds) {\n\t\t\tconst fields = fieldsById.get(id) ?? [];\n\t\t\tfields.push(`${mutationDefault.ref.entry}.${mutationDefault.ref.field}`);\n\t\t\tfieldsById.set(id, fields);\n\t\t}\n\t}\n\tif (fieldsById.size === 0) return;\n\tconst ids = [...fieldsById.keys()];\n\tconst needs = [...fieldsById].map(([id, fields]) => `'${id}' for ${listInProse(fields)}`);\n\tthrow runtimeError(\"RUNTIME.MUTATION_DEFAULT_GENERATOR_MISSING\", `${ids.length === 1 ? `Contract requires mutation default generator ${needs[0]}, but no runtime component in the execution stack provides it.` : `Contract requires mutation default generators ${listInProse(needs)}, but no runtime component in the execution stack provides them.`} ${WHERE_GENERATORS_COME_FROM}`, {\n\t\tids,\n\t\tfields: [...fieldsById.values()].flat()\n\t});\n}\nconst WHERE_GENERATORS_COME_FROM = \"Built-in generators such as 'timestampNow' come from the database adapter's runtime descriptor, and others from the extension pack that defines them; include that component in the execution stack.\";\nfunction listInProse(items) {\n\treturn items.length > 1 ? `${items.slice(0, -1).join(\", \")} and ${items.at(-1)}` : items.join(\"\");\n}\nfunction computeExecutionDefaultValue(spec, generatorRegistry) {\n\tconst generator = generatorRegistry.get(spec.id);\n\tif (!generator) throw runtimeError(\"RUNTIME.MUTATION_DEFAULT_GENERATOR_MISSING\", `Contract references mutation default generator '${spec.id}' but no runtime component in the execution stack provides it. ${WHERE_GENERATORS_COME_FROM}`, { id: spec.id });\n\treturn generator.generate(spec.params);\n}\n/**\n* The defaults to write for one record: for each mutation default of the entry and namespace whose phase matches `op`, the generated value of every field the values do not carry. An update with no keys gets none.\n*/\nfunction applyMutationDefaults(execution, generatorRegistry, options) {\n\tconst defaults = execution?.mutations.defaults ?? [];\n\tif (defaults.length === 0) return [];\n\tconst isEmptyUpdate = options.op === \"update\" && Object.keys(options.values).length === 0;\n\tconst applied = [];\n\tconst appliedFields = /* @__PURE__ */ new Set();\n\tconst rowCache = /* @__PURE__ */ new Map();\n\tfor (const mutationDefault of defaults) {\n\t\tif (mutationDefault.ref.entry !== options.entry) continue;\n\t\tif (mutationDefault.ref.namespace !== options.namespace) continue;\n\t\tconst defaultSpec = options.op === \"create\" ? mutationDefault.onCreate : mutationDefault.onUpdate;\n\t\tif (!defaultSpec) continue;\n\t\tif (isEmptyUpdate) continue;\n\t\tconst fieldName = mutationDefault.ref.field;\n\t\tif (Object.hasOwn(options.values, fieldName) || appliedFields.has(fieldName)) continue;\n\t\tapplied.push({\n\t\t\tfield: fieldName,\n\t\t\tvalue: resolveScopedValue(defaultSpec, generatorRegistry, rowCache, options.defaultValueCache)\n\t\t});\n\t\tappliedFields.add(fieldName);\n\t}\n\treturn applied;\n}\nfunction resolveScopedValue(spec, generatorRegistry, rowCache, queryCache) {\n\tconst cache = scopedCache(generatorRegistry.get(spec.id)?.stability, rowCache, queryCache);\n\tif (!cache) return computeExecutionDefaultValue(spec, generatorRegistry);\n\tif (cache.has(spec.id)) return cache.get(spec.id);\n\tconst value = computeExecutionDefaultValue(spec, generatorRegistry);\n\tcache.set(spec.id, value);\n\treturn value;\n}\nfunction scopedCache(stability, rowCache, queryCache) {\n\tswitch (stability) {\n\t\tcase \"row\": return rowCache;\n\t\tcase \"query\": return queryCache;\n\t\tdefault: return;\n\t}\n}\n//#endregion\n//#region src/execution/race-against-abort.ts\n/**\n* Throw a phase-tagged `RUNTIME.ABORTED` envelope if the supplied\n* context is already aborted at the precheck site. Centralises the\n* `if (ctx.signal?.aborted) throw runtimeAborted(...)` pattern that\n* every codec dispatch site (and the `beforeEncode` middleware phase)\n* repeats. Accepts both the framework `CodecCallContext` and the\n* `ActivityContext`; both expose `signal?: AbortSignal`.\n*/\nfunction checkAborted(ctx, phase) {\n\tif (ctx.signal?.aborted) throw runtimeAborted(phase, ctx.signal.reason);\n}\n/**\n* Race a per-cell `Promise.all` (or any other in-flight work promise) against\n* the supplied abort signal so the runtime returns `RUNTIME.ABORTED` promptly\n* even when codec bodies ignore the signal. In-flight bodies that ignore the\n* signal are abandoned and run to completion in the background — the\n* cooperative-cancellation contract documented in ADR 204.\n*\n* Call sites still SHOULD pre-check `signal.aborted` and short-circuit with\n* a phase-tagged `RUNTIME.ABORTED` envelope before invoking this helper —\n* that path is the canonical \"aborted at entry\" surface and avoids\n* scheduling the work promise. As a defensive belt-and-braces, this helper\n* also handles the already-aborted case internally: `AbortSignal` does not\n* replay past abort events to listeners registered after the abort, so we\n* inspect `signal.aborted` synchronously and reject with the sentinel\n* before installing the listener. The rejection is still attributed to the\n* abort path via the sentinel-identity check.\n*\n* Distinguishing the rejection source is load-bearing for AC-ERR4\n* (`RUNTIME.ENCODE_FAILED` / `RUNTIME.DECODE_FAILED` pass through unchanged).\n* The semantically equivalent `abortable(signal)` helper in\n* `@internal/utils` rejects with `signal.reason ?? new DOMException(...)`,\n* which is not stably distinguishable from a codec-thrown error by identity\n* alone (a fresh fallback DOMException is allocated per call). We instead\n* track abort attribution with a unique sentinel: only the `onAbort` listener\n* installed here ever rejects with the sentinel, so an `error === sentinel`\n* identity check after the race is unambiguous.\n*\n* Lives in `framework-components` (rather than the SQL family, where it\n* originated in m2) so every family runtime that needs cooperative\n* cancellation around a codec-dispatch `Promise.all` (SQL encode + decode\n* today, Mongo encode in m3) shares the same attribution logic.\n*/\nasync function raceAgainstAbort(work, signal, phase) {\n\tif (signal === void 0) return await work;\n\tconst sentinel = { reason: void 0 };\n\tlet onAbort;\n\tconst abortPromise = new Promise((_, reject) => {\n\t\tif (signal.aborted) {\n\t\t\tsentinel.reason = signal.reason;\n\t\t\treject(sentinel);\n\t\t\treturn;\n\t\t}\n\t\tonAbort = () => {\n\t\t\tsentinel.reason = signal.reason;\n\t\t\treject(sentinel);\n\t\t};\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t});\n\ttry {\n\t\treturn await Promise.race([work, abortPromise]);\n\t} catch (error) {\n\t\tif (error === sentinel) throw runtimeAborted(phase, sentinel.reason);\n\t\tthrow error;\n\t} finally {\n\t\tif (onAbort) signal.removeEventListener(\"abort\", onAbort);\n\t}\n}\n//#endregion\n//#region src/execution/run-with-middleware.ts\n/**\n* Runs one `query()` statement as an activity. The activity starts on the first `next()`: `activityStarted`, then `body`'s rows, then `activityEnded` and, unless a transaction holds it, `activityFinalized`. Each fires exactly once, whether the body succeeds, throws (`failed`) or the caller stops reading (`stopped`). When the parent no longer accepts work, the first `next()` rejects and no hook runs.\n*/\nfunction streamStatement(options, body) {\n\treturn { [Symbol.asyncIterator]() {\n\t\tlet thrownByCaller;\n\t\tconst generator = streamStatementRows(options, body, (error) => thrownByCaller !== void 0 && thrownByCaller.error === error);\n\t\treturn {\n\t\t\tnext: () => generator.next(),\n\t\t\treturn: () => generator.return(void 0),\n\t\t\tthrow: (error) => {\n\t\t\t\tthrownByCaller = { error };\n\t\t\t\treturn generator.throw(error);\n\t\t\t}\n\t\t};\n\t} };\n}\nasync function* streamStatementRows(options, body, isThrownByCaller) {\n\tconst statement = new StatementActivityRunImpl(options, \"rows\");\n\tstatement.attach();\n\tlet outcome = \"stopped\";\n\ttry {\n\t\tawait statement.start();\n\t\tyield* body(statement);\n\t\toutcome = \"succeeded\";\n\t} catch (error) {\n\t\tif (!isThrownByCaller(error)) outcome = \"failed\";\n\t\tthrow error;\n\t} finally {\n\t\tawait statement.end(outcome);\n\t}\n}\n/**\n* Runs one `execute()` statement as an activity: `activityStarted`, then `body`, then `activityEnded` and, unless a transaction holds it, `activityFinalized`, each exactly once. When the parent no longer accepts work, it rejects and no hook runs.\n*/\nasync function executeStatement(options, body) {\n\tconst statement = new StatementActivityRunImpl(options, \"stats\");\n\tstatement.attach();\n\tlet outcome = \"failed\";\n\ttry {\n\t\tawait statement.start();\n\t\tconst stats = await body(statement);\n\t\toutcome = \"succeeded\";\n\t\treturn stats;\n\t} finally {\n\t\tawait statement.end(outcome);\n\t}\n}\nvar StatementActivityRunImpl = class {\n\tactivity;\n\tctx;\n\t#middleware;\n\t#parent;\n\t#record;\n\t#slot;\n\t#runStartedAt;\n\t#source = \"driver\";\n\t#rowCount = 0;\n\t#stats;\n\tconstructor(options, returns) {\n\t\tconst { plan } = options;\n\t\tlet annotations;\n\t\tthis.activity = {\n\t\t\tid: crypto.randomUUID(),\n\t\t\tkind: \"statement\",\n\t\t\treturns,\n\t\t\tplan,\n\t\t\tget annotations() {\n\t\t\t\tannotations ??= brandedAnnotations(plan.meta.annotations);\n\t\t\t\treturn annotations;\n\t\t\t}\n\t\t};\n\t\tthis.#middleware = options.middleware;\n\t\tthis.#parent = options.parent;\n\t\tthis.#record = createActivityRecord(options.middleware, this.activity, options.context, options.parent);\n\t\tthis.ctx = this.#record.ctx;\n\t}\n\t/** Adopts the statement into its parent; throws when the parent no longer accepts work. */\n\tattach() {\n\t\tthis.#slot = this.#parent?.adopt(this.#record);\n\t}\n\tstart() {\n\t\treturn this.#record.started();\n\t}\n\tend(outcome) {\n\t\tif (outcome === \"failed\") this.#slot?.statementFailed();\n\t\treturn endActivity(this.#record, this.#endedResult(outcome), { outcome: outcome === \"succeeded\" ? \"committed\" : \"unknown\" }, this.#slot, this.#record.finalize);\n\t}\n\tasync beforeEncode(draft, params) {\n\t\tfor (const mw of this.#middleware) {\n\t\t\tif (!mw.beforeEncode) continue;\n\t\t\tcheckAborted(this.ctx, \"beforeEncode\");\n\t\t\tconst work = mw.beforeEncode(draft, this.ctx, params);\n\t\t\tif (work !== void 0) await raceAgainstAbort(Promise.resolve(work), this.ctx.signal, \"beforeEncode\");\n\t\t}\n\t}\n\tasync *runQuery(exec, runDriver) {\n\t\tthis.#runStartedAt = Date.now();\n\t\tlet rows;\n\t\tfor (const mw of this.#middleware) {\n\t\t\tconst intercept = mw.intercept;\n\t\t\tif (intercept?.onQuery === void 0) continue;\n\t\t\tthis.#source = \"middleware\";\n\t\t\tconst result = await intercept.onQuery(exec, this.ctx);\n\t\t\tif (result === void 0) {\n\t\t\t\tthis.#source = \"driver\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.ctx.log.debug?.({\n\t\t\t\tevent: \"middleware.intercept.onQuery\",\n\t\t\t\tmiddleware: mw.name\n\t\t\t});\n\t\t\trows = blindCast(result.rows);\n\t\t\tbreak;\n\t\t}\n\t\tif (rows === void 0) {\n\t\t\tfor await (const row of runDriver()) {\n\t\t\t\tfor (const mw of this.#middleware) if (mw.onRow) await mw.onRow(blindCast(row), exec, this.ctx);\n\t\t\t\tthis.#rowCount++;\n\t\t\t\tyield row;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tfor await (const row of rows) {\n\t\t\tthis.#rowCount++;\n\t\t\tyield row;\n\t\t}\n\t}\n\tasync runExecute(exec, runDriver) {\n\t\tthis.#runStartedAt = Date.now();\n\t\tfor (const mw of this.#middleware) {\n\t\t\tconst intercept = mw.intercept;\n\t\t\tif (intercept?.onExecute === void 0) continue;\n\t\t\tthis.#source = \"middleware\";\n\t\t\tconst result = await intercept.onExecute(exec, this.ctx);\n\t\t\tif (result === void 0) {\n\t\t\t\tthis.#source = \"driver\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.ctx.log.debug?.({\n\t\t\t\tevent: \"middleware.intercept.onExecute\",\n\t\t\t\tmiddleware: mw.name\n\t\t\t});\n\t\t\tthis.#stats = result.stats;\n\t\t\treturn result.stats;\n\t\t}\n\t\tthis.#stats = await runDriver();\n\t\treturn this.#stats;\n\t}\n\t#endedResult(outcome) {\n\t\tconst base = {\n\t\t\tkind: \"statement\",\n\t\t\toutcome,\n\t\t\tlatencyMs: this.#runStartedAt === void 0 ? 0 : Date.now() - this.#runStartedAt,\n\t\t\tsource: this.#source\n\t\t};\n\t\tif (this.activity.returns === \"rows\") return {\n\t\t\t...base,\n\t\t\treturns: \"rows\",\n\t\t\trowCount: this.#rowCount\n\t\t};\n\t\treturn outcome === \"succeeded\" && this.#stats !== void 0 ? {\n\t\t\t...base,\n\t\t\treturns: \"stats\",\n\t\t\tstats: this.#stats\n\t\t} : {\n\t\t\t...base,\n\t\t\treturns: \"stats\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/execution/runtime-core.ts\n/**\n* Family-agnostic abstract runtime base. Each `query()` and `execute()` call is one statement activity, run in this order: `activityStarted`, `runBeforeCompile`, `lower`, `beforeEncode`, `intercept`, the driver with `onRow`, `activityEnded`, then `activityFinalized`. It has no parent, so it is finalized right after it ends.\n*\n* Concrete subclasses implement `lower`, `runDriver`, `runExecute` and `close`.\n*/\nvar RuntimeCore = class {\n\tmiddleware;\n\tctx;\n\tconstructor(options) {\n\t\tthis.middleware = [...options.middleware];\n\t\tthis.ctx = options.ctx;\n\t}\n\t/** Pre-lowering hook for plan rewriting. Defaults to identity. */\n\trunBeforeCompile(plan) {\n\t\treturn plan;\n\t}\n\tquery(plan, options) {\n\t\tconst self = this;\n\t\tconst codecCtx = codecContextOf(options);\n\t\tconst statement = streamStatement({\n\t\t\tmiddleware: this.middleware,\n\t\t\tplan,\n\t\t\tcontext: this.contextFieldsFor(codecCtx, options),\n\t\t\tparent: void 0\n\t\t}, async function* (run) {\n\t\t\tcheckAborted(codecCtx, \"stream\");\n\t\t\tconst compiled = await self.runBeforeCompile(plan);\n\t\t\tconst exec = await self.lower(compiled, codecCtx);\n\t\t\tawait run.beforeEncode(exec);\n\t\t\tyield* run.runQuery(exec, () => blindCast(self.runDriver(exec)));\n\t\t});\n\t\tasync function* generator() {\n\t\t\tyield* statement;\n\t\t}\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\texecute(plan, options) {\n\t\tconst codecCtx = codecContextOf(options);\n\t\treturn executeStatement({\n\t\t\tmiddleware: this.middleware,\n\t\t\tplan,\n\t\t\tcontext: this.contextFieldsFor(codecCtx, options),\n\t\t\tparent: void 0\n\t\t}, async (run) => {\n\t\t\tcheckAborted(codecCtx, \"stream\");\n\t\t\tconst compiled = await this.runBeforeCompile(plan);\n\t\t\tconst exec = await this.lower(compiled, codecCtx);\n\t\t\tawait run.beforeEncode(exec);\n\t\t\treturn run.runExecute(exec, () => this.runExecute(exec));\n\t\t});\n\t}\n\tcontextFieldsFor(codecCtx, options) {\n\t\treturn {\n\t\t\t...this.ctx,\n\t\t\t...codecCtx,\n\t\t\tscope: options?.scope ?? this.ctx.scope\n\t\t};\n\t}\n};\nfunction codecContextOf(options) {\n\tconst signal = options?.signal;\n\treturn signal === void 0 ? {} : { signal };\n}\n//#endregion\n//#region src/execution/runtime-middleware.ts\nfunction checkMiddlewareCompatibility(middleware, runtimeFamilyId, runtimeTargetId) {\n\tif (middleware.targetId !== void 0 && middleware.familyId === void 0) throw runtimeError(\"RUNTIME.MIDDLEWARE_INCOMPATIBLE\", `Middleware '${middleware.name}' specifies targetId '${middleware.targetId}' without familyId`, {\n\t\tmiddleware: middleware.name,\n\t\ttargetId: middleware.targetId\n\t});\n\tif (middleware.familyId !== void 0 && middleware.familyId !== runtimeFamilyId) throw runtimeError(\"RUNTIME.MIDDLEWARE_FAMILY_MISMATCH\", `Middleware '${middleware.name}' requires family '${middleware.familyId}' but the runtime is configured for family '${runtimeFamilyId}'`, {\n\t\tmiddleware: middleware.name,\n\t\tmiddlewareFamilyId: middleware.familyId,\n\t\truntimeFamilyId\n\t});\n\tif (middleware.targetId !== void 0 && middleware.targetId !== runtimeTargetId) throw runtimeError(\"RUNTIME.MIDDLEWARE_TARGET_MISMATCH\", `Middleware '${middleware.name}' requires target '${middleware.targetId}' but the runtime is configured for target '${runtimeTargetId}'`, {\n\t\tmiddleware: middleware.name,\n\t\tmiddlewareTargetId: middleware.targetId,\n\t\truntimeTargetId\n\t});\n}\n//#endregion\n//#region src/execution/shape.ts\n/**\n* Phantom key an emitted model type carries to name its relation properties.\n* Never present at runtime; `Scalars` and `Shape` read it to tell relations from fields.\n*/\nconst RelationKeys = Symbol(\"RelationKeys\");\n//#endregion\n//#region src/execution/transaction-activity.ts\n/**\n* Starts a transaction activity and runs its `activityStarted` hooks. When one of them throws, the transaction ends `failed`, is finalized `rolled-back`, and the error is rethrown. Rejects at once, running no hook, when `parent` no longer accepts children.\n*/\nasync function startTransactionActivity(options) {\n\tconst run = new TransactionActivityRunImpl(options);\n\ttry {\n\t\tawait run.start();\n\t} catch (error) {\n\t\tawait run.end({\n\t\t\tby: \"rollback\",\n\t\t\toutcome: \"failed\",\n\t\t\tcommitAttempted: false\n\t\t});\n\t\tthrow error;\n\t}\n\treturn run;\n}\nvar TransactionActivityRunImpl = class {\n\tactivity;\n\tctx;\n\t#record;\n\t#children;\n\t#slot;\n\t#aStatementFailed = false;\n\t#ended = false;\n\t#acceptingChildren = true;\n\tconstructor(options) {\n\t\tthis.activity = {\n\t\t\tid: crypto.randomUUID(),\n\t\t\tkind: \"transaction\",\n\t\t\tannotations: brandedAnnotations(void 0)\n\t\t};\n\t\tthis.#record = createActivityRecord(options.middleware, this.activity, options.context, options.parent);\n\t\tthis.ctx = this.#record.ctx;\n\t\tthis.#children = new ActivityChildren({\n\t\t\tinTransaction: true,\n\t\t\tholdFinishedChildren: options.holdFinishedChildren,\n\t\t\tstatementFailed: () => {\n\t\t\t\tthis.#aStatementFailed = true;\n\t\t\t},\n\t\t\ttransactionAcceptsChildren: () => this.#acceptingChildren,\n\t\t\tchildFinalized: () => {}\n\t\t});\n\t\tthis.#slot = options.parent?.adopt(this);\n\t}\n\tstart() {\n\t\treturn this.#record.started();\n\t}\n\tacceptsChildren() {\n\t\treturn this.#acceptingChildren;\n\t}\n\tadopt(child) {\n\t\tif (!this.#acceptingChildren) throw notAcceptingChildrenError(this.activity, \"parent\");\n\t\treturn this.#children.add(child);\n\t}\n\tstopAcceptingChildren() {\n\t\tthis.#acceptingChildren = false;\n\t}\n\tasync end(settlement) {\n\t\tif (this.#ended) return;\n\t\tthis.#ended = true;\n\t\tthis.#acceptingChildren = false;\n\t\tawait endActivity(this.#record, {\n\t\t\tkind: \"transaction\",\n\t\t\toutcome: settlement.outcome\n\t\t}, this.#finalizedResult(settlement), this.#slot, (result) => this.finalize(result));\n\t}\n\tasync finalize(result) {\n\t\tawait this.#children.finalize(result);\n\t\tawait this.#record.finalize(result);\n\t}\n\t#finalizedResult(settlement) {\n\t\tif (settlement.by === \"rollback\") return { outcome: settlement.commitAttempted ? \"unknown\" : \"rolled-back\" };\n\t\treturn { outcome: settlement.outcome === \"succeeded\" && !this.#aStatementFailed ? \"committed\" : \"unknown\" };\n\t}\n};\n//#endregion\n//#region src/meta-builder.ts\nvar MetaBuilderImpl = class {\n\t#kind;\n\t#terminalName;\n\t#annotations = /* @__PURE__ */ new Map();\n\tconstructor(kind, terminalName) {\n\t\tthis.#kind = kind;\n\t\tthis.#terminalName = terminalName;\n\t}\n\tget annotations() {\n\t\treturn this.#annotations;\n\t}\n\tannotate(annotation) {\n\t\tconst value = annotation;\n\t\tassertAnnotationsApplicable([value], this.#kind, this.#terminalName);\n\t\tthis.#annotations.set(value.namespace, value);\n\t\treturn this;\n\t}\n};\n/**\n* Construct a lane-side meta builder for a terminal of operation kind `K`.\n*\n* Lane terminals call this with their `kind` (`'read'` or `'write'`) and a\n* `terminalName` for error messages, hand the resulting builder to the\n* user-supplied configurator callback (typed as `MetaBuilder<K>`, the\n* narrower public view), and read `meta.annotations` afterwards to thread\n* the recorded values into `plan.meta.annotations`.\n*/\nfunction createMetaBuilder(kind, terminalName) {\n\treturn new MetaBuilderImpl(kind, terminalName);\n}\n//#endregion\nexport { AsyncIterableResult, RUNTIME_ABORTED, RelationKeys, RuntimeCore, applyMutationDefaults, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, createContextBeneath, createMetaBuilder, createStateStore, defineAnnotation, executeStatement, isRuntimeError, raceAgainstAbort, runtimeAborted, runtimeError, startClientActivity, startTransactionActivity, streamStatement };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,kBAAkB;;;;;;;;;;AAUxB,SAAS,eAAe,OAAO,OAAO;CACrC,MAAM,WAAW,aAAa,iBAAiB,4BAA4B,SAAS,EAAE,MAAM,CAAC;CAC7F,OAAO,OAAO,OAAO,UAAU,EAAE,MAAM,CAAC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAS,mBAAmB;CAC3B,QAAQ,YAAY;EACnB,MAAM,YAAY,QAAQ;EAC1B,MAAM,eAAe,OAAO,OAAO,IAAI,IAAI,QAAQ,YAAY,CAAC;EAChE,SAAS,OAAO,OAAO;GACtB,OAAO,OAAO,OAAO;IACpB,cAAc;IACd;IACA;IACA;GACD,CAAC;EACF;EACA,SAAS,KAAK,QAAQ;GACrB,MAAM,SAAS,UAAU,SAAS,OAAO,KAAK,cAAc,aAAa,OAAO,Y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
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.18-dev.
|
|
3
|
+
"version": "8.0.0-rc.18-dev.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
"uniku": "^0.5.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@internal/config": "8.0.0-rc.18-dev.
|
|
20
|
-
"@internal/contract": "8.0.0-rc.18-dev.
|
|
21
|
-
"@internal/contract-authoring": "8.0.0-rc.18-dev.
|
|
22
|
-
"@internal/errors": "8.0.0-rc.18-dev.
|
|
23
|
-
"@internal/framework-components": "8.0.0-rc.18-dev.
|
|
24
|
-
"@internal/ids": "8.0.0-rc.18-dev.
|
|
25
|
-
"@internal/operations": "8.0.0-rc.18-dev.
|
|
26
|
-
"@internal/psl-parser": "8.0.0-rc.18-dev.
|
|
27
|
-
"@internal/psl-printer": "8.0.0-rc.18-dev.
|
|
28
|
-
"@internal/ts-render": "8.0.0-rc.18-dev.
|
|
29
|
-
"@repo/tsconfig": "8.0.0-rc.18-dev.
|
|
30
|
-
"@internal/publish-surface": "8.0.0-rc.18-dev.
|
|
31
|
-
"@repo/tsdown": "8.0.0-rc.18-dev.
|
|
32
|
-
"@internal/utils": "8.0.0-rc.18-dev.
|
|
19
|
+
"@internal/config": "8.0.0-rc.18-dev.6",
|
|
20
|
+
"@internal/contract": "8.0.0-rc.18-dev.6",
|
|
21
|
+
"@internal/contract-authoring": "8.0.0-rc.18-dev.6",
|
|
22
|
+
"@internal/errors": "8.0.0-rc.18-dev.6",
|
|
23
|
+
"@internal/framework-components": "8.0.0-rc.18-dev.6",
|
|
24
|
+
"@internal/ids": "8.0.0-rc.18-dev.6",
|
|
25
|
+
"@internal/operations": "8.0.0-rc.18-dev.6",
|
|
26
|
+
"@internal/psl-parser": "8.0.0-rc.18-dev.6",
|
|
27
|
+
"@internal/psl-printer": "8.0.0-rc.18-dev.6",
|
|
28
|
+
"@internal/ts-render": "8.0.0-rc.18-dev.6",
|
|
29
|
+
"@repo/tsconfig": "8.0.0-rc.18-dev.6",
|
|
30
|
+
"@internal/publish-surface": "8.0.0-rc.18-dev.6",
|
|
31
|
+
"@repo/tsdown": "8.0.0-rc.18-dev.6",
|
|
32
|
+
"@internal/utils": "8.0.0-rc.18-dev.6",
|
|
33
33
|
"tsdown": "0.22.14",
|
|
34
34
|
"typescript": "5.9.3",
|
|
35
35
|
"vitest": "5.0.0-rc.2"
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
"build": "tsdown",
|
|
112
112
|
"lint": "biome check . --error-on-warnings",
|
|
113
113
|
"clean": "rm -rf dist src-gen",
|
|
114
|
-
"test": "vitest run"
|
|
114
|
+
"test": "vitest run",
|
|
115
|
+
"typecheck": "tsc --project test/tsconfig.json --noEmit"
|
|
115
116
|
}
|
|
116
117
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-CdqTpkAC.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KAqBK;;;;;;;;;;;;UAYK,gBAAgB,SAAS,cAAc;WACtC;WACA;WACA,OAAO;WACP,cAAc,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2C3B,iBAAiB,SAAS,cAAc;GAC/C,OAAO,UAAU,gBAAgB,SAAS;WAClC;WACA,cAAc,YAAY;EACnC,KAAK,QAAQ,mBAAmB;;;KAG7B;WACM;aACE,cAAc;;;WAGhB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;UAwBd,wBAAwB,cAAc;WACrC;WACA,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCjB,iBAAiB,mBAAmB,cAAc,eAAe,SAAS,wBAAwB,WAAW,iBAAiB,SAAS;;;;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Q,YAAY,GAAG,MAAM,aAAa,KAAK,kBAAkB,GAAG,QAAQ,SAAS,EAAE,IAAI,QAAQ,aAAa,GAAG,IAAI,WAAW,MAAM;KAC3M,YAAY,GAAG,MAAM,0BAA0B,sBAAsB;WAC/D,WAAW;IAClB,KAAK,QAAQ,IAAI,QAAQ,YAAY,QAAQ,eAAe;WACrD,WAAW,aAAa;IAC/B,KAAK,QAAQ,IAAI,QAAQ,QAAQ;KAChC,kBAAkB,GAAG,QAAQ,cAAc,QAAQ;WAC7C,WAAW;IAClB,eAAe,gBAAgB,WAAW;KACzC,WAAW,MAAM,KAAK,gBAAgB,OAAO,KAAK,KAAK;KACvD,SAAS,GAAG,KAAK,sBAAsB,mBAAmB,IAAI,WAAW;KACzE,QAAQ,QAAQ,WAAW,IAAI,EAAE;;;;KAIjC;WACM;WACA;;WAEA;WACA;;WAEA;;;UAGD,uBAAuB,iBAAiB,kBAAkB,yBAAyB;WAClF,UAAU;WACV,KAAK;;;;EAId,IAAI,YAAY,wBAAwB;;UAEhC,2BAA2B,iBAAiB;WAC3C,YAAY,cAAc;WAC1B,SAAS,sBAAsB;;WAE/B;;;;;iBAKM,yBAAyB,iBAAiB,iBAAiB,SAAS,2BAA2B,YAAY,QAAQ,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiCjJ,YAAY,UAAU;EAC9B,SAAS,GAAG,cAAc,eAAe,YAAY,UAAU,QAAQ,gBAAgB,GAAG;;;;;;;;;;;;UAYlF,gBAAgB,UAAU,uBAAuB,YAAY;WAC5D,aAAa,oBAAoB,yBAAyB;;;;;;;;;;;iBAWpD,kBAAkB,UAAU,eAAe,MAAM,GAAG,uBAAuB,gBAAgB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-DoZkleC9.mjs","names":["#middleware","#parent","#record","#childEnded","#endedResult","#runStartedAt","#source","#rowCount","#stats","#holdFinishedChildren","#ended","#aChildFailed","#children","#finalized","#finalizedResult","#kind","#terminalName","#annotations"],"sources":["../../../../1-framework/1-core/framework-components/dist/runtime.mjs"],"sourcesContent":["import { n as runtimeError, t as isRuntimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/execution/runtime-error.ts\n/**\n* Stable code emitted by the runtime when an in-flight `execute()`\n* is cancelled via the per-query `AbortSignal`. The envelope's\n* `details.phase` distinguishes where the abort was observed:\n*\n* - `'encode'` — abort fired during `encodeParams` (SQL) or\n* `resolveValue` (Mongo).\n* - `'decode'` — abort fired during `decodeRow` / `decodeField`.\n* - `'stream'` — abort fired between rows or before any codec call\n* (already-aborted at entry).\n* - `'beforeEncode'` / `'onRow'` — abort fired on entry to or during\n* the corresponding middleware phase\n* (cooperative cancellation per the param-transform seam).\n*/\nconst RUNTIME_ABORTED = \"RUNTIME.ABORTED\";\n/**\n* Construct a `RUNTIME.ABORTED` envelope. Phase distinguishes where the\n* abort was observed — codec call sites (`encode` / `decode` / `stream`)\n* or operation-specific middleware seams, as\n* enumerated on {@link RuntimeAbortedPhase}. Cause carries\n* `signal.reason` verbatim from the platform — native abort produces a\n* `DOMException`, explicit `controller.abort(reason)` produces whatever\n* the caller passed. No synthesis happens here.\n*/\nfunction runtimeAborted(phase, cause) {\n\tconst envelope = runtimeError(RUNTIME_ABORTED, `Operation aborted during ${phase}`, { phase });\n\treturn Object.assign(envelope, { cause });\n}\n//#endregion\n//#region src/annotations.ts\n/**\n* Defines a typed annotation handle.\n*\n* Two-step call form. The first step takes the `Payload` type argument\n* (TypeScript cannot infer `Payload` from anything in the options, so it\n* must be supplied explicitly); the second step takes the runtime options\n* and infers `Kinds` from the `applicableTo` array via a `const` type\n* parameter, so the operation kinds appear exactly once at the call site.\n*\n* @example\n* ```typescript\n* // Read-only annotation. Lane terminals like `db.User.first(...)` accept\n* // it; `db.User.create(...)` rejects it at the type level.\n* const cacheAnnotation = defineAnnotation<{ ttl?: number; skip?: boolean }>()({\n* namespace: 'cache',\n* applicableTo: ['read'],\n* }); // Kinds inferred as 'read'\n*\n* // Write-only annotation. Mirror image.\n* const auditAnnotation = defineAnnotation<{ actor: string }>()({\n* namespace: 'audit',\n* applicableTo: ['write'],\n* }); // Kinds inferred as 'write'\n*\n* // Annotation applicable to both kinds (e.g. tracing).\n* const otelAnnotation = defineAnnotation<{ traceId: string }>()({\n* namespace: 'otel',\n* applicableTo: ['read', 'write'],\n* }); // Kinds inferred as 'read' | 'write'\n* ```\n*\n* **Reserved namespaces.** See `DefineAnnotationOptions.namespace` for the\n* list of framework-internal namespaces (`codecs`, target-specific keys).\n* `defineAnnotation` does not structurally prevent a user from naming a\n* reserved namespace, but the framework makes no compatibility guarantee\n* about handles that do.\n*/\nfunction defineAnnotation() {\n\treturn (options) => {\n\t\tconst namespace = options.namespace;\n\t\tconst applicableTo = Object.freeze(new Set(options.applicableTo));\n\t\tfunction handle(value) {\n\t\t\treturn Object.freeze({\n\t\t\t\t__annotation: true,\n\t\t\t\tnamespace,\n\t\t\t\tvalue,\n\t\t\t\tapplicableTo\n\t\t\t});\n\t\t}\n\t\tfunction read(source) {\n\t\t\tconst stored = \"meta\" in source ? source.meta.annotations?.[namespace] : source.annotations.get(namespace);\n\t\t\tif (!isAnnotationValue(stored)) return;\n\t\t\tif (stored.namespace !== namespace) return;\n\t\t\treturn stored.value;\n\t\t}\n\t\treturn Object.freeze(Object.assign(handle, {\n\t\t\tnamespace,\n\t\t\tapplicableTo,\n\t\t\tread\n\t\t}));\n\t};\n}\n/**\n* Runtime applicability gate. Throws `RUNTIME.ANNOTATION_INAPPLICABLE` if\n* any annotation in `annotations` declares an `applicableTo` set that does\n* not include `kind`. Used by lane terminals (SQL DSL builders' `.build()`,\n* ORM `Collection` terminals) to fail closed when the type-level\n* `ValidAnnotations` gate is bypassed via cast / `any` / dynamic\n* invocation.\n*\n* Passes silently on:\n* - empty arrays\n* - annotations whose `applicableTo` includes `kind`\n*\n* Throws on:\n* - any annotation whose `applicableTo` does not include `kind`. The\n* error names the offending annotation's `namespace` and the\n* `terminalName` so users can locate the misuse.\n*\n* @example\n* ```typescript\n* // Inside an ORM read terminal:\n* assertAnnotationsApplicable(annotations, 'read', 'first');\n* ```\n*/\nfunction assertAnnotationsApplicable(annotations, kind, terminalName) {\n\tfor (const annotation of annotations) if (!annotation.applicableTo.has(kind)) throw runtimeError(\"RUNTIME.ANNOTATION_INAPPLICABLE\", `Annotation '${annotation.namespace}' is not applicable to '${kind}' operations (terminal: '${terminalName}'). The annotation declares applicableTo = [${Array.from(annotation.applicableTo).map((k) => `'${k}'`).join(\", \")}].`, {\n\t\tnamespace: annotation.namespace,\n\t\tterminalName,\n\t\tkind,\n\t\tapplicableTo: Array.from(annotation.applicableTo)\n\t});\n}\nconst noAnnotations = /* @__PURE__ */ new Map();\n/** The branded annotation values in a plan's `meta.annotations`, keyed by namespace. */\nfunction brandedAnnotations(annotations) {\n\tif (annotations === void 0) return noAnnotations;\n\tlet branded;\n\tfor (const [namespace, value] of Object.entries(annotations)) {\n\t\tif (!isAnnotationValue(value)) continue;\n\t\tbranded ??= /* @__PURE__ */ new Map();\n\t\tbranded.set(namespace, value);\n\t}\n\treturn branded ?? noAnnotations;\n}\n/**\n* Type guard for branded annotation values stored in `plan.meta.annotations`.\n*\n* Internal — used by `AnnotationHandle.read` to distinguish user\n* annotations (created by calling a handle returned from\n* `defineAnnotation(...)`) from framework-internal metadata that may\n* happen to live under the same namespace key.\n*/\nfunction isAnnotationValue(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\treturn value.__annotation === true;\n}\n//#endregion\n//#region src/execution/activity-lifecycle.ts\nfunction createStateStore() {\n\tlet states;\n\treturn {\n\t\tstate(key) {\n\t\t\tstates ??= /* @__PURE__ */ new Map();\n\t\t\tlet state = states.get(key);\n\t\t\tif (state === void 0) {\n\t\t\t\tstate = {};\n\t\t\t\tstates.set(key, state);\n\t\t\t}\n\t\t\treturn state;\n\t\t},\n\t\tclear() {\n\t\t\tstates = void 0;\n\t\t}\n\t};\n}\nfunction createActivityRecord(middleware, activity, fields, parent) {\n\tconst store = createStateStore();\n\tlet finalized = false;\n\tlet started = middleware.length;\n\tconst parentCtx = parent?.ctx;\n\tconst parentIsTransaction = parent?.activity.kind === \"transaction\";\n\tconst ctx = blindCast({\n\t\t...fields,\n\t\tparent: parentCtx,\n\t\tstate: store.state,\n\t\tinTransaction: () => parentIsTransaction || (parentCtx?.inTransaction() ?? false)\n\t});\n\treturn {\n\t\tactivity,\n\t\tctx,\n\t\tasync started() {\n\t\t\tfor (let index = 0; index < middleware.length; index++) {\n\t\t\t\tconst mw = middleware[index];\n\t\t\t\tif (!mw?.activityStarted) continue;\n\t\t\t\ttry {\n\t\t\t\t\tawait mw.activityStarted(activity, ctx);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tstarted = index + 1;\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasync ended(result) {\n\t\t\tlet firstError;\n\t\t\tfor (let index = 0; index < started; index++) {\n\t\t\t\tconst mw = middleware[index];\n\t\t\t\tif (!mw?.activityEnded) continue;\n\t\t\t\ttry {\n\t\t\t\t\tawait mw.activityEnded(activity, result, ctx);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (result.outcome === \"succeeded\") firstError ??= { error };\n\t\t\t\t\telse logHookError(ctx, \"middleware.activityEnded.error\", mw.name, error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (firstError !== void 0) throw firstError.error;\n\t\t},\n\t\tasync finalize(result) {\n\t\t\tif (finalized) return;\n\t\t\tfinalized = true;\n\t\t\tfor (let index = 0; index < started; index++) {\n\t\t\t\tconst mw = middleware[index];\n\t\t\t\tif (!mw?.activityFinalized) continue;\n\t\t\t\ttry {\n\t\t\t\t\tawait mw.activityFinalized(activity, result, ctx);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tlogHookError(ctx, \"middleware.activityFinalized.error\", mw.name, error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstore.clear();\n\t\t}\n\t};\n}\nfunction logHookError(ctx, event, middleware, error) {\n\ttry {\n\t\tctx.log.error({\n\t\t\tevent,\n\t\t\tmiddleware,\n\t\t\terror\n\t\t});\n\t} catch {}\n}\n/**\n* Ends an activity: its `activityEnded` hooks, then its finalization, which a parent holds or which happens at once with `committed` or `unknown`. The finalization runs even when an `activityEnded` hook fails the activity; that error is rethrown afterwards.\n*/\nasync function endActivity(record, result, childEnded) {\n\tlet endedError;\n\ttry {\n\t\tawait record.ended(result);\n\t} catch (error) {\n\t\tendedError = { error };\n\t}\n\tif (childEnded === void 0) await record.finalize({ outcome: result.outcome === \"succeeded\" ? \"committed\" : \"unknown\" });\n\telse await childEnded(result.outcome);\n\tif (endedError !== void 0) throw endedError.error;\n}\n//#endregion\n//#region src/execution/async-iterable-result.ts\nvar AsyncIterableResult = class {\n\tgenerator;\n\tconsumed = false;\n\tconsumedBy;\n\tbufferedArrayPromise;\n\tconstructor(generator) {\n\t\tthis.generator = generator;\n\t}\n\t[Symbol.asyncIterator]() {\n\t\tif (this.consumed) throw runtimeError(\"RUNTIME.ITERATOR_CONSUMED\", `AsyncIterableResult iterator has already been consumed via ${this.consumedBy === \"bufferedArray\" ? \"toArray()/then()\" : \"for-await loop\"}. Each AsyncIterableResult can only be iterated once.`, {\n\t\t\tconsumedBy: this.consumedBy,\n\t\t\tsuggestion: this.consumedBy === \"bufferedArray\" ? \"If you need to iterate multiple times, store the results from toArray() in a variable and reuse that.\" : \"If you need to iterate multiple times, use toArray() to collect all results first.\"\n\t\t});\n\t\tthis.consumed = true;\n\t\tthis.consumedBy = \"iterator\";\n\t\treturn this.generator;\n\t}\n\ttoArray() {\n\t\tif (this.consumedBy === \"iterator\") return Promise.reject(runtimeError(\"RUNTIME.ITERATOR_CONSUMED\", \"AsyncIterableResult iterator has already been consumed via for-await loop. Each AsyncIterableResult can only be iterated once.\", {\n\t\t\tconsumedBy: this.consumedBy,\n\t\t\tsuggestion: \"The iterator was already consumed by a for-await loop. Use toArray() or await the result before iterating.\"\n\t\t}));\n\t\tif (this.bufferedArrayPromise) return this.bufferedArrayPromise;\n\t\tthis.consumed = true;\n\t\tthis.consumedBy = \"bufferedArray\";\n\t\tthis.bufferedArrayPromise = (async () => {\n\t\t\tconst out = [];\n\t\t\tfor await (const item of this.generator) out.push(item);\n\t\t\treturn out;\n\t\t})();\n\t\treturn this.bufferedArrayPromise;\n\t}\n\tasync first() {\n\t\treturn (await this.toArray())[0] ?? null;\n\t}\n\tasync firstOrThrow() {\n\t\tconst row = await this.first();\n\t\tif (row === null) throw runtimeError(\"RUNTIME.NO_ROWS\", \"Expected at least one row, but none were returned\", {});\n\t\treturn row;\n\t}\n\tthen(onfulfilled, onrejected) {\n\t\treturn this.toArray().then(onfulfilled, onrejected);\n\t}\n};\n//#endregion\n//#region src/execution/mutation-defaults.ts\n/** Registers every generator the contributors provide, by id. Two contributors providing one id is an error naming both. */\nfunction collectMutationDefaultGenerators(contributors) {\n\tconst generators = /* @__PURE__ */ new Map();\n\tconst owners = /* @__PURE__ */ new Map();\n\tfor (const contributor of contributors) {\n\t\tconst nextGenerators = contributor.mutationDefaultGenerators?.() ?? [];\n\t\tfor (const generator of nextGenerators) {\n\t\t\tconst existingOwner = owners.get(generator.id);\n\t\t\tif (existingOwner !== void 0) throw runtimeError(\"RUNTIME.DUPLICATE_MUTATION_DEFAULT_GENERATOR\", `Duplicate mutation default generator '${generator.id}'.`, {\n\t\t\t\tid: generator.id,\n\t\t\t\texistingOwner,\n\t\t\t\tincomingOwner: contributor.id\n\t\t\t});\n\t\t\tgenerators.set(generator.id, generator);\n\t\t\towners.set(generator.id, contributor.id);\n\t\t}\n\t}\n\treturn generators;\n}\n/** Fails when the contract's mutation defaults name a generator the registry does not hold, listing every missing id and the fields that need it. */\nfunction assertMutationDefaultGeneratorsAvailable(execution, generatorRegistry) {\n\tconst defaults = execution?.mutations.defaults ?? [];\n\tif (defaults.length === 0) return;\n\tconst fieldsById = /* @__PURE__ */ new Map();\n\tfor (const mutationDefault of defaults) {\n\t\tconst phaseIds = new Set([mutationDefault.onCreate, mutationDefault.onUpdate].flatMap((phase) => phase?.kind === \"generator\" && !generatorRegistry.has(phase.id) ? [phase.id] : []));\n\t\tfor (const id of phaseIds) {\n\t\t\tconst fields = fieldsById.get(id) ?? [];\n\t\t\tfields.push(`${mutationDefault.ref.entry}.${mutationDefault.ref.field}`);\n\t\t\tfieldsById.set(id, fields);\n\t\t}\n\t}\n\tif (fieldsById.size === 0) return;\n\tconst ids = [...fieldsById.keys()];\n\tconst needs = [...fieldsById].map(([id, fields]) => `'${id}' for ${listInProse(fields)}`);\n\tthrow runtimeError(\"RUNTIME.MUTATION_DEFAULT_GENERATOR_MISSING\", `${ids.length === 1 ? `Contract requires mutation default generator ${needs[0]}, but no runtime component in the execution stack provides it.` : `Contract requires mutation default generators ${listInProse(needs)}, but no runtime component in the execution stack provides them.`} ${WHERE_GENERATORS_COME_FROM}`, {\n\t\tids,\n\t\tfields: [...fieldsById.values()].flat()\n\t});\n}\nconst WHERE_GENERATORS_COME_FROM = \"Built-in generators such as 'timestampNow' come from the database adapter's runtime descriptor, and others from the extension pack that defines them; include that component in the execution stack.\";\nfunction listInProse(items) {\n\treturn items.length > 1 ? `${items.slice(0, -1).join(\", \")} and ${items.at(-1)}` : items.join(\"\");\n}\nfunction computeExecutionDefaultValue(spec, generatorRegistry) {\n\tconst generator = generatorRegistry.get(spec.id);\n\tif (!generator) throw runtimeError(\"RUNTIME.MUTATION_DEFAULT_GENERATOR_MISSING\", `Contract references mutation default generator '${spec.id}' but no runtime component in the execution stack provides it. ${WHERE_GENERATORS_COME_FROM}`, { id: spec.id });\n\treturn generator.generate(spec.params);\n}\n/**\n* The defaults to write for one record: for each mutation default of the entry and namespace whose phase matches `op`, the generated value of every field the values do not carry. An update with no keys gets none.\n*/\nfunction applyMutationDefaults(execution, generatorRegistry, options) {\n\tconst defaults = execution?.mutations.defaults ?? [];\n\tif (defaults.length === 0) return [];\n\tconst isEmptyUpdate = options.op === \"update\" && Object.keys(options.values).length === 0;\n\tconst applied = [];\n\tconst appliedFields = /* @__PURE__ */ new Set();\n\tconst rowCache = /* @__PURE__ */ new Map();\n\tfor (const mutationDefault of defaults) {\n\t\tif (mutationDefault.ref.entry !== options.entry) continue;\n\t\tif (mutationDefault.ref.namespace !== options.namespace) continue;\n\t\tconst defaultSpec = options.op === \"create\" ? mutationDefault.onCreate : mutationDefault.onUpdate;\n\t\tif (!defaultSpec) continue;\n\t\tif (isEmptyUpdate) continue;\n\t\tconst fieldName = mutationDefault.ref.field;\n\t\tif (Object.hasOwn(options.values, fieldName) || appliedFields.has(fieldName)) continue;\n\t\tapplied.push({\n\t\t\tfield: fieldName,\n\t\t\tvalue: resolveScopedValue(defaultSpec, generatorRegistry, rowCache, options.defaultValueCache)\n\t\t});\n\t\tappliedFields.add(fieldName);\n\t}\n\treturn applied;\n}\nfunction resolveScopedValue(spec, generatorRegistry, rowCache, queryCache) {\n\tconst cache = scopedCache(generatorRegistry.get(spec.id)?.stability, rowCache, queryCache);\n\tif (!cache) return computeExecutionDefaultValue(spec, generatorRegistry);\n\tif (cache.has(spec.id)) return cache.get(spec.id);\n\tconst value = computeExecutionDefaultValue(spec, generatorRegistry);\n\tcache.set(spec.id, value);\n\treturn value;\n}\nfunction scopedCache(stability, rowCache, queryCache) {\n\tswitch (stability) {\n\t\tcase \"row\": return rowCache;\n\t\tcase \"query\": return queryCache;\n\t\tdefault: return;\n\t}\n}\n//#endregion\n//#region src/execution/race-against-abort.ts\n/**\n* Throw a phase-tagged `RUNTIME.ABORTED` envelope if the supplied\n* context is already aborted at the precheck site. Centralises the\n* `if (ctx.signal?.aborted) throw runtimeAborted(...)` pattern that\n* every codec dispatch site (and the `beforeEncode` middleware phase)\n* repeats. Accepts both the framework `CodecCallContext` and the\n* `ActivityContext`; both expose `signal?: AbortSignal`.\n*/\nfunction checkAborted(ctx, phase) {\n\tif (ctx.signal?.aborted) throw runtimeAborted(phase, ctx.signal.reason);\n}\n/**\n* Race a per-cell `Promise.all` (or any other in-flight work promise) against\n* the supplied abort signal so the runtime returns `RUNTIME.ABORTED` promptly\n* even when codec bodies ignore the signal. In-flight bodies that ignore the\n* signal are abandoned and run to completion in the background — the\n* cooperative-cancellation contract documented in ADR 204.\n*\n* Call sites still SHOULD pre-check `signal.aborted` and short-circuit with\n* a phase-tagged `RUNTIME.ABORTED` envelope before invoking this helper —\n* that path is the canonical \"aborted at entry\" surface and avoids\n* scheduling the work promise. As a defensive belt-and-braces, this helper\n* also handles the already-aborted case internally: `AbortSignal` does not\n* replay past abort events to listeners registered after the abort, so we\n* inspect `signal.aborted` synchronously and reject with the sentinel\n* before installing the listener. The rejection is still attributed to the\n* abort path via the sentinel-identity check.\n*\n* Distinguishing the rejection source is load-bearing for AC-ERR4\n* (`RUNTIME.ENCODE_FAILED` / `RUNTIME.DECODE_FAILED` pass through unchanged).\n* The semantically equivalent `abortable(signal)` helper in\n* `@internal/utils` rejects with `signal.reason ?? new DOMException(...)`,\n* which is not stably distinguishable from a codec-thrown error by identity\n* alone (a fresh fallback DOMException is allocated per call). We instead\n* track abort attribution with a unique sentinel: only the `onAbort` listener\n* installed here ever rejects with the sentinel, so an `error === sentinel`\n* identity check after the race is unambiguous.\n*\n* Lives in `framework-components` (rather than the SQL family, where it\n* originated in m2) so every family runtime that needs cooperative\n* cancellation around a codec-dispatch `Promise.all` (SQL encode + decode\n* today, Mongo encode in m3) shares the same attribution logic.\n*/\nasync function raceAgainstAbort(work, signal, phase) {\n\tif (signal === void 0) return await work;\n\tconst sentinel = { reason: void 0 };\n\tlet onAbort;\n\tconst abortPromise = new Promise((_, reject) => {\n\t\tif (signal.aborted) {\n\t\t\tsentinel.reason = signal.reason;\n\t\t\treject(sentinel);\n\t\t\treturn;\n\t\t}\n\t\tonAbort = () => {\n\t\t\tsentinel.reason = signal.reason;\n\t\t\treject(sentinel);\n\t\t};\n\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t});\n\ttry {\n\t\treturn await Promise.race([work, abortPromise]);\n\t} catch (error) {\n\t\tif (error === sentinel) throw runtimeAborted(phase, sentinel.reason);\n\t\tthrow error;\n\t} finally {\n\t\tif (onAbort) signal.removeEventListener(\"abort\", onAbort);\n\t}\n}\n//#endregion\n//#region src/execution/run-with-middleware.ts\n/**\n* Runs one `query()` statement as an activity. The activity starts on the first `next()`: `activityStarted`, then `body`'s rows, then `activityEnded` and, with no parent, `activityFinalized`. Each fires exactly once, whether the body succeeds, throws (`failed`) or the caller stops reading (`stopped`).\n*/\nfunction streamStatement(options, body) {\n\treturn { [Symbol.asyncIterator]() {\n\t\tlet thrownByCaller;\n\t\tconst generator = streamStatementRows(options, body, (error) => thrownByCaller !== void 0 && thrownByCaller.error === error);\n\t\treturn {\n\t\t\tnext: () => generator.next(),\n\t\t\treturn: () => generator.return(void 0),\n\t\t\tthrow: (error) => {\n\t\t\t\tthrownByCaller = { error };\n\t\t\t\treturn generator.throw(error);\n\t\t\t}\n\t\t};\n\t} };\n}\nasync function* streamStatementRows(options, body, isThrownByCaller) {\n\tconst statement = new StatementActivityRunImpl(options, \"rows\");\n\tlet outcome = \"stopped\";\n\ttry {\n\t\tawait statement.start();\n\t\tyield* body(statement);\n\t\toutcome = \"succeeded\";\n\t} catch (error) {\n\t\tif (!isThrownByCaller(error)) outcome = \"failed\";\n\t\tthrow error;\n\t} finally {\n\t\tawait statement.end(outcome);\n\t}\n}\n/**\n* Runs one `execute()` statement as an activity: `activityStarted`, then `body`, then `activityEnded` and, with no parent, `activityFinalized`, each exactly once.\n*/\nasync function executeStatement(options, body) {\n\tconst statement = new StatementActivityRunImpl(options, \"stats\");\n\tlet outcome = \"failed\";\n\ttry {\n\t\tawait statement.start();\n\t\tconst stats = await body(statement);\n\t\toutcome = \"succeeded\";\n\t\treturn stats;\n\t} finally {\n\t\tawait statement.end(outcome);\n\t}\n}\nvar StatementActivityRunImpl = class {\n\tactivity;\n\tctx;\n\t#middleware;\n\t#parent;\n\t#record;\n\t#childEnded;\n\t#runStartedAt;\n\t#source = \"driver\";\n\t#rowCount = 0;\n\t#stats;\n\tconstructor(options, returns) {\n\t\tconst { plan } = options;\n\t\tlet annotations;\n\t\tthis.activity = {\n\t\t\tid: crypto.randomUUID(),\n\t\t\tkind: \"statement\",\n\t\t\treturns,\n\t\t\tplan,\n\t\t\tget annotations() {\n\t\t\t\tannotations ??= brandedAnnotations(plan.meta.annotations);\n\t\t\t\treturn annotations;\n\t\t\t}\n\t\t};\n\t\tthis.#middleware = options.middleware;\n\t\tthis.#parent = options.parent;\n\t\tthis.#record = createActivityRecord(options.middleware, this.activity, options.context, options.parent);\n\t\tthis.ctx = this.#record.ctx;\n\t}\n\tstart() {\n\t\tthis.#childEnded = this.#parent?.adopt(this.#record);\n\t\treturn this.#record.started();\n\t}\n\tend(outcome) {\n\t\treturn endActivity(this.#record, this.#endedResult(outcome), this.#childEnded);\n\t}\n\tasync beforeEncode(draft, params) {\n\t\tfor (const mw of this.#middleware) {\n\t\t\tif (!mw.beforeEncode) continue;\n\t\t\tcheckAborted(this.ctx, \"beforeEncode\");\n\t\t\tconst work = mw.beforeEncode(draft, this.ctx, params);\n\t\t\tif (work !== void 0) await raceAgainstAbort(Promise.resolve(work), this.ctx.signal, \"beforeEncode\");\n\t\t}\n\t}\n\tasync *runQuery(exec, runDriver) {\n\t\tthis.#runStartedAt = Date.now();\n\t\tlet rows;\n\t\tfor (const mw of this.#middleware) {\n\t\t\tconst intercept = mw.intercept;\n\t\t\tif (intercept?.onQuery === void 0) continue;\n\t\t\tthis.#source = \"middleware\";\n\t\t\tconst result = await intercept.onQuery(exec, this.ctx);\n\t\t\tif (result === void 0) {\n\t\t\t\tthis.#source = \"driver\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.ctx.log.debug?.({\n\t\t\t\tevent: \"middleware.intercept.onQuery\",\n\t\t\t\tmiddleware: mw.name\n\t\t\t});\n\t\t\trows = blindCast(result.rows);\n\t\t\tbreak;\n\t\t}\n\t\tif (rows === void 0) {\n\t\t\tfor await (const row of runDriver()) {\n\t\t\t\tfor (const mw of this.#middleware) if (mw.onRow) await mw.onRow(blindCast(row), exec, this.ctx);\n\t\t\t\tthis.#rowCount++;\n\t\t\t\tyield row;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tfor await (const row of rows) {\n\t\t\tthis.#rowCount++;\n\t\t\tyield row;\n\t\t}\n\t}\n\tasync runExecute(exec, runDriver) {\n\t\tthis.#runStartedAt = Date.now();\n\t\tfor (const mw of this.#middleware) {\n\t\t\tconst intercept = mw.intercept;\n\t\t\tif (intercept?.onExecute === void 0) continue;\n\t\t\tthis.#source = \"middleware\";\n\t\t\tconst result = await intercept.onExecute(exec, this.ctx);\n\t\t\tif (result === void 0) {\n\t\t\t\tthis.#source = \"driver\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.ctx.log.debug?.({\n\t\t\t\tevent: \"middleware.intercept.onExecute\",\n\t\t\t\tmiddleware: mw.name\n\t\t\t});\n\t\t\tthis.#stats = result.stats;\n\t\t\treturn result.stats;\n\t\t}\n\t\tthis.#stats = await runDriver();\n\t\treturn this.#stats;\n\t}\n\t#endedResult(outcome) {\n\t\tconst base = {\n\t\t\tkind: \"statement\",\n\t\t\toutcome,\n\t\t\tlatencyMs: this.#runStartedAt === void 0 ? 0 : Date.now() - this.#runStartedAt,\n\t\t\tsource: this.#source\n\t\t};\n\t\tif (this.activity.returns === \"rows\") return {\n\t\t\t...base,\n\t\t\treturns: \"rows\",\n\t\t\trowCount: this.#rowCount\n\t\t};\n\t\treturn outcome === \"succeeded\" && this.#stats !== void 0 ? {\n\t\t\t...base,\n\t\t\treturns: \"stats\",\n\t\t\tstats: this.#stats\n\t\t} : {\n\t\t\t...base,\n\t\t\treturns: \"stats\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/execution/runtime-core.ts\n/**\n* Family-agnostic abstract runtime base. Each `query()` and `execute()` call is one statement activity, run in this order: `activityStarted`, `runBeforeCompile`, `lower`, `beforeEncode`, `intercept`, the driver with `onRow`, `activityEnded`, then `activityFinalized`. It has no parent, so it is finalized right after it ends.\n*\n* Concrete subclasses implement `lower`, `runDriver`, `runExecute` and `close`.\n*/\nvar RuntimeCore = class {\n\tmiddleware;\n\tctx;\n\tconstructor(options) {\n\t\tthis.middleware = [...options.middleware];\n\t\tthis.ctx = options.ctx;\n\t}\n\t/** Pre-lowering hook for plan rewriting. Defaults to identity. */\n\trunBeforeCompile(plan) {\n\t\treturn plan;\n\t}\n\tquery(plan, options) {\n\t\tconst self = this;\n\t\tconst codecCtx = codecContextOf(options);\n\t\tconst statement = streamStatement({\n\t\t\tmiddleware: this.middleware,\n\t\t\tplan,\n\t\t\tcontext: this.contextFieldsFor(codecCtx, options),\n\t\t\tparent: void 0\n\t\t}, async function* (run) {\n\t\t\tcheckAborted(codecCtx, \"stream\");\n\t\t\tconst compiled = await self.runBeforeCompile(plan);\n\t\t\tconst exec = await self.lower(compiled, codecCtx);\n\t\t\tawait run.beforeEncode(exec);\n\t\t\tyield* run.runQuery(exec, () => blindCast(self.runDriver(exec)));\n\t\t});\n\t\tasync function* generator() {\n\t\t\tyield* statement;\n\t\t}\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\texecute(plan, options) {\n\t\tconst codecCtx = codecContextOf(options);\n\t\treturn executeStatement({\n\t\t\tmiddleware: this.middleware,\n\t\t\tplan,\n\t\t\tcontext: this.contextFieldsFor(codecCtx, options),\n\t\t\tparent: void 0\n\t\t}, async (run) => {\n\t\t\tcheckAborted(codecCtx, \"stream\");\n\t\t\tconst compiled = await this.runBeforeCompile(plan);\n\t\t\tconst exec = await this.lower(compiled, codecCtx);\n\t\t\tawait run.beforeEncode(exec);\n\t\t\treturn run.runExecute(exec, () => this.runExecute(exec));\n\t\t});\n\t}\n\tcontextFieldsFor(codecCtx, options) {\n\t\treturn {\n\t\t\t...this.ctx,\n\t\t\t...codecCtx,\n\t\t\tscope: options?.scope ?? this.ctx.scope\n\t\t};\n\t}\n};\nfunction codecContextOf(options) {\n\tconst signal = options?.signal;\n\treturn signal === void 0 ? {} : { signal };\n}\n//#endregion\n//#region src/execution/runtime-middleware.ts\nfunction checkMiddlewareCompatibility(middleware, runtimeFamilyId, runtimeTargetId) {\n\tif (middleware.targetId !== void 0 && middleware.familyId === void 0) throw runtimeError(\"RUNTIME.MIDDLEWARE_INCOMPATIBLE\", `Middleware '${middleware.name}' specifies targetId '${middleware.targetId}' without familyId`, {\n\t\tmiddleware: middleware.name,\n\t\ttargetId: middleware.targetId\n\t});\n\tif (middleware.familyId !== void 0 && middleware.familyId !== runtimeFamilyId) throw runtimeError(\"RUNTIME.MIDDLEWARE_FAMILY_MISMATCH\", `Middleware '${middleware.name}' requires family '${middleware.familyId}' but the runtime is configured for family '${runtimeFamilyId}'`, {\n\t\tmiddleware: middleware.name,\n\t\tmiddlewareFamilyId: middleware.familyId,\n\t\truntimeFamilyId\n\t});\n\tif (middleware.targetId !== void 0 && middleware.targetId !== runtimeTargetId) throw runtimeError(\"RUNTIME.MIDDLEWARE_TARGET_MISMATCH\", `Middleware '${middleware.name}' requires target '${middleware.targetId}' but the runtime is configured for target '${runtimeTargetId}'`, {\n\t\tmiddleware: middleware.name,\n\t\tmiddlewareTargetId: middleware.targetId,\n\t\truntimeTargetId\n\t});\n}\n//#endregion\n//#region src/execution/shape.ts\n/**\n* Phantom key an emitted model type carries to name its relation properties.\n* Never present at runtime; `Scalars` and `Shape` read it to tell relations from fields.\n*/\nconst RelationKeys = Symbol(\"RelationKeys\");\n//#endregion\n//#region src/execution/transaction-activity.ts\n/**\n* Starts a transaction activity and runs its `activityStarted` hooks. When one of them throws, the transaction ends `failed`, is finalized `rolled-back`, and the error is rethrown.\n*/\nasync function startTransactionActivity(options) {\n\tconst run = new TransactionActivityRunImpl(options);\n\ttry {\n\t\tawait run.start();\n\t} catch (error) {\n\t\tawait run.end({\n\t\t\tby: \"rollback\",\n\t\t\toutcome: \"failed\",\n\t\t\tcommitAttempted: false\n\t\t});\n\t\tthrow error;\n\t}\n\treturn run;\n}\nvar TransactionActivityRunImpl = class {\n\tactivity;\n\tctx;\n\t#record;\n\t#children = [];\n\t#aChildFailed = false;\n\t#ended = false;\n\t#finalized;\n\t#holdFinishedChildren;\n\tconstructor(options) {\n\t\tthis.activity = {\n\t\t\tid: crypto.randomUUID(),\n\t\t\tkind: \"transaction\",\n\t\t\tannotations: brandedAnnotations(void 0)\n\t\t};\n\t\tthis.#record = createActivityRecord(options.middleware, this.activity, options.context, void 0);\n\t\tthis.ctx = this.#record.ctx;\n\t\tthis.#holdFinishedChildren = options.holdFinishedChildren;\n\t}\n\tstart() {\n\t\treturn this.#record.started();\n\t}\n\tadopt(child) {\n\t\tif (this.#ended) throw new InternalError(\"An activity was started beneath a transaction that has ended\");\n\t\tif (!this.#holdFinishedChildren) return async (outcome) => {\n\t\t\tif (outcome === \"failed\") this.#aChildFailed = true;\n\t\t};\n\t\tconst entry = {\n\t\t\tchild,\n\t\t\tended: false\n\t\t};\n\t\tthis.#children.push(entry);\n\t\treturn async (outcome) => {\n\t\t\tentry.ended = true;\n\t\t\tif (outcome === \"failed\") this.#aChildFailed = true;\n\t\t\tif (this.#finalized !== void 0) await child.finalize(this.#finalized);\n\t\t};\n\t}\n\tasync end(settlement) {\n\t\tif (this.#ended) return;\n\t\tthis.#ended = true;\n\t\tlet endedError;\n\t\ttry {\n\t\t\tawait this.#record.ended({\n\t\t\t\tkind: \"transaction\",\n\t\t\t\toutcome: settlement.outcome\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tendedError = { error };\n\t\t}\n\t\tconst finalized = this.#finalizedResult(settlement);\n\t\tthis.#finalized = finalized;\n\t\tfor (const { child, ended } of this.#children.splice(0)) if (ended) await child.finalize(finalized);\n\t\tawait this.#record.finalize(finalized);\n\t\tif (endedError !== void 0) throw endedError.error;\n\t}\n\t#finalizedResult(settlement) {\n\t\tif (settlement.by === \"rollback\") return { outcome: settlement.commitAttempted ? \"unknown\" : \"rolled-back\" };\n\t\treturn { outcome: settlement.outcome === \"succeeded\" && !this.#aChildFailed ? \"committed\" : \"unknown\" };\n\t}\n};\n//#endregion\n//#region src/meta-builder.ts\nvar MetaBuilderImpl = class {\n\t#kind;\n\t#terminalName;\n\t#annotations = /* @__PURE__ */ new Map();\n\tconstructor(kind, terminalName) {\n\t\tthis.#kind = kind;\n\t\tthis.#terminalName = terminalName;\n\t}\n\tget annotations() {\n\t\treturn this.#annotations;\n\t}\n\tannotate(annotation) {\n\t\tconst value = annotation;\n\t\tassertAnnotationsApplicable([value], this.#kind, this.#terminalName);\n\t\tthis.#annotations.set(value.namespace, value);\n\t\treturn this;\n\t}\n};\n/**\n* Construct a lane-side meta builder for a terminal of operation kind `K`.\n*\n* Lane terminals call this with their `kind` (`'read'` or `'write'`) and a\n* `terminalName` for error messages, hand the resulting builder to the\n* user-supplied configurator callback (typed as `MetaBuilder<K>`, the\n* narrower public view), and read `meta.annotations` afterwards to thread\n* the recorded values into `plan.meta.annotations`.\n*/\nfunction createMetaBuilder(kind, terminalName) {\n\treturn new MetaBuilderImpl(kind, terminalName);\n}\n//#endregion\nexport { AsyncIterableResult, RUNTIME_ABORTED, RelationKeys, RuntimeCore, applyMutationDefaults, assertAnnotationsApplicable, assertMutationDefaultGeneratorsAvailable, checkAborted, checkMiddlewareCompatibility, collectMutationDefaultGenerators, createMetaBuilder, createStateStore, defineAnnotation, executeStatement, isRuntimeError, raceAgainstAbort, runtimeAborted, runtimeError, startTransactionActivity, streamStatement };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,kBAAkB;;;;;;;;;;AAUxB,SAAS,eAAe,OAAO,OAAO;CACrC,MAAM,WAAW,aAAa,iBAAiB,4BAA4B,SAAS,EAAE,MAAM,CAAC;CAC7F,OAAO,OAAO,OAAO,UAAU,EAAE,MAAM,CAAC;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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