@fluidframework/core-interfaces 0.39.8 → 0.41.0-43885
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/api-extractor.json +9 -1
- package/api-report/core-interfaces.api.md +246 -0
- 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 +3 -3
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js.map +1 -1
- package/dist/handles.d.ts +5 -5
- 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.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 +3 -3
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js.map +1 -1
- package/lib/handles.d.ts +5 -5
- 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.map +1 -1
- package/lib/test/types/validate0.39.8.d.ts +2 -0
- package/lib/test/types/validate0.39.8.d.ts.map +1 -0
- package/lib/test/types/validate0.39.8.js +72 -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/package.json +26 -7
- package/src/fluidObject.ts +39 -17
- package/src/fluidPackage.ts +5 -3
- package/src/handles.ts +5 -5
- package/src/index.ts +1 -0
- package/src/provider.ts +70 -0
- package/src/serializer.ts +11 -0
- package/test-d/index.test-d.ts +103 -0
- package/tsconfig.json +3 -2
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "@fluidframework/build-common/api-extractor-common.json"
|
|
3
|
+
"extends": "@fluidframework/build-common/api-extractor-common-report.json",
|
|
4
|
+
"apiReport": {
|
|
5
|
+
"enabled": true,
|
|
6
|
+
"reportFolder": "<projectFolder>/api-report/"
|
|
7
|
+
},
|
|
8
|
+
"docModel": {
|
|
9
|
+
"enabled": true,
|
|
10
|
+
"apiJsonFilePath": "<projectFolder>/_api-extractor-temp/doc-models/<unscopedPackageName>.api.json"
|
|
11
|
+
}
|
|
4
12
|
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/core-interfaces"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
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
|
+
//
|
|
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
|
|
21
|
+
export interface IFluidCodeDetails {
|
|
22
|
+
readonly config?: IFluidCodeDetailsConfig;
|
|
23
|
+
readonly package: string | Readonly<IFluidPackage>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
|
|
28
|
+
|
|
29
|
+
// @public
|
|
30
|
+
export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
|
|
31
|
+
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
|
|
32
|
+
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// @public
|
|
36
|
+
export interface IFluidCodeDetailsConfig {
|
|
37
|
+
// (undocumented)
|
|
38
|
+
readonly [key: string]: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// @public (undocumented)
|
|
42
|
+
export const IFluidConfiguration: keyof IProvideFluidConfiguration;
|
|
43
|
+
|
|
44
|
+
// @public (undocumented)
|
|
45
|
+
export interface IFluidConfiguration extends IProvideFluidConfiguration {
|
|
46
|
+
// (undocumented)
|
|
47
|
+
scopes: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
export const IFluidHandle: keyof IProvideFluidHandle;
|
|
52
|
+
|
|
53
|
+
// @public
|
|
54
|
+
export interface IFluidHandle<T = IFluidObject & IFluidLoadable> extends IProvideFluidHandle {
|
|
55
|
+
// @deprecated (undocumented)
|
|
56
|
+
readonly absolutePath: string;
|
|
57
|
+
attachGraph(): void;
|
|
58
|
+
bind(handle: IFluidHandle): void;
|
|
59
|
+
get(): Promise<T>;
|
|
60
|
+
readonly isAttached: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// @public (undocumented)
|
|
64
|
+
export const IFluidHandleContext: keyof IProvideFluidHandleContext;
|
|
65
|
+
|
|
66
|
+
// @public
|
|
67
|
+
export interface IFluidHandleContext extends IProvideFluidHandleContext {
|
|
68
|
+
readonly absolutePath: string;
|
|
69
|
+
attachGraph(): void;
|
|
70
|
+
readonly isAttached: boolean;
|
|
71
|
+
// (undocumented)
|
|
72
|
+
resolveHandle(request: IRequest): Promise<IResponse>;
|
|
73
|
+
readonly routeContext?: IFluidHandleContext;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// @public (undocumented)
|
|
77
|
+
export const IFluidLoadable: keyof IProvideFluidLoadable;
|
|
78
|
+
|
|
79
|
+
// @public
|
|
80
|
+
export interface IFluidLoadable extends IProvideFluidLoadable {
|
|
81
|
+
// (undocumented)
|
|
82
|
+
handle: IFluidHandle;
|
|
83
|
+
}
|
|
84
|
+
|
|
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;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// @public
|
|
104
|
+
export interface IFluidPackage {
|
|
105
|
+
[key: string]: unknown;
|
|
106
|
+
fluid: {
|
|
107
|
+
[environment: string]: undefined | IFluidPackageEnvironment;
|
|
108
|
+
};
|
|
109
|
+
name: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// @public
|
|
113
|
+
export interface IFluidPackageEnvironment {
|
|
114
|
+
[target: string]: undefined | {
|
|
115
|
+
files: string[];
|
|
116
|
+
[key: string]: unknown;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// @public (undocumented)
|
|
121
|
+
export const IFluidRouter: keyof IProvideFluidRouter;
|
|
122
|
+
|
|
123
|
+
// @public (undocumented)
|
|
124
|
+
export interface IFluidRouter extends IProvideFluidRouter {
|
|
125
|
+
// (undocumented)
|
|
126
|
+
request(request: IRequest): Promise<IResponse>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// @public (undocumented)
|
|
130
|
+
export const IFluidRunnable: keyof IProvideFluidRunnable;
|
|
131
|
+
|
|
132
|
+
// @public (undocumented)
|
|
133
|
+
export interface IFluidRunnable {
|
|
134
|
+
// (undocumented)
|
|
135
|
+
run(...args: any[]): Promise<void>;
|
|
136
|
+
// (undocumented)
|
|
137
|
+
stop(reason?: string): void;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// @public (undocumented)
|
|
141
|
+
export const IFluidSerializer: keyof IProvideFluidSerializer;
|
|
142
|
+
|
|
143
|
+
// @public (undocumented)
|
|
144
|
+
export interface IFluidSerializer extends IProvideFluidSerializer {
|
|
145
|
+
decode?(input: any): any;
|
|
146
|
+
parse(value: string): any;
|
|
147
|
+
replaceHandles(value: any, bind: IFluidHandle): any;
|
|
148
|
+
stringify(value: any, bind: IFluidHandle): string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// @public (undocumented)
|
|
152
|
+
export interface IProvideFluidCodeDetailsComparer {
|
|
153
|
+
// (undocumented)
|
|
154
|
+
readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// @public (undocumented)
|
|
158
|
+
export interface IProvideFluidConfiguration {
|
|
159
|
+
// (undocumented)
|
|
160
|
+
readonly IFluidConfiguration: IFluidConfiguration;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// @public (undocumented)
|
|
164
|
+
export interface IProvideFluidHandle {
|
|
165
|
+
// (undocumented)
|
|
166
|
+
readonly IFluidHandle: IFluidHandle;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// @public (undocumented)
|
|
170
|
+
export interface IProvideFluidHandleContext {
|
|
171
|
+
// (undocumented)
|
|
172
|
+
readonly IFluidHandleContext: IFluidHandleContext;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// @public (undocumented)
|
|
176
|
+
export interface IProvideFluidLoadable {
|
|
177
|
+
// (undocumented)
|
|
178
|
+
readonly IFluidLoadable: IFluidLoadable;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// @public
|
|
182
|
+
export interface IProvideFluidRouter {
|
|
183
|
+
// (undocumented)
|
|
184
|
+
readonly IFluidRouter: IFluidRouter;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// @public (undocumented)
|
|
188
|
+
export interface IProvideFluidRunnable {
|
|
189
|
+
// (undocumented)
|
|
190
|
+
readonly IFluidRunnable: IFluidRunnable;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// @public (undocumented)
|
|
194
|
+
export interface IProvideFluidSerializer {
|
|
195
|
+
// (undocumented)
|
|
196
|
+
readonly IFluidSerializer: IFluidSerializer;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// @public (undocumented)
|
|
200
|
+
export interface IRequest {
|
|
201
|
+
// (undocumented)
|
|
202
|
+
headers?: IRequestHeader;
|
|
203
|
+
// (undocumented)
|
|
204
|
+
url: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// @public (undocumented)
|
|
208
|
+
export interface IRequestHeader {
|
|
209
|
+
// (undocumented)
|
|
210
|
+
[index: string]: any;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// @public (undocumented)
|
|
214
|
+
export interface IResponse {
|
|
215
|
+
// (undocumented)
|
|
216
|
+
headers?: {
|
|
217
|
+
[key: string]: any;
|
|
218
|
+
};
|
|
219
|
+
// (undocumented)
|
|
220
|
+
mimeType: string;
|
|
221
|
+
// (undocumented)
|
|
222
|
+
stack?: string;
|
|
223
|
+
// (undocumented)
|
|
224
|
+
status: number;
|
|
225
|
+
// (undocumented)
|
|
226
|
+
value: any;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// @public
|
|
230
|
+
export interface ISerializedHandle {
|
|
231
|
+
// (undocumented)
|
|
232
|
+
type: "__fluid_handle__";
|
|
233
|
+
// (undocumented)
|
|
234
|
+
url: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// @public (undocumented)
|
|
238
|
+
export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
|
|
239
|
+
|
|
240
|
+
// @public
|
|
241
|
+
export const isFluidPackage: (pkg: any) => pkg is Readonly<IFluidPackage>;
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
// (No @packageDocumentation comment for this package)
|
|
245
|
+
|
|
246
|
+
```
|
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
|
@@ -29,7 +29,7 @@ export interface IFluidPackageEnvironment {
|
|
|
29
29
|
* Fluid-specific properties expected on a package to be loaded by the code loader.
|
|
30
30
|
* While compatible with the npm package format it is not necessary that that package is an
|
|
31
31
|
* npm package:
|
|
32
|
-
* https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid
|
|
32
|
+
* {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
|
|
33
33
|
*/
|
|
34
34
|
export interface IFluidPackage {
|
|
35
35
|
/**
|
|
@@ -91,7 +91,7 @@ export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsCompa
|
|
|
91
91
|
* Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.
|
|
92
92
|
*
|
|
93
93
|
* Similar semantics to:
|
|
94
|
-
*
|
|
94
|
+
* {@link https://github.com/npm/node-semver#usage}
|
|
95
95
|
*/
|
|
96
96
|
satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
|
|
97
97
|
/**
|
|
@@ -102,7 +102,7 @@ export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsCompa
|
|
|
102
102
|
* `undefined` if `a` is not comparable to `b`.
|
|
103
103
|
*
|
|
104
104
|
* Similar semantics to:
|
|
105
|
-
*
|
|
105
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description | Array.sort}
|
|
106
106
|
*/
|
|
107
107
|
compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
|
|
108
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEF;;GAEG;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;;;;;GAKG;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;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAS,GAAG,mCAGF,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAED;;GAEG;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,eAAO,MAAM,kBAAkB,YAAa,OAAO,2CAKlD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAA8D,CAAC;AAE7G,MAAM,WAAW,gCAAgC;IAC7C,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAE;CAClE;AAED;;GAEG;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;
|
|
1
|
+
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEF;;GAEG;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;;;;;GAKG;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;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAS,GAAG,mCAGF,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAED;;GAEG;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,eAAO,MAAM,kBAAkB,YAAa,OAAO,2CAKlD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAA8D,CAAC;AAE7G,MAAM,WAAW,gCAAgC;IAC7C,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAE;CAClE;AAED;;GAEG;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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyDH;;;GAGG;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;AAyB/B,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;AAEW,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 * 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 * 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 * 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 * 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 * Package manager configuration. Provides a key value mapping of config values\n */\nexport interface IFluidCodeDetailsConfig {\n readonly [key: string]: string;\n}\n\n/**\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\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\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer = \"IFluidCodeDetailsComparer\";\n\nexport interface IProvideFluidCodeDetailsComparer {\n readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer ;\n}\n\n/**\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 *
|
|
1
|
+
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyDH;;;GAGG;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;AAyB/B,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;AAEW,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 * 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 * 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 * 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 * Package manager configuration. Provides a key value mapping of config values\n */\nexport interface IFluidCodeDetailsConfig {\n readonly [key: string]: string;\n}\n\n/**\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\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\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer = \"IFluidCodeDetailsComparer\";\n\nexport interface IProvideFluidCodeDetailsComparer {\n readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer ;\n}\n\n/**\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
|
@@ -16,16 +16,16 @@ export interface IFluidHandleContext extends IProvideFluidHandleContext {
|
|
|
16
16
|
/**
|
|
17
17
|
* The absolute path to the handle context from the root.
|
|
18
18
|
*/
|
|
19
|
-
absolutePath: string;
|
|
19
|
+
readonly absolutePath: string;
|
|
20
20
|
/**
|
|
21
21
|
* The parent IFluidHandleContext that has provided a route path to this IFluidHandleContext or undefined
|
|
22
22
|
* at the root.
|
|
23
23
|
*/
|
|
24
|
-
routeContext?: IFluidHandleContext;
|
|
24
|
+
readonly routeContext?: IFluidHandleContext;
|
|
25
25
|
/**
|
|
26
26
|
* Flag indicating whether or not the entity has services attached.
|
|
27
27
|
*/
|
|
28
|
-
isAttached: boolean;
|
|
28
|
+
readonly isAttached: boolean;
|
|
29
29
|
/**
|
|
30
30
|
* Runs through the graph and attach the bounded handles.
|
|
31
31
|
*/
|
|
@@ -45,11 +45,11 @@ export interface IFluidHandle<T = IFluidObject & IFluidLoadable> extends IProvid
|
|
|
45
45
|
*
|
|
46
46
|
* The absolute path to the handle context from the root.
|
|
47
47
|
*/
|
|
48
|
-
absolutePath: string;
|
|
48
|
+
readonly absolutePath: string;
|
|
49
49
|
/**
|
|
50
50
|
* Flag indicating whether or not the entity has services attached.
|
|
51
51
|
*/
|
|
52
|
-
isAttached: boolean;
|
|
52
|
+
readonly isAttached: boolean;
|
|
53
53
|
/**
|
|
54
54
|
* Runs through the graph and attach the bounded handles.
|
|
55
55
|
*/
|
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;AAEjD,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,YAAY,EAAE,MAAM,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;AAEjD,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,cAAc,CAC/B,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;;;AAMU,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\";\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 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 routeContext?: IFluidHandleContext;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n 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 `IFluidObject & IFluidLoadable`?\n T = IFluidObject & 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 absolutePath: string;\n\n /**\n * Flag indicating whether or not the entity has services attached.\n */\n 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"]}
|
|
1
|
+
{"version":3,"file":"handles.js","sourceRoot":"","sources":["../src/handles.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMU,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\";\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 `IFluidObject & IFluidLoadable`?\n T = IFluidObject & 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
|
@@ -23,6 +23,16 @@ export interface IFluidSerializer extends IProvideFluidSerializer {
|
|
|
23
23
|
* the root to any replaced handles. (If no handles are found, returns the original object.)
|
|
24
24
|
*/
|
|
25
25
|
replaceHandles(value: any, bind: IFluidHandle): any;
|
|
26
|
+
/**
|
|
27
|
+
* Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an
|
|
28
|
+
* equivalent object tree where any encoded IFluidHandles have been replaced with thier decoded form.
|
|
29
|
+
*
|
|
30
|
+
* The original `input` object is not mutated. This method will shallowly clones all objects in the path from
|
|
31
|
+
* the root to any replaced handles. (If no handles are found, returns the original object.)
|
|
32
|
+
*
|
|
33
|
+
* The decoded handles are implicitly bound to the handle context of this serializer.
|
|
34
|
+
*/
|
|
35
|
+
decode?(input: any): any;
|
|
26
36
|
/**
|
|
27
37
|
* Stringifies a given value. Converts any IFluidHandle to its stringified equivalent.
|
|
28
38
|
*/
|
package/dist/serializer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAE9B,IAAI,EAAE,kBAAkB,CAAC;IAGzB,GAAG,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,uBAA4C,CAAC;AAElF,MAAM,WAAW,uBAAuB;IACpC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CAC/C;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC7D;;;;;;OAMG;IACH,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,GAAG,GAAG,CAAC;IAEpD;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC;IAElD;;;OAGG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CAC7B"}
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAE9B,IAAI,EAAE,kBAAkB,CAAC;IAGzB,GAAG,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,uBAA4C,CAAC;AAElF,MAAM,WAAW,uBAAuB;IACpC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;CAC/C;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC7D;;;;;;OAMG;IACH,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,GAAG,GAAG,CAAC;IAEpD;;;;;;;;OAQG;IACH,MAAM,CAAC,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC;IAElD;;;OAGG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CAC7B"}
|
package/dist/serializer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAiBa,QAAA,gBAAgB,GAAkC,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IFluidHandle } from \"./handles\";\n\n/**\n * JSON serialized form of an IFluidHandle\n */\nexport interface ISerializedHandle {\n // Marker to indicate to JSON.parse that the object is a Fluid handle\n type: \"__fluid_handle__\";\n\n // URL to the object. Relative URLs are relative to the handle context passed to the stringify.\n url: string;\n}\n\nexport const IFluidSerializer: keyof IProvideFluidSerializer = \"IFluidSerializer\";\n\nexport interface IProvideFluidSerializer {\n readonly IFluidSerializer: IFluidSerializer;\n}\n\nexport interface IFluidSerializer extends IProvideFluidSerializer {\n /**\n * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object\n * where any embedded IFluidHandles have been replaced with a serializable form.\n *\n * The original `input` object is not mutated. This method will shallowly clones all objects in the path from\n * the root to any replaced handles. (If no handles are found, returns the original object.)\n */\n replaceHandles(value: any, bind: IFluidHandle): any;\n\n /**\n * Stringifies a given value. Converts any IFluidHandle to its stringified equivalent.\n */\n stringify(value: any, bind: IFluidHandle): string;\n\n /**\n * Parses the given JSON input string and returns the JavaScript object defined by it. Any Fluid\n * handles will be realized as part of the parse\n */\n parse(value: string): any;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAiBa,QAAA,gBAAgB,GAAkC,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IFluidHandle } from \"./handles\";\n\n/**\n * JSON serialized form of an IFluidHandle\n */\nexport interface ISerializedHandle {\n // Marker to indicate to JSON.parse that the object is a Fluid handle\n type: \"__fluid_handle__\";\n\n // URL to the object. Relative URLs are relative to the handle context passed to the stringify.\n url: string;\n}\n\nexport const IFluidSerializer: keyof IProvideFluidSerializer = \"IFluidSerializer\";\n\nexport interface IProvideFluidSerializer {\n readonly IFluidSerializer: IFluidSerializer;\n}\n\nexport interface IFluidSerializer extends IProvideFluidSerializer {\n /**\n * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object\n * where any embedded IFluidHandles have been replaced with a serializable form.\n *\n * The original `input` object is not mutated. This method will shallowly clones all objects in the path from\n * the root to any replaced handles. (If no handles are found, returns the original object.)\n */\n replaceHandles(value: any, bind: IFluidHandle): any;\n\n /**\n * Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an\n * equivalent object tree where any encoded IFluidHandles have been replaced with thier decoded form.\n *\n * The original `input` object is not mutated. This method will shallowly clones all objects in the path from\n * the root to any replaced handles. (If no handles are found, returns the original object.)\n *\n * The decoded handles are implicitly bound to the handle context of this serializer.\n */\n decode?(input: any): any;\n\n /**\n * Stringifies a given value. Converts any IFluidHandle to its stringified equivalent.\n */\n stringify(value: any, bind: IFluidHandle): string;\n\n /**\n * Parses the given JSON input string and returns the JavaScript object defined by it. Any Fluid\n * handles will be realized as part of the parse\n */\n parse(value: string): any;\n}\n"]}
|