@fluidframework/azure-client 2.1.0-276326 → 2.1.0-281041
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -25
- package/api-extractor/{api-extractor-lint-beta.cjs.json → api-extractor.current.json} +2 -2
- package/api-extractor/api-extractor.legacy.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/azure-client.beta.api.md +0 -4
- package/api-report/azure-client.legacy.alpha.api.md +0 -2
- package/api-report/azure-client.legacy.public.api.md +95 -0
- package/api-report/azure-client.public.api.md +0 -4
- package/dist/AzureClient.d.ts +2 -1
- package/dist/AzureClient.d.ts.map +1 -1
- package/dist/AzureClient.js +16 -16
- package/dist/AzureClient.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +7 -1
- package/dist/public.d.ts +7 -1
- package/internal.d.ts +1 -1
- package/legacy.d.ts +1 -1
- package/lib/AzureClient.d.ts +2 -1
- package/lib/AzureClient.d.ts.map +1 -1
- package/lib/AzureClient.js +16 -16
- package/lib/AzureClient.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +7 -1
- package/lib/public.d.ts +7 -1
- package/package.json +37 -43
- package/src/AzureClient.ts +26 -26
- package/src/index.ts +0 -1
- package/api-extractor/api-extractor-lint-beta.esm.json +0 -5
- package/beta.d.ts +0 -11
- package/dist/AzureFunctionTokenProvider.d.ts +0 -29
- package/dist/AzureFunctionTokenProvider.d.ts.map +0 -1
- package/dist/AzureFunctionTokenProvider.js +0 -55
- package/dist/AzureFunctionTokenProvider.js.map +0 -1
- package/dist/beta.d.ts +0 -30
- package/lib/AzureFunctionTokenProvider.d.ts +0 -29
- package/lib/AzureFunctionTokenProvider.d.ts.map +0 -1
- package/lib/AzureFunctionTokenProvider.js +0 -48
- package/lib/AzureFunctionTokenProvider.js.map +0 -1
- package/lib/beta.d.ts +0 -30
- package/src/AzureFunctionTokenProvider.ts +0 -61
package/README.md
CHANGED
|
@@ -2,17 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
The azure-client package provides a simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay service.
|
|
4
4
|
|
|
5
|
-
<!-- AUTO-GENERATED-CONTENT:START (
|
|
5
|
+
<!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_HEADER) -->
|
|
6
6
|
|
|
7
7
|
<!-- prettier-ignore-start -->
|
|
8
8
|
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
9
9
|
|
|
10
10
|
## Using Fluid Framework libraries
|
|
11
11
|
|
|
12
|
-
When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
|
|
12
|
+
When taking a dependency on a Fluid Framework library's public APIs, we recommend using a `^` (caret) version range, such as `^1.3.4`.
|
|
13
13
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
14
14
|
library consumers should always prefer `^`.
|
|
15
15
|
|
|
16
|
+
If using any of Fluid Framework's unstable APIs (for example, its `beta` APIs), we recommend using a more constrained version range, such as `~`.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
To get started, install the package by running the following command:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm i @fluidframework/azure-client
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Importing from this package
|
|
27
|
+
|
|
28
|
+
This package leverages [package.json exports](https://nodejs.org/api/packages.html#exports) to separate its APIs by support level.
|
|
29
|
+
For more information on the related support guarantees, see [API Support Levels](https://fluidframework.com/docs/build/releases-and-apitags/#api-support-levels).
|
|
30
|
+
|
|
31
|
+
To access the `public` ([SemVer](https://semver.org/)) APIs, import via `@fluidframework/azure-client` like normal.
|
|
32
|
+
|
|
33
|
+
To access the `legacy` APIs, import via `@fluidframework/azure-client/legacy`.
|
|
34
|
+
|
|
16
35
|
<!-- prettier-ignore-end -->
|
|
17
36
|
|
|
18
37
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
@@ -184,11 +203,59 @@ const text1 = await map1.get(); // Resolve the handle to get the object
|
|
|
184
203
|
const text1 = await map1.get("text1-unique-id").get();
|
|
185
204
|
```
|
|
186
205
|
|
|
187
|
-
<!-- AUTO-GENERATED-CONTENT:START (
|
|
206
|
+
<!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_FOOTER) -->
|
|
188
207
|
|
|
189
208
|
<!-- prettier-ignore-start -->
|
|
190
209
|
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
191
210
|
|
|
211
|
+
## API Documentation
|
|
212
|
+
|
|
213
|
+
API documentation for **@fluidframework/azure-client** is available at <https://fluidframework.com/docs/apis/azure-client>.
|
|
214
|
+
|
|
215
|
+
## Minimum Client Requirements
|
|
216
|
+
|
|
217
|
+
These are the platform requirements for the current version of Fluid Framework Client Packages.
|
|
218
|
+
These requirements err on the side of being too strict since within a major version they can be relaxed over time, but not made stricter.
|
|
219
|
+
For Long Term Support (LTS) versions this can require supporting these platforms for several years.
|
|
220
|
+
|
|
221
|
+
It is likely that other configurations will work, but they are not supported: if they stop working, we do not consider that a bug.
|
|
222
|
+
If you would benefit from support for something not listed here, file an issue and the product team will evaluate your request.
|
|
223
|
+
When making such a request please include if the configuration already works (and thus the request is just that it becomes officially supported), or if changes are required to get it working.
|
|
224
|
+
|
|
225
|
+
### Supported Runtimes
|
|
226
|
+
|
|
227
|
+
- NodeJs ^20.10.0 except that we will drop support for it [when NodeJs 20 loses its upstream support on 2026-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS (22) at least 1 year before 20 is end-of-life. This same policy applies to NodeJS 22 when it is end of life (2027-04-30).
|
|
228
|
+
- Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards).
|
|
229
|
+
|
|
230
|
+
### Supported Tools
|
|
231
|
+
|
|
232
|
+
- TypeScript 5.4:
|
|
233
|
+
- All [`strict`](https://www.typescriptlang.org/tsconfig) options are supported.
|
|
234
|
+
- [`strictNullChecks`](https://www.typescriptlang.org/tsconfig) is required.
|
|
235
|
+
- [Configuration options deprecated in 5.0](https://github.com/microsoft/TypeScript/issues/51909) are not supported.
|
|
236
|
+
- `exactOptionalPropertyTypes` is currently not fully supported.
|
|
237
|
+
If used, narrowing members of Fluid Framework types types using `in`, `Reflect.has`, `Object.hasOwn` or `Object.prototype.hasOwnProperty` should be avoided as they may incorrectly exclude `undefined` from the possible values in some cases.
|
|
238
|
+
- [webpack](https://webpack.js.org/) 5
|
|
239
|
+
- We are not intending to be prescriptive about what bundler to use.
|
|
240
|
+
Other bundlers which can handle ES Modules should work, but webpack is the only one we actively test.
|
|
241
|
+
|
|
242
|
+
### Module Resolution
|
|
243
|
+
|
|
244
|
+
[`Node16`, `NodeNext`, or `Bundler`](https://www.typescriptlang.org/tsconfig#moduleResolution) resolution should be used with TypeScript compilerOptions to follow the [Node.js v12+ ESM Resolution and Loading algorithm](https://nodejs.github.io/nodejs.dev/en/api/v20/esm/#resolution-and-loading-algorithm).
|
|
245
|
+
Node10 resolution is not supported as it does not support Fluid Framework's API structuring pattern that is used to distinguish stable APIs from those that are in development.
|
|
246
|
+
|
|
247
|
+
### Module Formats
|
|
248
|
+
|
|
249
|
+
- ES Modules:
|
|
250
|
+
ES Modules are the preferred way to consume our client packages (including in NodeJs) and consuming our client packages from ES Modules is fully supported.
|
|
251
|
+
- CommonJs:
|
|
252
|
+
Consuming our client packages as CommonJs is supported only in NodeJS and only for the cases listed below.
|
|
253
|
+
This is done to accommodate some workflows without good ES Module support.
|
|
254
|
+
If you have a workflow you would like included in this list, file an issue.
|
|
255
|
+
Once this list of workflows motivating CommonJS support is empty, we may drop support for CommonJS one year after notice of the change is posted here.
|
|
256
|
+
|
|
257
|
+
- Testing with Jest (which lacks [stable ESM support](https://jestjs.io/docs/ecmascript-modules) due to [unstable APIs in NodeJs](https://github.com/nodejs/node/issues/37648))
|
|
258
|
+
|
|
192
259
|
## Contribution Guidelines
|
|
193
260
|
|
|
194
261
|
There are many ways to [contribute](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md) to Fluid.
|
|
@@ -207,34 +274,14 @@ This project may contain Microsoft trademarks or logos for Microsoft projects, p
|
|
|
207
274
|
Use of these trademarks or logos must follow Microsoft’s [Trademark & Brand Guidelines](https://www.microsoft.com/trademarks).
|
|
208
275
|
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
|
|
209
276
|
|
|
210
|
-
<!-- prettier-ignore-end -->
|
|
211
|
-
|
|
212
|
-
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
213
|
-
|
|
214
|
-
<!-- AUTO-GENERATED-CONTENT:START (README_HELP_SECTION:includeHeading=TRUE) -->
|
|
215
|
-
|
|
216
|
-
<!-- prettier-ignore-start -->
|
|
217
|
-
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
218
|
-
|
|
219
277
|
## Help
|
|
220
278
|
|
|
221
|
-
Not finding what you're looking for in this README? Check out
|
|
222
|
-
Wiki](https://github.com/microsoft/FluidFramework/wiki) or [fluidframework.com](https://fluidframework.com/docs/).
|
|
279
|
+
Not finding what you're looking for in this README? Check out [fluidframework.com](https://fluidframework.com/docs/).
|
|
223
280
|
|
|
224
|
-
Still not finding what you're looking for? Please [file an
|
|
225
|
-
issue](https://github.com/microsoft/FluidFramework/wiki/Submitting-Bugs-and-Feature-Requests).
|
|
281
|
+
Still not finding what you're looking for? Please [file an issue](https://github.com/microsoft/FluidFramework/wiki/Submitting-Bugs-and-Feature-Requests).
|
|
226
282
|
|
|
227
283
|
Thank you!
|
|
228
284
|
|
|
229
|
-
<!-- prettier-ignore-end -->
|
|
230
|
-
|
|
231
|
-
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
232
|
-
|
|
233
|
-
<!-- AUTO-GENERATED-CONTENT:START (README_TRADEMARK_SECTION:includeHeading=TRUE) -->
|
|
234
|
-
|
|
235
|
-
<!-- prettier-ignore-start -->
|
|
236
|
-
<!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
|
|
237
|
-
|
|
238
285
|
## Trademark
|
|
239
286
|
|
|
240
287
|
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-
|
|
4
|
-
"mainEntryPointFilePath": "<projectFolder>/
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.current.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts"
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json"
|
|
4
4
|
}
|
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-model.esm.json"
|
|
4
4
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
## Public API Report File for "@fluidframework/azure-client"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @public
|
|
8
|
+
export class AzureClient {
|
|
9
|
+
constructor(properties: AzureClientProps);
|
|
10
|
+
createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
|
|
11
|
+
container: IFluidContainer<TContainerSchema>;
|
|
12
|
+
services: AzureContainerServices;
|
|
13
|
+
}>;
|
|
14
|
+
getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
|
|
15
|
+
container: IFluidContainer<TContainerSchema>;
|
|
16
|
+
services: AzureContainerServices;
|
|
17
|
+
}>;
|
|
18
|
+
getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
|
|
19
|
+
viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion, compatibilityMode: CompatibilityMode): Promise<{
|
|
20
|
+
container: IFluidContainer<TContainerSchema>;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// @public
|
|
25
|
+
export interface AzureClientProps {
|
|
26
|
+
readonly configProvider?: IConfigProviderBase;
|
|
27
|
+
readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
|
|
28
|
+
readonly logger?: ITelemetryBaseLogger;
|
|
29
|
+
// (undocumented)
|
|
30
|
+
readonly summaryCompression?: boolean | ICompressionStorageConfig;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// @public
|
|
34
|
+
export interface AzureConnectionConfig {
|
|
35
|
+
endpoint: string;
|
|
36
|
+
tokenProvider: ITokenProvider;
|
|
37
|
+
type: AzureConnectionConfigType;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// @public
|
|
41
|
+
export type AzureConnectionConfigType = "local" | "remote";
|
|
42
|
+
|
|
43
|
+
// @public
|
|
44
|
+
export interface AzureContainerServices {
|
|
45
|
+
audience: IAzureAudience;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// @public
|
|
49
|
+
export interface AzureContainerVersion {
|
|
50
|
+
date?: string;
|
|
51
|
+
id: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// @public
|
|
55
|
+
export interface AzureGetVersionsOptions {
|
|
56
|
+
maxCount: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @public
|
|
60
|
+
export interface AzureLocalConnectionConfig extends AzureConnectionConfig {
|
|
61
|
+
type: "local";
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// @public
|
|
65
|
+
export interface AzureMember<T = any> extends IMember {
|
|
66
|
+
additionalDetails?: T;
|
|
67
|
+
name: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// @public
|
|
71
|
+
export interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
|
|
72
|
+
tenantId: string;
|
|
73
|
+
type: "remote";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { CompatibilityMode }
|
|
77
|
+
|
|
78
|
+
// @public
|
|
79
|
+
export type IAzureAudience = IServiceAudience<AzureMember>;
|
|
80
|
+
|
|
81
|
+
export { ITelemetryBaseEvent }
|
|
82
|
+
|
|
83
|
+
export { ITelemetryBaseLogger }
|
|
84
|
+
|
|
85
|
+
export { ITokenClaims }
|
|
86
|
+
|
|
87
|
+
export { ITokenProvider }
|
|
88
|
+
|
|
89
|
+
export { ITokenResponse }
|
|
90
|
+
|
|
91
|
+
export { IUser }
|
|
92
|
+
|
|
93
|
+
export { ScopeType }
|
|
94
|
+
|
|
95
|
+
```
|
package/dist/AzureClient.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ import type { AzureClientProps, AzureContainerServices, AzureContainerVersion, A
|
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
12
|
export declare class AzureClient {
|
|
13
|
-
private readonly properties;
|
|
14
13
|
private readonly documentServiceFactory;
|
|
15
14
|
private readonly urlResolver;
|
|
16
15
|
private readonly configProvider;
|
|
16
|
+
private readonly connectionConfig;
|
|
17
|
+
private readonly logger;
|
|
17
18
|
/**
|
|
18
19
|
* Creates a new client instance using configuration parameters.
|
|
19
20
|
* @param properties - Properties for initializing a new AzureClient instance
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,MAAM,8BAA8B,CAAC;AAYtC,OAAO,KAAK,EACX,gBAAgB,EAEhB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EAGvB,MAAM,iBAAiB,CAAC;AAiCzB;;;;GAIG;AACH,qBAAa,WAAW;IACvB,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkC;IACjE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2D;IAC5F,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAE1D;;;OAGG;gBACgB,UAAU,EAAE,gBAAgB;IAsB/C;;;;;;;OAOG;IACU,eAAe,CAAC,KAAK,CAAC,gBAAgB,SAAS,eAAe,EAC1E,eAAe,EAAE,gBAAgB,EACjC,iBAAiB,EAAE,iBAAiB,GAClC,OAAO,CAAC;QACV,SAAS,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;QAC7C,QAAQ,EAAE,sBAAsB,CAAC;KACjC,CAAC;IAgBF;;;;;;;;OAQG;IACU,YAAY,CAAC,gBAAgB,SAAS,eAAe,EACjE,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,gBAAgB,EACjC,iBAAiB,EAAE,iBAAiB,GAClC,OAAO,CAAC;QACV,SAAS,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;QAC7C,QAAQ,EAAE,sBAAsB,CAAC;KACjC,CAAC;IAmBF;;;;;;;;;OASG;IACU,oBAAoB,CAAC,gBAAgB,SAAS,eAAe,EACzE,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,gBAAgB,EACjC,OAAO,EAAE,qBAAqB,EAC9B,iBAAiB,EAAE,iBAAiB,GAClC,OAAO,CAAC;QACV,SAAS,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;KAC7C,CAAC;IAqBF;;;;;;OAMG;IACU,oBAAoB,CAChC,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,qBAAqB,EAAE,CAAC;IA0BnC,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,YAAY;YAiCN,oBAAoB;YAgCpB,sBAAsB;CASpC"}
|
package/dist/AzureClient.js
CHANGED
|
@@ -53,14 +53,15 @@ class AzureClient {
|
|
|
53
53
|
* @param properties - Properties for initializing a new AzureClient instance
|
|
54
54
|
*/
|
|
55
55
|
constructor(properties) {
|
|
56
|
-
this.
|
|
56
|
+
this.connectionConfig = properties.connection;
|
|
57
|
+
this.logger = properties.logger;
|
|
57
58
|
// remove trailing slash from URL if any
|
|
58
|
-
|
|
59
|
+
this.connectionConfig.endpoint = this.connectionConfig.endpoint.replace(/\/$/, "");
|
|
59
60
|
this.urlResolver = new AzureUrlResolver_js_1.AzureUrlResolver();
|
|
60
61
|
// The local service implementation differs from the Azure Fluid Relay in blob
|
|
61
62
|
// storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.
|
|
62
|
-
const isRemoteConnection = (0, utils_js_1.isAzureRemoteConnectionConfig)(this.
|
|
63
|
-
const origDocumentServiceFactory = new internal_6.RouterliciousDocumentServiceFactory(this.
|
|
63
|
+
const isRemoteConnection = (0, utils_js_1.isAzureRemoteConnectionConfig)(this.connectionConfig);
|
|
64
|
+
const origDocumentServiceFactory = new internal_6.RouterliciousDocumentServiceFactory(this.connectionConfig.tokenProvider, {
|
|
64
65
|
enableWholeSummaryUpload: isRemoteConnection,
|
|
65
66
|
enableDiscovery: isRemoteConnection,
|
|
66
67
|
});
|
|
@@ -81,7 +82,7 @@ class AzureClient {
|
|
|
81
82
|
package: "no-dynamic-package",
|
|
82
83
|
config: {},
|
|
83
84
|
});
|
|
84
|
-
const fluidContainer = await this.createFluidContainer(container, this.
|
|
85
|
+
const fluidContainer = await this.createFluidContainer(container, this.connectionConfig);
|
|
85
86
|
const services = this.getContainerServices(container);
|
|
86
87
|
return { container: fluidContainer, services };
|
|
87
88
|
}
|
|
@@ -96,9 +97,9 @@ class AzureClient {
|
|
|
96
97
|
*/
|
|
97
98
|
async getContainer(id, containerSchema, compatibilityMode) {
|
|
98
99
|
const loader = this.createLoader(containerSchema, compatibilityMode);
|
|
99
|
-
const url = new URL(this.
|
|
100
|
-
url.searchParams.append("storage", encodeURIComponent(this.
|
|
101
|
-
url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.
|
|
100
|
+
const url = new URL(this.connectionConfig.endpoint);
|
|
101
|
+
url.searchParams.append("storage", encodeURIComponent(this.connectionConfig.endpoint));
|
|
102
|
+
url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.connectionConfig)));
|
|
102
103
|
url.searchParams.append("containerId", encodeURIComponent(id));
|
|
103
104
|
const container = await loader.resolve({ url: url.href });
|
|
104
105
|
const rootDataObject = await this.getContainerEntryPoint(container);
|
|
@@ -121,9 +122,9 @@ class AzureClient {
|
|
|
121
122
|
*/
|
|
122
123
|
async viewContainerVersion(id, containerSchema, version, compatibilityMode) {
|
|
123
124
|
const loader = this.createLoader(containerSchema, compatibilityMode);
|
|
124
|
-
const url = new URL(this.
|
|
125
|
-
url.searchParams.append("storage", encodeURIComponent(this.
|
|
126
|
-
url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.
|
|
125
|
+
const url = new URL(this.connectionConfig.endpoint);
|
|
126
|
+
url.searchParams.append("storage", encodeURIComponent(this.connectionConfig.endpoint));
|
|
127
|
+
url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.connectionConfig)));
|
|
127
128
|
url.searchParams.append("containerId", encodeURIComponent(id));
|
|
128
129
|
const container = await (0, internal_2.loadContainerPaused)(loader, {
|
|
129
130
|
url: url.href,
|
|
@@ -144,9 +145,9 @@ class AzureClient {
|
|
|
144
145
|
* @returns Array of available container versions.
|
|
145
146
|
*/
|
|
146
147
|
async getContainerVersions(id, options) {
|
|
147
|
-
const url = new URL(this.
|
|
148
|
-
url.searchParams.append("storage", encodeURIComponent(this.
|
|
149
|
-
url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.
|
|
148
|
+
const url = new URL(this.connectionConfig.endpoint);
|
|
149
|
+
url.searchParams.append("storage", encodeURIComponent(this.connectionConfig.endpoint));
|
|
150
|
+
url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.connectionConfig)));
|
|
150
151
|
url.searchParams.append("containerId", encodeURIComponent(id));
|
|
151
152
|
const resolvedUrl = await this.urlResolver.resolve({ url: url.href });
|
|
152
153
|
if (!resolvedUrl) {
|
|
@@ -194,7 +195,7 @@ class AzureClient {
|
|
|
194
195
|
urlResolver: this.urlResolver,
|
|
195
196
|
documentServiceFactory: this.documentServiceFactory,
|
|
196
197
|
codeLoader,
|
|
197
|
-
logger: this.
|
|
198
|
+
logger: this.logger,
|
|
198
199
|
options: { client },
|
|
199
200
|
configProvider: this.configProvider,
|
|
200
201
|
});
|
|
@@ -206,7 +207,6 @@ class AzureClient {
|
|
|
206
207
|
* See {@link FluidContainer.attach}
|
|
207
208
|
*/
|
|
208
209
|
const attach = async () => {
|
|
209
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison -- AB#7608
|
|
210
210
|
if (container.attachState !== container_definitions_1.AttachState.Detached) {
|
|
211
211
|
throw new Error("Cannot attach container. Container is not in detached state");
|
|
212
212
|
}
|
package/dist/AzureClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iFAAoE;AACpE,6EAIwD;AACxD,wEAAwF;AAExF,kEAA6D;AAM7D,oEAAgF;AAMhF,oEAK+C;AAC/C,4EAAoG;AACpG,uEAA0F;AAE1F,yDAA+D;AAC/D,+DAAsF;AAQtF,yCAA2D;AAE3D;;GAEG;AACH,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,WAAW,GAAG,CAAC,oBAA2C,EAAU,EAAE;IAC3E,OAAO,IAAA,wCAA6B,EAAC,oBAAoB,CAAC;QACzD,CAAC,CAAC,oBAAoB,CAAC,QAAQ;QAC/B,CAAC,CAAC,oBAAoB,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B;;;GAGG;AACH,MAAM,uBAAuB,GAAG;IAC/B,sDAAsD;IACtD,sCAAsC,EAAE,IAAI;CAC5C,CAAC;AAEF;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,kBAAwC;IACnE,OAAO,IAAA,yCAA8B,EAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAAC;AACpF,CAAC;AAED;;;;GAIG;AACH,MAAa,WAAW;IAKvB;;;OAGG;IACH,YAAoC,UAA4B;QAA5B,eAAU,GAAV,UAAU,CAAkB;QAC/D,wCAAwC;QACxC,UAAU,CAAC,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnF,IAAI,CAAC,WAAW,GAAG,IAAI,sCAAgB,EAAE,CAAC;QAC1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QAC/B,OAAO,cAAc,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,sBAAsB,CAAC,SAAqB;QACzD,MAAM,cAAc,GAAiC,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACrF,IAAA,iBAAM,EACL,cAAc,CAAC,eAAe,KAAK,SAAS,EAC5C,KAAK,CAAC,gDAAgD,CACtD,CAAC;QACF,OAAO,cAAc,CAAC,eAAe,CAAC;IACvC,CAAC;CAED;AArQD,kCAqQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport {\n\ttype IContainer,\n\ttype IFluidModuleWithDetails,\n\tLoaderHeader,\n} from \"@fluidframework/container-definitions/internal\";\nimport { Loader, loadContainerPaused } from \"@fluidframework/container-loader/internal\";\nimport type { FluidObject, IConfigProviderBase } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IClient } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentServiceFactory,\n\tIUrlResolver,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { applyStorageCompression } from \"@fluidframework/driver-utils/internal\";\nimport type {\n\tContainerSchema,\n\tIFluidContainer,\n\tCompatibilityMode,\n} from \"@fluidframework/fluid-static\";\nimport {\n\ttype IRootDataObject,\n\tcreateDOProviderContainerRuntimeFactory,\n\tcreateFluidContainer,\n\tcreateServiceAudience,\n} from \"@fluidframework/fluid-static/internal\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver/internal\";\nimport { wrapConfigProviderWithDefaults } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { createAzureAudienceMember } from \"./AzureAudience.js\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } from \"./AzureUrlResolver.js\";\nimport type {\n\tAzureClientProps,\n\tAzureConnectionConfig,\n\tAzureContainerServices,\n\tAzureContainerVersion,\n\tAzureGetVersionsOptions,\n} from \"./interfaces.js\";\nimport { isAzureRemoteConnectionConfig } from \"./utils.js\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nconst LOCAL_MODE_TENANT_ID = \"local\";\nconst getTenantId = (connectionProperties: AzureConnectionConfig): string => {\n\treturn isAzureRemoteConnectionConfig(connectionProperties)\n\t\t? connectionProperties.tenantId\n\t\t: LOCAL_MODE_TENANT_ID;\n};\n\nconst MAX_VERSION_COUNT = 5;\n\n/**\n * Default feature gates.\n * These values will only be used if the feature gate is not already set by the supplied config provider.\n */\nconst azureClientFeatureGates = {\n\t// Azure client requires a write connection by default\n\t\"Fluid.Container.ForceWriteConnection\": true,\n};\n\n/**\n * Wrap the config provider to fall back on the appropriate defaults for Azure Client.\n * @param baseConfigProvider - The base config provider to wrap\n * @returns A new config provider with the appropriate defaults applied underneath the given provider\n */\nfunction wrapConfigProvider(baseConfigProvider?: IConfigProviderBase): IConfigProviderBase {\n\treturn wrapConfigProviderWithDefaults(baseConfigProvider, azureClientFeatureGates);\n}\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 * @public\n */\nexport class AzureClient {\n\tprivate readonly documentServiceFactory: IDocumentServiceFactory;\n\tprivate readonly urlResolver: IUrlResolver;\n\tprivate readonly configProvider: IConfigProviderBase | undefined;\n\n\t/**\n\t * Creates a new client instance using configuration parameters.\n\t * @param properties - Properties for initializing a new AzureClient instance\n\t */\n\tpublic constructor(private readonly properties: AzureClientProps) {\n\t\t// remove trailing slash from URL if any\n\t\tproperties.connection.endpoint = properties.connection.endpoint.replace(/\\/$/, \"\");\n\t\tthis.urlResolver = new AzureUrlResolver();\n\t\t// The local service implementation differs from the Azure Fluid Relay in blob\n\t\t// storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n\t\tconst isRemoteConnection = isAzureRemoteConnectionConfig(this.properties.connection);\n\t\tconst origDocumentServiceFactory: IDocumentServiceFactory =\n\t\t\tnew RouterliciousDocumentServiceFactory(this.properties.connection.tokenProvider, {\n\t\t\t\tenableWholeSummaryUpload: isRemoteConnection,\n\t\t\t\tenableDiscovery: isRemoteConnection,\n\t\t\t});\n\n\t\tthis.documentServiceFactory = applyStorageCompression(\n\t\t\torigDocumentServiceFactory,\n\t\t\tproperties.summaryCompression,\n\t\t);\n\t\tthis.configProvider = wrapConfigProvider(properties.configProvider);\n\t}\n\n\t/**\n\t * Creates a new detached container instance in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param containerSchema - Container schema for the new container.\n\t * @param compatibilityMode - Compatibility mode the container should run in.\n\t * @returns New detached container instance along with associated services.\n\t */\n\tpublic async createContainer<const TContainerSchema extends ContainerSchema>(\n\t\tcontainerSchema: TContainerSchema,\n\t\tcompatibilityMode: CompatibilityMode,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema, compatibilityMode);\n\n\t\tconst container = await loader.createDetachedContainer({\n\t\t\tpackage: \"no-dynamic-package\",\n\t\t\tconfig: {},\n\t\t});\n\n\t\tconst fluidContainer = await this.createFluidContainer<TContainerSchema>(\n\t\t\tcontainer,\n\t\t\tthis.properties.connection,\n\t\t);\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @param compatibilityMode - Compatibility mode the container should run in.\n\t * @returns Existing container instance along with associated services.\n\t */\n\tpublic async getContainer<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t\tcompatibilityMode: CompatibilityMode,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema, compatibilityMode);\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\n\t\t\t\"storage\",\n\t\t\tencodeURIComponent(this.properties.connection.endpoint),\n\t\t);\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst container = await loader.resolve({ url: url.href });\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Load a specific version of a container for viewing only.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @param version - Unique version of the source container in Azure Fluid Relay.\n\t * @param compatibilityMode - Compatibility mode the container should run in.\n\t * @returns Loaded container instance at the specified version.\n\t */\n\tpublic async viewContainerVersion<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t\tversion: AzureContainerVersion,\n\t\tcompatibilityMode: CompatibilityMode,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema, compatibilityMode);\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\n\t\t\t\"storage\",\n\t\t\tencodeURIComponent(this.properties.connection.endpoint),\n\t\t);\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst container = await loadContainerPaused(loader, {\n\t\t\turl: url.href,\n\t\t\theaders: { [LoaderHeader.version]: version.id },\n\t\t});\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\treturn { container: fluidContainer };\n\t}\n\n\t/**\n\t * Get the list of versions for specific container.\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param options - \"Get\" options. If options are not provided, API\n\t * will assume maxCount of versions to retrieve to be 5.\n\t * @returns Array of available container versions.\n\t */\n\tpublic async getContainerVersions(\n\t\tid: string,\n\t\toptions?: AzureGetVersionsOptions,\n\t): Promise<AzureContainerVersion[]> {\n\t\tconst url = new URL(this.properties.connection.endpoint);\n\t\turl.searchParams.append(\n\t\t\t\"storage\",\n\t\t\tencodeURIComponent(this.properties.connection.endpoint),\n\t\t);\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.properties.connection)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\n\t\tconst resolvedUrl = await this.urlResolver.resolve({ url: url.href });\n\t\tif (!resolvedUrl) {\n\t\t\tthrow new Error(\"Unable to resolved URL\");\n\t\t}\n\t\tconst documentService =\n\t\t\tawait this.documentServiceFactory.createDocumentService(resolvedUrl);\n\t\tconst storage = await documentService.connectToStorage();\n\n\t\t// External API uses null\n\t\t// eslint-disable-next-line unicorn/no-null\n\t\tconst versions = await storage.getVersions(null, options?.maxCount ?? MAX_VERSION_COUNT);\n\n\t\treturn versions.map((item) => {\n\t\t\treturn { id: item.id, date: item.date };\n\t\t});\n\t}\n\n\tprivate getContainerServices(container: IContainer): AzureContainerServices {\n\t\treturn {\n\t\t\taudience: createServiceAudience({\n\t\t\t\tcontainer,\n\t\t\t\tcreateServiceMember: createAzureAudienceMember,\n\t\t\t}),\n\t\t};\n\t}\n\n\tprivate createLoader(schema: ContainerSchema, compatibilityMode: CompatibilityMode): Loader {\n\t\tconst runtimeFactory = createDOProviderContainerRuntimeFactory({\n\t\t\tschema,\n\t\t\tcompatibilityMode,\n\t\t});\n\t\tconst load = async (): Promise<IFluidModuleWithDetails> => {\n\t\t\treturn {\n\t\t\t\tmodule: { fluidExport: runtimeFactory },\n\t\t\t\tdetails: { package: \"no-dynamic-package\", config: {} },\n\t\t\t};\n\t\t};\n\n\t\tconst codeLoader = { load };\n\t\tconst client: IClient = {\n\t\t\tdetails: {\n\t\t\t\tcapabilities: { interactive: true },\n\t\t\t},\n\t\t\tpermission: [],\n\t\t\tscopes: [],\n\t\t\tuser: { id: \"\" },\n\t\t\tmode: \"write\",\n\t\t};\n\n\t\treturn new Loader({\n\t\t\turlResolver: this.urlResolver,\n\t\t\tdocumentServiceFactory: this.documentServiceFactory,\n\t\t\tcodeLoader,\n\t\t\tlogger: this.properties.logger,\n\t\t\toptions: { client },\n\t\t\tconfigProvider: this.configProvider,\n\t\t});\n\t}\n\n\tprivate async createFluidContainer<TContainerSchema extends ContainerSchema>(\n\t\tcontainer: IContainer,\n\t\tconnection: AzureConnectionConfig,\n\t): Promise<IFluidContainer<TContainerSchema>> {\n\t\tconst createNewRequest = createAzureCreateNewRequest(\n\t\t\tconnection.endpoint,\n\t\t\tgetTenantId(connection),\n\t\t);\n\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\n\t\t/**\n\t\t * See {@link FluidContainer.attach}\n\t\t */\n\t\tconst attach = async (): Promise<string> => {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison -- AB#7608\n\t\t\tif (container.attachState !== AttachState.Detached) {\n\t\t\t\tthrow new Error(\"Cannot attach container. Container is not in detached state\");\n\t\t\t}\n\t\t\tawait container.attach(createNewRequest);\n\t\t\tif (container.resolvedUrl === undefined) {\n\t\t\t\tthrow new Error(\"Resolved Url not available on attached container\");\n\t\t\t}\n\t\t\treturn container.resolvedUrl.id;\n\t\t};\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tfluidContainer.attach = attach;\n\t\treturn fluidContainer;\n\t}\n\n\tprivate async getContainerEntryPoint(container: IContainer): Promise<IRootDataObject> {\n\t\tconst rootDataObject: FluidObject<IRootDataObject> = await container.getEntryPoint();\n\t\tassert(\n\t\t\trootDataObject.IRootDataObject !== undefined,\n\t\t\t0x90a /* entryPoint must be of type IRootDataObject */,\n\t\t);\n\t\treturn rootDataObject.IRootDataObject;\n\t}\n\t// #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AzureClient.js","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iFAAoE;AACpE,6EAIwD;AACxD,wEAAwF;AAMxF,kEAA6D;AAM7D,oEAAgF;AAMhF,oEAK+C;AAC/C,4EAAoG;AACpG,uEAA0F;AAE1F,yDAA+D;AAC/D,+DAAsF;AAUtF,yCAA2D;AAE3D;;GAEG;AACH,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,WAAW,GAAG,CAAC,oBAA2C,EAAU,EAAE;IAC3E,OAAO,IAAA,wCAA6B,EAAC,oBAAoB,CAAC;QACzD,CAAC,CAAC,oBAAoB,CAAC,QAAQ;QAC/B,CAAC,CAAC,oBAAoB,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B;;;GAGG;AACH,MAAM,uBAAuB,GAAG;IAC/B,sDAAsD;IACtD,sCAAsC,EAAE,IAAI;CAC5C,CAAC;AAEF;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,kBAAwC;IACnE,OAAO,IAAA,yCAA8B,EAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAAC;AACpF,CAAC;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,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;YACrE,CAAC;YACD,OAAO,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,CAAC,CAAC;QACF,MAAM,cAAc,GAAG,IAAA,+BAAoB,EAAmB;YAC7D,SAAS;YACT,cAAc;SACd,CAAC,CAAC;QACH,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;QAC/B,OAAO,cAAc,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,sBAAsB,CAAC,SAAqB;QACzD,MAAM,cAAc,GAAiC,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QACrF,IAAA,iBAAM,EACL,cAAc,CAAC,eAAe,KAAK,SAAS,EAC5C,KAAK,CAAC,gDAAgD,CACtD,CAAC;QACF,OAAO,cAAc,CAAC,eAAe,CAAC;IACvC,CAAC;CAED;AA/PD,kCA+PC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport {\n\ttype IContainer,\n\ttype IFluidModuleWithDetails,\n\tLoaderHeader,\n} from \"@fluidframework/container-definitions/internal\";\nimport { Loader, loadContainerPaused } from \"@fluidframework/container-loader/internal\";\nimport type {\n\tFluidObject,\n\tIConfigProviderBase,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IClient } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentServiceFactory,\n\tIUrlResolver,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { applyStorageCompression } from \"@fluidframework/driver-utils/internal\";\nimport type {\n\tContainerSchema,\n\tIFluidContainer,\n\tCompatibilityMode,\n} from \"@fluidframework/fluid-static\";\nimport {\n\ttype IRootDataObject,\n\tcreateDOProviderContainerRuntimeFactory,\n\tcreateFluidContainer,\n\tcreateServiceAudience,\n} from \"@fluidframework/fluid-static/internal\";\nimport { RouterliciousDocumentServiceFactory } from \"@fluidframework/routerlicious-driver/internal\";\nimport { wrapConfigProviderWithDefaults } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { createAzureAudienceMember } from \"./AzureAudience.js\";\nimport { AzureUrlResolver, createAzureCreateNewRequest } from \"./AzureUrlResolver.js\";\nimport type {\n\tAzureClientProps,\n\tAzureConnectionConfig,\n\tAzureContainerServices,\n\tAzureContainerVersion,\n\tAzureGetVersionsOptions,\n\tAzureLocalConnectionConfig,\n\tAzureRemoteConnectionConfig,\n} from \"./interfaces.js\";\nimport { isAzureRemoteConnectionConfig } from \"./utils.js\";\n\n/**\n * Strongly typed id for connecting to a local Azure Fluid Relay.\n */\nconst LOCAL_MODE_TENANT_ID = \"local\";\nconst getTenantId = (connectionProperties: AzureConnectionConfig): string => {\n\treturn isAzureRemoteConnectionConfig(connectionProperties)\n\t\t? connectionProperties.tenantId\n\t\t: LOCAL_MODE_TENANT_ID;\n};\n\nconst MAX_VERSION_COUNT = 5;\n\n/**\n * Default feature gates.\n * These values will only be used if the feature gate is not already set by the supplied config provider.\n */\nconst azureClientFeatureGates = {\n\t// Azure client requires a write connection by default\n\t\"Fluid.Container.ForceWriteConnection\": true,\n};\n\n/**\n * Wrap the config provider to fall back on the appropriate defaults for Azure Client.\n * @param baseConfigProvider - The base config provider to wrap\n * @returns A new config provider with the appropriate defaults applied underneath the given provider\n */\nfunction wrapConfigProvider(baseConfigProvider?: IConfigProviderBase): IConfigProviderBase {\n\treturn wrapConfigProviderWithDefaults(baseConfigProvider, azureClientFeatureGates);\n}\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 * @public\n */\nexport class AzureClient {\n\tprivate readonly documentServiceFactory: IDocumentServiceFactory;\n\tprivate readonly urlResolver: IUrlResolver;\n\tprivate readonly configProvider: IConfigProviderBase | undefined;\n\tprivate readonly connectionConfig: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;\n\tprivate readonly logger: ITelemetryBaseLogger | undefined;\n\n\t/**\n\t * Creates a new client instance using configuration parameters.\n\t * @param properties - Properties for initializing a new AzureClient instance\n\t */\n\tpublic constructor(properties: AzureClientProps) {\n\t\tthis.connectionConfig = properties.connection;\n\t\tthis.logger = properties.logger;\n\t\t// remove trailing slash from URL if any\n\t\tthis.connectionConfig.endpoint = this.connectionConfig.endpoint.replace(/\\/$/, \"\");\n\t\tthis.urlResolver = new AzureUrlResolver();\n\t\t// The local service implementation differs from the Azure Fluid Relay in blob\n\t\t// storage format. Azure Fluid Relay supports whole summary upload. Local currently does not.\n\t\tconst isRemoteConnection = isAzureRemoteConnectionConfig(this.connectionConfig);\n\t\tconst origDocumentServiceFactory: IDocumentServiceFactory =\n\t\t\tnew RouterliciousDocumentServiceFactory(this.connectionConfig.tokenProvider, {\n\t\t\t\tenableWholeSummaryUpload: isRemoteConnection,\n\t\t\t\tenableDiscovery: isRemoteConnection,\n\t\t\t});\n\n\t\tthis.documentServiceFactory = applyStorageCompression(\n\t\t\torigDocumentServiceFactory,\n\t\t\tproperties.summaryCompression,\n\t\t);\n\t\tthis.configProvider = wrapConfigProvider(properties.configProvider);\n\t}\n\n\t/**\n\t * Creates a new detached container instance in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param containerSchema - Container schema for the new container.\n\t * @param compatibilityMode - Compatibility mode the container should run in.\n\t * @returns New detached container instance along with associated services.\n\t */\n\tpublic async createContainer<const TContainerSchema extends ContainerSchema>(\n\t\tcontainerSchema: TContainerSchema,\n\t\tcompatibilityMode: CompatibilityMode,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema, compatibilityMode);\n\n\t\tconst container = await loader.createDetachedContainer({\n\t\t\tpackage: \"no-dynamic-package\",\n\t\t\tconfig: {},\n\t\t});\n\n\t\tconst fluidContainer = await this.createFluidContainer<TContainerSchema>(\n\t\t\tcontainer,\n\t\t\tthis.connectionConfig,\n\t\t);\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Accesses the existing container given its unique ID in the Azure Fluid Relay.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @param compatibilityMode - Compatibility mode the container should run in.\n\t * @returns Existing container instance along with associated services.\n\t */\n\tpublic async getContainer<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t\tcompatibilityMode: CompatibilityMode,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t\tservices: AzureContainerServices;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema, compatibilityMode);\n\t\tconst url = new URL(this.connectionConfig.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.connectionConfig.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.connectionConfig)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst container = await loader.resolve({ url: url.href });\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tconst services = this.getContainerServices(container);\n\t\treturn { container: fluidContainer, services };\n\t}\n\n\t/**\n\t * Load a specific version of a container for viewing only.\n\t * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.\n\t * (normally not explicitly specified.)\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param containerSchema - Container schema used to access data objects in the container.\n\t * @param version - Unique version of the source container in Azure Fluid Relay.\n\t * @param compatibilityMode - Compatibility mode the container should run in.\n\t * @returns Loaded container instance at the specified version.\n\t */\n\tpublic async viewContainerVersion<TContainerSchema extends ContainerSchema>(\n\t\tid: string,\n\t\tcontainerSchema: TContainerSchema,\n\t\tversion: AzureContainerVersion,\n\t\tcompatibilityMode: CompatibilityMode,\n\t): Promise<{\n\t\tcontainer: IFluidContainer<TContainerSchema>;\n\t}> {\n\t\tconst loader = this.createLoader(containerSchema, compatibilityMode);\n\t\tconst url = new URL(this.connectionConfig.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.connectionConfig.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.connectionConfig)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\t\tconst container = await loadContainerPaused(loader, {\n\t\t\turl: url.href,\n\t\t\theaders: { [LoaderHeader.version]: version.id },\n\t\t});\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\treturn { container: fluidContainer };\n\t}\n\n\t/**\n\t * Get the list of versions for specific container.\n\t * @param id - Unique ID of the source container in Azure Fluid Relay.\n\t * @param options - \"Get\" options. If options are not provided, API\n\t * will assume maxCount of versions to retrieve to be 5.\n\t * @returns Array of available container versions.\n\t */\n\tpublic async getContainerVersions(\n\t\tid: string,\n\t\toptions?: AzureGetVersionsOptions,\n\t): Promise<AzureContainerVersion[]> {\n\t\tconst url = new URL(this.connectionConfig.endpoint);\n\t\turl.searchParams.append(\"storage\", encodeURIComponent(this.connectionConfig.endpoint));\n\t\turl.searchParams.append(\n\t\t\t\"tenantId\",\n\t\t\tencodeURIComponent(getTenantId(this.connectionConfig)),\n\t\t);\n\t\turl.searchParams.append(\"containerId\", encodeURIComponent(id));\n\n\t\tconst resolvedUrl = await this.urlResolver.resolve({ url: url.href });\n\t\tif (!resolvedUrl) {\n\t\t\tthrow new Error(\"Unable to resolved URL\");\n\t\t}\n\t\tconst documentService =\n\t\t\tawait this.documentServiceFactory.createDocumentService(resolvedUrl);\n\t\tconst storage = await documentService.connectToStorage();\n\n\t\t// External API uses null\n\t\t// eslint-disable-next-line unicorn/no-null\n\t\tconst versions = await storage.getVersions(null, options?.maxCount ?? MAX_VERSION_COUNT);\n\n\t\treturn versions.map((item) => {\n\t\t\treturn { id: item.id, date: item.date };\n\t\t});\n\t}\n\n\tprivate getContainerServices(container: IContainer): AzureContainerServices {\n\t\treturn {\n\t\t\taudience: createServiceAudience({\n\t\t\t\tcontainer,\n\t\t\t\tcreateServiceMember: createAzureAudienceMember,\n\t\t\t}),\n\t\t};\n\t}\n\n\tprivate createLoader(schema: ContainerSchema, compatibilityMode: CompatibilityMode): Loader {\n\t\tconst runtimeFactory = createDOProviderContainerRuntimeFactory({\n\t\t\tschema,\n\t\t\tcompatibilityMode,\n\t\t});\n\t\tconst load = async (): Promise<IFluidModuleWithDetails> => {\n\t\t\treturn {\n\t\t\t\tmodule: { fluidExport: runtimeFactory },\n\t\t\t\tdetails: { package: \"no-dynamic-package\", config: {} },\n\t\t\t};\n\t\t};\n\n\t\tconst codeLoader = { load };\n\t\tconst client: IClient = {\n\t\t\tdetails: {\n\t\t\t\tcapabilities: { interactive: true },\n\t\t\t},\n\t\t\tpermission: [],\n\t\t\tscopes: [],\n\t\t\tuser: { id: \"\" },\n\t\t\tmode: \"write\",\n\t\t};\n\n\t\treturn new Loader({\n\t\t\turlResolver: this.urlResolver,\n\t\t\tdocumentServiceFactory: this.documentServiceFactory,\n\t\t\tcodeLoader,\n\t\t\tlogger: this.logger,\n\t\t\toptions: { client },\n\t\t\tconfigProvider: this.configProvider,\n\t\t});\n\t}\n\n\tprivate async createFluidContainer<TContainerSchema extends ContainerSchema>(\n\t\tcontainer: IContainer,\n\t\tconnection: AzureConnectionConfig,\n\t): Promise<IFluidContainer<TContainerSchema>> {\n\t\tconst createNewRequest = createAzureCreateNewRequest(\n\t\t\tconnection.endpoint,\n\t\t\tgetTenantId(connection),\n\t\t);\n\n\t\tconst rootDataObject = await this.getContainerEntryPoint(container);\n\n\t\t/**\n\t\t * See {@link FluidContainer.attach}\n\t\t */\n\t\tconst attach = async (): Promise<string> => {\n\t\t\tif (container.attachState !== AttachState.Detached) {\n\t\t\t\tthrow new Error(\"Cannot attach container. Container is not in detached state\");\n\t\t\t}\n\t\t\tawait container.attach(createNewRequest);\n\t\t\tif (container.resolvedUrl === undefined) {\n\t\t\t\tthrow new Error(\"Resolved Url not available on attached container\");\n\t\t\t}\n\t\t\treturn container.resolvedUrl.id;\n\t\t};\n\t\tconst fluidContainer = createFluidContainer<TContainerSchema>({\n\t\t\tcontainer,\n\t\t\trootDataObject,\n\t\t});\n\t\tfluidContainer.attach = attach;\n\t\treturn fluidContainer;\n\t}\n\n\tprivate async getContainerEntryPoint(container: IContainer): Promise<IRootDataObject> {\n\t\tconst rootDataObject: FluidObject<IRootDataObject> = await container.getEntryPoint();\n\t\tassert(\n\t\t\trootDataObject.IRootDataObject !== undefined,\n\t\t\t0x90a /* entryPoint must be of type IRootDataObject */,\n\t\t);\n\t\treturn rootDataObject.IRootDataObject;\n\t}\n\t// #endregion\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
export { AzureClient } from "./AzureClient.js";
|
|
11
|
-
export { AzureFunctionTokenProvider } from "./AzureFunctionTokenProvider.js";
|
|
12
11
|
export type { AzureClientProps, AzureConnectionConfig, AzureConnectionConfigType, AzureContainerServices, AzureContainerVersion, AzureGetVersionsOptions, AzureLocalConnectionConfig, AzureMember, AzureRemoteConnectionConfig, AzureUser, IAzureAudience, } from "./interfaces.js";
|
|
13
12
|
export type { ITokenProvider, ITokenResponse } from "@fluidframework/routerlicious-driver";
|
|
14
13
|
export type { IUser } from "@fluidframework/driver-definitions";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACX,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,WAAW,EACX,2BAA2B,EAC3B,SAAS,EACT,cAAc,GACd,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3F,YAAY,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,KAAK,YAAY,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAG3F,YAAY,EACX,mBAAmB,EACnB,oBAAoB,GACpB,MAAM,iCAAiC,CAAC;AAGzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ScopeType = exports.
|
|
7
|
+
exports.ScopeType = exports.AzureClient = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
|
|
10
10
|
*
|
|
@@ -12,8 +12,6 @@ exports.ScopeType = exports.AzureFunctionTokenProvider = exports.AzureClient = v
|
|
|
12
12
|
*/
|
|
13
13
|
var AzureClient_js_1 = require("./AzureClient.js");
|
|
14
14
|
Object.defineProperty(exports, "AzureClient", { enumerable: true, get: function () { return AzureClient_js_1.AzureClient; } });
|
|
15
|
-
var AzureFunctionTokenProvider_js_1 = require("./AzureFunctionTokenProvider.js");
|
|
16
|
-
Object.defineProperty(exports, "AzureFunctionTokenProvider", { enumerable: true, get: function () { return AzureFunctionTokenProvider_js_1.AzureFunctionTokenProvider; } });
|
|
17
15
|
var internal_1 = require("@fluidframework/driver-definitions/internal");
|
|
18
16
|
Object.defineProperty(exports, "ScopeType", { enumerable: true, get: function () { return internal_1.ScopeType; } });
|
|
19
17
|
//# sourceMappingURL=index.js.map
|
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,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AAEH,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AAiBpB,wEAA2F;AAA/D,qGAAA,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 { AzureClient } from \"./AzureClient.js\";\nexport type {\n\tAzureClientProps,\n\tAzureConnectionConfig,\n\tAzureConnectionConfigType,\n\tAzureContainerServices,\n\tAzureContainerVersion,\n\tAzureGetVersionsOptions,\n\tAzureLocalConnectionConfig,\n\tAzureMember,\n\tAzureRemoteConnectionConfig,\n\tAzureUser,\n\tIAzureAudience,\n} from \"./interfaces.js\";\n\nexport type { ITokenProvider, ITokenResponse } from \"@fluidframework/routerlicious-driver\";\nexport type { IUser } from \"@fluidframework/driver-definitions\";\nexport { type ITokenClaims, ScopeType } from \"@fluidframework/driver-definitions/internal\";\n\n// Re-export so developers can build loggers without pulling in core-interfaces\nexport type {\n\tITelemetryBaseEvent,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\n\n// Re-export so developers have access to parameter types for createContainer/getContainer without pulling in fluid-static\nexport type { CompatibilityMode } from \"@fluidframework/fluid-static\";\n"]}
|
package/dist/legacy.d.ts
CHANGED
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @
|
|
8
|
+
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
|
|
13
|
+
*
|
|
14
|
+
* @packageDocumentation
|
|
9
15
|
*/
|
|
10
16
|
|
|
11
17
|
export {
|
package/dist/public.d.ts
CHANGED
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @
|
|
8
|
+
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A simple and powerful way to consume collaborative Fluid data with the Azure Fluid Relay.
|
|
13
|
+
*
|
|
14
|
+
* @packageDocumentation
|
|
9
15
|
*/
|
|
10
16
|
|
|
11
17
|
export {
|
package/internal.d.ts
CHANGED
package/legacy.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @
|
|
8
|
+
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export * from "./lib/legacy.js";
|
package/lib/AzureClient.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ import type { AzureClientProps, AzureContainerServices, AzureContainerVersion, A
|
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
12
|
export declare class AzureClient {
|
|
13
|
-
private readonly properties;
|
|
14
13
|
private readonly documentServiceFactory;
|
|
15
14
|
private readonly urlResolver;
|
|
16
15
|
private readonly configProvider;
|
|
16
|
+
private readonly connectionConfig;
|
|
17
|
+
private readonly logger;
|
|
17
18
|
/**
|
|
18
19
|
* Creates a new client instance using configuration parameters.
|
|
19
20
|
* @param properties - Properties for initializing a new AzureClient instance
|
package/lib/AzureClient.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,MAAM,8BAA8B,CAAC;AAYtC,OAAO,KAAK,EACX,gBAAgB,EAEhB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EAGvB,MAAM,iBAAiB,CAAC;AAiCzB;;;;GAIG;AACH,qBAAa,WAAW;IACvB,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkC;IACjE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2D;IAC5F,OAAO,CAAC,QAAQ,CAAC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