@fluidframework/core-interfaces 0.40.0-40653 → 0.42.0-49742
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/.eslintrc.js +1 -1
- package/api-report/core-interfaces.api.md +47 -20
- package/dist/fluidLoadable.d.ts +15 -0
- package/dist/fluidLoadable.d.ts.map +1 -1
- package/dist/fluidLoadable.js +3 -0
- package/dist/fluidLoadable.js.map +1 -1
- package/dist/fluidObject.d.ts +36 -5
- package/dist/fluidObject.d.ts.map +1 -1
- package/dist/fluidObject.js +0 -1
- package/dist/fluidObject.js.map +1 -1
- package/dist/fluidPackage.d.ts +25 -0
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js +10 -0
- package/dist/fluidPackage.js.map +1 -1
- package/dist/handles.d.ts +2 -1
- package/dist/handles.d.ts.map +1 -1
- package/dist/handles.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +64 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +7 -0
- package/dist/provider.js.map +1 -0
- package/dist/serializer.d.ts +10 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js +3 -0
- package/dist/serializer.js.map +1 -1
- package/lib/fluidLoadable.d.ts +15 -0
- package/lib/fluidLoadable.d.ts.map +1 -1
- package/lib/fluidLoadable.js +3 -0
- package/lib/fluidLoadable.js.map +1 -1
- package/lib/fluidObject.d.ts +36 -5
- package/lib/fluidObject.d.ts.map +1 -1
- package/lib/fluidObject.js +0 -1
- package/lib/fluidObject.js.map +1 -1
- package/lib/fluidPackage.d.ts +25 -0
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js +10 -0
- package/lib/fluidPackage.js.map +1 -1
- package/lib/handles.d.ts +2 -1
- package/lib/handles.d.ts.map +1 -1
- package/lib/handles.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/provider.d.ts +64 -0
- package/lib/provider.d.ts.map +1 -0
- package/lib/provider.js +6 -0
- package/lib/provider.js.map +1 -0
- package/lib/serializer.d.ts +10 -0
- package/lib/serializer.d.ts.map +1 -1
- package/lib/serializer.js +3 -0
- package/lib/serializer.js.map +1 -1
- package/lib/test/types/fluidObjectTypes.d.ts +2 -0
- package/lib/test/types/fluidObjectTypes.d.ts.map +1 -0
- package/lib/test/types/fluidObjectTypes.js +80 -0
- package/lib/test/types/fluidObjectTypes.js.map +1 -0
- package/lib/test/{validate0.39.8.d.ts → types/validate0.39.8.d.ts} +0 -0
- package/lib/test/types/validate0.39.8.d.ts.map +1 -0
- package/lib/test/{validate0.39.8.js → types/validate0.39.8.js} +0 -0
- package/lib/test/types/validate0.39.8.js.map +1 -0
- package/lib/test/types/validate0.40.0.d.ts +2 -0
- package/lib/test/types/validate0.40.0.d.ts.map +1 -0
- package/lib/test/types/validate0.40.0.js +72 -0
- package/lib/test/types/validate0.40.0.js.map +1 -0
- package/lib/test/types/validate0.41.0.d.ts +2 -0
- package/lib/test/types/validate0.41.0.d.ts.map +1 -0
- package/lib/test/types/validate0.41.0.js +78 -0
- package/lib/test/types/validate0.41.0.js.map +1 -0
- package/package.json +23 -18
- package/src/fluidLoadable.ts +15 -0
- package/src/fluidObject.ts +39 -17
- package/src/fluidPackage.ts +25 -0
- package/src/handles.ts +3 -2
- package/src/index.ts +1 -0
- package/src/provider.ts +70 -0
- package/src/serializer.ts +10 -0
- package/tsconfig.json +3 -2
- package/lib/test/validate0.39.8.d.ts.map +0 -1
- package/lib/test/validate0.39.8.js.map +0 -1
package/.eslintrc.js
CHANGED
|
@@ -4,33 +4,46 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
+
// Warning: (ae-incompatible-release-tags) The symbol "FluidObject" is marked as @public, but its signature references "FluidObjectProviderKeys" which is marked as @internal
|
|
8
|
+
//
|
|
7
9
|
// @public
|
|
10
|
+
export type FluidObject<T = unknown> = Partial<Pick<T, FluidObjectProviderKeys<T>>>;
|
|
11
|
+
|
|
12
|
+
// @public
|
|
13
|
+
export type FluidObjectKeys<T> = keyof FluidObject<T>;
|
|
14
|
+
|
|
15
|
+
// Warning: (ae-internal-missing-underscore) The name "FluidObjectProviderKeys" should be prefixed with an underscore because the declaration is marked as @internal
|
|
16
|
+
//
|
|
17
|
+
// @internal
|
|
18
|
+
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Exclude<T[TProp], undefined> ? TProp : never;
|
|
19
|
+
|
|
20
|
+
// @public @deprecated (undocumented)
|
|
8
21
|
export interface IFluidCodeDetails {
|
|
9
22
|
readonly config?: IFluidCodeDetailsConfig;
|
|
10
23
|
readonly package: string | Readonly<IFluidPackage>;
|
|
11
24
|
}
|
|
12
25
|
|
|
13
|
-
// @public (undocumented)
|
|
26
|
+
// @public @deprecated (undocumented)
|
|
14
27
|
export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
15
28
|
|
|
16
|
-
// @public
|
|
29
|
+
// @public @deprecated (undocumented)
|
|
17
30
|
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
18
31
|
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
|
|
19
32
|
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
|
|
20
33
|
}
|
|
21
34
|
|
|
22
|
-
// @public
|
|
35
|
+
// @public @deprecated (undocumented)
|
|
23
36
|
export interface IFluidCodeDetailsConfig {
|
|
24
37
|
// (undocumented)
|
|
25
38
|
readonly [key: string]: string;
|
|
26
39
|
}
|
|
27
40
|
|
|
28
|
-
// @public (undocumented)
|
|
41
|
+
// @public @deprecated (undocumented)
|
|
29
42
|
export const IFluidConfiguration: keyof IProvideFluidConfiguration;
|
|
30
43
|
|
|
31
|
-
// @public (undocumented)
|
|
44
|
+
// @public @deprecated (undocumented)
|
|
32
45
|
export interface IFluidConfiguration extends IProvideFluidConfiguration {
|
|
33
|
-
// (undocumented)
|
|
46
|
+
// @deprecated (undocumented)
|
|
34
47
|
scopes: string[];
|
|
35
48
|
}
|
|
36
49
|
|
|
@@ -38,7 +51,7 @@ export interface IFluidConfiguration extends IProvideFluidConfiguration {
|
|
|
38
51
|
export const IFluidHandle: keyof IProvideFluidHandle;
|
|
39
52
|
|
|
40
53
|
// @public
|
|
41
|
-
export interface IFluidHandle<T = IFluidObject & IFluidLoadable> extends IProvideFluidHandle {
|
|
54
|
+
export interface IFluidHandle<T = IFluidObject & FluidObject & IFluidLoadable> extends IProvideFluidHandle {
|
|
42
55
|
// @deprecated (undocumented)
|
|
43
56
|
readonly absolutePath: string;
|
|
44
57
|
attachGraph(): void;
|
|
@@ -69,11 +82,25 @@ export interface IFluidLoadable extends IProvideFluidLoadable {
|
|
|
69
82
|
handle: IFluidHandle;
|
|
70
83
|
}
|
|
71
84
|
|
|
72
|
-
// @public (undocumented)
|
|
73
|
-
export interface IFluidObject
|
|
85
|
+
// @public @deprecated (undocumented)
|
|
86
|
+
export interface IFluidObject {
|
|
87
|
+
// @deprecated (undocumented)
|
|
88
|
+
readonly IFluidConfiguration?: IFluidConfiguration;
|
|
89
|
+
// @deprecated (undocumented)
|
|
90
|
+
readonly IFluidHandle?: IFluidHandle;
|
|
91
|
+
// @deprecated (undocumented)
|
|
92
|
+
readonly IFluidHandleContext?: IFluidHandleContext;
|
|
93
|
+
// @deprecated (undocumented)
|
|
94
|
+
readonly IFluidLoadable?: IFluidLoadable;
|
|
95
|
+
// @deprecated (undocumented)
|
|
96
|
+
readonly IFluidRouter?: IFluidRouter;
|
|
97
|
+
// @deprecated (undocumented)
|
|
98
|
+
readonly IFluidRunnable?: IFluidRunnable;
|
|
99
|
+
// @deprecated (undocumented)
|
|
100
|
+
readonly IFluidSerializer?: IFluidSerializer;
|
|
74
101
|
}
|
|
75
102
|
|
|
76
|
-
// @public
|
|
103
|
+
// @public @deprecated (undocumented)
|
|
77
104
|
export interface IFluidPackage {
|
|
78
105
|
[key: string]: unknown;
|
|
79
106
|
fluid: {
|
|
@@ -82,7 +109,7 @@ export interface IFluidPackage {
|
|
|
82
109
|
name: string;
|
|
83
110
|
}
|
|
84
111
|
|
|
85
|
-
// @public
|
|
112
|
+
// @public @deprecated (undocumented)
|
|
86
113
|
export interface IFluidPackageEnvironment {
|
|
87
114
|
[target: string]: undefined | {
|
|
88
115
|
files: string[];
|
|
@@ -110,10 +137,10 @@ export interface IFluidRunnable {
|
|
|
110
137
|
stop(reason?: string): void;
|
|
111
138
|
}
|
|
112
139
|
|
|
113
|
-
// @public (undocumented)
|
|
140
|
+
// @public @deprecated (undocumented)
|
|
114
141
|
export const IFluidSerializer: keyof IProvideFluidSerializer;
|
|
115
142
|
|
|
116
|
-
// @public (undocumented)
|
|
143
|
+
// @public @deprecated (undocumented)
|
|
117
144
|
export interface IFluidSerializer extends IProvideFluidSerializer {
|
|
118
145
|
decode?(input: any): any;
|
|
119
146
|
parse(value: string): any;
|
|
@@ -121,15 +148,15 @@ export interface IFluidSerializer extends IProvideFluidSerializer {
|
|
|
121
148
|
stringify(value: any, bind: IFluidHandle): string;
|
|
122
149
|
}
|
|
123
150
|
|
|
124
|
-
// @public (undocumented)
|
|
151
|
+
// @public @deprecated (undocumented)
|
|
125
152
|
export interface IProvideFluidCodeDetailsComparer {
|
|
126
153
|
// (undocumented)
|
|
127
154
|
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
128
155
|
}
|
|
129
156
|
|
|
130
|
-
// @public (undocumented)
|
|
157
|
+
// @public @deprecated (undocumented)
|
|
131
158
|
export interface IProvideFluidConfiguration {
|
|
132
|
-
// (undocumented)
|
|
159
|
+
// @deprecated (undocumented)
|
|
133
160
|
readonly IFluidConfiguration: IFluidConfiguration;
|
|
134
161
|
}
|
|
135
162
|
|
|
@@ -163,7 +190,7 @@ export interface IProvideFluidRunnable {
|
|
|
163
190
|
readonly IFluidRunnable: IFluidRunnable;
|
|
164
191
|
}
|
|
165
192
|
|
|
166
|
-
// @public (undocumented)
|
|
193
|
+
// @public @deprecated (undocumented)
|
|
167
194
|
export interface IProvideFluidSerializer {
|
|
168
195
|
// (undocumented)
|
|
169
196
|
readonly IFluidSerializer: IFluidSerializer;
|
|
@@ -199,7 +226,7 @@ export interface IResponse {
|
|
|
199
226
|
value: any;
|
|
200
227
|
}
|
|
201
228
|
|
|
202
|
-
// @public
|
|
229
|
+
// @public @deprecated
|
|
203
230
|
export interface ISerializedHandle {
|
|
204
231
|
// (undocumented)
|
|
205
232
|
type: "__fluid_handle__";
|
|
@@ -207,10 +234,10 @@ export interface ISerializedHandle {
|
|
|
207
234
|
url: string;
|
|
208
235
|
}
|
|
209
236
|
|
|
210
|
-
// @public (undocumented)
|
|
237
|
+
// @public @deprecated (undocumented)
|
|
211
238
|
export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
212
239
|
|
|
213
|
-
// @public
|
|
240
|
+
// @public @deprecated (undocumented)
|
|
214
241
|
export const isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>;
|
|
215
242
|
|
|
216
243
|
|
package/dist/fluidLoadable.d.ts
CHANGED
|
@@ -21,11 +21,26 @@ export interface IFluidRunnable {
|
|
|
21
21
|
run(...args: any[]): Promise<void>;
|
|
22
22
|
stop(reason?: string): void;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.
|
|
26
|
+
*/
|
|
24
27
|
export declare const IFluidConfiguration: keyof IProvideFluidConfiguration;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.
|
|
30
|
+
*/
|
|
25
31
|
export interface IProvideFluidConfiguration {
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.
|
|
34
|
+
*/
|
|
26
35
|
readonly IFluidConfiguration: IFluidConfiguration;
|
|
27
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.
|
|
39
|
+
*/
|
|
28
40
|
export interface IFluidConfiguration extends IProvideFluidConfiguration {
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.
|
|
43
|
+
*/
|
|
29
44
|
scopes: string[];
|
|
30
45
|
}
|
|
31
46
|
//# sourceMappingURL=fluidLoadable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidLoadable.d.ts","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CAC3C;AACD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAEzD,MAAM,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CAC3C;AACD,MAAM,WAAW,cAAc;IAC3B,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"fluidLoadable.d.ts","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CAC3C;AACD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAEzD,MAAM,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,qBAAwC,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CAC3C;AACD,MAAM,WAAW,cAAc;IAC3B,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;OAEG;IACH,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
package/dist/fluidLoadable.js
CHANGED
|
@@ -7,5 +7,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.IFluidConfiguration = exports.IFluidRunnable = exports.IFluidLoadable = void 0;
|
|
8
8
|
exports.IFluidLoadable = "IFluidLoadable";
|
|
9
9
|
exports.IFluidRunnable = "IFluidRunnable";
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.
|
|
12
|
+
*/
|
|
10
13
|
exports.IFluidConfiguration = "IFluidConfiguration";
|
|
11
14
|
//# sourceMappingURL=fluidLoadable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidLoadable.js","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIU,QAAA,cAAc,GAAgC,gBAAgB,CAAC;AAa/D,QAAA,cAAc,GAAgC,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"fluidLoadable.js","sourceRoot":"","sources":["../src/fluidLoadable.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIU,QAAA,cAAc,GAAgC,gBAAgB,CAAC;AAa/D,QAAA,cAAc,GAAgC,gBAAgB,CAAC;AAU5E;;GAEG;AACU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"./handles\";\n\nexport const IFluidLoadable: keyof IProvideFluidLoadable = \"IFluidLoadable\";\n\nexport interface IProvideFluidLoadable {\n readonly IFluidLoadable: IFluidLoadable;\n}\n/**\n * A shared FluidObject has a URL from which it can be referenced\n */\nexport interface IFluidLoadable extends IProvideFluidLoadable {\n // Handle to the loadable FluidObject\n handle: IFluidHandle;\n}\n\nexport const IFluidRunnable: keyof IProvideFluidRunnable = \"IFluidRunnable\";\n\nexport interface IProvideFluidRunnable {\n readonly IFluidRunnable: IFluidRunnable;\n}\nexport interface IFluidRunnable {\n run(...args: any[]): Promise<void>;\n stop(reason?: string): void;\n}\n\n/**\n * @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.\n */\nexport const IFluidConfiguration: keyof IProvideFluidConfiguration = \"IFluidConfiguration\";\n\n/**\n * @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.\n */\nexport interface IProvideFluidConfiguration {\n /**\n * @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.\n */\n readonly IFluidConfiguration: IFluidConfiguration;\n}\n\n/**\n * @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.\n */\nexport interface IFluidConfiguration extends IProvideFluidConfiguration {\n /**\n * @deprecated 0.42 - Not recommended for use and will be removed in an upcoming release.\n */\n scopes: string[];\n}\n"]}
|
package/dist/fluidObject.d.ts
CHANGED
|
@@ -2,10 +2,41 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
5
|
+
import { IFluidConfiguration, IFluidLoadable, IFluidRunnable } from "./fluidLoadable";
|
|
6
|
+
import { IFluidRouter } from "./fluidRouter";
|
|
7
|
+
import { IFluidHandle, IFluidHandleContext } from "./handles";
|
|
8
|
+
import { IFluidSerializer } from "./serializer";
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use `FluidObject` or the interface directly instead
|
|
11
|
+
*/
|
|
12
|
+
export interface IFluidObject {
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated - use `FluidObject<IFluidLoadable>` instead
|
|
15
|
+
*/
|
|
16
|
+
readonly IFluidLoadable?: IFluidLoadable;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated - use `FluidObject<IFluidRunnable>` instead
|
|
19
|
+
*/
|
|
20
|
+
readonly IFluidRunnable?: IFluidRunnable;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated - use `FluidObject<IFluidRouter>` instead
|
|
23
|
+
*/
|
|
24
|
+
readonly IFluidRouter?: IFluidRouter;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated - use `FluidObject<IFluidHandleContext>` instead
|
|
27
|
+
*/
|
|
28
|
+
readonly IFluidHandleContext?: IFluidHandleContext;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated - use `FluidObject<IFluidConfiguration>` instead
|
|
31
|
+
*/
|
|
32
|
+
readonly IFluidConfiguration?: IFluidConfiguration;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated - use `FluidObject<IFluidHandle>` instead
|
|
35
|
+
*/
|
|
36
|
+
readonly IFluidHandle?: IFluidHandle;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated - use `FluidObject<IFluidSerializer>` instead
|
|
39
|
+
*/
|
|
40
|
+
readonly IFluidSerializer?: IFluidSerializer;
|
|
10
41
|
}
|
|
11
42
|
//# sourceMappingURL=fluidObject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidObject.d.ts","sourceRoot":"","sources":["../src/fluidObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"fluidObject.d.ts","sourceRoot":"","sources":["../src/fluidObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,mBAAmB,EACnB,cAAc,EACd,cAAc,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,YAAY;IAEzB;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAA;IACxC;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IACnD;;OAEG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IACnD;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CAChD"}
|
package/dist/fluidObject.js
CHANGED
package/dist/fluidObject.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidObject.js","sourceRoot":"","sources":["../src/fluidObject.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"fluidObject.js","sourceRoot":"","sources":["../src/fluidObject.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IFluidConfiguration,\n IFluidLoadable,\n IFluidRunnable,\n} from \"./fluidLoadable\";\nimport { IFluidRouter } from \"./fluidRouter\";\nimport { IFluidHandle, IFluidHandleContext } from \"./handles\";\nimport { IFluidSerializer } from \"./serializer\";\n\n/**\n * @deprecated Use `FluidObject` or the interface directly instead\n */\nexport interface IFluidObject {\n\n /**\n * @deprecated - use `FluidObject<IFluidLoadable>` instead\n */\n readonly IFluidLoadable?: IFluidLoadable;\n /**\n * @deprecated - use `FluidObject<IFluidRunnable>` instead\n */\n readonly IFluidRunnable?: IFluidRunnable\n /**\n * @deprecated - use `FluidObject<IFluidRouter>` instead\n */\n readonly IFluidRouter?: IFluidRouter;\n /**\n * @deprecated - use `FluidObject<IFluidHandleContext>` instead\n */\n readonly IFluidHandleContext?: IFluidHandleContext;\n /**\n * @deprecated - use `FluidObject<IFluidConfiguration>` instead\n */\n readonly IFluidConfiguration?: IFluidConfiguration;\n /**\n * @deprecated - use `FluidObject<IFluidHandle>` instead\n */\n readonly IFluidHandle?: IFluidHandle;\n /**\n * @deprecated - use `FluidObject<IFluidSerializer>` instead\n */\n readonly IFluidSerializer?: IFluidSerializer;\n}\n"]}
|
package/dist/fluidPackage.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidPackageEnvironment}
|
|
7
|
+
* to have code loading modules in same package.
|
|
6
8
|
* Specifies an environment on Fluid property of a IFluidPackage
|
|
7
9
|
*/
|
|
8
10
|
export interface IFluidPackageEnvironment {
|
|
@@ -26,6 +28,8 @@ export interface IFluidPackageEnvironment {
|
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
31
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidPackage}
|
|
32
|
+
* to have code loading modules in same package.
|
|
29
33
|
* Fluid-specific properties expected on a package to be loaded by the code loader.
|
|
30
34
|
* While compatible with the npm package format it is not necessary that that package is an
|
|
31
35
|
* npm package:
|
|
@@ -54,17 +58,23 @@ export interface IFluidPackage {
|
|
|
54
58
|
[key: string]: unknown;
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
61
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#isFluidPackage}
|
|
62
|
+
* to have code loading modules in same package.
|
|
57
63
|
* Check if the package.json defines a Fluid package
|
|
58
64
|
* @param pkg - the package json data to check if it is a Fluid package.
|
|
59
65
|
*/
|
|
60
66
|
export declare const isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>;
|
|
61
67
|
/**
|
|
68
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsConfig}
|
|
69
|
+
* to have code loading modules in same package.
|
|
62
70
|
* Package manager configuration. Provides a key value mapping of config values
|
|
63
71
|
*/
|
|
64
72
|
export interface IFluidCodeDetailsConfig {
|
|
65
73
|
readonly [key: string]: string;
|
|
66
74
|
}
|
|
67
75
|
/**
|
|
76
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetails}
|
|
77
|
+
* to have code loading modules in same package.
|
|
68
78
|
* Data structure used to describe the code to load on the Fluid document
|
|
69
79
|
*/
|
|
70
80
|
export interface IFluidCodeDetails {
|
|
@@ -78,12 +88,27 @@ export interface IFluidCodeDetails {
|
|
|
78
88
|
*/
|
|
79
89
|
readonly config?: IFluidCodeDetailsConfig;
|
|
80
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#isFluidCodeDetails}
|
|
93
|
+
* to have code loading modules in same package
|
|
94
|
+
*/
|
|
81
95
|
export declare const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsComparer}
|
|
98
|
+
* to have code loading modules in same package.
|
|
99
|
+
*/
|
|
82
100
|
export declare const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated in favor of
|
|
103
|
+
* {@link @fluidframework/container-definitions/fluidPackage.ts#IProvideFluidCodeDetailsComparer}
|
|
104
|
+
* to have code loading modules in same package.
|
|
105
|
+
*/
|
|
83
106
|
export interface IProvideFluidCodeDetailsComparer {
|
|
84
107
|
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
85
108
|
}
|
|
86
109
|
/**
|
|
110
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsComparer}
|
|
111
|
+
* to have code loading modules in same package.
|
|
87
112
|
* Provides capability to compare Fluid code details.
|
|
88
113
|
*/
|
|
89
114
|
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEF
|
|
1
|
+
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEF;;;;GAIG;AACJ,MAAM,WAAW,wBAAwB;IAErC;;;OAGG;IACH,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG;QAC1B;;;;WAIG;QACH,KAAK,EAAE,MAAM,EAAE,CAAC;QAEhB;;;;WAIG;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KAC1B,CAAA;CACJ;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE;QACH;;;WAGG;QACH,CAAC,WAAW,EAAE,MAAM,GAAI,SAAS,GAAG,wBAAwB,CAAC;KAChE,CAAC;IACF;;;;OAIG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QAAS,GAAG,mCAGF,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;EAGE;AACF,eAAO,MAAM,kBAAkB,YAAa,OAAO,2CAKlD,CAAC;AAEF;;;EAGE;AACF,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAA8D,CAAC;AAE7G;;;;EAIE;AACF,MAAM,WAAW,gCAAgC;IAC7C,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAE;CAClE;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gCAAgC;IAE/E;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAGzF;;;;;;;;;OASG;IACH,OAAO,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAEpF"}
|
package/dist/fluidPackage.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.IFluidCodeDetailsComparer = exports.isFluidCodeDetails = exports.isFluidPackage = void 0;
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#isFluidPackage}
|
|
10
|
+
* to have code loading modules in same package.
|
|
9
11
|
* Check if the package.json defines a Fluid package
|
|
10
12
|
* @param pkg - the package json data to check if it is a Fluid package.
|
|
11
13
|
*/
|
|
@@ -13,6 +15,10 @@ const isFluidPackage = (pkg) => typeof pkg === "object"
|
|
|
13
15
|
&& typeof (pkg === null || pkg === void 0 ? void 0 : pkg.name) === "string"
|
|
14
16
|
&& typeof (pkg === null || pkg === void 0 ? void 0 : pkg.fluid) === "object";
|
|
15
17
|
exports.isFluidPackage = isFluidPackage;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#isFluidCodeDetails}
|
|
20
|
+
* to have code loading modules in same package
|
|
21
|
+
*/
|
|
16
22
|
const isFluidCodeDetails = (details) => {
|
|
17
23
|
const maybeCodeDetails = details;
|
|
18
24
|
return typeof maybeCodeDetails === "object"
|
|
@@ -20,5 +26,9 @@ const isFluidCodeDetails = (details) => {
|
|
|
20
26
|
&& ((maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === undefined || typeof (maybeCodeDetails === null || maybeCodeDetails === void 0 ? void 0 : maybeCodeDetails.config) === "object");
|
|
21
27
|
};
|
|
22
28
|
exports.isFluidCodeDetails = isFluidCodeDetails;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsComparer}
|
|
31
|
+
* to have code loading modules in same package.
|
|
32
|
+
*/
|
|
23
33
|
exports.IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
|
|
24
34
|
//# sourceMappingURL=fluidPackage.js.map
|
package/dist/fluidPackage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA6DH;;;;;GAKG;AACI,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAkC,EAAE,CACvE,OAAO,GAAG,KAAK,QAAQ;OACpB,QAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,CAAA,KAAK,QAAQ;OAC7B,QAAO,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,CAAA,KAAK,QAAQ,CAAC;AAHzB,QAAA,cAAc,kBAGW;AA6BtC;;;EAGE;AACK,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC3F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,OAAO,gBAAgB,KAAK,QAAQ;WACpC,CAAC,QAAO,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAA,KAAK,QAAQ,IAAI,sBAAc,CAAC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,CAAC;WAC5F,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,MAAK,SAAS,IAAI,QAAO,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,MAAM,CAAA,KAAK,QAAQ,CAAC,CAAC;AACpG,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEF;;;EAGE;AACW,QAAA,yBAAyB,GAA2C,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n /**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidPackageEnvironment}\n * to have code loading modules in same package.\n * Specifies an environment on Fluid property of a IFluidPackage\n */\nexport interface IFluidPackageEnvironment {\n\n /**\n * The name of the target. For a browser environment, this could be umd for scripts\n * or css for styles.\n */\n [target: string]: undefined | {\n /**\n * List of files for the target. These can be relative or absolute.\n * The code loader should resolve relative paths, and validate all\n * full urls.\n */\n files: string[];\n\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition\n * of Library, the entrypoint for umd packages\n */\n [key: string]: unknown;\n }\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidPackage}\n * to have code loading modules in same package.\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n */\nexport interface IFluidPackage {\n /**\n * The name of the package that this code represnets\n */\n name: string;\n /**\n * This object represents the Fluid specific properties of the package\n */\n fluid: {\n /**\n * The name of the of the environment. This should be something like browser, or node\n * and contain the necessary targets for loading this code in that environment.\n */\n [environment: string]: undefined | IFluidPackageEnvironment;\n };\n /**\n * General access for extended fields as specific usages will\n * likely have additional infornamation like a definition of\n * compatible versions, or deployment information like rings or rollouts.\n */\n [key: string]: unknown;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#isFluidPackage}\n * to have code loading modules in same package.\n * Check if the package.json defines a Fluid package\n * @param pkg - the package json data to check if it is a Fluid package.\n */\nexport const isFluidPackage = (pkg: any): pkg is Readonly<IFluidPackage> =>\n typeof pkg === \"object\"\n && typeof pkg?.name === \"string\"\n && typeof pkg?.fluid === \"object\";\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsConfig}\n * to have code loading modules in same package.\n * Package manager configuration. Provides a key value mapping of config values\n */\nexport interface IFluidCodeDetailsConfig {\n readonly [key: string]: string;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetails}\n * to have code loading modules in same package.\n * Data structure used to describe the code to load on the Fluid document\n */\nexport interface IFluidCodeDetails {\n /**\n * The code package to be used on the Fluid document. This is either the package name which will be loaded\n * from a package manager. Or the expanded Fluid package.\n */\n readonly package: string | Readonly<IFluidPackage>;\n\n /**\n * Configuration details. This includes links to the package manager and base CDNs.\n */\n readonly config?: IFluidCodeDetailsConfig;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#isFluidCodeDetails}\n * to have code loading modules in same package\n*/\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> =>{\n const maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n return typeof maybeCodeDetails === \"object\"\n && (typeof maybeCodeDetails?.package === \"string\" || isFluidPackage(maybeCodeDetails?.package))\n && (maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\");\n};\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n*/\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer = \"IFluidCodeDetailsComparer\";\n\n/**\n * @deprecated in favor of\n * {@link @fluidframework/container-definitions/fluidPackage.ts#IProvideFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n*/\nexport interface IProvideFluidCodeDetailsComparer {\n readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer ;\n}\n\n/**\n * @deprecated in favor of {@link @fluidframework/container-definitions/fluidPackage.ts#IFluidCodeDetailsComparer}\n * to have code loading modules in same package.\n * Provides capability to compare Fluid code details.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\n /**\n * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n *\n * Similar semantics to:\n * {@link https://github.com/npm/node-semver#usage}\n */\n satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n/* eslint-disable max-len */\n /**\n * Return a number representing the ascending sort order of the `a` and `b` code details;\n * `< 0` if `a < b`.\n * `= 0` if `a === b`.\n * `> 0` if `a > b`.\n * `undefined` if `a` is not comparable to `b`.\n *\n * Similar semantics to:\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description | Array.sort}\n */\n compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n/* eslint-enable max-len */\n}\n"]}
|
package/dist/handles.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { IRequest, IResponse } from "./fluidRouter";
|
|
6
6
|
import { IFluidObject } from "./fluidObject";
|
|
7
7
|
import { IFluidLoadable } from "./fluidLoadable";
|
|
8
|
+
import { FluidObject } from "./provider";
|
|
8
9
|
export declare const IFluidHandleContext: keyof IProvideFluidHandleContext;
|
|
9
10
|
export interface IProvideFluidHandleContext {
|
|
10
11
|
readonly IFluidHandleContext: IFluidHandleContext;
|
|
@@ -39,7 +40,7 @@ export interface IProvideFluidHandle {
|
|
|
39
40
|
/**
|
|
40
41
|
* Handle to a shared FluidObject
|
|
41
42
|
*/
|
|
42
|
-
export interface IFluidHandle<T = IFluidObject & IFluidLoadable> extends IProvideFluidHandle {
|
|
43
|
+
export interface IFluidHandle<T = IFluidObject & FluidObject & IFluidLoadable> extends IProvideFluidHandle {
|
|
43
44
|
/**
|
|
44
45
|
* @deprecated - Do not use handle's path for routing. Use `get` to get the underlying object.
|
|
45
46
|
*
|
package/dist/handles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,eAAO,MAAM,mBAAmB,EAAE,MAAM,0BAAkD,CAAC;AAE3F,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACnE;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB,aAAa,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACxD;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,mBAAoC,CAAC;AAEtE,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAEzB,CAAC,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,CAC7C,SAAQ,mBAAmB;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB;;OAEG;IACH,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IAElB;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CACpC"}
|
package/dist/handles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOU,QAAA,mBAAmB,GAAqC,qBAAqB,CAAC;AAkC9E,QAAA,YAAY,GAA8B,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, IResponse } from \"./fluidRouter\";\nimport { IFluidObject } from \"./fluidObject\";\nimport { IFluidLoadable } from \"./fluidLoadable\";\nimport { FluidObject } from \"./provider\";\n\nexport const IFluidHandleContext: keyof IProvideFluidHandleContext = \"IFluidHandleContext\";\n\nexport interface IProvideFluidHandleContext {\n readonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * An IFluidHandleContext describes a routing context from which other IFluidHandleContexts are defined\n */\nexport interface IFluidHandleContext extends IProvideFluidHandleContext {\n /**\n * The absolute path to the handle context from the root.\n */\n readonly absolutePath: string;\n\n /**\n * The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined\n * at the root.\n */\n readonly routeContext?: IFluidHandleContext;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n readonly isAttached: boolean;\n\n /**\n * Runs through the graph and attach the bounded handles.\n */\n attachGraph(): void;\n\n resolveHandle(request: IRequest): Promise<IResponse>;\n}\n\nexport const IFluidHandle: keyof IProvideFluidHandle = \"IFluidHandle\";\n\nexport interface IProvideFluidHandle {\n readonly IFluidHandle: IFluidHandle;\n}\n\n/**\n * Handle to a shared FluidObject\n */\nexport interface IFluidHandle<\n // REVIEW: Constrain `T` to something? How do we support dds and datastores safely?\n T = IFluidObject & FluidObject & IFluidLoadable\n > extends IProvideFluidHandle {\n\n /**\n * @deprecated - Do not use handle's path for routing. Use `get` to get the underlying object.\n *\n * The absolute path to the handle context from the root.\n */\n readonly absolutePath: string;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n readonly isAttached: boolean;\n\n /**\n * Runs through the graph and attach the bounded handles.\n */\n attachGraph(): void;\n\n /**\n * Returns a promise to the Fluid Object referenced by the handle.\n */\n get(): Promise<T>;\n\n /**\n * Binds the given handle to this one or attach the given handle if this handle is attached.\n * A bound handle will also be attached once this handle is attached.\n */\n bind(handle: IFluidHandle): void;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
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;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,cAAc,iBAAiB,CAAC;AAIhC,OAAO,EACH,QAAQ,EACR,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,YAAY,GACf,MAAM,eAAe,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,cAAc,iBAAiB,CAAC;AAIhC,OAAO,EACH,QAAQ,EACR,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,YAAY,GACf,MAAM,eAAe,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -24,4 +24,5 @@ Object.defineProperty(exports, "IFluidRouter", { enumerable: true, get: function
|
|
|
24
24
|
__exportStar(require("./handles"), exports);
|
|
25
25
|
__exportStar(require("./serializer"), exports);
|
|
26
26
|
__exportStar(require("./fluidPackage"), exports);
|
|
27
|
+
__exportStar(require("./provider"), exports);
|
|
27
28
|
//# 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;;;;;;;;;;;;;AAMH,kDAAgC;AAChC,+FAA+F;AAC/F,qDAAqD;AACrD,8EAA8E;AAC9E,6CAMuB;AADnB,2GAAA,YAAY,OAAA;AAEhB,4CAA0B;AAC1B,+CAA6B;AAC7B,iDAA+B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// when merging declarations the module path must match exactly. Because of this we need to explicitly export\n// IFluidObject as opposed to an export *\nexport { IFluidObject } from \"./fluidObject\";\n\nexport * from \"./fluidLoadable\";\n// Typescript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport {\n IRequest,\n IRequestHeader,\n IResponse,\n IProvideFluidRouter,\n IFluidRouter,\n} from \"./fluidRouter\";\nexport * from \"./handles\";\nexport * from \"./serializer\";\nexport * from \"./fluidPackage\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;AAMH,kDAAgC;AAChC,+FAA+F;AAC/F,qDAAqD;AACrD,8EAA8E;AAC9E,6CAMuB;AADnB,2GAAA,YAAY,OAAA;AAEhB,4CAA0B;AAC1B,+CAA6B;AAC7B,iDAA+B;AAC/B,6CAA2B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// when merging declarations the module path must match exactly. Because of this we need to explicitly export\n// IFluidObject as opposed to an export *\nexport { IFluidObject } from \"./fluidObject\";\n\nexport * from \"./fluidLoadable\";\n// Typescript forgets the index signature when customers augment IRequestHeader if we export *.\n// So we export the explicit members as a workaround:\n// https://github.com/microsoft/TypeScript/issues/18877#issuecomment-476921038\nexport {\n IRequest,\n IRequestHeader,\n IResponse,\n IProvideFluidRouter,\n IFluidRouter,\n} from \"./fluidRouter\";\nexport * from \"./handles\";\nexport * from \"./serializer\";\nexport * from \"./fluidPackage\";\nexport * from \"./provider\";\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* This utility type is meant for internal use by @see FluidObject
|
|
8
|
+
* Produces a valid FluidObject key given a type and a property.
|
|
9
|
+
* A valid FluidObject key is a property that exists on the incoming type
|
|
10
|
+
* as well as on the type of the property itself. For example, IProvideFoo.IFoo.IFoo
|
|
11
|
+
* This aligns with the FluidObject pattern expected to be used with all FluidObjects.
|
|
12
|
+
* For example:
|
|
13
|
+
* ```
|
|
14
|
+
* interface IProvideFoo{
|
|
15
|
+
* IFoo: IFoo
|
|
16
|
+
* }
|
|
17
|
+
* interface IFoo extends IProvideFoo{
|
|
18
|
+
* foobar();
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
* This pattern enables discovery, and delegation in a standard way which is central
|
|
22
|
+
* to FluidObject pattern
|
|
23
|
+
*/
|
|
24
|
+
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Exclude<T[TProp], undefined> ? TProp : never;
|
|
25
|
+
/**
|
|
26
|
+
* This utility type take interface(s) that follow the FluidObject pattern, and produces
|
|
27
|
+
* a new type that can be used for inspection and discovery of those interfaces.
|
|
28
|
+
*
|
|
29
|
+
* It is meant to be used with types that are known to implement the FluidObject pattern.
|
|
30
|
+
* A common way to specify a type implements the FluidObject pattern is to expose it as a
|
|
31
|
+
* FluidObject without a generic argument.
|
|
32
|
+
*
|
|
33
|
+
* For example, if we have an interface like below
|
|
34
|
+
* ```
|
|
35
|
+
* interface IProvideFoo{
|
|
36
|
+
* IFoo: IFoo
|
|
37
|
+
* }
|
|
38
|
+
* interface IFoo extends IProvideFoo{
|
|
39
|
+
* foobar();
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* and a function that returns a FluidObject. You would do the following
|
|
44
|
+
*
|
|
45
|
+
* `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;
|
|
46
|
+
*
|
|
47
|
+
* Either IFoo or IProvideFoo are valid generic arguments. In both case
|
|
48
|
+
* maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,
|
|
49
|
+
* then the FluidObject provides IFoo, and it can be used.
|
|
50
|
+
*
|
|
51
|
+
* You can inspect multiple types via a intersection. For example:
|
|
52
|
+
* `FluidObject<IFoo & IBar>`
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export declare type FluidObject<T = unknown> = Partial<Pick<T, FluidObjectProviderKeys<T>>>;
|
|
56
|
+
/**
|
|
57
|
+
* This utility type creates a type that is the union of all keys on the generic type
|
|
58
|
+
* which implement the FluidObject pattern. @see FluidObject
|
|
59
|
+
*
|
|
60
|
+
* For example `FluidObjectKeys<IFoo & IBar>` would result in `"IFoo" | "IBar"`
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export declare type FluidObjectKeys<T> = keyof FluidObject<T>;
|
|
64
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACF,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IACnE,MAAM,SAAS,KAAK,GAAG,KAAK,GAAG,MAAM,SAAS,KAAK,GAAE,KAAK,GAC1D,KAAK,SAAS,MAAM,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,GAC1C,KAAK,GACN,KAAK,CAAC;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACF,oBAAY,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF;;;;;;GAMG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @internal\n * This utility type is meant for internal use by @see FluidObject\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example, IProvideFoo.IFoo.IFoo\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n * For example:\n * ```\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n */\n export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> =\n string extends TProp ? never : number extends TProp? never : // exclude indexers [key:string |number]: any\n TProp extends keyof Exclude<T[TProp], undefined> // TProp is a property of T, and T[TProp]\n ? TProp\n :never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * For example, if we have an interface like below\n * ```\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\n export type FluidObject<T = unknown> = Partial<Pick<T, FluidObjectProviderKeys<T>>>;\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern. @see FluidObject\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
|
package/dist/serializer.d.ts
CHANGED
|
@@ -5,15 +5,25 @@
|
|
|
5
5
|
import { IFluidHandle } from "./handles";
|
|
6
6
|
/**
|
|
7
7
|
* JSON serialized form of an IFluidHandle
|
|
8
|
+
* @deprecated - Moved to fluidframework/shared-object-base package
|
|
8
9
|
*/
|
|
9
10
|
export interface ISerializedHandle {
|
|
10
11
|
type: "__fluid_handle__";
|
|
11
12
|
url: string;
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated - Moved to fluidframework/shared-object-base package
|
|
16
|
+
*/
|
|
13
17
|
export declare const IFluidSerializer: keyof IProvideFluidSerializer;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated - Moved to fluidframework/shared-object-base package
|
|
20
|
+
*/
|
|
14
21
|
export interface IProvideFluidSerializer {
|
|
15
22
|
readonly IFluidSerializer: IFluidSerializer;
|
|
16
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated - Moved to fluidframework/shared-object-base package
|
|
26
|
+
*/
|
|
17
27
|
export interface IFluidSerializer extends IProvideFluidSerializer {
|
|
18
28
|
/**
|
|
19
29
|
* Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object
|