@fluid-experimental/tree 2.0.0-dev.7.3.0.212138 → 2.0.0-dev.7.4.0.214930
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/api-extractor.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json",
|
|
4
4
|
"apiReport": {
|
|
5
5
|
"enabled": true,
|
|
6
6
|
// Note: `tree.api.md` is the file used for the upcoming tree DDS's API report.
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"extractorMessageReporting": {
|
|
13
13
|
"ae-missing-release-tag": {
|
|
14
14
|
"logLevel": "none"
|
|
15
|
+
},
|
|
16
|
+
"ae-undocumented": {
|
|
17
|
+
"logLevel": "none"
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestUtilities.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/TestUtilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,sBAAsB,EAAkC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"TestUtilities.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/TestUtilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,sBAAsB,EAAkC,MAAM,kCAAkC,CAAC;AAC1G,OAAO,EACN,2BAA2B,EAC3B,yBAAyB,EAEzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGN,kBAAkB,EAIlB,mBAAmB,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,uCAAuC,CAAC;AACrF,OAAO,KAAK,EAAqB,YAAY,EAAE,cAAc,EAAE,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,wBAAgB,aAAa,CAC5B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,GACxB,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAE9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,CAAC,cAAc,CAAC,CAEnF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,YAAY,GAAG,kBAAkB,EAC7E,uBAAuB,EAAE,2BAA2B,GAClD,EAAE,EAAE,CASN;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,aAAa,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAK/E;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EACjD,QAAQ,EAAE,mBAAmB,EAC7B,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,MAAM,OAAO,GACnB,OAAO,CAAC;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAAC,CAO/D"}
|
|
@@ -9,7 +9,6 @@ import { expect } from 'chai';
|
|
|
9
9
|
import { LocalServerTestDriver } from '@fluid-private/test-drivers';
|
|
10
10
|
import { SummaryCollection, DefaultSummaryConfiguration } from '@fluidframework/container-runtime';
|
|
11
11
|
import { Loader, waitContainerToCatchUp } from '@fluidframework/container-loader';
|
|
12
|
-
import { requestFluidObject } from '@fluidframework/runtime-utils';
|
|
13
12
|
import { MockContainerRuntimeFactory, MockFluidDataStoreRuntime, MockStorage, } from '@fluidframework/test-runtime-utils';
|
|
14
13
|
import { TestObjectProvider, TestContainerRuntimeFactory, TestFluidObjectFactory, createAndAttachContainer, } from '@fluidframework/test-utils';
|
|
15
14
|
import { createChildLogger } from '@fluidframework/telemetry-utils';
|
|
@@ -179,7 +178,7 @@ export async function setUpLocalServerTestSharedTree(options) {
|
|
|
179
178
|
const loader = makeTestLoader(provider);
|
|
180
179
|
container = await createAndAttachContainer(defaultCodeDetails, loader, driver.createCreateNewRequest(treeId));
|
|
181
180
|
}
|
|
182
|
-
const dataObject = await
|
|
181
|
+
const dataObject = (await container.getEntryPoint());
|
|
183
182
|
const uploadedBlobs = blobs === undefined ? [] : await Promise.all(blobs.map(async (blob) => dataObject.context.uploadBlob(blob)));
|
|
184
183
|
const tree = await dataObject.getSharedObject(treeId);
|
|
185
184
|
if (initialTree !== undefined && testObjectProvider === undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestUtilities.js","sourceRoot":"","sources":["../../../src/test/utilities/TestUtilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAA0B,MAAM,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EACN,2BAA2B,EAC3B,yBAAyB,EACzB,WAAW,GACX,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGN,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,GAExB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAoC,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAWtG,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAoB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,C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,EAAE,CAAC;IAC3E,MAAM,CAAC,iBAAiB,KAAK,SAAS,EAAE,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACzF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { resolve } from 'path';\nimport { assert } from '@fluidframework/core-utils';\nimport { v5 as uuidv5 } from 'uuid';\nimport { expect } from 'chai';\nimport { LocalServerTestDriver } from '@fluid-private/test-drivers';\nimport { SummaryCollection, DefaultSummaryConfiguration } from '@fluidframework/container-runtime';\nimport { IContainerExperimental, Loader, waitContainerToCatchUp } from '@fluidframework/container-loader';\nimport { requestFluidObject } from '@fluidframework/runtime-utils';\nimport {\n\tMockContainerRuntimeFactory,\n\tMockFluidDataStoreRuntime,\n\tMockStorage,\n} from '@fluidframework/test-runtime-utils';\nimport {\n\tChannelFactoryRegistry,\n\tITestFluidObject,\n\tTestObjectProvider,\n\tTestContainerRuntimeFactory,\n\tTestFluidObjectFactory,\n\tcreateAndAttachContainer,\n\tITestObjectProvider,\n} from '@fluidframework/test-utils';\nimport type { IContainer, IHostLoader } from '@fluidframework/container-definitions';\nimport type { IFluidCodeDetails, IFluidHandle, IRequestHeader } from '@fluidframework/core-interfaces';\nimport { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';\nimport { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';\nimport { ConfigTypes, IConfigProviderBase, createChildLogger } from '@fluidframework/telemetry-utils';\nimport { ITelemetryBaseLogger, IRequest } from '@fluidframework/core-interfaces';\nimport {\n\tAttributionId,\n\tDetachedSequenceId,\n\tEditId,\n\tNodeId,\n\tOpSpaceNodeId,\n\tSessionId,\n\tStableNodeId,\n} from '../../Identifiers';\nimport { fail, identity, ReplaceRecursive } from '../../Common';\nimport { IdCompressor } from '../../id-compressor';\nimport { createSessionId } from '../../id-compressor/NumericUuid';\nimport { getChangeNodeFromViewNode } from '../../SerializationUtilities';\nimport { initialTree } from '../../InitialTree';\nimport {\n\tChangeInternal,\n\tEdit,\n\tNodeData,\n\tPayload,\n\treservedIdCount,\n\tSharedTreeOp,\n\tSharedTreeOp_0_0_2,\n\tWriteFormat,\n} from '../../persisted-types';\nimport { TraitLocation, TreeView } from '../../TreeView';\nimport { SharedTreeDiagnosticEvent } from '../../EventTypes';\nimport { getNodeId, getNodeIdContext, NodeIdContext, NodeIdConverter, NodeIdNormalizer } from '../../NodeIdUtilities';\nimport { newEdit, setTrait } from '../../EditUtilities';\nimport { SharedTree, SharedTreeFactory, SharedTreeOptions_0_0_2 } from '../../SharedTree';\nimport { BuildNode, Change, StablePlace } from '../../ChangeTypes';\nimport { convertEditIds } from '../../IdConversion';\nimport { OrderedEditSet } from '../../EditLog';\nimport { buildLeaf, RefreshingTestTree, SimpleTestTree, TestTree } from './TestNode';\n\n/** Objects returned by setUpTestSharedTree */\nexport interface SharedTreeTestingComponents {\n\t/** The MockFluidDataStoreRuntime used to created the SharedTree. */\n\tcomponentRuntime: MockFluidDataStoreRuntime;\n\t/**\n\t * The MockContainerRuntimeFactory created if one was not provided in the options.\n\t * Only connected to the SharedTree if the localMode option was set to false.\n\t * */\n\tcontainerRuntimeFactory: MockContainerRuntimeFactory;\n\t/** The SharedTree created and set up. */\n\ttree: SharedTree;\n}\n\n/** Options used to customize setUpTestSharedTree */\nexport interface SharedTreeTestingOptions {\n\t/**\n\t * Id for the SharedTree to be created.\n\t * If two SharedTrees have the same id and the same containerRuntimeFactory,\n\t * they will collaborate (send edits to each other)\n\t */\n\tid?: string;\n\t/** Node to initialize the SharedTree with. */\n\tinitialTree?: BuildNode;\n\t/** If false, a MockContainerRuntimeFactory connected to the SharedTree will be returned. */\n\tlocalMode?: boolean;\n\t/**\n\t * MockContainerRuntimeFactory to connect the SharedTree to. A new one will not be created if one is provided.\n\t * If localMode is set to true, it will not be connected to the created SharedTree.\n\t * */\n\tcontainerRuntimeFactory?: MockContainerRuntimeFactory;\n\t/** Iff true, do not `fail` on invalid edits */\n\tallowInvalid?: boolean;\n\t/** Iff true, do not `fail` on malformed edits */\n\tallowMalformed?: boolean;\n\t/** Unless set to true, a SharedTree error causes the test to fail */\n\tnoFailOnError?: boolean;\n\t/**\n\t * If not set, full history will be preserved.\n\t */\n\tsummarizeHistory?: boolean;\n\t/**\n\t * If not set, summaries will be written in format 0.1.1.\n\t */\n\twriteFormat?: WriteFormat;\n\t/**\n\t * Optional attribution ID to give to the new tree\n\t */\n\tattributionId?: AttributionId;\n\t/**\n\t * If set, uses the given id as the edit id for tree setup. Only has an effect if initialTree is also set.\n\t */\n\tsetupEditId?: EditId;\n\n\t/**\n\t * Telemetry logger injected into the SharedTree.\n\t */\n\tlogger?: ITelemetryBaseLogger;\n}\n\nexport const testTraitLabel = SimpleTestTree.traitLabel;\nexport function testTrait(view: TreeView): TraitLocation {\n\treturn {\n\t\tlabel: testTraitLabel,\n\t\tparent: view.root,\n\t};\n}\n\n/** Sets up and returns an object of components useful for testing SharedTree. */\nexport function setUpTestSharedTree(\n\toptions: SharedTreeTestingOptions = { localMode: true }\n): SharedTreeTestingComponents {\n\tconst {\n\t\tid,\n\t\tinitialTree,\n\t\tlocalMode,\n\t\tcontainerRuntimeFactory,\n\t\tsetupEditId,\n\t\tsummarizeHistory,\n\t\twriteFormat,\n\t\tattributionId,\n\t} = options;\n\tlet componentRuntime: MockFluidDataStoreRuntime;\n\tif (options.logger) {\n\t\tconst proxyHandler: ProxyHandler<MockFluidDataStoreRuntime> = {\n\t\t\tget: (target, prop, receiver) => {\n\t\t\t\tif (prop === 'logger' && options.logger) {\n\t\t\t\t\treturn options.logger;\n\t\t\t\t}\n\t\t\t\treturn target[prop as keyof MockFluidDataStoreRuntime];\n\t\t\t},\n\t\t};\n\t\tcomponentRuntime = new Proxy(new MockFluidDataStoreRuntime(), proxyHandler);\n\t} else {\n\t\tcomponentRuntime = new MockFluidDataStoreRuntime();\n\t}\n\n\t// Enable expensiveValidation\n\tlet factory: SharedTreeFactory;\n\tif (writeFormat === WriteFormat.v0_0_2) {\n\t\tconst options: SharedTreeOptions_0_0_2 = { summarizeHistory: summarizeHistory ?? true };\n\t\tfactory = SharedTree.getFactory(writeFormat, options);\n\t} else {\n\t\tconst options = {\n\t\t\tsummarizeHistory: summarizeHistory ?? true ? { uploadEditChunks: true } : false,\n\t\t\tattributionId,\n\t\t};\n\t\tfactory = SharedTree.getFactory(writeFormat ?? WriteFormat.v0_1_1, options);\n\t}\n\tconst tree = factory.create(componentRuntime, id ?? 'testSharedTree');\n\n\tif (options.allowInvalid === undefined || !options.allowInvalid) {\n\t\ttree.on(SharedTreeDiagnosticEvent.DroppedInvalidEdit, () => fail('unexpected invalid edit'));\n\t}\n\n\tif (options.allowMalformed === undefined || !options.allowMalformed) {\n\t\ttree.on(SharedTreeDiagnosticEvent.DroppedMalformedEdit, () => fail('unexpected malformed edit'));\n\t}\n\n\tif (options.noFailOnError === undefined || !options.noFailOnError) {\n\t\t// any errors thrown by a SharedObject event listener will be caught and\n\t\t// reemitted on this event. For testing purposes, rethrow so that it\n\t\t// actually causes the test to fail.\n\t\ttree.on('error', (error) => {\n\t\t\tthrow error;\n\t\t});\n\t}\n\n\tconst newContainerRuntimeFactory = containerRuntimeFactory ?? new MockContainerRuntimeFactory();\n\n\tif (localMode === true) {\n\t\tcomponentRuntime.local = true;\n\t} else {\n\t\tconst containerRuntime = newContainerRuntimeFactory.createContainerRuntime(componentRuntime);\n\t\tconst services = {\n\t\t\tdeltaConnection: componentRuntime.createDeltaConnection(),\n\t\t\tobjectStorage: new MockStorage(undefined),\n\t\t};\n\t\ttree.connect(services);\n\t}\n\n\tif (initialTree !== undefined) {\n\t\tsetTestTree(tree, initialTree, setupEditId);\n\t}\n\n\treturn {\n\t\tcomponentRuntime,\n\t\tcontainerRuntimeFactory: newContainerRuntimeFactory,\n\t\ttree,\n\t};\n}\n\nconst TestDataStoreType = '@fluid-example/test-dataStore';\n\n/** Objects returned by setUpLocalServerTestSharedTree */\nexport interface LocalServerSharedTreeTestingComponents {\n\t/** The testObjectProvider created if one was not set in the options. */\n\ttestObjectProvider: TestObjectProvider;\n\t/** The SharedTree created and set up. */\n\ttree: SharedTree;\n\t/** The container created and set up. */\n\tcontainer: IContainer;\n\t/** Handles to any blobs uploaded via `blobs` */\n\tuploadedBlobs: IFluidHandle<ArrayBufferLike>[];\n}\n\n/** Options used to customize setUpLocalServerTestSharedTree */\nexport interface LocalServerSharedTreeTestingOptions {\n\t/** Contents of blobs that should be uploaded to the runtime upon creation. Handles to these blobs will be returned. */\n\tblobs?: ArrayBufferLike[];\n\t/** Headers to include on the container load request. */\n\theaders?: IRequestHeader;\n\t/**\n\t * Id for the SharedTree to be created.\n\t * If two SharedTrees have the same id and the same testObjectProvider,\n\t * they will collaborate (send edits to each other)\n\t */\n\tid?: string;\n\t/** Node to initialize the SharedTree with. */\n\tinitialTree?: BuildNode;\n\t/** If set, uses the provider to create the container and create the SharedTree. */\n\ttestObjectProvider?: TestObjectProvider;\n\t/**\n\t * If not set, full history will be preserved.\n\t */\n\tsummarizeHistory?: boolean;\n\t/**\n\t * If not set, summaries will be written in format 0.0.2.\n\t */\n\twriteFormat?: WriteFormat;\n\t/**\n\t * Optional attribution ID to give to the new tree\n\t */\n\tattributionId?: AttributionId;\n\t/**\n\t * If not set, will upload edit chunks when they are full.\n\t */\n\tuploadEditChunks?: boolean;\n\t/**\n\t * If set, uses the given id as the edit id for tree setup. Only has an effect if initialTree is also set.\n\t */\n\tsetupEditId?: EditId;\n\t/**\n\t * If set, will be passed to the container on load\n\t */\n\tpendingLocalState?: string;\n\t/**\n\t * If set, will be added to the configProvider object passed to the loader\n\t * and will take effect for the duration of its lifetime\n\t */\n\tfeatureGates?: Record<string, ConfigTypes>;\n}\n\nconst testObjectProviders: TestObjectProvider[] = [];\nafterEach(() => {\n\tfor (const provider of testObjectProviders) {\n\t\tprovider.reset();\n\t}\n\ttestObjectProviders.length = 0;\n});\n\n/**\n * Sets up and returns an object of components useful for testing SharedTree with a local server.\n * Required for tests that involve the uploadBlob API.\n *\n * Any TestObjectProvider created by this function will be reset after the test completes (via afterEach) hook.\n */\nexport async function setUpLocalServerTestSharedTree(\n\toptions: LocalServerSharedTreeTestingOptions\n): Promise<LocalServerSharedTreeTestingComponents> {\n\tconst {\n\t\tblobs,\n\t\theaders,\n\t\tid,\n\t\tinitialTree,\n\t\ttestObjectProvider,\n\t\tsetupEditId,\n\t\tsummarizeHistory,\n\t\twriteFormat,\n\t\tuploadEditChunks,\n\t\tattributionId,\n\t\tpendingLocalState,\n\t} = options;\n\n\tconst featureGates = options.featureGates ?? {};\n\tfeatureGates['Fluid.Container.enableOfflineLoad'] = true;\n\tfeatureGates['Fluid.ContainerRuntime.DisablePartialFlush'] = true;\n\n\tconst treeId = id ?? 'test';\n\tlet factory: SharedTreeFactory;\n\tif (writeFormat === WriteFormat.v0_0_2) {\n\t\tconst options: SharedTreeOptions_0_0_2 = { summarizeHistory: summarizeHistory ?? true };\n\t\tfactory = SharedTree.getFactory(writeFormat, options);\n\t} else {\n\t\tconst options = {\n\t\t\tsummarizeHistory: summarizeHistory ?? true ? { uploadEditChunks: uploadEditChunks ?? true } : false,\n\t\t\tattributionId,\n\t\t};\n\t\tfactory = SharedTree.getFactory(writeFormat ?? WriteFormat.v0_1_1, options);\n\t}\n\tconst registry: ChannelFactoryRegistry = [[treeId, factory]];\n\tconst innerRequestHandler = async (request: IRequest, runtime: IContainerRuntimeBase) =>\n\t\truntime.IFluidHandleContext.resolveHandle(request);\n\n\tconst runtimeFactory = () =>\n\t\tnew TestContainerRuntimeFactory(\n\t\t\tTestDataStoreType,\n\t\t\tnew TestFluidObjectFactory(registry),\n\t\t\t{\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tminIdleTime: 1000, // Manually set idle times so some SharedTree tests don't timeout.\n\t\t\t\t\t\t\tmaxIdleTime: 1000,\n\t\t\t\t\t\t\tmaxTime: 1000 * 12,\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t[innerRequestHandler]\n\t\t);\n\n\tconst defaultCodeDetails: IFluidCodeDetails = {\n\t\tpackage: 'defaultTestPackage',\n\t\tconfig: {},\n\t};\n\n\tfunction makeTestLoader(provider: TestObjectProvider): IHostLoader {\n\t\tconst fluidEntryPoint = runtimeFactory();\n\t\tconst configProvider = (settings: Record<string, ConfigTypes>): IConfigProviderBase => ({\n\t\t\tgetRawConfig: (name: string): ConfigTypes => settings[name],\n\t\t});\n\n\t\treturn provider.createLoader([[defaultCodeDetails, fluidEntryPoint]], {\n\t\t\toptions: { maxClientLeaveWaitTime: 1000 },\n\t\t\tconfigProvider: configProvider(featureGates),\n\t\t});\n\t}\n\n\tlet provider: TestObjectProvider;\n\tlet container: IContainer;\n\n\tif (testObjectProvider !== undefined) {\n\t\tprovider = testObjectProvider;\n\t\tconst driver = new LocalServerTestDriver();\n\t\tconst loader = makeTestLoader(provider);\n\t\t// Once ILoaderOptions is specificable, this should use `provider.loadTestContainer` instead.\n\t\tcontainer = await loader.resolve({ url: await driver.createContainerUrl(treeId), headers }, pendingLocalState);\n\t\tawait waitContainerToCatchUp(container);\n\t} else {\n\t\tconst driver = new LocalServerTestDriver();\n\t\tprovider = new TestObjectProvider(Loader, driver, runtimeFactory);\n\t\ttestObjectProviders.push(provider);\n\t\t// Once ILoaderOptions is specificable, this should use `provider.makeTestContainer` instead.\n\t\tconst loader = makeTestLoader(provider);\n\t\tcontainer = await createAndAttachContainer(defaultCodeDetails, loader, driver.createCreateNewRequest(treeId));\n\t}\n\n\tconst dataObject = await requestFluidObject<ITestFluidObject>(container, '/');\n\n\tconst uploadedBlobs =\n\t\tblobs === undefined ? [] : await Promise.all(blobs.map(async (blob) => dataObject.context.uploadBlob(blob)));\n\tconst tree = await dataObject.getSharedObject<SharedTree>(treeId);\n\n\tif (initialTree !== undefined && testObjectProvider === undefined) {\n\t\tsetTestTree(tree, initialTree, setupEditId);\n\t}\n\n\treturn { container, tree, testObjectProvider: provider, uploadedBlobs };\n}\n\n/** Sets testTrait to contain `node`. */\nfunction setTestTree(tree: SharedTree, node: BuildNode, overrideId?: EditId): EditId {\n\tconst trait = testTrait(tree.currentView);\n\tif (overrideId === undefined) {\n\t\treturn tree.applyEdit(...setTrait(trait, node)).id;\n\t} else {\n\t\tconst changes = setTrait(trait, node).map((c) => tree.internalizeChange(c));\n\t\treturn tree.applyEditInternal({ changes, id: overrideId }).id;\n\t}\n}\n\n/**\n * Creates a list of edits with stable IDs that can be processed by a SharedTree.\n * @returns the list of created edits\n */\nexport function createStableEdits(\n\tnumberOfEdits: number,\n\tidContext: NodeIdContext = makeNodeIdContext(),\n\tpayload: (i: number) => Payload = identity\n): Edit<ChangeInternal>[] {\n\tif (numberOfEdits === 0) {\n\t\treturn [];\n\t}\n\n\tconst uuidNamespace = '44864298-500e-4cf8-9f44-a249e5b3a286';\n\tconst nodeId = idContext.generateNodeId('ae6b24eb-6fa8-42cc-abd2-48f250b7798f');\n\tconst node = buildLeaf(nodeId);\n\tconst insertEmptyNode = newEdit([\n\t\tChangeInternal.build([node], 0 as DetachedSequenceId),\n\t\tChangeInternal.insert(\n\t\t\t0 as DetachedSequenceId,\n\t\t\tStablePlace.atEndOf({ label: testTraitLabel, parent: idContext.convertToNodeId(initialTree.identifier) })\n\t\t),\n\t]);\n\n\tconst edits: Edit<ChangeInternal>[] = [{ ...insertEmptyNode, id: uuidv5('test', uuidNamespace) as EditId }];\n\n\t// Every subsequent edit is a set payload\n\tfor (let i = 1; i < numberOfEdits; i++) {\n\t\tconst edit = newEdit([ChangeInternal.setPayload(nodeId, payload(i))]);\n\t\tedits.push({ ...edit, id: uuidv5(i.toString(), uuidNamespace) as EditId });\n\t}\n\n\treturn edits;\n}\n\n/** Asserts that changes to SharedTree in editor() function do not cause any observable state change */\nexport function assertNoDelta(tree: SharedTree, editor: () => void) {\n\tconst viewA = tree.currentView;\n\teditor();\n\tconst viewB = tree.currentView;\n\tconst delta = viewA.delta(viewB);\n\texpect(delta).deep.equals({\n\t\tchanged: [],\n\t\tadded: [],\n\t\tremoved: [],\n\t});\n}\n\n/**\n * Used to test error throwing in async functions.\n */\nexport async function asyncFunctionThrowsCorrectly(\n\tasyncFunction: () => Promise<unknown>,\n\texpectedError: string\n): Promise<boolean> {\n\tlet errorMessage: string | undefined;\n\n\ttry {\n\t\tawait asyncFunction();\n\t} catch (error) {\n\t\terrorMessage = (error as Error).message;\n\t}\n\n\treturn errorMessage === expectedError;\n}\n\n/**\n * Returns true if two nodes have equivalent data, otherwise false.\n * Does not compare children or payloads.\n * @param nodes - two or more nodes to compare\n */\nexport function areNodesEquivalent(...nodes: NodeData<unknown>[]): boolean {\n\tif (nodes.length < 2) {\n\t\tfail('Too few nodes to compare');\n\t}\n\n\tfor (let i = 1; i < nodes.length; i++) {\n\t\tif (nodes[i].definition !== nodes[0].definition) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (nodes[i].identifier !== nodes[0].identifier) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n// This accounts for this file being executed after compilation. If many tests want to leverage resources, we should unify\n// resource path logic to a single place.\nexport const testDocumentsPathBase = resolve(__dirname, '../../../src/test/documents/');\n\nexport const versionComparator = (versionA: string, versionB: string): number => {\n\tconst versionASplit = versionA.split('.');\n\tconst versionBSplit = versionB.split('.');\n\n\tassert(\n\t\tversionASplit.length === versionBSplit.length && versionASplit.length === 3,\n\t\t0x668 /* Version numbers should follow semantic versioning. */\n\t);\n\n\tfor (let i = 0; i < 3; ++i) {\n\t\tconst numberA = parseInt(versionASplit[i], 10);\n\t\tconst numberB = parseInt(versionBSplit[i], 10);\n\n\t\tif (numberA > numberB) {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (numberA < numberB) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\n\treturn 0;\n};\n\n/**\n * Create a {@link SimpleTestTree} from the given {@link SharedTree} or {@link IdCompressor}\n */\nexport function setUpTestTree(idSource?: IdCompressor | SharedTree, expensiveValidation = false): TestTree {\n\tconst source = idSource ?? new IdCompressor(createSessionId(), reservedIdCount);\n\tif (source instanceof SharedTree) {\n\t\tassert(source.edits.length === 0, 0x669 /* tree must be a new SharedTree */);\n\t\tconst getNormalizer = () => getIdNormalizerFromSharedTree(source);\n\t\tconst contextWrapper = {\n\t\t\tnormalizeToOpSpace: (id: NodeId) => getNormalizer().normalizeToOpSpace(id),\n\t\t\tnormalizeToSessionSpace: (id: OpSpaceNodeId, sessionId: SessionId) =>\n\t\t\t\tgetNormalizer().normalizeToSessionSpace(id, sessionId),\n\t\t\tget localSessionId() {\n\t\t\t\treturn getNormalizer().localSessionId;\n\t\t\t},\n\t\t};\n\t\tconst simpleTestTree = new SimpleTestTree(source, contextWrapper, expensiveValidation);\n\t\tsetTestTree(source, simpleTestTree);\n\t\treturn simpleTestTree;\n\t}\n\n\tconst context = makeNodeIdContext(source);\n\treturn new SimpleTestTree(context, context, expensiveValidation);\n}\n\n/**\n * Gets an id normalizer from the provided shared-tree. This is\n */\nexport function getIdNormalizerFromSharedTree(sharedTree: SharedTree): NodeIdNormalizer<OpSpaceNodeId> {\n\treturn (\n\t\t((sharedTree as any).idNormalizer as NodeIdNormalizer<OpSpaceNodeId>) ??\n\t\tfail('Failed to find SharedTree normalizer')\n\t);\n}\n\n/**\n * Create a {@link SimpleTestTree} before each test\n */\nexport function refreshTestTree(\n\tidSourceFactory?: (() => IdCompressor) | (() => SharedTree),\n\tfn?: (testTree: TestTree) => void,\n\texpensiveValidation = false\n): TestTree {\n\tconst factory = idSourceFactory ?? (() => new IdCompressor(createSessionId(), reservedIdCount));\n\treturn new RefreshingTestTree(() => {\n\t\treturn setUpTestTree(factory(), expensiveValidation);\n\t}, fn);\n}\n\nexport function makeNodeIdContext(idCompressor?: IdCompressor): NodeIdContext & NodeIdNormalizer<OpSpaceNodeId> {\n\tconst compressor = idCompressor ?? new IdCompressor(createSessionId(), reservedIdCount);\n\treturn getNodeIdContext(compressor);\n}\n\n/**\n * Applies an arbitrary edit to the given SharedTree which leaves the tree in the same state that it was before the edit.\n * This is useful for test scenarios that want to apply edits but don't care what they do.\n */\nexport function applyNoop(tree: SharedTree): Edit<unknown> {\n\treturn tree.applyEdit(...noopEdit(tree.currentView));\n}\n\n/**\n * Creates an arbitrary edit which leaves a tree in the same state that it was before the edit.\n * This is useful for test scenarios that want to create edits but don't care what they do.\n */\nexport function noopEdit(view: TreeView): Change[] {\n\tconst traitLocation = testTrait(view);\n\tconst trait = view.getTrait(traitLocation);\n\t// Set the test trait to the same thing that it already was\n\treturn setTrait(\n\t\ttraitLocation,\n\t\ttrait.map((id) => getChangeNodeFromViewNode(view, id))\n\t);\n}\n\n/** Translate an ID in one context to an ID in another */\nexport function translateId(id: NodeId | NodeData<NodeId>, from: NodeIdConverter, to: NodeIdConverter): NodeId {\n\treturn to.convertToNodeId(from.convertToStableNodeId(getNodeId(id)));\n}\n\nexport function normalizeId(tree: SharedTree, id: NodeId): OpSpaceNodeId {\n\tconst normalizer = getIdNormalizerFromSharedTree(tree);\n\treturn normalizer.normalizeToOpSpace(id);\n}\n\nexport function normalizeIds(tree: SharedTree, ...ids: NodeId[]): OpSpaceNodeId[] {\n\tconst normalizer = getIdNormalizerFromSharedTree(tree);\n\treturn ids.map((id) => normalizer.normalizeToOpSpace(id));\n}\n\nexport function idsAreEqual(treeA: SharedTree, idsA: NodeId[], treeB: SharedTree, idsB: NodeId[]): boolean {\n\tif (idsA.length !== idsB.length) {\n\t\treturn false;\n\t}\n\tconst contextA = getIdNormalizerFromSharedTree(treeA);\n\tconst contextB = getIdNormalizerFromSharedTree(treeB);\n\tfor (let i = 0; i < idsA.length; i++) {\n\t\tif (contextA.normalizeToOpSpace(idsA[i]) !== contextB.normalizeToOpSpace(idsB[i])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nexport function normalizeEdit(\n\ttree: SharedTree,\n\tedit: Edit<ChangeInternal>\n): Edit<ReplaceRecursive<ChangeInternal, NodeId, OpSpaceNodeId>> {\n\tconst context = getIdNormalizerFromSharedTree(tree);\n\treturn convertEditIds(edit, (id) => context.normalizeToOpSpace(id));\n}\n\nexport function stabilizeEdit(\n\ttree: SharedTree,\n\tedit: Edit<ChangeInternal>\n): Edit<ReplaceRecursive<ChangeInternal, NodeId, StableNodeId>> {\n\treturn convertEditIds(edit, (id) => tree.convertToStableNodeId(id));\n}\n\nexport function getEditLogInternal(tree: SharedTree): OrderedEditSet<ChangeInternal> {\n\treturn tree.edits as unknown as OrderedEditSet<ChangeInternal>;\n}\n\n/**\n * Spies on all future ops submitted to `containerRuntimeFactory`. When ops are submitted, they will be `push`ed into the\n * returned array.\n */\nexport function spyOnSubmittedOps<Op extends SharedTreeOp | SharedTreeOp_0_0_2>(\n\tcontainerRuntimeFactory: MockContainerRuntimeFactory\n): Op[] {\n\tconst ops: Op[] = [];\n\tconst originalPush = containerRuntimeFactory.pushMessage.bind(containerRuntimeFactory);\n\tcontainerRuntimeFactory.pushMessage = (message: Partial<ISequencedDocumentMessage>) => {\n\t\tconst { contents } = message;\n\t\tops.push(contents as Op);\n\t\toriginalPush(message);\n\t};\n\treturn ops;\n}\n\n/**\n * Waits for summarization to occur, and returns a version that can be passed into newly loaded containers\n * to ensure they load this summary version. Use the `LoaderHeader.version` header.\n */\nexport async function waitForSummary(mainContainer: IContainer): Promise<string> {\n\tconst { deltaManager } = mainContainer;\n\tconst summaryCollection = new SummaryCollection(deltaManager, createChildLogger());\n\tconst ackedSummary = await summaryCollection.waitSummaryAck(deltaManager.lastSequenceNumber);\n\treturn ackedSummary.summaryAck.contents.handle;\n}\n\n/**\n * Runs an action while the given container has been paused\n */\nexport async function withContainerOffline<TReturn>(\n\tprovider: ITestObjectProvider,\n\tcontainer: IContainerExperimental,\n\taction: () => TReturn\n): Promise<{ actionReturn: TReturn; pendingLocalState: string }> {\n\tawait provider.ensureSynchronized();\n\tawait provider.opProcessingController.pauseProcessing(container);\n\tconst actionReturn = action();\n\tconst pendingLocalState = await container.closeAndGetPendingLocalState?.();\n\tassert(pendingLocalState !== undefined, 0x726 /* pendingLocalState should be defined */);\n\treturn { actionReturn, pendingLocalState };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TestUtilities.js","sourceRoot":"","sources":["../../../src/test/utilities/TestUtilities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAA0B,MAAM,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1G,OAAO,EACN,2BAA2B,EAC3B,yBAAyB,EACzB,WAAW,GACX,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGN,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,GAExB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAoC,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAWtG,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAoB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,WAAW,EA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AAC;AAC5C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { resolve } from 'path';\nimport { assert } from '@fluidframework/core-utils';\nimport { v5 as uuidv5 } from 'uuid';\nimport { expect } from 'chai';\nimport { LocalServerTestDriver } from '@fluid-private/test-drivers';\nimport { SummaryCollection, DefaultSummaryConfiguration } from '@fluidframework/container-runtime';\nimport { IContainerExperimental, Loader, waitContainerToCatchUp } from '@fluidframework/container-loader';\nimport {\n\tMockContainerRuntimeFactory,\n\tMockFluidDataStoreRuntime,\n\tMockStorage,\n} from '@fluidframework/test-runtime-utils';\nimport {\n\tChannelFactoryRegistry,\n\tITestFluidObject,\n\tTestObjectProvider,\n\tTestContainerRuntimeFactory,\n\tTestFluidObjectFactory,\n\tcreateAndAttachContainer,\n\tITestObjectProvider,\n} from '@fluidframework/test-utils';\nimport type { IContainer, IHostLoader } from '@fluidframework/container-definitions';\nimport type { IFluidCodeDetails, IFluidHandle, IRequestHeader } from '@fluidframework/core-interfaces';\nimport { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';\nimport { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';\nimport { ConfigTypes, IConfigProviderBase, createChildLogger } from '@fluidframework/telemetry-utils';\nimport { ITelemetryBaseLogger, IRequest } from '@fluidframework/core-interfaces';\nimport {\n\tAttributionId,\n\tDetachedSequenceId,\n\tEditId,\n\tNodeId,\n\tOpSpaceNodeId,\n\tSessionId,\n\tStableNodeId,\n} from '../../Identifiers';\nimport { fail, identity, ReplaceRecursive } from '../../Common';\nimport { IdCompressor } from '../../id-compressor';\nimport { createSessionId } from '../../id-compressor/NumericUuid';\nimport { getChangeNodeFromViewNode } from '../../SerializationUtilities';\nimport { initialTree } from '../../InitialTree';\nimport {\n\tChangeInternal,\n\tEdit,\n\tNodeData,\n\tPayload,\n\treservedIdCount,\n\tSharedTreeOp,\n\tSharedTreeOp_0_0_2,\n\tWriteFormat,\n} from '../../persisted-types';\nimport { TraitLocation, TreeView } from '../../TreeView';\nimport { SharedTreeDiagnosticEvent } from '../../EventTypes';\nimport { getNodeId, getNodeIdContext, NodeIdContext, NodeIdConverter, NodeIdNormalizer } from '../../NodeIdUtilities';\nimport { newEdit, setTrait } from '../../EditUtilities';\nimport { SharedTree, SharedTreeFactory, SharedTreeOptions_0_0_2 } from '../../SharedTree';\nimport { BuildNode, Change, StablePlace } from '../../ChangeTypes';\nimport { convertEditIds } from '../../IdConversion';\nimport { OrderedEditSet } from '../../EditLog';\nimport { buildLeaf, RefreshingTestTree, SimpleTestTree, TestTree } from './TestNode';\n\n/** Objects returned by setUpTestSharedTree */\nexport interface SharedTreeTestingComponents {\n\t/** The MockFluidDataStoreRuntime used to created the SharedTree. */\n\tcomponentRuntime: MockFluidDataStoreRuntime;\n\t/**\n\t * The MockContainerRuntimeFactory created if one was not provided in the options.\n\t * Only connected to the SharedTree if the localMode option was set to false.\n\t * */\n\tcontainerRuntimeFactory: MockContainerRuntimeFactory;\n\t/** The SharedTree created and set up. */\n\ttree: SharedTree;\n}\n\n/** Options used to customize setUpTestSharedTree */\nexport interface SharedTreeTestingOptions {\n\t/**\n\t * Id for the SharedTree to be created.\n\t * If two SharedTrees have the same id and the same containerRuntimeFactory,\n\t * they will collaborate (send edits to each other)\n\t */\n\tid?: string;\n\t/** Node to initialize the SharedTree with. */\n\tinitialTree?: BuildNode;\n\t/** If false, a MockContainerRuntimeFactory connected to the SharedTree will be returned. */\n\tlocalMode?: boolean;\n\t/**\n\t * MockContainerRuntimeFactory to connect the SharedTree to. A new one will not be created if one is provided.\n\t * If localMode is set to true, it will not be connected to the created SharedTree.\n\t * */\n\tcontainerRuntimeFactory?: MockContainerRuntimeFactory;\n\t/** Iff true, do not `fail` on invalid edits */\n\tallowInvalid?: boolean;\n\t/** Iff true, do not `fail` on malformed edits */\n\tallowMalformed?: boolean;\n\t/** Unless set to true, a SharedTree error causes the test to fail */\n\tnoFailOnError?: boolean;\n\t/**\n\t * If not set, full history will be preserved.\n\t */\n\tsummarizeHistory?: boolean;\n\t/**\n\t * If not set, summaries will be written in format 0.1.1.\n\t */\n\twriteFormat?: WriteFormat;\n\t/**\n\t * Optional attribution ID to give to the new tree\n\t */\n\tattributionId?: AttributionId;\n\t/**\n\t * If set, uses the given id as the edit id for tree setup. Only has an effect if initialTree is also set.\n\t */\n\tsetupEditId?: EditId;\n\n\t/**\n\t * Telemetry logger injected into the SharedTree.\n\t */\n\tlogger?: ITelemetryBaseLogger;\n}\n\nexport const testTraitLabel = SimpleTestTree.traitLabel;\nexport function testTrait(view: TreeView): TraitLocation {\n\treturn {\n\t\tlabel: testTraitLabel,\n\t\tparent: view.root,\n\t};\n}\n\n/** Sets up and returns an object of components useful for testing SharedTree. */\nexport function setUpTestSharedTree(\n\toptions: SharedTreeTestingOptions = { localMode: true }\n): SharedTreeTestingComponents {\n\tconst {\n\t\tid,\n\t\tinitialTree,\n\t\tlocalMode,\n\t\tcontainerRuntimeFactory,\n\t\tsetupEditId,\n\t\tsummarizeHistory,\n\t\twriteFormat,\n\t\tattributionId,\n\t} = options;\n\tlet componentRuntime: MockFluidDataStoreRuntime;\n\tif (options.logger) {\n\t\tconst proxyHandler: ProxyHandler<MockFluidDataStoreRuntime> = {\n\t\t\tget: (target, prop, receiver) => {\n\t\t\t\tif (prop === 'logger' && options.logger) {\n\t\t\t\t\treturn options.logger;\n\t\t\t\t}\n\t\t\t\treturn target[prop as keyof MockFluidDataStoreRuntime];\n\t\t\t},\n\t\t};\n\t\tcomponentRuntime = new Proxy(new MockFluidDataStoreRuntime(), proxyHandler);\n\t} else {\n\t\tcomponentRuntime = new MockFluidDataStoreRuntime();\n\t}\n\n\t// Enable expensiveValidation\n\tlet factory: SharedTreeFactory;\n\tif (writeFormat === WriteFormat.v0_0_2) {\n\t\tconst options: SharedTreeOptions_0_0_2 = { summarizeHistory: summarizeHistory ?? true };\n\t\tfactory = SharedTree.getFactory(writeFormat, options);\n\t} else {\n\t\tconst options = {\n\t\t\tsummarizeHistory: summarizeHistory ?? true ? { uploadEditChunks: true } : false,\n\t\t\tattributionId,\n\t\t};\n\t\tfactory = SharedTree.getFactory(writeFormat ?? WriteFormat.v0_1_1, options);\n\t}\n\tconst tree = factory.create(componentRuntime, id ?? 'testSharedTree');\n\n\tif (options.allowInvalid === undefined || !options.allowInvalid) {\n\t\ttree.on(SharedTreeDiagnosticEvent.DroppedInvalidEdit, () => fail('unexpected invalid edit'));\n\t}\n\n\tif (options.allowMalformed === undefined || !options.allowMalformed) {\n\t\ttree.on(SharedTreeDiagnosticEvent.DroppedMalformedEdit, () => fail('unexpected malformed edit'));\n\t}\n\n\tif (options.noFailOnError === undefined || !options.noFailOnError) {\n\t\t// any errors thrown by a SharedObject event listener will be caught and\n\t\t// reemitted on this event. For testing purposes, rethrow so that it\n\t\t// actually causes the test to fail.\n\t\ttree.on('error', (error) => {\n\t\t\tthrow error;\n\t\t});\n\t}\n\n\tconst newContainerRuntimeFactory = containerRuntimeFactory ?? new MockContainerRuntimeFactory();\n\n\tif (localMode === true) {\n\t\tcomponentRuntime.local = true;\n\t} else {\n\t\tconst containerRuntime = newContainerRuntimeFactory.createContainerRuntime(componentRuntime);\n\t\tconst services = {\n\t\t\tdeltaConnection: componentRuntime.createDeltaConnection(),\n\t\t\tobjectStorage: new MockStorage(undefined),\n\t\t};\n\t\ttree.connect(services);\n\t}\n\n\tif (initialTree !== undefined) {\n\t\tsetTestTree(tree, initialTree, setupEditId);\n\t}\n\n\treturn {\n\t\tcomponentRuntime,\n\t\tcontainerRuntimeFactory: newContainerRuntimeFactory,\n\t\ttree,\n\t};\n}\n\nconst TestDataStoreType = '@fluid-example/test-dataStore';\n\n/** Objects returned by setUpLocalServerTestSharedTree */\nexport interface LocalServerSharedTreeTestingComponents {\n\t/** The testObjectProvider created if one was not set in the options. */\n\ttestObjectProvider: TestObjectProvider;\n\t/** The SharedTree created and set up. */\n\ttree: SharedTree;\n\t/** The container created and set up. */\n\tcontainer: IContainer;\n\t/** Handles to any blobs uploaded via `blobs` */\n\tuploadedBlobs: IFluidHandle<ArrayBufferLike>[];\n}\n\n/** Options used to customize setUpLocalServerTestSharedTree */\nexport interface LocalServerSharedTreeTestingOptions {\n\t/** Contents of blobs that should be uploaded to the runtime upon creation. Handles to these blobs will be returned. */\n\tblobs?: ArrayBufferLike[];\n\t/** Headers to include on the container load request. */\n\theaders?: IRequestHeader;\n\t/**\n\t * Id for the SharedTree to be created.\n\t * If two SharedTrees have the same id and the same testObjectProvider,\n\t * they will collaborate (send edits to each other)\n\t */\n\tid?: string;\n\t/** Node to initialize the SharedTree with. */\n\tinitialTree?: BuildNode;\n\t/** If set, uses the provider to create the container and create the SharedTree. */\n\ttestObjectProvider?: TestObjectProvider;\n\t/**\n\t * If not set, full history will be preserved.\n\t */\n\tsummarizeHistory?: boolean;\n\t/**\n\t * If not set, summaries will be written in format 0.0.2.\n\t */\n\twriteFormat?: WriteFormat;\n\t/**\n\t * Optional attribution ID to give to the new tree\n\t */\n\tattributionId?: AttributionId;\n\t/**\n\t * If not set, will upload edit chunks when they are full.\n\t */\n\tuploadEditChunks?: boolean;\n\t/**\n\t * If set, uses the given id as the edit id for tree setup. Only has an effect if initialTree is also set.\n\t */\n\tsetupEditId?: EditId;\n\t/**\n\t * If set, will be passed to the container on load\n\t */\n\tpendingLocalState?: string;\n\t/**\n\t * If set, will be added to the configProvider object passed to the loader\n\t * and will take effect for the duration of its lifetime\n\t */\n\tfeatureGates?: Record<string, ConfigTypes>;\n}\n\nconst testObjectProviders: TestObjectProvider[] = [];\nafterEach(() => {\n\tfor (const provider of testObjectProviders) {\n\t\tprovider.reset();\n\t}\n\ttestObjectProviders.length = 0;\n});\n\n/**\n * Sets up and returns an object of components useful for testing SharedTree with a local server.\n * Required for tests that involve the uploadBlob API.\n *\n * Any TestObjectProvider created by this function will be reset after the test completes (via afterEach) hook.\n */\nexport async function setUpLocalServerTestSharedTree(\n\toptions: LocalServerSharedTreeTestingOptions\n): Promise<LocalServerSharedTreeTestingComponents> {\n\tconst {\n\t\tblobs,\n\t\theaders,\n\t\tid,\n\t\tinitialTree,\n\t\ttestObjectProvider,\n\t\tsetupEditId,\n\t\tsummarizeHistory,\n\t\twriteFormat,\n\t\tuploadEditChunks,\n\t\tattributionId,\n\t\tpendingLocalState,\n\t} = options;\n\n\tconst featureGates = options.featureGates ?? {};\n\tfeatureGates['Fluid.Container.enableOfflineLoad'] = true;\n\tfeatureGates['Fluid.ContainerRuntime.DisablePartialFlush'] = true;\n\n\tconst treeId = id ?? 'test';\n\tlet factory: SharedTreeFactory;\n\tif (writeFormat === WriteFormat.v0_0_2) {\n\t\tconst options: SharedTreeOptions_0_0_2 = { summarizeHistory: summarizeHistory ?? true };\n\t\tfactory = SharedTree.getFactory(writeFormat, options);\n\t} else {\n\t\tconst options = {\n\t\t\tsummarizeHistory: summarizeHistory ?? true ? { uploadEditChunks: uploadEditChunks ?? true } : false,\n\t\t\tattributionId,\n\t\t};\n\t\tfactory = SharedTree.getFactory(writeFormat ?? WriteFormat.v0_1_1, options);\n\t}\n\tconst registry: ChannelFactoryRegistry = [[treeId, factory]];\n\tconst innerRequestHandler = async (request: IRequest, runtime: IContainerRuntimeBase) =>\n\t\truntime.IFluidHandleContext.resolveHandle(request);\n\n\tconst runtimeFactory = () =>\n\t\tnew TestContainerRuntimeFactory(\n\t\t\tTestDataStoreType,\n\t\t\tnew TestFluidObjectFactory(registry),\n\t\t\t{\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tminIdleTime: 1000, // Manually set idle times so some SharedTree tests don't timeout.\n\t\t\t\t\t\t\tmaxIdleTime: 1000,\n\t\t\t\t\t\t\tmaxTime: 1000 * 12,\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t[innerRequestHandler]\n\t\t);\n\n\tconst defaultCodeDetails: IFluidCodeDetails = {\n\t\tpackage: 'defaultTestPackage',\n\t\tconfig: {},\n\t};\n\n\tfunction makeTestLoader(provider: TestObjectProvider): IHostLoader {\n\t\tconst fluidEntryPoint = runtimeFactory();\n\t\tconst configProvider = (settings: Record<string, ConfigTypes>): IConfigProviderBase => ({\n\t\t\tgetRawConfig: (name: string): ConfigTypes => settings[name],\n\t\t});\n\n\t\treturn provider.createLoader([[defaultCodeDetails, fluidEntryPoint]], {\n\t\t\toptions: { maxClientLeaveWaitTime: 1000 },\n\t\t\tconfigProvider: configProvider(featureGates),\n\t\t});\n\t}\n\n\tlet provider: TestObjectProvider;\n\tlet container: IContainer;\n\n\tif (testObjectProvider !== undefined) {\n\t\tprovider = testObjectProvider;\n\t\tconst driver = new LocalServerTestDriver();\n\t\tconst loader = makeTestLoader(provider);\n\t\t// Once ILoaderOptions is specificable, this should use `provider.loadTestContainer` instead.\n\t\tcontainer = await loader.resolve({ url: await driver.createContainerUrl(treeId), headers }, pendingLocalState);\n\t\tawait waitContainerToCatchUp(container);\n\t} else {\n\t\tconst driver = new LocalServerTestDriver();\n\t\tprovider = new TestObjectProvider(Loader, driver, runtimeFactory);\n\t\ttestObjectProviders.push(provider);\n\t\t// Once ILoaderOptions is specificable, this should use `provider.makeTestContainer` instead.\n\t\tconst loader = makeTestLoader(provider);\n\t\tcontainer = await createAndAttachContainer(defaultCodeDetails, loader, driver.createCreateNewRequest(treeId));\n\t}\n\n\tconst dataObject = (await container.getEntryPoint()) as ITestFluidObject;\n\n\tconst uploadedBlobs =\n\t\tblobs === undefined ? [] : await Promise.all(blobs.map(async (blob) => dataObject.context.uploadBlob(blob)));\n\tconst tree = await dataObject.getSharedObject<SharedTree>(treeId);\n\n\tif (initialTree !== undefined && testObjectProvider === undefined) {\n\t\tsetTestTree(tree, initialTree, setupEditId);\n\t}\n\n\treturn { container, tree, testObjectProvider: provider, uploadedBlobs };\n}\n\n/** Sets testTrait to contain `node`. */\nfunction setTestTree(tree: SharedTree, node: BuildNode, overrideId?: EditId): EditId {\n\tconst trait = testTrait(tree.currentView);\n\tif (overrideId === undefined) {\n\t\treturn tree.applyEdit(...setTrait(trait, node)).id;\n\t} else {\n\t\tconst changes = setTrait(trait, node).map((c) => tree.internalizeChange(c));\n\t\treturn tree.applyEditInternal({ changes, id: overrideId }).id;\n\t}\n}\n\n/**\n * Creates a list of edits with stable IDs that can be processed by a SharedTree.\n * @returns the list of created edits\n */\nexport function createStableEdits(\n\tnumberOfEdits: number,\n\tidContext: NodeIdContext = makeNodeIdContext(),\n\tpayload: (i: number) => Payload = identity\n): Edit<ChangeInternal>[] {\n\tif (numberOfEdits === 0) {\n\t\treturn [];\n\t}\n\n\tconst uuidNamespace = '44864298-500e-4cf8-9f44-a249e5b3a286';\n\tconst nodeId = idContext.generateNodeId('ae6b24eb-6fa8-42cc-abd2-48f250b7798f');\n\tconst node = buildLeaf(nodeId);\n\tconst insertEmptyNode = newEdit([\n\t\tChangeInternal.build([node], 0 as DetachedSequenceId),\n\t\tChangeInternal.insert(\n\t\t\t0 as DetachedSequenceId,\n\t\t\tStablePlace.atEndOf({ label: testTraitLabel, parent: idContext.convertToNodeId(initialTree.identifier) })\n\t\t),\n\t]);\n\n\tconst edits: Edit<ChangeInternal>[] = [{ ...insertEmptyNode, id: uuidv5('test', uuidNamespace) as EditId }];\n\n\t// Every subsequent edit is a set payload\n\tfor (let i = 1; i < numberOfEdits; i++) {\n\t\tconst edit = newEdit([ChangeInternal.setPayload(nodeId, payload(i))]);\n\t\tedits.push({ ...edit, id: uuidv5(i.toString(), uuidNamespace) as EditId });\n\t}\n\n\treturn edits;\n}\n\n/** Asserts that changes to SharedTree in editor() function do not cause any observable state change */\nexport function assertNoDelta(tree: SharedTree, editor: () => void) {\n\tconst viewA = tree.currentView;\n\teditor();\n\tconst viewB = tree.currentView;\n\tconst delta = viewA.delta(viewB);\n\texpect(delta).deep.equals({\n\t\tchanged: [],\n\t\tadded: [],\n\t\tremoved: [],\n\t});\n}\n\n/**\n * Used to test error throwing in async functions.\n */\nexport async function asyncFunctionThrowsCorrectly(\n\tasyncFunction: () => Promise<unknown>,\n\texpectedError: string\n): Promise<boolean> {\n\tlet errorMessage: string | undefined;\n\n\ttry {\n\t\tawait asyncFunction();\n\t} catch (error) {\n\t\terrorMessage = (error as Error).message;\n\t}\n\n\treturn errorMessage === expectedError;\n}\n\n/**\n * Returns true if two nodes have equivalent data, otherwise false.\n * Does not compare children or payloads.\n * @param nodes - two or more nodes to compare\n */\nexport function areNodesEquivalent(...nodes: NodeData<unknown>[]): boolean {\n\tif (nodes.length < 2) {\n\t\tfail('Too few nodes to compare');\n\t}\n\n\tfor (let i = 1; i < nodes.length; i++) {\n\t\tif (nodes[i].definition !== nodes[0].definition) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (nodes[i].identifier !== nodes[0].identifier) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n// This accounts for this file being executed after compilation. If many tests want to leverage resources, we should unify\n// resource path logic to a single place.\nexport const testDocumentsPathBase = resolve(__dirname, '../../../src/test/documents/');\n\nexport const versionComparator = (versionA: string, versionB: string): number => {\n\tconst versionASplit = versionA.split('.');\n\tconst versionBSplit = versionB.split('.');\n\n\tassert(\n\t\tversionASplit.length === versionBSplit.length && versionASplit.length === 3,\n\t\t0x668 /* Version numbers should follow semantic versioning. */\n\t);\n\n\tfor (let i = 0; i < 3; ++i) {\n\t\tconst numberA = parseInt(versionASplit[i], 10);\n\t\tconst numberB = parseInt(versionBSplit[i], 10);\n\n\t\tif (numberA > numberB) {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (numberA < numberB) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\n\treturn 0;\n};\n\n/**\n * Create a {@link SimpleTestTree} from the given {@link SharedTree} or {@link IdCompressor}\n */\nexport function setUpTestTree(idSource?: IdCompressor | SharedTree, expensiveValidation = false): TestTree {\n\tconst source = idSource ?? new IdCompressor(createSessionId(), reservedIdCount);\n\tif (source instanceof SharedTree) {\n\t\tassert(source.edits.length === 0, 0x669 /* tree must be a new SharedTree */);\n\t\tconst getNormalizer = () => getIdNormalizerFromSharedTree(source);\n\t\tconst contextWrapper = {\n\t\t\tnormalizeToOpSpace: (id: NodeId) => getNormalizer().normalizeToOpSpace(id),\n\t\t\tnormalizeToSessionSpace: (id: OpSpaceNodeId, sessionId: SessionId) =>\n\t\t\t\tgetNormalizer().normalizeToSessionSpace(id, sessionId),\n\t\t\tget localSessionId() {\n\t\t\t\treturn getNormalizer().localSessionId;\n\t\t\t},\n\t\t};\n\t\tconst simpleTestTree = new SimpleTestTree(source, contextWrapper, expensiveValidation);\n\t\tsetTestTree(source, simpleTestTree);\n\t\treturn simpleTestTree;\n\t}\n\n\tconst context = makeNodeIdContext(source);\n\treturn new SimpleTestTree(context, context, expensiveValidation);\n}\n\n/**\n * Gets an id normalizer from the provided shared-tree. This is\n */\nexport function getIdNormalizerFromSharedTree(sharedTree: SharedTree): NodeIdNormalizer<OpSpaceNodeId> {\n\treturn (\n\t\t((sharedTree as any).idNormalizer as NodeIdNormalizer<OpSpaceNodeId>) ??\n\t\tfail('Failed to find SharedTree normalizer')\n\t);\n}\n\n/**\n * Create a {@link SimpleTestTree} before each test\n */\nexport function refreshTestTree(\n\tidSourceFactory?: (() => IdCompressor) | (() => SharedTree),\n\tfn?: (testTree: TestTree) => void,\n\texpensiveValidation = false\n): TestTree {\n\tconst factory = idSourceFactory ?? (() => new IdCompressor(createSessionId(), reservedIdCount));\n\treturn new RefreshingTestTree(() => {\n\t\treturn setUpTestTree(factory(), expensiveValidation);\n\t}, fn);\n}\n\nexport function makeNodeIdContext(idCompressor?: IdCompressor): NodeIdContext & NodeIdNormalizer<OpSpaceNodeId> {\n\tconst compressor = idCompressor ?? new IdCompressor(createSessionId(), reservedIdCount);\n\treturn getNodeIdContext(compressor);\n}\n\n/**\n * Applies an arbitrary edit to the given SharedTree which leaves the tree in the same state that it was before the edit.\n * This is useful for test scenarios that want to apply edits but don't care what they do.\n */\nexport function applyNoop(tree: SharedTree): Edit<unknown> {\n\treturn tree.applyEdit(...noopEdit(tree.currentView));\n}\n\n/**\n * Creates an arbitrary edit which leaves a tree in the same state that it was before the edit.\n * This is useful for test scenarios that want to create edits but don't care what they do.\n */\nexport function noopEdit(view: TreeView): Change[] {\n\tconst traitLocation = testTrait(view);\n\tconst trait = view.getTrait(traitLocation);\n\t// Set the test trait to the same thing that it already was\n\treturn setTrait(\n\t\ttraitLocation,\n\t\ttrait.map((id) => getChangeNodeFromViewNode(view, id))\n\t);\n}\n\n/** Translate an ID in one context to an ID in another */\nexport function translateId(id: NodeId | NodeData<NodeId>, from: NodeIdConverter, to: NodeIdConverter): NodeId {\n\treturn to.convertToNodeId(from.convertToStableNodeId(getNodeId(id)));\n}\n\nexport function normalizeId(tree: SharedTree, id: NodeId): OpSpaceNodeId {\n\tconst normalizer = getIdNormalizerFromSharedTree(tree);\n\treturn normalizer.normalizeToOpSpace(id);\n}\n\nexport function normalizeIds(tree: SharedTree, ...ids: NodeId[]): OpSpaceNodeId[] {\n\tconst normalizer = getIdNormalizerFromSharedTree(tree);\n\treturn ids.map((id) => normalizer.normalizeToOpSpace(id));\n}\n\nexport function idsAreEqual(treeA: SharedTree, idsA: NodeId[], treeB: SharedTree, idsB: NodeId[]): boolean {\n\tif (idsA.length !== idsB.length) {\n\t\treturn false;\n\t}\n\tconst contextA = getIdNormalizerFromSharedTree(treeA);\n\tconst contextB = getIdNormalizerFromSharedTree(treeB);\n\tfor (let i = 0; i < idsA.length; i++) {\n\t\tif (contextA.normalizeToOpSpace(idsA[i]) !== contextB.normalizeToOpSpace(idsB[i])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nexport function normalizeEdit(\n\ttree: SharedTree,\n\tedit: Edit<ChangeInternal>\n): Edit<ReplaceRecursive<ChangeInternal, NodeId, OpSpaceNodeId>> {\n\tconst context = getIdNormalizerFromSharedTree(tree);\n\treturn convertEditIds(edit, (id) => context.normalizeToOpSpace(id));\n}\n\nexport function stabilizeEdit(\n\ttree: SharedTree,\n\tedit: Edit<ChangeInternal>\n): Edit<ReplaceRecursive<ChangeInternal, NodeId, StableNodeId>> {\n\treturn convertEditIds(edit, (id) => tree.convertToStableNodeId(id));\n}\n\nexport function getEditLogInternal(tree: SharedTree): OrderedEditSet<ChangeInternal> {\n\treturn tree.edits as unknown as OrderedEditSet<ChangeInternal>;\n}\n\n/**\n * Spies on all future ops submitted to `containerRuntimeFactory`. When ops are submitted, they will be `push`ed into the\n * returned array.\n */\nexport function spyOnSubmittedOps<Op extends SharedTreeOp | SharedTreeOp_0_0_2>(\n\tcontainerRuntimeFactory: MockContainerRuntimeFactory\n): Op[] {\n\tconst ops: Op[] = [];\n\tconst originalPush = containerRuntimeFactory.pushMessage.bind(containerRuntimeFactory);\n\tcontainerRuntimeFactory.pushMessage = (message: Partial<ISequencedDocumentMessage>) => {\n\t\tconst { contents } = message;\n\t\tops.push(contents as Op);\n\t\toriginalPush(message);\n\t};\n\treturn ops;\n}\n\n/**\n * Waits for summarization to occur, and returns a version that can be passed into newly loaded containers\n * to ensure they load this summary version. Use the `LoaderHeader.version` header.\n */\nexport async function waitForSummary(mainContainer: IContainer): Promise<string> {\n\tconst { deltaManager } = mainContainer;\n\tconst summaryCollection = new SummaryCollection(deltaManager, createChildLogger());\n\tconst ackedSummary = await summaryCollection.waitSummaryAck(deltaManager.lastSequenceNumber);\n\treturn ackedSummary.summaryAck.contents.handle;\n}\n\n/**\n * Runs an action while the given container has been paused\n */\nexport async function withContainerOffline<TReturn>(\n\tprovider: ITestObjectProvider,\n\tcontainer: IContainerExperimental,\n\taction: () => TReturn\n): Promise<{ actionReturn: TReturn; pendingLocalState: string }> {\n\tawait provider.ensureSynchronized();\n\tawait provider.opProcessingController.pauseProcessing(container);\n\tconst actionReturn = action();\n\tconst pendingLocalState = await container.closeAndGetPendingLocalState?.();\n\tassert(pendingLocalState !== undefined, 0x726 /* pendingLocalState should be defined */);\n\treturn { actionReturn, pendingLocalState };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/tree",
|
|
3
|
-
"version": "2.0.0-dev.7.
|
|
3
|
+
"version": "2.0.0-dev.7.4.0.214930",
|
|
4
4
|
"description": "Distributed tree",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"module": "lib/index.js",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@fluid-internal/client-utils": "2.0.0-dev.7.
|
|
19
|
-
"@fluidframework/container-definitions": "2.0.0-dev.7.
|
|
20
|
-
"@fluidframework/core-interfaces": "2.0.0-dev.7.
|
|
21
|
-
"@fluidframework/core-utils": "2.0.0-dev.7.
|
|
22
|
-
"@fluidframework/datastore-definitions": "2.0.0-dev.7.
|
|
18
|
+
"@fluid-internal/client-utils": "2.0.0-dev.7.4.0.214930",
|
|
19
|
+
"@fluidframework/container-definitions": "2.0.0-dev.7.4.0.214930",
|
|
20
|
+
"@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.214930",
|
|
21
|
+
"@fluidframework/core-utils": "2.0.0-dev.7.4.0.214930",
|
|
22
|
+
"@fluidframework/datastore-definitions": "2.0.0-dev.7.4.0.214930",
|
|
23
23
|
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
24
|
-
"@fluidframework/runtime-definitions": "2.0.0-dev.7.
|
|
25
|
-
"@fluidframework/shared-object-base": "2.0.0-dev.7.
|
|
26
|
-
"@fluidframework/telemetry-utils": "2.0.0-dev.7.
|
|
24
|
+
"@fluidframework/runtime-definitions": "2.0.0-dev.7.4.0.214930",
|
|
25
|
+
"@fluidframework/shared-object-base": "2.0.0-dev.7.4.0.214930",
|
|
26
|
+
"@fluidframework/telemetry-utils": "2.0.0-dev.7.4.0.214930",
|
|
27
27
|
"buffer": "^6.0.3",
|
|
28
28
|
"denque": "^1.5.1",
|
|
29
29
|
"lru-cache": "^6.0.0",
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"uuid": "^9.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@fluid-private/stochastic-test-utils": "2.0.0-dev.7.
|
|
35
|
-
"@fluid-private/test-drivers": "2.0.0-dev.7.
|
|
34
|
+
"@fluid-private/stochastic-test-utils": "2.0.0-dev.7.4.0.214930",
|
|
35
|
+
"@fluid-private/test-drivers": "2.0.0-dev.7.4.0.214930",
|
|
36
36
|
"@fluid-tools/benchmark": "^0.48.0",
|
|
37
37
|
"@fluidframework/build-common": "^2.0.3",
|
|
38
38
|
"@fluidframework/build-tools": "^0.28.0",
|
|
39
|
-
"@fluidframework/container-loader": "2.0.0-dev.7.
|
|
40
|
-
"@fluidframework/container-runtime": "2.0.0-dev.7.
|
|
39
|
+
"@fluidframework/container-loader": "2.0.0-dev.7.4.0.214930",
|
|
40
|
+
"@fluidframework/container-runtime": "2.0.0-dev.7.4.0.214930",
|
|
41
41
|
"@fluidframework/eslint-config-fluid": "^3.1.0",
|
|
42
|
-
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.
|
|
43
|
-
"@fluidframework/runtime-utils": "2.0.0-dev.7.
|
|
44
|
-
"@fluidframework/test-driver-definitions": "2.0.0-dev.7.
|
|
45
|
-
"@fluidframework/test-runtime-utils": "2.0.0-dev.7.
|
|
46
|
-
"@fluidframework/test-utils": "2.0.0-dev.7.
|
|
47
|
-
"@fluidframework/undo-redo": "2.0.0-dev.7.
|
|
42
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.7.4.0.214930",
|
|
43
|
+
"@fluidframework/runtime-utils": "2.0.0-dev.7.4.0.214930",
|
|
44
|
+
"@fluidframework/test-driver-definitions": "2.0.0-dev.7.4.0.214930",
|
|
45
|
+
"@fluidframework/test-runtime-utils": "2.0.0-dev.7.4.0.214930",
|
|
46
|
+
"@fluidframework/test-utils": "2.0.0-dev.7.4.0.214930",
|
|
47
|
+
"@fluidframework/undo-redo": "2.0.0-dev.7.4.0.214930",
|
|
48
48
|
"@microsoft/api-extractor": "^7.38.3",
|
|
49
49
|
"@types/chai": "^4.0.0",
|
|
50
50
|
"@types/lru-cache": "^5.1.0",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
84
84
|
"perf": "cross-env FLUID_TEST_VERBOSE=1 mocha \"dist/**/*.tests.js\" --node-option unhandled-rejections=strict,expose-gc --exit -r node_modules/@fluidframework/mocha-test-setup --perfMode --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js --timeout 30000",
|
|
85
85
|
"perf:measure": "npm run perf -- --fgrep @Measurement",
|
|
86
|
-
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
|
|
87
|
-
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
86
|
+
"prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
87
|
+
"prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
88
88
|
"test": "npm run test:mocha",
|
|
89
89
|
"test:benchmark:report": "mocha \"dist/**/*.tests.js\" --node-option unhandled-rejections=strict,expose-gc --exit --perfMode --fgrep @Benchmark -r node_modules/@fluidframework/mocha-test-setup --reporter @fluid-tools/benchmark/dist/MochaReporter.js --timeout 60000",
|
|
90
90
|
"test:coverage": "c8 npm test",
|