@fluidframework/test-runtime-utils 2.74.0-370705 → 2.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/api-report/test-runtime-utils.legacy.beta.api.md +3 -3
  3. package/assertTagging.config.mjs +1 -1
  4. package/dist/assertionShortCodesMap.d.ts +12 -21
  5. package/dist/assertionShortCodesMap.d.ts.map +1 -1
  6. package/dist/assertionShortCodesMap.js +13 -22
  7. package/dist/assertionShortCodesMap.js.map +1 -1
  8. package/dist/deepFreeze.js.map +1 -1
  9. package/dist/mockDeltas.d.ts.map +1 -1
  10. package/dist/mockDeltas.js.map +1 -1
  11. package/dist/mockStorage.d.ts.map +1 -1
  12. package/dist/mockStorage.js.map +1 -1
  13. package/dist/mocks.d.ts +3 -2
  14. package/dist/mocks.d.ts.map +1 -1
  15. package/dist/mocks.js +2 -1
  16. package/dist/mocks.js.map +1 -1
  17. package/dist/mocksDataStoreContext.d.ts.map +1 -1
  18. package/dist/mocksDataStoreContext.js.map +1 -1
  19. package/dist/mocksForReconnection.d.ts.map +1 -1
  20. package/dist/mocksForReconnection.js.map +1 -1
  21. package/dist/validateAssertionError.d.ts.map +1 -1
  22. package/dist/validateAssertionError.js +4 -4
  23. package/dist/validateAssertionError.js.map +1 -1
  24. package/eslint.config.mts +30 -0
  25. package/lib/assertionShortCodesMap.d.ts +12 -21
  26. package/lib/assertionShortCodesMap.d.ts.map +1 -1
  27. package/lib/assertionShortCodesMap.js +13 -22
  28. package/lib/assertionShortCodesMap.js.map +1 -1
  29. package/lib/deepFreeze.js.map +1 -1
  30. package/lib/mockDeltas.d.ts.map +1 -1
  31. package/lib/mockDeltas.js.map +1 -1
  32. package/lib/mockStorage.d.ts.map +1 -1
  33. package/lib/mockStorage.js.map +1 -1
  34. package/lib/mocks.d.ts +3 -2
  35. package/lib/mocks.d.ts.map +1 -1
  36. package/lib/mocks.js +2 -1
  37. package/lib/mocks.js.map +1 -1
  38. package/lib/mocksDataStoreContext.d.ts.map +1 -1
  39. package/lib/mocksDataStoreContext.js.map +1 -1
  40. package/lib/mocksForReconnection.d.ts.map +1 -1
  41. package/lib/mocksForReconnection.js.map +1 -1
  42. package/lib/validateAssertionError.d.ts.map +1 -1
  43. package/lib/validateAssertionError.js +1 -1
  44. package/lib/validateAssertionError.js.map +1 -1
  45. package/package.json +25 -24
  46. package/src/assertionShortCodesMap.ts +13 -22
  47. package/src/deepFreeze.ts +1 -1
  48. package/src/mockDeltas.ts +9 -9
  49. package/src/mockStorage.ts +1 -1
  50. package/src/mocks.ts +45 -37
  51. package/src/mocksDataStoreContext.ts +5 -1
  52. package/src/mocksForReconnection.ts +7 -7
  53. package/src/validateAssertionError.ts +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mocksDataStoreContext.js","sourceRoot":"","sources":["../src/mocksDataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2BH,qEAAoF;AACpF,uEAGkD;AAClD,+BAAkC;AAElC,mDAAmD;AAEnD;;GAEG;AACH,MAAa,yBAAyB;IA0CrC,YACiB,KAAa,IAAA,SAAI,GAAE,EACnB,WAAoB,KAAK,EACzB,aAAkC,IAAA,4BAAiB,EAAC;QACnE,SAAS,EAAE,iCAAiC;KAC5C,CAAC,EACF,cAAuB,IAAI;QALX,OAAE,GAAF,EAAE,CAAiB;QACnB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,eAAU,GAAV,UAAU,CAExB;QA9CI,qBAAgB,GAAY,IAAI,CAAC;QACjC,gBAAW,GAAsB,SAAgB,CAAC;QAElD,YAAO,GAAiC,EAAE,CAAC;QAC3C,aAAQ,GAAuB,IAAA,SAAI,GAAE,CAAC;QAEtC,cAAS,GAAY,IAAI,CAAC;QAC1B,aAAQ,GAAY,KAAK,CAAC;QAE1B,iBAAY,GAClB,IAAI,gCAAgB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC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,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,WAAmB;QAC9C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,8BAA8B,CACpC,EAAU,EACV,WAA2C;QAE3C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,yBAAyB,CAAC,EAAU;QAC1C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,UAAU,CACtB,IAAqB;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,oBAAoB,CAAC,QAAgB,EAAE,MAAc,EAAE,kBAA2B;QACxF,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;CACD;AA3HD,8DA2HC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AttachState, IAudience } from \"@fluidframework/container-definitions\";\nimport { IDeltaManager } from \"@fluidframework/container-definitions/internal\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidHandleContext,\n\ttype IFluidHandleInternal,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type { IIdCompressorCore } from \"@fluidframework/id-compressor/internal\";\nimport {\n\tCreateChildSummarizerNodeFn,\n\tCreateChildSummarizerNodeParam,\n\tIContainerRuntimeBase,\n\tIFluidDataStoreContext,\n\tIFluidDataStoreRegistry,\n\tIGarbageCollectionDetailsBase,\n\ttype IRuntimeStorageService,\n\ttype MinimumVersionForCollab,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { defaultMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tcreateChildLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { MockDeltaManager } from \"./mockDeltas.js\";\n\n/**\n * @legacy @beta\n */\nexport class MockFluidDataStoreContext implements IFluidDataStoreContext {\n\tpublic isLocalDataStore: boolean = true;\n\tpublic packagePath: readonly string[] = undefined as any;\n\n\tpublic options: Record<string | number, any> = {};\n\tpublic clientId: string | undefined = uuid();\n\tpublic clientDetails: IClientDetails;\n\tpublic connected: boolean = true;\n\tpublic readonly: boolean = false;\n\tpublic baseSnapshot: ISnapshotTree | undefined;\n\tpublic deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> =\n\t\tnew MockDeltaManager(() => this.clientId);\n\n\tpublic containerRuntime: IContainerRuntimeBase = undefined as any;\n\tpublic storage: IRuntimeStorageService = undefined as any;\n\tpublic IFluidDataStoreRegistry: IFluidDataStoreRegistry = undefined as any;\n\tpublic IFluidHandleContext: IFluidHandleContext = undefined as any;\n\tpublic idCompressor: IIdCompressorCore & IIdCompressor = undefined as any;\n\tpublic readonly gcThrowOnTombstoneUsage = false;\n\tpublic readonly gcTombstoneEnforcementAllowed = false;\n\n\t/**\n\t * @remarks This is for internal use only.\n\t */\n\tpublic ILayerCompatDetails?: unknown;\n\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\tpublic attachState: AttachState = undefined as any;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\tpublic createProps?: any;\n\tpublic scope: FluidObject = undefined as any;\n\n\t/**\n\t * {@inheritdoc @fluidframework/runtime-definitions#IFluidDataStoreContext.minVersionForCollab}\n\t */\n\tpublic minVersionForCollab: MinimumVersionForCollab = defaultMinVersionForCollab;\n\n\tconstructor(\n\t\tpublic readonly id: string = uuid(),\n\t\tpublic readonly existing: boolean = false,\n\t\tpublic readonly baseLogger: ITelemetryLoggerExt = createChildLogger({\n\t\t\tnamespace: \"fluid:MockFluidDataStoreContext\",\n\t\t}),\n\t\tinteractive: boolean = true,\n\t) {\n\t\tthis.clientDetails = { capabilities: { interactive } };\n\t}\n\n\ton(event: string | symbol, listener: (...args: any[]) => void): this {\n\t\tswitch (event) {\n\t\t\tcase \"attaching\":\n\t\t\tcase \"attached\":\n\t\t\t\treturn this;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"Method not implemented.\");\n\t\t}\n\t}\n\n\tonce(event: string | symbol, listener: (...args: any[]) => void): this {\n\t\treturn this;\n\t}\n\n\toff(event: string | symbol, listener: (...args: any[]) => void): this {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic getQuorum(): IQuorumClients {\n\t\treturn undefined as any as IQuorumClients;\n\t}\n\n\tpublic getAudience(): IAudience {\n\t\treturn undefined as any as IAudience;\n\t}\n\n\tpublic submitMessage(): void {\n\t\t// No-op for mock context\n\t}\n\n\tpublic submitSignal(): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic makeLocallyVisible(): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic setChannelDirty(address: string): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async getAbsoluteUrl(relativeUrl: string): Promise<string | undefined> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic getCreateChildSummarizerNodeFn(\n\t\tid: string,\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic deleteChildSummarizerNode(id: string): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async uploadBlob(\n\t\tblob: ArrayBufferLike,\n\t): Promise<IFluidHandleInternal<ArrayBufferLike>> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic addedGCOutboundRoute(fromPath: string, toPath: string, messageTimestampMs?: number) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n}\n"]}
1
+ {"version":3,"file":"mocksDataStoreContext.js","sourceRoot":"","sources":["../src/mocksDataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2BH,qEAAoF;AACpF,uEAGkD;AAClD,+BAAkC;AAElC,mDAAmD;AAEnD;;GAEG;AACH,MAAa,yBAAyB;IA0CrC,YACiB,KAAa,IAAA,SAAI,GAAE,EACnB,WAAoB,KAAK,EACzB,aAAkC,IAAA,4BAAiB,EAAC;QACnE,SAAS,EAAE,iCAAiC;KAC5C,CAAC,EACF,cAAuB,IAAI;QALX,OAAE,GAAF,EAAE,CAAiB;QACnB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,eAAU,GAAV,UAAU,CAExB;QA9CI,qBAAgB,GAAY,IAAI,CAAC;QACjC,gBAAW,GAAsB,SAAgB,CAAC;QAElD,YAAO,GAAiC,EAAE,CAAC;QAC3C,aAAQ,GAAuB,IAAA,SAAI,GAAE,CAAC;QAEtC,cAAS,GAAY,IAAI,CAAC;QAC1B,aAAQ,GAAY,KAAK,CAAC;QAE1B,iBAAY,GAClB,IAAI,gCAAgB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEpC,qBAAgB,GAA0B,SAAgB,CAAC;QAC3D,YAAO,GAA2B,SAAgB,CAAC;QACnD,4BAAuB,GAA4B,SAAgB,CAAC;QACpE,wBAAmB,GAAwB,SAAgB,CAAC;QAC5D,iBAAY,GAAsC,SAAgB,CAAC;QAC1D,4BAAuB,GAAG,KAAK,CAAC;QAChC,kCAA6B,GAAG,KAAK,CAAC;QAOtD;;WAEG;QACI,gBAA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BAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,UAAU,CACtB,IAAqB;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,oBAAoB,CAC1B,QAAgB,EAChB,MAAc,EACd,kBAA2B;QAE3B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;CACD;AA/HD,8DA+HC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AttachState, IAudience } from \"@fluidframework/container-definitions\";\nimport { IDeltaManager } from \"@fluidframework/container-definitions/internal\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidHandleContext,\n\ttype IFluidHandleInternal,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { IClientDetails, IQuorumClients } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type { IIdCompressorCore } from \"@fluidframework/id-compressor/internal\";\nimport {\n\tCreateChildSummarizerNodeFn,\n\tCreateChildSummarizerNodeParam,\n\tIContainerRuntimeBase,\n\tIFluidDataStoreContext,\n\tIFluidDataStoreRegistry,\n\tIGarbageCollectionDetailsBase,\n\ttype IRuntimeStorageService,\n\ttype MinimumVersionForCollab,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { defaultMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tcreateChildLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { MockDeltaManager } from \"./mockDeltas.js\";\n\n/**\n * @legacy @beta\n */\nexport class MockFluidDataStoreContext implements IFluidDataStoreContext {\n\tpublic isLocalDataStore: boolean = true;\n\tpublic packagePath: readonly string[] = undefined as any;\n\n\tpublic options: Record<string | number, any> = {};\n\tpublic clientId: string | undefined = uuid();\n\tpublic clientDetails: IClientDetails;\n\tpublic connected: boolean = true;\n\tpublic readonly: boolean = false;\n\tpublic baseSnapshot: ISnapshotTree | undefined;\n\tpublic deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage> =\n\t\tnew MockDeltaManager(() => this.clientId);\n\n\tpublic containerRuntime: IContainerRuntimeBase = undefined as any;\n\tpublic storage: IRuntimeStorageService = undefined as any;\n\tpublic IFluidDataStoreRegistry: IFluidDataStoreRegistry = undefined as any;\n\tpublic IFluidHandleContext: IFluidHandleContext = undefined as any;\n\tpublic idCompressor: IIdCompressorCore & IIdCompressor = undefined as any;\n\tpublic readonly gcThrowOnTombstoneUsage = false;\n\tpublic readonly gcTombstoneEnforcementAllowed = false;\n\n\t/**\n\t * @remarks This is for internal use only.\n\t */\n\tpublic ILayerCompatDetails?: unknown;\n\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\tpublic attachState: AttachState = undefined as any;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\tpublic createProps?: any;\n\tpublic scope: FluidObject = undefined as any;\n\n\t/**\n\t * {@inheritdoc @fluidframework/runtime-definitions#IFluidDataStoreContext.minVersionForCollab}\n\t */\n\tpublic minVersionForCollab: MinimumVersionForCollab = defaultMinVersionForCollab;\n\n\tconstructor(\n\t\tpublic readonly id: string = uuid(),\n\t\tpublic readonly existing: boolean = false,\n\t\tpublic readonly baseLogger: ITelemetryLoggerExt = createChildLogger({\n\t\t\tnamespace: \"fluid:MockFluidDataStoreContext\",\n\t\t}),\n\t\tinteractive: boolean = true,\n\t) {\n\t\tthis.clientDetails = { capabilities: { interactive } };\n\t}\n\n\ton(event: string | symbol, listener: (...args: any[]) => void): this {\n\t\tswitch (event) {\n\t\t\tcase \"attaching\":\n\t\t\tcase \"attached\":\n\t\t\t\treturn this;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"Method not implemented.\");\n\t\t}\n\t}\n\n\tonce(event: string | symbol, listener: (...args: any[]) => void): this {\n\t\treturn this;\n\t}\n\n\toff(event: string | symbol, listener: (...args: any[]) => void): this {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic getQuorum(): IQuorumClients {\n\t\treturn undefined as any as IQuorumClients;\n\t}\n\n\tpublic getAudience(): IAudience {\n\t\treturn undefined as any as IAudience;\n\t}\n\n\tpublic submitMessage(): void {\n\t\t// No-op for mock context\n\t}\n\n\tpublic submitSignal(): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic makeLocallyVisible(): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic setChannelDirty(address: string): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async getAbsoluteUrl(relativeUrl: string): Promise<string | undefined> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic getCreateChildSummarizerNodeFn(\n\t\tid: string,\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t): CreateChildSummarizerNodeFn {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic deleteChildSummarizerNode(id: string): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async uploadBlob(\n\t\tblob: ArrayBufferLike,\n\t): Promise<IFluidHandleInternal<ArrayBufferLike>> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic addedGCOutboundRoute(\n\t\tfromPath: string,\n\t\ttoPath: string,\n\t\tmessageTimestampMs?: number,\n\t): void {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n}\n"]}
@@ -1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Content":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tcreateChildLogger,\n\traiseConnectedEvent,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\n\nimport {\n\ttype IMockContainerRuntimeIdAllocationMessage,\n\tIMockContainerRuntimeOptions,\n\tMockContainerRuntime,\n\tMockContainerRuntimeFactory,\n\tMockFluidDataStoreRuntime,\n} from \"./mocks.js\";\n\n/**\n * Specialized implementation of MockContainerRuntime for testing ops during reconnection.\n * @legacy @beta\n */\nexport class MockContainerRuntimeForReconnection extends MockContainerRuntime {\n\t/**\n\t * Contains messages from other clients that were sequenced while this runtime was marked as disconnected.\n\t */\n\tprotected readonly pendingRemoteMessages: ISequencedDocumentMessage[] = [];\n\n\t/**\n\t * Returns the connection state of the container runtime.\n\t * Any messages that are submitted while not connected will be resubmitted via the resubmit flow on reconnection.\n\t * Any messages received while disconnected will be processed on reconnection.\n\t * Also, the clientId of the runtime will change on reconnection.\n\t */\n\tpublic get connected(): boolean {\n\t\treturn this._connected;\n\t}\n\n\tpublic set connected(connected: boolean) {\n\t\tthis.setConnectedState(connected);\n\t}\n\n\tprotected processPendingMessages(pendingMessages: ISequencedDocumentMessage[]) {\n\t\tfor (const remoteMessage of pendingMessages) {\n\t\t\tthis.process(remoteMessage);\n\t\t}\n\t}\n\n\tprotected setConnectedState(connected: boolean): void {\n\t\tif (this._connected === connected) {\n\t\t\treturn;\n\t\t}\n\n\t\traiseConnectedEvent(createChildLogger(), this, connected);\n\t\tthis._connected = connected;\n\n\t\tif (connected) {\n\t\t\tthis.processPendingMessages(this.pendingRemoteMessages);\n\t\t\tthis.pendingRemoteMessages.length = 0;\n\t\t\tthis.deltaManager.clientSequenceNumber = 0;\n\t\t\t// We should get a new clientId on reconnection.\n\t\t\tthis.clientId = uuid();\n\t\t\t// Update the clientId in FluidDataStoreRuntime.\n\t\t\tthis.dataStoreRuntime.clientId = this.clientId;\n\t\t\tthis.factory.quorum.addMember(this.clientId, {});\n\t\t\t// On reconnection, ask the DDSes to resubmit pending messages.\n\t\t\tconst messagesToResubmit = this.pendingMessages.slice();\n\t\t\tthis.pendingMessages.length = 0;\n\t\t\tthis.reSubmitMessages(messagesToResubmit);\n\t\t} else {\n\t\t\t// On disconnection, clear any outstanding messages for this client because it will be resent.\n\t\t\tthis.factory.clearOutstandingClientMessages(this.clientId);\n\t\t\tthis.factory.quorum.removeMember(this.clientId);\n\t\t\tfor (const message of this.outbox) {\n\t\t\t\tthis.addPendingMessage(\n\t\t\t\t\tmessage.content,\n\t\t\t\t\tmessage.localOpMetadata,\n\t\t\t\t\t++this.deltaManager.clientSequenceNumber,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.outbox.length = 0;\n\t\t}\n\n\t\t// Let the DDSes know that the connection state changed.\n\t\tthis.dataStoreRuntime.setConnectionState(this.connected, this.clientId);\n\t}\n\n\tprivate _connected = true;\n\tprotected readonly processedOps?: ISequencedDocumentMessage[];\n\tconstructor(\n\t\tdataStoreRuntime: MockFluidDataStoreRuntime,\n\t\tprotected override readonly factory: MockContainerRuntimeFactoryForReconnection,\n\t\truntimeOptions: IMockContainerRuntimeOptions = {},\n\t\toverrides?: { minimumSequenceNumber?: number; trackRemoteOps?: boolean },\n\t) {\n\t\tsuper(dataStoreRuntime, factory, runtimeOptions, overrides);\n\t\tif (overrides?.trackRemoteOps === true) {\n\t\t\tthis.processedOps = [];\n\t\t}\n\t}\n\n\toverride process(message: ISequencedDocumentMessage) {\n\t\tif (this.connected) {\n\t\t\tthis.processedOps?.push(message);\n\t\t\tsuper.process(message);\n\t\t} else {\n\t\t\tthis.pendingRemoteMessages.push(message);\n\t\t}\n\t}\n\n\toverride submit(messageContent: any, localOpMetadata: unknown) {\n\t\t// Submit messages only if we are connection, otherwise, just add it to the pending queue.\n\t\tif (this.connected) {\n\t\t\treturn super.submit(messageContent, localOpMetadata);\n\t\t}\n\n\t\tthis.addPendingMessage(messageContent, localOpMetadata, -1);\n\t\treturn -1;\n\t}\n\n\toverride flush() {\n\t\t// Flush messages only if we are connected, otherwise, just ignore it.\n\t\tif (this.connected) {\n\t\t\tsuper.flush();\n\t\t}\n\t}\n\n\tpublic async initializeWithStashedOps(\n\t\tfromContainerRuntime: MockContainerRuntimeForReconnection,\n\t) {\n\t\tif (this.pendingMessages.length !== 0 || this.deltaManager.clientSequenceNumber !== 0) {\n\t\t\tthrow new Error(\"applyStashedOps must be called first, and once.\");\n\t\t}\n\n\t\tif (fromContainerRuntime.processedOps === undefined) {\n\t\t\tthrow new Error(\"containerRuntime must have trackRemoteOps true\");\n\t\t}\n\n\t\t// shutdown the existing client\n\t\tfromContainerRuntime.connected = false;\n\t\tfromContainerRuntime.flush();\n\t\tthis.factory.removeContainerRuntime(fromContainerRuntime);\n\t\t// clear any unprocessed ops for this client\n\t\tthis.factory.clearOutstandingClientMessages(fromContainerRuntime.clientId);\n\n\t\t// get the saved ops seen by the client, and its pending ops\n\t\tconst pendingMessages = fromContainerRuntime.pendingMessages.splice(0);\n\t\tconst remoteOps = [\n\t\t\t...fromContainerRuntime.processedOps.splice(0),\n\t\t\t...fromContainerRuntime.pendingRemoteMessages.splice(0),\n\t\t];\n\n\t\t// ensure no ops are sent to, or produced by the old client\n\t\t// this can help find bugs in the the harness\n\t\tObject.freeze(fromContainerRuntime.pendingMessages);\n\t\tObject.freeze(fromContainerRuntime.pendingRemoteMessages);\n\t\tObject.freeze(fromContainerRuntime.processedOps);\n\n\t\tlet refSeq = Math.min(\n\t\t\tremoteOps[0]?.referenceSequenceNumber ?? Number.MAX_SAFE_INTEGER,\n\t\t\tpendingMessages[0]?.referenceSequenceNumber ?? Number.MAX_SAFE_INTEGER,\n\t\t);\n\t\tif (refSeq === Number.MAX_SAFE_INTEGER) {\n\t\t\trefSeq = 0;\n\t\t}\n\t\tif (\n\t\t\tthis.dataStoreRuntime.deltaManagerInternal.lastSequenceNumber !== refSeq ||\n\t\t\tthis.dataStoreRuntime.deltaManagerInternal.minimumSequenceNumber !== refSeq\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t\"computed min and ref seq don't match the loaded values; this indicates a bad load, or missing messages\",\n\t\t\t);\n\t\t}\n\n\t\tconst stashedOps = new Map<number, any>();\n\n\t\tremoteOps.forEach((op) => {\n\t\t\tif (op.clientId === this.clientId) {\n\t\t\t\tconst ops = stashedOps.get(op.referenceSequenceNumber) ?? [];\n\t\t\t\tops.push(op.contents);\n\t\t\t\tstashedOps.set(op.referenceSequenceNumber, ops);\n\t\t\t}\n\t\t});\n\t\tpendingMessages.forEach((op) => {\n\t\t\tconst ops = stashedOps.get(op.referenceSequenceNumber) ?? [];\n\t\t\tops.push(op.content);\n\t\t\tstashedOps.set(op.referenceSequenceNumber, ops);\n\t\t});\n\n\t\tconst applyStashedOpsAtSeq = async (seq: number) => {\n\t\t\tconst pendingAtSeq = stashedOps.get(seq);\n\t\t\tfor (const message of pendingAtSeq ?? []) {\n\t\t\t\t// As in production, do not locally apply any stashed ID allocation messages.\n\t\t\t\t// Instead, simply resubmit them.\n\t\t\t\tif ((message as IMockContainerRuntimeIdAllocationMessage).type === \"idAllocation\") {\n\t\t\t\t\tthis.submit(message, undefined);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.dataStoreRuntime.applyStashedOp(message);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstashedOps.delete(seq);\n\t\t};\n\t\tawait applyStashedOpsAtSeq(this.dataStoreRuntime.deltaManagerInternal.lastSequenceNumber);\n\t\t// apply the saved and pending ops\n\t\tfor (const savedOp of remoteOps) {\n\t\t\tthis.process(savedOp);\n\t\t\tawait applyStashedOpsAtSeq(\n\t\t\t\tthis.dataStoreRuntime.deltaManagerInternal.lastSequenceNumber,\n\t\t\t);\n\t\t}\n\t\tif (stashedOps.size !== 0) {\n\t\t\tthrow new Error(\"There should be no pending message after saved ops are processed\");\n\t\t}\n\t\t// issue a reconnect to rebase pending ops\n\t\tthis.connected = false;\n\t\tthis.connected = true;\n\t}\n}\n\n/**\n * Specialized implementation of MockContainerRuntimeFactory for testing ops during reconnection.\n * @legacy @beta\n */\nexport class MockContainerRuntimeFactoryForReconnection extends MockContainerRuntimeFactory {\n\toverride createContainerRuntime(\n\t\tdataStoreRuntime: MockFluidDataStoreRuntime,\n\t\toverrides?: { minimumSequenceNumber?: number; trackRemoteOps?: boolean },\n\t): MockContainerRuntimeForReconnection {\n\t\tconst containerRuntime = new MockContainerRuntimeForReconnection(\n\t\t\tdataStoreRuntime,\n\t\t\tthis,\n\t\t\tthis.runtimeOptions,\n\t\t\toverrides,\n\t\t);\n\t\tthis.runtimes.add(containerRuntime);\n\t\treturn containerRuntime;\n\t}\n\n\tpublic clearOutstandingClientMessages(clientId: string) {\n\t\t// Delete all the messages for client with the given clientId.\n\t\tthis.messages = this.messages.filter((message: ISequencedDocumentMessage) => {\n\t\t\treturn message.clientId !== clientId;\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"mocksForReconnection.js","sourceRoot":"","sources":["../src/mocksForReconnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uEAGkD;AAClD,+BAAkC;AAElC,yCAMoB;AAEpB;;;GAGG;AACH,MAAa,mCAAoC,SAAQ,+BAAoB;IAM5E;;;;;OAKG;IACH,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED,IAAW,SAAS,CAAC,SAAkB;QACtC,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAES,sBAAsB,CAAC,eAA4C;QAC5E,KAAK,MAAM,aAAa,IAAI,eAAe,EAAE,CAAC;YAC7C,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC;IAES,iBAAiB,CAAC,SAAkB;QAC7C,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;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AAO,gBAAgB,CAAC;IACzB,CAAC;IAEM,8BAA8B,CAAC,QAAgB;QACrD,8DAA8D;QAC9D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAkC,EAAE,EAAE;YAC3E,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC;QACtC,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AArBD,gGAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport {\n\tcreateChildLogger,\n\traiseConnectedEvent,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\n\nimport {\n\ttype IMockContainerRuntimeIdAllocationMessage,\n\tIMockContainerRuntimeOptions,\n\tMockContainerRuntime,\n\tMockContainerRuntimeFactory,\n\tMockFluidDataStoreRuntime,\n} from \"./mocks.js\";\n\n/**\n * Specialized implementation of MockContainerRuntime for testing ops during reconnection.\n * @legacy @beta\n */\nexport class MockContainerRuntimeForReconnection extends MockContainerRuntime {\n\t/**\n\t * Contains messages from other clients that were sequenced while this runtime was marked as disconnected.\n\t */\n\tprotected readonly pendingRemoteMessages: ISequencedDocumentMessage[] = [];\n\n\t/**\n\t * Returns the connection state of the container runtime.\n\t * Any messages that are submitted while not connected will be resubmitted via the resubmit flow on reconnection.\n\t * Any messages received while disconnected will be processed on reconnection.\n\t * Also, the clientId of the runtime will change on reconnection.\n\t */\n\tpublic get connected(): boolean {\n\t\treturn this._connected;\n\t}\n\n\tpublic set connected(connected: boolean) {\n\t\tthis.setConnectedState(connected);\n\t}\n\n\tprotected processPendingMessages(pendingMessages: ISequencedDocumentMessage[]): void {\n\t\tfor (const remoteMessage of pendingMessages) {\n\t\t\tthis.process(remoteMessage);\n\t\t}\n\t}\n\n\tprotected setConnectedState(connected: boolean): void {\n\t\tif (this._connected === connected) {\n\t\t\treturn;\n\t\t}\n\n\t\traiseConnectedEvent(createChildLogger(), this, connected);\n\t\tthis._connected = connected;\n\n\t\tif (connected) {\n\t\t\tthis.processPendingMessages(this.pendingRemoteMessages);\n\t\t\tthis.pendingRemoteMessages.length = 0;\n\t\t\tthis.deltaManager.clientSequenceNumber = 0;\n\t\t\t// We should get a new clientId on reconnection.\n\t\t\tthis.clientId = uuid();\n\t\t\t// Update the clientId in FluidDataStoreRuntime.\n\t\t\tthis.dataStoreRuntime.clientId = this.clientId;\n\t\t\tthis.factory.quorum.addMember(this.clientId, {});\n\t\t\t// On reconnection, ask the DDSes to resubmit pending messages.\n\t\t\tconst messagesToResubmit = this.pendingMessages.slice();\n\t\t\tthis.pendingMessages.length = 0;\n\t\t\tthis.reSubmitMessages(messagesToResubmit);\n\t\t} else {\n\t\t\t// On disconnection, clear any outstanding messages for this client because it will be resent.\n\t\t\tthis.factory.clearOutstandingClientMessages(this.clientId);\n\t\t\tthis.factory.quorum.removeMember(this.clientId);\n\t\t\tfor (const message of this.outbox) {\n\t\t\t\tthis.addPendingMessage(\n\t\t\t\t\tmessage.content,\n\t\t\t\t\tmessage.localOpMetadata,\n\t\t\t\t\t++this.deltaManager.clientSequenceNumber,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.outbox.length = 0;\n\t\t}\n\n\t\t// Let the DDSes know that the connection state changed.\n\t\tthis.dataStoreRuntime.setConnectionState(this.connected, this.clientId);\n\t}\n\n\tprivate _connected = true;\n\tprotected readonly processedOps?: ISequencedDocumentMessage[];\n\tconstructor(\n\t\tdataStoreRuntime: MockFluidDataStoreRuntime,\n\t\tprotected override readonly factory: MockContainerRuntimeFactoryForReconnection,\n\t\truntimeOptions: IMockContainerRuntimeOptions = {},\n\t\toverrides?: { minimumSequenceNumber?: number; trackRemoteOps?: boolean },\n\t) {\n\t\tsuper(dataStoreRuntime, factory, runtimeOptions, overrides);\n\t\tif (overrides?.trackRemoteOps === true) {\n\t\t\tthis.processedOps = [];\n\t\t}\n\t}\n\n\toverride process(message: ISequencedDocumentMessage): void {\n\t\tif (this.connected) {\n\t\t\tthis.processedOps?.push(message);\n\t\t\tsuper.process(message);\n\t\t} else {\n\t\t\tthis.pendingRemoteMessages.push(message);\n\t\t}\n\t}\n\n\toverride submit(messageContent: any, localOpMetadata: unknown): number {\n\t\t// Submit messages only if we are connection, otherwise, just add it to the pending queue.\n\t\tif (this.connected) {\n\t\t\treturn super.submit(messageContent, localOpMetadata);\n\t\t}\n\n\t\tthis.addPendingMessage(messageContent, localOpMetadata, -1);\n\t\treturn -1;\n\t}\n\n\toverride flush(): void {\n\t\t// Flush messages only if we are connected, otherwise, just ignore it.\n\t\tif (this.connected) {\n\t\t\tsuper.flush();\n\t\t}\n\t}\n\n\tpublic async initializeWithStashedOps(\n\t\tfromContainerRuntime: MockContainerRuntimeForReconnection,\n\t): Promise<void> {\n\t\tif (this.pendingMessages.length !== 0 || this.deltaManager.clientSequenceNumber !== 0) {\n\t\t\tthrow new Error(\"applyStashedOps must be called first, and once.\");\n\t\t}\n\n\t\tif (fromContainerRuntime.processedOps === undefined) {\n\t\t\tthrow new Error(\"containerRuntime must have trackRemoteOps true\");\n\t\t}\n\n\t\t// shutdown the existing client\n\t\tfromContainerRuntime.connected = false;\n\t\tfromContainerRuntime.flush();\n\t\tthis.factory.removeContainerRuntime(fromContainerRuntime);\n\t\t// clear any unprocessed ops for this client\n\t\tthis.factory.clearOutstandingClientMessages(fromContainerRuntime.clientId);\n\n\t\t// get the saved ops seen by the client, and its pending ops\n\t\tconst pendingMessages = fromContainerRuntime.pendingMessages.splice(0);\n\t\tconst remoteOps = [\n\t\t\t...fromContainerRuntime.processedOps.splice(0),\n\t\t\t...fromContainerRuntime.pendingRemoteMessages.splice(0),\n\t\t];\n\n\t\t// ensure no ops are sent to, or produced by the old client\n\t\t// this can help find bugs in the the harness\n\t\tObject.freeze(fromContainerRuntime.pendingMessages);\n\t\tObject.freeze(fromContainerRuntime.pendingRemoteMessages);\n\t\tObject.freeze(fromContainerRuntime.processedOps);\n\n\t\tlet refSeq = Math.min(\n\t\t\tremoteOps[0]?.referenceSequenceNumber ?? Number.MAX_SAFE_INTEGER,\n\t\t\tpendingMessages[0]?.referenceSequenceNumber ?? Number.MAX_SAFE_INTEGER,\n\t\t);\n\t\tif (refSeq === Number.MAX_SAFE_INTEGER) {\n\t\t\trefSeq = 0;\n\t\t}\n\t\tif (\n\t\t\tthis.dataStoreRuntime.deltaManagerInternal.lastSequenceNumber !== refSeq ||\n\t\t\tthis.dataStoreRuntime.deltaManagerInternal.minimumSequenceNumber !== refSeq\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t\"computed min and ref seq don't match the loaded values; this indicates a bad load, or missing messages\",\n\t\t\t);\n\t\t}\n\n\t\tconst stashedOps = new Map<number, any>();\n\n\t\tremoteOps.forEach((op) => {\n\t\t\tif (op.clientId === this.clientId) {\n\t\t\t\tconst ops = stashedOps.get(op.referenceSequenceNumber) ?? [];\n\t\t\t\tops.push(op.contents);\n\t\t\t\tstashedOps.set(op.referenceSequenceNumber, ops);\n\t\t\t}\n\t\t});\n\t\tpendingMessages.forEach((op) => {\n\t\t\tconst ops = stashedOps.get(op.referenceSequenceNumber) ?? [];\n\t\t\tops.push(op.content);\n\t\t\tstashedOps.set(op.referenceSequenceNumber, ops);\n\t\t});\n\n\t\tconst applyStashedOpsAtSeq = async (seq: number): Promise<void> => {\n\t\t\tconst pendingAtSeq = stashedOps.get(seq);\n\t\t\tfor (const message of pendingAtSeq ?? []) {\n\t\t\t\t// As in production, do not locally apply any stashed ID allocation messages.\n\t\t\t\t// Instead, simply resubmit them.\n\t\t\t\tif ((message as IMockContainerRuntimeIdAllocationMessage).type === \"idAllocation\") {\n\t\t\t\t\tthis.submit(message, undefined);\n\t\t\t\t} else {\n\t\t\t\t\tawait this.dataStoreRuntime.applyStashedOp(message);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstashedOps.delete(seq);\n\t\t};\n\t\tawait applyStashedOpsAtSeq(this.dataStoreRuntime.deltaManagerInternal.lastSequenceNumber);\n\t\t// apply the saved and pending ops\n\t\tfor (const savedOp of remoteOps) {\n\t\t\tthis.process(savedOp);\n\t\t\tawait applyStashedOpsAtSeq(\n\t\t\t\tthis.dataStoreRuntime.deltaManagerInternal.lastSequenceNumber,\n\t\t\t);\n\t\t}\n\t\tif (stashedOps.size !== 0) {\n\t\t\tthrow new Error(\"There should be no pending message after saved ops are processed\");\n\t\t}\n\t\t// issue a reconnect to rebase pending ops\n\t\tthis.connected = false;\n\t\tthis.connected = true;\n\t}\n}\n\n/**\n * Specialized implementation of MockContainerRuntimeFactory for testing ops during reconnection.\n * @legacy @beta\n */\nexport class MockContainerRuntimeFactoryForReconnection extends MockContainerRuntimeFactory {\n\toverride createContainerRuntime(\n\t\tdataStoreRuntime: MockFluidDataStoreRuntime,\n\t\toverrides?: { minimumSequenceNumber?: number; trackRemoteOps?: boolean },\n\t): MockContainerRuntimeForReconnection {\n\t\tconst containerRuntime = new MockContainerRuntimeForReconnection(\n\t\t\tdataStoreRuntime,\n\t\t\tthis,\n\t\t\tthis.runtimeOptions,\n\t\t\toverrides,\n\t\t);\n\t\tthis.runtimes.add(containerRuntime);\n\t\treturn containerRuntime;\n\t}\n\n\tpublic clearOutstandingClientMessages(clientId: string): void {\n\t\t// Delete all the messages for client with the given clientId.\n\t\tthis.messages = this.messages.filter((message: ISequencedDocumentMessage) => {\n\t\t\treturn message.clientId !== clientId;\n\t\t});\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"validateAssertionError.d.ts","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACrC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAC/B,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAmBxB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAE5F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAE3F;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC5B,gBAAgB,EAAE,MAAM,GAAG,MAAM,EACjC,SAAS,GAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAa,GAC9C,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAaxB"}
1
+ {"version":3,"file":"validateAssertionError.d.ts","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACrC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAC/B,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAmBxB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAE5F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAE3F;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC5B,gBAAgB,EAAE,MAAM,GAAG,MAAM,EACjC,SAAS,GAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAa,GAC9C,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAaxB"}
@@ -5,8 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.validateError = exports.validateTypeError = exports.validateUsageError = exports.validateAssertionError = void 0;
8
- const internal_1 = require("@fluidframework/telemetry-utils/internal");
9
- const internal_2 = require("@fluidframework/core-utils/internal");
8
+ const internal_1 = require("@fluidframework/core-utils/internal");
9
+ const internal_2 = require("@fluidframework/telemetry-utils/internal");
10
10
  const assertionShortCodesMap_js_1 = require("./assertionShortCodesMap.js");
11
11
  /**
12
12
  * Validates that an error thrown by our `assert()` function has the expected message, or a
@@ -48,7 +48,7 @@ exports.validateAssertionError = validateAssertionError;
48
48
  * @internal
49
49
  */
50
50
  function validateUsageError(expectedErrorMsg) {
51
- return validateError(expectedErrorMsg, internal_1.UsageError);
51
+ return validateError(expectedErrorMsg, internal_2.UsageError);
52
52
  }
53
53
  exports.validateUsageError = validateUsageError;
54
54
  /**
@@ -69,7 +69,7 @@ exports.validateTypeError = validateTypeError;
69
69
  */
70
70
  function validateError(expectedErrorMsg, errorType = Error) {
71
71
  return (error) => {
72
- (0, internal_2.assert)(error instanceof errorType, `Expected an error of type "${errorType.name}", but got "${error}"`);
72
+ (0, internal_1.assert)(error instanceof errorType, `Expected an error of type "${errorType.name}", but got "${error}"`);
73
73
  if (testErrorMessage(error.message, expectedErrorMsg)) {
74
74
  throw new Error(`Unexpected ${errorType.name} thrown\nActual: ${error.message}\nExpected: ${expectedErrorMsg}`);
75
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validateAssertionError.js","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AACtE,kEAA6D;AAC7D,2EAA2D;AAE3D;;;;;;;;;;;;;;GAcG;AACH,SAAgB,sBAAsB,CACrC,gBAAiC;IAEjC,OAAO,CAAC,KAAY,EAAE,EAAE;QACvB,iHAAiH;QACjH,oIAAoI;QACpI,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,iBAAiB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,iBAAiB,IAAI,wCAAY,EAAE,CAAC;YAC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D,OAAO,IAAI,CAAC;IACb,CAAC,CAAC;AACH,CAAC;AAhBD,sCAgBC;AAED,SAAS,gBAAgB,CAAC,aAAqB,EAAE,gBAAiC;IACjF,OAAO,OAAO,gBAAgB,KAAK,QAAQ;QAC1C,CAAC,CAAC,aAAa,KAAK,gBAAgB;QACpC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { shortCodeMap } from \"./assertionShortCodesMap.js\";\n\n/**\n * Validates that an error thrown by our `assert()` function has the expected message, or a\n * short code that corresponds to that message.\n *\n * @remarks\n * The main use case for this is so tests that expect specific assert() calls to fail can\n * always do comparisons based on the original string message, and work whether they run\n * before the policy-check tool replaces those strings with short codes, or after. Note that\n * it either returns true or throws an error (the behavior expected by NodeJS' `assert.throws()`).\n *\n * @param expectedErrorMessage - The message that the error object should match (either explicitly,\n * or because it contains a short code which maps to that message).\n * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.\n * @internal\n */\nexport function validateAssertionError(\n\texpectedErrorMsg: string | RegExp,\n): (error: Error) => true {\n\treturn (error: Error) => {\n\t\t// Asserts with custom debugMessageBuilder put extra content on the second line of the message, even when tagged.\n\t\t// Thus extract the first line, which will be the assert tag if there is one, and replace it with the message from the shortCodeMap.\n\t\tconst split = error.message.split(\"\\n\");\n\t\tconst possibleShortCode = split[0].trim();\n\t\tif (possibleShortCode in shortCodeMap) {\n\t\t\tsplit[0] = shortCodeMap[possibleShortCode];\n\t\t}\n\t\tconst mappedMsg = split.join(\"\\n\");\n\n\t\tif (testErrorMessage(mappedMsg, expectedErrorMsg)) {\n\t\t\t// This throws an Error instead of an AssertionError because AssertionError would require a dependency on the\n\t\t\t// node assert library, which we don't want to do for this library because it's used in the browser.\n\t\t\tconst message = `Unexpected assertion thrown\\nActual: ${error.message === mappedMsg ? error.message : `${error.message} ('${mappedMsg}')}`}\\nExpected: ${expectedErrorMsg}`;\n\t\t\tthrow new Error(message);\n\t\t}\n\t\treturn true;\n\t};\n}\n\n/**\n * {@link validateError} for `UsageError`.\n * @internal\n */\nexport function validateUsageError(expectedErrorMsg: string | RegExp): (error: Error) => true {\n\treturn validateError(expectedErrorMsg, UsageError);\n}\n\n/**\n * {@link validateError} for `TypeError`.\n * @internal\n */\nexport function validateTypeError(expectedErrorMsg: string | RegExp): (error: Error) => true {\n\treturn validateError(expectedErrorMsg, TypeError);\n}\n\n/**\n * Validates that a specific kind of error was thrown with the expected message.\n * @remarks\n * Intended for use with NodeJS's `assert.throws`.\n * @see {@link validateAssertionError}, {@link validateUsageError}, {@link validateTypeError} for more specialized versions.\n * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.\n * @internal\n */\nexport function validateError(\n\texpectedErrorMsg: string | RegExp,\n\terrorType: new (...args: any[]) => Error = Error,\n): (error: Error) => true {\n\treturn (error: Error) => {\n\t\tassert(\n\t\t\terror instanceof errorType,\n\t\t\t`Expected an error of type \"${errorType.name}\", but got \"${error}\"`,\n\t\t);\n\t\tif (testErrorMessage(error.message, expectedErrorMsg)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unexpected ${errorType.name} thrown\\nActual: ${error.message}\\nExpected: ${expectedErrorMsg}`,\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t};\n}\n\nfunction testErrorMessage(actualMessage: string, expectedErrorMsg: string | RegExp): boolean {\n\treturn typeof expectedErrorMsg === \"string\"\n\t\t? actualMessage !== expectedErrorMsg\n\t\t: !expectedErrorMsg.test(actualMessage);\n}\n"]}
1
+ {"version":3,"file":"validateAssertionError.js","sourceRoot":"","sources":["../src/validateAssertionError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAC7D,uEAAsE;AAEtE,2EAA2D;AAE3D;;;;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,EAAE,EAAE;QACvB,IAAA,iBAAM,EACL,KAAK,YAAY,SAAS,EAC1B,8BAA8B,SAAS,CAAC,IAAI,eAAe,KAAK,GAAG,CACnE,CAAC;QACF,IAAI,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,gBAAgB,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CACd,cAAc,SAAS,CAAC,IAAI,oBAAoB,KAAK,CAAC,OAAO,eAAe,gBAAgB,EAAE,CAC9F,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC,CAAC;AACH,CAAC;AAhBD,sCAgBC;AAED,SAAS,gBAAgB,CAAC,aAAqB,EAAE,gBAAiC;IACjF,OAAO,OAAO,gBAAgB,KAAK,QAAQ;QAC1C,CAAC,CAAC,aAAa,KAAK,gBAAgB;QACpC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { shortCodeMap } from \"./assertionShortCodesMap.js\";\n\n/**\n * Validates that an error thrown by our `assert()` function has the expected message, or a\n * short code that corresponds to that message.\n *\n * @remarks\n * The main use case for this is so tests that expect specific assert() calls to fail can\n * always do comparisons based on the original string message, and work whether they run\n * before the policy-check tool replaces those strings with short codes, or after. Note that\n * it either returns true or throws an error (the behavior expected by NodeJS' `assert.throws()`).\n *\n * @param expectedErrorMessage - The message that the error object should match (either explicitly,\n * or because it contains a short code which maps to that message).\n * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.\n * @internal\n */\nexport function validateAssertionError(\n\texpectedErrorMsg: string | RegExp,\n): (error: Error) => true {\n\treturn (error: Error) => {\n\t\t// Asserts with custom debugMessageBuilder put extra content on the second line of the message, even when tagged.\n\t\t// Thus extract the first line, which will be the assert tag if there is one, and replace it with the message from the shortCodeMap.\n\t\tconst split = error.message.split(\"\\n\");\n\t\tconst possibleShortCode = split[0].trim();\n\t\tif (possibleShortCode in shortCodeMap) {\n\t\t\tsplit[0] = shortCodeMap[possibleShortCode];\n\t\t}\n\t\tconst mappedMsg = split.join(\"\\n\");\n\n\t\tif (testErrorMessage(mappedMsg, expectedErrorMsg)) {\n\t\t\t// This throws an Error instead of an AssertionError because AssertionError would require a dependency on the\n\t\t\t// node assert library, which we don't want to do for this library because it's used in the browser.\n\t\t\tconst message = `Unexpected assertion thrown\\nActual: ${error.message === mappedMsg ? error.message : `${error.message} ('${mappedMsg}')}`}\\nExpected: ${expectedErrorMsg}`;\n\t\t\tthrow new Error(message);\n\t\t}\n\t\treturn true;\n\t};\n}\n\n/**\n * {@link validateError} for `UsageError`.\n * @internal\n */\nexport function validateUsageError(expectedErrorMsg: string | RegExp): (error: Error) => true {\n\treturn validateError(expectedErrorMsg, UsageError);\n}\n\n/**\n * {@link validateError} for `TypeError`.\n * @internal\n */\nexport function validateTypeError(expectedErrorMsg: string | RegExp): (error: Error) => true {\n\treturn validateError(expectedErrorMsg, TypeError);\n}\n\n/**\n * Validates that a specific kind of error was thrown with the expected message.\n * @remarks\n * Intended for use with NodeJS's `assert.throws`.\n * @see {@link validateAssertionError}, {@link validateUsageError}, {@link validateTypeError} for more specialized versions.\n * @returns an error validation function suitable for use with NodeJS's `assert.throws()`.\n * @internal\n */\nexport function validateError(\n\texpectedErrorMsg: string | RegExp,\n\terrorType: new (...args: any[]) => Error = Error,\n): (error: Error) => true {\n\treturn (error: Error) => {\n\t\tassert(\n\t\t\terror instanceof errorType,\n\t\t\t`Expected an error of type \"${errorType.name}\", but got \"${error}\"`,\n\t\t);\n\t\tif (testErrorMessage(error.message, expectedErrorMsg)) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unexpected ${errorType.name} thrown\\nActual: ${error.message}\\nExpected: ${expectedErrorMsg}`,\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t};\n}\n\nfunction testErrorMessage(actualMessage: string, expectedErrorMsg: string | RegExp): boolean {\n\treturn typeof expectedErrorMsg === \"string\"\n\t\t? actualMessage !== expectedErrorMsg\n\t\t: !expectedErrorMsg.test(actualMessage);\n}\n"]}
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * GENERATED FILE - DO NOT EDIT DIRECTLY.
4
+ * To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
5
+ */
6
+ import type { Linter } from "eslint";
7
+ import { minimalDeprecated } from "../../../common/build/eslint-config-fluid/flat.mts";
8
+
9
+ const config: Linter.Config[] = [
10
+ ...minimalDeprecated,
11
+ {
12
+ rules: {
13
+ "@typescript-eslint/strict-boolean-expressions": "off",
14
+ },
15
+ },
16
+ {
17
+ files: ["src/assertionShortCodesMap.ts"],
18
+ rules: {
19
+ "@typescript-eslint/comma-dangle": "off",
20
+ },
21
+ },
22
+ {
23
+ files: ["src/test/**"],
24
+ rules: {
25
+ "import-x/no-nodejs-modules": "off",
26
+ },
27
+ },
28
+ ];
29
+
30
+ export default config;
@@ -1006,7 +1006,6 @@ export declare const shortCodeMap: {
1006
1006
  "0x7a2": string;
1007
1007
  "0x7a5": string;
1008
1008
  "0x7a8": string;
1009
- "0x7a9": string;
1010
1009
  "0x7aa": string;
1011
1010
  "0x7af": string;
1012
1011
  "0x7b6": string;
@@ -1284,14 +1283,10 @@ export declare const shortCodeMap: {
1284
1283
  "0x9aa": string;
1285
1284
  "0x9ab": string;
1286
1285
  "0x9ad": string;
1287
- "0x9af": string;
1288
- "0x9b0": string;
1289
1286
  "0x9b1": string;
1290
1287
  "0x9b4": string;
1291
1288
  "0x9b5": string;
1292
1289
  "0x9b6": string;
1293
- "0x9b8": string;
1294
- "0x9b9": string;
1295
1290
  "0x9ba": string;
1296
1291
  "0x9bb": string;
1297
1292
  "0x9bc": string;
@@ -1419,18 +1414,6 @@ export declare const shortCodeMap: {
1419
1414
  "0xa6f": string;
1420
1415
  "0xa70": string;
1421
1416
  "0xa71": string;
1422
- "0xa73": string;
1423
- "0xa74": string;
1424
- "0xa75": string;
1425
- "0xa76": string;
1426
- "0xa77": string;
1427
- "0xa78": string;
1428
- "0xa79": string;
1429
- "0xa7a": string;
1430
- "0xa7b": string;
1431
- "0xa7c": string;
1432
- "0xa7d": string;
1433
- "0xa7e": string;
1434
1417
  "0xa7f": string;
1435
1418
  "0xa80": string;
1436
1419
  "0xa83": string;
@@ -1449,7 +1432,6 @@ export declare const shortCodeMap: {
1449
1432
  "0xa94": string;
1450
1433
  "0xa95": string;
1451
1434
  "0xa97": string;
1452
- "0xa98": string;
1453
1435
  "0xa99": string;
1454
1436
  "0xa9a": string;
1455
1437
  "0xa9b": string;
@@ -1621,7 +1603,6 @@ export declare const shortCodeMap: {
1621
1603
  "0xb5d": string;
1622
1604
  "0xb5e": string;
1623
1605
  "0xb5f": string;
1624
- "0xb60": string;
1625
1606
  "0xb61": string;
1626
1607
  "0xb62": string;
1627
1608
  "0xb63": string;
@@ -1774,7 +1755,6 @@ export declare const shortCodeMap: {
1774
1755
  "0xc16": string;
1775
1756
  "0xc17": string;
1776
1757
  "0xc1a": string;
1777
- "0xc1b": string;
1778
1758
  "0xc1e": string;
1779
1759
  "0xc1f": string;
1780
1760
  "0xc20": string;
@@ -1838,7 +1818,6 @@ export declare const shortCodeMap: {
1838
1818
  "0xc62": string;
1839
1819
  "0xc63": string;
1840
1820
  "0xc64": string;
1841
- "0xc65": string;
1842
1821
  "0xc66": string;
1843
1822
  "0xc67": string;
1844
1823
  "0xc68": string;
@@ -1900,5 +1879,17 @@ export declare const shortCodeMap: {
1900
1879
  "0xca1": string;
1901
1880
  "0xca2": string;
1902
1881
  "0xca3": string;
1882
+ "0xca4": string;
1883
+ "0xca5": string;
1884
+ "0xca6": string;
1885
+ "0xca7": string;
1886
+ "0xca8": string;
1887
+ "0xca9": string;
1888
+ "0xcaa": string;
1889
+ "0xcab": string;
1890
+ "0xcac": string;
1891
+ "0xcad": string;
1892
+ "0xcae": string;
1893
+ "0xcaf": string;
1903
1894
  };
1904
1895
  //# sourceMappingURL=assertionShortCodesMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertionShortCodesMap.d.ts","sourceRoot":"","sources":["../src/assertionShortCodesMap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;CA+1DxB,CAAC"}
@@ -1007,7 +1007,6 @@ export const shortCodeMap = {
1007
1007
  "0x7a2": "Must be in a field in order to attach",
1008
1008
  "0x7a5": "Must be in a field in order to detach",
1009
1009
  "0x7a8": "should be in fields",
1010
- "0x7a9": "Collision during index update",
1011
1010
  "0x7aa": "Unknown removed node ID",
1012
1011
  "0x7af": "Destination must be a new empty detached field",
1013
1012
  "0x7b6": "Attach source field must be different from current field",
@@ -1285,14 +1284,10 @@ export const shortCodeMap = {
1285
1284
  "0x9aa": "identifier must be type string",
1286
1285
  "0x9ab": "childId is undefined in unpackChildNodesUsedRoutes",
1287
1286
  "0x9ad": "previous ordinal should not be empty",
1288
- "0x9af": "A view cannot be rebased while it has a pending transaction",
1289
- "0x9b0": "Views cannot be merged into a view while it has a pending transaction",
1290
1287
  "0x9b1": "Expected tree node to have kernel",
1291
1288
  "0x9b4": "Unexpected flex node implementation",
1292
1289
  "0x9b5": "Inheritance should work",
1293
1290
  "0x9b6": "No error to clear",
1294
- "0x9b8": "Inconsistent data: missing detached node entry",
1295
- "0x9b9": "Inconsistent data: missing node entry in latestRelevantRevision",
1296
1291
  "0x9ba": "Unable to delete unknown entry",
1297
1292
  "0x9bb": "Unable to delete unknown entry",
1298
1293
  "0x9bc": "detached node id does not exist in the detached field index",
@@ -1420,18 +1415,6 @@ export const shortCodeMap = {
1420
1415
  "0xa6f": "Pending changes must exist for rollback when collaborating",
1421
1416
  "0xa70": "Pending changes must not exist when not collaborating",
1422
1417
  "0xa71": "must have local change to ack",
1423
- "0xa73": "The typeField must be present in new JSON content",
1424
- "0xa74": "Expected object schema",
1425
- "0xa75": "the field must be an array node",
1426
- "0xa76": "the modification must be an array node",
1427
- "0xa77": "node to move must exist",
1428
- "0xa78": "node to move must exist",
1429
- "0xa79": "objectId does not exist in nodeMap",
1430
- "0xa7a": "Different scopes not supported yet.",
1431
- "0xa7b": "Collision of object id property.",
1432
- "0xa7c": "Ref not found.",
1433
- "0xa7d": "Expected at least two types",
1434
- "0xa7e": "Expected at least two types",
1435
1418
  "0xa7f": "Delta manager does not have inbound/outbound queues.",
1436
1419
  "0xa80": "Invalid delta manager",
1437
1420
  "0xa83": "Expected commit(s) for a non no-op rebase",
@@ -1450,7 +1433,6 @@ export const shortCodeMap = {
1450
1433
  "0xa94": "invalid forbidden field",
1451
1434
  "0xa95": "Invalid map schema",
1452
1435
  "0xa97": "Not in transaction",
1453
- "0xa98": "Expected transaction branch",
1454
1436
  "0xa99": "must have a parent",
1455
1437
  "0xa9a": "must have a parent",
1456
1438
  "0xa9b": "attach should happen in a node",
@@ -1622,7 +1604,6 @@ export const shortCodeMap = {
1622
1604
  "0xb5d": "Expected last remove to be unacked",
1623
1605
  "0xb5e": "Expected prior remove to be acked",
1624
1606
  "0xb5f": "Expected same length for client ids and seqs",
1625
- "0xb60": "Invalid schema",
1626
1607
  "0xb61": "Invalid old reference",
1627
1608
  "0xb62": "Invalid new segment on rebase",
1628
1609
  "0xb63": "Resubmitting obliterate op without obliterate info in segment group",
@@ -1775,7 +1756,6 @@ export const shortCodeMap = {
1775
1756
  "0xc16": "missing schema for array node",
1776
1757
  "0xc17": "Expected MapNodeStoredSchema",
1777
1758
  "0xc1a": "Expected MapNodeStoredSchema",
1778
- "0xc1b": "Expected at least two types",
1779
1759
  "0xc1e": "Expected a constructed node to be an object",
1780
1760
  "0xc1f": "Transaction did not complete.",
1781
1761
  "0xc20": "snapshot tree not found for one of tree's summarizables",
@@ -1839,7 +1819,6 @@ export const shortCodeMap = {
1839
1819
  "0xc62": "Cannot encode branch base without originatorId",
1840
1820
  "0xc63": "Cannot decode branch id without originatorId",
1841
1821
  "0xc64": "Cannot decode branch base without originatorId",
1842
- "0xc65": "Cannot encode V5 summary without originator",
1843
1822
  "0xc66": "Shared branches must have an id",
1844
1823
  "0xc67": "Duplicate shared branch id",
1845
1824
  "0xc68": "Only commit messages are supported",
@@ -1900,6 +1879,18 @@ export const shortCodeMap = {
1900
1879
  "0xca0": "Unsupported FieldBatchFormatVersion for incremental encoding; must be v2 or higher",
1901
1880
  "0xca1": "Unsupported FieldBatchFormatVersion for incremental encoding; must be v2 or higher",
1902
1881
  "0xca2": "localOpActivity must be undefined when entering rollback",
1903
- "0xca3": "localOpActivity must be undefined when entering applyStashedOp"
1882
+ "0xca3": "localOpActivity must be undefined when entering applyStashedOp",
1883
+ "0xca4": "Expected applied commit to be parented",
1884
+ "0xca5": "Cannot encode vSharedBranches summary without originator",
1885
+ "0xca6": "Unsupported write version requested.",
1886
+ "0xca7": "getUnhydratedContext should not be reentrant",
1887
+ "0xca8": "missing schema",
1888
+ "0xca9": "missing schema",
1889
+ "0xcaa": "Reachable schema missing from input TreeSchema",
1890
+ "0xcab": "missing kind",
1891
+ "0xcac": "Unexpected branch implementation",
1892
+ "0xcad": "Unexpected branch implementation",
1893
+ "0xcae": "The outer transaction should be ending",
1894
+ "0xcaf": "Unexpected commit in transaction"
1904
1895
  };
1905
1896
  //# sourceMappingURL=assertionShortCodesMap.js.map