@fluidframework/odsp-driver 2.53.0 → 2.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/api-report/{odsp-driver.legacy.alpha.api.md → odsp-driver.legacy.beta.api.md} +31 -31
- package/dist/checkUrl.d.ts +1 -1
- package/dist/checkUrl.js +1 -1
- package/dist/checkUrl.js.map +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +2 -2
- package/dist/constants.js.map +1 -1
- package/dist/contractsPublic.d.ts +1 -1
- package/dist/contractsPublic.js.map +1 -1
- package/dist/createOdspCreateContainerRequest.d.ts +1 -1
- package/dist/createOdspCreateContainerRequest.js +1 -1
- package/dist/createOdspCreateContainerRequest.js.map +1 -1
- package/dist/createOdspUrl.d.ts +1 -1
- package/dist/createOdspUrl.js +1 -1
- package/dist/createOdspUrl.js.map +1 -1
- package/dist/epochTracker.d.ts +4 -4
- package/dist/epochTracker.js +1 -1
- package/dist/epochTracker.js.map +1 -1
- package/dist/fetchSnapshot.d.ts +1 -1
- package/dist/fetchSnapshot.js +1 -1
- package/dist/fetchSnapshot.js.map +1 -1
- package/dist/getFileLink.js +1 -1
- package/dist/getFileLink.js.map +1 -1
- package/dist/odspCache.d.ts +4 -4
- package/dist/odspCache.js.map +1 -1
- package/dist/odspDocumentService.d.ts.map +1 -1
- package/dist/odspDocumentService.js +4 -4
- package/dist/odspDocumentService.js.map +1 -1
- package/dist/odspDocumentServiceFactory.d.ts +2 -2
- package/dist/odspDocumentServiceFactory.js +2 -2
- package/dist/odspDocumentServiceFactory.js.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.d.ts +1 -1
- package/dist/odspDocumentServiceFactoryCore.js +1 -1
- package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
- package/dist/odspDriverUrlResolver.d.ts +1 -1
- package/dist/odspDriverUrlResolver.js +1 -1
- package/dist/odspDriverUrlResolver.js.map +1 -1
- package/dist/odspDriverUrlResolverForShareLink.d.ts +2 -2
- package/dist/odspDriverUrlResolverForShareLink.js +1 -1
- package/dist/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/dist/odspFluidFileLink.d.ts +4 -4
- package/dist/odspFluidFileLink.js +4 -4
- package/dist/odspFluidFileLink.js.map +1 -1
- package/dist/odspPublicUtils.d.ts +2 -2
- package/dist/odspPublicUtils.js +1 -1
- package/dist/odspPublicUtils.js.map +1 -1
- package/dist/odspUtils.d.ts +2 -2
- package/dist/odspUtils.js +1 -1
- package/dist/odspUtils.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/prefetchLatestSnapshot.d.ts +1 -1
- package/dist/prefetchLatestSnapshot.js +1 -1
- package/dist/prefetchLatestSnapshot.js.map +1 -1
- package/lib/checkUrl.d.ts +1 -1
- package/lib/checkUrl.js +1 -1
- package/lib/checkUrl.js.map +1 -1
- package/lib/constants.d.ts +2 -2
- package/lib/constants.js +2 -2
- package/lib/constants.js.map +1 -1
- package/lib/contractsPublic.d.ts +1 -1
- package/lib/contractsPublic.js.map +1 -1
- package/lib/createOdspCreateContainerRequest.d.ts +1 -1
- package/lib/createOdspCreateContainerRequest.js +1 -1
- package/lib/createOdspCreateContainerRequest.js.map +1 -1
- package/lib/createOdspUrl.d.ts +1 -1
- package/lib/createOdspUrl.js +1 -1
- package/lib/createOdspUrl.js.map +1 -1
- package/lib/epochTracker.d.ts +4 -4
- package/lib/epochTracker.js +1 -1
- package/lib/epochTracker.js.map +1 -1
- package/lib/fetchSnapshot.d.ts +1 -1
- package/lib/fetchSnapshot.js +1 -1
- package/lib/fetchSnapshot.js.map +1 -1
- package/lib/getFileLink.js +1 -1
- package/lib/getFileLink.js.map +1 -1
- package/lib/odspCache.d.ts +4 -4
- package/lib/odspCache.js.map +1 -1
- package/lib/odspDocumentService.d.ts.map +1 -1
- package/lib/odspDocumentService.js +4 -4
- package/lib/odspDocumentService.js.map +1 -1
- package/lib/odspDocumentServiceFactory.d.ts +2 -2
- package/lib/odspDocumentServiceFactory.js +2 -2
- package/lib/odspDocumentServiceFactory.js.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.d.ts +1 -1
- package/lib/odspDocumentServiceFactoryCore.js +1 -1
- package/lib/odspDocumentServiceFactoryCore.js.map +1 -1
- package/lib/odspDriverUrlResolver.d.ts +1 -1
- package/lib/odspDriverUrlResolver.js +1 -1
- package/lib/odspDriverUrlResolver.js.map +1 -1
- package/lib/odspDriverUrlResolverForShareLink.d.ts +2 -2
- package/lib/odspDriverUrlResolverForShareLink.js +1 -1
- package/lib/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/lib/odspFluidFileLink.d.ts +4 -4
- package/lib/odspFluidFileLink.js +4 -4
- package/lib/odspFluidFileLink.js.map +1 -1
- package/lib/odspPublicUtils.d.ts +2 -2
- package/lib/odspPublicUtils.js +1 -1
- package/lib/odspPublicUtils.js.map +1 -1
- package/lib/odspUtils.d.ts +2 -2
- package/lib/odspUtils.js +1 -1
- package/lib/odspUtils.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/prefetchLatestSnapshot.d.ts +1 -1
- package/lib/prefetchLatestSnapshot.js +1 -1
- package/lib/prefetchLatestSnapshot.js.map +1 -1
- package/package.json +13 -13
- package/src/checkUrl.ts +1 -1
- package/src/constants.ts +2 -2
- package/src/contractsPublic.ts +1 -1
- package/src/createOdspCreateContainerRequest.ts +1 -1
- package/src/createOdspUrl.ts +1 -1
- package/src/epochTracker.ts +4 -4
- package/src/fetchSnapshot.ts +1 -1
- package/src/getFileLink.ts +1 -1
- package/src/odspCache.ts +4 -4
- package/src/odspDocumentService.ts +5 -4
- package/src/odspDocumentServiceFactory.ts +2 -2
- package/src/odspDocumentServiceFactoryCore.ts +1 -1
- package/src/odspDriverUrlResolver.ts +1 -1
- package/src/odspDriverUrlResolverForShareLink.ts +2 -2
- package/src/odspFluidFileLink.ts +4 -4
- package/src/odspPublicUtils.ts +2 -2
- package/src/odspUtils.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/prefetchLatestSnapshot.ts +1 -1
|
@@ -225,10 +225,11 @@ export class OdspDocumentService
|
|
|
225
225
|
async (from, to, telemetryProps, fetchReason) =>
|
|
226
226
|
service.get(from, to, telemetryProps, fetchReason),
|
|
227
227
|
// Get cachedOps Callback.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
// TODO AB#47218: This condition will be removed when file version can be read from the cache entry for an op.
|
|
229
|
+
this.odspResolvedUrl.fileVersion === undefined
|
|
230
|
+
? async (from, to) =>
|
|
231
|
+
((await this.opsCache?.get(from, to)) as ISequencedDocumentMessage[]) ?? []
|
|
232
|
+
: async () => [],
|
|
232
233
|
// Ops requestFromSocket Callback.
|
|
233
234
|
(from, to) => {
|
|
234
235
|
const currentConnection = this.odspDelayLoadedDeltaStream?.currentDeltaConnection;
|
|
@@ -19,7 +19,7 @@ import { OdspDocumentServiceFactoryCore } from "./odspDocumentServiceFactoryCore
|
|
|
19
19
|
* Factory for creating the sharepoint document service. Use this if you want to
|
|
20
20
|
* use the sharepoint implementation.
|
|
21
21
|
* @legacy
|
|
22
|
-
* @
|
|
22
|
+
* @beta
|
|
23
23
|
*/
|
|
24
24
|
export class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {
|
|
25
25
|
constructor(
|
|
@@ -39,7 +39,7 @@ export class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {
|
|
|
39
39
|
* content directly.
|
|
40
40
|
*
|
|
41
41
|
* @legacy
|
|
42
|
-
* @
|
|
42
|
+
* @beta
|
|
43
43
|
*/
|
|
44
44
|
export function createLocalOdspDocumentServiceFactory(
|
|
45
45
|
localSnapshot: Uint8Array | string,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
* This constructor should be used by environments that support dynamic imports and that wish
|
|
61
61
|
* to leverage code splitting as a means to keep bundles as small as possible.
|
|
62
62
|
* @legacy
|
|
63
|
-
* @
|
|
63
|
+
* @beta
|
|
64
64
|
*/
|
|
65
65
|
export class OdspDocumentServiceFactoryCore
|
|
66
66
|
implements IDocumentServiceFactory, IRelaySessionAwareDriverFactory
|
|
@@ -94,7 +94,7 @@ const isFluidPackage = (pkg: Record<string, unknown>): boolean =>
|
|
|
94
94
|
* Resolver to resolve urls like the ones created by createOdspUrl which is driver inner
|
|
95
95
|
* url format. Ex: `${siteUrl}?driveId=${driveId}&itemId=${itemId}&path=${path}`
|
|
96
96
|
* @legacy
|
|
97
|
-
* @
|
|
97
|
+
* @beta
|
|
98
98
|
*/
|
|
99
99
|
export class OdspDriverUrlResolver implements IUrlResolver {
|
|
100
100
|
constructor() {}
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
/**
|
|
38
38
|
* Properties passed to the code responsible for fetching share link for a file.
|
|
39
39
|
* @legacy
|
|
40
|
-
* @
|
|
40
|
+
* @beta
|
|
41
41
|
*/
|
|
42
42
|
export interface ShareLinkFetcherProps {
|
|
43
43
|
/**
|
|
@@ -55,7 +55,7 @@ export interface ShareLinkFetcherProps {
|
|
|
55
55
|
* url format and the ones which have things like driveId, siteId, itemId etc encoded in nav param.
|
|
56
56
|
* This resolver also handles share links and try to generate one for the use by the app.
|
|
57
57
|
* @legacy
|
|
58
|
-
* @
|
|
58
|
+
* @beta
|
|
59
59
|
*/
|
|
60
60
|
export class OdspDriverUrlResolverForShareLink implements IUrlResolver {
|
|
61
61
|
private readonly logger: ITelemetryLoggerExt;
|
package/src/odspFluidFileLink.ts
CHANGED
|
@@ -24,7 +24,7 @@ const additionalContextParamName = "x";
|
|
|
24
24
|
* @param locator - describes Fluid data store locator info to be encoded
|
|
25
25
|
* @returns string representing encoded Fluid data store locator info
|
|
26
26
|
* @legacy
|
|
27
|
-
* @
|
|
27
|
+
* @beta
|
|
28
28
|
*/
|
|
29
29
|
export function encodeOdspFluidDataStoreLocator(locator: OdspFluidDataStoreLocator): string {
|
|
30
30
|
const siteUrl = new URL(locator.siteUrl);
|
|
@@ -115,7 +115,7 @@ function decodeOdspFluidDataStoreLocator(
|
|
|
115
115
|
* This parameter is provided by host in the resolve request and it contains information about the file
|
|
116
116
|
* like driveId, itemId, siteUrl, datastorePath, packageName etc.
|
|
117
117
|
* @legacy
|
|
118
|
-
* @
|
|
118
|
+
* @beta
|
|
119
119
|
*/
|
|
120
120
|
export const locatorQueryParamName = "nav";
|
|
121
121
|
|
|
@@ -124,7 +124,7 @@ export const locatorQueryParamName = "nav";
|
|
|
124
124
|
* @param url - file url in ODSP format (can be either canonical or share link)
|
|
125
125
|
* @param locator - object representing Fluid data store location in ODSP terms
|
|
126
126
|
* @legacy
|
|
127
|
-
* @
|
|
127
|
+
* @beta
|
|
128
128
|
*/
|
|
129
129
|
export function storeLocatorInOdspUrl(url: URL, locator: OdspFluidDataStoreLocator): void {
|
|
130
130
|
const encodedLocatorValue = encodeOdspFluidDataStoreLocator(locator);
|
|
@@ -140,7 +140,7 @@ export function storeLocatorInOdspUrl(url: URL, locator: OdspFluidDataStoreLocat
|
|
|
140
140
|
* @param requireFluidSignature - flag representing if the Fluid signature is expected in the url, default true
|
|
141
141
|
* @returns object representing Fluid data store location in ODSP terms
|
|
142
142
|
* @legacy
|
|
143
|
-
* @
|
|
143
|
+
* @beta
|
|
144
144
|
*/
|
|
145
145
|
export function getLocatorFromOdspUrl(
|
|
146
146
|
url: URL,
|
package/src/odspPublicUtils.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
* said document.
|
|
15
15
|
*
|
|
16
16
|
* @legacy
|
|
17
|
-
* @
|
|
17
|
+
* @beta
|
|
18
18
|
*/
|
|
19
19
|
export async function getHashedDocumentId(driveId: string, itemId: string): Promise<string> {
|
|
20
20
|
const buffer = IsoBuffer.from(`${driveId}_${itemId}`);
|
|
@@ -23,7 +23,7 @@ export async function getHashedDocumentId(driveId: string, itemId: string): Prom
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @legacy
|
|
26
|
-
* @
|
|
26
|
+
* @beta
|
|
27
27
|
* @deprecated - This is deprecated.
|
|
28
28
|
*/
|
|
29
29
|
export interface ISnapshotContents {
|
package/src/odspUtils.ts
CHANGED
|
@@ -63,7 +63,7 @@ export const getWithRetryForTokenRefreshRepeat = "getWithRetryForTokenRefreshRep
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @legacy
|
|
66
|
-
* @
|
|
66
|
+
* @beta
|
|
67
67
|
*/
|
|
68
68
|
export interface IOdspResponse<T> {
|
|
69
69
|
content: T;
|
|
@@ -341,7 +341,7 @@ export function getOdspResolvedUrl(resolvedUrl: IResolvedUrl): IOdspResolvedUrl
|
|
|
341
341
|
* Type narrowing utility to determine if the provided {@link @fluidframework/driver-definitions#IResolvedUrl}
|
|
342
342
|
* is an {@link @fluidframework/odsp-driver-definitions#IOdspResolvedUrl}.
|
|
343
343
|
* @legacy
|
|
344
|
-
* @
|
|
344
|
+
* @beta
|
|
345
345
|
*/
|
|
346
346
|
export function isOdspResolvedUrl(resolvedUrl: IResolvedUrl): resolvedUrl is IOdspResolvedUrl {
|
|
347
347
|
return "odspResolvedUrl" in resolvedUrl && resolvedUrl.odspResolvedUrl === true;
|
package/src/packageVersion.ts
CHANGED