@fluidframework/azure-client 2.0.0-rc.4.0.6 → 2.0.0-rc.5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.eslintrc.cjs +8 -0
  2. package/CHANGELOG.md +12 -0
  3. package/api-extractor/api-extractor-lint-beta.cjs.json +5 -0
  4. package/api-extractor/api-extractor-lint-beta.esm.json +5 -0
  5. package/api-extractor/api-extractor-lint-bundle.json +5 -0
  6. package/api-extractor/api-extractor-lint-legacy.cjs.json +5 -0
  7. package/api-extractor/api-extractor-lint-legacy.esm.json +5 -0
  8. package/api-extractor/api-extractor-lint-public.cjs.json +5 -0
  9. package/api-extractor/api-extractor-lint-public.esm.json +5 -0
  10. package/api-extractor.json +1 -1
  11. package/api-report/{azure-client.api.md → azure-client.alpha.api.md} +15 -27
  12. package/api-report/azure-client.beta.api.md +110 -0
  13. package/api-report/azure-client.public.api.md +110 -0
  14. package/biome.jsonc +4 -0
  15. package/dist/AzureAudience.d.ts +2 -2
  16. package/dist/AzureAudience.d.ts.map +1 -1
  17. package/dist/AzureAudience.js.map +1 -1
  18. package/dist/AzureClient.d.ts +8 -5
  19. package/dist/AzureClient.d.ts.map +1 -1
  20. package/dist/AzureClient.js +16 -10
  21. package/dist/AzureClient.js.map +1 -1
  22. package/dist/AzureFunctionTokenProvider.d.ts +2 -2
  23. package/dist/AzureFunctionTokenProvider.d.ts.map +1 -1
  24. package/dist/AzureFunctionTokenProvider.js.map +1 -1
  25. package/dist/AzureUrlResolver.d.ts +1 -1
  26. package/dist/AzureUrlResolver.d.ts.map +1 -1
  27. package/dist/AzureUrlResolver.js.map +1 -1
  28. package/dist/beta.d.ts +1 -1
  29. package/dist/index.d.ts +4 -3
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -2
  32. package/dist/index.js.map +1 -1
  33. package/dist/interfaces.d.ts +10 -9
  34. package/dist/interfaces.d.ts.map +1 -1
  35. package/dist/interfaces.js.map +1 -1
  36. package/dist/legacy.d.ts +2 -1
  37. package/dist/public.d.ts +1 -1
  38. package/lib/AzureAudience.d.ts +2 -2
  39. package/lib/AzureAudience.d.ts.map +1 -1
  40. package/lib/AzureAudience.js.map +1 -1
  41. package/lib/AzureClient.d.ts +8 -5
  42. package/lib/AzureClient.d.ts.map +1 -1
  43. package/lib/AzureClient.js +16 -10
  44. package/lib/AzureClient.js.map +1 -1
  45. package/lib/AzureFunctionTokenProvider.d.ts +2 -2
  46. package/lib/AzureFunctionTokenProvider.d.ts.map +1 -1
  47. package/lib/AzureFunctionTokenProvider.js.map +1 -1
  48. package/lib/AzureUrlResolver.d.ts +1 -1
  49. package/lib/AzureUrlResolver.d.ts.map +1 -1
  50. package/lib/AzureUrlResolver.js.map +1 -1
  51. package/lib/beta.d.ts +1 -1
  52. package/lib/index.d.ts +4 -3
  53. package/lib/index.d.ts.map +1 -1
  54. package/lib/index.js +1 -1
  55. package/lib/index.js.map +1 -1
  56. package/lib/interfaces.d.ts +10 -9
  57. package/lib/interfaces.d.ts.map +1 -1
  58. package/lib/interfaces.js.map +1 -1
  59. package/lib/legacy.d.ts +2 -1
  60. package/lib/public.d.ts +1 -1
  61. package/lib/tsdoc-metadata.json +1 -1
  62. package/package.json +38 -37
  63. package/src/AzureAudience.ts +2 -2
  64. package/src/AzureClient.ts +42 -20
  65. package/src/AzureFunctionTokenProvider.ts +10 -4
  66. package/src/AzureUrlResolver.ts +11 -4
  67. package/src/index.ts +9 -3
  68. package/src/interfaces.ts +12 -11
  69. package/tsconfig.json +1 -0
  70. package/tsdoc.json +4 -0
package/.eslintrc.cjs CHANGED
@@ -38,5 +38,13 @@ module.exports = {
38
38
  "unicorn/prevent-abbreviations": "off",
39
39
  },
40
40
  },
41
+ {
42
+ // Overrides for tests
43
+ files: ["src/test/*.spec.ts"],
44
+ rules: {
45
+ // Mocha tests should prefer regular functions, see https://mochajs.org/#arrow-functions
46
+ "prefer-arrow-callback": "off",
47
+ },
48
+ },
41
49
  ],
42
50
  };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @fluidframework/azure-client
2
2
 
3
+ ## 2.0.0-rc.5.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Update to TypeScript 5.4 ([#21214](https://github.com/microsoft/FluidFramework/pull/21214)) [0e6256c722](https://github.com/microsoft/FluidFramework/commit/0e6256c722d8bf024f4325bf02547daeeb18bfa6)
8
+
9
+ Update package implementations to use TypeScript 5.4.5.
10
+
11
+ - azure-client, tinylicious-client: compatibilityMode parameter added to createContainer and getContainer on AzureClient and TinyliciousClient ([#20997](https://github.com/microsoft/FluidFramework/pull/20997)) [2730787209](https://github.com/microsoft/FluidFramework/commit/2730787209a60155752d51da3c78cf97e1b5f3f9)
12
+
13
+ To support migration from 1.x to 2.0, a compatibility mode parameter has been added to these methods on AzureClient and TinyliciousClient. When set to "1", this allows interop between the 2.0 clients and 1.x clients. When set to "2", interop with 1.x clients is disallowed but new 2.0 features may be used.
14
+
3
15
  ## 2.0.0-rc.4.0.0
4
16
 
5
17
  ### Minor Changes
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/beta.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/beta.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/legacy.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/legacy.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/public.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts"
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": "../../../common/build/build-common/api-extractor-base.esm.primary.json"
3
+ "extends": "../../../common/build/build-common/api-extractor-base.esm.current.json"
4
4
  }
@@ -1,36 +1,37 @@
1
- ## API Report File for "@fluidframework/azure-client"
1
+ ## Alpha API Report File for "@fluidframework/azure-client"
2
2
 
3
3
  > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
4
 
5
5
  ```ts
6
6
 
7
- import { ContainerSchema } from '@fluidframework/fluid-static';
8
- import { ICompressionStorageConfig } from '@fluidframework/driver-utils';
9
- import { IConfigProviderBase } from '@fluidframework/core-interfaces';
10
- import { IFluidContainer } from '@fluidframework/fluid-static';
11
- import { IMember } from '@fluidframework/fluid-static';
12
- import { IServiceAudience } from '@fluidframework/fluid-static';
7
+ import { CompatibilityMode } from '@fluidframework/fluid-static';
8
+ import type { ContainerSchema } from '@fluidframework/fluid-static';
9
+ import type { ICompressionStorageConfig } from '@fluidframework/driver-utils';
10
+ import type { IConfigProviderBase } from '@fluidframework/core-interfaces';
11
+ import type { IFluidContainer } from '@fluidframework/fluid-static';
12
+ import type { IMember } from '@fluidframework/fluid-static';
13
+ import type { IServiceAudience } from '@fluidframework/fluid-static';
13
14
  import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
14
15
  import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
15
- import { ITokenClaims } from '@fluidframework/protocol-definitions';
16
+ import { ITokenClaims } from '@fluidframework/driver-definitions/internal';
16
17
  import { ITokenProvider } from '@fluidframework/routerlicious-driver';
17
18
  import { ITokenResponse } from '@fluidframework/routerlicious-driver';
18
- import { IUser } from '@fluidframework/protocol-definitions';
19
- import { ScopeType } from '@fluidframework/protocol-definitions';
19
+ import { IUser } from '@fluidframework/driver-definitions';
20
+ import { ScopeType } from '@fluidframework/driver-definitions/internal';
20
21
 
21
22
  // @public
22
23
  export class AzureClient {
23
24
  constructor(properties: AzureClientProps);
24
- createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema): Promise<{
25
+ createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
25
26
  container: IFluidContainer<TContainerSchema>;
26
27
  services: AzureContainerServices;
27
28
  }>;
28
- getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema): Promise<{
29
+ getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
29
30
  container: IFluidContainer<TContainerSchema>;
30
31
  services: AzureContainerServices;
31
32
  }>;
32
33
  getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
33
- viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion): Promise<{
34
+ viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion, compatibilityMode: CompatibilityMode): Promise<{
34
35
  container: IFluidContainer<TContainerSchema>;
35
36
  }>;
36
37
  }
@@ -65,15 +66,6 @@ export interface AzureContainerVersion {
65
66
  id: string;
66
67
  }
67
68
 
68
- // @internal @deprecated
69
- export class AzureFunctionTokenProvider implements ITokenProvider {
70
- constructor(azFunctionUrl: string, user?: Pick<AzureMember<any>, "name" | "id" | "additionalDetails"> | undefined);
71
- // (undocumented)
72
- fetchOrdererToken(tenantId: string, documentId?: string): Promise<ITokenResponse>;
73
- // (undocumented)
74
- fetchStorageToken(tenantId: string, documentId: string): Promise<ITokenResponse>;
75
- }
76
-
77
69
  // @public
78
70
  export interface AzureGetVersionsOptions {
79
71
  maxCount: number;
@@ -96,11 +88,7 @@ export interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
96
88
  type: "remote";
97
89
  }
98
90
 
99
- // @internal
100
- export interface AzureUser<T = any> extends IUser {
101
- additionalDetails?: T;
102
- name: string;
103
- }
91
+ export { CompatibilityMode }
104
92
 
105
93
  // @public
106
94
  export type IAzureAudience = IServiceAudience<AzureMember>;
@@ -0,0 +1,110 @@
1
+ ## Beta 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
+ import { CompatibilityMode } from '@fluidframework/fluid-static';
8
+ import type { ContainerSchema } from '@fluidframework/fluid-static';
9
+ import type { ICompressionStorageConfig } from '@fluidframework/driver-utils';
10
+ import type { IConfigProviderBase } from '@fluidframework/core-interfaces';
11
+ import type { IFluidContainer } from '@fluidframework/fluid-static';
12
+ import type { IMember } from '@fluidframework/fluid-static';
13
+ import type { IServiceAudience } from '@fluidframework/fluid-static';
14
+ import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
15
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
16
+ import { ITokenClaims } from '@fluidframework/driver-definitions/internal';
17
+ import { ITokenProvider } from '@fluidframework/routerlicious-driver';
18
+ import { ITokenResponse } from '@fluidframework/routerlicious-driver';
19
+ import { IUser } from '@fluidframework/driver-definitions';
20
+ import { ScopeType } from '@fluidframework/driver-definitions/internal';
21
+
22
+ // @public
23
+ export class AzureClient {
24
+ constructor(properties: AzureClientProps);
25
+ createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
26
+ container: IFluidContainer<TContainerSchema>;
27
+ services: AzureContainerServices;
28
+ }>;
29
+ getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
30
+ container: IFluidContainer<TContainerSchema>;
31
+ services: AzureContainerServices;
32
+ }>;
33
+ getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
34
+ viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion, compatibilityMode: CompatibilityMode): Promise<{
35
+ container: IFluidContainer<TContainerSchema>;
36
+ }>;
37
+ }
38
+
39
+ // @public
40
+ export interface AzureClientProps {
41
+ readonly configProvider?: IConfigProviderBase;
42
+ readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
43
+ readonly logger?: ITelemetryBaseLogger;
44
+ // (undocumented)
45
+ readonly summaryCompression?: boolean | ICompressionStorageConfig;
46
+ }
47
+
48
+ // @public
49
+ export interface AzureConnectionConfig {
50
+ endpoint: string;
51
+ tokenProvider: ITokenProvider;
52
+ type: AzureConnectionConfigType;
53
+ }
54
+
55
+ // @public
56
+ export type AzureConnectionConfigType = "local" | "remote";
57
+
58
+ // @public
59
+ export interface AzureContainerServices {
60
+ audience: IAzureAudience;
61
+ }
62
+
63
+ // @public
64
+ export interface AzureContainerVersion {
65
+ date?: string;
66
+ id: string;
67
+ }
68
+
69
+ // @public
70
+ export interface AzureGetVersionsOptions {
71
+ maxCount: number;
72
+ }
73
+
74
+ // @public
75
+ export interface AzureLocalConnectionConfig extends AzureConnectionConfig {
76
+ type: "local";
77
+ }
78
+
79
+ // @public
80
+ export interface AzureMember<T = any> extends IMember {
81
+ additionalDetails?: T;
82
+ name: string;
83
+ }
84
+
85
+ // @public
86
+ export interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
87
+ tenantId: string;
88
+ type: "remote";
89
+ }
90
+
91
+ export { CompatibilityMode }
92
+
93
+ // @public
94
+ export type IAzureAudience = IServiceAudience<AzureMember>;
95
+
96
+ export { ITelemetryBaseEvent }
97
+
98
+ export { ITelemetryBaseLogger }
99
+
100
+ export { ITokenClaims }
101
+
102
+ export { ITokenProvider }
103
+
104
+ export { ITokenResponse }
105
+
106
+ export { IUser }
107
+
108
+ export { ScopeType }
109
+
110
+ ```
@@ -0,0 +1,110 @@
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
+ import { CompatibilityMode } from '@fluidframework/fluid-static';
8
+ import type { ContainerSchema } from '@fluidframework/fluid-static';
9
+ import type { ICompressionStorageConfig } from '@fluidframework/driver-utils';
10
+ import type { IConfigProviderBase } from '@fluidframework/core-interfaces';
11
+ import type { IFluidContainer } from '@fluidframework/fluid-static';
12
+ import type { IMember } from '@fluidframework/fluid-static';
13
+ import type { IServiceAudience } from '@fluidframework/fluid-static';
14
+ import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
15
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
16
+ import { ITokenClaims } from '@fluidframework/driver-definitions/internal';
17
+ import { ITokenProvider } from '@fluidframework/routerlicious-driver';
18
+ import { ITokenResponse } from '@fluidframework/routerlicious-driver';
19
+ import { IUser } from '@fluidframework/driver-definitions';
20
+ import { ScopeType } from '@fluidframework/driver-definitions/internal';
21
+
22
+ // @public
23
+ export class AzureClient {
24
+ constructor(properties: AzureClientProps);
25
+ createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
26
+ container: IFluidContainer<TContainerSchema>;
27
+ services: AzureContainerServices;
28
+ }>;
29
+ getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
30
+ container: IFluidContainer<TContainerSchema>;
31
+ services: AzureContainerServices;
32
+ }>;
33
+ getContainerVersions(id: string, options?: AzureGetVersionsOptions): Promise<AzureContainerVersion[]>;
34
+ viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion, compatibilityMode: CompatibilityMode): Promise<{
35
+ container: IFluidContainer<TContainerSchema>;
36
+ }>;
37
+ }
38
+
39
+ // @public
40
+ export interface AzureClientProps {
41
+ readonly configProvider?: IConfigProviderBase;
42
+ readonly connection: AzureRemoteConnectionConfig | AzureLocalConnectionConfig;
43
+ readonly logger?: ITelemetryBaseLogger;
44
+ // (undocumented)
45
+ readonly summaryCompression?: boolean | ICompressionStorageConfig;
46
+ }
47
+
48
+ // @public
49
+ export interface AzureConnectionConfig {
50
+ endpoint: string;
51
+ tokenProvider: ITokenProvider;
52
+ type: AzureConnectionConfigType;
53
+ }
54
+
55
+ // @public
56
+ export type AzureConnectionConfigType = "local" | "remote";
57
+
58
+ // @public
59
+ export interface AzureContainerServices {
60
+ audience: IAzureAudience;
61
+ }
62
+
63
+ // @public
64
+ export interface AzureContainerVersion {
65
+ date?: string;
66
+ id: string;
67
+ }
68
+
69
+ // @public
70
+ export interface AzureGetVersionsOptions {
71
+ maxCount: number;
72
+ }
73
+
74
+ // @public
75
+ export interface AzureLocalConnectionConfig extends AzureConnectionConfig {
76
+ type: "local";
77
+ }
78
+
79
+ // @public
80
+ export interface AzureMember<T = any> extends IMember {
81
+ additionalDetails?: T;
82
+ name: string;
83
+ }
84
+
85
+ // @public
86
+ export interface AzureRemoteConnectionConfig extends AzureConnectionConfig {
87
+ tenantId: string;
88
+ type: "remote";
89
+ }
90
+
91
+ export { CompatibilityMode }
92
+
93
+ // @public
94
+ export type IAzureAudience = IServiceAudience<AzureMember>;
95
+
96
+ export { ITelemetryBaseEvent }
97
+
98
+ export { ITelemetryBaseLogger }
99
+
100
+ export { ITokenClaims }
101
+
102
+ export { ITokenProvider }
103
+
104
+ export { ITokenResponse }
105
+
106
+ export { IUser }
107
+
108
+ export { ScopeType }
109
+
110
+ ```
package/biome.jsonc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3
+ "extends": ["../../../biome.jsonc"]
4
+ }
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type IClient } from "@fluidframework/protocol-definitions";
6
- import { type AzureMember } from "./interfaces.js";
5
+ import type { IClient } from "@fluidframework/driver-definitions";
6
+ import type { AzureMember } from "./interfaces.js";
7
7
  /**
8
8
  * Creates Azure-specific audience member.
9
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"AzureAudience.d.ts","sourceRoot":"","sources":["../src/AzureAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAc,MAAM,sCAAsC,CAAC;AAEhF,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAEnE;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,OAAO,GAAG,WAAW,CAU9E"}
1
+ {"version":3,"file":"AzureAudience.d.ts","sourceRoot":"","sources":["../src/AzureAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAS,MAAM,oCAAoC,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,iBAAiB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,OAAO,GAAG,WAAW,CAU9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"AzureAudience.js","sourceRoot":"","sources":["../src/AzureAudience.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,cAAuB;IAChE,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;IACjC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAExB,OAAO;QACN,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,WAAW,EAAE,EAAE;QACf,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;KACzC,CAAC;AACH,CAAC;AAVD,8DAUC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,IAAW;IACrC,MAAM,cAAc,GAAG,IAA0B,CAAC;IAClD,MAAM,WAAW,GAAG,4CAA4C,CAAC;IACjE,IAAI,cAAc,CAAC,EAAE,KAAK,SAAS,EAAE;QACpC,MAAM,IAAI,SAAS,CAAC,GAAG,WAAW,kCAAkC,CAAC,CAAC;KACtE;IACD,IAAI,cAAc,CAAC,IAAI,KAAK,SAAS,EAAE;QACtC,MAAM,IAAI,SAAS,CAAC,GAAG,WAAW,oCAAoC,CAAC,CAAC;KACxE;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IClient, type IUser } from \"@fluidframework/protocol-definitions\";\n\nimport { type AzureMember, type AzureUser } from \"./interfaces.js\";\n\n/**\n * Creates Azure-specific audience member.\n *\n * @remarks\n * The provided `audienceMember`'s {@link @fluidframework/protocol-definitions#IClient.user} must be an {@link AzureUser}.\n */\nexport function createAzureAudienceMember(audienceMember: IClient): AzureMember {\n\tconst user = audienceMember.user;\n\tassertIsAzureUser(user);\n\n\treturn {\n\t\tid: user.id,\n\t\tname: user.name,\n\t\tconnections: [],\n\t\tadditionalDetails: user.additionalDetails,\n\t};\n}\n\n/**\n * Asserts that the provided {@link @fluidframework/protocol-definitions#IUser} is an {@link AzureUser}.\n */\nfunction assertIsAzureUser(user: IUser): asserts user is AzureUser<unknown> {\n\tconst maybeAzureUser = user as Partial<AzureUser>;\n\tconst baseMessage = 'Provided user data was not an \"AzureUser\".';\n\tif (maybeAzureUser.id === undefined) {\n\t\tthrow new TypeError(`${baseMessage} Missing required \"id\" property.`);\n\t}\n\tif (maybeAzureUser.name === undefined) {\n\t\tthrow new TypeError(`${baseMessage} Missing required \"name\" property.`);\n\t}\n}\n"]}
1
+ {"version":3,"file":"AzureAudience.js","sourceRoot":"","sources":["../src/AzureAudience.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,cAAuB;IAChE,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;IACjC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAExB,OAAO;QACN,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,WAAW,EAAE,EAAE;QACf,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;KACzC,CAAC;AACH,CAAC;AAVD,8DAUC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,IAAW;IACrC,MAAM,cAAc,GAAG,IAA0B,CAAC;IAClD,MAAM,WAAW,GAAG,4CAA4C,CAAC;IACjE,IAAI,cAAc,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QACrC,MAAM,IAAI,SAAS,CAAC,GAAG,WAAW,kCAAkC,CAAC,CAAC;IACvE,CAAC;IACD,IAAI,cAAc,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,IAAI,SAAS,CAAC,GAAG,WAAW,oCAAoC,CAAC,CAAC;IACzE,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IClient, IUser } from \"@fluidframework/driver-definitions\";\n\nimport type { AzureMember, AzureUser } from \"./interfaces.js\";\n\n/**\n * Creates Azure-specific audience member.\n *\n * @remarks\n * The provided `audienceMember`'s {@link @fluidframework/protocol-definitions#IClient.user} must be an {@link AzureUser}.\n */\nexport function createAzureAudienceMember(audienceMember: IClient): AzureMember {\n\tconst user = audienceMember.user;\n\tassertIsAzureUser(user);\n\n\treturn {\n\t\tid: user.id,\n\t\tname: user.name,\n\t\tconnections: [],\n\t\tadditionalDetails: user.additionalDetails,\n\t};\n}\n\n/**\n * Asserts that the provided {@link @fluidframework/protocol-definitions#IUser} is an {@link AzureUser}.\n */\nfunction assertIsAzureUser(user: IUser): asserts user is AzureUser<unknown> {\n\tconst maybeAzureUser = user as Partial<AzureUser>;\n\tconst baseMessage = 'Provided user data was not an \"AzureUser\".';\n\tif (maybeAzureUser.id === undefined) {\n\t\tthrow new TypeError(`${baseMessage} Missing required \"id\" property.`);\n\t}\n\tif (maybeAzureUser.name === undefined) {\n\t\tthrow new TypeError(`${baseMessage} Missing required \"name\" property.`);\n\t}\n}\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
6
- import { type AzureClientProps, type AzureContainerServices, type AzureContainerVersion, type AzureGetVersionsOptions } from "./interfaces.js";
5
+ import type { ContainerSchema, IFluidContainer, CompatibilityMode } from "@fluidframework/fluid-static";
6
+ import type { AzureClientProps, AzureContainerServices, AzureContainerVersion, AzureGetVersionsOptions } from "./interfaces.js";
7
7
  /**
8
8
  * AzureClient provides the ability to have a Fluid object backed by the Azure Fluid Relay or,
9
9
  * when running with local tenantId, have it be backed by a local Azure Fluid Relay instance.
@@ -24,9 +24,10 @@ export declare class AzureClient {
24
24
  * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
25
25
  * (normally not explicitly specified.)
26
26
  * @param containerSchema - Container schema for the new container.
27
+ * @param compatibilityMode - Compatibility mode the container should run in.
27
28
  * @returns New detached container instance along with associated services.
28
29
  */
29
- createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema): Promise<{
30
+ createContainer<const TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
30
31
  container: IFluidContainer<TContainerSchema>;
31
32
  services: AzureContainerServices;
32
33
  }>;
@@ -36,9 +37,10 @@ export declare class AzureClient {
36
37
  * (normally not explicitly specified.)
37
38
  * @param id - Unique ID of the container in Azure Fluid Relay.
38
39
  * @param containerSchema - Container schema used to access data objects in the container.
40
+ * @param compatibilityMode - Compatibility mode the container should run in.
39
41
  * @returns Existing container instance along with associated services.
40
42
  */
41
- getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema): Promise<{
43
+ getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
42
44
  container: IFluidContainer<TContainerSchema>;
43
45
  services: AzureContainerServices;
44
46
  }>;
@@ -49,9 +51,10 @@ export declare class AzureClient {
49
51
  * @param id - Unique ID of the source container in Azure Fluid Relay.
50
52
  * @param containerSchema - Container schema used to access data objects in the container.
51
53
  * @param version - Unique version of the source container in Azure Fluid Relay.
54
+ * @param compatibilityMode - Compatibility mode the container should run in.
52
55
  * @returns Loaded container instance at the specified version.
53
56
  */
54
- viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion): Promise<{
57
+ viewContainerVersion<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, version: AzureContainerVersion, compatibilityMode: CompatibilityMode): Promise<{
55
58
  container: IFluidContainer<TContainerSchema>;
56
59
  }>;
57
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAa1F,OAAO,EACN,KAAK,gBAAgB,EAErB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,MAAM,iBAAiB,CAAC;AA+CzB;;;;GAIG;AACH,qBAAa,WAAW;IASJ,OAAO,CAAC,QAAQ,CAAC,UAAU;IAR9C,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkC;IAEjE;;;OAGG;gBACiC,UAAU,EAAE,gBAAgB;IAoBhE;;;;;;OAMG;IACU,eAAe,CAAC,KAAK,CAAC,gBAAgB,SAAS,eAAe,EAC1E,eAAe,EAAE,gBAAgB,GAC/B,OAAO,CAAC;QACV,SAAS,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;QAC7C,QAAQ,EAAE,sBAAsB,CAAC;KACjC,CAAC;IAgBF;;;;;;;OAOG;IACU,YAAY,CAAC,gBAAgB,SAAS,eAAe,EACjE,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,gBAAgB,GAC/B,OAAO,CAAC;QACV,SAAS,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;QAC7C,QAAQ,EAAE,sBAAsB,CAAC;KACjC,CAAC;IAmBF;;;;;;;;OAQG;IACU,oBAAoB,CAAC,gBAAgB,SAAS,eAAe,EACzE,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,gBAAgB,EACjC,OAAO,EAAE,qBAAqB,GAC5B,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;YA8BN,oBAAoB;YAiCpB,sBAAsB;CASpC"}
1
+ {"version":3,"file":"AzureClient.d.ts","sourceRoot":"","sources":["../src/AzureClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,MAAM,8BAA8B,CAAC;AAYtC,OAAO,KAAK,EACX,gBAAgB,EAEhB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,MAAM,iBAAiB,CAAC;AA+CzB;;;;GAIG;AACH,qBAAa,WAAW;IASJ,OAAO,CAAC,QAAQ,CAAC,UAAU;IAR9C,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkC;IAEjE;;;OAGG;gBACiC,UAAU,EAAE,gBAAgB;IAoBhE;;;;;;;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;IAsBF;;;;;;;;;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;IAwBF;;;;;;OAMG;IACU,oBAAoB,CAChC,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,qBAAqB,EAAE,CAAC;IA6BnC,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,YAAY;YAiCN,oBAAoB;YAiCpB,sBAAsB;CASpC"}
@@ -39,8 +39,8 @@ const azureClientFeatureGates = {
39
39
  */
40
40
  const azureClientV1CompatFeatureGates = {
41
41
  // Disable Garbage Collection
42
- "Fluid.GarbageCollection.RunSweep": false,
43
- "Fluid.GarbageCollection.DisableAutoRecovery": true,
42
+ "Fluid.GarbageCollection.RunSweep": false, // To prevent the GC op
43
+ "Fluid.GarbageCollection.DisableAutoRecovery": true, // To prevent the GC op
44
44
  "Fluid.GarbageCollection.ThrowOnTombstoneLoadOverride": false, // For a consistent story of "GC is disabled"
45
45
  };
46
46
  /**
@@ -85,10 +85,11 @@ class AzureClient {
85
85
  * @typeparam TContainerSchema - Used to infer the the type of 'initialObjects' in the returned container.
86
86
  * (normally not explicitly specified.)
87
87
  * @param containerSchema - Container schema for the new container.
88
+ * @param compatibilityMode - Compatibility mode the container should run in.
88
89
  * @returns New detached container instance along with associated services.
89
90
  */
90
- async createContainer(containerSchema) {
91
- const loader = this.createLoader(containerSchema);
91
+ async createContainer(containerSchema, compatibilityMode) {
92
+ const loader = this.createLoader(containerSchema, compatibilityMode);
92
93
  const container = await loader.createDetachedContainer({
93
94
  package: "no-dynamic-package",
94
95
  config: {},
@@ -103,10 +104,11 @@ class AzureClient {
103
104
  * (normally not explicitly specified.)
104
105
  * @param id - Unique ID of the container in Azure Fluid Relay.
105
106
  * @param containerSchema - Container schema used to access data objects in the container.
107
+ * @param compatibilityMode - Compatibility mode the container should run in.
106
108
  * @returns Existing container instance along with associated services.
107
109
  */
108
- async getContainer(id, containerSchema) {
109
- const loader = this.createLoader(containerSchema);
110
+ async getContainer(id, containerSchema, compatibilityMode) {
111
+ const loader = this.createLoader(containerSchema, compatibilityMode);
110
112
  const url = new URL(this.properties.connection.endpoint);
111
113
  url.searchParams.append("storage", encodeURIComponent(this.properties.connection.endpoint));
112
114
  url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.properties.connection)));
@@ -127,10 +129,11 @@ class AzureClient {
127
129
  * @param id - Unique ID of the source container in Azure Fluid Relay.
128
130
  * @param containerSchema - Container schema used to access data objects in the container.
129
131
  * @param version - Unique version of the source container in Azure Fluid Relay.
132
+ * @param compatibilityMode - Compatibility mode the container should run in.
130
133
  * @returns Loaded container instance at the specified version.
131
134
  */
132
- async viewContainerVersion(id, containerSchema, version) {
133
- const loader = this.createLoader(containerSchema);
135
+ async viewContainerVersion(id, containerSchema, version, compatibilityMode) {
136
+ const loader = this.createLoader(containerSchema, compatibilityMode);
134
137
  const url = new URL(this.properties.connection.endpoint);
135
138
  url.searchParams.append("storage", encodeURIComponent(this.properties.connection.endpoint));
136
139
  url.searchParams.append("tenantId", encodeURIComponent(getTenantId(this.properties.connection)));
@@ -179,8 +182,11 @@ class AzureClient {
179
182
  }),
180
183
  };
181
184
  }
182
- createLoader(schema) {
183
- const runtimeFactory = (0, internal_5.createDOProviderContainerRuntimeFactory)({ schema });
185
+ createLoader(schema, compatibilityMode) {
186
+ const runtimeFactory = (0, internal_5.createDOProviderContainerRuntimeFactory)({
187
+ schema,
188
+ compatibilityMode,
189
+ });
184
190
  const load = async () => {
185
191
  return {
186
192
  module: { fluidExport: runtimeFactory },