@fluid-experimental/property-dds 2.0.0-dev.2.2.0.111723 → 2.0.0-dev.3.1.0.125672

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.
@@ -68,7 +68,7 @@ export class CompressedPropertyTreeFactory {
68
68
  }
69
69
  export class DeflatedPropertyTreeFactory extends CompressedPropertyTreeFactory {
70
70
  async load(runtime, id, services, attributes, url) {
71
- return await super.load(runtime, id, services, attributes, url);
71
+ return (await super.load(runtime, id, services, attributes, url));
72
72
  }
73
73
  create(document, id, requestUrl) {
74
74
  return super.create(document, id, requestUrl);
@@ -79,8 +79,12 @@ export class DeflatedPropertyTreeFactory extends CompressedPropertyTreeFactory {
79
79
  get attributes() {
80
80
  return DeflatedPropertyTreeFactory.Attributes;
81
81
  }
82
- getEncodeFce() { return deflate; }
83
- getDecodeFce() { return inflate; }
82
+ getEncodeFce() {
83
+ return deflate;
84
+ }
85
+ getDecodeFce() {
86
+ return inflate;
87
+ }
84
88
  newPropertyTree(id, runtime, attributes, options, propertyTreeConfig) {
85
89
  return new DeflatedPropertyTree(id, runtime, attributes, options, propertyTreeConfig);
86
90
  }
@@ -93,7 +97,7 @@ DeflatedPropertyTreeFactory.Attributes = {
93
97
  };
94
98
  export class LZ4PropertyTreeFactory extends CompressedPropertyTreeFactory {
95
99
  async load(runtime, id, services, attributes, url) {
96
- return await super.load(runtime, id, services, attributes, url);
100
+ return (await super.load(runtime, id, services, attributes, url));
97
101
  }
98
102
  create(document, id, requestUrl) {
99
103
  return super.create(document, id, requestUrl);
@@ -104,8 +108,12 @@ export class LZ4PropertyTreeFactory extends CompressedPropertyTreeFactory {
104
108
  get attributes() {
105
109
  return LZ4PropertyTreeFactory.Attributes;
106
110
  }
107
- getEncodeFce() { return compress; }
108
- getDecodeFce() { return decompress; }
111
+ getEncodeFce() {
112
+ return compress;
113
+ }
114
+ getDecodeFce() {
115
+ return decompress;
116
+ }
109
117
  newPropertyTree(id, runtime, attributes, options, propertyTreeConfig) {
110
118
  return new LZ4PropertyTree(id, runtime, attributes, options, propertyTreeConfig);
111
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"propertyTreeExtFactories.js","sourceRoot":"","sources":["../src/propertyTreeExtFactories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wDAAwD;AACxD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAY9E,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE1E,MAAM,OAAgB,6BAA6B;IAKvC,wBAAwB,CAAC,QAAQ,EAAE,QAAQ;QAC/C,OAAO;YACH,cAAc,EAAE;gBACZ,MAAM,EAAE,CAAC,MAA4B,EAAE,EAAE;oBACrC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;oBACtD,MAAM,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;oBACxD,MAAM,MAAM,GAAW,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBAC1C,MAAM,SAAS,GAAG,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;oBACnD,IAAI,SAAS,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE;wBACxC,2DAA2D;wBAC3D,MAAM,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC;wBACzB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;qBAChC;oBACD,OAAO,MAAM,CAAC;gBAClB,CAAC;gBACD,MAAM,EAAE,CAAC,cAAoC,EAAE,EAAE;oBAC7C,2DAA2D;oBAC3D,IAAI,cAAc,CAAC,UAAU,CAAC,EAAE;wBAC5B,MAAM,MAAM,GAA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IACpD,IAAI,EAAE,sBAAsB,CAAC,IAAI;IACjC,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,OAAO;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\nimport { deflate, inflate } from \"pako\";\nimport { compress, decompress } from \"lz4js\";\nimport { bufferToString, stringToBuffer } from \"@fluidframework/common-utils\";\nimport {\n IChannelAttributes,\n IFluidDataStoreRuntime,\n IChannelServices,\n IChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport {\n IPropertyTreeConfig, IPropertyTreeMessage, ISharedPropertyTreeEncDec,\n ISnapshotSummary, SharedPropertyTree, SharedPropertyTreeOptions,\n}\n from \"./propertyTree\";\nimport { DeflatedPropertyTree, LZ4PropertyTree } from \"./propertyTreeExt\";\n\nexport abstract class CompressedPropertyTreeFactory implements IChannelFactory {\n public abstract get attributes();\n public abstract get type();\n public abstract getEncodeFce();\n public abstract getDecodeFce();\n private createCompressionMethods(encodeFn, decodeFn): ISharedPropertyTreeEncDec {\n return {\n messageEncoder: {\n encode: (change: IPropertyTreeMessage) => {\n const changeSetStr = JSON.stringify(change.changeSet);\n const unzipped = new TextEncoder().encode(changeSetStr);\n const zipped: Buffer = encodeFn(unzipped);\n const zippedStr = bufferToString(zipped, \"base64\");\n if (zippedStr.length < changeSetStr.length) {\n // eslint-disable-next-line @typescript-eslint/dot-notation\n change[\"isZipped\"] = \"1\";\n change.changeSet = zippedStr;\n }\n return change;\n },\n decode: (transferChange: IPropertyTreeMessage) => {\n // eslint-disable-next-line @typescript-eslint/dot-notation\n if (transferChange[\"isZipped\"]) {\n const zipped = new Uint8Array(stringToBuffer(transferChange.changeSet, \"base64\"));\n const unzipped = decodeFn(zipped);\n const changeSetStr = new TextDecoder().decode(unzipped);\n transferChange.changeSet = JSON.parse(changeSetStr);\n }\n return transferChange;\n },\n },\n summaryEncoder: {\n encode: (snapshotSummary: ISnapshotSummary): Buffer => {\n const summaryStr = JSON.stringify(snapshotSummary);\n const unzipped = new TextEncoder().encode(summaryStr);\n const serializedSummary: Buffer = encodeFn(unzipped);\n return serializedSummary;\n },\n decode: (serializedSummary): ISnapshotSummary => {\n const unzipped = decodeFn(serializedSummary);\n const summaryStr = new TextDecoder().decode(unzipped);\n const snapshotSummary: ISnapshotSummary = JSON.parse(summaryStr);\n return snapshotSummary;\n },\n },\n };\n }\n public getEncDec(): ISharedPropertyTreeEncDec {\n return this.createCompressionMethods(this.getEncodeFce(), this.getDecodeFce());\n }\n public abstract newPropertyTree(\n id: string,\n runtime: IFluidDataStoreRuntime,\n attributes: IChannelAttributes,\n options: SharedPropertyTreeOptions,\n propertyTreeConfig: IPropertyTreeConfig): SharedPropertyTree;\n\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes,\n url?: string,\n ): Promise<SharedPropertyTree> {\n const options = {};\n const instance = this.newPropertyTree(id, runtime, attributes,\n options as SharedPropertyTreeOptions\n , { encDec: this.getEncDec() });\n await instance.load(services);\n return instance;\n }\n\n public create(document: IFluidDataStoreRuntime, id: string, requestUrl?: string): SharedPropertyTree {\n const options = {};\n const cell = this.newPropertyTree(id, document,\n this.attributes, options as SharedPropertyTreeOptions,\n { encDec: this.getEncDec() });\n cell.initializeLocal();\n return cell;\n }\n}\n\nexport class DeflatedPropertyTreeFactory extends CompressedPropertyTreeFactory {\n public static readonly Type = \"DeflatedPropertyTree:84534a0fe613522101f6\";\n\n public static readonly Attributes: IChannelAttributes = {\n type: DeflatedPropertyTreeFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: \"0.0.1\",\n };\n\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes,\n url?: string,\n ): Promise<DeflatedPropertyTree> {\n return await super.load(runtime, id, services, attributes, url) as DeflatedPropertyTree;\n }\n\n public create(document: IFluidDataStoreRuntime, id: string, requestUrl?: string): DeflatedPropertyTree {\n return super.create(document, id, requestUrl);\n }\n\n public get type() {\n return DeflatedPropertyTreeFactory.Type;\n }\n\n public get attributes() {\n return DeflatedPropertyTreeFactory.Attributes;\n }\n\n public getEncodeFce() { return deflate; }\n public getDecodeFce() { return inflate; }\n public newPropertyTree(\n id: string,\n runtime: IFluidDataStoreRuntime,\n attributes: IChannelAttributes,\n options: SharedPropertyTreeOptions,\n propertyTreeConfig: IPropertyTreeConfig): SharedPropertyTree {\n return new DeflatedPropertyTree(id, runtime, attributes, options, propertyTreeConfig);\n }\n}\n\nexport class LZ4PropertyTreeFactory extends CompressedPropertyTreeFactory {\n public static readonly Type = \"LZ4PropertyTree:84534a0fe613522101f6\";\n\n public static readonly Attributes: IChannelAttributes = {\n type: LZ4PropertyTreeFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: \"0.0.1\",\n };\n\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes,\n url?: string,\n ): Promise<LZ4PropertyTree> {\n return await super.load(runtime, id, services, attributes, url) as LZ4PropertyTree;\n }\n\n public create(document: IFluidDataStoreRuntime, id: string, requestUrl?: string): LZ4PropertyTree {\n return super.create(document, id, requestUrl);\n }\n\n public get type() {\n return LZ4PropertyTreeFactory.Type;\n }\n\n public get attributes() {\n return LZ4PropertyTreeFactory.Attributes;\n }\n\n public getEncodeFce() { return compress; }\n public getDecodeFce() { return decompress; }\n public newPropertyTree(\n id: string,\n runtime: IFluidDataStoreRuntime,\n attributes: IChannelAttributes,\n options: SharedPropertyTreeOptions,\n propertyTreeConfig: IPropertyTreeConfig): SharedPropertyTree {\n return new LZ4PropertyTree(id, runtime, attributes, options, propertyTreeConfig);\n }\n}\n"]}
1
+ {"version":3,"file":"propertyTreeExtFactories.js","sourceRoot":"","sources":["../src/propertyTreeExtFactories.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wDAAwD;AAC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,CAAC;AAEnD,sCAAU,GAAuB;IACvD,IAAI,EAAE,2BAA2B,CAAC,IAAI;IACtC,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,OAAO;CACvB,CAAC;AA6CH,MAAM,OAAO,sBAAuB,SAAQ,6BAA6B;IASjE,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B,EAC9B,GAAY;QAEZ,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,CAAC,CAAoB,CAAC;IACtF,CAAC;IAEM,MAAM,CACZ,QAAgC,EAChC,EAAU,EACV,UAAmB;QAEnB,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,IAAW,IAAI;QACd,OAAO,sBAAsB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,sBAAsB,CAAC,UAAU,CAAC;IAC1C,CAAC;IAEM,YAAY;QAClB,OAAO,QAAQ,CAAC;IACjB,CAAC;IACM,YAAY;QAClB,OAAO,UAAU,CAAC;IACnB,CAAC;IACM,eAAe,CACrB,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,OAAkC,EAClC,kBAAuC;QAEvC,OAAO,IAAI,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;IAClF,CAAC;;AAhDsB,2BAAI,GAAG,sCAAsC,CAAC;AAE9C,iCAAU,GAAuB;IACvD,IAAI,EAAE,sBAAsB,CAAC,IAAI;IACjC,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,OAAO;CACvB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\nimport { deflate, inflate } from \"pako\";\nimport { compress, decompress } from \"lz4js\";\nimport { bufferToString, stringToBuffer } from \"@fluidframework/common-utils\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport {\n\tIPropertyTreeConfig,\n\tIPropertyTreeMessage,\n\tISharedPropertyTreeEncDec,\n\tISnapshotSummary,\n\tSharedPropertyTree,\n\tSharedPropertyTreeOptions,\n} from \"./propertyTree\";\nimport { DeflatedPropertyTree, LZ4PropertyTree } from \"./propertyTreeExt\";\n\nexport abstract class CompressedPropertyTreeFactory implements IChannelFactory {\n\tpublic abstract get attributes();\n\tpublic abstract get type();\n\tpublic abstract getEncodeFce();\n\tpublic abstract getDecodeFce();\n\tprivate createCompressionMethods(encodeFn, decodeFn): ISharedPropertyTreeEncDec {\n\t\treturn {\n\t\t\tmessageEncoder: {\n\t\t\t\tencode: (change: IPropertyTreeMessage) => {\n\t\t\t\t\tconst changeSetStr = JSON.stringify(change.changeSet);\n\t\t\t\t\tconst unzipped = new TextEncoder().encode(changeSetStr);\n\t\t\t\t\tconst zipped: Buffer = encodeFn(unzipped);\n\t\t\t\t\tconst zippedStr = bufferToString(zipped, \"base64\");\n\t\t\t\t\tif (zippedStr.length < changeSetStr.length) {\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\t\t\t\t\tchange[\"isZipped\"] = \"1\";\n\t\t\t\t\t\tchange.changeSet = zippedStr;\n\t\t\t\t\t}\n\t\t\t\t\treturn change;\n\t\t\t\t},\n\t\t\t\tdecode: (transferChange: IPropertyTreeMessage) => {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/dot-notation\n\t\t\t\t\tif (transferChange[\"isZipped\"]) {\n\t\t\t\t\t\tconst zipped = new Uint8Array(\n\t\t\t\t\t\t\tstringToBuffer(transferChange.changeSet, \"base64\"),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst unzipped = decodeFn(zipped);\n\t\t\t\t\t\tconst changeSetStr = new TextDecoder().decode(unzipped);\n\t\t\t\t\t\ttransferChange.changeSet = JSON.parse(changeSetStr);\n\t\t\t\t\t}\n\t\t\t\t\treturn transferChange;\n\t\t\t\t},\n\t\t\t},\n\t\t\tsummaryEncoder: {\n\t\t\t\tencode: (snapshotSummary: ISnapshotSummary): Buffer => {\n\t\t\t\t\tconst summaryStr = JSON.stringify(snapshotSummary);\n\t\t\t\t\tconst unzipped = new TextEncoder().encode(summaryStr);\n\t\t\t\t\tconst serializedSummary: Buffer = encodeFn(unzipped);\n\t\t\t\t\treturn serializedSummary;\n\t\t\t\t},\n\t\t\t\tdecode: (serializedSummary): ISnapshotSummary => {\n\t\t\t\t\tconst unzipped = decodeFn(serializedSummary);\n\t\t\t\t\tconst summaryStr = new TextDecoder().decode(unzipped);\n\t\t\t\t\tconst snapshotSummary: ISnapshotSummary = JSON.parse(summaryStr);\n\t\t\t\t\treturn snapshotSummary;\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\tpublic getEncDec(): ISharedPropertyTreeEncDec {\n\t\treturn this.createCompressionMethods(this.getEncodeFce(), this.getDecodeFce());\n\t}\n\tpublic abstract newPropertyTree(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\toptions: SharedPropertyTreeOptions,\n\t\tpropertyTreeConfig: IPropertyTreeConfig,\n\t): SharedPropertyTree;\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t\turl?: string,\n\t): Promise<SharedPropertyTree> {\n\t\tconst options = {};\n\t\tconst instance = this.newPropertyTree(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tattributes,\n\t\t\toptions as SharedPropertyTreeOptions,\n\t\t\t{ encDec: this.getEncDec() },\n\t\t);\n\t\tawait instance.load(services);\n\t\treturn instance;\n\t}\n\n\tpublic create(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\trequestUrl?: string,\n\t): SharedPropertyTree {\n\t\tconst options = {};\n\t\tconst cell = this.newPropertyTree(\n\t\t\tid,\n\t\t\tdocument,\n\t\t\tthis.attributes,\n\t\t\toptions as SharedPropertyTreeOptions,\n\t\t\t{ encDec: this.getEncDec() },\n\t\t);\n\t\tcell.initializeLocal();\n\t\treturn cell;\n\t}\n}\n\nexport class DeflatedPropertyTreeFactory extends CompressedPropertyTreeFactory {\n\tpublic static readonly Type = \"DeflatedPropertyTree:84534a0fe613522101f6\";\n\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: DeflatedPropertyTreeFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: \"0.0.1\",\n\t};\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t\turl?: string,\n\t): Promise<DeflatedPropertyTree> {\n\t\treturn (await super.load(runtime, id, services, attributes, url)) as DeflatedPropertyTree;\n\t}\n\n\tpublic create(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\trequestUrl?: string,\n\t): DeflatedPropertyTree {\n\t\treturn super.create(document, id, requestUrl);\n\t}\n\n\tpublic get type() {\n\t\treturn DeflatedPropertyTreeFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn DeflatedPropertyTreeFactory.Attributes;\n\t}\n\n\tpublic getEncodeFce() {\n\t\treturn deflate;\n\t}\n\tpublic getDecodeFce() {\n\t\treturn inflate;\n\t}\n\tpublic newPropertyTree(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\toptions: SharedPropertyTreeOptions,\n\t\tpropertyTreeConfig: IPropertyTreeConfig,\n\t): SharedPropertyTree {\n\t\treturn new DeflatedPropertyTree(id, runtime, attributes, options, propertyTreeConfig);\n\t}\n}\n\nexport class LZ4PropertyTreeFactory extends CompressedPropertyTreeFactory {\n\tpublic static readonly Type = \"LZ4PropertyTree:84534a0fe613522101f6\";\n\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: LZ4PropertyTreeFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: \"0.0.1\",\n\t};\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t\turl?: string,\n\t): Promise<LZ4PropertyTree> {\n\t\treturn (await super.load(runtime, id, services, attributes, url)) as LZ4PropertyTree;\n\t}\n\n\tpublic create(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\trequestUrl?: string,\n\t): LZ4PropertyTree {\n\t\treturn super.create(document, id, requestUrl);\n\t}\n\n\tpublic get type() {\n\t\treturn LZ4PropertyTreeFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn LZ4PropertyTreeFactory.Attributes;\n\t}\n\n\tpublic getEncodeFce() {\n\t\treturn compress;\n\t}\n\tpublic getDecodeFce() {\n\t\treturn decompress;\n\t}\n\tpublic newPropertyTree(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\toptions: SharedPropertyTreeOptions,\n\t\tpropertyTreeConfig: IPropertyTreeConfig,\n\t): SharedPropertyTree {\n\t\treturn new LZ4PropertyTree(id, runtime, attributes, options, propertyTreeConfig);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"propertyTreeFactory.d.ts","sourceRoot":"","sources":["../src/propertyTreeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAA6B,MAAM,gBAAgB,CAAC;AAE/E;;GAEG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IAC1D,gBAAuB,IAAI,6CAA6C;IAExE,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF,IAAW,IAAI,WAEd;IAED,IAAW,UAAU,uBAEpB;IAEY,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,EAC9B,GAAG,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,kBAAkB,CAAC;IAQvB,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,kBAAkB;CAOpG"}
1
+ {"version":3,"file":"propertyTreeFactory.d.ts","sourceRoot":"","sources":["../src/propertyTreeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAA6B,MAAM,gBAAgB,CAAC;AAE/E;;GAEG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IAC1D,gBAAuB,IAAI,6CAA6C;IAExE,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF,IAAW,IAAI,WAEd;IAED,IAAW,UAAU,uBAEpB;IAEY,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,EAC9B,GAAG,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,kBAAkB,CAAC;IAavB,MAAM,CACZ,QAAQ,EAAE,sBAAsB,EAChC,EAAE,EAAE,MAAM,EACV,UAAU,CAAC,EAAE,MAAM,GACjB,kBAAkB;CAYrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"propertyTreeFactory.js","sourceRoot":"","sources":["../src/propertyTreeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,kBAAkB,EAA6B,MAAM,gBAAgB,CAAC;AAE/E;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAS/B,IAAW,IAAI;QACd,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,mBAAmB,CAAC,UAAU,CAAC;IACvC,CAAC;IAEM,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B,EAC9B,GAAY;QAEZ,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,iBAAiB;QACjB,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAoC,CAAC,CAAC;QACvG,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU,EAAE,UAAmB;QAC9E,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,OAAoC,CAAC,CAAC;QAEzG,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;;AApCsB,wBAAI,GAAG,yCAAyC,CAAC;AAEjD,8BAAU,GAAuB;IACvD,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,KAAK;CACrB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedPropertyTree, SharedPropertyTreeOptions } from \"./propertyTree\";\n\n/**\n * The factory that defines the map\n */\nexport class PropertyTreeFactory implements IChannelFactory {\n\tpublic static readonly Type = \"PropertyTree:01EP5J4Y6C284JR6ATVPPHRJ4E\";\n\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: PropertyTreeFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: \"0.1\",\n\t};\n\n\tpublic get type() {\n\t\treturn PropertyTreeFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn PropertyTreeFactory.Attributes;\n\t}\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t\turl?: string,\n\t): Promise<SharedPropertyTree> {\n\t\tconst options = {};\n\t\t// default object\n\t\tconst instance = new SharedPropertyTree(id, runtime, attributes, options as SharedPropertyTreeOptions);\n\t\tawait instance.load(services);\n\t\treturn instance;\n\t}\n\n\tpublic create(document: IFluidDataStoreRuntime, id: string, requestUrl?: string): SharedPropertyTree {\n\t\tconst options = {};\n\t\tconst cell = new SharedPropertyTree(id, document, this.attributes, options as SharedPropertyTreeOptions);\n\n\t\tcell.initializeLocal();\n\t\treturn cell;\n\t}\n}\n"]}
1
+ {"version":3,"file":"propertyTreeFactory.js","sourceRoot":"","sources":["../src/propertyTreeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,kBAAkB,EAA6B,MAAM,gBAAgB,CAAC;AAE/E;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAS/B,IAAW,IAAI;QACd,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,mBAAmB,CAAC,UAAU,CAAC;IACvC,CAAC;IAEM,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B,EAC9B,GAAY;QAEZ,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,iBAAiB;QACjB,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CACtC,EAAE,EACF,OAAO,EACP,UAAU,EACV,OAAoC,CACpC,CAAC;QACF,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEM,MAAM,CACZ,QAAgC,EAChC,EAAU,EACV,UAAmB;QAEnB,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAClC,EAAE,EACF,QAAQ,EACR,IAAI,CAAC,UAAU,EACf,OAAoC,CACpC,CAAC;QAEF,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;;AAlDsB,wBAAI,GAAG,yCAAyC,CAAC;AAEjD,8BAAU,GAAuB;IACvD,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,KAAK;CACrB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedPropertyTree, SharedPropertyTreeOptions } from \"./propertyTree\";\n\n/**\n * The factory that defines the map\n */\nexport class PropertyTreeFactory implements IChannelFactory {\n\tpublic static readonly Type = \"PropertyTree:01EP5J4Y6C284JR6ATVPPHRJ4E\";\n\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: PropertyTreeFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: \"0.1\",\n\t};\n\n\tpublic get type() {\n\t\treturn PropertyTreeFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn PropertyTreeFactory.Attributes;\n\t}\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t\turl?: string,\n\t): Promise<SharedPropertyTree> {\n\t\tconst options = {};\n\t\t// default object\n\t\tconst instance = new SharedPropertyTree(\n\t\t\tid,\n\t\t\truntime,\n\t\t\tattributes,\n\t\t\toptions as SharedPropertyTreeOptions,\n\t\t);\n\t\tawait instance.load(services);\n\t\treturn instance;\n\t}\n\n\tpublic create(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\trequestUrl?: string,\n\t): SharedPropertyTree {\n\t\tconst options = {};\n\t\tconst cell = new SharedPropertyTree(\n\t\t\tid,\n\t\t\tdocument,\n\t\t\tthis.attributes,\n\t\t\toptions as SharedPropertyTreeOptions,\n\t\t);\n\n\t\tcell.initializeLocal();\n\t\treturn cell;\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/property-dds",
3
- "version": "2.0.0-dev.2.2.0.111723",
3
+ "version": "2.0.0-dev.3.1.0.125672",
4
4
  "description": "definition of the property distributed data store",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -26,8 +26,11 @@
26
26
  "clean": "rimraf dist lib *.tsbuildinfo *.build.log",
27
27
  "eslint": "eslint src",
28
28
  "eslint:fix": "eslint src --fix",
29
- "lint": "npm run eslint",
30
- "lint:fix": "npm run eslint:fix",
29
+ "format": "npm run prettier:fix",
30
+ "lint": "npm run prettier && npm run eslint",
31
+ "lint:fix": "npm run prettier:fix && npm run eslint:fix",
32
+ "prettier": "prettier --check . --ignore-path ../../../../.prettierignore",
33
+ "prettier:fix": "prettier --write . --ignore-path ../../../../.prettierignore",
31
34
  "test": "npm run test:mocha",
32
35
  "test:mocha": "mocha \"dist/**/*.spec.js\" --exit -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
33
36
  "test:mocha-ts": "cross-env FLUID_TEST_VERBOSE=1 TS_NODE_PROJECT=\"./src/test/tsconfig.json\" mocha --require ts-node/register --extensions ts,tsx \"src/test/**/*.spec.ts\" --exit -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict --timeout 1500000",
@@ -35,17 +38,18 @@
35
38
  "tsc": "tsc"
36
39
  },
37
40
  "dependencies": {
38
- "@fluid-experimental/property-changeset": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
39
- "@fluid-experimental/property-properties": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
41
+ "@fluid-experimental/property-changeset": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
42
+ "@fluid-experimental/property-properties": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
40
43
  "@fluidframework/common-utils": "^1.0.0",
41
- "@fluidframework/container-definitions": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
42
- "@fluidframework/core-interfaces": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
43
- "@fluidframework/datastore-definitions": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
44
+ "@fluidframework/container-definitions": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
45
+ "@fluidframework/core-interfaces": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
46
+ "@fluidframework/datastore-definitions": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
44
47
  "@fluidframework/protocol-definitions": "^1.1.0",
45
- "@fluidframework/runtime-definitions": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
46
- "@fluidframework/runtime-utils": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
47
- "@fluidframework/shared-object-base": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
48
+ "@fluidframework/runtime-definitions": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
49
+ "@fluidframework/runtime-utils": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
50
+ "@fluidframework/shared-object-base": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
48
51
  "axios": "^0.26.0",
52
+ "buffer": "^6.0.3",
49
53
  "fastest-json-copy": "^1.0.1",
50
54
  "lodash": "^4.17.21",
51
55
  "lz4js": "^0.2.0",
@@ -54,20 +58,23 @@
54
58
  "uuid": "^8.3.1"
55
59
  },
56
60
  "devDependencies": {
57
- "@fluid-experimental/property-common": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
58
- "@fluid-experimental/property-dds-previous": "npm:@fluid-experimental/property-dds@2.0.0-internal.2.1.0",
61
+ "@fluid-experimental/property-common": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
59
62
  "@fluidframework/build-common": "^1.1.0",
60
- "@fluidframework/driver-definitions": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
61
- "@fluidframework/eslint-config-fluid": "^1.2.0",
62
- "@fluidframework/local-driver": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
63
- "@fluidframework/mocha-test-setup": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
64
- "@fluidframework/sequence": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
63
+ "@fluidframework/container-loader": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
64
+ "@fluidframework/driver-definitions": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
65
+ "@fluidframework/eslint-config-fluid": "^2.0.0",
66
+ "@fluidframework/local-driver": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
67
+ "@fluidframework/mocha-test-setup": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
68
+ "@fluidframework/sequence": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
65
69
  "@fluidframework/server-local-server": "^0.1038.2000",
66
- "@fluidframework/test-runtime-utils": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
67
- "@fluidframework/test-utils": ">=2.0.0-dev.2.2.0.111723 <2.0.0-dev.3.0.0",
70
+ "@fluidframework/test-drivers": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
71
+ "@fluidframework/test-runtime-utils": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
72
+ "@fluidframework/test-utils": ">=2.0.0-dev.3.1.0.125672 <2.0.0-dev.4.0.0",
68
73
  "@microsoft/api-extractor": "^7.22.2",
69
74
  "@rushstack/eslint-config": "^2.5.1",
75
+ "@types/lodash": "^4.14.118",
70
76
  "@types/mocha": "^9.1.1",
77
+ "@types/node": "^14.18.36",
71
78
  "chai": "^4.2.0",
72
79
  "concurrently": "^6.2.0",
73
80
  "copyfiles": "^2.4.1",
@@ -77,6 +84,7 @@
77
84
  "eslint": "~8.6.0",
78
85
  "mocha": "^10.0.0",
79
86
  "nyc": "^15.0.0",
87
+ "prettier": "~2.6.2",
80
88
  "rimraf": "^2.6.2",
81
89
  "typescript": "~4.5.5"
82
90
  },
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ module.exports = {
7
+ ...require("@fluidframework/build-common/prettier.config.cjs"),
8
+ };