@fluidframework/azure-client 0.58.2002 → 0.59.1000

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAaA,OAAO,EACH,eAAe,EAGf,eAAe,EAElB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAOxE;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IAQR,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPlC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAE3C;;;OAGG;gBAC0B,KAAK,EAAE,gBAAgB;IAYpD;;;;OAIG;IACU,eAAe,CACxB,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAmCF;;;;;OAKG;IACU,YAAY,CACrB,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAgBF,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,YAAY;CAcvB"}
1
+ {"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,eAAe,EAGf,eAAe,EAElB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAOxE;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IAQR,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPlC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAE3C;;;OAGG;gBAC0B,KAAK,EAAE,gBAAgB;IAYpD;;;;OAIG;IACU,eAAe,CACxB,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAmCF;;;;;OAKG;IACU,YAAY,CACrB,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAgBF,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,YAAY;CAoBvB"}
@@ -86,8 +86,13 @@ class AzureClient {
86
86
  }
87
87
  createLoader(containerSchema) {
88
88
  const runtimeFactory = new fluid_static_1.DOProviderContainerRuntimeFactory(containerSchema);
89
- const module = { fluidExport: runtimeFactory };
90
- const codeLoader = { load: async () => module };
89
+ const load = async () => {
90
+ return {
91
+ module: { fluidExport: runtimeFactory },
92
+ details: { package: "no-dynamic-package", config: {} },
93
+ };
94
+ };
95
+ const codeLoader = { load };
91
96
  return new container_loader_1.Loader({
92
97
  urlResolver: this.urlResolver,
93
98
  documentServiceFactory: this.documentServiceFactory,
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uEAA0D;AAK1D,iFAAgF;AAChF,+EAA2F;AAC3F,iEAAmE;AACnE,+DAAsE;AACtE,+DAMsC;AAGtC,mDAAgD;AAChD,yDAG4B;AAE5B;;GAEG;AACU,QAAA,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;GAGG;AACH,MAAa,WA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IACnD,CAAC;IAEO,oBAAoB,CAAC,SAAqB;QAC9C,OAAO;YACH,QAAQ,EAAE,IAAI,6BAAa,CAAC,SAAS,CAAC;SACzC,CAAC;IACN,CAAC;IAEO,YAAY,CAAC,eAAgC;QACjD,MAAM,cAAc,GAAG,IAAI,gDAAiC,CACxD,eAAe,CAClB,CAAC;QACF,MAAM,MAAM,GAAG,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;QAC/C,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;QAChD,OAAO,IAAI,yBAAM,CAAC;YACd,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;YACnD,UAAU;YACV,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;IACP,CAAC;CAEJ;AAjHD,kCAiHC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { AttachState, IContainer } from \"@fluidframework/container-definitions\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver\";\nimport { requestFluidObject } from \"@fluidframework/runtime-utils\";\nimport { ensureFluidResolvedUrl } from \"@fluidframework/driver-utils\";\nimport {\n ContainerSchema,\n DOProviderContainerRuntimeFactory,\n FluidContainer,\n IFluidContainer,\n RootDataObject,\n} from \"@fluidframework/fluid-static\";\n\nimport { AzureClientProps, AzureContainerServices } from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport {\n AzureUrlResolver,\n createAzureCreateNewRequest,\n} from \"./AzureUrlResolver\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nexport const LOCAL_MODE_TENANT_ID = \"local\";\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,\n * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.\n */\nexport class AzureClient {\n private readonly documentServiceFactory: IDocumentServiceFactory;\n private readonly urlResolver: IUrlResolver;\n\n /**\n * Creates a new client instance using configuration parameters.\n * @param props - Properties for initializing a new AzureClient instance\n */\n constructor(private readonly props: AzureClientProps) {\n this.urlResolver = new AzureUrlResolver();\n // The local service implementation differs from the Azure Fluid Relay in blob\n // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n const enableWholeSummaryUpload =\n this.props.connection.tenantId !== LOCAL_MODE_TENANT_ID;\n this.documentServiceFactory = new RouterliciousDocumentServiceFactory(\n this.props.connection.tokenProvider,\n { enableWholeSummaryUpload },\n );\n }\n\n /**\n * Creates a new detached container instance in the Azure Fluid Relay.\n * @param containerSchema - Container schema for the new container.\n * @returns New detached container instance along with associated services.\n */\n public async createContainer(\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n\n const container = await loader.createDetachedContainer({\n package: \"no-dynamic-package\",\n config: {},\n });\n\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const createNewRequest = createAzureCreateNewRequest(\n this.props.connection.orderer,\n this.props.connection.storage,\n this.props.connection.tenantId,\n );\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\n \"Cannot attach container. Container is not in detached state\",\n );\n }\n await container.attach(createNewRequest);\n const resolved = container.resolvedUrl;\n ensureFluidResolvedUrl(resolved);\n return resolved.id;\n }\n })(container, rootDataObject);\n\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n /**\n * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n * @param id - Unique ID of the container in Azure Fluid Relay.\n * @param containerSchema - Container schema used to access data objects in the container.\n * @returns Existing container instance along with associated services.\n */\n public async getContainer(\n id: string,\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n const url = new URL(this.props.connection.orderer);\n url.searchParams.append(\"storage\", encodeURIComponent(this.props.connection.storage));\n url.searchParams.append(\"tenantId\", encodeURIComponent(this.props.connection.tenantId));\n url.searchParams.append(\"containerId\", encodeURIComponent(id));\n const container = await loader.resolve({ url: url.href });\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(container: IContainer): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(containerSchema: ContainerSchema): Loader {\n const runtimeFactory = new DOProviderContainerRuntimeFactory(\n containerSchema,\n );\n const module = { fluidExport: runtimeFactory };\n const codeLoader = { load: async () => module };\n return new Loader({\n urlResolver: this.urlResolver,\n documentServiceFactory: this.documentServiceFactory,\n codeLoader,\n logger: this.props.logger,\n });\n }\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uEAA0D;AAK1D,iFAI+C;AAC/C,+EAA2F;AAC3F,iEAAmE;AACnE,+DAAsE;AACtE,+DAMsC;AAGtC,mDAAgD;AAChD,yDAG4B;AAE5B;;GAEG;AACU,QAAA,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;GAGG;AACH,MAAa,WAAW;IAIpB;;;OAGG;IACH,YAA6B,KAAuB;QAAvB,UAAK,GAAL,KAAK,CAAkB;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,mCAAgB,EAAE,CAAC;QAC1C,8EAA8E;QAC9E,6FAA6F;QAC7F,MAAM,wBAAwB,GAC1B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,KAAK,4BAAoB,CAAC;QAC5D,IA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OAAO;gBACH,MAAM,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE;gBACvC,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,EAAE;aACzD,CAAC;QACN,CAAC,CAAC;QAEF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,CAAC;QAC5B,OAAO,IAAI,yBAAM,CAAC;YACd,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;YACnD,UAAU;YACV,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;IACP,CAAC;CAEJ;AAvHD,kCAuHC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport {\n AttachState,\n IContainer,\n IFluidModuleWithDetails,\n} from \"@fluidframework/container-definitions\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver\";\nimport { requestFluidObject } from \"@fluidframework/runtime-utils\";\nimport { ensureFluidResolvedUrl } from \"@fluidframework/driver-utils\";\nimport {\n ContainerSchema,\n DOProviderContainerRuntimeFactory,\n FluidContainer,\n IFluidContainer,\n RootDataObject,\n} from \"@fluidframework/fluid-static\";\n\nimport { AzureClientProps, AzureContainerServices } from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport {\n AzureUrlResolver,\n createAzureCreateNewRequest,\n} from \"./AzureUrlResolver\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nexport const LOCAL_MODE_TENANT_ID = \"local\";\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,\n * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.\n */\nexport class AzureClient {\n private readonly documentServiceFactory: IDocumentServiceFactory;\n private readonly urlResolver: IUrlResolver;\n\n /**\n * Creates a new client instance using configuration parameters.\n * @param props - Properties for initializing a new AzureClient instance\n */\n constructor(private readonly props: AzureClientProps) {\n this.urlResolver = new AzureUrlResolver();\n // The local service implementation differs from the Azure Fluid Relay in blob\n // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n const enableWholeSummaryUpload =\n this.props.connection.tenantId !== LOCAL_MODE_TENANT_ID;\n this.documentServiceFactory = new RouterliciousDocumentServiceFactory(\n this.props.connection.tokenProvider,\n { enableWholeSummaryUpload },\n );\n }\n\n /**\n * Creates a new detached container instance in the Azure Fluid Relay.\n * @param containerSchema - Container schema for the new container.\n * @returns New detached container instance along with associated services.\n */\n public async createContainer(\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n\n const container = await loader.createDetachedContainer({\n package: \"no-dynamic-package\",\n config: {},\n });\n\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const createNewRequest = createAzureCreateNewRequest(\n this.props.connection.orderer,\n this.props.connection.storage,\n this.props.connection.tenantId,\n );\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\n \"Cannot attach container. Container is not in detached state\",\n );\n }\n await container.attach(createNewRequest);\n const resolved = container.resolvedUrl;\n ensureFluidResolvedUrl(resolved);\n return resolved.id;\n }\n })(container, rootDataObject);\n\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n /**\n * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n * @param id - Unique ID of the container in Azure Fluid Relay.\n * @param containerSchema - Container schema used to access data objects in the container.\n * @returns Existing container instance along with associated services.\n */\n public async getContainer(\n id: string,\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n const url = new URL(this.props.connection.orderer);\n url.searchParams.append(\"storage\", encodeURIComponent(this.props.connection.storage));\n url.searchParams.append(\"tenantId\", encodeURIComponent(this.props.connection.tenantId));\n url.searchParams.append(\"containerId\", encodeURIComponent(id));\n const container = await loader.resolve({ url: url.href });\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(container: IContainer): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(containerSchema: ContainerSchema): Loader {\n const runtimeFactory = new DOProviderContainerRuntimeFactory(\n containerSchema,\n );\n const load = async (): Promise<IFluidModuleWithDetails> => {\n return {\n module: { fluidExport: runtimeFactory },\n details: { package: \"no-dynamic-package\", config: {} },\n };\n };\n\n const codeLoader = { load };\n return new Loader({\n urlResolver: this.urlResolver,\n documentServiceFactory: this.documentServiceFactory,\n codeLoader,\n logger: this.props.logger,\n });\n }\n // #endregion\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/azure-client";
8
- export declare const pkgVersion = "0.58.2002";
8
+ export declare const pkgVersion = "0.59.1000";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/azure-client";
11
- exports.pkgVersion = "0.58.2002";
11
+ exports.pkgVersion = "0.59.1000";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/azure-client\";\nexport const pkgVersion = \"0.58.2002\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/azure-client\";\nexport const pkgVersion = \"0.59.1000\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAaA,OAAO,EACH,eAAe,EAGf,eAAe,EAElB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAOxE;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IAQR,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPlC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAE3C;;;OAGG;gBAC0B,KAAK,EAAE,gBAAgB;IAYpD;;;;OAIG;IACU,eAAe,CACxB,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAmCF;;;;;OAKG;IACU,YAAY,CACrB,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAgBF,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,YAAY;CAcvB"}
1
+ {"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,eAAe,EAGf,eAAe,EAElB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAOxE;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;GAGG;AACH,qBAAa,WAAW;IAQR,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPlC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAE3C;;;OAGG;gBAC0B,KAAK,EAAE,gBAAgB;IAYpD;;;;OAIG;IACU,eAAe,CACxB,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAmCF;;;;;OAKG;IACU,YAAY,CACrB,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,eAAe,GACjC,OAAO,CAAC;QACP,SAAS,EAAE,eAAe,CAAC;QAC3B,QAAQ,EAAE,sBAAsB,CAAC;KACpC,CAAC;IAgBF,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,YAAY;CAoBvB"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { Loader } from "@fluidframework/container-loader";
6
- import { AttachState } from "@fluidframework/container-definitions";
6
+ import { AttachState, } from "@fluidframework/container-definitions";
7
7
  import { RouterliciousDocumentServiceFactory } from "@fluidframework/routerlicious-driver";
8
8
  import { requestFluidObject } from "@fluidframework/runtime-utils";
9
9
  import { ensureFluidResolvedUrl } from "@fluidframework/driver-utils";
@@ -83,8 +83,13 @@ export class AzureClient {
83
83
  }
84
84
  createLoader(containerSchema) {
85
85
  const runtimeFactory = new DOProviderContainerRuntimeFactory(containerSchema);
86
- const module = { fluidExport: runtimeFactory };
87
- const codeLoader = { load: async () => module };
86
+ const load = async () => {
87
+ return {
88
+ module: { fluidExport: runtimeFactory },
89
+ details: { package: "no-dynamic-package", config: {} },
90
+ };
91
+ };
92
+ const codeLoader = { load };
88
93
  return new Loader({
89
94
  urlResolver: this.urlResolver,
90
95
  documentServiceFactory: this.documentServiceFactory,
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAK1D,OAAO,EAAE,WAAW,EAAc,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,mCAAmC,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAEH,iCAAiC,EACjC,cAAc,GAGjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACH,gBAAgB,EAChB,2BAA2B,GAC9B,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;GAGG;AACH,MAAM,OAAO,WAAW;IAIpB;;;OAGG;IACH,YAA6B,KAAuB;QAAvB,UAAK,GAAL,KAAK,CAAkB;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAC1C,8EAA8E;QAC9E,6FAA6F;QAC7F,MAAM,wBAAwB,GAC1B,IAAI,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e,CAClB,CAAC;QACF,MAAM,MAAM,GAAG,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;QAC/C,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;QAChD,OAAO,IAAI,MAAM,CAAC;YACd,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;YACnD,UAAU;YACV,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;IACP,CAAC;CAEJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { AttachState, IContainer } from \"@fluidframework/container-definitions\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver\";\nimport { requestFluidObject } from \"@fluidframework/runtime-utils\";\nimport { ensureFluidResolvedUrl } from \"@fluidframework/driver-utils\";\nimport {\n ContainerSchema,\n DOProviderContainerRuntimeFactory,\n FluidContainer,\n IFluidContainer,\n RootDataObject,\n} from \"@fluidframework/fluid-static\";\n\nimport { AzureClientProps, AzureContainerServices } from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport {\n AzureUrlResolver,\n createAzureCreateNewRequest,\n} from \"./AzureUrlResolver\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nexport const LOCAL_MODE_TENANT_ID = \"local\";\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,\n * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.\n */\nexport class AzureClient {\n private readonly documentServiceFactory: IDocumentServiceFactory;\n private readonly urlResolver: IUrlResolver;\n\n /**\n * Creates a new client instance using configuration parameters.\n * @param props - Properties for initializing a new AzureClient instance\n */\n constructor(private readonly props: AzureClientProps) {\n this.urlResolver = new AzureUrlResolver();\n // The local service implementation differs from the Azure Fluid Relay in blob\n // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n const enableWholeSummaryUpload =\n this.props.connection.tenantId !== LOCAL_MODE_TENANT_ID;\n this.documentServiceFactory = new RouterliciousDocumentServiceFactory(\n this.props.connection.tokenProvider,\n { enableWholeSummaryUpload },\n );\n }\n\n /**\n * Creates a new detached container instance in the Azure Fluid Relay.\n * @param containerSchema - Container schema for the new container.\n * @returns New detached container instance along with associated services.\n */\n public async createContainer(\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n\n const container = await loader.createDetachedContainer({\n package: \"no-dynamic-package\",\n config: {},\n });\n\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const createNewRequest = createAzureCreateNewRequest(\n this.props.connection.orderer,\n this.props.connection.storage,\n this.props.connection.tenantId,\n );\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\n \"Cannot attach container. Container is not in detached state\",\n );\n }\n await container.attach(createNewRequest);\n const resolved = container.resolvedUrl;\n ensureFluidResolvedUrl(resolved);\n return resolved.id;\n }\n })(container, rootDataObject);\n\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n /**\n * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n * @param id - Unique ID of the container in Azure Fluid Relay.\n * @param containerSchema - Container schema used to access data objects in the container.\n * @returns Existing container instance along with associated services.\n */\n public async getContainer(\n id: string,\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n const url = new URL(this.props.connection.orderer);\n url.searchParams.append(\"storage\", encodeURIComponent(this.props.connection.storage));\n url.searchParams.append(\"tenantId\", encodeURIComponent(this.props.connection.tenantId));\n url.searchParams.append(\"containerId\", encodeURIComponent(id));\n const container = await loader.resolve({ url: url.href });\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(container: IContainer): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(containerSchema: ContainerSchema): Loader {\n const runtimeFactory = new DOProviderContainerRuntimeFactory(\n containerSchema,\n );\n const module = { fluidExport: runtimeFactory };\n const codeLoader = { load: async () => module };\n return new Loader({\n urlResolver: this.urlResolver,\n documentServiceFactory: this.documentServiceFactory,\n codeLoader,\n logger: this.props.logger,\n });\n }\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAK1D,OAAO,EACH,WAAW,GAGd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,mCAAmC,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAEH,iCAAiC,EACjC,cAAc,GAGjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACH,gBAAgB,EAChB,2BAA2B,GAC9B,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;GAGG;AACH,MAAM,OAAO,WAAW;IAIpB;;;OAGG;IACH,YAA6B,KAAuB;QAAvB,UAAK,GAAL,KAAK,CAAkB;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAC1C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AAC,eAAgC;QACjD,MAAM,cAAc,GAAG,IAAI,iCAAiC,CACxD,eAAe,CAClB,CAAC;QACF,MAAM,IAAI,GAAG,KAAK,IAAsC,EAAE;YACtD,OAAO;gBACH,MAAM,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE;gBACvC,OAAO,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,EAAE;aACzD,CAAC;QACN,CAAC,CAAC;QAEF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,CAAC;QAC5B,OAAO,IAAI,MAAM,CAAC;YACd,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;YACnD,UAAU;YACV,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;IACP,CAAC;CAEJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport {\n AttachState,\n IContainer,\n IFluidModuleWithDetails,\n} from \"@fluidframework/container-definitions\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver\";\nimport { requestFluidObject } from \"@fluidframework/runtime-utils\";\nimport { ensureFluidResolvedUrl } from \"@fluidframework/driver-utils\";\nimport {\n ContainerSchema,\n DOProviderContainerRuntimeFactory,\n FluidContainer,\n IFluidContainer,\n RootDataObject,\n} from \"@fluidframework/fluid-static\";\n\nimport { AzureClientProps, AzureContainerServices } from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport {\n AzureUrlResolver,\n createAzureCreateNewRequest,\n} from \"./AzureUrlResolver\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nexport const LOCAL_MODE_TENANT_ID = \"local\";\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,\n * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.\n */\nexport class AzureClient {\n private readonly documentServiceFactory: IDocumentServiceFactory;\n private readonly urlResolver: IUrlResolver;\n\n /**\n * Creates a new client instance using configuration parameters.\n * @param props - Properties for initializing a new AzureClient instance\n */\n constructor(private readonly props: AzureClientProps) {\n this.urlResolver = new AzureUrlResolver();\n // The local service implementation differs from the Azure Fluid Relay in blob\n // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n const enableWholeSummaryUpload =\n this.props.connection.tenantId !== LOCAL_MODE_TENANT_ID;\n this.documentServiceFactory = new RouterliciousDocumentServiceFactory(\n this.props.connection.tokenProvider,\n { enableWholeSummaryUpload },\n );\n }\n\n /**\n * Creates a new detached container instance in the Azure Fluid Relay.\n * @param containerSchema - Container schema for the new container.\n * @returns New detached container instance along with associated services.\n */\n public async createContainer(\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n\n const container = await loader.createDetachedContainer({\n package: \"no-dynamic-package\",\n config: {},\n });\n\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const createNewRequest = createAzureCreateNewRequest(\n this.props.connection.orderer,\n this.props.connection.storage,\n this.props.connection.tenantId,\n );\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\n \"Cannot attach container. Container is not in detached state\",\n );\n }\n await container.attach(createNewRequest);\n const resolved = container.resolvedUrl;\n ensureFluidResolvedUrl(resolved);\n return resolved.id;\n }\n })(container, rootDataObject);\n\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n /**\n * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n * @param id - Unique ID of the container in Azure Fluid Relay.\n * @param containerSchema - Container schema used to access data objects in the container.\n * @returns Existing container instance along with associated services.\n */\n public async getContainer(\n id: string,\n containerSchema: ContainerSchema,\n ): Promise<{\n container: IFluidContainer;\n services: AzureContainerServices;\n }> {\n const loader = this.createLoader(containerSchema);\n const url = new URL(this.props.connection.orderer);\n url.searchParams.append(\"storage\", encodeURIComponent(this.props.connection.storage));\n url.searchParams.append(\"tenantId\", encodeURIComponent(this.props.connection.tenantId));\n url.searchParams.append(\"containerId\", encodeURIComponent(id));\n const container = await loader.resolve({ url: url.href });\n const rootDataObject = await requestFluidObject<RootDataObject>(\n container,\n \"/\",\n );\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(container: IContainer): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(containerSchema: ContainerSchema): Loader {\n const runtimeFactory = new DOProviderContainerRuntimeFactory(\n containerSchema,\n );\n const load = async (): Promise<IFluidModuleWithDetails> => {\n return {\n module: { fluidExport: runtimeFactory },\n details: { package: \"no-dynamic-package\", config: {} },\n };\n };\n\n const codeLoader = { load };\n return new Loader({\n urlResolver: this.urlResolver,\n documentServiceFactory: this.documentServiceFactory,\n codeLoader,\n logger: this.props.logger,\n });\n }\n // #endregion\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/azure-client";
8
- export declare const pkgVersion = "0.58.2002";
8
+ export declare const pkgVersion = "0.59.1000";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/azure-client";
8
- export const pkgVersion = "0.58.2002";
8
+ export const pkgVersion = "0.59.1000";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,8BAA8B,CAAC;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/azure-client\";\nexport const pkgVersion = \"0.58.2002\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,8BAA8B,CAAC;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/azure-client\";\nexport const pkgVersion = \"0.59.1000\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/azure-client",
3
- "version": "0.58.2002",
3
+ "version": "0.59.1000",
4
4
  "description": "A tool to enable creation and loading of Fluid containers using the Azure Fluid Relay service",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -42,26 +42,27 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@fluidframework/common-definitions": "^0.20.1",
45
- "@fluidframework/container-definitions": "^0.47.1000",
46
- "@fluidframework/container-loader": "^0.58.2002",
47
- "@fluidframework/core-interfaces": "^0.42.0",
48
- "@fluidframework/driver-definitions": "^0.45.1000",
49
- "@fluidframework/driver-utils": "^0.58.2002",
50
- "@fluidframework/fluid-static": "^0.58.2002",
51
- "@fluidframework/map": "^0.58.2002",
52
- "@fluidframework/protocol-definitions": "^0.1027.1000",
53
- "@fluidframework/routerlicious-driver": "^0.58.2002",
54
- "@fluidframework/runtime-utils": "^0.58.2002",
55
- "@fluidframework/server-services-client": "^0.1035.1000",
45
+ "@fluidframework/container-definitions": "^0.48.1000",
46
+ "@fluidframework/container-loader": "^0.59.1000",
47
+ "@fluidframework/core-interfaces": "^0.43.1000",
48
+ "@fluidframework/driver-definitions": "^0.46.1000",
49
+ "@fluidframework/driver-utils": "^0.59.1000",
50
+ "@fluidframework/fluid-static": "^0.59.1000",
51
+ "@fluidframework/map": "^0.59.1000",
52
+ "@fluidframework/protocol-definitions": "^0.1028.1000",
53
+ "@fluidframework/routerlicious-driver": "^0.59.1000",
54
+ "@fluidframework/runtime-utils": "^0.59.1000",
55
+ "@fluidframework/server-services-client": "^0.1036.1000",
56
56
  "axios": "^0.26.0",
57
57
  "uuid": "^8.3.1"
58
58
  },
59
59
  "devDependencies": {
60
- "@fluidframework/aqueduct": "^0.58.2002",
60
+ "@fluidframework/aqueduct": "^0.59.1000",
61
+ "@fluidframework/azure-client-previous": "npm:@fluidframework/azure-client@^0.58.0",
61
62
  "@fluidframework/azure-local-service": "^0.1.38773",
62
63
  "@fluidframework/build-common": "^0.23.0",
63
- "@fluidframework/eslint-config-fluid": "^0.27.0",
64
- "@fluidframework/test-client-utils": "^0.58.2002",
64
+ "@fluidframework/eslint-config-fluid": "^0.28.1000",
65
+ "@fluidframework/test-client-utils": "^0.59.1000",
65
66
  "@microsoft/api-extractor": "^7.16.1",
66
67
  "@rushstack/eslint-config": "^2.5.1",
67
68
  "@types/mocha": "^8.2.2",
@@ -76,5 +77,9 @@
76
77
  },
77
78
  "peerDependencies": {
78
79
  "fluid-framework": "^0.58.0"
80
+ },
81
+ "typeValidation": {
82
+ "version": "0.59.1000",
83
+ "broken": {}
79
84
  }
80
85
  }
@@ -7,7 +7,11 @@ import {
7
7
  IDocumentServiceFactory,
8
8
  IUrlResolver,
9
9
  } from "@fluidframework/driver-definitions";
10
- import { AttachState, IContainer } from "@fluidframework/container-definitions";
10
+ import {
11
+ AttachState,
12
+ IContainer,
13
+ IFluidModuleWithDetails,
14
+ } from "@fluidframework/container-definitions";
11
15
  import { RouterliciousDocumentServiceFactory } from "@fluidframework/routerlicious-driver";
12
16
  import { requestFluidObject } from "@fluidframework/runtime-utils";
13
17
  import { ensureFluidResolvedUrl } from "@fluidframework/driver-utils";
@@ -138,8 +142,14 @@ export class AzureClient {
138
142
  const runtimeFactory = new DOProviderContainerRuntimeFactory(
139
143
  containerSchema,
140
144
  );
141
- const module = { fluidExport: runtimeFactory };
142
- const codeLoader = { load: async () => module };
145
+ const load = async (): Promise<IFluidModuleWithDetails> => {
146
+ return {
147
+ module: { fluidExport: runtimeFactory },
148
+ details: { package: "no-dynamic-package", config: {} },
149
+ };
150
+ };
151
+
152
+ const codeLoader = { load };
143
153
  return new Loader({
144
154
  urlResolver: this.urlResolver,
145
155
  documentServiceFactory: this.documentServiceFactory,
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/azure-client";
9
- export const pkgVersion = "0.58.2002";
9
+ export const pkgVersion = "0.59.1000";