@fluidframework/azure-client 0.49.2 → 0.50.0-41365

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.
Files changed (41) hide show
  1. package/dist/AzureClient.d.ts +6 -6
  2. package/dist/AzureClient.js +7 -7
  3. package/dist/AzureClient.js.map +1 -1
  4. package/dist/AzureFunctionTokenProvider.d.ts +1 -1
  5. package/dist/AzureFunctionTokenProvider.js +1 -1
  6. package/dist/AzureFunctionTokenProvider.js.map +1 -1
  7. package/dist/AzureUrlResolver.js +1 -1
  8. package/dist/AzureUrlResolver.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/interfaces.d.ts +3 -3
  13. package/dist/interfaces.js.map +1 -1
  14. package/dist/packageVersion.d.ts +1 -1
  15. package/dist/packageVersion.d.ts.map +1 -1
  16. package/dist/packageVersion.js +1 -1
  17. package/dist/packageVersion.js.map +1 -1
  18. package/lib/AzureClient.d.ts +6 -6
  19. package/lib/AzureClient.js +7 -7
  20. package/lib/AzureClient.js.map +1 -1
  21. package/lib/AzureFunctionTokenProvider.d.ts +1 -1
  22. package/lib/AzureFunctionTokenProvider.js +1 -1
  23. package/lib/AzureFunctionTokenProvider.js.map +1 -1
  24. package/lib/AzureUrlResolver.js +1 -1
  25. package/lib/AzureUrlResolver.js.map +1 -1
  26. package/lib/index.d.ts +1 -1
  27. package/lib/index.js +1 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib/interfaces.d.ts +3 -3
  30. package/lib/interfaces.js.map +1 -1
  31. package/lib/packageVersion.d.ts +1 -1
  32. package/lib/packageVersion.d.ts.map +1 -1
  33. package/lib/packageVersion.js +1 -1
  34. package/lib/packageVersion.js.map +1 -1
  35. package/package.json +14 -13
  36. package/src/AzureClient.ts +7 -7
  37. package/src/AzureFunctionTokenProvider.ts +1 -1
  38. package/src/AzureUrlResolver.ts +1 -1
  39. package/src/index.ts +1 -1
  40. package/src/interfaces.ts +3 -3
  41. package/src/packageVersion.ts +1 -1
@@ -1,12 +1,12 @@
1
1
  import { ContainerSchema, IFluidContainer } from "@fluidframework/fluid-static";
2
2
  import { AzureClientProps, AzureContainerServices } from "./interfaces";
3
3
  /**
4
- * Strongly typed id for connecting to a local Azure Fluid Relay service
4
+ * Strongly typed id for connecting to a local Azure Fluid Relay.
5
5
  */
6
6
  export declare const LOCAL_MODE_TENANT_ID = "local";
7
7
  /**
8
- * AzureClient provides the ability to have a Fluid object backed by the Azure Relay Service or,
9
- * when running with local tenantId, have it be backed by a Tinylicious local service instance
8
+ * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
9
+ * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
10
10
  */
11
11
  export declare class AzureClient {
12
12
  private readonly props;
@@ -18,7 +18,7 @@ export declare class AzureClient {
18
18
  */
19
19
  constructor(props: AzureClientProps);
20
20
  /**
21
- * Creates a new detached container instance in the Azure Relay Service.
21
+ * Creates a new detached container instance in the Azure Fluid Relay.
22
22
  * @param containerSchema - Container schema for the new container.
23
23
  * @returns New detached container instance along with associated services.
24
24
  */
@@ -27,8 +27,8 @@ export declare class AzureClient {
27
27
  services: AzureContainerServices;
28
28
  }>;
29
29
  /**
30
- * Accesses the existing container given its unique ID in the Azure Fluid Relay service.
31
- * @param id - Unique ID of the container in Azure Fluid Relay service
30
+ * Accesses the existing container given its unique ID in the Azure Fluid Relay.
31
+ * @param id - Unique ID of the container in Azure Fluid Relay.
32
32
  * @param containerSchema - Container schema used to access data objects in the container.
33
33
  * @returns Existing container instance along with associated services.
34
34
  */
@@ -14,12 +14,12 @@ const fluid_static_1 = require("@fluidframework/fluid-static");
14
14
  const AzureAudience_1 = require("./AzureAudience");
15
15
  const AzureUrlResolver_1 = require("./AzureUrlResolver");
16
16
  /**
17
- * Strongly typed id for connecting to a local Azure Fluid Relay service
17
+ * Strongly typed id for connecting to a local Azure Fluid Relay.
18
18
  */
19
19
  exports.LOCAL_MODE_TENANT_ID = "local";
20
20
  /**
21
- * AzureClient provides the ability to have a Fluid object backed by the Azure Relay Service or,
22
- * when running with local tenantId, have it be backed by a Tinylicious local service instance
21
+ * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
22
+ * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
23
23
  */
24
24
  class AzureClient {
25
25
  /**
@@ -29,13 +29,13 @@ class AzureClient {
29
29
  constructor(props) {
30
30
  this.props = props;
31
31
  this.urlResolver = new AzureUrlResolver_1.AzureUrlResolver(this.props.connection.tenantId, this.props.connection.orderer, this.props.connection.storage);
32
- // The local service implementation differs from the Azure Fluid Relay service in blob
32
+ // The local service implementation differs from the Azure Fluid Relay in blob
33
33
  // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.
34
34
  const enableWholeSummaryUpload = this.props.connection.tenantId !== exports.LOCAL_MODE_TENANT_ID;
35
35
  this.documentServiceFactory = new routerlicious_driver_1.RouterliciousDocumentServiceFactory(this.props.connection.tokenProvider, { enableWholeSummaryUpload });
36
36
  }
37
37
  /**
38
- * Creates a new detached container instance in the Azure Relay Service.
38
+ * Creates a new detached container instance in the Azure Fluid Relay.
39
39
  * @param containerSchema - Container schema for the new container.
40
40
  * @returns New detached container instance along with associated services.
41
41
  */
@@ -62,8 +62,8 @@ class AzureClient {
62
62
  return { container: fluidContainer, services };
63
63
  }
64
64
  /**
65
- * Accesses the existing container given its unique ID in the Azure Fluid Relay service.
66
- * @param id - Unique ID of the container in Azure Fluid Relay service
65
+ * Accesses the existing container given its unique ID in the Azure Fluid Relay.
66
+ * @param id - Unique ID of the container in Azure Fluid Relay.
67
67
  * @param containerSchema - Container schema used to access data objects in the container.
68
68
  * @returns Existing container instance along with associated services.
69
69
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uEAAqE;AAIrE,iFAAoE;AACpE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AAG,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;AAnGD,kCAmGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Container, Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory, IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { AttachState } 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 {\n AzureClientProps,\n AzureContainerServices,\n} from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } from \"./AzureUrlResolver\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay service\n */\nexport const LOCAL_MODE_TENANT_ID = \"local\";\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Relay Service or,\n * when running with local tenantId, have it be backed by a Tinylicious local service 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 this.props.connection.tenantId,\n this.props.connection.orderer,\n this.props.connection.storage,\n );\n // The local service implementation differs from the Azure Fluid Relay service in blob\n // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n const enableWholeSummaryUpload = 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 Relay Service.\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<{ container: IFluidContainer; services: AzureContainerServices }> {\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>(container, \"/\");\n\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\"Cannot attach container. Container is not in detached state\");\n }\n const request = createAzureCreateNewRequest();\n await container.attach(request);\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 service.\n * @param id - Unique ID of the container in Azure Fluid Relay service\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<{ container: IFluidContainer; services: AzureContainerServices }> {\n const loader = this.createLoader(containerSchema);\n const container = await loader.resolve({ url: id });\n const rootDataObject = await requestFluidObject<RootDataObject>(container, \"/\");\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(\n container: Container,\n ): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(\n containerSchema: ContainerSchema,\n ): 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,uEAAqE;AAIrE,iFAAoE;AACpE,+EAA2F;AAC3F,iEAAmE;AACnE,+DAAsE;AACtE,+DAMsC;AAMtC,mDAAgD;AAChD,yDAAmF;AAEnF;;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,CACnC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,EAC9B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,EAC7B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAChC,CAAC;QACF,8EAA8E;QAC9E,6FAA6F;QAC7F,MAAM,wBAAwB,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,KAAK,4BAAoB,CAAC;QACzF,IAAI,CAAC,sBAAsB,GAAG,IAAI,0DAAmC,CACjE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,EACnC,EAAE,wBAAwB,EAAE,CAC/B,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe,CACxB,eAAgC;QAEhC,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;QAElD,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC;YACnD,OAAO,EAAE,oBAAoB;YAC7B,MAAM,E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AAQ,EAAE,CAAC;IACnD,CAAC;IAEO,oBAAoB,CACxB,SAAoB;QAEpB,OAAO;YACH,QAAQ,EAAE,IAAI,6BAAa,CAAC,SAAS,CAAC;SACzC,CAAC;IACN,CAAC;IAEO,YAAY,CAChB,eAAgC;QAEhC,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;AAnGD,kCAmGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Container, Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory, IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { AttachState } 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 {\n AzureClientProps,\n AzureContainerServices,\n} from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } 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 this.props.connection.tenantId,\n this.props.connection.orderer,\n this.props.connection.storage,\n );\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 = 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<{ container: IFluidContainer; services: AzureContainerServices }> {\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>(container, \"/\");\n\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\"Cannot attach container. Container is not in detached state\");\n }\n const request = createAzureCreateNewRequest();\n await container.attach(request);\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<{ container: IFluidContainer; services: AzureContainerServices }> {\n const loader = this.createLoader(containerSchema);\n const container = await loader.resolve({ url: id });\n const rootDataObject = await requestFluidObject<RootDataObject>(container, \"/\");\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(\n container: Container,\n ): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(\n containerSchema: ContainerSchema,\n ): 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"]}
@@ -6,7 +6,7 @@ import { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-dr
6
6
  import { AzureMember } from "./interfaces";
7
7
  /**
8
8
  * Token Provider implementation for connecting to an Azure Function endpoint for
9
- * Azure Fluid Relay service token resolution.
9
+ * Azure Fluid Relay token resolution.
10
10
  */
11
11
  export declare class AzureFunctionTokenProvider implements ITokenProvider {
12
12
  private readonly azFunctionUrl;
@@ -11,7 +11,7 @@ exports.AzureFunctionTokenProvider = void 0;
11
11
  const axios_1 = __importDefault(require("axios"));
12
12
  /**
13
13
  * Token Provider implementation for connecting to an Azure Function endpoint for
14
- * Azure Fluid Relay service token resolution.
14
+ * Azure Fluid Relay token resolution.
15
15
  */
16
16
  class AzureFunctionTokenProvider {
17
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AzureFunctionTokenProvider.js","sourceRoot":"","sources":["../src/AzureFunctionTokenProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAGH,kDAA0B;AAG1B;;;GAGG;AACH,MAAa,0BAA0B;IACnC;;;;OAIG;IACH,YACqB,aAAqB,EACrB,IAAqE;QADrE,kBAAa,GAAb,aAAa,CAAQ;QACrB,SAAI,GAAJ,IAAI,CAAiE;IACtF,CAAC;IAEE,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAmB;QAChE,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAkB;QAC/D,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,UAA8B;;QACnE,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE;YACjD,MAAM,EAAE;gBACJ,QAAQ;gBACR,UAAU;gBACV,MAAM,QAAE,IAAI,CAAC,IAAI,0CAAE,MAAM;gBACzB,QAAQ,QAAE,IAAI,CAAC,IAAI,0CAAE,QAAQ;gBAC7B,iBAAiB,QAAE,IAAI,CAAC,IAAI,0CAAE,iBAAiB;aAClD;SACJ,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAc,CAAC;IACnC,CAAC;CACJ;AAnCD,gEAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nimport axios from \"axios\";\nimport { AzureMember } from \"./interfaces\";\n\n/**\n * Token Provider implementation for connecting to an Azure Function endpoint for\n * Azure Fluid Relay service token resolution.\n */\nexport class AzureFunctionTokenProvider implements ITokenProvider {\n /**\n * Creates a new instance using configuration parameters.\n * @param azFunctionUrl - URL to Azure Function endpoint\n * @param user - User object\n */\n constructor(\n private readonly azFunctionUrl: string,\n private readonly user?: Pick<AzureMember, \"userId\" | \"userName\" | \"additionalDetails\">,\n ) { }\n\n public async fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n public async fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n private async getToken(tenantId: string, documentId: string | undefined): Promise<string> {\n const response = await axios.get(this.azFunctionUrl, {\n params: {\n tenantId,\n documentId,\n userId: this.user?.userId,\n userName: this.user?.userName,\n additionalDetails: this.user?.additionalDetails,\n },\n });\n return response.data as string;\n }\n}\n"]}
1
+ {"version":3,"file":"AzureFunctionTokenProvider.js","sourceRoot":"","sources":["../src/AzureFunctionTokenProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAGH,kDAA0B;AAG1B;;;GAGG;AACH,MAAa,0BAA0B;IACnC;;;;OAIG;IACH,YACqB,aAAqB,EACrB,IAAqE;QADrE,kBAAa,GAAb,aAAa,CAAQ;QACrB,SAAI,GAAJ,IAAI,CAAiE;IACtF,CAAC;IAEE,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAmB;QAChE,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAkB;QAC/D,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,UAA8B;;QACnE,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE;YACjD,MAAM,EAAE;gBACJ,QAAQ;gBACR,UAAU;gBACV,MAAM,QAAE,IAAI,CAAC,IAAI,0CAAE,MAAM;gBACzB,QAAQ,QAAE,IAAI,CAAC,IAAI,0CAAE,QAAQ;gBAC7B,iBAAiB,QAAE,IAAI,CAAC,IAAI,0CAAE,iBAAiB;aAClD;SACJ,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAc,CAAC;IACnC,CAAC;CACJ;AAnCD,gEAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nimport axios from \"axios\";\nimport { AzureMember } from \"./interfaces\";\n\n/**\n * Token Provider implementation for connecting to an Azure Function endpoint for\n * Azure Fluid Relay token resolution.\n */\nexport class AzureFunctionTokenProvider implements ITokenProvider {\n /**\n * Creates a new instance using configuration parameters.\n * @param azFunctionUrl - URL to Azure Function endpoint\n * @param user - User object\n */\n constructor(\n private readonly azFunctionUrl: string,\n private readonly user?: Pick<AzureMember, \"userId\" | \"userName\" | \"additionalDetails\">,\n ) { }\n\n public async fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n public async fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n private async getToken(tenantId: string, documentId: string | undefined): Promise<string> {\n const response = await axios.get(this.azFunctionUrl, {\n params: {\n tenantId,\n documentId,\n userId: this.user?.userId,\n userName: this.user?.userName,\n additionalDetails: this.user?.additionalDetails,\n },\n });\n return response.data as string;\n }\n}\n"]}
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.createAzureCreateNewRequest = exports.AzureUrlResolver = void 0;
8
8
  const driver_definitions_1 = require("@fluidframework/driver-definitions");
9
- // Implementation of a URL resolver to resolve documents stored using the Azure Relay Service
9
+ // Implementation of a URL resolver to resolve documents stored using the Azure Fluid Relay
10
10
  // based off of the orderer and storage URLs provide. The token provider here can be a
11
11
  // InsecureTokenProvider for basic scenarios or more robust, secure providers that fulfill the
12
12
  // ITokenProvider interface
@@ -1 +1 @@
1
- {"version":3,"file":"AzureUrlResolver.js","sourceRoot":"","sources":["../src/AzureUrlResolver.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2EAK4C;AAE5C,6FAA6F;AAC7F,sFAAsF;AACtF,8FAA8F;AAC9F,2BAA2B;AAC3B,MAAa,gBAAgB;IACzB,YACqB,QAAgB,EAChB,OAAe,EACf,OAAe;QAFf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAQ;IAChC,CAAC;IAEE,KAAK,CAAC,OAAO,CAAC,OAAiB;QAClC,oEAAoE;QACpE,uFAAuF;QACvF,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,iCAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;YACrE,OAAO;gBACH,SAAS,EAAE;oBACP,eAAe,EAAE,GAAG,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,QAAQ,MAAM;oBAC9D,UAAU,EAAE,IAAI,CAAC,OAAO;oBACxB,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,UAAU,IAAI,CAAC,QAAQ,EAAE;iBACvD;gBACD,0FAA0F;gBAC1F,EAAE,EAAE,EAAE;gBACN,+EAA+E;gBAC/E,MAAM,EAAE,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,MAAM;aAC9C,CAAC;SACL;QACD,sFAAsF;QACtF,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,IAAI,WAAW,EAAE,CAAC;QACtE,OAAO,OAAO,CAAC,OAAO,CAAC;YACnB,SAAS,EAAE;gBACP,eAAe,EAAE,GAAG,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,QAAQ,IAAI,WAAW,EAAE;gBACzE,UAAU,EAAE,IAAI,CAAC,OAAO;gBACxB,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,UAAU,IAAI,CAAC,QAAQ,EAAE;aACvD;YACD,EAAE,EAAE,WAAW;YACf,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,OAAO;YACb,GAAG,EAAE,WAAW;SACnB,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,WAAyB,EAAE,WAAmB;QACtE,IAAI,WAAW,CAAC,IAAI,KAAK,OAAO,EAAE;YAC9B,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,WAAW,CAAC,GAAG,IAAI,WAAW,EAAE,CAAC;IAC/C,CAAC;CACJ;AA/CD,4CA+CC;AAEM,MAAM,2BAA2B,GAAG,GAAa,EAAE,CAAC,CACvD;IACI,GAAG,EAAE,EAAE;IACP,OAAO,EAAE;QACL,CAAC,iCAAY,CAAC,SAAS,CAAC,EAAE,IAAI;KACjC;CACJ,CACJ,CAAC;AAPW,QAAA,2BAA2B,+BAOtC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport {\n DriverHeader,\n IFluidResolvedUrl,\n IResolvedUrl,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\n\n// Implementation of a URL resolver to resolve documents stored using the Azure Relay Service\n// based off of the orderer and storage URLs provide. The token provider here can be a\n// InsecureTokenProvider for basic scenarios or more robust, secure providers that fulfill the\n// ITokenProvider interface\nexport class AzureUrlResolver implements IUrlResolver {\n constructor(\n private readonly tenantId: string,\n private readonly orderer: string,\n private readonly storage: string,\n ) { }\n\n public async resolve(request: IRequest): Promise<IFluidResolvedUrl> {\n // determine whether the request is for creating of a new container.\n // such request has the `createNew` header set to true and doesn't have a container ID.\n if (request.headers && request.headers[DriverHeader.createNew] === true) {\n return {\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/new`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n // id is a mandatory attribute, but it's ignored by the driver for new container requests.\n id: \"\",\n // tokens attribute is redundant as all tokens are generated via ITokenProvider\n tokens: {},\n type: \"fluid\",\n url: `${this.orderer}/${this.tenantId}/new`,\n };\n }\n // for an existing container we'll parse the request URL to determine the document ID.\n const containerId = request.url.split(\"/\")[0];\n const documentUrl = `${this.orderer}/${this.tenantId}/${containerId}`;\n return Promise.resolve({\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/${containerId}`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n id: containerId,\n tokens: {},\n type: \"fluid\",\n url: documentUrl,\n });\n }\n\n public async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {\n if (resolvedUrl.type !== \"fluid\") {\n throw Error(\"Invalid Resolved Url\");\n }\n return `${resolvedUrl.url}/${relativeUrl}`;\n }\n}\n\nexport const createAzureCreateNewRequest = (): IRequest => (\n {\n url: \"\",\n headers: {\n [DriverHeader.createNew]: true,\n },\n }\n);\n"]}
1
+ {"version":3,"file":"AzureUrlResolver.js","sourceRoot":"","sources":["../src/AzureUrlResolver.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,2EAK4C;AAE5C,2FAA2F;AAC3F,sFAAsF;AACtF,8FAA8F;AAC9F,2BAA2B;AAC3B,MAAa,gBAAgB;IACzB,YACqB,QAAgB,EAChB,OAAe,EACf,OAAe;QAFf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAQ;IAChC,CAAC;IAEE,KAAK,CAAC,OAAO,CAAC,OA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AAO,EAAE;YAC9B,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,WAAW,CAAC,GAAG,IAAI,WAAW,EAAE,CAAC;IAC/C,CAAC;CACJ;AA/CD,4CA+CC;AAEM,MAAM,2BAA2B,GAAG,GAAa,EAAE,CAAC,CACvD;IACI,GAAG,EAAE,EAAE;IACP,OAAO,EAAE;QACL,CAAC,iCAAY,CAAC,SAAS,CAAC,EAAE,IAAI;KACjC;CACJ,CACJ,CAAC;AAPW,QAAA,2BAA2B,+BAOtC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport {\n DriverHeader,\n IFluidResolvedUrl,\n IResolvedUrl,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\n\n// Implementation of a URL resolver to resolve documents stored using the Azure Fluid Relay\n// based off of the orderer and storage URLs provide. The token provider here can be a\n// InsecureTokenProvider for basic scenarios or more robust, secure providers that fulfill the\n// ITokenProvider interface\nexport class AzureUrlResolver implements IUrlResolver {\n constructor(\n private readonly tenantId: string,\n private readonly orderer: string,\n private readonly storage: string,\n ) { }\n\n public async resolve(request: IRequest): Promise<IFluidResolvedUrl> {\n // determine whether the request is for creating of a new container.\n // such request has the `createNew` header set to true and doesn't have a container ID.\n if (request.headers && request.headers[DriverHeader.createNew] === true) {\n return {\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/new`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n // id is a mandatory attribute, but it's ignored by the driver for new container requests.\n id: \"\",\n // tokens attribute is redundant as all tokens are generated via ITokenProvider\n tokens: {},\n type: \"fluid\",\n url: `${this.orderer}/${this.tenantId}/new`,\n };\n }\n // for an existing container we'll parse the request URL to determine the document ID.\n const containerId = request.url.split(\"/\")[0];\n const documentUrl = `${this.orderer}/${this.tenantId}/${containerId}`;\n return Promise.resolve({\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/${containerId}`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n id: containerId,\n tokens: {},\n type: \"fluid\",\n url: documentUrl,\n });\n }\n\n public async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {\n if (resolvedUrl.type !== \"fluid\") {\n throw Error(\"Invalid Resolved Url\");\n }\n return `${resolvedUrl.url}/${relativeUrl}`;\n }\n}\n\nexport const createAzureCreateNewRequest = (): IRequest => (\n {\n url: \"\",\n headers: {\n [DriverHeader.createNew]: true,\n },\n }\n);\n"]}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.
6
+ * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
7
7
  *
8
8
  * @packageDocumentation
9
9
  */
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.ScopeType = void 0;
18
18
  /**
19
- * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.
19
+ * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
20
20
  *
21
21
  * @packageDocumentation
22
22
  */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;AAEH;;;;GAIG;AAEH,kDAAgC;AAChC,gDAA8B;AAC9B,+DAA6C;AAC7C,+CAA6B;AAG7B,6EAAsF;AAA7E,iHAAA,SAAS,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.\n *\n * @packageDocumentation\n */\n\nexport * from \"./AzureAudience\";\nexport * from \"./AzureClient\";\nexport * from \"./AzureFunctionTokenProvider\";\nexport * from \"./interfaces\";\n\nexport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nexport { ScopeType, ITokenClaims, IUser } from \"@fluidframework/protocol-definitions\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;AAEH;;;;GAIG;AAEH,kDAAgC;AAChC,gDAA8B;AAC9B,+DAA6C;AAC7C,+CAA6B;AAG7B,6EAAsF;AAA7E,iHAAA,SAAS,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.\n *\n * @packageDocumentation\n */\n\nexport * from \"./AzureAudience\";\nexport * from \"./AzureClient\";\nexport * from \"./AzureFunctionTokenProvider\";\nexport * from \"./interfaces\";\n\nexport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nexport { ScopeType, ITokenClaims, IUser } from \"@fluidframework/protocol-definitions\";\n"]}
@@ -11,7 +11,7 @@ export { ITelemetryBaseEvent, ITelemetryBaseLogger, } from "@fluidframework/comm
11
11
  */
12
12
  export interface AzureClientProps {
13
13
  /**
14
- * Configuration for establishing a connection with the Azure Relay Service.
14
+ * Configuration for establishing a connection with the Azure Fluid Relay.
15
15
  */
16
16
  readonly connection: AzureConnectionConfig;
17
17
  /**
@@ -20,7 +20,7 @@ export interface AzureClientProps {
20
20
  readonly logger?: ITelemetryBaseLogger;
21
21
  }
22
22
  /**
23
- * Parameters for establishing a connection with the Azure Fluid Relay service.
23
+ * Parameters for establishing a connection with the Azure Fluid Relay.
24
24
  */
25
25
  export interface AzureConnectionConfig {
26
26
  /**
@@ -42,7 +42,7 @@ export interface AzureConnectionConfig {
42
42
  }
43
43
  /**
44
44
  * AzureContainerServices is returned by the AzureClient alongside a FluidContainer.
45
- * It holds the functionality specifically tied to the Azure Fluid Relay service, and how the data stored in
45
+ * It holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
46
46
  * the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding
47
47
  * how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use,
48
48
  * will not be included here but rather on the FluidContainer class itself.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n IMember,\n IServiceAudience,\n} from \"@fluidframework/fluid-static\";\nimport { ITokenProvider } from \"@fluidframework/routerlicious-driver\";\n\n// Re-export so developers can build loggers without pulling in common-definitions\nexport {\n ITelemetryBaseEvent,\n ITelemetryBaseLogger,\n} from \"@fluidframework/common-definitions\";\n\n/**\n * Props for initializing a new AzureClient instance\n */\nexport interface AzureClientProps {\n /**\n * Configuration for establishing a connection with the Azure Relay Service.\n */\n readonly connection: AzureConnectionConfig,\n /**\n * Optional. A logger instance to receive diagnostic messages.\n */\n readonly logger?: ITelemetryBaseLogger,\n}\n\n/**\n * Parameters for establishing a connection with the Azure Fluid Relay service.\n */\nexport interface AzureConnectionConfig {\n /**\n * URI to the Azure Fluid Relay orderer endpoint\n */\n orderer: string;\n /**\n * URI to the Azure Fluid Relay storage endpoint\n */\n storage: string;\n /**\n * Unique tenant identifier\n */\n tenantId: \"local\" | string;\n /**\n * Instance that provides Azure Fluid Relay endpoint tokens\n */\n tokenProvider: ITokenProvider;\n}\n\n/**\n * AzureContainerServices is returned by the AzureClient alongside a FluidContainer.\n * It holds the functionality specifically tied to the Azure Fluid Relay service, and how the data stored in\n * the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding\n * how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use,\n * will not be included here but rather on the FluidContainer class itself.\n */\nexport interface AzureContainerServices {\n /**\n * Provides an object that can be used to get the users that are present in this Fluid session and\n * listeners for when the roster has any changes from users joining/leaving the session\n */\n audience: IAzureAudience;\n}\n\n/**\n * Since Azure provides user names for all of its members, we extend the IMember interface to include\n * this service-specific value. It will be returned for all audience members connected to Azure.\n */\nexport interface AzureMember<T = any> extends IMember {\n userName: string;\n additionalDetails?: T;\n}\n\n/**\n * Audience object for Azure Fluid Relay containers\n */\nexport type IAzureAudience = IServiceAudience<AzureMember>;\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n IMember,\n IServiceAudience,\n} from \"@fluidframework/fluid-static\";\nimport { ITokenProvider } from \"@fluidframework/routerlicious-driver\";\n\n// Re-export so developers can build loggers without pulling in common-definitions\nexport {\n ITelemetryBaseEvent,\n ITelemetryBaseLogger,\n} from \"@fluidframework/common-definitions\";\n\n/**\n * Props for initializing a new AzureClient instance\n */\nexport interface AzureClientProps {\n /**\n * Configuration for establishing a connection with the Azure Fluid Relay.\n */\n readonly connection: AzureConnectionConfig,\n /**\n * Optional. A logger instance to receive diagnostic messages.\n */\n readonly logger?: ITelemetryBaseLogger,\n}\n\n/**\n * Parameters for establishing a connection with the Azure Fluid Relay.\n */\nexport interface AzureConnectionConfig {\n /**\n * URI to the Azure Fluid Relay orderer endpoint\n */\n orderer: string;\n /**\n * URI to the Azure Fluid Relay storage endpoint\n */\n storage: string;\n /**\n * Unique tenant identifier\n */\n tenantId: \"local\" | string;\n /**\n * Instance that provides Azure Fluid Relay endpoint tokens\n */\n tokenProvider: ITokenProvider;\n}\n\n/**\n * AzureContainerServices is returned by the AzureClient alongside a FluidContainer.\n * It holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in\n * the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding\n * how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use,\n * will not be included here but rather on the FluidContainer class itself.\n */\nexport interface AzureContainerServices {\n /**\n * Provides an object that can be used to get the users that are present in this Fluid session and\n * listeners for when the roster has any changes from users joining/leaving the session\n */\n audience: IAzureAudience;\n}\n\n/**\n * Since Azure provides user names for all of its members, we extend the IMember interface to include\n * this service-specific value. It will be returned for all audience members connected to Azure.\n */\nexport interface AzureMember<T = any> extends IMember {\n userName: string;\n additionalDetails?: T;\n}\n\n/**\n * Audience object for Azure Fluid Relay containers\n */\nexport type IAzureAudience = IServiceAudience<AzureMember>;\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.49.2";
8
+ export declare const pkgVersion = "0.50.0-41365";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,WAAW,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,iBAAiB,CAAC"}
@@ -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.49.2";
11
+ exports.pkgVersion = "0.50.0-41365";
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,QAAQ,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.49.2\";\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,cAAc,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.50.0-41365\";\n"]}
@@ -1,12 +1,12 @@
1
1
  import { ContainerSchema, IFluidContainer } from "@fluidframework/fluid-static";
2
2
  import { AzureClientProps, AzureContainerServices } from "./interfaces";
3
3
  /**
4
- * Strongly typed id for connecting to a local Azure Fluid Relay service
4
+ * Strongly typed id for connecting to a local Azure Fluid Relay.
5
5
  */
6
6
  export declare const LOCAL_MODE_TENANT_ID = "local";
7
7
  /**
8
- * AzureClient provides the ability to have a Fluid object backed by the Azure Relay Service or,
9
- * when running with local tenantId, have it be backed by a Tinylicious local service instance
8
+ * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
9
+ * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
10
10
  */
11
11
  export declare class AzureClient {
12
12
  private readonly props;
@@ -18,7 +18,7 @@ export declare class AzureClient {
18
18
  */
19
19
  constructor(props: AzureClientProps);
20
20
  /**
21
- * Creates a new detached container instance in the Azure Relay Service.
21
+ * Creates a new detached container instance in the Azure Fluid Relay.
22
22
  * @param containerSchema - Container schema for the new container.
23
23
  * @returns New detached container instance along with associated services.
24
24
  */
@@ -27,8 +27,8 @@ export declare class AzureClient {
27
27
  services: AzureContainerServices;
28
28
  }>;
29
29
  /**
30
- * Accesses the existing container given its unique ID in the Azure Fluid Relay service.
31
- * @param id - Unique ID of the container in Azure Fluid Relay service
30
+ * Accesses the existing container given its unique ID in the Azure Fluid Relay.
31
+ * @param id - Unique ID of the container in Azure Fluid Relay.
32
32
  * @param containerSchema - Container schema used to access data objects in the container.
33
33
  * @returns Existing container instance along with associated services.
34
34
  */
@@ -11,12 +11,12 @@ import { DOProviderContainerRuntimeFactory, FluidContainer, } from "@fluidframew
11
11
  import { AzureAudience } from "./AzureAudience";
12
12
  import { AzureUrlResolver, createAzureCreateNewRequest } from "./AzureUrlResolver";
13
13
  /**
14
- * Strongly typed id for connecting to a local Azure Fluid Relay service
14
+ * Strongly typed id for connecting to a local Azure Fluid Relay.
15
15
  */
16
16
  export const LOCAL_MODE_TENANT_ID = "local";
17
17
  /**
18
- * AzureClient provides the ability to have a Fluid object backed by the Azure Relay Service or,
19
- * when running with local tenantId, have it be backed by a Tinylicious local service instance
18
+ * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
19
+ * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
20
20
  */
21
21
  export class AzureClient {
22
22
  /**
@@ -26,13 +26,13 @@ export class AzureClient {
26
26
  constructor(props) {
27
27
  this.props = props;
28
28
  this.urlResolver = new AzureUrlResolver(this.props.connection.tenantId, this.props.connection.orderer, this.props.connection.storage);
29
- // The local service implementation differs from the Azure Fluid Relay service in blob
29
+ // The local service implementation differs from the Azure Fluid Relay in blob
30
30
  // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.
31
31
  const enableWholeSummaryUpload = this.props.connection.tenantId !== LOCAL_MODE_TENANT_ID;
32
32
  this.documentServiceFactory = new RouterliciousDocumentServiceFactory(this.props.connection.tokenProvider, { enableWholeSummaryUpload });
33
33
  }
34
34
  /**
35
- * Creates a new detached container instance in the Azure Relay Service.
35
+ * Creates a new detached container instance in the Azure Fluid Relay.
36
36
  * @param containerSchema - Container schema for the new container.
37
37
  * @returns New detached container instance along with associated services.
38
38
  */
@@ -59,8 +59,8 @@ export class AzureClient {
59
59
  return { container: fluidContainer, services };
60
60
  }
61
61
  /**
62
- * Accesses the existing container given its unique ID in the Azure Fluid Relay service.
63
- * @param id - Unique ID of the container in Azure Fluid Relay service
62
+ * Accesses the existing container given its unique ID in the Azure Fluid Relay.
63
+ * @param id - Unique ID of the container in Azure Fluid Relay.
64
64
  * @param containerSchema - Container schema used to access data objects in the container.
65
65
  * @returns Existing container instance along with associated services.
66
66
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAa,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAIrE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,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;AAMtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEnF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAA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C7B,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 { Container, Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory, IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { AttachState } 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 {\n AzureClientProps,\n AzureContainerServices,\n} from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } from \"./AzureUrlResolver\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay service\n */\nexport const LOCAL_MODE_TENANT_ID = \"local\";\n\n/**\n * AzureClient provides the ability to have a Fluid object backed by the Azure Relay Service or,\n * when running with local tenantId, have it be backed by a Tinylicious local service 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 this.props.connection.tenantId,\n this.props.connection.orderer,\n this.props.connection.storage,\n );\n // The local service implementation differs from the Azure Fluid Relay service in blob\n // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n const enableWholeSummaryUpload = 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 Relay Service.\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<{ container: IFluidContainer; services: AzureContainerServices }> {\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>(container, \"/\");\n\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\"Cannot attach container. Container is not in detached state\");\n }\n const request = createAzureCreateNewRequest();\n await container.attach(request);\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 service.\n * @param id - Unique ID of the container in Azure Fluid Relay service\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<{ container: IFluidContainer; services: AzureContainerServices }> {\n const loader = this.createLoader(containerSchema);\n const container = await loader.resolve({ url: id });\n const rootDataObject = await requestFluidObject<RootDataObject>(container, \"/\");\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(\n container: Container,\n ): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(\n containerSchema: ContainerSchema,\n ): 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,EAAa,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAIrE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,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;AAMtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEnF;;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,CACnC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,EAC9B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,EAC7B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAChC,CAAC;QACF,8EAA8E;QAC9E,6FAA6F;QAC7F,MAAM,wBAAwB,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,KAAK,oBAAoB,CAAC;QACzF,IAAI,CAAC,sBAAsB,GAAG,IAAI,mCAAmC,CACjE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,EACnC,EAAE,wBAAwB,EAAE,CAC/B,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,K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CAAC;QAChF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,QAAQ,GAAG,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;QACtD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;IACnD,CAAC;IAEO,oBAAoB,CACxB,SAAoB;QAEpB,OAAO;YACH,QAAQ,EAAE,IAAI,aAAa,CAAC,SAAS,CAAC;SACzC,CAAC;IACN,CAAC;IAEO,YAAY,CAChB,eAAgC;QAEhC,MAAM,cAAc,GAAG,IAAI,iCAAiC,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,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 { Container, Loader } from \"@fluidframework/container-loader\";\nimport {\n IDocumentServiceFactory, IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\nimport { AttachState } 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 {\n AzureClientProps,\n AzureContainerServices,\n} from \"./interfaces\";\nimport { AzureAudience } from \"./AzureAudience\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } 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 this.props.connection.tenantId,\n this.props.connection.orderer,\n this.props.connection.storage,\n );\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 = 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<{ container: IFluidContainer; services: AzureContainerServices }> {\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>(container, \"/\");\n\n const fluidContainer = new (class extends FluidContainer {\n async attach() {\n if (this.attachState !== AttachState.Detached) {\n throw new Error(\"Cannot attach container. Container is not in detached state\");\n }\n const request = createAzureCreateNewRequest();\n await container.attach(request);\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<{ container: IFluidContainer; services: AzureContainerServices }> {\n const loader = this.createLoader(containerSchema);\n const container = await loader.resolve({ url: id });\n const rootDataObject = await requestFluidObject<RootDataObject>(container, \"/\");\n const fluidContainer = new FluidContainer(container, rootDataObject);\n const services = this.getContainerServices(container);\n return { container: fluidContainer, services };\n }\n\n private getContainerServices(\n container: Container,\n ): AzureContainerServices {\n return {\n audience: new AzureAudience(container),\n };\n }\n\n private createLoader(\n containerSchema: ContainerSchema,\n ): 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"]}
@@ -6,7 +6,7 @@ import { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-dr
6
6
  import { AzureMember } from "./interfaces";
7
7
  /**
8
8
  * Token Provider implementation for connecting to an Azure Function endpoint for
9
- * Azure Fluid Relay service token resolution.
9
+ * Azure Fluid Relay token resolution.
10
10
  */
11
11
  export declare class AzureFunctionTokenProvider implements ITokenProvider {
12
12
  private readonly azFunctionUrl;
@@ -5,7 +5,7 @@
5
5
  import axios from "axios";
6
6
  /**
7
7
  * Token Provider implementation for connecting to an Azure Function endpoint for
8
- * Azure Fluid Relay service token resolution.
8
+ * Azure Fluid Relay token resolution.
9
9
  */
10
10
  export class AzureFunctionTokenProvider {
11
11
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AzureFunctionTokenProvider.js","sourceRoot":"","sources":["../src/AzureFunctionTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;GAGG;AACH,MAAM,OAAO,0BAA0B;IACnC;;;;OAIG;IACH,YACqB,aAAqB,EACrB,IAAqE;QADrE,kBAAa,GAAb,aAAa,CAAQ;QACrB,SAAI,GAAJ,IAAI,CAAiE;IACtF,CAAC;IAEE,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAmB;QAChE,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAkB;QAC/D,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,UAA8B;;QACnE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE;YACjD,MAAM,EAAE;gBACJ,QAAQ;gBACR,UAAU;gBACV,MAAM,QAAE,IAAI,CAAC,IAAI,0CAAE,MAAM;gBACzB,QAAQ,QAAE,IAAI,CAAC,IAAI,0CAAE,QAAQ;gBAC7B,iBAAiB,QAAE,IAAI,CAAC,IAAI,0CAAE,iBAAiB;aAClD;SACJ,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAc,CAAC;IACnC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nimport axios from \"axios\";\nimport { AzureMember } from \"./interfaces\";\n\n/**\n * Token Provider implementation for connecting to an Azure Function endpoint for\n * Azure Fluid Relay service token resolution.\n */\nexport class AzureFunctionTokenProvider implements ITokenProvider {\n /**\n * Creates a new instance using configuration parameters.\n * @param azFunctionUrl - URL to Azure Function endpoint\n * @param user - User object\n */\n constructor(\n private readonly azFunctionUrl: string,\n private readonly user?: Pick<AzureMember, \"userId\" | \"userName\" | \"additionalDetails\">,\n ) { }\n\n public async fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n public async fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n private async getToken(tenantId: string, documentId: string | undefined): Promise<string> {\n const response = await axios.get(this.azFunctionUrl, {\n params: {\n tenantId,\n documentId,\n userId: this.user?.userId,\n userName: this.user?.userName,\n additionalDetails: this.user?.additionalDetails,\n },\n });\n return response.data as string;\n }\n}\n"]}
1
+ {"version":3,"file":"AzureFunctionTokenProvider.js","sourceRoot":"","sources":["../src/AzureFunctionTokenProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;GAGG;AACH,MAAM,OAAO,0BAA0B;IACnC;;;;OAIG;IACH,YACqB,aAAqB,EACrB,IAAqE;QADrE,kBAAa,GAAb,aAAa,CAAQ;QACrB,SAAI,GAAJ,IAAI,CAAiE;IACtF,CAAC;IAEE,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAmB;QAChE,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,UAAkB;QAC/D,OAAO;YACH,GAAG,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;SACjD,CAAC;IACN,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,UAA8B;;QACnE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE;YACjD,MAAM,EAAE;gBACJ,QAAQ;gBACR,UAAU;gBACV,MAAM,QAAE,IAAI,CAAC,IAAI,0CAAE,MAAM;gBACzB,QAAQ,QAAE,IAAI,CAAC,IAAI,0CAAE,QAAQ;gBAC7B,iBAAiB,QAAE,IAAI,CAAC,IAAI,0CAAE,iBAAiB;aAClD;SACJ,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAc,CAAC;IACnC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nimport axios from \"axios\";\nimport { AzureMember } from \"./interfaces\";\n\n/**\n * Token Provider implementation for connecting to an Azure Function endpoint for\n * Azure Fluid Relay token resolution.\n */\nexport class AzureFunctionTokenProvider implements ITokenProvider {\n /**\n * Creates a new instance using configuration parameters.\n * @param azFunctionUrl - URL to Azure Function endpoint\n * @param user - User object\n */\n constructor(\n private readonly azFunctionUrl: string,\n private readonly user?: Pick<AzureMember, \"userId\" | \"userName\" | \"additionalDetails\">,\n ) { }\n\n public async fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n public async fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse> {\n return {\n jwt: await this.getToken(tenantId, documentId),\n };\n }\n\n private async getToken(tenantId: string, documentId: string | undefined): Promise<string> {\n const response = await axios.get(this.azFunctionUrl, {\n params: {\n tenantId,\n documentId,\n userId: this.user?.userId,\n userName: this.user?.userName,\n additionalDetails: this.user?.additionalDetails,\n },\n });\n return response.data as string;\n }\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { DriverHeader, } from "@fluidframework/driver-definitions";
6
- // Implementation of a URL resolver to resolve documents stored using the Azure Relay Service
6
+ // Implementation of a URL resolver to resolve documents stored using the Azure Fluid Relay
7
7
  // based off of the orderer and storage URLs provide. The token provider here can be a
8
8
  // InsecureTokenProvider for basic scenarios or more robust, secure providers that fulfill the
9
9
  // ITokenProvider interface
@@ -1 +1 @@
1
- {"version":3,"file":"AzureUrlResolver.js","sourceRoot":"","sources":["../src/AzureUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,YAAY,GAIf,MAAM,oCAAoC,CAAC;AAE5C,6FAA6F;AAC7F,sFAAsF;AACtF,8FAA8F;AAC9F,2BAA2B;AAC3B,MAAM,OAAO,gBAAgB;IACzB,YACqB,QAAgB,EAChB,OAAe,EACf,OAAe;QAFf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAQ;IAChC,CAAC;IAEE,KAAK,CAAC,OAAO,CAAC,OAAiB;QAClC,oEAAoE;QACpE,uFAAuF;QACvF,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;YACrE,OAAO;gBACH,SAAS,EAAE;oBACP,eAAe,EAAE,GAAG,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,QAAQ,MAAM;oBAC9D,UAAU,EAAE,IAAI,CAAC,OAAO;oBACxB,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,UAAU,IAAI,CAAC,QAAQ,EAAE;iBACvD;gBACD,0FAA0F;gBAC1F,EAAE,EAAE,EAAE;gBACN,+EAA+E;gBAC/E,MAAM,EAAE,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,MAAM;aAC9C,CAAC;SACL;QACD,sFAAsF;QACtF,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,IAAI,WAAW,EAAE,CAAC;QACtE,OAAO,OAAO,CAAC,OAAO,CAAC;YACnB,SAAS,EAAE;gBACP,eAAe,EAAE,GAAG,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,QAAQ,IAAI,WAAW,EAAE;gBACzE,UAAU,EAAE,IAAI,CAAC,OAAO;gBACxB,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,UAAU,IAAI,CAAC,QAAQ,EAAE;aACvD;YACD,EAAE,EAAE,WAAW;YACf,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,OAAO;YACb,GAAG,EAAE,WAAW;SACnB,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,WAAyB,EAAE,WAAmB;QACtE,IAAI,WAAW,CAAC,IAAI,KAAK,OAAO,EAAE;YAC9B,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,WAAW,CAAC,GAAG,IAAI,WAAW,EAAE,CAAC;IAC/C,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAa,EAAE,CAAC,CACvD;IACI,GAAG,EAAE,EAAE;IACP,OAAO,EAAE;QACL,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,IAAI;KACjC;CACJ,CACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport {\n DriverHeader,\n IFluidResolvedUrl,\n IResolvedUrl,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\n\n// Implementation of a URL resolver to resolve documents stored using the Azure Relay Service\n// based off of the orderer and storage URLs provide. The token provider here can be a\n// InsecureTokenProvider for basic scenarios or more robust, secure providers that fulfill the\n// ITokenProvider interface\nexport class AzureUrlResolver implements IUrlResolver {\n constructor(\n private readonly tenantId: string,\n private readonly orderer: string,\n private readonly storage: string,\n ) { }\n\n public async resolve(request: IRequest): Promise<IFluidResolvedUrl> {\n // determine whether the request is for creating of a new container.\n // such request has the `createNew` header set to true and doesn't have a container ID.\n if (request.headers && request.headers[DriverHeader.createNew] === true) {\n return {\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/new`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n // id is a mandatory attribute, but it's ignored by the driver for new container requests.\n id: \"\",\n // tokens attribute is redundant as all tokens are generated via ITokenProvider\n tokens: {},\n type: \"fluid\",\n url: `${this.orderer}/${this.tenantId}/new`,\n };\n }\n // for an existing container we'll parse the request URL to determine the document ID.\n const containerId = request.url.split(\"/\")[0];\n const documentUrl = `${this.orderer}/${this.tenantId}/${containerId}`;\n return Promise.resolve({\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/${containerId}`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n id: containerId,\n tokens: {},\n type: \"fluid\",\n url: documentUrl,\n });\n }\n\n public async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {\n if (resolvedUrl.type !== \"fluid\") {\n throw Error(\"Invalid Resolved Url\");\n }\n return `${resolvedUrl.url}/${relativeUrl}`;\n }\n}\n\nexport const createAzureCreateNewRequest = (): IRequest => (\n {\n url: \"\",\n headers: {\n [DriverHeader.createNew]: true,\n },\n }\n);\n"]}
1
+ {"version":3,"file":"AzureUrlResolver.js","sourceRoot":"","sources":["../src/AzureUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,YAAY,GAIf,MAAM,oCAAoC,CAAC;AAE5C,2FAA2F;AAC3F,sFAAsF;AACtF,8FAA8F;AAC9F,2BAA2B;AAC3B,MAAM,OAAO,gBAAgB;IACzB,YACqB,QAAgB,EAChB,OAAe,EACf,OAAe;QAFf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AAG,EAAE,WAAW;SACnB,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,WAAyB,EAAE,WAAmB;QACtE,IAAI,WAAW,CAAC,IAAI,KAAK,OAAO,EAAE;YAC9B,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,WAAW,CAAC,GAAG,IAAI,WAAW,EAAE,CAAC;IAC/C,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAa,EAAE,CAAC,CACvD;IACI,GAAG,EAAE,EAAE;IACP,OAAO,EAAE;QACL,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,IAAI;KACjC;CACJ,CACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport {\n DriverHeader,\n IFluidResolvedUrl,\n IResolvedUrl,\n IUrlResolver,\n} from \"@fluidframework/driver-definitions\";\n\n// Implementation of a URL resolver to resolve documents stored using the Azure Fluid Relay\n// based off of the orderer and storage URLs provide. The token provider here can be a\n// InsecureTokenProvider for basic scenarios or more robust, secure providers that fulfill the\n// ITokenProvider interface\nexport class AzureUrlResolver implements IUrlResolver {\n constructor(\n private readonly tenantId: string,\n private readonly orderer: string,\n private readonly storage: string,\n ) { }\n\n public async resolve(request: IRequest): Promise<IFluidResolvedUrl> {\n // determine whether the request is for creating of a new container.\n // such request has the `createNew` header set to true and doesn't have a container ID.\n if (request.headers && request.headers[DriverHeader.createNew] === true) {\n return {\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/new`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n // id is a mandatory attribute, but it's ignored by the driver for new container requests.\n id: \"\",\n // tokens attribute is redundant as all tokens are generated via ITokenProvider\n tokens: {},\n type: \"fluid\",\n url: `${this.orderer}/${this.tenantId}/new`,\n };\n }\n // for an existing container we'll parse the request URL to determine the document ID.\n const containerId = request.url.split(\"/\")[0];\n const documentUrl = `${this.orderer}/${this.tenantId}/${containerId}`;\n return Promise.resolve({\n endpoints: {\n deltaStorageUrl: `${this.orderer}/deltas/${this.tenantId}/${containerId}`,\n ordererUrl: this.orderer,\n storageUrl: `${this.storage}/repos/${this.tenantId}`,\n },\n id: containerId,\n tokens: {},\n type: \"fluid\",\n url: documentUrl,\n });\n }\n\n public async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {\n if (resolvedUrl.type !== \"fluid\") {\n throw Error(\"Invalid Resolved Url\");\n }\n return `${resolvedUrl.url}/${relativeUrl}`;\n }\n}\n\nexport const createAzureCreateNewRequest = (): IRequest => (\n {\n url: \"\",\n headers: {\n [DriverHeader.createNew]: true,\n },\n }\n);\n"]}
package/lib/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.
6
+ * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
7
7
  *
8
8
  * @packageDocumentation
9
9
  */
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.
6
+ * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
7
7
  *
8
8
  * @packageDocumentation
9
9
  */
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,SAAS,EAAuB,MAAM,sCAAsC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.\n *\n * @packageDocumentation\n */\n\nexport * from \"./AzureAudience\";\nexport * from \"./AzureClient\";\nexport * from \"./AzureFunctionTokenProvider\";\nexport * from \"./interfaces\";\n\nexport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nexport { ScopeType, ITokenClaims, IUser } from \"@fluidframework/protocol-definitions\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,SAAS,EAAuB,MAAM,sCAAsC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.\n *\n * @packageDocumentation\n */\n\nexport * from \"./AzureAudience\";\nexport * from \"./AzureClient\";\nexport * from \"./AzureFunctionTokenProvider\";\nexport * from \"./interfaces\";\n\nexport { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nexport { ScopeType, ITokenClaims, IUser } from \"@fluidframework/protocol-definitions\";\n"]}
@@ -11,7 +11,7 @@ export { ITelemetryBaseEvent, ITelemetryBaseLogger, } from "@fluidframework/comm
11
11
  */
12
12
  export interface AzureClientProps {
13
13
  /**
14
- * Configuration for establishing a connection with the Azure Relay Service.
14
+ * Configuration for establishing a connection with the Azure Fluid Relay.
15
15
  */
16
16
  readonly connection: AzureConnectionConfig;
17
17
  /**
@@ -20,7 +20,7 @@ export interface AzureClientProps {
20
20
  readonly logger?: ITelemetryBaseLogger;
21
21
  }
22
22
  /**
23
- * Parameters for establishing a connection with the Azure Fluid Relay service.
23
+ * Parameters for establishing a connection with the Azure Fluid Relay.
24
24
  */
25
25
  export interface AzureConnectionConfig {
26
26
  /**
@@ -42,7 +42,7 @@ export interface AzureConnectionConfig {
42
42
  }
43
43
  /**
44
44
  * AzureContainerServices is returned by the AzureClient alongside a FluidContainer.
45
- * It holds the functionality specifically tied to the Azure Fluid Relay service, and how the data stored in
45
+ * It holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
46
46
  * the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding
47
47
  * how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use,
48
48
  * will not be included here but rather on the FluidContainer class itself.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n IMember,\n IServiceAudience,\n} from \"@fluidframework/fluid-static\";\nimport { ITokenProvider } from \"@fluidframework/routerlicious-driver\";\n\n// Re-export so developers can build loggers without pulling in common-definitions\nexport {\n ITelemetryBaseEvent,\n ITelemetryBaseLogger,\n} from \"@fluidframework/common-definitions\";\n\n/**\n * Props for initializing a new AzureClient instance\n */\nexport interface AzureClientProps {\n /**\n * Configuration for establishing a connection with the Azure Relay Service.\n */\n readonly connection: AzureConnectionConfig,\n /**\n * Optional. A logger instance to receive diagnostic messages.\n */\n readonly logger?: ITelemetryBaseLogger,\n}\n\n/**\n * Parameters for establishing a connection with the Azure Fluid Relay service.\n */\nexport interface AzureConnectionConfig {\n /**\n * URI to the Azure Fluid Relay orderer endpoint\n */\n orderer: string;\n /**\n * URI to the Azure Fluid Relay storage endpoint\n */\n storage: string;\n /**\n * Unique tenant identifier\n */\n tenantId: \"local\" | string;\n /**\n * Instance that provides Azure Fluid Relay endpoint tokens\n */\n tokenProvider: ITokenProvider;\n}\n\n/**\n * AzureContainerServices is returned by the AzureClient alongside a FluidContainer.\n * It holds the functionality specifically tied to the Azure Fluid Relay service, and how the data stored in\n * the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding\n * how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use,\n * will not be included here but rather on the FluidContainer class itself.\n */\nexport interface AzureContainerServices {\n /**\n * Provides an object that can be used to get the users that are present in this Fluid session and\n * listeners for when the roster has any changes from users joining/leaving the session\n */\n audience: IAzureAudience;\n}\n\n/**\n * Since Azure provides user names for all of its members, we extend the IMember interface to include\n * this service-specific value. It will be returned for all audience members connected to Azure.\n */\nexport interface AzureMember<T = any> extends IMember {\n userName: string;\n additionalDetails?: T;\n}\n\n/**\n * Audience object for Azure Fluid Relay containers\n */\nexport type IAzureAudience = IServiceAudience<AzureMember>;\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n IMember,\n IServiceAudience,\n} from \"@fluidframework/fluid-static\";\nimport { ITokenProvider } from \"@fluidframework/routerlicious-driver\";\n\n// Re-export so developers can build loggers without pulling in common-definitions\nexport {\n ITelemetryBaseEvent,\n ITelemetryBaseLogger,\n} from \"@fluidframework/common-definitions\";\n\n/**\n * Props for initializing a new AzureClient instance\n */\nexport interface AzureClientProps {\n /**\n * Configuration for establishing a connection with the Azure Fluid Relay.\n */\n readonly connection: AzureConnectionConfig,\n /**\n * Optional. A logger instance to receive diagnostic messages.\n */\n readonly logger?: ITelemetryBaseLogger,\n}\n\n/**\n * Parameters for establishing a connection with the Azure Fluid Relay.\n */\nexport interface AzureConnectionConfig {\n /**\n * URI to the Azure Fluid Relay orderer endpoint\n */\n orderer: string;\n /**\n * URI to the Azure Fluid Relay storage endpoint\n */\n storage: string;\n /**\n * Unique tenant identifier\n */\n tenantId: \"local\" | string;\n /**\n * Instance that provides Azure Fluid Relay endpoint tokens\n */\n tokenProvider: ITokenProvider;\n}\n\n/**\n * AzureContainerServices is returned by the AzureClient alongside a FluidContainer.\n * It holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in\n * the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding\n * how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use,\n * will not be included here but rather on the FluidContainer class itself.\n */\nexport interface AzureContainerServices {\n /**\n * Provides an object that can be used to get the users that are present in this Fluid session and\n * listeners for when the roster has any changes from users joining/leaving the session\n */\n audience: IAzureAudience;\n}\n\n/**\n * Since Azure provides user names for all of its members, we extend the IMember interface to include\n * this service-specific value. It will be returned for all audience members connected to Azure.\n */\nexport interface AzureMember<T = any> extends IMember {\n userName: string;\n additionalDetails?: T;\n}\n\n/**\n * Audience object for Azure Fluid Relay containers\n */\nexport type IAzureAudience = IServiceAudience<AzureMember>;\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.49.2";
8
+ export declare const pkgVersion = "0.50.0-41365";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,WAAW,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,iBAAiB,CAAC"}
@@ -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.49.2";
8
+ export const pkgVersion = "0.50.0-41365";
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,QAAQ,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.49.2\";\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,cAAc,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.50.0-41365\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/azure-client",
3
- "version": "0.49.2",
3
+ "version": "0.50.0-41365",
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": "https://github.com/microsoft/FluidFramework",
@@ -28,8 +28,8 @@
28
28
  "lint:fix": "npm run eslint:fix",
29
29
  "start:tinylicious:test": "npx @fluidframework/azure-local-service > tinylicious.log 2>&1",
30
30
  "test:realsvc": "npm run test:realsvc:tinylicious",
31
- "test:realsvc:azure": "cross-env process.env.FLUID_CLIENT='\"azure\"' && npm run test:realsvc:azure:run",
32
- "test:realsvc:azure:run": "mocha --unhandled-rejections=strict --recursive dist/test/**/*.spec.js --exit",
31
+ "test:realsvc:azure": "cross-env FLUID_CLIENT=azure npm run test:realsvc:azure:run",
32
+ "test:realsvc:azure:run": "mocha --unhandled-rejections=strict --recursive dist/test/**/*.spec.js --exit --timeout 10000",
33
33
  "test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test 7070 test:realsvc:azure:run",
34
34
  "tsc": "tsc",
35
35
  "tsfmt": "tsfmt --verify",
@@ -38,24 +38,25 @@
38
38
  "dependencies": {
39
39
  "@fluidframework/common-definitions": "^0.20.1",
40
40
  "@fluidframework/container-definitions": "^0.40.0",
41
- "@fluidframework/container-loader": "^0.49.2",
41
+ "@fluidframework/container-loader": "0.50.0-41365",
42
42
  "@fluidframework/core-interfaces": "^0.39.7",
43
43
  "@fluidframework/driver-definitions": "^0.40.0",
44
- "@fluidframework/driver-utils": "^0.49.2",
45
- "@fluidframework/fluid-static": "^0.49.2",
46
- "@fluidframework/map": "^0.49.2",
47
- "@fluidframework/protocol-definitions": "^0.1025.1",
48
- "@fluidframework/routerlicious-driver": "^0.49.2",
49
- "@fluidframework/runtime-utils": "^0.49.2",
50
- "@fluidframework/server-services-client": "^0.1032.0",
44
+ "@fluidframework/driver-utils": "0.50.0-41365",
45
+ "@fluidframework/fluid-static": "0.50.0-41365",
46
+ "@fluidframework/map": "0.50.0-41365",
47
+ "@fluidframework/protocol-definitions": "^0.1025.0",
48
+ "@fluidframework/routerlicious-driver": "0.50.0-41365",
49
+ "@fluidframework/runtime-utils": "0.50.0-41365",
50
+ "@fluidframework/server-services-client": "^0.1033.0-41017",
51
51
  "axios": "^0.21.1",
52
52
  "uuid": "^8.3.1"
53
53
  },
54
54
  "devDependencies": {
55
+ "@fluidframework/aqueduct": "0.50.0-41365",
55
56
  "@fluidframework/azure-local-service": "^0.1.38773",
56
57
  "@fluidframework/build-common": "^0.23.0",
57
58
  "@fluidframework/eslint-config-fluid": "^0.23.0",
58
- "@fluidframework/test-client-utils": "^0.49.2",
59
+ "@fluidframework/test-client-utils": "0.50.0-41365",
59
60
  "@microsoft/api-extractor": "^7.16.1",
60
61
  "@types/mocha": "^8.2.2",
61
62
  "concurrently": "^5.2.0",
@@ -68,6 +69,6 @@
68
69
  "typescript": "~4.1.3"
69
70
  },
70
71
  "peerDependencies": {
71
- "fluid-framework": "^0.49.1"
72
+ "fluid-framework": "^0.50.0"
72
73
  }
73
74
  }
@@ -26,13 +26,13 @@ import { AzureAudience } from "./AzureAudience";
26
26
  import { AzureUrlResolver, createAzureCreateNewRequest } from "./AzureUrlResolver";
27
27
 
28
28
  /**
29
- * Strongly typed id for connecting to a local Azure Fluid Relay service
29
+ * Strongly typed id for connecting to a local Azure Fluid Relay.
30
30
  */
31
31
  export const LOCAL_MODE_TENANT_ID = "local";
32
32
 
33
33
  /**
34
- * AzureClient provides the ability to have a Fluid object backed by the Azure Relay Service or,
35
- * when running with local tenantId, have it be backed by a Tinylicious local service instance
34
+ * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
35
+ * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
36
36
  */
37
37
  export class AzureClient {
38
38
  private readonly documentServiceFactory: IDocumentServiceFactory;
@@ -48,7 +48,7 @@ export class AzureClient {
48
48
  this.props.connection.orderer,
49
49
  this.props.connection.storage,
50
50
  );
51
- // The local service implementation differs from the Azure Fluid Relay service in blob
51
+ // The local service implementation differs from the Azure Fluid Relay in blob
52
52
  // storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.
53
53
  const enableWholeSummaryUpload = this.props.connection.tenantId !== LOCAL_MODE_TENANT_ID;
54
54
  this.documentServiceFactory = new RouterliciousDocumentServiceFactory(
@@ -58,7 +58,7 @@ export class AzureClient {
58
58
  }
59
59
 
60
60
  /**
61
- * Creates a new detached container instance in the Azure Relay Service.
61
+ * Creates a new detached container instance in the Azure Fluid Relay.
62
62
  * @param containerSchema - Container schema for the new container.
63
63
  * @returns New detached container instance along with associated services.
64
64
  */
@@ -92,8 +92,8 @@ export class AzureClient {
92
92
  }
93
93
 
94
94
  /**
95
- * Accesses the existing container given its unique ID in the Azure Fluid Relay service.
96
- * @param id - Unique ID of the container in Azure Fluid Relay service
95
+ * Accesses the existing container given its unique ID in the Azure Fluid Relay.
96
+ * @param id - Unique ID of the container in Azure Fluid Relay.
97
97
  * @param containerSchema - Container schema used to access data objects in the container.
98
98
  * @returns Existing container instance along with associated services.
99
99
  */
@@ -9,7 +9,7 @@ import { AzureMember } from "./interfaces";
9
9
 
10
10
  /**
11
11
  * Token Provider implementation for connecting to an Azure Function endpoint for
12
- * Azure Fluid Relay service token resolution.
12
+ * Azure Fluid Relay token resolution.
13
13
  */
14
14
  export class AzureFunctionTokenProvider implements ITokenProvider {
15
15
  /**
@@ -11,7 +11,7 @@ import {
11
11
  IUrlResolver,
12
12
  } from "@fluidframework/driver-definitions";
13
13
 
14
- // Implementation of a URL resolver to resolve documents stored using the Azure Relay Service
14
+ // Implementation of a URL resolver to resolve documents stored using the Azure Fluid Relay
15
15
  // based off of the orderer and storage URLs provide. The token provider here can be a
16
16
  // InsecureTokenProvider for basic scenarios or more robust, secure providers that fulfill the
17
17
  // ITokenProvider interface
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  /**
7
- * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.
7
+ * A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
8
8
  *
9
9
  * @packageDocumentation
10
10
  */
package/src/interfaces.ts CHANGED
@@ -21,7 +21,7 @@ export {
21
21
  */
22
22
  export interface AzureClientProps {
23
23
  /**
24
- * Configuration for establishing a connection with the Azure Relay Service.
24
+ * Configuration for establishing a connection with the Azure Fluid Relay.
25
25
  */
26
26
  readonly connection: AzureConnectionConfig,
27
27
  /**
@@ -31,7 +31,7 @@ export interface AzureClientProps {
31
31
  }
32
32
 
33
33
  /**
34
- * Parameters for establishing a connection with the Azure Fluid Relay service.
34
+ * Parameters for establishing a connection with the Azure Fluid Relay.
35
35
  */
36
36
  export interface AzureConnectionConfig {
37
37
  /**
@@ -54,7 +54,7 @@ export interface AzureConnectionConfig {
54
54
 
55
55
  /**
56
56
  * AzureContainerServices is returned by the AzureClient alongside a FluidContainer.
57
- * It holds the functionality specifically tied to the Azure Fluid Relay service, and how the data stored in
57
+ * It holds the functionality specifically tied to the Azure Fluid Relay, and how the data stored in
58
58
  * the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding
59
59
  * how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use,
60
60
  * will not be included here but rather on the FluidContainer class itself.
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/azure-client";
9
- export const pkgVersion = "0.49.2";
9
+ export const pkgVersion = "0.50.0-41365";