@fluidframework/odsp-driver 2.110.0 → 2.111.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.
Files changed (109) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-report/odsp-driver.legacy.beta.api.md +2 -2
  3. package/dist/WriteBufferUtils.d.ts.map +1 -1
  4. package/dist/WriteBufferUtils.js +1 -1
  5. package/dist/WriteBufferUtils.js.map +1 -1
  6. package/dist/fetchSnapshot.d.ts +2 -3
  7. package/dist/fetchSnapshot.d.ts.map +1 -1
  8. package/dist/fetchSnapshot.js +4 -5
  9. package/dist/fetchSnapshot.js.map +1 -1
  10. package/dist/getFileLink.js +1 -1
  11. package/dist/getFileLink.js.map +1 -1
  12. package/dist/localOdspDriver/localOdspDocumentService.d.ts +1 -1
  13. package/dist/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
  14. package/dist/localOdspDriver/localOdspDocumentService.js +1 -1
  15. package/dist/localOdspDriver/localOdspDocumentService.js.map +1 -1
  16. package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts +1 -3
  17. package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
  18. package/dist/localOdspDriver/localOdspDocumentServiceFactory.js +1 -1
  19. package/dist/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
  20. package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts +2 -2
  21. package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
  22. package/dist/localOdspDriver/localOdspDocumentStorageManager.js +1 -1
  23. package/dist/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
  24. package/dist/odspDelayLoadedDeltaStream.d.ts +1 -1
  25. package/dist/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  26. package/dist/odspDelayLoadedDeltaStream.js +2 -2
  27. package/dist/odspDelayLoadedDeltaStream.js.map +1 -1
  28. package/dist/odspDocumentDeltaConnection.d.ts.map +1 -1
  29. package/dist/odspDocumentDeltaConnection.js +4 -4
  30. package/dist/odspDocumentDeltaConnection.js.map +1 -1
  31. package/dist/odspDocumentStorageManager.d.ts.map +1 -1
  32. package/dist/odspDocumentStorageManager.js +3 -3
  33. package/dist/odspDocumentStorageManager.js.map +1 -1
  34. package/dist/odspDocumentStorageServiceBase.d.ts +2 -2
  35. package/dist/odspDocumentStorageServiceBase.d.ts.map +1 -1
  36. package/dist/odspDocumentStorageServiceBase.js +1 -1
  37. package/dist/odspDocumentStorageServiceBase.js.map +1 -1
  38. package/dist/packageVersion.d.ts +1 -1
  39. package/dist/packageVersion.js +1 -1
  40. package/dist/packageVersion.js.map +1 -1
  41. package/dist/prefetchLatestSnapshot.d.ts +5 -5
  42. package/dist/prefetchLatestSnapshot.d.ts.map +1 -1
  43. package/dist/prefetchLatestSnapshot.js +6 -6
  44. package/dist/prefetchLatestSnapshot.js.map +1 -1
  45. package/dist/zipItDataRepresentationUtils.d.ts +1 -1
  46. package/dist/zipItDataRepresentationUtils.d.ts.map +1 -1
  47. package/dist/zipItDataRepresentationUtils.js +2 -2
  48. package/dist/zipItDataRepresentationUtils.js.map +1 -1
  49. package/lib/WriteBufferUtils.d.ts.map +1 -1
  50. package/lib/WriteBufferUtils.js +1 -1
  51. package/lib/WriteBufferUtils.js.map +1 -1
  52. package/lib/fetchSnapshot.d.ts +2 -3
  53. package/lib/fetchSnapshot.d.ts.map +1 -1
  54. package/lib/fetchSnapshot.js +4 -5
  55. package/lib/fetchSnapshot.js.map +1 -1
  56. package/lib/getFileLink.js +1 -1
  57. package/lib/getFileLink.js.map +1 -1
  58. package/lib/localOdspDriver/localOdspDocumentService.d.ts +1 -1
  59. package/lib/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
  60. package/lib/localOdspDriver/localOdspDocumentService.js +1 -1
  61. package/lib/localOdspDriver/localOdspDocumentService.js.map +1 -1
  62. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts +1 -3
  63. package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
  64. package/lib/localOdspDriver/localOdspDocumentServiceFactory.js +1 -1
  65. package/lib/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
  66. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts +2 -2
  67. package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
  68. package/lib/localOdspDriver/localOdspDocumentStorageManager.js +1 -1
  69. package/lib/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
  70. package/lib/odspDelayLoadedDeltaStream.d.ts +1 -1
  71. package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -1
  72. package/lib/odspDelayLoadedDeltaStream.js +2 -2
  73. package/lib/odspDelayLoadedDeltaStream.js.map +1 -1
  74. package/lib/odspDocumentDeltaConnection.d.ts.map +1 -1
  75. package/lib/odspDocumentDeltaConnection.js +4 -4
  76. package/lib/odspDocumentDeltaConnection.js.map +1 -1
  77. package/lib/odspDocumentStorageManager.d.ts.map +1 -1
  78. package/lib/odspDocumentStorageManager.js +3 -3
  79. package/lib/odspDocumentStorageManager.js.map +1 -1
  80. package/lib/odspDocumentStorageServiceBase.d.ts +2 -2
  81. package/lib/odspDocumentStorageServiceBase.d.ts.map +1 -1
  82. package/lib/odspDocumentStorageServiceBase.js +1 -1
  83. package/lib/odspDocumentStorageServiceBase.js.map +1 -1
  84. package/lib/packageVersion.d.ts +1 -1
  85. package/lib/packageVersion.js +1 -1
  86. package/lib/packageVersion.js.map +1 -1
  87. package/lib/prefetchLatestSnapshot.d.ts +5 -5
  88. package/lib/prefetchLatestSnapshot.d.ts.map +1 -1
  89. package/lib/prefetchLatestSnapshot.js +6 -6
  90. package/lib/prefetchLatestSnapshot.js.map +1 -1
  91. package/lib/zipItDataRepresentationUtils.d.ts +1 -1
  92. package/lib/zipItDataRepresentationUtils.d.ts.map +1 -1
  93. package/lib/zipItDataRepresentationUtils.js +2 -2
  94. package/lib/zipItDataRepresentationUtils.js.map +1 -1
  95. package/package.json +14 -18
  96. package/src/WriteBufferUtils.ts +1 -5
  97. package/src/fetchSnapshot.ts +2 -5
  98. package/src/getFileLink.ts +1 -1
  99. package/src/localOdspDriver/localOdspDocumentService.ts +1 -1
  100. package/src/localOdspDriver/localOdspDocumentServiceFactory.ts +1 -8
  101. package/src/localOdspDriver/localOdspDocumentStorageManager.ts +1 -2
  102. package/src/odspDelayLoadedDeltaStream.ts +2 -2
  103. package/src/odspDocumentDeltaConnection.ts +2 -4
  104. package/src/odspDocumentStorageManager.ts +0 -3
  105. package/src/odspDocumentStorageServiceBase.ts +2 -2
  106. package/src/packageVersion.ts +1 -1
  107. package/src/prefetchLatestSnapshot.ts +7 -8
  108. package/src/zipItDataRepresentationUtils.ts +2 -7
  109. package/tsconfig.json +2 -1
@@ -85,7 +85,6 @@ export enum SnapshotFormatSupportType {
85
85
  * @param snapshotUrl - snapshot url from where the odsp snapshot will be fetched
86
86
  * @param versionId - id of specific snapshot to be fetched
87
87
  * @param fetchFullSnapshot - whether we want to fetch full snapshot(with blobs)
88
- * @param forceAccessTokenViaAuthorizationHeader - Deprecated and not used, true value always used instead. Whether to force passing given token via authorization header
89
88
  * @param snapshotDownloader - Implementation of the get/post methods used to fetch the snapshot. snapshotDownloader is responsible for generating the appropriate headers (including Authorization header) as well as handling any token refreshes before retrying.
90
89
  * @returns A promise of the snapshot and the status code of the response
91
90
  */
@@ -93,7 +92,6 @@ export async function fetchSnapshot(
93
92
  snapshotUrl: string,
94
93
  versionId: string,
95
94
  fetchFullSnapshot: boolean,
96
- forceAccessTokenViaAuthorizationHeader: boolean,
97
95
  logger: TelemetryLoggerExt,
98
96
  snapshotDownloader: (url: string) => Promise<IOdspResponse<unknown>>,
99
97
  ): Promise<ISnapshot> {
@@ -120,7 +118,6 @@ export async function fetchSnapshotWithRedeem(
120
118
  odspResolvedUrl: IOdspResolvedUrl,
121
119
  storageTokenFetcher: InstrumentedStorageTokenFetcher,
122
120
  snapshotOptions: ISnapshotOptions | undefined,
123
- forceAccessTokenViaAuthorizationHeader: boolean,
124
121
  logger: TelemetryLoggerExt,
125
122
  snapshotDownloader: (
126
123
  finalOdspResolvedUrl: IOdspResolvedUrl,
@@ -411,7 +408,7 @@ async function fetchLatestSnapshotCore(
411
408
  }
412
409
  return res;
413
410
  })
414
- .catch((error) =>
411
+ .catch((_error) =>
415
412
  // Parsing can fail and message could contain full request URI, including
416
413
  // tokens, etc. So do not log error object itself.
417
414
  throwOdspNetworkError(
@@ -455,7 +452,7 @@ async function fetchLatestSnapshotCore(
455
452
  }
456
453
  return res;
457
454
  })
458
- .catch((error) =>
455
+ .catch((_error) =>
459
456
  // Parsing can fail and message could contain full request URI, including
460
457
  // tokens, etc. So do not log error object itself.
461
458
  throwOdspNetworkError(
@@ -72,7 +72,7 @@ export const getFileLink = mockify(
72
72
  {
73
73
  // TODO: use a stronger type
74
74
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
- onRetry(delayInMs: number, error: any) {
75
+ onRetry(_delayInMs: number, error: any) {
76
76
  retryCount++;
77
77
  if (retryCount === 5) {
78
78
  if (error !== undefined && typeof error === "object") {
@@ -58,7 +58,7 @@ export class LocalOdspDocumentService
58
58
  throw toThrow;
59
59
  }
60
60
 
61
- public dispose(error?: unknown): void {
61
+ public dispose(): void {
62
62
  // Do nothing
63
63
  }
64
64
  }
@@ -3,8 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import type { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
7
- import type { ISummaryTree } from "@fluidframework/driver-definitions";
8
6
  import type {
9
7
  IDocumentService,
10
8
  IResolvedUrl,
@@ -42,12 +40,7 @@ export class LocalOdspDocumentServiceFactory extends OdspDocumentServiceFactoryC
42
40
  throw toThrow;
43
41
  }
44
42
 
45
- public createContainer(
46
- _createNewSummary: ISummaryTree | undefined,
47
- _createNewResolvedUrl: IResolvedUrl,
48
- logger?: ITelemetryBaseLogger,
49
- _clientIsSummarizer?: boolean,
50
- ): never {
43
+ public createContainer(): never {
51
44
  const toThrow = new UsageError(
52
45
  '"createContainer" is not supported by LocalOdspDocumentServiceFactory',
53
46
  );
@@ -7,7 +7,6 @@ import { assert } from "@fluidframework/core-utils/internal";
7
7
  import type { ISummaryTree } from "@fluidframework/driver-definitions";
8
8
  import type {
9
9
  ISnapshot,
10
- ISnapshotFetchOptions,
11
10
  ISummaryContext,
12
11
  IVersion,
13
12
  } from "@fluidframework/driver-definitions/internal";
@@ -66,7 +65,7 @@ export class LocalOdspDocumentStorageService extends OdspDocumentStorageServiceB
66
65
  return this.getSnapshotVersion();
67
66
  }
68
67
 
69
- public async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {
68
+ public async getSnapshot(): Promise<ISnapshot> {
70
69
  this.throwUsageError("getSnapshot");
71
70
  }
72
71
 
@@ -214,7 +214,7 @@ export class OdspDelayLoadedDeltaStream {
214
214
  websocketEndpoint.deltaStreamSocketUrl,
215
215
  connectionId,
216
216
  );
217
- connection.on("op", (documentId, ops: ISequencedDocumentMessage[]) => {
217
+ connection.on("op", (_documentId, ops: ISequencedDocumentMessage[]) => {
218
218
  this.opsReceived(ops);
219
219
  });
220
220
  connection.on("signal", this.signalHandler);
@@ -573,7 +573,7 @@ export class OdspDelayLoadedDeltaStream {
573
573
  return connection;
574
574
  }
575
575
 
576
- public dispose(error?: unknown): void {
576
+ public dispose(): void {
577
577
  this.clearJoinSessionTimer();
578
578
  this.currentConnection?.dispose();
579
579
  delete this.currentConnection;
@@ -67,7 +67,7 @@ class SocketReference extends TypedEventEmitter<ISocketEvents> {
67
67
  // Map of all existing socket io sockets. [url, tenantId, documentId] -> socket
68
68
  private static readonly socketIoSockets: Map<string, SocketReference> = new Map();
69
69
 
70
- public static find(key: string, logger: TelemetryLoggerExt): SocketReference | undefined {
70
+ public static find(key: string): SocketReference | undefined {
71
71
  const socketReference = SocketReference.socketIoSockets.get(key);
72
72
 
73
73
  // Verify the socket is healthy before reusing it
@@ -279,7 +279,6 @@ export class OdspDocumentDeltaConnection extends DocumentDeltaConnection {
279
279
  enableMultiplexing,
280
280
  tenantId,
281
281
  documentId,
282
- telemetryLogger,
283
282
  );
284
283
 
285
284
  const socket = socketReference.socket;
@@ -389,10 +388,9 @@ export class OdspDocumentDeltaConnection extends DocumentDeltaConnection {
389
388
  enableMultiplexing: boolean,
390
389
  tenantId: string,
391
390
  documentId: string,
392
- logger: TelemetryLoggerExt,
393
391
  ): SocketReference {
394
392
  // eslint-disable-next-line unicorn/no-array-method-this-argument
395
- const existingSocketReference = SocketReference.find(key, logger);
393
+ const existingSocketReference = SocketReference.find(key);
396
394
  if (existingSocketReference) {
397
395
  return existingSocketReference;
398
396
  }
@@ -662,7 +662,6 @@ export class OdspDocumentStorageService extends OdspDocumentStorageServiceBase {
662
662
  this.odspResolvedUrl,
663
663
  this.getAuthHeader,
664
664
  snapshotOptions,
665
- !!this.hostPolicy.sessionOptions?.forceAccessTokenViaAuthorizationHeader,
666
665
  this.logger,
667
666
  snapshotDownloader,
668
667
  putInCache,
@@ -704,7 +703,6 @@ export class OdspDocumentStorageService extends OdspDocumentStorageServiceBase {
704
703
  this.odspResolvedUrl,
705
704
  this.getAuthHeader,
706
705
  snapshotOptionsWithoutBlobs,
707
- !!this.hostPolicy.sessionOptions?.forceAccessTokenViaAuthorizationHeader,
708
706
  this.logger,
709
707
  snapshotDownloader,
710
708
  putInCache,
@@ -886,7 +884,6 @@ export class OdspDocumentStorageService extends OdspDocumentStorageServiceBase {
886
884
  this.snapshotUrl!,
887
885
  id,
888
886
  this.fetchFullSnapshot,
889
- !!this.hostPolicy.sessionOptions?.forceAccessTokenViaAuthorizationHeader,
890
887
  this.logger,
891
888
  snapshotDownloader,
892
889
  );
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils/internal";
7
- import type { ISummaryHandle, ISummaryTree } from "@fluidframework/driver-definitions";
7
+ import type { ISummaryTree } from "@fluidframework/driver-definitions";
8
8
  import {
9
9
  type FetchSource,
10
10
  type FiveDaysMs,
@@ -227,7 +227,7 @@ export abstract class OdspDocumentStorageServiceBase implements IDocumentStorage
227
227
  context: ISummaryContext,
228
228
  ): Promise<string>;
229
229
 
230
- public async downloadSummary(commit: ISummaryHandle): Promise<ISummaryTree> {
230
+ public async downloadSummary(): Promise<ISummaryTree> {
231
231
  throw new Error("Not implemented yet");
232
232
  }
233
233
 
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/odsp-driver";
9
- export const pkgVersion = "2.110.0";
9
+ export const pkgVersion = "2.111.0";
@@ -43,22 +43,22 @@ import {
43
43
  } from "./odspUtils.js";
44
44
 
45
45
  /**
46
- * Function to prefetch the snapshot and cached it in the persistant cache, so that when the container is loaded
46
+ * Function to prefetch the snapshot and cached it in the persistent cache, so that when the container is loaded
47
47
  * the cached latest snapshot could be used and removes the network call from the critical path.
48
48
  *
49
49
  * @param resolvedUrl - Resolved url to fetch the snapshot.
50
50
  * @param getStorageToken - function that can provide the storage token for a given site. This is
51
51
  * is also referred to as the "VROOM" token in SPO.
52
52
  * @param persistedCache - Cache to store the fetched snapshot.
53
- * @param forceAccessTokenViaAuthorizationHeader - @deprecated Not used, true value always used instead. Whether to force passing given token via authorization header.
53
+ * @param _forceAccessTokenViaAuthorizationHeader - Deprecated and not used.
54
54
  * @param logger - Logger to have telemetry events.
55
55
  * @param hostSnapshotFetchOptions - Options to fetch the snapshot if any. Otherwise default will be used.
56
56
  * @param enableRedeemFallback - True to have the sharing link redeem fallback in case the Trees Latest/Redeem
57
57
  * 1RT call fails with redeem error. During fallback it will first redeem the sharing link and then make
58
58
  * the Trees latest call.
59
59
  * Note: this can be considered deprecated - it will be replaced with `snapshotFormatFetchType`.
60
- * @param fetchBinarySnapshotFormat - Control if we want to fetch binary format snapshot.
61
- * @param snapshotFormatFetchType - Snapshot format to fetch.
60
+ * @param _fetchBinarySnapshotFormat - Deprecated and not used.
61
+ * @param _snapshotFormatFetchType - Deprecated and not used.
62
62
  * @param odspDocumentServiceFactory - factory to access the non persistent cache and store the prefetch promise.
63
63
  *
64
64
  * @returns `true` if the snapshot is cached, `false` otherwise.
@@ -69,12 +69,12 @@ export async function prefetchLatestSnapshot(
69
69
  resolvedUrl: IResolvedUrl,
70
70
  getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>,
71
71
  persistedCache: IPersistedCache,
72
- forceAccessTokenViaAuthorizationHeader: boolean,
72
+ _forceAccessTokenViaAuthorizationHeader: boolean,
73
73
  logger: ITelemetryBaseLogger,
74
74
  hostSnapshotFetchOptions: ISnapshotOptions | undefined,
75
75
  enableRedeemFallback: boolean = true,
76
- fetchBinarySnapshotFormat?: boolean,
77
- snapshotFormatFetchType?: SnapshotFormatSupportType,
76
+ _fetchBinarySnapshotFormat?: boolean,
77
+ _snapshotFormatFetchType?: SnapshotFormatSupportType,
78
78
  odspDocumentServiceFactory?: OdspDocumentServiceFactory,
79
79
  ): Promise<boolean> {
80
80
  const mc = createChildMonitoringContext({ logger, namespace: "PrefetchSnapshot" });
@@ -144,7 +144,6 @@ export async function prefetchLatestSnapshot(
144
144
  odspResolvedUrl,
145
145
  getAuthHeader,
146
146
  hostSnapshotFetchOptions,
147
- forceAccessTokenViaAuthorizationHeader,
148
147
  odspLogger,
149
148
  snapshotDownloader,
150
149
  putInCache,
@@ -414,9 +414,7 @@ export class NodeCore {
414
414
  durationStructure: number;
415
415
  durationStrings: number;
416
416
  } {
417
- const [stringsToResolve, durationStructure] = measure(() =>
418
- this.loadStructure(buffer, logger),
419
- );
417
+ const [stringsToResolve, durationStructure] = measure(() => this.loadStructure(buffer));
420
418
  const [, durationStrings] = measure(() =>
421
419
  this.loadStrings(buffer, stringsToResolve, logger),
422
420
  );
@@ -427,10 +425,7 @@ export class NodeCore {
427
425
  * Load and parse the buffer into a tree.
428
426
  * @param buffer - buffer to read from.
429
427
  */
430
- protected loadStructure(
431
- buffer: ReadBuffer,
432
- logger: TelemetryLoggerExt,
433
- ): IStringElementInternal[] {
428
+ protected loadStructure(buffer: ReadBuffer): IStringElementInternal[] {
434
429
  const stack: NodeTypes[][] = [];
435
430
  const stringsToResolve: IStringElementInternal[] = [];
436
431
  const dictionary: IStringElement[] = [];
package/tsconfig.json CHANGED
@@ -5,7 +5,8 @@
5
5
  "compilerOptions": {
6
6
  "rootDir": "./src",
7
7
  "outDir": "./lib",
8
- // As of 2026-06-18, there are 47 errors enableing exactOptionalPropertyTypes.
8
+ "noUnusedParameters": true,
9
+ // As of 2026-06-18, there are 47 errors enabling exactOptionalPropertyTypes.
9
10
  "exactOptionalPropertyTypes": false,
10
11
  // TODO: AB#34163 Enable noUncheckedIndexedAccess for packages/drivers/odsp-driver
11
12
  "noUncheckedIndexedAccess": false,