@fluidframework/test-utils 2.0.0-dev-rc.3.0.0.250606 → 2.0.0-dev-rc.3.0.0.253463
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-report/test-utils.api.md +35 -35
- package/dist/DriverWrappers.d.ts +1 -1
- package/dist/DriverWrappers.d.ts.map +1 -1
- package/dist/DriverWrappers.js.map +1 -1
- package/dist/TestSummaryUtils.d.ts +4 -4
- package/dist/TestSummaryUtils.d.ts.map +1 -1
- package/dist/TestSummaryUtils.js +12 -12
- package/dist/TestSummaryUtils.js.map +1 -1
- package/dist/containerUtils.d.ts +2 -2
- package/dist/containerUtils.d.ts.map +1 -1
- package/dist/containerUtils.js +3 -3
- package/dist/containerUtils.js.map +1 -1
- package/dist/debug.d.ts.map +1 -1
- package/dist/debug.js.map +1 -1
- package/dist/interfaces.d.ts +1 -1
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/loaderContainerTracker.d.ts +1 -1
- package/dist/loaderContainerTracker.d.ts.map +1 -1
- package/dist/loaderContainerTracker.js +13 -13
- package/dist/loaderContainerTracker.js.map +1 -1
- package/dist/localCodeLoader.d.ts +3 -3
- package/dist/localCodeLoader.d.ts.map +1 -1
- package/dist/localCodeLoader.js +4 -4
- package/dist/localCodeLoader.js.map +1 -1
- package/dist/localLoader.d.ts +2 -2
- package/dist/localLoader.d.ts.map +1 -1
- package/dist/localLoader.js +2 -2
- package/dist/localLoader.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/retry.js +2 -2
- package/dist/retry.js.map +1 -1
- package/dist/test-utils-alpha.d.ts +35 -37
- package/dist/test-utils-beta.d.ts +35 -37
- package/dist/test-utils-public.d.ts +35 -37
- package/dist/test-utils-untrimmed.d.ts +35 -35
- package/dist/testContainerRuntimeFactory.d.ts +5 -5
- package/dist/testContainerRuntimeFactory.d.ts.map +1 -1
- package/dist/testContainerRuntimeFactory.js +15 -13
- package/dist/testContainerRuntimeFactory.js.map +1 -1
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts +5 -5
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js +2 -2
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
- package/dist/testFluidObject.d.ts +2 -2
- package/dist/testFluidObject.d.ts.map +1 -1
- package/dist/testFluidObject.js +7 -7
- package/dist/testFluidObject.js.map +1 -1
- package/dist/testObjectProvider.d.ts +5 -5
- package/dist/testObjectProvider.d.ts.map +1 -1
- package/dist/testObjectProvider.js +9 -9
- package/dist/testObjectProvider.js.map +1 -1
- package/dist/timeoutUtils.js +4 -4
- package/dist/timeoutUtils.js.map +1 -1
- package/lib/DriverWrappers.d.ts +1 -1
- package/lib/DriverWrappers.d.ts.map +1 -1
- package/lib/DriverWrappers.js.map +1 -1
- package/lib/TestSummaryUtils.d.ts +4 -4
- package/lib/TestSummaryUtils.d.ts.map +1 -1
- package/lib/TestSummaryUtils.js +4 -4
- package/lib/TestSummaryUtils.js.map +1 -1
- package/lib/containerUtils.d.ts +2 -2
- package/lib/containerUtils.d.ts.map +1 -1
- package/lib/containerUtils.js +1 -1
- package/lib/containerUtils.js.map +1 -1
- package/lib/debug.d.ts.map +1 -1
- package/lib/debug.js.map +1 -1
- package/lib/interfaces.d.ts +1 -1
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js.map +1 -1
- package/lib/loaderContainerTracker.d.ts +1 -1
- package/lib/loaderContainerTracker.d.ts.map +1 -1
- package/lib/loaderContainerTracker.js +2 -2
- package/lib/loaderContainerTracker.js.map +1 -1
- package/lib/localCodeLoader.d.ts +3 -3
- package/lib/localCodeLoader.d.ts.map +1 -1
- package/lib/localCodeLoader.js +2 -2
- package/lib/localCodeLoader.js.map +1 -1
- package/lib/localLoader.d.ts +2 -2
- package/lib/localLoader.d.ts.map +1 -1
- package/lib/localLoader.js +1 -1
- package/lib/localLoader.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/test-utils-alpha.d.ts +35 -37
- package/lib/test-utils-beta.d.ts +35 -37
- package/lib/test-utils-public.d.ts +35 -37
- package/lib/test-utils-untrimmed.d.ts +35 -35
- package/lib/testContainerRuntimeFactory.d.ts +5 -5
- package/lib/testContainerRuntimeFactory.d.ts.map +1 -1
- package/lib/testContainerRuntimeFactory.js +9 -5
- package/lib/testContainerRuntimeFactory.js.map +1 -1
- package/lib/testContainerRuntimeFactoryWithDefaultDataStore.d.ts +5 -5
- package/lib/testContainerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/lib/testContainerRuntimeFactoryWithDefaultDataStore.js +1 -1
- package/lib/testContainerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
- package/lib/testFluidObject.d.ts +2 -2
- package/lib/testFluidObject.d.ts.map +1 -1
- package/lib/testFluidObject.js +3 -3
- package/lib/testFluidObject.js.map +1 -1
- package/lib/testObjectProvider.d.ts +5 -5
- package/lib/testObjectProvider.d.ts.map +1 -1
- package/lib/testObjectProvider.js +2 -2
- package/lib/testObjectProvider.js.map +1 -1
- package/lib/timeoutUtils.js +1 -1
- package/lib/timeoutUtils.js.map +1 -1
- package/lib/tsdoc-metadata.json +11 -0
- package/package.json +22 -34
- package/src/DriverWrappers.ts +1 -1
- package/src/TestSummaryUtils.ts +11 -6
- package/src/containerUtils.ts +4 -3
- package/src/debug.ts +1 -0
- package/src/interfaces.ts +1 -1
- package/src/loaderContainerTracker.ts +5 -3
- package/src/localCodeLoader.ts +6 -5
- package/src/localLoader.ts +4 -3
- package/src/packageVersion.ts +1 -1
- package/src/retry.ts +1 -1
- package/src/testContainerRuntimeFactory.ts +13 -8
- package/src/testContainerRuntimeFactoryWithDefaultDataStore.ts +5 -5
- package/src/testFluidObject.ts +5 -4
- package/src/testObjectProvider.ts +8 -10
- package/src/timeoutUtils.ts +1 -1
- package/lib/test/timeoutUtils.spec.js +0 -165
- package/lib/test/timeoutUtils.spec.js.map +0 -1
- package/lib/test/types/validateTestUtilsPrevious.generated.js +0 -90
- package/lib/test/types/validateTestUtilsPrevious.generated.js.map +0 -1
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { ConfigTypes } from '@fluidframework/core-interfaces';
|
|
2
|
-
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
3
|
-
import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct';
|
|
4
|
-
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
2
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
|
|
3
|
+
import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct/internal';
|
|
4
|
+
import { FluidDataStoreRuntime } from '@fluidframework/datastore/internal';
|
|
5
5
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
6
6
|
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
7
|
-
import { ICodeDetailsLoader } from '@fluidframework/container-definitions';
|
|
7
|
+
import { ICodeDetailsLoader } from '@fluidframework/container-definitions/internal';
|
|
8
8
|
import { IConfigProviderBase } from '@fluidframework/core-interfaces';
|
|
9
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
10
|
-
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
11
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
12
|
-
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
13
|
-
import { IDataStore } from '@fluidframework/runtime-definitions';
|
|
14
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
15
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
16
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
17
|
-
import { IFluidCodeDetails } from '@fluidframework/container-definitions';
|
|
18
|
-
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
|
|
19
|
-
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
20
|
-
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { IContainer } from '@fluidframework/container-definitions/internal';
|
|
10
|
+
import { IContainerContext } from '@fluidframework/container-definitions/internal';
|
|
11
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions/internal';
|
|
12
|
+
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime/internal';
|
|
13
|
+
import { IDataStore } from '@fluidframework/runtime-definitions/internal';
|
|
14
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
15
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
16
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
17
|
+
import { IFluidCodeDetails } from '@fluidframework/container-definitions/internal';
|
|
18
|
+
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions/internal';
|
|
19
|
+
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
|
|
20
|
+
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
|
|
21
21
|
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
22
22
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
23
23
|
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
24
|
-
import { IFluidModule } from '@fluidframework/container-definitions';
|
|
25
|
-
import { IFluidModuleWithDetails } from '@fluidframework/container-definitions';
|
|
26
|
-
import { IHostLoader } from '@fluidframework/container-definitions';
|
|
27
|
-
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
28
|
-
import { ILoaderProps } from '@fluidframework/container-loader';
|
|
29
|
-
import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime';
|
|
30
|
-
import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
|
|
31
|
-
import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
32
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
33
|
-
import { IProvideRuntimeFactory } from '@fluidframework/container-definitions';
|
|
24
|
+
import { IFluidModule } from '@fluidframework/container-definitions/internal';
|
|
25
|
+
import { IFluidModuleWithDetails } from '@fluidframework/container-definitions/internal';
|
|
26
|
+
import { IHostLoader } from '@fluidframework/container-definitions/internal';
|
|
27
|
+
import { ILoaderOptions } from '@fluidframework/container-definitions/internal';
|
|
28
|
+
import { ILoaderProps } from '@fluidframework/container-loader/internal';
|
|
29
|
+
import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime/internal';
|
|
30
|
+
import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions/internal';
|
|
31
|
+
import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
|
|
32
|
+
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions/internal';
|
|
33
|
+
import { IProvideRuntimeFactory } from '@fluidframework/container-definitions/internal';
|
|
34
34
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
35
35
|
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
36
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
36
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
37
37
|
import { IResponse } from '@fluidframework/core-interfaces';
|
|
38
|
-
import { IRuntime } from '@fluidframework/container-definitions';
|
|
38
|
+
import { IRuntime } from '@fluidframework/container-definitions/internal';
|
|
39
39
|
import { ISharedMap } from '@fluidframework/map';
|
|
40
|
-
import { ISummarizer } from '@fluidframework/container-runtime';
|
|
41
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
40
|
+
import { ISummarizer } from '@fluidframework/container-runtime/internal';
|
|
41
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
42
42
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
43
43
|
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
44
44
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
45
45
|
import { ITelemetryGenericEventExt } from '@fluidframework/telemetry-utils';
|
|
46
|
-
import { ITestDriver } from '@
|
|
47
|
-
import { IUrlResolver } from '@fluidframework/driver-definitions';
|
|
48
|
-
import { Loader } from '@fluidframework/container-loader';
|
|
49
|
-
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
50
|
-
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
46
|
+
import { ITestDriver } from '@fluid-internal/test-driver-definitions';
|
|
47
|
+
import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
|
|
48
|
+
import { Loader } from '@fluidframework/container-loader/internal';
|
|
49
|
+
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions/internal';
|
|
50
|
+
import { RuntimeRequestHandler } from '@fluidframework/request-handler/internal';
|
|
51
51
|
|
|
52
52
|
/* Excluded from this release type: ChannelFactoryRegistry */
|
|
53
53
|
|
|
@@ -153,8 +153,6 @@ import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
|
153
153
|
|
|
154
154
|
/* Excluded from this release type: ITestContainerConfig */
|
|
155
155
|
|
|
156
|
-
/* Excluded from this release type: ITestDriver */
|
|
157
|
-
|
|
158
156
|
/* Excluded from this release type: ITestFluidObject */
|
|
159
157
|
|
|
160
158
|
/* Excluded from this release type: ITestObjectProvider */
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { ConfigTypes } from '@fluidframework/core-interfaces';
|
|
2
|
-
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
3
|
-
import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct';
|
|
4
|
-
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
2
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
|
|
3
|
+
import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct/internal';
|
|
4
|
+
import { FluidDataStoreRuntime } from '@fluidframework/datastore/internal';
|
|
5
5
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
6
6
|
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
7
|
-
import { ICodeDetailsLoader } from '@fluidframework/container-definitions';
|
|
7
|
+
import { ICodeDetailsLoader } from '@fluidframework/container-definitions/internal';
|
|
8
8
|
import { IConfigProviderBase } from '@fluidframework/core-interfaces';
|
|
9
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
10
|
-
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
11
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
12
|
-
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
13
|
-
import { IDataStore } from '@fluidframework/runtime-definitions';
|
|
14
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
15
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
16
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
17
|
-
import { IFluidCodeDetails } from '@fluidframework/container-definitions';
|
|
18
|
-
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
|
|
19
|
-
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
20
|
-
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { IContainer } from '@fluidframework/container-definitions/internal';
|
|
10
|
+
import { IContainerContext } from '@fluidframework/container-definitions/internal';
|
|
11
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions/internal';
|
|
12
|
+
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime/internal';
|
|
13
|
+
import { IDataStore } from '@fluidframework/runtime-definitions/internal';
|
|
14
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
15
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
16
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
17
|
+
import { IFluidCodeDetails } from '@fluidframework/container-definitions/internal';
|
|
18
|
+
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions/internal';
|
|
19
|
+
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
|
|
20
|
+
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
|
|
21
21
|
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
22
22
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
23
23
|
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
24
|
-
import { IFluidModule } from '@fluidframework/container-definitions';
|
|
25
|
-
import { IFluidModuleWithDetails } from '@fluidframework/container-definitions';
|
|
26
|
-
import { IHostLoader } from '@fluidframework/container-definitions';
|
|
27
|
-
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
28
|
-
import { ILoaderProps } from '@fluidframework/container-loader';
|
|
29
|
-
import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime';
|
|
30
|
-
import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
|
|
31
|
-
import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
32
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
33
|
-
import { IProvideRuntimeFactory } from '@fluidframework/container-definitions';
|
|
24
|
+
import { IFluidModule } from '@fluidframework/container-definitions/internal';
|
|
25
|
+
import { IFluidModuleWithDetails } from '@fluidframework/container-definitions/internal';
|
|
26
|
+
import { IHostLoader } from '@fluidframework/container-definitions/internal';
|
|
27
|
+
import { ILoaderOptions } from '@fluidframework/container-definitions/internal';
|
|
28
|
+
import { ILoaderProps } from '@fluidframework/container-loader/internal';
|
|
29
|
+
import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime/internal';
|
|
30
|
+
import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions/internal';
|
|
31
|
+
import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
|
|
32
|
+
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions/internal';
|
|
33
|
+
import { IProvideRuntimeFactory } from '@fluidframework/container-definitions/internal';
|
|
34
34
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
35
35
|
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
36
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
36
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
37
37
|
import { IResponse } from '@fluidframework/core-interfaces';
|
|
38
|
-
import { IRuntime } from '@fluidframework/container-definitions';
|
|
38
|
+
import { IRuntime } from '@fluidframework/container-definitions/internal';
|
|
39
39
|
import { ISharedMap } from '@fluidframework/map';
|
|
40
|
-
import { ISummarizer } from '@fluidframework/container-runtime';
|
|
41
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
40
|
+
import { ISummarizer } from '@fluidframework/container-runtime/internal';
|
|
41
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
42
42
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
43
43
|
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
44
44
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
45
45
|
import { ITelemetryGenericEventExt } from '@fluidframework/telemetry-utils';
|
|
46
|
-
import { ITestDriver } from '@
|
|
47
|
-
import { IUrlResolver } from '@fluidframework/driver-definitions';
|
|
48
|
-
import { Loader } from '@fluidframework/container-loader';
|
|
49
|
-
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
50
|
-
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
46
|
+
import { ITestDriver } from '@fluid-internal/test-driver-definitions';
|
|
47
|
+
import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
|
|
48
|
+
import { Loader } from '@fluidframework/container-loader/internal';
|
|
49
|
+
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions/internal';
|
|
50
|
+
import { RuntimeRequestHandler } from '@fluidframework/request-handler/internal';
|
|
51
51
|
|
|
52
52
|
/* Excluded from this release type: ChannelFactoryRegistry */
|
|
53
53
|
|
|
@@ -153,8 +153,6 @@ import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
|
153
153
|
|
|
154
154
|
/* Excluded from this release type: ITestContainerConfig */
|
|
155
155
|
|
|
156
|
-
/* Excluded from this release type: ITestDriver */
|
|
157
|
-
|
|
158
156
|
/* Excluded from this release type: ITestFluidObject */
|
|
159
157
|
|
|
160
158
|
/* Excluded from this release type: ITestObjectProvider */
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import { ConfigTypes } from '@fluidframework/core-interfaces';
|
|
2
|
-
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
3
|
-
import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct';
|
|
4
|
-
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
2
|
+
import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
|
|
3
|
+
import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct/internal';
|
|
4
|
+
import { FluidDataStoreRuntime } from '@fluidframework/datastore/internal';
|
|
5
5
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
6
6
|
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
7
|
-
import { ICodeDetailsLoader } from '@fluidframework/container-definitions';
|
|
7
|
+
import { ICodeDetailsLoader } from '@fluidframework/container-definitions/internal';
|
|
8
8
|
import { IConfigProviderBase } from '@fluidframework/core-interfaces';
|
|
9
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
10
|
-
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
11
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
12
|
-
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
13
|
-
import { IDataStore } from '@fluidframework/runtime-definitions';
|
|
14
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
15
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
16
|
-
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
17
|
-
import { IFluidCodeDetails } from '@fluidframework/container-definitions';
|
|
18
|
-
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
|
|
19
|
-
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
20
|
-
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { IContainer } from '@fluidframework/container-definitions/internal';
|
|
10
|
+
import { IContainerContext } from '@fluidframework/container-definitions/internal';
|
|
11
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions/internal';
|
|
12
|
+
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime/internal';
|
|
13
|
+
import { IDataStore } from '@fluidframework/runtime-definitions/internal';
|
|
14
|
+
import { IDocumentService } from '@fluidframework/driver-definitions/internal';
|
|
15
|
+
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
|
|
16
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
|
|
17
|
+
import { IFluidCodeDetails } from '@fluidframework/container-definitions/internal';
|
|
18
|
+
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions/internal';
|
|
19
|
+
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
|
|
20
|
+
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
|
|
21
21
|
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
22
22
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
23
23
|
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
24
|
-
import { IFluidModule } from '@fluidframework/container-definitions';
|
|
25
|
-
import { IFluidModuleWithDetails } from '@fluidframework/container-definitions';
|
|
26
|
-
import { IHostLoader } from '@fluidframework/container-definitions';
|
|
27
|
-
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
28
|
-
import { ILoaderProps } from '@fluidframework/container-loader';
|
|
29
|
-
import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime';
|
|
30
|
-
import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions';
|
|
31
|
-
import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
32
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
33
|
-
import { IProvideRuntimeFactory } from '@fluidframework/container-definitions';
|
|
24
|
+
import { IFluidModule } from '@fluidframework/container-definitions/internal';
|
|
25
|
+
import { IFluidModuleWithDetails } from '@fluidframework/container-definitions/internal';
|
|
26
|
+
import { IHostLoader } from '@fluidframework/container-definitions/internal';
|
|
27
|
+
import { ILoaderOptions } from '@fluidframework/container-definitions/internal';
|
|
28
|
+
import { ILoaderProps } from '@fluidframework/container-loader/internal';
|
|
29
|
+
import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime/internal';
|
|
30
|
+
import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions/internal';
|
|
31
|
+
import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
|
|
32
|
+
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions/internal';
|
|
33
|
+
import { IProvideRuntimeFactory } from '@fluidframework/container-definitions/internal';
|
|
34
34
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
35
35
|
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
36
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
36
|
+
import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
|
|
37
37
|
import { IResponse } from '@fluidframework/core-interfaces';
|
|
38
|
-
import { IRuntime } from '@fluidframework/container-definitions';
|
|
38
|
+
import { IRuntime } from '@fluidframework/container-definitions/internal';
|
|
39
39
|
import { ISharedMap } from '@fluidframework/map';
|
|
40
|
-
import { ISummarizer } from '@fluidframework/container-runtime';
|
|
41
|
-
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
40
|
+
import { ISummarizer } from '@fluidframework/container-runtime/internal';
|
|
41
|
+
import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
|
|
42
42
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
43
43
|
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
44
44
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
45
45
|
import { ITelemetryGenericEventExt } from '@fluidframework/telemetry-utils';
|
|
46
|
-
import { ITestDriver } from '@
|
|
47
|
-
import { IUrlResolver } from '@fluidframework/driver-definitions';
|
|
48
|
-
import { Loader } from '@fluidframework/container-loader';
|
|
49
|
-
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
50
|
-
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
46
|
+
import { ITestDriver } from '@fluid-internal/test-driver-definitions';
|
|
47
|
+
import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
|
|
48
|
+
import { Loader } from '@fluidframework/container-loader/internal';
|
|
49
|
+
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions/internal';
|
|
50
|
+
import { RuntimeRequestHandler } from '@fluidframework/request-handler/internal';
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* @internal
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IContainerContext, IRuntime } from "@fluidframework/container-definitions";
|
|
6
|
-
import { ContainerRuntime, IContainerRuntimeOptions } from "@fluidframework/container-runtime";
|
|
7
|
-
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
8
|
-
import { RuntimeRequestHandler } from "@fluidframework/request-handler";
|
|
9
|
-
import { IFluidDataStoreFactory } from "@fluidframework/runtime-definitions";
|
|
5
|
+
import { IContainerContext, IRuntime } from "@fluidframework/container-definitions/internal";
|
|
6
|
+
import { ContainerRuntime, IContainerRuntimeOptions } from "@fluidframework/container-runtime/internal";
|
|
7
|
+
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
|
|
8
|
+
import { RuntimeRequestHandler } from "@fluidframework/request-handler/internal";
|
|
9
|
+
import { IFluidDataStoreFactory } from "@fluidframework/runtime-definitions/internal";
|
|
10
10
|
/**
|
|
11
11
|
* Create a container runtime factory class that allows you to set runtime options
|
|
12
12
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"testContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EACN,gBAAgB,EAEhB,wBAAwB,EACxB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAQ3F,OAAO,EACN,qBAAqB,EAGrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACN,sBAAsB,EAEtB,MAAM,8CAA8C,CAAC;AAmCtD;;;GAGG;AACH,eAAO,MAAM,iCAAiC,yBACvB,uBAAuB;eAI9B,MAAM,oBACM,sBAAsB,mBACxB,wBAAwB,oBAUvB,qBAAqB,EAAE;cAZlC,MAAM;0BACM,sBAAsB;wBACxB,wBAAwB;yBAUvB,qBAAqB,EAAE;sCAKL,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAiBpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CA0DzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;eAtHxB,MAAM,oBACM,sBAAsB,mBACxB,wBAAwB,oBAUvB,qBAAqB,EAAE;cAZlC,MAAM;0BACM,sBAAsB;wBACxB,wBAAwB;yBAUvB,qBAAqB,EAAE;sCAKL,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAiBpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CAgEoD,CAAC"}
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.TestContainerRuntimeFactory = exports.createTestContainerRuntimeFactory = void 0;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
8
|
+
const internal_1 = require("@fluidframework/container-runtime/internal");
|
|
9
|
+
const internal_2 = require("@fluidframework/core-utils/internal");
|
|
10
|
+
const internal_3 = require("@fluidframework/request-handler/internal");
|
|
11
|
+
const internal_4 = require("@fluidframework/runtime-utils/internal");
|
|
13
12
|
const backCompat_DefaultRouteRequestHandler = (defaultRootId) => {
|
|
14
13
|
return async (request, runtime) => {
|
|
15
|
-
const parser =
|
|
14
|
+
const parser = internal_4.RequestParser.create(request);
|
|
16
15
|
if (parser.pathParts.length === 0) {
|
|
17
16
|
return runtime.IFluidHandleContext.resolveHandle({
|
|
18
17
|
url: `/${defaultRootId}${parser.query}`,
|
|
@@ -27,11 +26,11 @@ const backCompat_DefaultRouteRequestHandler = (defaultRootId) => {
|
|
|
27
26
|
* @internal
|
|
28
27
|
*/
|
|
29
28
|
const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
|
|
30
|
-
return class extends
|
|
29
|
+
return class extends internal_4.RuntimeFactoryHelper {
|
|
31
30
|
constructor(type, dataStoreFactory, runtimeOptions = {
|
|
32
31
|
summaryOptions: {
|
|
33
32
|
summaryConfigOverrides: {
|
|
34
|
-
...
|
|
33
|
+
...internal_1.DefaultSummaryConfiguration,
|
|
35
34
|
...{
|
|
36
35
|
initialSummarizerDelayMs: 0,
|
|
37
36
|
},
|
|
@@ -54,7 +53,7 @@ const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
|
|
|
54
53
|
/* existing */ false);
|
|
55
54
|
const dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);
|
|
56
55
|
const result = await dataStore?.trySetAlias("default");
|
|
57
|
-
(0,
|
|
56
|
+
(0, internal_2.assert)(result === "Success" || result === undefined, "success");
|
|
58
57
|
}
|
|
59
58
|
async instantiateFromExisting(runtime) {
|
|
60
59
|
// Validate we can load root data stores.
|
|
@@ -71,7 +70,9 @@ const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
|
|
|
71
70
|
return containerRuntimeCtor.load(context, [
|
|
72
71
|
["default", Promise.resolve(this.dataStoreFactory)],
|
|
73
72
|
[this.type, Promise.resolve(this.dataStoreFactory)],
|
|
74
|
-
],
|
|
73
|
+
],
|
|
74
|
+
// eslint-disable-next-line import/no-deprecated
|
|
75
|
+
(0, internal_3.buildRuntimeRequestHandler)(backCompat_DefaultRouteRequestHandler("default"), ...this.requestHandlers), this.runtimeOptions, context.scope, existing);
|
|
75
76
|
}
|
|
76
77
|
const provideEntryPoint = async (runtime) => {
|
|
77
78
|
const entryPoint = await runtime.getAliasedDataStoreEntryPoint("default");
|
|
@@ -81,7 +82,7 @@ const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
|
|
|
81
82
|
return entryPoint.get();
|
|
82
83
|
};
|
|
83
84
|
const getDefaultObject = async (request, runtime) => {
|
|
84
|
-
const parser =
|
|
85
|
+
const parser = internal_4.RequestParser.create(request);
|
|
85
86
|
if (parser.pathParts.length === 0) {
|
|
86
87
|
// This cast is safe as ContainerRuntime.loadRuntime is called below
|
|
87
88
|
return runtime.resolveHandle({
|
|
@@ -97,7 +98,8 @@ const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
|
|
|
97
98
|
["default", Promise.resolve(this.dataStoreFactory)],
|
|
98
99
|
[this.type, Promise.resolve(this.dataStoreFactory)],
|
|
99
100
|
],
|
|
100
|
-
|
|
101
|
+
// eslint-disable-next-line import/no-deprecated
|
|
102
|
+
requestHandler: (0, internal_3.buildRuntimeRequestHandler)(getDefaultObject, ...this.requestHandlers),
|
|
101
103
|
provideEntryPoint,
|
|
102
104
|
// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0
|
|
103
105
|
initializeEntryPoint: provideEntryPoint,
|
|
@@ -113,5 +115,5 @@ exports.createTestContainerRuntimeFactory = createTestContainerRuntimeFactory;
|
|
|
113
115
|
* A container runtime factory that allows you to set runtime options
|
|
114
116
|
* @internal
|
|
115
117
|
*/
|
|
116
|
-
exports.TestContainerRuntimeFactory = (0, exports.createTestContainerRuntimeFactory)(
|
|
118
|
+
exports.TestContainerRuntimeFactory = (0, exports.createTestContainerRuntimeFactory)(internal_1.ContainerRuntime);
|
|
117
119
|
//# sourceMappingURL=testContainerRuntimeFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yEAI2C;AAQ3C,2DAAoD;AACpD,gDAAgD;AAChD,qEAAoG;AAKpG,iEAAoF;AAO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;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAA,yCAAiC,EAAC,oCAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions\";\nimport {\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\tIContainerRuntimeOptions,\n} from \"@fluidframework/container-runtime\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport {\n\tFluidObject,\n\tIFluidHandleContext,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils\";\n// eslint-disable-next-line import/no-deprecated\nimport { RuntimeRequestHandler, buildRuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptions,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptions = {\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\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\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type], \"default\");\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(\n\t\t\t\t\t\t\tid: string,\n\t\t\t\t\t\t\twait?: boolean,\n\t\t\t\t\t\t): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime) => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (request: IRequest, runtime: IContainerRuntime) => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as ContainerRuntime.loadRuntime is called below\n\t\t\t\t\treturn (runtime as ContainerRuntime).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries: [\n\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t],\n\t\t\t\trequestHandler: buildRuntimeRequestHandler(\n\t\t\t\t\tgetDefaultObject,\n\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t),\n\t\t\t\tprovideEntryPoint,\n\t\t\t\t// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0\n\t\t\t\tinitializeEntryPoint: provideEntryPoint,\n\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\tcontainerScope: context.scope,\n\t\t\t\texisting,\n\t\t\t} as any);\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
|
|
1
|
+
{"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yEAIoD;AAQpD,kEAA6D;AAC7D,uEAIkD;AAKlD,qEAA6F;AAO7F,MAAM,qCAAqC,GAAG,CAAC,aAAqB,EAAE,EAAE;IACvE,OAAO,KAAK,EAAE,OAAiB,EAAE,OAA0B,EAAE,EAAE;QAC9D,MAAM,MAAM,GAAG,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Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions/internal\";\nimport {\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\tIContainerRuntimeOptions,\n} from \"@fluidframework/container-runtime/internal\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport {\n\tFluidObject,\n\tIFluidHandleContext,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tRuntimeRequestHandler,\n\t// eslint-disable-next-line import/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptions,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptions = {\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\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\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type], \"default\");\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(\n\t\t\t\t\t\t\tid: string,\n\t\t\t\t\t\t\twait?: boolean,\n\t\t\t\t\t\t): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime) => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (request: IRequest, runtime: IContainerRuntime) => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as ContainerRuntime.loadRuntime is called below\n\t\t\t\t\treturn (runtime as ContainerRuntime).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries: [\n\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t],\n\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\trequestHandler: buildRuntimeRequestHandler(\n\t\t\t\t\tgetDefaultObject,\n\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t),\n\t\t\t\tprovideEntryPoint,\n\t\t\t\t// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0\n\t\t\t\tinitializeEntryPoint: provideEntryPoint,\n\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\tcontainerScope: context.scope,\n\t\t\t\texisting,\n\t\t\t} as any);\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { ContainerRuntimeFactoryWithDefaultDataStore } from "@fluidframework/aqueduct";
|
|
6
|
-
import { IContainerRuntimeOptions } from "@fluidframework/container-runtime";
|
|
7
|
-
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
5
|
+
import { ContainerRuntimeFactoryWithDefaultDataStore } from "@fluidframework/aqueduct/internal";
|
|
6
|
+
import { IContainerRuntimeOptions } from "@fluidframework/container-runtime/internal";
|
|
7
|
+
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
|
|
8
8
|
import { FluidObject } from "@fluidframework/core-interfaces";
|
|
9
|
-
import { RuntimeRequestHandler } from "@fluidframework/request-handler";
|
|
10
|
-
import { IFluidDataStoreFactory, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions";
|
|
9
|
+
import { RuntimeRequestHandler } from "@fluidframework/request-handler/internal";
|
|
10
|
+
import { IFluidDataStoreFactory, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions/internal";
|
|
11
11
|
/**
|
|
12
12
|
* ! Note: This function is purely needed for back-compat as the constructor argument structure was changed
|
|
13
13
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,2CAA2C,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,2CAA2C,EAAE,MAAM,mCAAmC,CAAC;AAChG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EACN,sBAAsB,EACtB,kCAAkC,EAClC,MAAM,8CAA8C,CAAC;AAUtD;;;GAGG;AACH,eAAO,MAAM,iDAAiD;oBAG5C,sBAAsB;;0BAEhB,GAAG;;;mCAGK,iBAAiB,KAAK,QAAQ,WAAW,CAAC;MAEvE,2CAuBF,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.createContainerRuntimeFactoryWithDefaultDataStore = void 0;
|
|
8
|
-
const
|
|
8
|
+
const internal_1 = require("@fluidframework/aqueduct/internal");
|
|
9
9
|
const getDefaultFluidObject = async (runtime) => {
|
|
10
10
|
const entryPoint = await runtime.getAliasedDataStoreEntryPoint("default");
|
|
11
11
|
if (entryPoint === undefined) {
|
|
@@ -17,7 +17,7 @@ const getDefaultFluidObject = async (runtime) => {
|
|
|
17
17
|
* ! Note: This function is purely needed for back-compat as the constructor argument structure was changed
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
|
-
const createContainerRuntimeFactoryWithDefaultDataStore = (Base =
|
|
20
|
+
const createContainerRuntimeFactoryWithDefaultDataStore = (Base = internal_1.ContainerRuntimeFactoryWithDefaultDataStore, ctorArgs) => {
|
|
21
21
|
try {
|
|
22
22
|
return new Base(ctorArgs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"testContainerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,gEAAgG;AAUhG,MAAM,qBAAqB,GAAG,KAAK,EAAE,OAA0B,EAAE,EAAE;IAClE,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;IAC1E,IAAI,UAAU,KAAK,SAAS,EAAE;QAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KAChD;IACD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC,CAAC;AAEF;;;GAGG;AACI,MAAM,iDAAiD,GAAG,CAChE,OAA2D,sDAA2C,EACtG,QAOC,EAC6C,EAAE;IAChD,IAAI;QACH,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC1B;IAAC,OAAO,GAAG,EAAE;QACb,qJAAqJ;QACrJ,MAAM,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,iBAAiB,GACjB,GAAG,QAAQ,CAAC;QACb,+DAA+D;QAC/D,OAAO,IAAK,IAAY,CACvB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,iBAAiB,IAAI,qBAAqB,CAC1C,CAAC;KACF;AACF,CAAC,CAAC;AAjCW,QAAA,iDAAiD,qDAiC5D","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ContainerRuntimeFactoryWithDefaultDataStore } from \"@fluidframework/aqueduct/internal\";\nimport { IContainerRuntimeOptions } from \"@fluidframework/container-runtime/internal\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { RuntimeRequestHandler } from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nconst getDefaultFluidObject = async (runtime: IContainerRuntime) => {\n\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\tif (entryPoint === undefined) {\n\t\tthrow new Error(\"default dataStore must exist\");\n\t}\n\treturn entryPoint.get();\n};\n\n/**\n * ! Note: This function is purely needed for back-compat as the constructor argument structure was changed\n * @internal\n */\nexport const createContainerRuntimeFactoryWithDefaultDataStore = (\n\tBase: typeof ContainerRuntimeFactoryWithDefaultDataStore = ContainerRuntimeFactoryWithDefaultDataStore,\n\tctorArgs: {\n\t\tdefaultFactory: IFluidDataStoreFactory;\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t\tdependencyContainer?: any;\n\t\trequestHandlers?: RuntimeRequestHandler[];\n\t\truntimeOptions?: IContainerRuntimeOptions;\n\t\tprovideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\t},\n): ContainerRuntimeFactoryWithDefaultDataStore => {\n\ttry {\n\t\treturn new Base(ctorArgs);\n\t} catch (err) {\n\t\t// IMPORTANT: The constructor argument structure changed, so this is needed for dynamically using older ContainerRuntimeFactoryWithDefaultDataStore's\n\t\tconst {\n\t\t\tdefaultFactory,\n\t\t\tregistryEntries,\n\t\t\tdependencyContainer,\n\t\t\trequestHandlers,\n\t\t\truntimeOptions,\n\t\t\tprovideEntryPoint,\n\t\t} = ctorArgs;\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn new (Base as any)(\n\t\t\tdefaultFactory,\n\t\t\tregistryEntries,\n\t\t\tdependencyContainer,\n\t\t\trequestHandlers,\n\t\t\truntimeOptions,\n\t\t\tprovideEntryPoint ?? getDefaultFluidObject,\n\t\t);\n\t}\n};\n"]}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { IFluidHandle, IRequest, IResponse } from "@fluidframework/core-interfaces";
|
|
6
|
-
import { FluidDataStoreRuntime } from "@fluidframework/datastore";
|
|
6
|
+
import { FluidDataStoreRuntime } from "@fluidframework/datastore/internal";
|
|
7
7
|
import { IChannelFactory, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
8
8
|
import { ISharedMap } from "@fluidframework/map";
|
|
9
|
-
import { IFluidDataStoreChannel, IFluidDataStoreContext, IFluidDataStoreFactory } from "@fluidframework/runtime-definitions";
|
|
9
|
+
import { IFluidDataStoreChannel, IFluidDataStoreContext, IFluidDataStoreFactory } from "@fluidframework/runtime-definitions/internal";
|
|
10
10
|
import { ITestFluidObject } from "./interfaces.js";
|
|
11
11
|
/**
|
|
12
12
|
* A test Fluid object that will create a shared object for each key-value pair in the factoryEntries passed to load.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testFluidObject.d.ts","sourceRoot":"","sources":["../src/testFluidObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEpF,OAAO,EACN,qBAAqB,EAGrB,MAAM,
|
|
1
|
+
{"version":3,"file":"testFluidObject.d.ts","sourceRoot":"","sources":["../src/testFluidObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEpF,OAAO,EACN,qBAAqB,EAGrB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAChG,OAAO,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EACN,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;GAKG;AACH,qBAAa,eAAgB,YAAW,gBAAgB;aAyBtC,OAAO,EAAE,sBAAsB;aAC/B,OAAO,EAAE,sBAAsB;aAC/B,OAAO,EAAE,sBAAsB;IAC/C,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IA3BnC,IAAW,gBAAgB,SAE1B;IAED,IAAW,cAAc,SAExB;IAED,IAAW,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAEtC;IAEM,IAAI,EAAG,UAAU,CAAC;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,WAAW,CAA4B;IAE/C;;;;;;OAMG;gBAEc,OAAO,EAAE,sBAAsB,EAC/B,OAAO,EAAE,sBAAsB,EAC/B,OAAO,EAAE,sBAAsB,EAC9B,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC;IAKjE;;;OAGG;IACU,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAehD,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IAM9C,UAAU,CAAC,QAAQ,EAAE,OAAO;CA2BzC;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,CAAC,MAAM,GAAG,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,sBAAuB,YAAW,sBAAsB;IAYnE,OAAO,CAAC,QAAQ,CAAC,cAAc;aACf,IAAI;IAZrB,IAAW,sBAAsB,SAEhC;IAED;;;;;OAKG;gBAEe,cAAc,EAAE,sBAAsB,EACvC,IAAI,SAA2B;IAGnC,oBAAoB,CAChC,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,qBAAqB,CAAC;CAmDjC"}
|
package/dist/testFluidObject.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.TestFluidObjectFactory = exports.TestFluidObject = void 0;
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
|
+
const internal_2 = require("@fluidframework/datastore/internal");
|
|
10
10
|
const map_1 = require("@fluidframework/map");
|
|
11
|
-
const
|
|
11
|
+
const internal_3 = require("@fluidframework/runtime-utils/internal");
|
|
12
12
|
/**
|
|
13
13
|
* A test Fluid object that will create a shared object for each key-value pair in the factoryEntries passed to load.
|
|
14
14
|
* The shared objects can be retrieved by passing the key of the entry to getSharedObject.
|
|
@@ -37,7 +37,7 @@ class TestFluidObject {
|
|
|
37
37
|
this.channel = channel;
|
|
38
38
|
this.context = context;
|
|
39
39
|
this.factoryEntriesMap = factoryEntriesMap;
|
|
40
|
-
this.innerHandle = new
|
|
40
|
+
this.innerHandle = new internal_2.FluidObjectHandle(this, "", runtime.objectsRoutingContext);
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Retrieves a shared object with the given id.
|
|
@@ -58,7 +58,7 @@ class TestFluidObject {
|
|
|
58
58
|
async request(request) {
|
|
59
59
|
return request.url === "" || request.url === "/" || request.url.startsWith("/?")
|
|
60
60
|
? { mimeType: "fluid/object", status: 200, value: this }
|
|
61
|
-
: (0,
|
|
61
|
+
: (0, internal_3.create404Response)(request);
|
|
62
62
|
}
|
|
63
63
|
async initialize(existing) {
|
|
64
64
|
const doInitialization = async () => {
|
|
@@ -141,10 +141,10 @@ class TestFluidObjectFactory {
|
|
|
141
141
|
factoryEntriesMapForObject.set(id, factory);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const runtimeClass = (0,
|
|
144
|
+
const runtimeClass = (0, internal_2.mixinRequestHandler)(async (request, rt) => {
|
|
145
145
|
// The provideEntryPoint callback below always returns FluidDataStoreRuntime, so this cast is safe
|
|
146
146
|
const dataObject = (await rt.entryPoint.get());
|
|
147
|
-
(0,
|
|
147
|
+
(0, internal_1.assert)(dataObject.request !== undefined, "entryPoint should have been initialized by now");
|
|
148
148
|
return dataObject.request(request);
|
|
149
149
|
});
|
|
150
150
|
const runtime = new runtimeClass(context, dataTypes, existing, async () => {
|