@fluidframework/aqueduct 0.58.2001 → 0.59.2000-61729
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +4231 -234
- package/dist/test/types/validateAqueductPrevious.js +45 -0
- package/dist/test/types/validateAqueductPrevious.js.map +1 -0
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.js.map +1 -1
- package/package.json +29 -18
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
use_current_ClassDeclaration_BaseContainerRuntimeFactory(get_old_ClassDeclaration_BaseContainerRuntimeFactory());
|
|
4
|
+
use_old_ClassDeclaration_BaseContainerRuntimeFactory(get_current_ClassDeclaration_BaseContainerRuntimeFactory());
|
|
5
|
+
use_current_ClassDeclaration_BaseContainerService(get_old_ClassDeclaration_BaseContainerService());
|
|
6
|
+
use_old_ClassDeclaration_BaseContainerService(get_current_ClassDeclaration_BaseContainerService());
|
|
7
|
+
use_current_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore(get_old_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore());
|
|
8
|
+
use_old_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore(get_current_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore());
|
|
9
|
+
use_current_TypeAliasDeclaration_ContainerServiceRegistryEntries(get_old_TypeAliasDeclaration_ContainerServiceRegistryEntries());
|
|
10
|
+
use_old_TypeAliasDeclaration_ContainerServiceRegistryEntries(get_current_TypeAliasDeclaration_ContainerServiceRegistryEntries());
|
|
11
|
+
use_current_ClassDeclaration_DataObject(get_old_ClassDeclaration_DataObject());
|
|
12
|
+
use_old_ClassDeclaration_DataObject(get_current_ClassDeclaration_DataObject());
|
|
13
|
+
use_current_ClassDeclaration_DataObjectFactory(get_old_ClassDeclaration_DataObjectFactory());
|
|
14
|
+
use_old_ClassDeclaration_DataObjectFactory(get_current_ClassDeclaration_DataObjectFactory());
|
|
15
|
+
use_current_InterfaceDeclaration_DataObjectTypes(get_old_InterfaceDeclaration_DataObjectTypes());
|
|
16
|
+
use_old_InterfaceDeclaration_DataObjectTypes(get_current_InterfaceDeclaration_DataObjectTypes());
|
|
17
|
+
use_current_FunctionDeclaration_defaultFluidObjectRequestHandler(get_old_FunctionDeclaration_defaultFluidObjectRequestHandler());
|
|
18
|
+
use_old_FunctionDeclaration_defaultFluidObjectRequestHandler(get_current_FunctionDeclaration_defaultFluidObjectRequestHandler());
|
|
19
|
+
use_current_VariableDeclaration_defaultRouteRequestHandler(get_old_VariableDeclaration_defaultRouteRequestHandler());
|
|
20
|
+
use_old_VariableDeclaration_defaultRouteRequestHandler(get_current_VariableDeclaration_defaultRouteRequestHandler());
|
|
21
|
+
use_current_VariableDeclaration_generateContainerServicesRequestHandler(get_old_VariableDeclaration_generateContainerServicesRequestHandler());
|
|
22
|
+
use_old_VariableDeclaration_generateContainerServicesRequestHandler(get_current_VariableDeclaration_generateContainerServicesRequestHandler());
|
|
23
|
+
use_current_FunctionDeclaration_getDefaultObjectFromContainer(get_old_FunctionDeclaration_getDefaultObjectFromContainer());
|
|
24
|
+
use_old_FunctionDeclaration_getDefaultObjectFromContainer(get_current_FunctionDeclaration_getDefaultObjectFromContainer());
|
|
25
|
+
use_current_FunctionDeclaration_getObjectFromContainer(get_old_FunctionDeclaration_getObjectFromContainer());
|
|
26
|
+
use_old_FunctionDeclaration_getObjectFromContainer(get_current_FunctionDeclaration_getObjectFromContainer());
|
|
27
|
+
use_current_FunctionDeclaration_getObjectWithIdFromContainer(get_old_FunctionDeclaration_getObjectWithIdFromContainer());
|
|
28
|
+
use_old_FunctionDeclaration_getObjectWithIdFromContainer(get_current_FunctionDeclaration_getObjectWithIdFromContainer());
|
|
29
|
+
use_current_InterfaceDeclaration_IDataObjectProps(get_old_InterfaceDeclaration_IDataObjectProps());
|
|
30
|
+
use_old_InterfaceDeclaration_IDataObjectProps(
|
|
31
|
+
// @ts-expect-error compatibility expected to be broken
|
|
32
|
+
get_current_InterfaceDeclaration_IDataObjectProps());
|
|
33
|
+
use_current_InterfaceDeclaration_IRootDataObjectFactory(get_old_InterfaceDeclaration_IRootDataObjectFactory());
|
|
34
|
+
use_old_InterfaceDeclaration_IRootDataObjectFactory(get_current_InterfaceDeclaration_IRootDataObjectFactory());
|
|
35
|
+
use_current_VariableDeclaration_mountableViewRequestHandler(get_old_VariableDeclaration_mountableViewRequestHandler());
|
|
36
|
+
use_old_VariableDeclaration_mountableViewRequestHandler(get_current_VariableDeclaration_mountableViewRequestHandler());
|
|
37
|
+
use_current_ClassDeclaration_PureDataObject(get_old_ClassDeclaration_PureDataObject());
|
|
38
|
+
use_old_ClassDeclaration_PureDataObject(get_current_ClassDeclaration_PureDataObject());
|
|
39
|
+
use_current_ClassDeclaration_PureDataObjectFactory(get_old_ClassDeclaration_PureDataObjectFactory());
|
|
40
|
+
use_old_ClassDeclaration_PureDataObjectFactory(get_current_ClassDeclaration_PureDataObjectFactory());
|
|
41
|
+
use_current_VariableDeclaration_serviceRoutePathRoot(get_old_VariableDeclaration_serviceRoutePathRoot());
|
|
42
|
+
use_old_VariableDeclaration_serviceRoutePathRoot(get_current_VariableDeclaration_serviceRoutePathRoot());
|
|
43
|
+
use_current_FunctionDeclaration_waitForAttach(get_old_FunctionDeclaration_waitForAttach());
|
|
44
|
+
use_old_FunctionDeclaration_waitForAttach(get_current_FunctionDeclaration_waitForAttach());
|
|
45
|
+
//# sourceMappingURL=validateAqueductPrevious.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateAqueductPrevious.js","sourceRoot":"","sources":["../../../src/test/types/validateAqueductPrevious.ts"],"names":[],"mappings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CACpD,4DAA4D,EAAE,CAAC,CAAC;AAWpE,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C;AACzC,uDAAuD;AACvD,iDAAiD,EAAE,CAAC,CAAC;AAWzD,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAW/D,2DAA2D,CACvD,uDAAuD,EAAE,CAAC,CAAC;AAW/D,uDAAuD,CACnD,2DAA2D,EAAE,CAAC,CAAC;AAWnE,2CAA2C,CACvC,uCAAuC,EAAE,CAAC,CAAC;AAW/C,uCAAuC,CACnC,2CAA2C,EAAE,CAAC,CAAC;AAWnD,kDAAkD,CAC9C,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC;AAW1D,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,6CAA6C,CACzC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,yCAAyC,CACrC,6CAA6C,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-validator in @fluidframework/build-tools.\n */\n/* eslint-disable max-lines */\nimport * as old from \"@fluidframework/aqueduct-previous\";\nimport * as current from \"../../index\";\n\ntype TypeOnly<T> = {\n [P in keyof T]: TypeOnly<T[P]>;\n};\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_BaseContainerRuntimeFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_BaseContainerRuntimeFactory():\n TypeOnly<old.BaseContainerRuntimeFactory>;\ndeclare function use_current_ClassDeclaration_BaseContainerRuntimeFactory(\n use: TypeOnly<current.BaseContainerRuntimeFactory>);\nuse_current_ClassDeclaration_BaseContainerRuntimeFactory(\n get_old_ClassDeclaration_BaseContainerRuntimeFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_BaseContainerRuntimeFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_BaseContainerRuntimeFactory():\n TypeOnly<current.BaseContainerRuntimeFactory>;\ndeclare function use_old_ClassDeclaration_BaseContainerRuntimeFactory(\n use: TypeOnly<old.BaseContainerRuntimeFactory>);\nuse_old_ClassDeclaration_BaseContainerRuntimeFactory(\n get_current_ClassDeclaration_BaseContainerRuntimeFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_BaseContainerService\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_BaseContainerService():\n TypeOnly<old.BaseContainerService>;\ndeclare function use_current_ClassDeclaration_BaseContainerService(\n use: TypeOnly<current.BaseContainerService>);\nuse_current_ClassDeclaration_BaseContainerService(\n get_old_ClassDeclaration_BaseContainerService());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_BaseContainerService\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_BaseContainerService():\n TypeOnly<current.BaseContainerService>;\ndeclare function use_old_ClassDeclaration_BaseContainerService(\n use: TypeOnly<old.BaseContainerService>);\nuse_old_ClassDeclaration_BaseContainerService(\n get_current_ClassDeclaration_BaseContainerService());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore():\n TypeOnly<old.ContainerRuntimeFactoryWithDefaultDataStore>;\ndeclare function use_current_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore(\n use: TypeOnly<current.ContainerRuntimeFactoryWithDefaultDataStore>);\nuse_current_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore(\n get_old_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore():\n TypeOnly<current.ContainerRuntimeFactoryWithDefaultDataStore>;\ndeclare function use_old_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore(\n use: TypeOnly<old.ContainerRuntimeFactoryWithDefaultDataStore>);\nuse_old_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore(\n get_current_ClassDeclaration_ContainerRuntimeFactoryWithDefaultDataStore());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_ContainerServiceRegistryEntries\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_ContainerServiceRegistryEntries():\n TypeOnly<old.ContainerServiceRegistryEntries>;\ndeclare function use_current_TypeAliasDeclaration_ContainerServiceRegistryEntries(\n use: TypeOnly<current.ContainerServiceRegistryEntries>);\nuse_current_TypeAliasDeclaration_ContainerServiceRegistryEntries(\n get_old_TypeAliasDeclaration_ContainerServiceRegistryEntries());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"TypeAliasDeclaration_ContainerServiceRegistryEntries\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_ContainerServiceRegistryEntries():\n TypeOnly<current.ContainerServiceRegistryEntries>;\ndeclare function use_old_TypeAliasDeclaration_ContainerServiceRegistryEntries(\n use: TypeOnly<old.ContainerServiceRegistryEntries>);\nuse_old_TypeAliasDeclaration_ContainerServiceRegistryEntries(\n get_current_TypeAliasDeclaration_ContainerServiceRegistryEntries());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_DataObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_DataObject():\n TypeOnly<old.DataObject>;\ndeclare function use_current_ClassDeclaration_DataObject(\n use: TypeOnly<current.DataObject>);\nuse_current_ClassDeclaration_DataObject(\n get_old_ClassDeclaration_DataObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_DataObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_DataObject():\n TypeOnly<current.DataObject>;\ndeclare function use_old_ClassDeclaration_DataObject(\n use: TypeOnly<old.DataObject>);\nuse_old_ClassDeclaration_DataObject(\n get_current_ClassDeclaration_DataObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_DataObjectFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_DataObjectFactory():\n TypeOnly<old.DataObjectFactory<any,any>>;\ndeclare function use_current_ClassDeclaration_DataObjectFactory(\n use: TypeOnly<current.DataObjectFactory<any,any>>);\nuse_current_ClassDeclaration_DataObjectFactory(\n get_old_ClassDeclaration_DataObjectFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_DataObjectFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_DataObjectFactory():\n TypeOnly<current.DataObjectFactory<any,any>>;\ndeclare function use_old_ClassDeclaration_DataObjectFactory(\n use: TypeOnly<old.DataObjectFactory<any,any>>);\nuse_old_ClassDeclaration_DataObjectFactory(\n get_current_ClassDeclaration_DataObjectFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_DataObjectTypes\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_DataObjectTypes():\n TypeOnly<old.DataObjectTypes>;\ndeclare function use_current_InterfaceDeclaration_DataObjectTypes(\n use: TypeOnly<current.DataObjectTypes>);\nuse_current_InterfaceDeclaration_DataObjectTypes(\n get_old_InterfaceDeclaration_DataObjectTypes());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_DataObjectTypes\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_DataObjectTypes():\n TypeOnly<current.DataObjectTypes>;\ndeclare function use_old_InterfaceDeclaration_DataObjectTypes(\n use: TypeOnly<old.DataObjectTypes>);\nuse_old_InterfaceDeclaration_DataObjectTypes(\n get_current_InterfaceDeclaration_DataObjectTypes());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_defaultFluidObjectRequestHandler\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_defaultFluidObjectRequestHandler():\n TypeOnly<typeof old.defaultFluidObjectRequestHandler>;\ndeclare function use_current_FunctionDeclaration_defaultFluidObjectRequestHandler(\n use: TypeOnly<typeof current.defaultFluidObjectRequestHandler>);\nuse_current_FunctionDeclaration_defaultFluidObjectRequestHandler(\n get_old_FunctionDeclaration_defaultFluidObjectRequestHandler());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_defaultFluidObjectRequestHandler\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_defaultFluidObjectRequestHandler():\n TypeOnly<typeof current.defaultFluidObjectRequestHandler>;\ndeclare function use_old_FunctionDeclaration_defaultFluidObjectRequestHandler(\n use: TypeOnly<typeof old.defaultFluidObjectRequestHandler>);\nuse_old_FunctionDeclaration_defaultFluidObjectRequestHandler(\n get_current_FunctionDeclaration_defaultFluidObjectRequestHandler());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_defaultRouteRequestHandler\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_defaultRouteRequestHandler():\n TypeOnly<typeof old.defaultRouteRequestHandler>;\ndeclare function use_current_VariableDeclaration_defaultRouteRequestHandler(\n use: TypeOnly<typeof current.defaultRouteRequestHandler>);\nuse_current_VariableDeclaration_defaultRouteRequestHandler(\n get_old_VariableDeclaration_defaultRouteRequestHandler());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_defaultRouteRequestHandler\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_defaultRouteRequestHandler():\n TypeOnly<typeof current.defaultRouteRequestHandler>;\ndeclare function use_old_VariableDeclaration_defaultRouteRequestHandler(\n use: TypeOnly<typeof old.defaultRouteRequestHandler>);\nuse_old_VariableDeclaration_defaultRouteRequestHandler(\n get_current_VariableDeclaration_defaultRouteRequestHandler());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_generateContainerServicesRequestHandler\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_generateContainerServicesRequestHandler():\n TypeOnly<typeof old.generateContainerServicesRequestHandler>;\ndeclare function use_current_VariableDeclaration_generateContainerServicesRequestHandler(\n use: TypeOnly<typeof current.generateContainerServicesRequestHandler>);\nuse_current_VariableDeclaration_generateContainerServicesRequestHandler(\n get_old_VariableDeclaration_generateContainerServicesRequestHandler());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_generateContainerServicesRequestHandler\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_generateContainerServicesRequestHandler():\n TypeOnly<typeof current.generateContainerServicesRequestHandler>;\ndeclare function use_old_VariableDeclaration_generateContainerServicesRequestHandler(\n use: TypeOnly<typeof old.generateContainerServicesRequestHandler>);\nuse_old_VariableDeclaration_generateContainerServicesRequestHandler(\n get_current_VariableDeclaration_generateContainerServicesRequestHandler());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_getDefaultObjectFromContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_getDefaultObjectFromContainer():\n TypeOnly<typeof old.getDefaultObjectFromContainer>;\ndeclare function use_current_FunctionDeclaration_getDefaultObjectFromContainer(\n use: TypeOnly<typeof current.getDefaultObjectFromContainer>);\nuse_current_FunctionDeclaration_getDefaultObjectFromContainer(\n get_old_FunctionDeclaration_getDefaultObjectFromContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_getDefaultObjectFromContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_getDefaultObjectFromContainer():\n TypeOnly<typeof current.getDefaultObjectFromContainer>;\ndeclare function use_old_FunctionDeclaration_getDefaultObjectFromContainer(\n use: TypeOnly<typeof old.getDefaultObjectFromContainer>);\nuse_old_FunctionDeclaration_getDefaultObjectFromContainer(\n get_current_FunctionDeclaration_getDefaultObjectFromContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_getObjectFromContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_getObjectFromContainer():\n TypeOnly<typeof old.getObjectFromContainer>;\ndeclare function use_current_FunctionDeclaration_getObjectFromContainer(\n use: TypeOnly<typeof current.getObjectFromContainer>);\nuse_current_FunctionDeclaration_getObjectFromContainer(\n get_old_FunctionDeclaration_getObjectFromContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_getObjectFromContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_getObjectFromContainer():\n TypeOnly<typeof current.getObjectFromContainer>;\ndeclare function use_old_FunctionDeclaration_getObjectFromContainer(\n use: TypeOnly<typeof old.getObjectFromContainer>);\nuse_old_FunctionDeclaration_getObjectFromContainer(\n get_current_FunctionDeclaration_getObjectFromContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_getObjectWithIdFromContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_getObjectWithIdFromContainer():\n TypeOnly<typeof old.getObjectWithIdFromContainer>;\ndeclare function use_current_FunctionDeclaration_getObjectWithIdFromContainer(\n use: TypeOnly<typeof current.getObjectWithIdFromContainer>);\nuse_current_FunctionDeclaration_getObjectWithIdFromContainer(\n get_old_FunctionDeclaration_getObjectWithIdFromContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_getObjectWithIdFromContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_getObjectWithIdFromContainer():\n TypeOnly<typeof current.getObjectWithIdFromContainer>;\ndeclare function use_old_FunctionDeclaration_getObjectWithIdFromContainer(\n use: TypeOnly<typeof old.getObjectWithIdFromContainer>);\nuse_old_FunctionDeclaration_getObjectWithIdFromContainer(\n get_current_FunctionDeclaration_getObjectWithIdFromContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IDataObjectProps\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IDataObjectProps():\n TypeOnly<old.IDataObjectProps>;\ndeclare function use_current_InterfaceDeclaration_IDataObjectProps(\n use: TypeOnly<current.IDataObjectProps>);\nuse_current_InterfaceDeclaration_IDataObjectProps(\n get_old_InterfaceDeclaration_IDataObjectProps());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IDataObjectProps\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IDataObjectProps():\n TypeOnly<current.IDataObjectProps>;\ndeclare function use_old_InterfaceDeclaration_IDataObjectProps(\n use: TypeOnly<old.IDataObjectProps>);\nuse_old_InterfaceDeclaration_IDataObjectProps(\n // @ts-expect-error compatibility expected to be broken\n get_current_InterfaceDeclaration_IDataObjectProps());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IRootDataObjectFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IRootDataObjectFactory():\n TypeOnly<old.IRootDataObjectFactory>;\ndeclare function use_current_InterfaceDeclaration_IRootDataObjectFactory(\n use: TypeOnly<current.IRootDataObjectFactory>);\nuse_current_InterfaceDeclaration_IRootDataObjectFactory(\n get_old_InterfaceDeclaration_IRootDataObjectFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"InterfaceDeclaration_IRootDataObjectFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IRootDataObjectFactory():\n TypeOnly<current.IRootDataObjectFactory>;\ndeclare function use_old_InterfaceDeclaration_IRootDataObjectFactory(\n use: TypeOnly<old.IRootDataObjectFactory>);\nuse_old_InterfaceDeclaration_IRootDataObjectFactory(\n get_current_InterfaceDeclaration_IRootDataObjectFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_mountableViewRequestHandler\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_mountableViewRequestHandler():\n TypeOnly<typeof old.mountableViewRequestHandler>;\ndeclare function use_current_VariableDeclaration_mountableViewRequestHandler(\n use: TypeOnly<typeof current.mountableViewRequestHandler>);\nuse_current_VariableDeclaration_mountableViewRequestHandler(\n get_old_VariableDeclaration_mountableViewRequestHandler());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_mountableViewRequestHandler\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_mountableViewRequestHandler():\n TypeOnly<typeof current.mountableViewRequestHandler>;\ndeclare function use_old_VariableDeclaration_mountableViewRequestHandler(\n use: TypeOnly<typeof old.mountableViewRequestHandler>);\nuse_old_VariableDeclaration_mountableViewRequestHandler(\n get_current_VariableDeclaration_mountableViewRequestHandler());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_PureDataObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_PureDataObject():\n TypeOnly<old.PureDataObject>;\ndeclare function use_current_ClassDeclaration_PureDataObject(\n use: TypeOnly<current.PureDataObject>);\nuse_current_ClassDeclaration_PureDataObject(\n get_old_ClassDeclaration_PureDataObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_PureDataObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_PureDataObject():\n TypeOnly<current.PureDataObject>;\ndeclare function use_old_ClassDeclaration_PureDataObject(\n use: TypeOnly<old.PureDataObject>);\nuse_old_ClassDeclaration_PureDataObject(\n get_current_ClassDeclaration_PureDataObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_PureDataObjectFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_PureDataObjectFactory():\n TypeOnly<old.PureDataObjectFactory<any,any>>;\ndeclare function use_current_ClassDeclaration_PureDataObjectFactory(\n use: TypeOnly<current.PureDataObjectFactory<any,any>>);\nuse_current_ClassDeclaration_PureDataObjectFactory(\n get_old_ClassDeclaration_PureDataObjectFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"ClassDeclaration_PureDataObjectFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_PureDataObjectFactory():\n TypeOnly<current.PureDataObjectFactory<any,any>>;\ndeclare function use_old_ClassDeclaration_PureDataObjectFactory(\n use: TypeOnly<old.PureDataObjectFactory<any,any>>);\nuse_old_ClassDeclaration_PureDataObjectFactory(\n get_current_ClassDeclaration_PureDataObjectFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_serviceRoutePathRoot\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_serviceRoutePathRoot():\n TypeOnly<typeof old.serviceRoutePathRoot>;\ndeclare function use_current_VariableDeclaration_serviceRoutePathRoot(\n use: TypeOnly<typeof current.serviceRoutePathRoot>);\nuse_current_VariableDeclaration_serviceRoutePathRoot(\n get_old_VariableDeclaration_serviceRoutePathRoot());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"VariableDeclaration_serviceRoutePathRoot\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_serviceRoutePathRoot():\n TypeOnly<typeof current.serviceRoutePathRoot>;\ndeclare function use_old_VariableDeclaration_serviceRoutePathRoot(\n use: TypeOnly<typeof old.serviceRoutePathRoot>);\nuse_old_VariableDeclaration_serviceRoutePathRoot(\n get_current_VariableDeclaration_serviceRoutePathRoot());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_waitForAttach\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_waitForAttach():\n TypeOnly<typeof old.waitForAttach>;\ndeclare function use_current_FunctionDeclaration_waitForAttach(\n use: TypeOnly<typeof current.waitForAttach>);\nuse_current_FunctionDeclaration_waitForAttach(\n get_old_FunctionDeclaration_waitForAttach());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken.0.58.2002:\n* \"FunctionDeclaration_waitForAttach\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_waitForAttach():\n TypeOnly<typeof current.waitForAttach>;\ndeclare function use_old_FunctionDeclaration_waitForAttach(\n use: TypeOnly<typeof old.waitForAttach>);\nuse_old_FunctionDeclaration_waitForAttach(\n get_current_FunctionDeclaration_waitForAttach());\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEH,sBAAsB,EACtB,gBAAgB,GACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACH,iBAAiB,GACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAEH,0BAA0B,GAC7B,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACH,mBAAmB,GAGtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE;;;;GAIG;AACH,MAAM,OAAO,2BACT,SAAQ,oBAAoB;IAK5B;;;;;OAKG;IACH,YACqB,eAAmD,EACnD,mBAAiD,EACjD,kBAA2C,EAAE,EAC7C,cAAyC;QAE1D,KAAK,EAAE,CAAC;QALS,oBAAe,GAAf,eAAe,CAAoC;QACnD,wBAAmB,GAAnB,mBAAmB,CAA8B;QACjD,oBAAe,GAAf,eAAe,CAA8B;QAC7C,mBAAc,GAAd,cAAc,CAA2B;QAG1D,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,eAAe,CAAC,CAAC;IAChE,CAAC;IAjBD,IAAW,uBAAuB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAmBvD,KAAK,CAAC,oBAAoB,CAAC,OAAyB;QACvD,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAyB;QAC1D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAEM,KAAK,CAAC,aAAa,CACtB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEH,sBAAsB,EACtB,gBAAgB,GACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACH,iBAAiB,GACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAEH,0BAA0B,GAC7B,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACH,mBAAmB,GAGtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE;;;;GAIG;AACH,MAAM,OAAO,2BACT,SAAQ,oBAAoB;IAK5B;;;;;OAKG;IACH,YACqB,eAAmD,EACnD,mBAAiD,EACjD,k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0B,IAAI,CAAC;IAE9E;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAI,CAAC;CAC1E","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n IContainerRuntimeOptions,\n FluidDataStoreRegistry,\n ContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport {\n IContainerRuntime,\n} from \"@fluidframework/container-runtime-definitions\";\nimport {\n RuntimeRequestHandler,\n buildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler\";\nimport {\n IFluidDataStoreRegistry,\n IProvideFluidDataStoreRegistry,\n NamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n DependencyContainer,\n IFluidDependencySynthesizer,\n IProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with a given data store and service registry, as well as\n * given request handlers. It can be subclassed to implement a first-time initialization procedure for the containers\n * it creates.\n */\nexport class BaseContainerRuntimeFactory\n extends RuntimeFactoryHelper\n implements IProvideFluidDataStoreRegistry {\n public get IFluidDataStoreRegistry() { return this.registry; }\n private readonly registry: IFluidDataStoreRegistry;\n\n /**\n * @param registryEntries - The data store registry for containers produced\n * @param serviceRegistry - The service registry for containers produced\n * @param requestHandlers - Request handlers for containers produced\n * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it\n */\n constructor(\n private readonly registryEntries: NamedFluidDataStoreRegistryEntries,\n private readonly dependencyContainer?: IFluidDependencySynthesizer,\n private readonly requestHandlers: RuntimeRequestHandler[] = [],\n private readonly runtimeOptions?: IContainerRuntimeOptions,\n ) {\n super();\n this.registry = new FluidDataStoreRegistry(registryEntries);\n }\n\n public async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n await this.containerInitializingFirstTime(runtime);\n await this.containerHasInitialized(runtime);\n }\n\n public async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n await this.containerHasInitialized(runtime);\n }\n\n public async preInitialize(\n context: IContainerContext,\n existing: boolean,\n ): Promise<ContainerRuntime> {\n const scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n const dc = new DependencyContainer<FluidObject<IContainerRuntime>>(\n this.dependencyContainer, scope.IFluidDependencySynthesizer);\n scope.IFluidDependencySynthesizer = dc;\n\n const runtime: ContainerRuntime = await ContainerRuntime.load(\n context,\n this.registryEntries,\n buildRuntimeRequestHandler(\n ...this.requestHandlers),\n this.runtimeOptions,\n scope,\n existing,\n );\n\n // we register the runtime so developers of providers can use it in the factory pattern.\n dc.register(IContainerRuntime, runtime);\n\n return runtime;\n }\n\n /**\n * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n * @param runtime - The container runtime for the container being initialized\n */\n protected async containerInitializingFirstTime(runtime: IContainerRuntime) { }\n\n /**\n * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n * This likely includes loading any data stores that are expected to be there at the outset.\n * @param runtime - The container runtime for the container being initialized\n */\n protected async containerHasInitialized(runtime: IContainerRuntime) { }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pureDataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,qBAAqB,EAErB,mBAAmB,GACrB,MAAM,2BAA2B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAa3E,OAAO,EAEH,mBAAmB,GAEtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAEH,cAAc,GAEjB,MAAM,iBAAiB,CAAC;AAUzB;;;EAGE;AACF,KAAK,UAAU,gB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CAAC,iBAAiB,EACtB,IAAI,CAAC,YAAY,EACjB,KAAK,EAAE,WAAW;QAClB,YAAY,CAAC,CAAC;QAElB,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IFluidRouter, FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n FluidDataStoreRuntime,\n ISharedObjectRegistry,\n mixinRequestHandler,\n } from \"@fluidframework/datastore\";\nimport { FluidDataStoreRegistry } from \"@fluidframework/container-runtime\";\nimport {\n IFluidDataStoreContext,\n IContainerRuntimeBase,\n IFluidDataStoreFactory,\n IFluidDataStoreRegistry,\n IProvideFluidDataStoreRegistry,\n NamedFluidDataStoreRegistryEntries,\n NamedFluidDataStoreRegistryEntry,\n IFluidDataStoreContextDetached,\n} from \"@fluidframework/runtime-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IChannelFactory } from \"@fluidframework/datastore-definitions\";\nimport {\n FluidObjectSymbolProvider,\n DependencyContainer,\n IFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\n\nimport {\n IDataObjectProps,\n PureDataObject,\n DataObjectTypes,\n} from \"../data-objects\";\n/*\n * Useful interface in places where it's useful to do type erasure for PureDataObject generic\n */\nexport interface IRootDataObjectFactory extends IFluidDataStoreFactory {\n createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime): Promise<IFluidRouter>;\n}\n\n/**\n * Proxy over PureDataObject\n * Does delayed creation & initialization of PureDataObject\n*/\nasync function createDataObject<TObj extends PureDataObject,I extends DataObjectTypes = DataObjectTypes>(\n ctor: new (props: IDataObjectProps<I>) => TObj,\n context: IFluidDataStoreContext,\n sharedObjectRegistry: ISharedObjectRegistry,\n optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n runtimeClassArg: typeof FluidDataStoreRuntime,\n existing: boolean,\n initProps?: I[\"InitialState\"])\n{\n // base\n let runtimeClass = runtimeClassArg;\n\n // request mixin in\n runtimeClass = mixinRequestHandler(\n async (request: IRequest, runtimeArg: FluidDataStoreRuntime) =>\n (await PureDataObject.getDataObject(runtimeArg)).request(request),\n runtimeClass);\n\n // Create a new runtime for our data store\n // The runtime is what Fluid uses to create DDS' and route to your data store\n const runtime = new runtimeClass(\n context,\n sharedObjectRegistry,\n existing,\n );\n\n // Create object right away.\n // This allows object to register various callbacks with runtime before runtime\n // becomes globally available. But it's not full initialization - constructor can't\n // access DDSs or other services of runtime as objects are not fully initialized.\n // In order to use object, we need to go through full initialization by calling finishInitialization().\n const scope = context.scope as FluidObject<IFluidDependencySynthesizer>;\n const dependencyContainer = new DependencyContainer(scope.IFluidDependencySynthesizer);\n const providers = dependencyContainer.synthesize<I[\"OptionalProviders\"]>(optionalProviders, {});\n const instance = new ctor({ runtime, context, providers, initProps });\n\n // if it's a newly created object, we need to wait for it to finish initialization\n // as that results in creation of DDSs, before it gets attached, providing atomic\n // guarantee of creation.\n // WARNING: we can't do the same (yet) for already existing PureDataObject!\n // This will result in deadlock, as it tries to resolve internal handles, but any\n // handle resolution goes through root (container runtime), which can't route it back\n // to this data store, as it's still not initialized and not known to container runtime yet.\n // In the future, we should address it by using relative paths for handles and be able to resolve\n // local DDSs while data store is not fully initialized.\n if (!existing) {\n await instance.finishInitialization(existing);\n }\n\n return { instance, runtime };\n}\n\n/**\n * PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.\n * Consumers should typically use DataObjectFactory instead unless creating\n * another base data store factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n */\nexport class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes>\n implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry>, IRootDataObjectFactory\n{\n private readonly sharedObjectRegistry: ISharedObjectRegistry;\n private readonly registry: IFluidDataStoreRegistry | undefined;\n\n constructor(\n public readonly type: string,\n private readonly ctor: new (props: IDataObjectProps<I>) => TObj,\n sharedObjects: readonly IChannelFactory[],\n private readonly optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n registryEntries?: NamedFluidDataStoreRegistryEntries,\n private readonly runtimeClass: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n ) {\n if (this.type === \"\") {\n throw new Error(\"undefined type member\");\n }\n if (registryEntries !== undefined) {\n this.registry = new FluidDataStoreRegistry(registryEntries);\n }\n this.sharedObjectRegistry = new Map(sharedObjects.map((ext) => [ext.type, ext]));\n }\n\n public get IFluidDataStoreFactory() { return this; }\n\n public get IFluidDataStoreRegistry() {\n return this.registry;\n }\n\n /**\n * Convenience helper to get the data store's/factory's data store registry entry.\n * The return type hides the factory's generics, easing grouping of registry\n * entries that differ only in this way into the same array.\n * @returns The NamedFluidDataStoreRegistryEntry\n */\n public get registryEntry(): NamedFluidDataStoreRegistryEntry {\n return [this.type, Promise.resolve(this)];\n }\n\n /**\n * This is where we do data store setup.\n *\n * @param context - data store context used to load a data store runtime\n */\n public async instantiateDataStore(context: IFluidDataStoreContext, existing: boolean) {\n const { runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n existing);\n\n return runtime;\n }\n\n /**\n * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.\n * In other words, registry of context passed in has to contain this factory, with the name that matches\n * this factory's type.\n * It is intended to be used by data store objects that create sub-objects.\n * @param context - The context being used to create the runtime\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created data store.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createChildInstance(\n parentContext: IFluidDataStoreContext,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n parentContext.containerRuntime,\n [...parentContext.packagePath, this.type],\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.\n * In other words, registry of context passed in has to have this factory.\n * Intended to be used by data store objects that need to create peers (similar) instances of existing objects.\n * @param context - The component context being used to create the object\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createPeerInstance(\n peerContext: IFluidDataStoreContext,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n peerContext.containerRuntime,\n peerContext.packagePath,\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createInstance(\n runtime: IContainerRuntimeBase,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n runtime,\n [this.type],\n initialState);\n }\n\n /**\n * Creates a new root instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const context = runtime.createDetachedRootDataStore([this.type], rootDataStoreId);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createNonRootInstanceCore(\n containerRuntime: IContainerRuntimeBase,\n packagePath: Readonly<string[]>,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const context = containerRuntime.createDetachedDataStore(packagePath);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createInstanceCore(\n context: IFluidDataStoreContextDetached,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const { instance, runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n false, // existing\n initialState);\n\n await context.attachRuntime(this, runtime);\n\n return instance;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pureDataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,qBAAqB,EAErB,mBAAmB,GACrB,MAAM,2BAA2B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAa3E,OAAO,EAEH,mBAAmB,GAEtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAEH,cAAc,GAEjB,MAAM,iBAAiB,CAAC;AAUzB;;;EAGE;AACF,KAAK,UAAU,gBAAgB,CAC3B,IAA8C,EAC9C,OAA+B,EAC/B,oBAA2C,EAC3C,iBAAoE,EACpE,eAA6C,EAC7C,QAAiB,EACjB,SAA6B;IAE7B,OAAO;IACP,IAAI,YAAY,GAAG,eAAe,CAAC;IAEnC,mBAAmB;IACnB,YAAY,GAAG,mBAAmB,CAC9B,KAAK,EAAE,OAAiB,EAAE,UAAiC,EAAE,EAAE,CAC3D,CAAC,MAAM,cAAc,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EACjE,YAAY,CAAC,CAAC;IAEtB,0CAA0C;IAC1C,6EAA6E;IAC7E,MAAM,OAAO,GAAG,IAAI,YAAY,CAC5B,OAAO,EACP,oBAAoB,EACpB,QAAQ,CACX,CAAC;IAEF,4BAA4B;IAC5B,+EAA+E;IAC/E,mFAAmF;IACn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;IACtB,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,kBAAkB,CAC3B,eAAuB,EACvB,OAA0B,EAC1B,YAAgC;QAEhC,MAAM,OAAO,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC;QAClF,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC1D,CAAC;IAES,KAAK,CAAC,yBAAyB,CACrC,gBAAuC,EACvC,WAA+B,EAC/B,YAAgC;QAEhC,MAAM,OAAO,GAAG,gBAAgB,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC1D,CAAC;IAES,KAAK,CAAC,kBAAkB,CAC9B,OAAuC,EACvC,YAAgC;QAEhC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,gBAAgB,CAChD,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,iBAAiB,EACtB,IAAI,CAAC,YAAY,EACjB,KAAK,EAAE,WAAW;QAClB,YAAY,CAAC,CAAC;QAElB,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IFluidRouter, FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n FluidDataStoreRuntime,\n ISharedObjectRegistry,\n mixinRequestHandler,\n } from \"@fluidframework/datastore\";\nimport { FluidDataStoreRegistry } from \"@fluidframework/container-runtime\";\nimport {\n IFluidDataStoreContext,\n IContainerRuntimeBase,\n IFluidDataStoreFactory,\n IFluidDataStoreRegistry,\n IProvideFluidDataStoreRegistry,\n NamedFluidDataStoreRegistryEntries,\n NamedFluidDataStoreRegistryEntry,\n IFluidDataStoreContextDetached,\n} from \"@fluidframework/runtime-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IChannelFactory } from \"@fluidframework/datastore-definitions\";\nimport {\n FluidObjectSymbolProvider,\n DependencyContainer,\n IFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\n\nimport {\n IDataObjectProps,\n PureDataObject,\n DataObjectTypes,\n} from \"../data-objects\";\n/*\n * Useful interface in places where it's useful to do type erasure for PureDataObject generic\n */\nexport interface IRootDataObjectFactory extends IFluidDataStoreFactory {\n createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime): Promise<IFluidRouter>;\n}\n\n/**\n * Proxy over PureDataObject\n * Does delayed creation & initialization of PureDataObject\n*/\nasync function createDataObject<TObj extends PureDataObject,I extends DataObjectTypes = DataObjectTypes>(\n ctor: new (props: IDataObjectProps<I>) => TObj,\n context: IFluidDataStoreContext,\n sharedObjectRegistry: ISharedObjectRegistry,\n optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n runtimeClassArg: typeof FluidDataStoreRuntime,\n existing: boolean,\n initProps?: I[\"InitialState\"])\n{\n // base\n let runtimeClass = runtimeClassArg;\n\n // request mixin in\n runtimeClass = mixinRequestHandler(\n async (request: IRequest, runtimeArg: FluidDataStoreRuntime) =>\n (await PureDataObject.getDataObject(runtimeArg)).request(request),\n runtimeClass);\n\n // Create a new runtime for our data store\n // The runtime is what Fluid uses to create DDS' and route to your data store\n const runtime = new runtimeClass(\n context,\n sharedObjectRegistry,\n existing,\n );\n\n // Create object right away.\n // This allows object to register various callbacks with runtime before runtime\n // becomes globally available. But it's not full initialization - constructor can't\n // access DDSs or other services of runtime as objects are not fully initialized.\n // In order to use object, we need to go through full initialization by calling finishInitialization().\n const scope: FluidObject<IFluidDependencySynthesizer> = context.scope;\n const dependencyContainer = new DependencyContainer(scope.IFluidDependencySynthesizer);\n const providers = dependencyContainer.synthesize<I[\"OptionalProviders\"]>(optionalProviders, {});\n const instance = new ctor({ runtime, context, providers, initProps });\n\n // if it's a newly created object, we need to wait for it to finish initialization\n // as that results in creation of DDSs, before it gets attached, providing atomic\n // guarantee of creation.\n // WARNING: we can't do the same (yet) for already existing PureDataObject!\n // This will result in deadlock, as it tries to resolve internal handles, but any\n // handle resolution goes through root (container runtime), which can't route it back\n // to this data store, as it's still not initialized and not known to container runtime yet.\n // In the future, we should address it by using relative paths for handles and be able to resolve\n // local DDSs while data store is not fully initialized.\n if (!existing) {\n await instance.finishInitialization(existing);\n }\n\n return { instance, runtime };\n}\n\n/**\n * PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.\n * Consumers should typically use DataObjectFactory instead unless creating\n * another base data store factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n */\nexport class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes>\n implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry>, IRootDataObjectFactory\n{\n private readonly sharedObjectRegistry: ISharedObjectRegistry;\n private readonly registry: IFluidDataStoreRegistry | undefined;\n\n constructor(\n public readonly type: string,\n private readonly ctor: new (props: IDataObjectProps<I>) => TObj,\n sharedObjects: readonly IChannelFactory[],\n private readonly optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n registryEntries?: NamedFluidDataStoreRegistryEntries,\n private readonly runtimeClass: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n ) {\n if (this.type === \"\") {\n throw new Error(\"undefined type member\");\n }\n if (registryEntries !== undefined) {\n this.registry = new FluidDataStoreRegistry(registryEntries);\n }\n this.sharedObjectRegistry = new Map(sharedObjects.map((ext) => [ext.type, ext]));\n }\n\n public get IFluidDataStoreFactory() { return this; }\n\n public get IFluidDataStoreRegistry() {\n return this.registry;\n }\n\n /**\n * Convenience helper to get the data store's/factory's data store registry entry.\n * The return type hides the factory's generics, easing grouping of registry\n * entries that differ only in this way into the same array.\n * @returns The NamedFluidDataStoreRegistryEntry\n */\n public get registryEntry(): NamedFluidDataStoreRegistryEntry {\n return [this.type, Promise.resolve(this)];\n }\n\n /**\n * This is where we do data store setup.\n *\n * @param context - data store context used to load a data store runtime\n */\n public async instantiateDataStore(context: IFluidDataStoreContext, existing: boolean) {\n const { runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n existing);\n\n return runtime;\n }\n\n /**\n * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.\n * In other words, registry of context passed in has to contain this factory, with the name that matches\n * this factory's type.\n * It is intended to be used by data store objects that create sub-objects.\n * @param context - The context being used to create the runtime\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created data store.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createChildInstance(\n parentContext: IFluidDataStoreContext,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n parentContext.containerRuntime,\n [...parentContext.packagePath, this.type],\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.\n * In other words, registry of context passed in has to have this factory.\n * Intended to be used by data store objects that need to create peers (similar) instances of existing objects.\n * @param context - The component context being used to create the object\n * (the created object will have its own new context created as well)\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createPeerInstance(\n peerContext: IFluidDataStoreContext,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n peerContext.containerRuntime,\n peerContext.packagePath,\n initialState);\n }\n\n /**\n * Creates a new instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createInstance(\n runtime: IContainerRuntimeBase,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n return this.createNonRootInstanceCore(\n runtime,\n [this.type],\n initialState);\n }\n\n /**\n * Creates a new root instance of the object. Uses container's registry to find this factory.\n * It's expected that only container owners would use this functionality, as only such developers\n * have knowledge of entries in container registry.\n * The name in this registry for such record should match type of this factory.\n * @param runtime - container runtime. It's registry is used to create an object.\n * @param initialState - The initial state to provide to the created component.\n * @returns an object created by this factory. Data store and objects created are not attached to container.\n * They get attached only when a handle to one of them is attached to already attached objects.\n */\n public async createRootInstance(\n rootDataStoreId: string,\n runtime: IContainerRuntime,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const context = runtime.createDetachedRootDataStore([this.type], rootDataStoreId);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createNonRootInstanceCore(\n containerRuntime: IContainerRuntimeBase,\n packagePath: Readonly<string[]>,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const context = containerRuntime.createDetachedDataStore(packagePath);\n return this.createInstanceCore(context, initialState);\n }\n\n protected async createInstanceCore(\n context: IFluidDataStoreContextDetached,\n initialState?: I[\"InitialState\"],\n ): Promise<TObj> {\n const { instance, runtime } = await createDataObject(\n this.ctor,\n context,\n this.sharedObjectRegistry,\n this.optionalProviders,\n this.runtimeClass,\n false, // existing\n initialState);\n\n await context.attachRuntime(this, runtime);\n\n return instance;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/aqueduct",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.2000-61729",
|
|
4
4
|
"description": "A set of implementations for Fluid Framework interfaces.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lint:fix": "npm run eslint:fix",
|
|
36
36
|
"test": "npm run test:mocha",
|
|
37
37
|
"test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml",
|
|
38
|
-
"test:mocha": "mocha --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
|
|
38
|
+
"test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
|
|
39
39
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
40
40
|
"tsc": "tsc",
|
|
41
41
|
"tsfmt": "tsfmt --verify",
|
|
@@ -64,25 +64,26 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
66
66
|
"@fluidframework/common-utils": "^0.32.1",
|
|
67
|
-
"@fluidframework/container-definitions": "^0.
|
|
68
|
-
"@fluidframework/container-loader": "
|
|
69
|
-
"@fluidframework/container-runtime": "
|
|
70
|
-
"@fluidframework/container-runtime-definitions": "
|
|
71
|
-
"@fluidframework/core-interfaces": "^0.
|
|
72
|
-
"@fluidframework/datastore": "
|
|
73
|
-
"@fluidframework/datastore-definitions": "
|
|
74
|
-
"@fluidframework/map": "
|
|
75
|
-
"@fluidframework/request-handler": "
|
|
76
|
-
"@fluidframework/runtime-definitions": "
|
|
77
|
-
"@fluidframework/runtime-utils": "
|
|
78
|
-
"@fluidframework/synthesize": "
|
|
79
|
-
"@fluidframework/view-interfaces": "
|
|
67
|
+
"@fluidframework/container-definitions": "^0.48.1000-0",
|
|
68
|
+
"@fluidframework/container-loader": "0.59.2000-61729",
|
|
69
|
+
"@fluidframework/container-runtime": "0.59.2000-61729",
|
|
70
|
+
"@fluidframework/container-runtime-definitions": "0.59.2000-61729",
|
|
71
|
+
"@fluidframework/core-interfaces": "^0.43.1000-0",
|
|
72
|
+
"@fluidframework/datastore": "0.59.2000-61729",
|
|
73
|
+
"@fluidframework/datastore-definitions": "0.59.2000-61729",
|
|
74
|
+
"@fluidframework/map": "0.59.2000-61729",
|
|
75
|
+
"@fluidframework/request-handler": "0.59.2000-61729",
|
|
76
|
+
"@fluidframework/runtime-definitions": "0.59.2000-61729",
|
|
77
|
+
"@fluidframework/runtime-utils": "0.59.2000-61729",
|
|
78
|
+
"@fluidframework/synthesize": "0.59.2000-61729",
|
|
79
|
+
"@fluidframework/view-interfaces": "0.59.2000-61729",
|
|
80
80
|
"uuid": "^8.3.1"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
+
"@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@^0.58.0",
|
|
83
84
|
"@fluidframework/build-common": "^0.23.0",
|
|
84
|
-
"@fluidframework/eslint-config-fluid": "^0.
|
|
85
|
-
"@fluidframework/mocha-test-setup": "
|
|
85
|
+
"@fluidframework/eslint-config-fluid": "^0.28.1000-61189",
|
|
86
|
+
"@fluidframework/mocha-test-setup": "0.59.2000-61729",
|
|
86
87
|
"@microsoft/api-extractor": "^7.16.1",
|
|
87
88
|
"@rushstack/eslint-config": "^2.5.1",
|
|
88
89
|
"@types/mocha": "^8.2.2",
|
|
@@ -105,5 +106,15 @@
|
|
|
105
106
|
"typescript": "~4.1.3",
|
|
106
107
|
"typescript-formatter": "7.1.0"
|
|
107
108
|
},
|
|
108
|
-
"module:es5": "es5/index.js"
|
|
109
|
+
"module:es5": "es5/index.js",
|
|
110
|
+
"typeValidation": {
|
|
111
|
+
"version": "0.59.1000",
|
|
112
|
+
"broken": {
|
|
113
|
+
"0.58.2002": {
|
|
114
|
+
"InterfaceDeclaration_IDataObjectProps": {
|
|
115
|
+
"backCompat": false
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
109
120
|
}
|