@fluidframework/shared-object-base 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/api-report/shared-object-base.api.md +8 -1
- package/dist/handle.d.ts +1 -1
- package/dist/handle.d.ts.map +1 -1
- package/dist/handle.js +2 -2
- package/dist/handle.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +23 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +17 -0
- package/dist/remoteObjectHandle.d.ts.map +1 -1
- package/dist/remoteObjectHandle.js +6 -6
- package/dist/remoteObjectHandle.js.map +1 -1
- package/dist/serializer.d.ts.map +1 -1
- package/dist/serializer.js +3 -5
- package/dist/serializer.js.map +1 -1
- package/dist/sharedObject.d.ts +52 -4
- package/dist/sharedObject.d.ts.map +1 -1
- package/dist/sharedObject.js +22 -22
- package/dist/sharedObject.js.map +1 -1
- package/dist/summarySerializer.d.ts.map +1 -1
- package/dist/summarySerializer.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/utils.js.map +1 -1
- package/internal.d.ts +11 -0
- package/legacy.d.ts +11 -0
- package/lib/handle.d.ts +1 -1
- package/lib/handle.d.ts.map +1 -1
- package/lib/handle.js +1 -1
- package/lib/handle.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +23 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +17 -0
- package/lib/remoteObjectHandle.d.ts.map +1 -1
- package/lib/remoteObjectHandle.js +3 -3
- package/lib/remoteObjectHandle.js.map +1 -1
- package/lib/serializer.d.ts.map +1 -1
- package/lib/serializer.js +1 -3
- package/lib/serializer.js.map +1 -1
- package/lib/sharedObject.d.ts +52 -4
- package/lib/sharedObject.d.ts.map +1 -1
- package/lib/sharedObject.js +5 -5
- package/lib/sharedObject.js.map +1 -1
- package/lib/summarySerializer.d.ts.map +1 -1
- package/lib/summarySerializer.js.map +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -1
- package/lib/utils.js.map +1 -1
- package/package.json +36 -57
- package/src/handle.ts +2 -1
- package/src/index.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/remoteObjectHandle.ts +4 -4
- package/src/serializer.ts +5 -1
- package/src/sharedObject.ts +71 -18
- package/src/summarySerializer.ts +1 -0
- package/src/utils.ts +2 -1
- package/api-extractor-cjs.json +0 -8
- package/dist/shared-object-base-alpha.d.ts +0 -427
- package/dist/shared-object-base-beta.d.ts +0 -118
- package/dist/shared-object-base-public.d.ts +0 -118
- package/dist/shared-object-base-untrimmed.d.ts +0 -513
- package/lib/shared-object-base-alpha.d.ts +0 -427
- package/lib/shared-object-base-beta.d.ts +0 -118
- package/lib/shared-object-base-public.d.ts +0 -118
- package/lib/shared-object-base-untrimmed.d.ts +0 -513
- package/lib/test/attachingBindingAndConnecting.spec.js +0 -334
- package/lib/test/attachingBindingAndConnecting.spec.js.map +0 -1
- package/lib/test/serializer.spec.js +0 -166
- package/lib/test/serializer.spec.js.map +0 -1
- package/lib/test/sharedObject.spec.js +0 -72
- package/lib/test/sharedObject.spec.js.map +0 -1
- package/lib/test/types/validateSharedObjectBasePrevious.generated.js +0 -26
- package/lib/test/types/validateSharedObjectBasePrevious.generated.js.map +0 -1
- package/lib/test/utils.js +0 -37
- package/lib/test/utils.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { strict as assert } from "assert";
|
|
6
|
-
import { validateAssertionError } from "@fluidframework/test-runtime-utils";
|
|
7
|
-
import { SharedObject, SharedObjectCore } from "../sharedObject.js";
|
|
8
|
-
class MySharedObject extends SharedObject {
|
|
9
|
-
constructor(id) {
|
|
10
|
-
super(id, undefined, undefined, "");
|
|
11
|
-
}
|
|
12
|
-
summarizeCore(serializer) {
|
|
13
|
-
throw new Error("Method not implemented.");
|
|
14
|
-
}
|
|
15
|
-
async loadCore(services) {
|
|
16
|
-
throw new Error("Method not implemented.");
|
|
17
|
-
}
|
|
18
|
-
processCore(message, local, localOpMetadata) {
|
|
19
|
-
throw new Error("Method not implemented.");
|
|
20
|
-
}
|
|
21
|
-
onDisconnect() {
|
|
22
|
-
throw new Error("Method not implemented.");
|
|
23
|
-
}
|
|
24
|
-
applyStashedOp(content) {
|
|
25
|
-
throw new Error("Method not implemented.");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
class MySharedObjectCore extends SharedObjectCore {
|
|
29
|
-
constructor(id) {
|
|
30
|
-
super(id, undefined, undefined);
|
|
31
|
-
this.serializer = {};
|
|
32
|
-
}
|
|
33
|
-
summarizeCore(serializer) {
|
|
34
|
-
throw new Error("Method not implemented.");
|
|
35
|
-
}
|
|
36
|
-
async loadCore(services) {
|
|
37
|
-
throw new Error("Method not implemented.");
|
|
38
|
-
}
|
|
39
|
-
processCore(message, local, localOpMetadata) {
|
|
40
|
-
throw new Error("Method not implemented.");
|
|
41
|
-
}
|
|
42
|
-
onDisconnect() {
|
|
43
|
-
throw new Error("Method not implemented.");
|
|
44
|
-
}
|
|
45
|
-
applyStashedOp(content) {
|
|
46
|
-
throw new Error("Method not implemented.");
|
|
47
|
-
}
|
|
48
|
-
getAttachSummary(fullTree, trackState) {
|
|
49
|
-
throw new Error("Method not implemented.");
|
|
50
|
-
}
|
|
51
|
-
async summarize(fullTree, trackState) {
|
|
52
|
-
throw new Error("Method not implemented.");
|
|
53
|
-
}
|
|
54
|
-
getGCData(fullGC) {
|
|
55
|
-
throw new Error("Method not implemented.");
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
describe("SharedObject", () => {
|
|
59
|
-
it("rejects slashes in id", () => {
|
|
60
|
-
const invalidId = "beforeSlash/afterSlash";
|
|
61
|
-
const codeBlock = () => new MySharedObject(invalidId);
|
|
62
|
-
assert.throws(codeBlock, (e) => validateAssertionError(e, "Id cannot contain slashes"));
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe("SharedObjectCore", () => {
|
|
66
|
-
it("rejects slashes in id", () => {
|
|
67
|
-
const invalidId = "beforeSlash/afterSlash";
|
|
68
|
-
const codeBlock = () => new MySharedObjectCore(invalidId);
|
|
69
|
-
assert.throws(codeBlock, (e) => validateAssertionError(e, "Id cannot contain slashes"));
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=sharedObject.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObject.spec.js","sourceRoot":"","sources":["../../src/test/sharedObject.spec.ts"],"names":[],"mappings":"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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"assert\";\nimport {\n\tIChannelAttributes,\n\tIChannelStorageService,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData, ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { validateAssertionError } from \"@fluidframework/test-runtime-utils\";\nimport { IFluidSerializer } from \"../serializer.js\";\nimport { SharedObject, SharedObjectCore } from \"../sharedObject.js\";\n\nclass MySharedObject extends SharedObject {\n\tconstructor(id: string) {\n\t\tsuper(\n\t\t\tid,\n\t\t\tundefined as unknown as IFluidDataStoreRuntime,\n\t\t\tundefined as unknown as IChannelAttributes,\n\t\t\t\"\",\n\t\t);\n\t}\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected processCore(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected onDisconnect() {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected applyStashedOp(content: any): unknown {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n}\n\nclass MySharedObjectCore extends SharedObjectCore {\n\tconstructor(id: string) {\n\t\tsuper(\n\t\t\tid,\n\t\t\tundefined as unknown as IFluidDataStoreRuntime,\n\t\t\tundefined as unknown as IChannelAttributes,\n\t\t);\n\t}\n\n\tprotected readonly serializer = {} as any as IFluidSerializer;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected processCore(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected onDisconnect() {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected applyStashedOp(content: any): unknown {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tpublic getAttachSummary(fullTree?: boolean, trackState?: boolean): ISummaryTreeWithStats {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tpublic async summarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t): Promise<ISummaryTreeWithStats> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tpublic getGCData(fullGC?: boolean): IGarbageCollectionData {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n}\n\ndescribe(\"SharedObject\", () => {\n\tit(\"rejects slashes in id\", () => {\n\t\tconst invalidId = \"beforeSlash/afterSlash\";\n\t\tconst codeBlock = () => new MySharedObject(invalidId);\n\t\tassert.throws(codeBlock, (e: Error) =>\n\t\t\tvalidateAssertionError(e, \"Id cannot contain slashes\"),\n\t\t);\n\t});\n});\n\ndescribe(\"SharedObjectCore\", () => {\n\tit(\"rejects slashes in id\", () => {\n\t\tconst invalidId = \"beforeSlash/afterSlash\";\n\t\tconst codeBlock = () => new MySharedObjectCore(invalidId);\n\t\tassert.throws(codeBlock, (e: Error) =>\n\t\t\tvalidateAssertionError(e, \"Id cannot contain slashes\"),\n\t\t);\n\t});\n});\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
use_current_ClassDeclaration_FluidSerializer(get_old_ClassDeclaration_FluidSerializer());
|
|
2
|
-
use_old_ClassDeclaration_FluidSerializer(get_current_ClassDeclaration_FluidSerializer());
|
|
3
|
-
use_current_InterfaceDeclaration_IFluidSerializer(get_old_InterfaceDeclaration_IFluidSerializer());
|
|
4
|
-
use_old_InterfaceDeclaration_IFluidSerializer(get_current_InterfaceDeclaration_IFluidSerializer());
|
|
5
|
-
use_current_InterfaceDeclaration_ISharedObject(get_old_InterfaceDeclaration_ISharedObject());
|
|
6
|
-
use_old_InterfaceDeclaration_ISharedObject(get_current_InterfaceDeclaration_ISharedObject());
|
|
7
|
-
use_current_InterfaceDeclaration_ISharedObjectEvents(get_old_InterfaceDeclaration_ISharedObjectEvents());
|
|
8
|
-
use_old_InterfaceDeclaration_ISharedObjectEvents(get_current_InterfaceDeclaration_ISharedObjectEvents());
|
|
9
|
-
use_current_ClassDeclaration_SharedObject(get_old_ClassDeclaration_SharedObject());
|
|
10
|
-
use_old_ClassDeclaration_SharedObject(get_current_ClassDeclaration_SharedObject());
|
|
11
|
-
use_current_ClassDeclaration_SharedObjectCore(get_old_ClassDeclaration_SharedObjectCore());
|
|
12
|
-
use_old_ClassDeclaration_SharedObjectCore(get_current_ClassDeclaration_SharedObjectCore());
|
|
13
|
-
use_current_ClassDeclaration_SummarySerializer(get_old_ClassDeclaration_SummarySerializer());
|
|
14
|
-
use_old_ClassDeclaration_SummarySerializer(get_current_ClassDeclaration_SummarySerializer());
|
|
15
|
-
use_current_EnumDeclaration_ValueType(get_old_EnumDeclaration_ValueType());
|
|
16
|
-
use_old_EnumDeclaration_ValueType(get_current_EnumDeclaration_ValueType());
|
|
17
|
-
use_current_FunctionDeclaration_createSingleBlobSummary(get_old_FunctionDeclaration_createSingleBlobSummary());
|
|
18
|
-
use_old_FunctionDeclaration_createSingleBlobSummary(get_current_FunctionDeclaration_createSingleBlobSummary());
|
|
19
|
-
use_current_FunctionDeclaration_makeHandlesSerializable(get_old_FunctionDeclaration_makeHandlesSerializable());
|
|
20
|
-
use_old_FunctionDeclaration_makeHandlesSerializable(get_current_FunctionDeclaration_makeHandlesSerializable());
|
|
21
|
-
use_current_FunctionDeclaration_parseHandles(get_old_FunctionDeclaration_parseHandles());
|
|
22
|
-
use_old_FunctionDeclaration_parseHandles(get_current_FunctionDeclaration_parseHandles());
|
|
23
|
-
use_current_FunctionDeclaration_serializeHandles(get_old_FunctionDeclaration_serializeHandles());
|
|
24
|
-
use_old_FunctionDeclaration_serializeHandles(get_current_FunctionDeclaration_serializeHandles());
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=validateSharedObjectBasePrevious.generated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validateSharedObjectBasePrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateSharedObjectBasePrevious.generated.ts"],"names":[],"mappings":"AAgCA,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,iDAAiD,EAAE,CAAC,CAAC;AAuBzD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,yCAAyC,CACrC,qCAAqC,EAAE,CAAC,CAAC;AAW7C,qCAAqC,CACjC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,6CAA6C,CACzC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,yCAAyC,CACrC,6CAA6C,EAAE,CAAC,CAAC;AAWrD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,qCAAqC,CACjC,iCAAiC,EAAE,CAAC,CAAC;AAWzC,iCAAiC,CAC7B,qCAAqC,EAAE,CAAC,CAAC;AAW7C,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAuB/D,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAW/D,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluidframework/shared-object-base-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_FluidSerializer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_FluidSerializer():\n TypeOnly<old.FluidSerializer>;\ndeclare function use_current_ClassDeclaration_FluidSerializer(\n use: TypeOnly<current.FluidSerializer>): void;\nuse_current_ClassDeclaration_FluidSerializer(\n get_old_ClassDeclaration_FluidSerializer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_FluidSerializer\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_FluidSerializer():\n TypeOnly<current.FluidSerializer>;\ndeclare function use_old_ClassDeclaration_FluidSerializer(\n use: TypeOnly<old.FluidSerializer>): void;\nuse_old_ClassDeclaration_FluidSerializer(\n get_current_ClassDeclaration_FluidSerializer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidSerializer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidSerializer():\n TypeOnly<old.IFluidSerializer>;\ndeclare function use_current_InterfaceDeclaration_IFluidSerializer(\n use: TypeOnly<current.IFluidSerializer>): void;\nuse_current_InterfaceDeclaration_IFluidSerializer(\n get_old_InterfaceDeclaration_IFluidSerializer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidSerializer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidSerializer():\n TypeOnly<current.IFluidSerializer>;\ndeclare function use_old_InterfaceDeclaration_IFluidSerializer(\n use: TypeOnly<old.IFluidSerializer>): void;\nuse_old_InterfaceDeclaration_IFluidSerializer(\n get_current_InterfaceDeclaration_IFluidSerializer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedInterfaceDeclaration_ISerializedHandle\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedInterfaceDeclaration_ISerializedHandle\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISharedObject():\n TypeOnly<old.ISharedObject>;\ndeclare function use_current_InterfaceDeclaration_ISharedObject(\n use: TypeOnly<current.ISharedObject>): void;\nuse_current_InterfaceDeclaration_ISharedObject(\n get_old_InterfaceDeclaration_ISharedObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISharedObject():\n TypeOnly<current.ISharedObject>;\ndeclare function use_old_InterfaceDeclaration_ISharedObject(\n use: TypeOnly<old.ISharedObject>): void;\nuse_old_InterfaceDeclaration_ISharedObject(\n get_current_InterfaceDeclaration_ISharedObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObjectEvents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISharedObjectEvents():\n TypeOnly<old.ISharedObjectEvents>;\ndeclare function use_current_InterfaceDeclaration_ISharedObjectEvents(\n use: TypeOnly<current.ISharedObjectEvents>): void;\nuse_current_InterfaceDeclaration_ISharedObjectEvents(\n get_old_InterfaceDeclaration_ISharedObjectEvents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObjectEvents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISharedObjectEvents():\n TypeOnly<current.ISharedObjectEvents>;\ndeclare function use_old_InterfaceDeclaration_ISharedObjectEvents(\n use: TypeOnly<old.ISharedObjectEvents>): void;\nuse_old_InterfaceDeclaration_ISharedObjectEvents(\n get_current_InterfaceDeclaration_ISharedObjectEvents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_SharedObject():\n TypeOnly<old.SharedObject>;\ndeclare function use_current_ClassDeclaration_SharedObject(\n use: TypeOnly<current.SharedObject>): void;\nuse_current_ClassDeclaration_SharedObject(\n get_old_ClassDeclaration_SharedObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_SharedObject():\n TypeOnly<current.SharedObject>;\ndeclare function use_old_ClassDeclaration_SharedObject(\n use: TypeOnly<old.SharedObject>): void;\nuse_old_ClassDeclaration_SharedObject(\n get_current_ClassDeclaration_SharedObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObjectCore\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_SharedObjectCore():\n TypeOnly<old.SharedObjectCore>;\ndeclare function use_current_ClassDeclaration_SharedObjectCore(\n use: TypeOnly<current.SharedObjectCore>): void;\nuse_current_ClassDeclaration_SharedObjectCore(\n get_old_ClassDeclaration_SharedObjectCore());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObjectCore\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_SharedObjectCore():\n TypeOnly<current.SharedObjectCore>;\ndeclare function use_old_ClassDeclaration_SharedObjectCore(\n use: TypeOnly<old.SharedObjectCore>): void;\nuse_old_ClassDeclaration_SharedObjectCore(\n get_current_ClassDeclaration_SharedObjectCore());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SummarySerializer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_SummarySerializer():\n TypeOnly<old.SummarySerializer>;\ndeclare function use_current_ClassDeclaration_SummarySerializer(\n use: TypeOnly<current.SummarySerializer>): void;\nuse_current_ClassDeclaration_SummarySerializer(\n get_old_ClassDeclaration_SummarySerializer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SummarySerializer\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_SummarySerializer():\n TypeOnly<current.SummarySerializer>;\ndeclare function use_old_ClassDeclaration_SummarySerializer(\n use: TypeOnly<old.SummarySerializer>): void;\nuse_old_ClassDeclaration_SummarySerializer(\n get_current_ClassDeclaration_SummarySerializer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ValueType\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_EnumDeclaration_ValueType():\n TypeOnly<old.ValueType>;\ndeclare function use_current_EnumDeclaration_ValueType(\n use: TypeOnly<current.ValueType>): void;\nuse_current_EnumDeclaration_ValueType(\n get_old_EnumDeclaration_ValueType());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ValueType\": {\"backCompat\": false}\n*/\ndeclare function get_current_EnumDeclaration_ValueType():\n TypeOnly<current.ValueType>;\ndeclare function use_old_EnumDeclaration_ValueType(\n use: TypeOnly<old.ValueType>): void;\nuse_old_EnumDeclaration_ValueType(\n get_current_EnumDeclaration_ValueType());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createSingleBlobSummary\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createSingleBlobSummary():\n TypeOnly<typeof old.createSingleBlobSummary>;\ndeclare function use_current_FunctionDeclaration_createSingleBlobSummary(\n use: TypeOnly<typeof current.createSingleBlobSummary>): void;\nuse_current_FunctionDeclaration_createSingleBlobSummary(\n get_old_FunctionDeclaration_createSingleBlobSummary());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createSingleBlobSummary\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createSingleBlobSummary():\n TypeOnly<typeof current.createSingleBlobSummary>;\ndeclare function use_old_FunctionDeclaration_createSingleBlobSummary(\n use: TypeOnly<typeof old.createSingleBlobSummary>): void;\nuse_old_FunctionDeclaration_createSingleBlobSummary(\n get_current_FunctionDeclaration_createSingleBlobSummary());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedVariableDeclaration_isSerializedHandle\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedVariableDeclaration_isSerializedHandle\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_makeHandlesSerializable\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_makeHandlesSerializable():\n TypeOnly<typeof old.makeHandlesSerializable>;\ndeclare function use_current_FunctionDeclaration_makeHandlesSerializable(\n use: TypeOnly<typeof current.makeHandlesSerializable>): void;\nuse_current_FunctionDeclaration_makeHandlesSerializable(\n get_old_FunctionDeclaration_makeHandlesSerializable());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_makeHandlesSerializable\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_makeHandlesSerializable():\n TypeOnly<typeof current.makeHandlesSerializable>;\ndeclare function use_old_FunctionDeclaration_makeHandlesSerializable(\n use: TypeOnly<typeof old.makeHandlesSerializable>): void;\nuse_old_FunctionDeclaration_makeHandlesSerializable(\n get_current_FunctionDeclaration_makeHandlesSerializable());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_parseHandles\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_parseHandles():\n TypeOnly<typeof old.parseHandles>;\ndeclare function use_current_FunctionDeclaration_parseHandles(\n use: TypeOnly<typeof current.parseHandles>): void;\nuse_current_FunctionDeclaration_parseHandles(\n get_old_FunctionDeclaration_parseHandles());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_parseHandles\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_parseHandles():\n TypeOnly<typeof current.parseHandles>;\ndeclare function use_old_FunctionDeclaration_parseHandles(\n use: TypeOnly<typeof old.parseHandles>): void;\nuse_old_FunctionDeclaration_parseHandles(\n get_current_FunctionDeclaration_parseHandles());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_serializeHandles\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_serializeHandles():\n TypeOnly<typeof old.serializeHandles>;\ndeclare function use_current_FunctionDeclaration_serializeHandles(\n use: TypeOnly<typeof current.serializeHandles>): void;\nuse_current_FunctionDeclaration_serializeHandles(\n get_old_FunctionDeclaration_serializeHandles());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_serializeHandles\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_serializeHandles():\n TypeOnly<typeof current.serializeHandles>;\ndeclare function use_old_FunctionDeclaration_serializeHandles(\n use: TypeOnly<typeof old.serializeHandles>): void;\nuse_old_FunctionDeclaration_serializeHandles(\n get_current_FunctionDeclaration_serializeHandles());\n"]}
|
package/lib/test/utils.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { create404Response } from "@fluidframework/runtime-utils";
|
|
6
|
-
export class MockHandleContext {
|
|
7
|
-
get IFluidHandleContext() {
|
|
8
|
-
return this;
|
|
9
|
-
}
|
|
10
|
-
constructor(absolutePath = "", routeContext) {
|
|
11
|
-
this.absolutePath = absolutePath;
|
|
12
|
-
this.routeContext = routeContext;
|
|
13
|
-
this.isAttached = false;
|
|
14
|
-
}
|
|
15
|
-
attachGraph() {
|
|
16
|
-
throw new Error("Method not implemented.");
|
|
17
|
-
}
|
|
18
|
-
async resolveHandle(request) {
|
|
19
|
-
return create404Response(request);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Creates a Jsonable object graph of a specified breadth/depth. The 'createLeaf' callback
|
|
24
|
-
* is a factory that is invoked to create the leaves of the graph.
|
|
25
|
-
*/
|
|
26
|
-
export function makeJson(breadth, depth, createLeaf) {
|
|
27
|
-
let depthInternal = depth;
|
|
28
|
-
if (--depthInternal === 0) {
|
|
29
|
-
return createLeaf();
|
|
30
|
-
}
|
|
31
|
-
const o = {};
|
|
32
|
-
for (let i = 0; i < breadth; i++) {
|
|
33
|
-
o[`o${i}`] = makeJson(breadth, depthInternal, createLeaf);
|
|
34
|
-
}
|
|
35
|
-
return o;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=utils.js.map
|
package/lib/test/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/test/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,OAAO,iBAAiB;IAE7B,IAAW,mBAAmB;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YACiB,eAAe,EAAE,EACjB,YAAkC;QADlC,iBAAY,GAAZ,YAAY,CAAK;QACjB,iBAAY,GAAZ,YAAY,CAAsB;QAP5C,eAAU,GAAG,KAAK,CAAC;IAQvB,CAAC;IAEG,WAAW;QACjB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,OAAiB;QAC3C,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAI,OAAe,EAAE,KAAa,EAAE,UAAiC;IAC5F,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAI,EAAE,aAAa,KAAK,CAAC,EAAE;QAC1B,OAAO,UAAU,EAAE,CAAC;KACpB;IAED,MAAM,CAAC,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;QACjC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;KAC1D;IACD,OAAO,CAAC,CAAC;AACV,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandleContext, IRequest } from \"@fluidframework/core-interfaces\";\nimport { Serializable } from \"@fluidframework/datastore-definitions\";\nimport { create404Response } from \"@fluidframework/runtime-utils\";\n\nexport class MockHandleContext implements IFluidHandleContext {\n\tpublic isAttached = false;\n\tpublic get IFluidHandleContext() {\n\t\treturn this;\n\t}\n\n\tconstructor(\n\t\tpublic readonly absolutePath = \"\",\n\t\tpublic readonly routeContext?: IFluidHandleContext,\n\t) {}\n\n\tpublic attachGraph() {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async resolveHandle(request: IRequest) {\n\t\treturn create404Response(request);\n\t}\n}\n\n/**\n * Creates a Jsonable object graph of a specified breadth/depth. The 'createLeaf' callback\n * is a factory that is invoked to create the leaves of the graph.\n */\nexport function makeJson<T>(breadth: number, depth: number, createLeaf: () => Serializable<T>) {\n\tlet depthInternal = depth;\n\tif (--depthInternal === 0) {\n\t\treturn createLeaf();\n\t}\n\n\tconst o = {};\n\tfor (let i = 0; i < breadth; i++) {\n\t\to[`o${i}`] = makeJson(breadth, depthInternal, createLeaf);\n\t}\n\treturn o;\n}\n"]}
|
|
File without changes
|