@fluidframework/aqueduct 2.0.0-internal.3.2.1 → 2.0.0-internal.3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +9 -5
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.js +17 -6
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +2 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +2 -2
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
- package/dist/container-services/containerServices.d.ts +17 -0
- package/dist/container-services/containerServices.d.ts.map +1 -1
- package/dist/container-services/containerServices.js +14 -0
- package/dist/container-services/containerServices.js.map +1 -1
- package/dist/data-objects/pureDataObject.d.ts +1 -0
- package/dist/data-objects/pureDataObject.d.ts.map +1 -1
- package/dist/data-objects/pureDataObject.js +1 -0
- package/dist/data-objects/pureDataObject.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/dist/test/types/validateAqueductPrevious.generated.js +8 -8
- package/dist/test/types/validateAqueductPrevious.generated.js.map +1 -1
- package/dist/utils/attachUtils.d.ts +3 -0
- package/dist/utils/attachUtils.d.ts.map +1 -1
- package/dist/utils/attachUtils.js +3 -0
- package/dist/utils/attachUtils.js.map +1 -1
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.js +17 -6
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +2 -2
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
- package/lib/container-services/containerServices.js +14 -0
- package/lib/container-services/containerServices.js.map +1 -1
- package/lib/data-objects/pureDataObject.js +1 -0
- package/lib/data-objects/pureDataObject.js.map +1 -1
- package/lib/utils/attachUtils.js +3 -0
- package/lib/utils/attachUtils.js.map +1 -1
- package/package.json +19 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateAqueductPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateAqueductPrevious.generated.ts"],"names":[],"mappings":";;AAwBA,wDAAwD,CACpD,oDAAoD,EAAE,CAAC,CAAC;AAW5D,oDAAoD,CAChD,wDAAwD,EAAE,CAAC,CAAC;AAWhE,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,iDAAiD,EAAE,CAAC,CAAC;AAWzD,wEAAwE,CACpE,oEAAoE,EAAE,CAAC,CAAC;AAW5E,oEAAoE,CAChE,wEAAwE,EAAE,CAAC,CAAC;AAWhF,gEAAgE,CAC5D,4DAA4D,EAAE,CAAC,CAAC;AAWpE,4DAA4D,CACxD,gEAAgE,EAAE,CAAC,CAAC;AAWxE,uCAAuC,CACnC,mCAAmC,EAAE,CAAC,CAAC;AAW3C,mCAAmC,CAC/B,uCAAuC,EAAE,CAAC,CAAC;AAW/C,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gEAAgE,CAC5D,4DAA4D,EAAE,CAAC,CAAC;AAWpE,4DAA4D,CACxD,gEAAgE,EAAE,CAAC,CAAC;AAWxE,0DAA0D,CACtD,sDAAsD,EAAE,CAAC,CAAC;AAW9D,sDAAsD,CAClD,0DAA0D,EAAE,CAAC,CAAC;AAWlE,uEAAuE,CACnE,mEAAmE,EAAE,CAAC,CAAC;AAW3E,mEAAmE,CAC/D,uEAAuE,EAAE,CAAC,CAAC;AAW/E,6DAA6D,CACzD,yDAAyD,EAAE,CAAC,CAAC;AAWjE,yDAAyD,CACrD,6DAA6D,EAAE,CAAC,CAAC;AAWrE,sDAAsD,CAClD,kDAAkD,EAAE,CAAC,CAAC;AAW1D,kDAAkD,CAC9C,sDAAsD,EAAE,CAAC,CAAC;AAW9D,4DAA4D,CACxD,wDAAwD,EAAE,CAAC,CAAC;AAWhE,wDAAwD,CACpD,4DAA4D,EAAE,CAAC,CAAC;AAWpE,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,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 */\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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 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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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
|
+
{"version":3,"file":"validateAqueductPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateAqueductPrevious.generated.ts"],"names":[],"mappings":";;AAwBA,wDAAwD,CACpD,oDAAoD,EAAE,CAAC,CAAC;AAW5D,oDAAoD,CAChD,wDAAwD,EAAE,CAAC,CAAC;AAWhE,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,iDAAiD,EAAE,CAAC,CAAC;AAWzD,wEAAwE,CACpE,oEAAoE,EAAE,CAAC,CAAC;AAW5E,oEAAoE,CAChE,wEAAwE,EAAE,CAAC,CAAC;AAWhF,gEAAgE,CAC5D,4DAA4D,EAAE,CAAC,CAAC;AAWpE,4DAA4D,CACxD,gEAAgE,EAAE,CAAC,CAAC;AAWxE,uCAAuC,CACnC,mCAAmC,EAAE,CAAC,CAAC;AAW3C,mCAAmC,CAC/B,uCAAuC,EAAE,CAAC,CAAC;AAW/C,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A2D,EAAE,CAAC,CAAC;AAWnE,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-test-generator in @fluidframework/build-tools.\n */\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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 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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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:\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"]}
|
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated 2.0.0-internal.3.3.0 Prefer not to inspect and react to the attach state unless necessary. If needed, instead inspect the IFluidDataStoreRuntime's attachState property, and await the "attached" event if not attached.
|
|
8
|
+
*/
|
|
6
9
|
export declare function waitForAttach(dataStoreRuntime: IFluidDataStoreRuntime): Promise<void>;
|
|
7
10
|
//# sourceMappingURL=attachUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachUtils.d.ts","sourceRoot":"","sources":["../../src/utils/attachUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAY3F"}
|
|
1
|
+
{"version":3,"file":"attachUtils.d.ts","sourceRoot":"","sources":["../../src/utils/attachUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAG/E;;GAEG;AACH,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAY3F"}
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.waitForAttach = void 0;
|
|
8
8
|
const container_definitions_1 = require("@fluidframework/container-definitions");
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated 2.0.0-internal.3.3.0 Prefer not to inspect and react to the attach state unless necessary. If needed, instead inspect the IFluidDataStoreRuntime's attachState property, and await the "attached" event if not attached.
|
|
11
|
+
*/
|
|
9
12
|
async function waitForAttach(dataStoreRuntime) {
|
|
10
13
|
if (dataStoreRuntime.attachState === container_definitions_1.AttachState.Attached) {
|
|
11
14
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachUtils.js","sourceRoot":"","sources":["../../src/utils/attachUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,iFAAoE;
|
|
1
|
+
{"version":3,"file":"attachUtils.js","sourceRoot":"","sources":["../../src/utils/attachUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,iFAAoE;AAEpE;;GAEG;AACI,KAAK,UAAU,aAAa,CAAC,gBAAwC;IAC3E,IAAI,gBAAgB,CAAC,WAAW,KAAK,mCAAW,CAAC,QAAQ,EAAE;QAC1D,OAAO;KACP;IAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;YACtC,OAAO,CAAC,OAAO,EAAE;iBACf,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;iBACrB,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AAZD,sCAYC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\n\n/**\n * @deprecated 2.0.0-internal.3.3.0 Prefer not to inspect and react to the attach state unless necessary. If needed, instead inspect the IFluidDataStoreRuntime's attachState property, and await the \"attached\" event if not attached.\n */\nexport async function waitForAttach(dataStoreRuntime: IFluidDataStoreRuntime): Promise<void> {\n\tif (dataStoreRuntime.attachState === AttachState.Attached) {\n\t\treturn;\n\t}\n\n\treturn new Promise((resolve) => {\n\t\tdataStoreRuntime.once(\"attached\", () => {\n\t\t\tPromise.resolve()\n\t\t\t\t.then(() => resolve())\n\t\t\t\t.catch(() => {});\n\t\t});\n\t});\n}\n"]}
|
|
@@ -8,23 +8,26 @@ import { buildRuntimeRequestHandler } from "@fluidframework/request-handler";
|
|
|
8
8
|
import { DependencyContainer, } from "@fluidframework/synthesize";
|
|
9
9
|
import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
|
|
10
10
|
/**
|
|
11
|
-
* BaseContainerRuntimeFactory produces container runtimes with
|
|
12
|
-
*
|
|
13
|
-
* it creates.
|
|
11
|
+
* BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
|
|
12
|
+
* request handlers, runtimeOptions, and entryPoint initialization function.
|
|
13
|
+
* It can be subclassed to implement a first-time initialization procedure for the containers it creates.
|
|
14
14
|
*/
|
|
15
15
|
export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
|
|
16
16
|
/**
|
|
17
17
|
* @param registryEntries - The data store registry for containers produced
|
|
18
|
-
* @param
|
|
18
|
+
* @param dependencyContainer -
|
|
19
19
|
* @param requestHandlers - Request handlers for containers produced
|
|
20
20
|
* @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
|
|
21
|
+
* @param initializeEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
22
|
+
* created with this factory
|
|
21
23
|
*/
|
|
22
|
-
constructor(registryEntries, dependencyContainer, requestHandlers = [], runtimeOptions) {
|
|
24
|
+
constructor(registryEntries, dependencyContainer, requestHandlers = [], runtimeOptions, initializeEntryPoint) {
|
|
23
25
|
super();
|
|
24
26
|
this.registryEntries = registryEntries;
|
|
25
27
|
this.dependencyContainer = dependencyContainer;
|
|
26
28
|
this.requestHandlers = requestHandlers;
|
|
27
29
|
this.runtimeOptions = runtimeOptions;
|
|
30
|
+
this.initializeEntryPoint = initializeEntryPoint;
|
|
28
31
|
this.registry = new FluidDataStoreRegistry(registryEntries);
|
|
29
32
|
}
|
|
30
33
|
get IFluidDataStoreRegistry() {
|
|
@@ -41,7 +44,15 @@ export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
|
|
|
41
44
|
const scope = context.scope;
|
|
42
45
|
const dc = new DependencyContainer(this.dependencyContainer, scope.IFluidDependencySynthesizer);
|
|
43
46
|
scope.IFluidDependencySynthesizer = dc;
|
|
44
|
-
const runtime = await ContainerRuntime.
|
|
47
|
+
const runtime = await ContainerRuntime.loadRuntime({
|
|
48
|
+
context,
|
|
49
|
+
requestHandler: buildRuntimeRequestHandler(...this.requestHandlers),
|
|
50
|
+
existing,
|
|
51
|
+
runtimeOptions: this.runtimeOptions,
|
|
52
|
+
registryEntries: this.registryEntries,
|
|
53
|
+
containerScope: scope,
|
|
54
|
+
initializeEntryPoint: this.initializeEntryPoint,
|
|
55
|
+
});
|
|
45
56
|
// we register the runtime so developers of providers can use it in the factory pattern.
|
|
46
57
|
dc.register(IContainerRuntime, runtime);
|
|
47
58
|
return runtime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAyB,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAMpG,OAAO,EACN,mBAAmB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE;;;;GAIG;AACH,MAAM,OAAO,2BACZ,SAAQ,oBAAoB;IAQ5B
|
|
1
|
+
{"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAyB,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAMpG,OAAO,EACN,mBAAmB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,O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ACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAC/C,CAAC,CAAC;QAEH,wFAAwF;QACxF,EAAE,CAAC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAExC,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAG,CAAC;IAE7E;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAG,CAAC;CACtE","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\tIContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler, buildRuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\tIFluidDependencySynthesizer,\n\tIProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\t/**\n\t * @param registryEntries - The data store registry for containers produced\n\t * @param dependencyContainer -\n\t * @param requestHandlers - Request handlers for containers produced\n\t * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it\n\t * @param initializeEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tconstructor(\n\t\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries,\n\t\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer,\n\t\tprivate readonly requestHandlers: RuntimeRequestHandler[] = [],\n\t\tprivate readonly runtimeOptions?: IContainerRuntimeOptions,\n\t\tprivate readonly initializeEntryPoint?: (\n\t\t\truntime: IContainerRuntime,\n\t\t) => Promise<FluidObject>,\n\t) {\n\t\tsuper();\n\t\tthis.registry = new FluidDataStoreRegistry(registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tconst dc = new DependencyContainer<FluidObject<IContainerRuntime>>(\n\t\t\tthis.dependencyContainer,\n\t\t\tscope.IFluidDependencySynthesizer,\n\t\t);\n\t\tscope.IFluidDependencySynthesizer = dc;\n\n\t\tconst runtime: ContainerRuntime = await ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\tinitializeEntryPoint: this.initializeEntryPoint,\n\t\t});\n\n\t\t// we register the runtime so developers of providers can use it in the factory pattern.\n\t\tdc.register(IContainerRuntime, runtime);\n\n\t\treturn runtime;\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime) {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime) {}\n}\n"]}
|
|
@@ -12,8 +12,8 @@ const defaultDataStoreId = "default";
|
|
|
12
12
|
* This factory should be exposed as fluidExport off the entry point to your module.
|
|
13
13
|
*/
|
|
14
14
|
export class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
15
|
-
constructor(defaultFactory, registryEntries, dependencyContainer, requestHandlers = [], runtimeOptions) {
|
|
16
|
-
super(registryEntries, dependencyContainer, [defaultRouteRequestHandler(defaultDataStoreId), ...requestHandlers], runtimeOptions);
|
|
15
|
+
constructor(defaultFactory, registryEntries, dependencyContainer, requestHandlers = [], runtimeOptions, initializeEntryPoint) {
|
|
16
|
+
super(registryEntries, dependencyContainer, [defaultRouteRequestHandler(defaultDataStoreId), ...requestHandlers], runtimeOptions, initializeEntryPoint);
|
|
17
17
|
this.defaultFactory = defaultFactory;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../../src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"containerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../../src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC;;;;;GAKG;AACH,MAAM,OAAO,2CAA4C,SAAQ,2BAA2B;IAG3F,YACoB,cAAsC,EACzD,eAAmD,EACnD,mBAAiD,EACjD,kBAA2C,EAAE,EAC7C,cAAyC,EACzC,oBAA2E;QAE3E,KAAK,CACJ,eAAe,EACf,mBAAmB,EACnB,CAAC,0BAA0B,CAAC,kBAAkB,CAAC,EAAE,GAAG,eAAe,CAAC,EACpE,cAAc,EACd,oBAAoB,CACpB,CAAC;QAbiB,mBAAc,GAAd,cAAc,CAAwB;IAc1D,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B;QACxE,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1E,MAAM,SAAS,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;;AAzBsB,8DAAkB,GAAG,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerRuntimeOptions } from \"@fluidframework/container-runtime\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IFluidDependencySynthesizer } from \"@fluidframework/synthesize\";\nimport { RuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { defaultRouteRequestHandler } from \"../request-handlers\";\nimport { BaseContainerRuntimeFactory } from \"./baseContainerRuntimeFactory\";\n\nconst defaultDataStoreId = \"default\";\n\n/**\n * A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from\n * the container with an empty URL.\n *\n * This factory should be exposed as fluidExport off the entry point to your module.\n */\nexport class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {\n\tpublic static readonly defaultDataStoreId = defaultDataStoreId;\n\n\tconstructor(\n\t\tprotected readonly defaultFactory: IFluidDataStoreFactory,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\tdependencyContainer?: IFluidDependencySynthesizer,\n\t\trequestHandlers: RuntimeRequestHandler[] = [],\n\t\truntimeOptions?: IContainerRuntimeOptions,\n\t\tinitializeEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>,\n\t) {\n\t\tsuper(\n\t\t\tregistryEntries,\n\t\t\tdependencyContainer,\n\t\t\t[defaultRouteRequestHandler(defaultDataStoreId), ...requestHandlers],\n\t\t\truntimeOptions,\n\t\t\tinitializeEntryPoint,\n\t\t);\n\t}\n\n\t/**\n\t * {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime) {\n\t\tconst dataStore = await runtime.createDataStore(this.defaultFactory.type);\n\t\tawait dataStore.trySetAlias(defaultDataStoreId);\n\t}\n}\n"]}
|
|
@@ -4,17 +4,30 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { create404Response, createResponseError, } from "@fluidframework/runtime-utils";
|
|
6
6
|
// TODO: should this just be "s"?
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated See {@link @fluidframework/synthesize#DependencyContainer}
|
|
9
|
+
*/
|
|
7
10
|
export const serviceRoutePathRoot = "_services";
|
|
8
11
|
/**
|
|
9
12
|
* This class is a simple starter class for building a Container Service. It simply provides routing
|
|
13
|
+
* @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class
|
|
10
14
|
*/
|
|
11
15
|
export class BaseContainerService {
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class
|
|
18
|
+
*/
|
|
12
19
|
constructor(runtime) {
|
|
13
20
|
this.runtime = runtime;
|
|
14
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class
|
|
24
|
+
*/
|
|
15
25
|
get IFluidRouter() {
|
|
16
26
|
return this;
|
|
17
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class
|
|
30
|
+
*/
|
|
18
31
|
async request(request) {
|
|
19
32
|
return {
|
|
20
33
|
status: 200,
|
|
@@ -40,6 +53,7 @@ class SingletonContainerServiceFactory {
|
|
|
40
53
|
/**
|
|
41
54
|
* Given a collection of IContainerServices will produce a RequestHandler for them all
|
|
42
55
|
* @param serviceRegistry - Collection of Container Services
|
|
56
|
+
* @deprecated See {@link @fluidframework/synthesize#DependencyContainer}
|
|
43
57
|
*/
|
|
44
58
|
export const generateContainerServicesRequestHandler = (serviceRegistry) => {
|
|
45
59
|
const factories = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerServices.js","sourceRoot":"","sources":["../../src/container-services/containerServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEN,iBAAiB,EACjB,mBAAmB,GACnB,MAAM,+BAA+B,CAAC;AAEvC,iCAAiC;AACjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"containerServices.js","sourceRoot":"","sources":["../../src/container-services/containerServices.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEN,iBAAiB,EACjB,mBAAmB,GACnB,MAAM,+BAA+B,CAAC;AAEvC,iCAAiC;AACjC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;AAShD;;;GAGG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B,CACzB,GAAG,EACH,+CAA+C,EAC/C,OAAO,CACP,CAAC;SACF;QAED,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,EAAE;YACb,gDAAgD;YAChD,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;SAClC;QAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;QACpC,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAC/C,IAAI,MAAM,EAAE;YACX,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;SAClC;QAED,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACvB,qFAAqF;YACrF,OAAO,mBAAmB,CACzB,GAAG,EACH,0DAA0D,EAC1D,OAAO,CACP,CAAC;SACF;QAED,4CAA4C;QAC5C,OAAO;YACN,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,OAAO;SACd,CAAC;IACH,CAAC,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResponse, IFluidRouter, IRequest, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tRequestParser,\n\tcreate404Response,\n\tcreateResponseError,\n} from \"@fluidframework/runtime-utils\";\n\n// TODO: should this just be \"s\"?\n/**\n * @deprecated See {@link @fluidframework/synthesize#DependencyContainer}\n */\nexport const serviceRoutePathRoot = \"_services\";\n\n/**\n * @deprecated See {@link @fluidframework/synthesize#DependencyContainer}\n */\nexport type ContainerServiceRegistryEntries = Iterable<\n\t[string, (runtime: IContainerRuntime) => Promise<FluidObject>]\n>;\n\n/**\n * This class is a simple starter class for building a Container Service. It simply provides routing\n * @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class\n */\nexport abstract class BaseContainerService implements IFluidRouter {\n\t/**\n\t * @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class\n\t */\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\n\t/**\n\t * @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class\n\t */\n\tconstructor(protected readonly runtime: IContainerRuntime) {}\n\n\t/**\n\t * @deprecated Use {@link @fluidframework/synthesize#DependencyContainer} as a replacement for this class\n\t */\n\tpublic async request(request: IRequest): Promise<IResponse> {\n\t\treturn {\n\t\t\tstatus: 200,\n\t\t\tmimeType: \"fluid/object\",\n\t\t\tvalue: this,\n\t\t};\n\t}\n}\n\n/**\n * ContainerService Factory that will only create one instance of the service for the Container.\n */\nclass SingletonContainerServiceFactory {\n\tprivate service: Promise<FluidObject> | undefined;\n\n\tpublic constructor(\n\t\tprivate readonly serviceFn: (runtime: IContainerRuntime) => Promise<FluidObject>,\n\t) {}\n\n\tpublic async getService(runtime: IContainerRuntime): Promise<FluidObject<IFluidRouter>> {\n\t\tif (!this.service) {\n\t\t\tthis.service = this.serviceFn(runtime);\n\t\t}\n\t\treturn this.service;\n\t}\n}\n\n/**\n * Given a collection of IContainerServices will produce a RequestHandler for them all\n * @param serviceRegistry - Collection of Container Services\n * @deprecated See {@link @fluidframework/synthesize#DependencyContainer}\n */\nexport const generateContainerServicesRequestHandler = (\n\tserviceRegistry: ContainerServiceRegistryEntries,\n): RuntimeRequestHandler => {\n\tconst factories: Map<string, SingletonContainerServiceFactory> = new Map();\n\tnew Map(serviceRegistry).forEach((fn, id) => {\n\t\tfactories.set(id, new SingletonContainerServiceFactory(fn));\n\t});\n\n\treturn async (request: RequestParser, runtime: IContainerRuntime) => {\n\t\tif (request.pathParts[0] !== serviceRoutePathRoot) {\n\t\t\t// If the request is not for a service we return undefined so the next handler can use it\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (request.pathParts.length < 2) {\n\t\t\t// If there is not service to route to then return a failure\n\t\t\treturn createResponseError(\n\t\t\t\t400,\n\t\t\t\t\"request did not specify a service to route to\",\n\t\t\t\trequest,\n\t\t\t);\n\t\t}\n\n\t\tconst factory = factories.get(request.pathParts[1]);\n\t\tif (!factory) {\n\t\t\t// If we can't find a registry entry then return\n\t\t\treturn create404Response(request);\n\t\t}\n\n\t\tconst service = await factory.getService(runtime);\n\t\tconst router = service.IFluidRouter;\n\t\tconst subRequest = request.createSubRequest(2);\n\t\tif (router) {\n\t\t\treturn router.request(subRequest);\n\t\t}\n\n\t\tif (!request.isLeaf(2)) {\n\t\t\t// If there is not terminating route but a sub-route was requested then we will fail.\n\t\t\treturn createResponseError(\n\t\t\t\t400,\n\t\t\t\t\"request sub-url for service that doesn't support routing\",\n\t\t\t\trequest,\n\t\t\t);\n\t\t}\n\n\t\t// Otherwise we will just return the service\n\t\treturn {\n\t\t\tstatus: 200,\n\t\t\tmimeType: \"fluid/object\",\n\t\t\tvalue: service,\n\t\t};\n\t};\n};\n"]}
|
|
@@ -127,6 +127,7 @@ export class PureDataObject extends EventForwarder {
|
|
|
127
127
|
/**
|
|
128
128
|
* Gets the service at a given id.
|
|
129
129
|
* @param id - service id
|
|
130
|
+
* @deprecated See https://github.com/microsoft/FluidFramework/pull/14430 for context
|
|
130
131
|
*/
|
|
131
132
|
async getService(id) {
|
|
132
133
|
return handleFromLegacyUri(`/${serviceRoutePathRoot}/${id}`, this.context.containerRuntime).get();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pureDataObject.js","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA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AAC,SAAS,CACjE,CAAC;SACF;QACD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,2BAA2B,CACvC,GAAW,EACX,SAAqB,EACrB,sBAAwF;QAExF,MAAM,WAAW,GAAG,sBAAsB;YACzC,CAAC,CAAC,sBAAsB,CAAC,GAAG,EAAE,SAAS,CAAC;YACxC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACtB,MAAM,MAAM,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,YAAY,CAAC;QACzC,IAAI,MAAM,EAAE;YACX,+DAA+D;YAC/D,OAAO,MAAM,CAAC,GAAG,EAAE,CAAC;SACpB;IACF,CAAC;IAED;;;OAGG;IACO,KAAK,CAAC,UAAU,CAAwB,EAAU;QAC3D,OAAO,mBAAmB,CACzB,IAAI,oBAAoB,IAAI,EAAE,EAAE,EAChC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAC7B,CAAC,GAAG,EAAE,CAAC;IACT,CAAC;IAED;;;OAGG;IACO,KAAK,CAAC,aAAa,KAAmB,CAAC;IAEjD;;;;;OAKG;IACO,KAAK,CAAC,qBAAqB,CAAC,KAAyB,IAAkB,CAAC;IAElF;;;OAGG;IACO,KAAK,CAAC,wBAAwB,KAAmB,CAAC;IAE5D;;OAEG;IACO,KAAK,CAAC,cAAc,KAAmB,CAAC;IAElD;;OAEG;IACI,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IEvent } from \"@fluidframework/common-definitions\";\nimport { assert, EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIFluidHandle,\n\tIFluidLoadable,\n\tIFluidRouter,\n\tIProvideFluidHandle,\n\tIRequest,\n\tIResponse,\n\tFluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IDirectory } from \"@fluidframework/map\";\nimport { handleFromLegacyUri } from \"@fluidframework/request-handler\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { serviceRoutePathRoot } from \"../container-services\";\nimport { defaultFluidObjectRequestHandler } from \"../request-handlers\";\nimport { DataObjectTypes, IDataObjectProps } from \"./types\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\n * You probably don't want to inherit from this data store directly unless\n * you are creating another base data store class\n *\n * @typeParam I - The optional input types used to strongly type the data object\n */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends EventForwarder<I[\"Events\"] & IEvent>\n\timplements IFluidLoadable, IFluidRouter, IProvideFluidHandle\n{\n\tprivate _disposed = false;\n\n\t/**\n\t * This is your FluidDataStoreRuntime object\n\t */\n\tprotected readonly runtime: IFluidDataStoreRuntime;\n\n\t/**\n\t * This context is used to talk up to the ContainerRuntime\n\t */\n\tprotected readonly context: IFluidDataStoreContext;\n\n\t/**\n\t * Providers are FluidObject keyed objects that provide back\n\t * a promise to the corresponding FluidObject or undefined.\n\t * Providers injected/provided by the Container and/or HostingApplication\n\t *\n\t * To define providers set FluidObject interfaces in the OptionalProviders generic type for your data store\n\t */\n\tprotected readonly providers: AsyncFluidObjectProvider<I[\"OptionalProviders\"]>;\n\n\tprotected initProps?: I[\"InitialState\"];\n\n\tprotected initializeP: Promise<void> | undefined;\n\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\n\tpublic get id() {\n\t\treturn this.runtime.id;\n\t}\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\tpublic get IFluidLoadable() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandle() {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandle<this> {\n\t\t// PureDataObjectFactory already provides an entryPoint initialization function to the data store runtime,\n\t\t// so this object should always have access to a non-null entryPoint. Need to cast because PureDataObject\n\t\t// tried to be too smart with its typing for handles :).\n\t\tassert(this.runtime.entryPoint !== undefined, 0x46b /* EntryPoint was undefined */);\n\t\treturn this.runtime.entryPoint as IFluidHandle<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime) {\n\t\tconst obj = await runtime.entryPoint?.get();\n\t\tassert(obj !== undefined, 0x0bc /* \"The runtime's handle is not initialized yet!\" */);\n\t\treturn obj as PureDataObject;\n\t}\n\n\tpublic constructor(props: IDataObjectProps<I>) {\n\t\tsuper();\n\t\tthis.runtime = props.runtime;\n\t\tthis.context = props.context;\n\t\tthis.providers = props.providers;\n\t\tthis.initProps = props.initProps;\n\n\t\tassert(\n\t\t\t(this.runtime as any)._dataObject === undefined,\n\t\t\t0x0bd /* \"Object runtime already has DataObject!\" */,\n\t\t);\n\t\t(this.runtime as any)._dataObject = this;\n\n\t\t// Container event handlers\n\t\tthis.runtime.once(\"dispose\", () => {\n\t\t\tthis._disposed = true;\n\t\t\tthis.dispose();\n\t\t});\n\t}\n\n\t// #region IFluidRouter\n\n\t/**\n\t * Return this object if someone requests it directly\n\t * We will return this object in two scenarios:\n\t *\n\t * 1. the request url is a \"/\"\n\t *\n\t * 2. the request url is empty\n\t */\n\tpublic async request(req: IRequest): Promise<IResponse> {\n\t\treturn defaultFluidObjectRequestHandler(this, req);\n\t}\n\n\t// #endregion IFluidRouter\n\n\t/**\n\t * Call this API to ensure PureDataObject is fully initialized.\n\t * Initialization happens on demand, only on as-needed bases.\n\t * In most cases you should allow factory/object to decide when to finish initialization.\n\t * But if you are supplying your own implementation of DataStoreRuntime factory and overriding some methods\n\t * and need a fully initialized object, then you can call this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tif (this.initializeP !== undefined) {\n\t\t\treturn this.initializeP;\n\t\t}\n\t\tthis.initializeP = this.initializeInternal(existing);\n\t\treturn this.initializeP;\n\t}\n\n\t/**\n\t * Internal initialize implementation. Overwriting this will change the flow of the PureDataObject and should\n\t * generally not be done.\n\t *\n\t * Calls initializingFirstTime, initializingFromExisting, and hasInitialized. Caller is\n\t * responsible for ensuring this is only invoked once.\n\t */\n\tpublic async initializeInternal(existing: boolean): Promise<void> {\n\t\tawait this.preInitialize();\n\t\tif (existing) {\n\t\t\tassert(\n\t\t\t\tthis.initProps === undefined,\n\t\t\t\t0x0be /* \"Trying to initialize from existing while initProps is set!\" */,\n\t\t\t);\n\t\t\tawait this.initializingFromExisting();\n\t\t} else {\n\t\t\tawait this.initializingFirstTime(\n\t\t\t\t(this.context.createProps as I[\"InitialState\"]) ?? this.initProps,\n\t\t\t);\n\t\t}\n\t\tawait this.hasInitialized();\n\t}\n\n\t/**\n\t * Retrieve Fluid object using the handle get\n\t *\n\t * @param key - key that object (handle/id) is stored with in the directory\n\t * @param directory - directory containing the object\n\t * @param getObjectFromDirectory - optional callback for fetching object from the directory, allows users to\n\t * define custom types/getters for object retrieval\n\t */\n\tpublic async getFluidObjectFromDirectory<T extends IFluidLoadable>(\n\t\tkey: string,\n\t\tdirectory: IDirectory,\n\t\tgetObjectFromDirectory?: (id: string, directory: IDirectory) => IFluidHandle | undefined,\n\t): Promise<T | undefined> {\n\t\tconst handleMaybe = getObjectFromDirectory\n\t\t\t? getObjectFromDirectory(key, directory)\n\t\t\t: directory.get(key);\n\t\tconst handle = handleMaybe?.IFluidHandle;\n\t\tif (handle) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn handle.get();\n\t\t}\n\t}\n\n\t/**\n\t * Gets the service at a given id.\n\t * @param id - service id\n\t */\n\tprotected async getService<T extends FluidObject>(id: string): Promise<T> {\n\t\treturn handleFromLegacyUri<T>(\n\t\t\t`/${serviceRoutePathRoot}/${id}`,\n\t\t\tthis.context.containerRuntime,\n\t\t).get();\n\t}\n\n\t/**\n\t * Called every time the data store is initialized, before initializingFirstTime or\n\t * initializingFromExisting is called.\n\t */\n\tprotected async preInitialize(): Promise<void> {}\n\n\t/**\n\t * Called the first time the data store is initialized (new creations with a new\n\t * data store runtime)\n\t *\n\t * @param props - Optional props to be passed in on create\n\t */\n\tprotected async initializingFirstTime(props?: I[\"InitialState\"]): Promise<void> {}\n\n\t/**\n\t * Called every time but the first time the data store is initialized (creations\n\t * with an existing data store runtime)\n\t */\n\tprotected async initializingFromExisting(): Promise<void> {}\n\n\t/**\n\t * Called every time the data store is initialized after create or existing.\n\t */\n\tprotected async hasInitialized(): Promise<void> {}\n\n\t/**\n\t * Called when the host container closes and disposes itself\n\t */\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pureDataObject.js","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAYtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAGvE;;;;;;GAMG;AACH,MAAM,OAAgB,cACrB,SAAQ,cAAoC;IA8D5C,YAAmB,KAA0B;QAC5C,KAAK,EAAE,CAAC;QA5DD,cAAS,GAAG,KAAK,CAAC;QA6DzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAEjC,MAAM,CACJ,IAAI,CAAC,OAAe,CAAC,WAAW,KAAK,SAAS,EA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EAChC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAC7B,CAAC,GAAG,EAAE,CAAC;IACT,CAAC;IAED;;;OAGG;IACO,KAAK,CAAC,aAAa,KAAmB,CAAC;IAEjD;;;;;OAKG;IACO,KAAK,CAAC,qBAAqB,CAAC,KAAyB,IAAkB,CAAC;IAElF;;;OAGG;IACO,KAAK,CAAC,wBAAwB,KAAmB,CAAC;IAE5D;;OAEG;IACO,KAAK,CAAC,cAAc,KAAmB,CAAC;IAElD;;OAEG;IACI,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IEvent } from \"@fluidframework/common-definitions\";\nimport { assert, EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIFluidHandle,\n\tIFluidLoadable,\n\tIFluidRouter,\n\tIProvideFluidHandle,\n\tIRequest,\n\tIResponse,\n\tFluidObject,\n} from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IDirectory } from \"@fluidframework/map\";\nimport { handleFromLegacyUri } from \"@fluidframework/request-handler\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { serviceRoutePathRoot } from \"../container-services\";\nimport { defaultFluidObjectRequestHandler } from \"../request-handlers\";\nimport { DataObjectTypes, IDataObjectProps } from \"./types\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\n * You probably don't want to inherit from this data store directly unless\n * you are creating another base data store class\n *\n * @typeParam I - The optional input types used to strongly type the data object\n */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends EventForwarder<I[\"Events\"] & IEvent>\n\timplements IFluidLoadable, IFluidRouter, IProvideFluidHandle\n{\n\tprivate _disposed = false;\n\n\t/**\n\t * This is your FluidDataStoreRuntime object\n\t */\n\tprotected readonly runtime: IFluidDataStoreRuntime;\n\n\t/**\n\t * This context is used to talk up to the ContainerRuntime\n\t */\n\tprotected readonly context: IFluidDataStoreContext;\n\n\t/**\n\t * Providers are FluidObject keyed objects that provide back\n\t * a promise to the corresponding FluidObject or undefined.\n\t * Providers injected/provided by the Container and/or HostingApplication\n\t *\n\t * To define providers set FluidObject interfaces in the OptionalProviders generic type for your data store\n\t */\n\tprotected readonly providers: AsyncFluidObjectProvider<I[\"OptionalProviders\"]>;\n\n\tprotected initProps?: I[\"InitialState\"];\n\n\tprotected initializeP: Promise<void> | undefined;\n\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\n\tpublic get id() {\n\t\treturn this.runtime.id;\n\t}\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\tpublic get IFluidLoadable() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandle() {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandle<this> {\n\t\t// PureDataObjectFactory already provides an entryPoint initialization function to the data store runtime,\n\t\t// so this object should always have access to a non-null entryPoint. Need to cast because PureDataObject\n\t\t// tried to be too smart with its typing for handles :).\n\t\tassert(this.runtime.entryPoint !== undefined, 0x46b /* EntryPoint was undefined */);\n\t\treturn this.runtime.entryPoint as IFluidHandle<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime) {\n\t\tconst obj = await runtime.entryPoint?.get();\n\t\tassert(obj !== undefined, 0x0bc /* \"The runtime's handle is not initialized yet!\" */);\n\t\treturn obj as PureDataObject;\n\t}\n\n\tpublic constructor(props: IDataObjectProps<I>) {\n\t\tsuper();\n\t\tthis.runtime = props.runtime;\n\t\tthis.context = props.context;\n\t\tthis.providers = props.providers;\n\t\tthis.initProps = props.initProps;\n\n\t\tassert(\n\t\t\t(this.runtime as any)._dataObject === undefined,\n\t\t\t0x0bd /* \"Object runtime already has DataObject!\" */,\n\t\t);\n\t\t(this.runtime as any)._dataObject = this;\n\n\t\t// Container event handlers\n\t\tthis.runtime.once(\"dispose\", () => {\n\t\t\tthis._disposed = true;\n\t\t\tthis.dispose();\n\t\t});\n\t}\n\n\t// #region IFluidRouter\n\n\t/**\n\t * Return this object if someone requests it directly\n\t * We will return this object in two scenarios:\n\t *\n\t * 1. the request url is a \"/\"\n\t *\n\t * 2. the request url is empty\n\t */\n\tpublic async request(req: IRequest): Promise<IResponse> {\n\t\treturn defaultFluidObjectRequestHandler(this, req);\n\t}\n\n\t// #endregion IFluidRouter\n\n\t/**\n\t * Call this API to ensure PureDataObject is fully initialized.\n\t * Initialization happens on demand, only on as-needed bases.\n\t * In most cases you should allow factory/object to decide when to finish initialization.\n\t * But if you are supplying your own implementation of DataStoreRuntime factory and overriding some methods\n\t * and need a fully initialized object, then you can call this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tif (this.initializeP !== undefined) {\n\t\t\treturn this.initializeP;\n\t\t}\n\t\tthis.initializeP = this.initializeInternal(existing);\n\t\treturn this.initializeP;\n\t}\n\n\t/**\n\t * Internal initialize implementation. Overwriting this will change the flow of the PureDataObject and should\n\t * generally not be done.\n\t *\n\t * Calls initializingFirstTime, initializingFromExisting, and hasInitialized. Caller is\n\t * responsible for ensuring this is only invoked once.\n\t */\n\tpublic async initializeInternal(existing: boolean): Promise<void> {\n\t\tawait this.preInitialize();\n\t\tif (existing) {\n\t\t\tassert(\n\t\t\t\tthis.initProps === undefined,\n\t\t\t\t0x0be /* \"Trying to initialize from existing while initProps is set!\" */,\n\t\t\t);\n\t\t\tawait this.initializingFromExisting();\n\t\t} else {\n\t\t\tawait this.initializingFirstTime(\n\t\t\t\t(this.context.createProps as I[\"InitialState\"]) ?? this.initProps,\n\t\t\t);\n\t\t}\n\t\tawait this.hasInitialized();\n\t}\n\n\t/**\n\t * Retrieve Fluid object using the handle get\n\t *\n\t * @param key - key that object (handle/id) is stored with in the directory\n\t * @param directory - directory containing the object\n\t * @param getObjectFromDirectory - optional callback for fetching object from the directory, allows users to\n\t * define custom types/getters for object retrieval\n\t */\n\tpublic async getFluidObjectFromDirectory<T extends IFluidLoadable>(\n\t\tkey: string,\n\t\tdirectory: IDirectory,\n\t\tgetObjectFromDirectory?: (id: string, directory: IDirectory) => IFluidHandle | undefined,\n\t): Promise<T | undefined> {\n\t\tconst handleMaybe = getObjectFromDirectory\n\t\t\t? getObjectFromDirectory(key, directory)\n\t\t\t: directory.get(key);\n\t\tconst handle = handleMaybe?.IFluidHandle;\n\t\tif (handle) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn handle.get();\n\t\t}\n\t}\n\n\t/**\n\t * Gets the service at a given id.\n\t * @param id - service id\n\t * @deprecated See https://github.com/microsoft/FluidFramework/pull/14430 for context\n\t */\n\tprotected async getService<T extends FluidObject>(id: string): Promise<T> {\n\t\treturn handleFromLegacyUri<T>(\n\t\t\t`/${serviceRoutePathRoot}/${id}`,\n\t\t\tthis.context.containerRuntime,\n\t\t).get();\n\t}\n\n\t/**\n\t * Called every time the data store is initialized, before initializingFirstTime or\n\t * initializingFromExisting is called.\n\t */\n\tprotected async preInitialize(): Promise<void> {}\n\n\t/**\n\t * Called the first time the data store is initialized (new creations with a new\n\t * data store runtime)\n\t *\n\t * @param props - Optional props to be passed in on create\n\t */\n\tprotected async initializingFirstTime(props?: I[\"InitialState\"]): Promise<void> {}\n\n\t/**\n\t * Called every time but the first time the data store is initialized (creations\n\t * with an existing data store runtime)\n\t */\n\tprotected async initializingFromExisting(): Promise<void> {}\n\n\t/**\n\t * Called every time the data store is initialized after create or existing.\n\t */\n\tprotected async hasInitialized(): Promise<void> {}\n\n\t/**\n\t * Called when the host container closes and disposes itself\n\t */\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t}\n}\n"]}
|
package/lib/utils/attachUtils.js
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated 2.0.0-internal.3.3.0 Prefer not to inspect and react to the attach state unless necessary. If needed, instead inspect the IFluidDataStoreRuntime's attachState property, and await the "attached" event if not attached.
|
|
8
|
+
*/
|
|
6
9
|
export async function waitForAttach(dataStoreRuntime) {
|
|
7
10
|
if (dataStoreRuntime.attachState === AttachState.Attached) {
|
|
8
11
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachUtils.js","sourceRoot":"","sources":["../../src/utils/attachUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,gBAAwC;IAC3E,IAAI,gBAAgB,CAAC,WAAW,KAAK,WAAW,CAAC,QAAQ,EAAE;QAC1D,OAAO;KACP;IAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;YACtC,OAAO,CAAC,OAAO,EAAE;iBACf,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;iBACrB,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\n\nexport async function waitForAttach(dataStoreRuntime: IFluidDataStoreRuntime): Promise<void> {\n\tif (dataStoreRuntime.attachState === AttachState.Attached) {\n\t\treturn;\n\t}\n\n\treturn new Promise((resolve) => {\n\t\tdataStoreRuntime.once(\"attached\", () => {\n\t\t\tPromise.resolve()\n\t\t\t\t.then(() => resolve())\n\t\t\t\t.catch(() => {});\n\t\t});\n\t});\n}\n"]}
|
|
1
|
+
{"version":3,"file":"attachUtils.js","sourceRoot":"","sources":["../../src/utils/attachUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,gBAAwC;IAC3E,IAAI,gBAAgB,CAAC,WAAW,KAAK,WAAW,CAAC,QAAQ,EAAE;QAC1D,OAAO;KACP;IAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;YACtC,OAAO,CAAC,OAAO,EAAE;iBACf,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;iBACrB,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\n\n/**\n * @deprecated 2.0.0-internal.3.3.0 Prefer not to inspect and react to the attach state unless necessary. If needed, instead inspect the IFluidDataStoreRuntime's attachState property, and await the \"attached\" event if not attached.\n */\nexport async function waitForAttach(dataStoreRuntime: IFluidDataStoreRuntime): Promise<void> {\n\tif (dataStoreRuntime.attachState === AttachState.Attached) {\n\t\treturn;\n\t}\n\n\treturn new Promise((resolve) => {\n\t\tdataStoreRuntime.once(\"attached\", () => {\n\t\t\tPromise.resolve()\n\t\t\t\t.then(() => resolve())\n\t\t\t\t.catch(() => {});\n\t\t});\n\t});\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/aqueduct",
|
|
3
|
-
"version": "2.0.0-internal.3.
|
|
3
|
+
"version": "2.0.0-internal.3.3.0",
|
|
4
4
|
"description": "A set of implementations for Fluid Framework interfaces.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -41,28 +41,28 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
43
43
|
"@fluidframework/common-utils": "^1.1.1",
|
|
44
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.3.
|
|
45
|
-
"@fluidframework/container-loader": ">=2.0.0-internal.3.
|
|
46
|
-
"@fluidframework/container-runtime": ">=2.0.0-internal.3.
|
|
47
|
-
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.3.
|
|
48
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.3.
|
|
49
|
-
"@fluidframework/datastore": ">=2.0.0-internal.3.
|
|
50
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-internal.3.
|
|
51
|
-
"@fluidframework/map": ">=2.0.0-internal.3.
|
|
52
|
-
"@fluidframework/request-handler": ">=2.0.0-internal.3.
|
|
53
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.3.
|
|
54
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.3.
|
|
55
|
-
"@fluidframework/synthesize": ">=2.0.0-internal.3.
|
|
56
|
-
"@fluidframework/view-interfaces": ">=2.0.0-internal.3.
|
|
44
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
45
|
+
"@fluidframework/container-loader": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
46
|
+
"@fluidframework/container-runtime": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
47
|
+
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
48
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
49
|
+
"@fluidframework/datastore": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
50
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
51
|
+
"@fluidframework/map": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
52
|
+
"@fluidframework/request-handler": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
53
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
54
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
55
|
+
"@fluidframework/synthesize": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
56
|
+
"@fluidframework/view-interfaces": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
57
57
|
"uuid": "^8.3.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@fluid-tools/build-cli": "^0.
|
|
61
|
-
"@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.0.0-internal.3.
|
|
60
|
+
"@fluid-tools/build-cli": "^0.12.0",
|
|
61
|
+
"@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.0.0-internal.3.2.0",
|
|
62
62
|
"@fluidframework/build-common": "^1.1.0",
|
|
63
|
-
"@fluidframework/build-tools": "^0.
|
|
63
|
+
"@fluidframework/build-tools": "^0.12.0",
|
|
64
64
|
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
65
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.3.
|
|
65
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.3.3.0 <2.0.0-internal.4.0.0",
|
|
66
66
|
"@microsoft/api-extractor": "^7.22.2",
|
|
67
67
|
"@rushstack/eslint-config": "^2.5.1",
|
|
68
68
|
"@types/mocha": "^9.1.1",
|
|
@@ -79,10 +79,6 @@
|
|
|
79
79
|
},
|
|
80
80
|
"module:es5": "es5/index.js",
|
|
81
81
|
"typeValidation": {
|
|
82
|
-
"version": "2.0.0-internal.3.2.0",
|
|
83
|
-
"previousVersionStyle": "~previousMinor",
|
|
84
|
-
"baselineRange": ">=2.0.0-internal.3.1.0 <2.0.0-internal.3.2.0",
|
|
85
|
-
"baselineVersion": "2.0.0-internal.3.1.0",
|
|
86
82
|
"broken": {}
|
|
87
83
|
},
|
|
88
84
|
"scripts": {
|
|
@@ -108,7 +104,7 @@
|
|
|
108
104
|
"test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
|
|
109
105
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
110
106
|
"tsc": "tsc",
|
|
111
|
-
"typetests:gen": "
|
|
107
|
+
"typetests:gen": "fluid-type-test-generator",
|
|
112
108
|
"typetests:prepare": "flub generate typetests --prepare --dir . --pin"
|
|
113
109
|
}
|
|
114
110
|
}
|