@fluidframework/shared-object-base 2.0.0-internal.6.4.0 → 2.0.0-internal.7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/api-extractor.json +9 -1
- package/api-report/shared-object-base.api.md +166 -0
- package/dist/handle.js +6 -6
- package/dist/handle.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/remoteObjectHandle.d.ts.map +1 -1
- package/dist/remoteObjectHandle.js +12 -11
- package/dist/remoteObjectHandle.js.map +1 -1
- package/dist/shared-object-base-alpha.d.ts +479 -0
- package/dist/shared-object-base-beta.d.ts +479 -0
- package/dist/shared-object-base-public.d.ts +479 -0
- package/dist/shared-object-base.d.ts +491 -0
- package/dist/sharedObject.js +21 -21
- package/dist/sharedObject.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/valueType.js +1 -1
- package/dist/valueType.js.map +1 -1
- package/lib/handle.js +6 -6
- package/lib/handle.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/remoteObjectHandle.d.ts.map +1 -1
- package/lib/remoteObjectHandle.js +12 -11
- package/lib/remoteObjectHandle.js.map +1 -1
- package/lib/sharedObject.js +21 -21
- package/lib/sharedObject.js.map +1 -1
- package/package.json +25 -25
- package/src/packageVersion.ts +1 -1
- package/src/remoteObjectHandle.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @fluidframework/shared-object-base
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.7.1.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.0.0-internal.7.0.0
|
|
8
|
+
|
|
9
|
+
### Major Changes
|
|
10
|
+
|
|
11
|
+
- Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
12
|
+
|
|
13
|
+
This included the following changes from the protocol-definitions release:
|
|
14
|
+
|
|
15
|
+
- Updating signal interfaces for some planned improvements. The intention is split the interface between signals
|
|
16
|
+
submitted by clients to the server and the resulting signals sent from the server to clients.
|
|
17
|
+
- A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
|
|
18
|
+
been added, which will be the typing for signals sent from the client to the server. Both extend a new
|
|
19
|
+
ISignalMessageBase interface that contains common members.
|
|
20
|
+
- The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
|
|
21
|
+
|
|
22
|
+
- Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
23
|
+
|
|
24
|
+
Dependencies on the following Fluid server package have been updated to version 2.0.1:
|
|
25
|
+
|
|
26
|
+
- @fluidframework/gitresources: 2.0.1
|
|
27
|
+
- @fluidframework/server-kafka-orderer: 2.0.1
|
|
28
|
+
- @fluidframework/server-lambdas: 2.0.1
|
|
29
|
+
- @fluidframework/server-lambdas-driver: 2.0.1
|
|
30
|
+
- @fluidframework/server-local-server: 2.0.1
|
|
31
|
+
- @fluidframework/server-memory-orderer: 2.0.1
|
|
32
|
+
- @fluidframework/protocol-base: 2.0.1
|
|
33
|
+
- @fluidframework/server-routerlicious: 2.0.1
|
|
34
|
+
- @fluidframework/server-routerlicious-base: 2.0.1
|
|
35
|
+
- @fluidframework/server-services: 2.0.1
|
|
36
|
+
- @fluidframework/server-services-client: 2.0.1
|
|
37
|
+
- @fluidframework/server-services-core: 2.0.1
|
|
38
|
+
- @fluidframework/server-services-ordering-kafkanode: 2.0.1
|
|
39
|
+
- @fluidframework/server-services-ordering-rdkafka: 2.0.1
|
|
40
|
+
- @fluidframework/server-services-ordering-zookeeper: 2.0.1
|
|
41
|
+
- @fluidframework/server-services-shared: 2.0.1
|
|
42
|
+
- @fluidframework/server-services-telemetry: 2.0.1
|
|
43
|
+
- @fluidframework/server-services-utils: 2.0.1
|
|
44
|
+
- @fluidframework/server-test-utils: 2.0.1
|
|
45
|
+
- tinylicious: 2.0.1
|
|
46
|
+
|
|
47
|
+
- Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
48
|
+
|
|
49
|
+
The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
|
|
50
|
+
|
|
3
51
|
## 2.0.0-internal.6.4.0
|
|
4
52
|
|
|
5
53
|
### Minor Changes
|
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-
|
|
3
|
+
"extends": "@fluidframework/build-common/api-extractor-base.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
"ae-missing-release-tag": {
|
|
7
|
+
// TODO: Fix violations and remove this rule override
|
|
8
|
+
"logLevel": "none"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
4
12
|
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/shared-object-base"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { EventEmitterEventType } from '@fluid-internal/client-utils';
|
|
8
|
+
import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils';
|
|
9
|
+
import { IChannel } from '@fluidframework/datastore-definitions';
|
|
10
|
+
import { IChannelAttributes } from '@fluidframework/datastore-definitions';
|
|
11
|
+
import { IChannelServices } from '@fluidframework/datastore-definitions';
|
|
12
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
13
|
+
import { IErrorEvent } from '@fluidframework/core-interfaces';
|
|
14
|
+
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
15
|
+
import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
|
|
16
|
+
import { IExperimentalIncrementalSummaryContext } from '@fluidframework/runtime-definitions';
|
|
17
|
+
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
18
|
+
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
19
|
+
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
20
|
+
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
21
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
22
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
23
|
+
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
24
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
25
|
+
|
|
26
|
+
// @public
|
|
27
|
+
export function createSingleBlobSummary(key: string, content: string | Uint8Array): ISummaryTreeWithStats;
|
|
28
|
+
|
|
29
|
+
// @public
|
|
30
|
+
export class FluidSerializer implements IFluidSerializer {
|
|
31
|
+
constructor(context: IFluidHandleContext, handleParsedCb: (handle: IFluidHandle) => void);
|
|
32
|
+
decode(input: any): any;
|
|
33
|
+
encode(input: any, bind: IFluidHandle): any;
|
|
34
|
+
// (undocumented)
|
|
35
|
+
get IFluidSerializer(): this;
|
|
36
|
+
// (undocumented)
|
|
37
|
+
parse(input: string): any;
|
|
38
|
+
// (undocumented)
|
|
39
|
+
protected serializeHandle(handle: IFluidHandle, bind: IFluidHandle): {
|
|
40
|
+
type: string;
|
|
41
|
+
url: string;
|
|
42
|
+
};
|
|
43
|
+
// (undocumented)
|
|
44
|
+
stringify(input: any, bind: IFluidHandle): string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// @public (undocumented)
|
|
48
|
+
export interface IFluidSerializer {
|
|
49
|
+
decode(input: any): any;
|
|
50
|
+
encode(value: any, bind: IFluidHandle): any;
|
|
51
|
+
parse(value: string): any;
|
|
52
|
+
stringify(value: any, bind: IFluidHandle): string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// @public
|
|
56
|
+
export interface ISerializedHandle {
|
|
57
|
+
// (undocumented)
|
|
58
|
+
type: "__fluid_handle__";
|
|
59
|
+
// (undocumented)
|
|
60
|
+
url: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// @public
|
|
64
|
+
export interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents> extends IChannel, IEventProvider<TEvent> {
|
|
65
|
+
bindToContext(): void;
|
|
66
|
+
getGCData(fullGC?: boolean): IGarbageCollectionData;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// @public
|
|
70
|
+
export interface ISharedObjectEvents extends IErrorEvent {
|
|
71
|
+
// @eventProperty
|
|
72
|
+
(event: "pre-op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
73
|
+
// @eventProperty
|
|
74
|
+
(event: "op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// @public (undocumented)
|
|
78
|
+
export const isSerializedHandle: (value: any) => value is ISerializedHandle;
|
|
79
|
+
|
|
80
|
+
// @public
|
|
81
|
+
export function makeHandlesSerializable(value: any, serializer: IFluidSerializer, bind: IFluidHandle): any;
|
|
82
|
+
|
|
83
|
+
// @public
|
|
84
|
+
export function parseHandles(value: any, serializer: IFluidSerializer): any;
|
|
85
|
+
|
|
86
|
+
// @public
|
|
87
|
+
export function serializeHandles(value: any, serializer: IFluidSerializer, bind: IFluidHandle): string | undefined;
|
|
88
|
+
|
|
89
|
+
// @public
|
|
90
|
+
export abstract class SharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents> extends SharedObjectCore<TEvent> {
|
|
91
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes, telemetryContextPrefix: string);
|
|
92
|
+
// (undocumented)
|
|
93
|
+
getAttachSummary(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
94
|
+
getGCData(fullGC?: boolean): IGarbageCollectionData;
|
|
95
|
+
protected processGCDataCore(serializer: SummarySerializer): void;
|
|
96
|
+
// (undocumented)
|
|
97
|
+
protected get serializer(): IFluidSerializer;
|
|
98
|
+
// (undocumented)
|
|
99
|
+
summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext): Promise<ISummaryTreeWithStats>;
|
|
100
|
+
protected abstract summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext): ISummaryTreeWithStats;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// @public
|
|
104
|
+
export abstract class SharedObjectCore<TEvent extends ISharedObjectEvents = ISharedObjectEvents> extends EventEmitterWithErrorHandling<TEvent> implements ISharedObject<TEvent> {
|
|
105
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
106
|
+
protected abstract applyStashedOp(content: any): unknown;
|
|
107
|
+
// (undocumented)
|
|
108
|
+
readonly attributes: IChannelAttributes;
|
|
109
|
+
bindToContext(): void;
|
|
110
|
+
// (undocumented)
|
|
111
|
+
connect(services: IChannelServices): void;
|
|
112
|
+
get connected(): boolean;
|
|
113
|
+
protected didAttach(): void;
|
|
114
|
+
protected dirty(): void;
|
|
115
|
+
// @internal
|
|
116
|
+
emit(event: EventEmitterEventType, ...args: any[]): boolean;
|
|
117
|
+
// (undocumented)
|
|
118
|
+
abstract getAttachSummary(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
119
|
+
abstract getGCData(fullGC?: boolean): IGarbageCollectionData;
|
|
120
|
+
readonly handle: IFluidHandle;
|
|
121
|
+
protected handleDecoded(decodedHandle: IFluidHandle): void;
|
|
122
|
+
// (undocumented)
|
|
123
|
+
id: string;
|
|
124
|
+
// (undocumented)
|
|
125
|
+
get IFluidLoadable(): this;
|
|
126
|
+
initializeLocal(): void;
|
|
127
|
+
protected initializeLocalCore(): void;
|
|
128
|
+
// (undocumented)
|
|
129
|
+
isAttached(): boolean;
|
|
130
|
+
load(services: IChannelServices): Promise<void>;
|
|
131
|
+
protected abstract loadCore(services: IChannelStorageService): Promise<void>;
|
|
132
|
+
protected readonly logger: ITelemetryLoggerExt;
|
|
133
|
+
protected newAckBasedPromise<T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
|
|
134
|
+
protected onConnect(): void;
|
|
135
|
+
protected abstract onDisconnect(): any;
|
|
136
|
+
protected abstract processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): any;
|
|
137
|
+
protected reSubmitCore(content: any, localOpMetadata: unknown): void;
|
|
138
|
+
protected rollback(content: any, localOpMetadata: unknown): void;
|
|
139
|
+
// (undocumented)
|
|
140
|
+
protected runtime: IFluidDataStoreRuntime;
|
|
141
|
+
protected submitLocalMessage(content: any, localOpMetadata?: unknown): void;
|
|
142
|
+
// (undocumented)
|
|
143
|
+
abstract summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// @public
|
|
147
|
+
export class SummarySerializer extends FluidSerializer {
|
|
148
|
+
// (undocumented)
|
|
149
|
+
getSerializedRoutes(): string[];
|
|
150
|
+
// (undocumented)
|
|
151
|
+
protected serializeHandle(handle: IFluidHandle, bind: IFluidHandle): {
|
|
152
|
+
type: string;
|
|
153
|
+
url: string;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// @public
|
|
158
|
+
export enum ValueType {
|
|
159
|
+
Plain = 1,
|
|
160
|
+
// @deprecated
|
|
161
|
+
Shared = 0
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// (No @packageDocumentation comment for this package)
|
|
165
|
+
|
|
166
|
+
```
|
package/dist/handle.js
CHANGED
|
@@ -18,6 +18,12 @@ const datastore_1 = require("@fluidframework/datastore");
|
|
|
18
18
|
* '/\<shared object id\>' and loads shared object.
|
|
19
19
|
*/
|
|
20
20
|
class SharedObjectHandle extends datastore_1.FluidObjectHandle {
|
|
21
|
+
/**
|
|
22
|
+
* Whether services have been attached for the associated shared object.
|
|
23
|
+
*/
|
|
24
|
+
get isAttached() {
|
|
25
|
+
return this.value.isAttached();
|
|
26
|
+
}
|
|
21
27
|
/**
|
|
22
28
|
* Creates a new SharedObjectHandle.
|
|
23
29
|
* @param value - The shared object this handle is for.
|
|
@@ -29,12 +35,6 @@ class SharedObjectHandle extends datastore_1.FluidObjectHandle {
|
|
|
29
35
|
super(value, path, routeContext);
|
|
30
36
|
this.value = value;
|
|
31
37
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Whether services have been attached for the associated shared object.
|
|
34
|
-
*/
|
|
35
|
-
get isAttached() {
|
|
36
|
-
return this.value.isAttached();
|
|
37
|
-
}
|
|
38
38
|
/**
|
|
39
39
|
* Attaches all bound handles first (which may in turn attach further handles), then attaches this handle.
|
|
40
40
|
* When attaching the handle, it registers the associated shared object.
|
package/dist/handle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle.js","sourceRoot":"","sources":["../src/handle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yDAA8D;AAG9D;;;;;;;;;;GAUG;AACH,MAAa,kBAAmB,SAAQ,6BAAgC;
|
|
1
|
+
{"version":3,"file":"handle.js","sourceRoot":"","sources":["../src/handle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yDAA8D;AAG9D;;;;;;;;;;GAUG;AACH,MAAa,kBAAmB,SAAQ,6BAAgC;IACvE;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;OAMG;IACH,YACoB,KAAoB,EACvC,IAAY,EACZ,YAAiC;QAEjC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;QAJd,UAAK,GAAL,KAAK,CAAe;IAKxC,CAAC;IAED;;;OAGG;IACI,WAAW;QACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;CACD;AA/BD,gDA+BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces\";\nimport { FluidObjectHandle } from \"@fluidframework/datastore\";\nimport { ISharedObject } from \"./types\";\n\n/**\n * Handle for a shared object.\n *\n * @remarks\n *\n * This object is used for already loaded (in-memory) shared objects and is used only for serialization purposes.\n *\n * De-serialization process goes through {@link @fluidframework/datastore#FluidObjectHandle}, and request flow:\n * {@link @fluidframework/datastore#FluidDataStoreRuntime.request} recognizes requests in the form of\n * '/\\<shared object id\\>' and loads shared object.\n */\nexport class SharedObjectHandle extends FluidObjectHandle<ISharedObject> {\n\t/**\n\t * Whether services have been attached for the associated shared object.\n\t */\n\tpublic get isAttached(): boolean {\n\t\treturn this.value.isAttached();\n\t}\n\n\t/**\n\t * Creates a new SharedObjectHandle.\n\t * @param value - The shared object this handle is for.\n\t * @param path - The id of the shared object. It is also the path to this object relative to the routeContext.\n\t * @param routeContext - The parent {@link @fluidframework/core-interfaces#IFluidHandleContext} that has a route\n\t * to this handle.\n\t */\n\tconstructor(\n\t\tprotected readonly value: ISharedObject,\n\t\tpath: string,\n\t\trouteContext: IFluidHandleContext,\n\t) {\n\t\tsuper(value, path, routeContext);\n\t}\n\n\t/**\n\t * Attaches all bound handles first (which may in turn attach further handles), then attaches this handle.\n\t * When attaching the handle, it registers the associated shared object.\n\t */\n\tpublic attachGraph(): void {\n\t\tthis.value.bindToContext();\n\t\tsuper.attachGraph();\n\t}\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/shared-object-base";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-internal.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.7.1.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/shared-object-base";
|
|
11
|
-
exports.pkgVersion = "2.0.0-internal.
|
|
11
|
+
exports.pkgVersion = "2.0.0-internal.7.1.0";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,oCAAoC,CAAC;AAC/C,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/shared-object-base\";\nexport const pkgVersion = \"2.0.0-internal.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,oCAAoC,CAAC;AAC/C,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/shared-object-base\";\nexport const pkgVersion = \"2.0.0-internal.7.1.0\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteObjectHandle.d.ts","sourceRoot":"","sources":["../src/remoteObjectHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,
|
|
1
|
+
{"version":3,"file":"remoteObjectHandle.d.ts","sourceRoot":"","sources":["../src/remoteObjectHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EAIT,MAAM,iCAAiC,CAAC;AAOzC;;;;;;GAMG;AACH,qBAAa,uBAAwB,YAAW,YAAY;aAuB1C,YAAY,EAAE,MAAM;aACpB,YAAY,EAAE,mBAAmB;IAvBlD;;OAEG;IACH,IAAW,YAAY,SAEtB;IACD,IAAW,mBAAmB,SAE7B;IACD,IAAW,YAAY,SAEtB;IAED,SAAgB,UAAU,QAAQ;IAClC,OAAO,CAAC,OAAO,CAAmC;IAElD;;;;OAIG;gBAEc,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,mBAAmB;IAQrC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAoBzB,WAAW,IAAI,IAAI;IAInB,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIvC;;OAEG;IACU,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;CAa3D"}
|
|
@@ -16,17 +16,6 @@ const runtime_utils_1 = require("@fluidframework/runtime-utils");
|
|
|
16
16
|
* IFluidHandle can be retrieved by calling `get` on it.
|
|
17
17
|
*/
|
|
18
18
|
class RemoteFluidObjectHandle {
|
|
19
|
-
/**
|
|
20
|
-
* Creates a new RemoteFluidObjectHandle when parsing an IFluidHandle.
|
|
21
|
-
* @param absolutePath - The absolute path to the handle from the container runtime.
|
|
22
|
-
* @param routeContext - The root IFluidHandleContext that has a route to this handle.
|
|
23
|
-
*/
|
|
24
|
-
constructor(absolutePath, routeContext) {
|
|
25
|
-
this.absolutePath = absolutePath;
|
|
26
|
-
this.routeContext = routeContext;
|
|
27
|
-
this.isAttached = true;
|
|
28
|
-
(0, core_utils_1.assert)(absolutePath.startsWith("/"), 0x19d /* "Handles should always have absolute paths" */);
|
|
29
|
-
}
|
|
30
19
|
/**
|
|
31
20
|
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
32
21
|
*/
|
|
@@ -39,6 +28,17 @@ class RemoteFluidObjectHandle {
|
|
|
39
28
|
get IFluidHandle() {
|
|
40
29
|
return this;
|
|
41
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new RemoteFluidObjectHandle when parsing an IFluidHandle.
|
|
33
|
+
* @param absolutePath - The absolute path to the handle from the container runtime.
|
|
34
|
+
* @param routeContext - The root IFluidHandleContext that has a route to this handle.
|
|
35
|
+
*/
|
|
36
|
+
constructor(absolutePath, routeContext) {
|
|
37
|
+
this.absolutePath = absolutePath;
|
|
38
|
+
this.routeContext = routeContext;
|
|
39
|
+
this.isAttached = true;
|
|
40
|
+
(0, core_utils_1.assert)(absolutePath.startsWith("/"), 0x19d /* "Handles should always have absolute paths" */);
|
|
41
|
+
}
|
|
42
42
|
async get() {
|
|
43
43
|
if (this.objectP === undefined) {
|
|
44
44
|
// Add `viaHandle` header to distinguish from requests from non-handle paths.
|
|
@@ -69,6 +69,7 @@ class RemoteFluidObjectHandle {
|
|
|
69
69
|
*/
|
|
70
70
|
async request(request) {
|
|
71
71
|
try {
|
|
72
|
+
// eslint-disable-next-line import/no-deprecated
|
|
72
73
|
const object = await this.get();
|
|
73
74
|
const router = object.IFluidRouter;
|
|
74
75
|
return router === undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteObjectHandle.js","sourceRoot":"","sources":["../src/remoteObjectHandle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,yEAAmE;
|
|
1
|
+
{"version":3,"file":"remoteObjectHandle.js","sourceRoot":"","sources":["../src/remoteObjectHandle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,yEAAmE;AAUnE,iEAIuC;AAEvC;;;;;;GAMG;AACH,MAAa,uBAAuB;IACnC;;OAEG;IACH,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAW,mBAAmB;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAKD;;;;OAIG;IACH,YACiB,YAAoB,EACpB,YAAiC;QADjC,iBAAY,GAAZ,YAAY,CAAQ;QACpB,iBAAY,GAAZ,YAAY,CAAqB;QAVlC,eAAU,GAAG,IAAI,CAAC;QAYjC,IAAA,mBAAM,EACL,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAC5B,KAAK,CAAC,iDAAiD,CACvD,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,GAAG;QACf,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;YAC/B,6EAA6E;YAC7E,MAAM,OAAO,GAAa;gBACzB,GAAG,EAAE,IAAI,CAAC,YAAY;gBACtB,OAAO,EAAE,EAAE,CAAC,kCAAc,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE;aAC7C,CAAC;YACF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY;iBAC9B,aAAa,CAAC,OAAO,CAAC;iBACtB,IAAI,CAAc,CAAC,QAAQ,EAAE,EAAE;gBAC/B,IAAI,QAAQ,CAAC,QAAQ,KAAK,cAAc,EAAE;oBACzC,MAAM,WAAW,GAAgB,QAAQ,CAAC,KAAK,CAAC;oBAChD,OAAO,WAAW,CAAC;iBACnB;gBACD,MAAM,IAAA,mCAAmB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEM,WAAW;QACjB,OAAO;IACR,CAAC;IAEM,IAAI,CAAC,MAAoB;QAC/B,MAAM,CAAC,WAAW,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,OAAiB;QACrC,IAAI;YACH,gDAAgD;YAChD,MAAM,MAAM,GAA8B,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YAC3D,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;YAEnC,OAAO,MAAM,KAAK,SAAS;gBAC1B,CAAC,CAAC,IAAA,iCAAiB,EAAC,OAAO,CAAC;gBAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SACjC;QAAC,OAAO,KAAK,EAAE;YACf,OAAO,IAAA,mCAAmB,EAAC,KAAK,CAAC,CAAC;SAClC;IACF,CAAC;CACD;AA5ED,0DA4EC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { RuntimeHeaders } from \"@fluidframework/container-runtime\";\nimport {\n\tIFluidHandle,\n\tIFluidHandleContext,\n\tIRequest,\n\tIResponse,\n\tFluidObject,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tcreate404Response,\n\texceptionToResponse,\n\tresponseToException,\n} from \"@fluidframework/runtime-utils\";\n\n/**\n * This handle is used to dynamically load a Fluid object on a remote client and is created on parsing a serialized\n * FluidObjectHandle.\n * This class is used to generate an IFluidHandle when de-serializing any all handles (including handles to DDSes,\n * custom objects) that are stored in SharedObjects. The Data Store or SharedObject corresponding to the\n * IFluidHandle can be retrieved by calling `get` on it.\n */\nexport class RemoteFluidObjectHandle implements IFluidHandle {\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandleContext() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandle() {\n\t\treturn this;\n\t}\n\n\tpublic readonly isAttached = true;\n\tprivate objectP: Promise<FluidObject> | undefined;\n\n\t/**\n\t * Creates a new RemoteFluidObjectHandle when parsing an IFluidHandle.\n\t * @param absolutePath - The absolute path to the handle from the container runtime.\n\t * @param routeContext - The root IFluidHandleContext that has a route to this handle.\n\t */\n\tconstructor(\n\t\tpublic readonly absolutePath: string,\n\t\tpublic readonly routeContext: IFluidHandleContext,\n\t) {\n\t\tassert(\n\t\t\tabsolutePath.startsWith(\"/\"),\n\t\t\t0x19d /* \"Handles should always have absolute paths\" */,\n\t\t);\n\t}\n\n\tpublic async get(): Promise<any> {\n\t\tif (this.objectP === undefined) {\n\t\t\t// Add `viaHandle` header to distinguish from requests from non-handle paths.\n\t\t\tconst request: IRequest = {\n\t\t\t\turl: this.absolutePath,\n\t\t\t\theaders: { [RuntimeHeaders.viaHandle]: true },\n\t\t\t};\n\t\t\tthis.objectP = this.routeContext\n\t\t\t\t.resolveHandle(request)\n\t\t\t\t.then<FluidObject>((response) => {\n\t\t\t\t\tif (response.mimeType === \"fluid/object\") {\n\t\t\t\t\t\tconst fluidObject: FluidObject = response.value;\n\t\t\t\t\t\treturn fluidObject;\n\t\t\t\t\t}\n\t\t\t\t\tthrow responseToException(response, request);\n\t\t\t\t});\n\t\t}\n\t\treturn this.objectP;\n\t}\n\n\tpublic attachGraph(): void {\n\t\treturn;\n\t}\n\n\tpublic bind(handle: IFluidHandle): void {\n\t\thandle.attachGraph();\n\t}\n\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\tpublic async request(request: IRequest): Promise<IResponse> {\n\t\ttry {\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\tconst object: FluidObject<IFluidRouter> = await this.get();\n\t\t\tconst router = object.IFluidRouter;\n\n\t\t\treturn router === undefined\n\t\t\t\t? create404Response(request)\n\t\t\t\t: await router.request(request);\n\t\t} catch (error) {\n\t\t\treturn exceptionToResponse(error);\n\t\t}\n\t}\n}\n"]}
|