@fluidframework/routerlicious-driver 2.0.0-internal.1.4.2 → 2.0.0-internal.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"deltaStorageService.d.ts","sourceRoot":"","sources":["../src/deltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,oBAAoB,EACpB,4BAA4B,EAC5B,kBAAkB,EAClB,OAAO,EACV,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;GAEG;AACH,qBAAa,2BAA4B,YAAW,4BAA4B;IAExE,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,sBAAsB;gBAHtB,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,EACV,mBAAmB,EAAE,oBAAoB,EACzC,sBAAsB,EAAE,sBAAsB;IAGnE,OAAO,CAAC,UAAU,CAA8D;IAEhF,aAAa,CAAC,IAAI,EAAE,MAAM,EACtB,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,EACpB,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,yBAAyB,EAAE,CAAC;YAkBzB,OAAO;CAiBxB;AAED;;GAEG;AACH,qBAAa,mBAAoB,YAAW,oBAAoB;IAExD,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ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AM,EACtB,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,EACpB,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,yBAAyB,EAAE,CAAC;YAkBzB,OAAO;CAiBxB;AAED;;GAEG;AACH,qBAAa,mBAAoB,YAAW,oBAAoB;IAExD,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAJlB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,gBAAgB,EACxB,cAAc,GAAE,MAAM,OAAO,CAAC,WAAW,CAAgC,EACzE,kBAAkB,GAAE,MAAM,MAAuB;IAIzD,GAAG,CACZ,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EAAE,YAAY;IAC1B,EAAE,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,CAAC;CAyBjC"}
@@ -6,7 +6,6 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.DeltaStorageService = exports.DocumentDeltaStorageService = void 0;
8
8
  const driver_utils_1 = require("@fluidframework/driver-utils");
9
- const common_utils_1 = require("@fluidframework/common-utils");
10
9
  const telemetry_utils_1 = require("@fluidframework/telemetry-utils");
11
10
  const MaxBatchDeltas = 2000; // Maximum number of ops we can fetch at a time
12
11
  /**
@@ -30,7 +29,7 @@ class DocumentDeltaStorageService {
30
29
  1, // concurrency
31
30
  from, // inclusive
32
31
  to, // exclusive
33
- MaxBatchDeltas, new common_utils_1.TelemetryNullLogger(), abortSignal, fetchReason);
32
+ MaxBatchDeltas, new telemetry_utils_1.TelemetryNullLogger(), abortSignal, fetchReason);
34
33
  }
35
34
  async getCore(from, to) {
36
35
  const opsFromLogTail = this.logtailSha
@@ -1 +1 @@
1
- {"version":3,"file":"deltaStorageService.js","sourceRoot":"","sources":["../src/deltaStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,+DAA4F;AAC5F,+DAAmE;AAEnE,qEAAmE;AAInE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,+CAA+C;AAE5E;;GAEG;AACH,MAAa,2BAA2B;IACpC,YACqB,QAAgB,EAChB,EAAU,EACV,mBAAyC,EACzC,sBAA8C;QAH9C,aAAQ,GAAR,QAAQ,CAAQ;QAChB,OAAE,GAAF,EAAE,CAAQ;QACV,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,2BAAsB,GAAtB,sBAAsB,CAAwB;QAG3D,eAAU,GAAuB,IAAI,CAAC,sBAAsB,CAAC,UAAU,CAAC;IAFhF,CAAC;IAID,aAAa,CAAC,IAAY,EACtB,EAAsB,EACtB,WAAyB,EACzB,UAAoB,EACpB,WAAoB;QAEpB,IAAI,UAAU,EAAE;YACZ,OAAO,iCAAkB,CAAC;SAC7B;QACD,OAAO,IAAA,yBAAU,EACb,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QACvB,uEAAuE;QACvE,0DAA0D;QAC1D,CAAC,EAAE,cAAc;QACjB,IAAI,EAAE,YAAY;QAClB,EAAE,EAAE,YAAY;QAChB,cAAc,EACd,IAAI,kCAAmB,EAAE,EACzB,WAAW,EACX,WAAW,CACd,CAAC;IACN,CAAC;IAEO,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,EAAU;QAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU;YAClC,CAAC,CAAC,MAAM,IAAA,2BAAY,EAA8B,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,CAAC;YAC/F,CAAC,CAAC,EAAE,CAAC;QAET,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,cAAc,CAAC,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EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YAC5B,KAAK,CAAC,GAAG,CAAC;gBACN,KAAK,EAAE,QAAQ,CAAC,MAAM;aACzB,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;QACpB,CAAC,CACJ,CAAC;QAEF,oGAAoG;QACpG,4GAA4G;QAC5G,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IACnD,CAAC;CACJ;AAxCD,kDAwCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IDeltaStorageService,\n IDocumentDeltaStorageService,\n IDeltasFetchResult,\n IStream,\n} from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { readAndParse, requestOps, emptyMessageStream } from \"@fluidframework/driver-utils\";\nimport { TelemetryNullLogger } from \"@fluidframework/common-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { PerformanceEvent } from \"@fluidframework/telemetry-utils\";\nimport { RestWrapper } from \"@fluidframework/server-services-client\";\nimport { DocumentStorageService } from \"./documentStorageService\";\n\nconst MaxBatchDeltas = 2000; // Maximum number of ops we can fetch at a time\n\n/**\n * Storage service limited to only being able to fetch documents for a specific document\n */\nexport class DocumentDeltaStorageService implements IDocumentDeltaStorageService {\n constructor(\n private readonly tenantId: string,\n private readonly id: string,\n private readonly deltaStorageService: IDeltaStorageService,\n private readonly documentStorageService: DocumentStorageService) {\n }\n\n private logtailSha: string | undefined = this.documentStorageService.logTailSha;\n\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]> {\n if (cachedOnly) {\n return emptyMessageStream;\n }\n return requestOps(\n this.getCore.bind(this),\n // Staging: starting with no concurrency, listening for feedback first.\n // In future releases we will switch to actual concurrency\n 1, // concurrency\n from, // inclusive\n to, // exclusive\n MaxBatchDeltas,\n new TelemetryNullLogger(),\n abortSignal,\n fetchReason,\n );\n }\n\n private async getCore(from: number, to: number): Promise<IDeltasFetchResult> {\n const opsFromLogTail = this.logtailSha\n ? await readAndParse<ISequencedDocumentMessage[]>(this.documentStorageService, this.logtailSha)\n : [];\n\n this.logtailSha = undefined;\n if (opsFromLogTail.length > 0) {\n const messages = opsFromLogTail.filter((op) =>\n op.sequenceNumber >= from,\n );\n if (messages.length > 0) {\n return { messages, partialResult: true };\n }\n }\n\n return this.deltaStorageService.get(this.tenantId, this.id, from, to);\n }\n}\n\n/**\n * Provides access to the underlying delta storage on the server for routerlicious driver.\n */\nexport class DeltaStorageService implements IDeltaStorageService {\n constructor(\n private readonly url: string,\n private readonly restWrapper: RestWrapper,\n private readonly logger: ITelemetryLogger,\n private readonly getRestWrapper: () => Promise<RestWrapper> = async () => this.restWrapper,\n private readonly getDeltaStorageUrl: () => string = () => this.url,\n ) {\n }\n\n public async get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n ): Promise<IDeltasFetchResult> {\n const ops = await PerformanceEvent.timedExecAsync(\n this.logger,\n {\n eventName: \"getDeltas\",\n from,\n to,\n },\n async (event) => {\n const restWrapper = await this.getRestWrapper();\n const url = this.getDeltaStorageUrl();\n const response = await restWrapper.get<ISequencedDocumentMessage[]>(\n url,\n { from: from - 1, to });\n event.end({\n count: response.length,\n });\n return response;\n },\n );\n\n // It is assumed that server always returns all the ops that it has in the range that was requested.\n // This may change in the future, if so, we need to adjust and receive \"end\" value from server in such case.\n return { messages: ops, partialResult: false };\n }\n}\n"]}
1
+ {"version":3,"file":"deltaStorageService.js","sourceRoot":"","sources":["../src/deltaStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,+DAA4F;AAE5F,qEAAwF;AAIxF,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,+CAA+C;AAE5E;;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EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IACnD,CAAC;CACJ;AAxCD,kDAwCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IDeltaStorageService,\n IDocumentDeltaStorageService,\n IDeltasFetchResult,\n IStream,\n} from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { readAndParse, requestOps, emptyMessageStream } from \"@fluidframework/driver-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { PerformanceEvent, TelemetryNullLogger } from \"@fluidframework/telemetry-utils\";\nimport { RestWrapper } from \"@fluidframework/server-services-client\";\nimport { DocumentStorageService } from \"./documentStorageService\";\n\nconst MaxBatchDeltas = 2000; // Maximum number of ops we can fetch at a time\n\n/**\n * Storage service limited to only being able to fetch documents for a specific document\n */\nexport class DocumentDeltaStorageService implements IDocumentDeltaStorageService {\n constructor(\n private readonly tenantId: string,\n private readonly id: string,\n private readonly deltaStorageService: IDeltaStorageService,\n private readonly documentStorageService: DocumentStorageService) {\n }\n\n private logtailSha: string | undefined = this.documentStorageService.logTailSha;\n\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]> {\n if (cachedOnly) {\n return emptyMessageStream;\n }\n return requestOps(\n this.getCore.bind(this),\n // Staging: starting with no concurrency, listening for feedback first.\n // In future releases we will switch to actual concurrency\n 1, // concurrency\n from, // inclusive\n to, // exclusive\n MaxBatchDeltas,\n new TelemetryNullLogger(),\n abortSignal,\n fetchReason,\n );\n }\n\n private async getCore(from: number, to: number): Promise<IDeltasFetchResult> {\n const opsFromLogTail = this.logtailSha\n ? await readAndParse<ISequencedDocumentMessage[]>(this.documentStorageService, this.logtailSha)\n : [];\n\n this.logtailSha = undefined;\n if (opsFromLogTail.length > 0) {\n const messages = opsFromLogTail.filter((op) =>\n op.sequenceNumber >= from,\n );\n if (messages.length > 0) {\n return { messages, partialResult: true };\n }\n }\n\n return this.deltaStorageService.get(this.tenantId, this.id, from, to);\n }\n}\n\n/**\n * Provides access to the underlying delta storage on the server for routerlicious driver.\n */\nexport class DeltaStorageService implements IDeltaStorageService {\n constructor(\n private readonly url: string,\n private readonly restWrapper: RestWrapper,\n private readonly logger: ITelemetryLogger,\n private readonly getRestWrapper: () => Promise<RestWrapper> = async () => this.restWrapper,\n private readonly getDeltaStorageUrl: () => string = () => this.url,\n ) {\n }\n\n public async get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n ): Promise<IDeltasFetchResult> {\n const ops = await PerformanceEvent.timedExecAsync(\n this.logger,\n {\n eventName: \"getDeltas\",\n from,\n to,\n },\n async (event) => {\n const restWrapper = await this.getRestWrapper();\n const url = this.getDeltaStorageUrl();\n const response = await restWrapper.get<ISequencedDocumentMessage[]>(\n url,\n { from: from - 1, to });\n event.end({\n count: response.length,\n });\n return response;\n },\n );\n\n // It is assumed that server always returns all the ops that it has in the range that was requested.\n // This may change in the future, if so, we need to adjust and receive \"end\" value from server in such case.\n return { messages: ops, partialResult: false };\n }\n}\n"]}
@@ -4,8 +4,7 @@
4
4
  */
5
5
  import { ITelemetryLogger } from "@fluidframework/common-definitions";
6
6
  import { DocumentDeltaConnection } from "@fluidframework/driver-base";
7
- import { IDocumentDeltaConnection } from "@fluidframework/driver-definitions";
8
- import { IAnyDriverError } from "@fluidframework/driver-utils";
7
+ import { IAnyDriverError, IDocumentDeltaConnection } from "@fluidframework/driver-definitions";
9
8
  import { IClient } from "@fluidframework/protocol-definitions";
10
9
  import type { io as SocketIOClientStatic } from "socket.io-client";
11
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"documentDeltaConnection.d.ts","sourceRoot":"","sources":["../src/documentDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EA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AAC,CAAC,IAAI,CAAC,GAAG,CAAC;SAC5F,CAAC;QAEF,wCAAwC;QACxC,MAAM,2BAA2B,GAAG,IAAI,CAAC;QACzC,MAAM,eAAe,GAAG,IAAI,2BAA2B,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,2BAA2B,CAAC,CAAC;QAEzG,MAAM,eAAe,CAAC,UAAU,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;QAC5D,OAAO,eAAe,CAAC;IAC3B,CAAC;IAED;;OAEG;IACO,iBAAiB,CAAC,OAAe,EAAE,KAAW,EAAE,QAAQ,GAAG,IAAI;QACrE,wDAAwD;QACxD,wGAAwG;QACxG,4CAA4C;QAC5C,OAAO,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,IAAI,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAA,KAAK,QAAQ;YAClF,CAAC,CAAC,IAAA,uCAA0B,EAAC,KAAyB,EAAE,OAAO,CAAC;YAChE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;CACJ;AApDD,kEAoDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { DocumentDeltaConnection } from \"@fluidframework/driver-base\";\nimport { IDocumentDeltaConnection } from \"@fluidframework/driver-definitions\";\nimport { IAnyDriverError } from \"@fluidframework/driver-utils\";\nimport { IClient, IConnect } from \"@fluidframework/protocol-definitions\";\nimport type { io as SocketIOClientStatic } from \"socket.io-client\";\nimport { errorObjectFromSocketError, IR11sSocketError } from \"./errorUtils\";\nimport { pkgVersion as driverVersion } from \"./packageVersion\";\n\nconst protocolVersions = [\"^0.4.0\", \"^0.3.0\", \"^0.2.0\", \"^0.1.0\"];\n\n/**\n * Wrapper over the shared one for driver specific translation.\n */\nexport class R11sDocumentDeltaConnection extends DocumentDeltaConnection {\n public static async create(\n tenantId: string,\n id: string,\n token: string | null,\n io: typeof SocketIOClientStatic,\n client: IClient,\n url: string,\n logger: ITelemetryLogger,\n timeoutMs = 20000): Promise<IDocumentDeltaConnection> {\n const socket = io(\n url,\n {\n query: {\n documentId: id,\n tenantId,\n },\n reconnection: false,\n // Default to websocket connection, with long-polling disabled\n transports: [\"websocket\"],\n timeout: timeoutMs,\n });\n\n const connectMessage: IConnect = {\n client,\n id,\n mode: client.mode,\n tenantId,\n token, // Token is going to indicate tenant level information, etc...\n versions: protocolVersions,\n relayUserAgent: [client.details.environment, ` driverVersion:${driverVersion}`].join(\";\"),\n };\n\n // TODO: expose to host at factory level\n const enableLongPollingDowngrades = true;\n const deltaConnection = new R11sDocumentDeltaConnection(socket, id, logger, enableLongPollingDowngrades);\n\n await deltaConnection.initialize(connectMessage, timeoutMs);\n return deltaConnection;\n }\n\n /**\n * Error raising for socket.io issues\n */\n protected createErrorObject(handler: string, error?: any, canRetry = true): IAnyDriverError {\n // Note: we suspect the incoming error object is either:\n // - a socketError: add it to the R11sError object for driver to be able to parse it and reason over it.\n // - anything else: let base class handle it\n return canRetry && Number.isInteger(error?.code) && typeof error?.message === \"string\"\n ? errorObjectFromSocketError(error as IR11sSocketError, handler)\n : super.createErrorObject(handler, error, canRetry);\n }\n}\n"]}
1
+ {"version":3,"file":"documentDeltaConnection.js","sourceRoot":"","sources":["../src/documentDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,6DAAsE;AAItE,6CAA4E;AAC5E,qDAA+D;AAE/D,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAElE;;GAEG;AACH,MAAa,2BAA4B,SAAQ,qCAAuB;IAC7D,MAAM,CAAC,KAAK,CAAC,MAAM,CACtB,QAA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K,CAAC,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;CACJ;AApDD,kEAoDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { DocumentDeltaConnection } from \"@fluidframework/driver-base\";\nimport { IAnyDriverError, IDocumentDeltaConnection } from \"@fluidframework/driver-definitions\";\nimport { IClient, IConnect } from \"@fluidframework/protocol-definitions\";\nimport type { io as SocketIOClientStatic } from \"socket.io-client\";\nimport { errorObjectFromSocketError, IR11sSocketError } from \"./errorUtils\";\nimport { pkgVersion as driverVersion } from \"./packageVersion\";\n\nconst protocolVersions = [\"^0.4.0\", \"^0.3.0\", \"^0.2.0\", \"^0.1.0\"];\n\n/**\n * Wrapper over the shared one for driver specific translation.\n */\nexport class R11sDocumentDeltaConnection extends DocumentDeltaConnection {\n public static async create(\n tenantId: string,\n id: string,\n token: string | null,\n io: typeof SocketIOClientStatic,\n client: IClient,\n url: string,\n logger: ITelemetryLogger,\n timeoutMs = 20000): Promise<IDocumentDeltaConnection> {\n const socket = io(\n url,\n {\n query: {\n documentId: id,\n tenantId,\n },\n reconnection: false,\n // Default to websocket connection, with long-polling disabled\n transports: [\"websocket\"],\n timeout: timeoutMs,\n });\n\n const connectMessage: IConnect = {\n client,\n id,\n mode: client.mode,\n tenantId,\n token, // Token is going to indicate tenant level information, etc...\n versions: protocolVersions,\n relayUserAgent: [client.details.environment, ` driverVersion:${driverVersion}`].join(\";\"),\n };\n\n // TODO: expose to host at factory level\n const enableLongPollingDowngrades = true;\n const deltaConnection = new R11sDocumentDeltaConnection(socket, id, logger, enableLongPollingDowngrades);\n\n await deltaConnection.initialize(connectMessage, timeoutMs);\n return deltaConnection;\n }\n\n /**\n * Error raising for socket.io issues\n */\n protected createErrorObject(handler: string, error?: any, canRetry = true): IAnyDriverError {\n // Note: we suspect the incoming error object is either:\n // - a socketError: add it to the R11sError object for driver to be able to parse it and reason over it.\n // - anything else: let base class handle it\n return canRetry && Number.isInteger(error?.code) && typeof error?.message === \"string\"\n ? errorObjectFromSocketError(error as IR11sSocketError, handler)\n : super.createErrorObject(handler, error, canRetry);\n }\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -3,11 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export * from "./defaultTokenProvider";
6
- export * from "./deltaStorageService";
7
- export * from "./documentService";
6
+ export * from "./tokens";
8
7
  export * from "./documentServiceFactory";
9
- export * from "./documentStorageService";
10
- export * from "./nullBlobStorageService";
11
8
  export * from "./policies";
12
- export * from "./tokens";
13
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AAGzB,cAAc,0BAA0B,CAAC;AAGzC,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -14,12 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Tokens
17
18
  __exportStar(require("./defaultTokenProvider"), exports);
18
- __exportStar(require("./deltaStorageService"), exports);
19
- __exportStar(require("./documentService"), exports);
19
+ __exportStar(require("./tokens"), exports);
20
+ // Factory
20
21
  __exportStar(require("./documentServiceFactory"), exports);
21
- __exportStar(require("./documentStorageService"), exports);
22
- __exportStar(require("./nullBlobStorageService"), exports);
22
+ // Configuration
23
23
  __exportStar(require("./policies"), exports);
24
- __exportStar(require("./tokens"), exports);
25
24
  //# 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;;;;;;;;;;;;AAEH,yDAAuC;AACvC,wDAAsC;AACtC,oDAAkC;AAClC,2DAAyC;AACzC,2DAAyC;AACzC,2DAAyC;AACzC,6CAA2B;AAC3B,2CAAyB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport * from \"./defaultTokenProvider\";\nexport * from \"./deltaStorageService\";\nexport * from \"./documentService\";\nexport * from \"./documentServiceFactory\";\nexport * from \"./documentStorageService\";\nexport * from \"./nullBlobStorageService\";\nexport * from \"./policies\";\nexport * from \"./tokens\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;AAEH,SAAS;AACT,yDAAuC;AACvC,2CAAyB;AAEzB,UAAU;AACV,2DAAyC;AAEzC,gBAAgB;AAChB,6CAA2B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Tokens\nexport * from \"./defaultTokenProvider\";\nexport * from \"./tokens\";\n\n// Factory\nexport * from \"./documentServiceFactory\";\n\n// Configuration\nexport * from \"./policies\";\n"]}
@@ -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/routerlicious-driver";
8
- export declare const pkgVersion = "2.0.0-internal.1.4.2";
8
+ export declare const pkgVersion = "2.0.0-internal.2.0.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -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/routerlicious-driver";
11
- exports.pkgVersion = "2.0.0-internal.1.4.2";
11
+ exports.pkgVersion = "2.0.0-internal.2.0.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,sCAAsC,CAAC;AACjD,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/routerlicious-driver\";\nexport const pkgVersion = \"2.0.0-internal.1.4.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,sCAAsC,CAAC;AACjD,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/routerlicious-driver\";\nexport const pkgVersion = \"2.0.0-internal.2.0.0\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"deltaStorageService.d.ts","sourceRoot":"","sources":["../src/deltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,oBAAoB,EACpB,4BAA4B,EA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AC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAJlB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,gBAAgB,EACxB,cAAc,GAAE,MAAM,OAAO,CAAC,WAAW,CAAgC,EACzE,kBAAkB,GAAE,MAAM,MAAuB;IAIzD,GAAG,CACZ,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EAAE,YAAY;IAC1B,EAAE,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,CAAC;CAyBjC"}
@@ -3,8 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { readAndParse, requestOps, emptyMessageStream } from "@fluidframework/driver-utils";
6
- import { TelemetryNullLogger } from "@fluidframework/common-utils";
7
- import { PerformanceEvent } from "@fluidframework/telemetry-utils";
6
+ import { PerformanceEvent, TelemetryNullLogger } from "@fluidframework/telemetry-utils";
8
7
  const MaxBatchDeltas = 2000; // Maximum number of ops we can fetch at a time
9
8
  /**
10
9
  * Storage service limited to only being able to fetch documents for a specific document
@@ -1 +1 @@
1
- {"version":3,"file":"deltaStorageService.js","sourceRoot":"","sources":["../src/deltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,+CAA+C;AAE5E;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACpC,YACqB,QAAgB,EAChB,EAAU,EACV,mBAAyC,EACzC,sBAA8C;QAH9C,aAAQ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Licensed under the MIT License.\n */\n\nimport {\n IDeltaStorageService,\n IDocumentDeltaStorageService,\n IDeltasFetchResult,\n IStream,\n} from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { readAndParse, requestOps, emptyMessageStream } from \"@fluidframework/driver-utils\";\nimport { TelemetryNullLogger } from \"@fluidframework/common-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { PerformanceEvent } from \"@fluidframework/telemetry-utils\";\nimport { RestWrapper } from \"@fluidframework/server-services-client\";\nimport { DocumentStorageService } from \"./documentStorageService\";\n\nconst MaxBatchDeltas = 2000; // Maximum number of ops we can fetch at a time\n\n/**\n * Storage service limited to only being able to fetch documents for a specific document\n */\nexport class DocumentDeltaStorageService implements IDocumentDeltaStorageService {\n constructor(\n private readonly tenantId: string,\n private readonly id: string,\n private readonly deltaStorageService: IDeltaStorageService,\n private readonly documentStorageService: DocumentStorageService) {\n }\n\n private logtailSha: string | undefined = this.documentStorageService.logTailSha;\n\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]> {\n if (cachedOnly) {\n return emptyMessageStream;\n }\n return requestOps(\n this.getCore.bind(this),\n // Staging: starting with no concurrency, listening for feedback first.\n // In future releases we will switch to actual concurrency\n 1, // concurrency\n from, // inclusive\n to, // exclusive\n MaxBatchDeltas,\n new TelemetryNullLogger(),\n abortSignal,\n fetchReason,\n );\n }\n\n private async getCore(from: number, to: number): Promise<IDeltasFetchResult> {\n const opsFromLogTail = this.logtailSha\n ? await readAndParse<ISequencedDocumentMessage[]>(this.documentStorageService, this.logtailSha)\n : [];\n\n this.logtailSha = undefined;\n if (opsFromLogTail.length > 0) {\n const messages = opsFromLogTail.filter((op) =>\n op.sequenceNumber >= from,\n );\n if (messages.length > 0) {\n return { messages, partialResult: true };\n }\n }\n\n return this.deltaStorageService.get(this.tenantId, this.id, from, to);\n }\n}\n\n/**\n * Provides access to the underlying delta storage on the server for routerlicious driver.\n */\nexport class DeltaStorageService implements IDeltaStorageService {\n constructor(\n private readonly url: string,\n private readonly restWrapper: RestWrapper,\n private readonly logger: ITelemetryLogger,\n private readonly getRestWrapper: () => Promise<RestWrapper> = async () => this.restWrapper,\n private readonly getDeltaStorageUrl: () => string = () => this.url,\n ) {\n }\n\n public async get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n ): Promise<IDeltasFetchResult> {\n const ops = await PerformanceEvent.timedExecAsync(\n this.logger,\n {\n eventName: \"getDeltas\",\n from,\n to,\n },\n async (event) => {\n const restWrapper = await this.getRestWrapper();\n const url = this.getDeltaStorageUrl();\n const response = await restWrapper.get<ISequencedDocumentMessage[]>(\n url,\n { from: from - 1, to });\n event.end({\n count: response.length,\n });\n return response;\n },\n );\n\n // It is assumed that server always returns all the ops that it has in the range that was requested.\n // This may change in the future, if so, we need to adjust and receive \"end\" value from server in such case.\n return { messages: ops, partialResult: false };\n }\n}\n"]}
1
+ {"version":3,"file":"deltaStorageService.js","sourceRoot":"","sources":["../src/deltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAIxF,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,+CAA+C;AAE5E;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACpC,YACqB,QAAgB,EAChB,EAAU,EACV,mBAAyC,EACzC,sBAA8C;QAH9C,aAAQ,GAAR,QAAQ,CAAQ;QAChB,OAAE,GAAF,EAAE,CAAQ;QACV,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,2BAAsB,GAAtB,sBAAsB,CAAwB;QAG3D,eAAU,GAAuB,IAAI,CAAC,sBAAsB,CAAC,UA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AI,CAAC,WAAW,EACzE,qBAAmC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG;QAJjD,QAAG,GAAH,GAAG,CAAQ;QACX,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAAkB;QACxB,mBAAc,GAAd,cAAc,CAA2D;QACzE,uBAAkB,GAAlB,kBAAkB,CAA+B;IAEtE,CAAC;IAEM,KAAK,CAAC,GAAG,CACZ,QAAgB,EAChB,EAAU,EACV,IAAY,EAAE,YAAY;IAC1B,EAAU;QAEV,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,cAAc,CAC7C,IAAI,CAAC,MAAM,EACX;YACI,SAAS,EAAE,WAAW;YACtB,IAAI;YACJ,EAAE;SACL,EACD,KAAK,EAAE,KAAK,EAAE,EAAE;YACZ,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAChD,MAAM,GAAG,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACtC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,GAAG,CAClC,GAAG,EACH,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YAC5B,KAAK,CAAC,GAAG,CAAC;gBACN,KAAK,EAAE,QAAQ,CAAC,MAAM;aACzB,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;QACpB,CAAC,CACJ,CAAC;QAEF,oGAAoG;QACpG,4GAA4G;QAC5G,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IACnD,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IDeltaStorageService,\n IDocumentDeltaStorageService,\n IDeltasFetchResult,\n IStream,\n} from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { readAndParse, requestOps, emptyMessageStream } from \"@fluidframework/driver-utils\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { PerformanceEvent, TelemetryNullLogger } from \"@fluidframework/telemetry-utils\";\nimport { RestWrapper } from \"@fluidframework/server-services-client\";\nimport { DocumentStorageService } from \"./documentStorageService\";\n\nconst MaxBatchDeltas = 2000; // Maximum number of ops we can fetch at a time\n\n/**\n * Storage service limited to only being able to fetch documents for a specific document\n */\nexport class DocumentDeltaStorageService implements IDocumentDeltaStorageService {\n constructor(\n private readonly tenantId: string,\n private readonly id: string,\n private readonly deltaStorageService: IDeltaStorageService,\n private readonly documentStorageService: DocumentStorageService) {\n }\n\n private logtailSha: string | undefined = this.documentStorageService.logTailSha;\n\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]> {\n if (cachedOnly) {\n return emptyMessageStream;\n }\n return requestOps(\n this.getCore.bind(this),\n // Staging: starting with no concurrency, listening for feedback first.\n // In future releases we will switch to actual concurrency\n 1, // concurrency\n from, // inclusive\n to, // exclusive\n MaxBatchDeltas,\n new TelemetryNullLogger(),\n abortSignal,\n fetchReason,\n );\n }\n\n private async getCore(from: number, to: number): Promise<IDeltasFetchResult> {\n const opsFromLogTail = this.logtailSha\n ? await readAndParse<ISequencedDocumentMessage[]>(this.documentStorageService, this.logtailSha)\n : [];\n\n this.logtailSha = undefined;\n if (opsFromLogTail.length > 0) {\n const messages = opsFromLogTail.filter((op) =>\n op.sequenceNumber >= from,\n );\n if (messages.length > 0) {\n return { messages, partialResult: true };\n }\n }\n\n return this.deltaStorageService.get(this.tenantId, this.id, from, to);\n }\n}\n\n/**\n * Provides access to the underlying delta storage on the server for routerlicious driver.\n */\nexport class DeltaStorageService implements IDeltaStorageService {\n constructor(\n private readonly url: string,\n private readonly restWrapper: RestWrapper,\n private readonly logger: ITelemetryLogger,\n private readonly getRestWrapper: () => Promise<RestWrapper> = async () => this.restWrapper,\n private readonly getDeltaStorageUrl: () => string = () => this.url,\n ) {\n }\n\n public async get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n ): Promise<IDeltasFetchResult> {\n const ops = await PerformanceEvent.timedExecAsync(\n this.logger,\n {\n eventName: \"getDeltas\",\n from,\n to,\n },\n async (event) => {\n const restWrapper = await this.getRestWrapper();\n const url = this.getDeltaStorageUrl();\n const response = await restWrapper.get<ISequencedDocumentMessage[]>(\n url,\n { from: from - 1, to });\n event.end({\n count: response.length,\n });\n return response;\n },\n );\n\n // It is assumed that server always returns all the ops that it has in the range that was requested.\n // This may change in the future, if so, we need to adjust and receive \"end\" value from server in such case.\n return { messages: ops, partialResult: false };\n }\n}\n"]}
@@ -4,8 +4,7 @@
4
4
  */
5
5
  import { ITelemetryLogger } from "@fluidframework/common-definitions";
6
6
  import { DocumentDeltaConnection } from "@fluidframework/driver-base";
7
- import { IDocumentDeltaConnection } from "@fluidframework/driver-definitions";
8
- import { IAnyDriverError } from "@fluidframework/driver-utils";
7
+ import { IAnyDriverError, IDocumentDeltaConnection } from "@fluidframework/driver-definitions";
9
8
  import { IClient } from "@fluidframework/protocol-definitions";
10
9
  import type { io as SocketIOClientStatic } from "socket.io-client";
11
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"documentDeltaConnection.d.ts","sourceRoot":"","sources":["../src/documentDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAY,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAMnE;;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2B,CAAC,CAAC;QAEzG,MAAM,eAAe,CAAC,UAAU,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;QAC5D,OAAO,eAAe,CAAC;IAC3B,CAAC;IAED;;OAEG;IACO,iBAAiB,CAAC,OAAe,EAAE,KAAW,EAAE,QAAQ,GAAG,IAAI;QACrE,wDAAwD;QACxD,wGAAwG;QACxG,4CAA4C;QAC5C,OAAO,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,IAAI,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAA,KAAK,QAAQ;YAClF,CAAC,CAAC,0BAA0B,CAAC,KAAyB,EAAE,OAAO,CAAC;YAChE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { DocumentDeltaConnection } from \"@fluidframework/driver-base\";\nimport { IDocumentDeltaConnection } from \"@fluidframework/driver-definitions\";\nimport { IAnyDriverError } from \"@fluidframework/driver-utils\";\nimport { IClient, IConnect } from \"@fluidframework/protocol-definitions\";\nimport type { io as SocketIOClientStatic } from \"socket.io-client\";\nimport { errorObjectFromSocketError, IR11sSocketError } from \"./errorUtils\";\nimport { pkgVersion as driverVersion } from \"./packageVersion\";\n\nconst protocolVersions = [\"^0.4.0\", \"^0.3.0\", \"^0.2.0\", \"^0.1.0\"];\n\n/**\n * Wrapper over the shared one for driver specific translation.\n */\nexport class R11sDocumentDeltaConnection extends DocumentDeltaConnection {\n public static async create(\n tenantId: string,\n id: string,\n token: string | null,\n io: typeof SocketIOClientStatic,\n client: IClient,\n url: string,\n logger: ITelemetryLogger,\n timeoutMs = 20000): Promise<IDocumentDeltaConnection> {\n const socket = io(\n url,\n {\n query: {\n documentId: id,\n tenantId,\n },\n reconnection: false,\n // Default to websocket connection, with long-polling disabled\n transports: [\"websocket\"],\n timeout: timeoutMs,\n });\n\n const connectMessage: IConnect = {\n client,\n id,\n mode: client.mode,\n tenantId,\n token, // Token is going to indicate tenant level information, etc...\n versions: protocolVersions,\n relayUserAgent: [client.details.environment, ` driverVersion:${driverVersion}`].join(\";\"),\n };\n\n // TODO: expose to host at factory level\n const enableLongPollingDowngrades = true;\n const deltaConnection = new R11sDocumentDeltaConnection(socket, id, logger, enableLongPollingDowngrades);\n\n await deltaConnection.initialize(connectMessage, timeoutMs);\n return deltaConnection;\n }\n\n /**\n * Error raising for socket.io issues\n */\n protected createErrorObject(handler: string, error?: any, canRetry = true): IAnyDriverError {\n // Note: we suspect the incoming error object is either:\n // - a socketError: add it to the R11sError object for driver to be able to parse it and reason over it.\n // - anything else: let base class handle it\n return canRetry && Number.isInteger(error?.code) && typeof error?.message === \"string\"\n ? errorObjectFromSocketError(error as IR11sSocketError, handler)\n : super.createErrorObject(handler, error, canRetry);\n }\n}\n"]}
1
+ {"version":3,"file":"documentDeltaConnection.js","sourceRoot":"","sources":["../src/documentDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAItE,OAAO,EAAE,0BAA0B,EAAoB,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,2BAA4B,SAAQ,uBAAuB;IAC7D,MAAM,CAAC,KAAK,CAAC,MAAM,CACtB,QAAgB,EAChB,EAAU,EACV,KAAoB,EACpB,EAA+B,EAC/B,MAAe,EACf,GAAW,EACX,MAAwB,EAC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ourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { DocumentDeltaConnection } from \"@fluidframework/driver-base\";\nimport { IAnyDriverError, IDocumentDeltaConnection } from \"@fluidframework/driver-definitions\";\nimport { IClient, IConnect } from \"@fluidframework/protocol-definitions\";\nimport type { io as SocketIOClientStatic } from \"socket.io-client\";\nimport { errorObjectFromSocketError, IR11sSocketError } from \"./errorUtils\";\nimport { pkgVersion as driverVersion } from \"./packageVersion\";\n\nconst protocolVersions = [\"^0.4.0\", \"^0.3.0\", \"^0.2.0\", \"^0.1.0\"];\n\n/**\n * Wrapper over the shared one for driver specific translation.\n */\nexport class R11sDocumentDeltaConnection extends DocumentDeltaConnection {\n public static async create(\n tenantId: string,\n id: string,\n token: string | null,\n io: typeof SocketIOClientStatic,\n client: IClient,\n url: string,\n logger: ITelemetryLogger,\n timeoutMs = 20000): Promise<IDocumentDeltaConnection> {\n const socket = io(\n url,\n {\n query: {\n documentId: id,\n tenantId,\n },\n reconnection: false,\n // Default to websocket connection, with long-polling disabled\n transports: [\"websocket\"],\n timeout: timeoutMs,\n });\n\n const connectMessage: IConnect = {\n client,\n id,\n mode: client.mode,\n tenantId,\n token, // Token is going to indicate tenant level information, etc...\n versions: protocolVersions,\n relayUserAgent: [client.details.environment, ` driverVersion:${driverVersion}`].join(\";\"),\n };\n\n // TODO: expose to host at factory level\n const enableLongPollingDowngrades = true;\n const deltaConnection = new R11sDocumentDeltaConnection(socket, id, logger, enableLongPollingDowngrades);\n\n await deltaConnection.initialize(connectMessage, timeoutMs);\n return deltaConnection;\n }\n\n /**\n * Error raising for socket.io issues\n */\n protected createErrorObject(handler: string, error?: any, canRetry = true): IAnyDriverError {\n // Note: we suspect the incoming error object is either:\n // - a socketError: add it to the R11sError object for driver to be able to parse it and reason over it.\n // - anything else: let base class handle it\n return canRetry && Number.isInteger(error?.code) && typeof error?.message === \"string\"\n ? errorObjectFromSocketError(error as IR11sSocketError, handler)\n : super.createErrorObject(handler, error, canRetry);\n }\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -3,11 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export * from "./defaultTokenProvider";
6
- export * from "./deltaStorageService";
7
- export * from "./documentService";
6
+ export * from "./tokens";
8
7
  export * from "./documentServiceFactory";
9
- export * from "./documentStorageService";
10
- export * from "./nullBlobStorageService";
11
8
  export * from "./policies";
12
- export * from "./tokens";
13
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AAGzB,cAAc,0BAA0B,CAAC;AAGzC,cAAc,YAAY,CAAC"}
package/lib/index.js CHANGED
@@ -2,12 +2,11 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ // Tokens
5
6
  export * from "./defaultTokenProvider";
6
- export * from "./deltaStorageService";
7
- export * from "./documentService";
7
+ export * from "./tokens";
8
+ // Factory
8
9
  export * from "./documentServiceFactory";
9
- export * from "./documentStorageService";
10
- export * from "./nullBlobStorageService";
10
+ // Configuration
11
11
  export * from "./policies";
12
- export * from "./tokens";
13
12
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport * from \"./defaultTokenProvider\";\nexport * from \"./deltaStorageService\";\nexport * from \"./documentService\";\nexport * from \"./documentServiceFactory\";\nexport * from \"./documentStorageService\";\nexport * from \"./nullBlobStorageService\";\nexport * from \"./policies\";\nexport * from \"./tokens\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,SAAS;AACT,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AAEzB,UAAU;AACV,cAAc,0BAA0B,CAAC;AAEzC,gBAAgB;AAChB,cAAc,YAAY,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Tokens\nexport * from \"./defaultTokenProvider\";\nexport * from \"./tokens\";\n\n// Factory\nexport * from \"./documentServiceFactory\";\n\n// Configuration\nexport * from \"./policies\";\n"]}
@@ -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/routerlicious-driver";
8
- export declare const pkgVersion = "2.0.0-internal.1.4.2";
8
+ export declare const pkgVersion = "2.0.0-internal.2.0.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/routerlicious-driver";
8
- export const pkgVersion = "2.0.0-internal.1.4.2";
8
+ export const pkgVersion = "2.0.0-internal.2.0.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sCAAsC,CAAC;AAC9D,MAAM,CAAC,MAAM,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/routerlicious-driver\";\nexport const pkgVersion = \"2.0.0-internal.1.4.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sCAAsC,CAAC;AAC9D,MAAM,CAAC,MAAM,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/routerlicious-driver\";\nexport const pkgVersion = \"2.0.0-internal.2.0.0\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/routerlicious-driver",
3
- "version": "2.0.0-internal.1.4.2",
3
+ "version": "2.0.0-internal.2.0.0",
4
4
  "description": "Socket.IO + Git implementation of Fluid service API",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -62,14 +62,14 @@
62
62
  "dependencies": {
63
63
  "@fluidframework/common-definitions": "^0.20.1",
64
64
  "@fluidframework/common-utils": "^1.0.0",
65
- "@fluidframework/driver-base": "^2.0.0-internal.1.4.2",
66
- "@fluidframework/driver-definitions": "^2.0.0-internal.1.4.2",
67
- "@fluidframework/driver-utils": "^2.0.0-internal.1.4.2",
68
- "@fluidframework/gitresources": "^0.1037.2001",
69
- "@fluidframework/protocol-base": "^0.1037.2001",
70
- "@fluidframework/protocol-definitions": "^1.0.0",
71
- "@fluidframework/server-services-client": "^0.1037.2001",
72
- "@fluidframework/telemetry-utils": "^2.0.0-internal.1.4.2",
65
+ "@fluidframework/driver-base": "^2.0.0-internal.2.0.0",
66
+ "@fluidframework/driver-definitions": "^2.0.0-internal.2.0.0",
67
+ "@fluidframework/driver-utils": "^2.0.0-internal.2.0.0",
68
+ "@fluidframework/gitresources": "^0.1038.2000",
69
+ "@fluidframework/protocol-base": "^0.1038.2000",
70
+ "@fluidframework/protocol-definitions": "^1.1.0",
71
+ "@fluidframework/server-services-client": "^0.1038.2000",
72
+ "@fluidframework/telemetry-utils": "^2.0.0-internal.2.0.0",
73
73
  "cross-fetch": "^3.1.5",
74
74
  "json-stringify-safe": "5.0.1",
75
75
  "querystring": "^0.2.0",
@@ -79,10 +79,10 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@fluidframework/build-common": "^1.0.0",
82
- "@fluidframework/build-tools": "^0.4.4000",
82
+ "@fluidframework/build-tools": "^0.4.6000",
83
83
  "@fluidframework/eslint-config-fluid": "^1.0.0",
84
- "@fluidframework/mocha-test-setup": "^2.0.0-internal.1.4.2",
85
- "@fluidframework/routerlicious-driver-previous": "npm:@fluidframework/routerlicious-driver@^1.0.0",
84
+ "@fluidframework/mocha-test-setup": "^2.0.0-internal.2.0.0",
85
+ "@fluidframework/routerlicious-driver-previous": "npm:@fluidframework/routerlicious-driver@>=2.0.0-internal.1.4.0 <2.0.0-internal.2.0.0",
86
86
  "@microsoft/api-extractor": "^7.22.2",
87
87
  "@rushstack/eslint-config": "^2.5.1",
88
88
  "@types/mocha": "^9.1.1",
@@ -104,8 +104,25 @@
104
104
  "typeValidation": {
105
105
  "version": "2.0.0",
106
106
  "broken": {
107
- "InterfaceDeclaration_IRouterliciousDriverPolicies": {
108
- "forwardCompat": false
107
+ "RemovedClassDeclaration_DeltaStorageService": {
108
+ "forwardCompat": false,
109
+ "backCompat": false
110
+ },
111
+ "RemovedClassDeclaration_DocumentDeltaStorageService": {
112
+ "forwardCompat": false,
113
+ "backCompat": false
114
+ },
115
+ "RemovedClassDeclaration_DocumentService": {
116
+ "forwardCompat": false,
117
+ "backCompat": false
118
+ },
119
+ "RemovedClassDeclaration_DocumentStorageService": {
120
+ "forwardCompat": false,
121
+ "backCompat": false
122
+ },
123
+ "RemovedClassDeclaration_NullBlobStorageService": {
124
+ "forwardCompat": false,
125
+ "backCompat": false
109
126
  }
110
127
  }
111
128
  }
@@ -11,9 +11,8 @@ import {
11
11
  } from "@fluidframework/driver-definitions";
12
12
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
13
13
  import { readAndParse, requestOps, emptyMessageStream } from "@fluidframework/driver-utils";
14
- import { TelemetryNullLogger } from "@fluidframework/common-utils";
15
14
  import { ITelemetryLogger } from "@fluidframework/common-definitions";
16
- import { PerformanceEvent } from "@fluidframework/telemetry-utils";
15
+ import { PerformanceEvent, TelemetryNullLogger } from "@fluidframework/telemetry-utils";
17
16
  import { RestWrapper } from "@fluidframework/server-services-client";
18
17
  import { DocumentStorageService } from "./documentStorageService";
19
18
 
@@ -5,8 +5,7 @@
5
5
 
6
6
  import { ITelemetryLogger } from "@fluidframework/common-definitions";
7
7
  import { DocumentDeltaConnection } from "@fluidframework/driver-base";
8
- import { IDocumentDeltaConnection } from "@fluidframework/driver-definitions";
9
- import { IAnyDriverError } from "@fluidframework/driver-utils";
8
+ import { IAnyDriverError, IDocumentDeltaConnection } from "@fluidframework/driver-definitions";
10
9
  import { IClient, IConnect } from "@fluidframework/protocol-definitions";
11
10
  import type { io as SocketIOClientStatic } from "socket.io-client";
12
11
  import { errorObjectFromSocketError, IR11sSocketError } from "./errorUtils";
package/src/index.ts CHANGED
@@ -3,11 +3,12 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ // Tokens
6
7
  export * from "./defaultTokenProvider";
7
- export * from "./deltaStorageService";
8
- export * from "./documentService";
8
+ export * from "./tokens";
9
+
10
+ // Factory
9
11
  export * from "./documentServiceFactory";
10
- export * from "./documentStorageService";
11
- export * from "./nullBlobStorageService";
12
+
13
+ // Configuration
12
14
  export * from "./policies";
13
- export * from "./tokens";
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/routerlicious-driver";
9
- export const pkgVersion = "2.0.0-internal.1.4.2";
9
+ export const pkgVersion = "2.0.0-internal.2.0.0";