@fluidframework/odsp-driver 2.70.0-360753 → 2.70.0-361248
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/dist/contracts.d.ts +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/createFile/index.d.ts.map +1 -1
- package/dist/createFile/index.js +37 -9
- package/dist/createFile/index.js.map +1 -1
- package/dist/fetch.d.ts +1 -1
- package/dist/fetch.js +1 -1
- package/dist/fetch.js.map +1 -1
- package/dist/odspPublicUtils.d.ts +1 -1
- package/dist/odspPublicUtils.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/lib/contracts.d.ts +1 -1
- package/lib/contracts.js.map +1 -1
- package/lib/createFile/index.d.ts.map +1 -1
- package/lib/createFile/index.js +37 -9
- package/lib/createFile/index.js.map +1 -1
- package/lib/fetch.d.ts +1 -1
- package/lib/fetch.js +1 -1
- package/lib/fetch.js.map +1 -1
- package/lib/odspPublicUtils.d.ts +1 -1
- package/lib/odspPublicUtils.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/package.json +13 -13
- package/src/contracts.ts +1 -1
- package/src/createFile/index.ts +46 -9
- package/src/fetch.ts +1 -1
- package/src/odspPublicUtils.ts +1 -1
- package/src/packageVersion.ts +1 -1
package/dist/contracts.d.ts
CHANGED
|
@@ -177,7 +177,7 @@ export interface IFlushOpsResponse {
|
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* Represents the cached snapshot value.
|
|
180
|
-
* @deprecated
|
|
180
|
+
* @deprecated This will be replaced with ISnapshotCachedEntry2 which wraps the new ISnapshot interface.
|
|
181
181
|
* For now, to support back compat from cache, we need to keep it for now.
|
|
182
182
|
*/
|
|
183
183
|
export interface ISnapshotCachedEntry extends ISnapshotContents {
|
package/dist/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8MU,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAuC5C;;GAEG;AACU,QAAA,6BAA6B,GAAG,oBAAoB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tISnapshot,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { HostStoragePolicy } from \"@fluidframework/odsp-driver-definitions/internal\";\n\n// eslint-disable-next-line import/no-deprecated\nimport type { ISnapshotContents } from \"./odspPublicUtils.js\";\n\n/**\n * Interface for error responses for the WebSocket connection\n */\nexport interface IOdspSocketError {\n\t/**\n\t * An error code number for the error that occurred\n\t * It will be a valid HTTP status code\n\t */\n\tcode: number;\n\n\t/**\n\t * A message about the error that occurred for debugging / logging purposes\n\t * This should not be displayed to the user directly\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * The client should wait this many seconds before retrying its request\n\t */\n\tretryAfter?: number;\n\n\t/**\n\t * Any error supplied by the socket containing codes and inner errors with further\n\t * details about the error.\n\t */\n\terror?: unknown;\n}\n\n/**\n * Interface for delta storage response.\n * Contains either SequencedDocumentMessages or SequencedDeltaOpMessage.\n */\nexport interface IDeltaStorageGetResponse {\n\tvalue: ISequencedDocumentMessage[] | ISequencedDeltaOpMessage[];\n}\n\nexport interface ISequencedDeltaOpMessage {\n\top: ISequencedDocumentMessage;\n\tsequenceNumber: number;\n}\n\nexport interface IDocumentStorageGetVersionsResponse {\n\tvalue: IDocumentStorageVersion[];\n}\n\nexport interface IDocumentStorageVersion {\n\tid: string;\n}\n\n/**\n *\n * Data structures that form ODSP Summary\n *\n */\n\nexport interface IOdspSummaryPayload {\n\ttype: \"container\" | \"channel\";\n\tmessage: string;\n\tsequenceNumber: number;\n\tentries: OdspSummaryTreeEntry[];\n}\n\nexport interface IWriteSummaryResponse {\n\tid: string;\n}\n\nexport type OdspSummaryTreeEntry = IOdspSummaryTreeValueEntry | IOdspSummaryTreeHandleEntry;\n\nexport interface IOdspSummaryTreeBaseEntry {\n\tpath: string;\n\ttype: \"blob\" | \"tree\" | \"commit\";\n}\n\nexport interface IOdspSummaryTreeValueEntry extends IOdspSummaryTreeBaseEntry {\n\tvalue: OdspSummaryTreeValue;\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSummaryTreeHandleEntry extends IOdspSummaryTreeBaseEntry {\n\tid: string;\n}\n\nexport type OdspSummaryTreeValue = IOdspSummaryTree | IOdspSummaryBlob;\n\nexport interface IOdspSummaryTree {\n\ttype: \"tree\";\n\tentries?: OdspSummaryTreeEntry[];\n}\n\nexport interface IOdspSummaryBlob {\n\ttype: \"blob\";\n\tcontent: string;\n\tencoding: \"base64\" | \"utf-8\";\n}\n\n/**\n *\n * Data structures that form ODSP Snapshot\n *\n */\n\nexport interface IOdspSnapshotTreeEntryTree {\n\tpath: string;\n\ttype: \"tree\";\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSnapshotTreeEntryCommit {\n\tid: string;\n\tpath: string;\n\ttype: \"commit\";\n}\n\nexport interface IOdspSnapshotTreeEntryBlob {\n\tid: string;\n\tpath: string;\n\ttype: \"blob\";\n}\n\nexport type IOdspSnapshotTreeEntry =\n\t| IOdspSnapshotTreeEntryTree\n\t| IOdspSnapshotTreeEntryCommit\n\t| IOdspSnapshotTreeEntryBlob;\n\nexport interface IOdspSnapshotCommit {\n\tentries: IOdspSnapshotTreeEntry[];\n\tid: string;\n\tsequenceNumber: number;\n}\n\n/**\n * Blob content, represents blobs in downloaded snapshot.\n */\nexport interface IOdspSnapshotBlob {\n\tcontent: string;\n\t// SPO only uses \"base64\" today for download.\n\t// We are adding undefined too, as temp way to roundtrip strings unchanged.\n\tencoding: \"base64\" | undefined;\n\tid: string;\n\tsize: number;\n}\n\nexport interface IOdspSnapshot {\n\tid: string;\n\ttrees: IOdspSnapshotCommit[];\n\tblobs?: IOdspSnapshotBlob[];\n\tops?: ISequencedDeltaOpMessage[];\n}\n\n/**\n * Same as HostStoragePolicy, but adds options that are internal to runtime.\n * All fields should be optional.\n */\nexport interface HostStoragePolicyInternal extends HostStoragePolicy {\n\tsummarizerClient?: boolean;\n\n\tsupportGetSnapshotApi?: boolean;\n}\n\nexport interface ICreateFileResponse {\n\t\"@odata.context\": string;\n\t\"driveId\": string;\n\t\"id\": string;\n\t\"itemId\": string;\n\t\"itemUrl\": string;\n\t\"sequenceNumber\": number;\n\t// sharing object contains shareId, sharingLink data or error in the response\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\"sharing\"?: any;\n\t\"sharingLink\"?: string;\n\t\"sharingLinkErrorReason\"?: string;\n\t\"name\": string;\n}\n\nexport interface IRenameFileResponse {\n\t\"@odata.context\": string;\n\t\"id\": string;\n\t\"name\": string;\n}\n\nexport interface IVersionedValueWithEpoch {\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n\tfluidEpoch: string;\n\t// This is same as \"persistedCacheValueVersion\" below. This represents the version of data stored in cache.\n\tversion: 3;\n}\n\nexport const persistedCacheValueVersion = 3;\n\nexport interface IGetOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds. Currently never set by PUSH\n\t */\n\tretryAfter?: number;\n\tmessages?: ISequencedDocumentMessage[];\n}\n\nexport interface IFlushOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds\n\t */\n\tretryAfter?: number;\n\tlastPersistedSequenceNumber?: number;\n}\n\n/**\n * Represents the cached snapshot value.\n * @deprecated
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8MU,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAuC5C;;GAEG;AACU,QAAA,6BAA6B,GAAG,oBAAoB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tISnapshot,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { HostStoragePolicy } from \"@fluidframework/odsp-driver-definitions/internal\";\n\n// eslint-disable-next-line import/no-deprecated\nimport type { ISnapshotContents } from \"./odspPublicUtils.js\";\n\n/**\n * Interface for error responses for the WebSocket connection\n */\nexport interface IOdspSocketError {\n\t/**\n\t * An error code number for the error that occurred\n\t * It will be a valid HTTP status code\n\t */\n\tcode: number;\n\n\t/**\n\t * A message about the error that occurred for debugging / logging purposes\n\t * This should not be displayed to the user directly\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * The client should wait this many seconds before retrying its request\n\t */\n\tretryAfter?: number;\n\n\t/**\n\t * Any error supplied by the socket containing codes and inner errors with further\n\t * details about the error.\n\t */\n\terror?: unknown;\n}\n\n/**\n * Interface for delta storage response.\n * Contains either SequencedDocumentMessages or SequencedDeltaOpMessage.\n */\nexport interface IDeltaStorageGetResponse {\n\tvalue: ISequencedDocumentMessage[] | ISequencedDeltaOpMessage[];\n}\n\nexport interface ISequencedDeltaOpMessage {\n\top: ISequencedDocumentMessage;\n\tsequenceNumber: number;\n}\n\nexport interface IDocumentStorageGetVersionsResponse {\n\tvalue: IDocumentStorageVersion[];\n}\n\nexport interface IDocumentStorageVersion {\n\tid: string;\n}\n\n/**\n *\n * Data structures that form ODSP Summary\n *\n */\n\nexport interface IOdspSummaryPayload {\n\ttype: \"container\" | \"channel\";\n\tmessage: string;\n\tsequenceNumber: number;\n\tentries: OdspSummaryTreeEntry[];\n}\n\nexport interface IWriteSummaryResponse {\n\tid: string;\n}\n\nexport type OdspSummaryTreeEntry = IOdspSummaryTreeValueEntry | IOdspSummaryTreeHandleEntry;\n\nexport interface IOdspSummaryTreeBaseEntry {\n\tpath: string;\n\ttype: \"blob\" | \"tree\" | \"commit\";\n}\n\nexport interface IOdspSummaryTreeValueEntry extends IOdspSummaryTreeBaseEntry {\n\tvalue: OdspSummaryTreeValue;\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSummaryTreeHandleEntry extends IOdspSummaryTreeBaseEntry {\n\tid: string;\n}\n\nexport type OdspSummaryTreeValue = IOdspSummaryTree | IOdspSummaryBlob;\n\nexport interface IOdspSummaryTree {\n\ttype: \"tree\";\n\tentries?: OdspSummaryTreeEntry[];\n}\n\nexport interface IOdspSummaryBlob {\n\ttype: \"blob\";\n\tcontent: string;\n\tencoding: \"base64\" | \"utf-8\";\n}\n\n/**\n *\n * Data structures that form ODSP Snapshot\n *\n */\n\nexport interface IOdspSnapshotTreeEntryTree {\n\tpath: string;\n\ttype: \"tree\";\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSnapshotTreeEntryCommit {\n\tid: string;\n\tpath: string;\n\ttype: \"commit\";\n}\n\nexport interface IOdspSnapshotTreeEntryBlob {\n\tid: string;\n\tpath: string;\n\ttype: \"blob\";\n}\n\nexport type IOdspSnapshotTreeEntry =\n\t| IOdspSnapshotTreeEntryTree\n\t| IOdspSnapshotTreeEntryCommit\n\t| IOdspSnapshotTreeEntryBlob;\n\nexport interface IOdspSnapshotCommit {\n\tentries: IOdspSnapshotTreeEntry[];\n\tid: string;\n\tsequenceNumber: number;\n}\n\n/**\n * Blob content, represents blobs in downloaded snapshot.\n */\nexport interface IOdspSnapshotBlob {\n\tcontent: string;\n\t// SPO only uses \"base64\" today for download.\n\t// We are adding undefined too, as temp way to roundtrip strings unchanged.\n\tencoding: \"base64\" | undefined;\n\tid: string;\n\tsize: number;\n}\n\nexport interface IOdspSnapshot {\n\tid: string;\n\ttrees: IOdspSnapshotCommit[];\n\tblobs?: IOdspSnapshotBlob[];\n\tops?: ISequencedDeltaOpMessage[];\n}\n\n/**\n * Same as HostStoragePolicy, but adds options that are internal to runtime.\n * All fields should be optional.\n */\nexport interface HostStoragePolicyInternal extends HostStoragePolicy {\n\tsummarizerClient?: boolean;\n\n\tsupportGetSnapshotApi?: boolean;\n}\n\nexport interface ICreateFileResponse {\n\t\"@odata.context\": string;\n\t\"driveId\": string;\n\t\"id\": string;\n\t\"itemId\": string;\n\t\"itemUrl\": string;\n\t\"sequenceNumber\": number;\n\t// sharing object contains shareId, sharingLink data or error in the response\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\"sharing\"?: any;\n\t\"sharingLink\"?: string;\n\t\"sharingLinkErrorReason\"?: string;\n\t\"name\": string;\n}\n\nexport interface IRenameFileResponse {\n\t\"@odata.context\": string;\n\t\"id\": string;\n\t\"name\": string;\n}\n\nexport interface IVersionedValueWithEpoch {\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n\tfluidEpoch: string;\n\t// This is same as \"persistedCacheValueVersion\" below. This represents the version of data stored in cache.\n\tversion: 3;\n}\n\nexport const persistedCacheValueVersion = 3;\n\nexport interface IGetOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds. Currently never set by PUSH\n\t */\n\tretryAfter?: number;\n\tmessages?: ISequencedDocumentMessage[];\n}\n\nexport interface IFlushOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds\n\t */\n\tretryAfter?: number;\n\tlastPersistedSequenceNumber?: number;\n}\n\n/**\n * Represents the cached snapshot value.\n * @deprecated This will be replaced with ISnapshotCachedEntry2 which wraps the new ISnapshot interface.\n * For now, to support back compat from cache, we need to keep it for now.\n */\n// eslint-disable-next-line import/no-deprecated\nexport interface ISnapshotCachedEntry extends ISnapshotContents {\n\tcacheEntryTime: number;\n}\n\n/**\n * Represents the cached snapshot value.\n */\nexport interface ISnapshotCachedEntry2 extends ISnapshot {\n\tcacheEntryTime: number;\n}\n\n/**\n * Represents the type of signal containing the sensitivity policy labels for the container.\n */\nexport const policyLabelsUpdatesSignalType = \"PolicyLabelsUpdate\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,IAAI,EAChD,UAAU,EAAE,mBAAmB,EAC/B,IAAI,EAAE,CAEL,CAAC,EAAE,cAAc,sBAAsB,CAAC,KACpC,OAAO,CAAC,CAAC,CAAC,GACb,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,IAAI,EAChD,UAAU,EAAE,mBAAmB,EAC/B,IAAI,EAAE,CAEL,CAAC,EAAE,cAAc,sBAAsB,CAAC,KACpC,OAAO,CAAC,CAAC,CAAC,GACb,OAAO,CAAC,CAAC,CAAC,CAoDZ"}
|
package/dist/createFile/index.js
CHANGED
|
@@ -9,15 +9,43 @@ async function useCreateNewModule(odspLogger, func) {
|
|
|
9
9
|
// We can delay load this module as this path will not be executed in load flows and create flow
|
|
10
10
|
// while only happens once in lifetime of a document which happens in the background after creation of
|
|
11
11
|
// detached container.
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
const maxRetries = 3;
|
|
13
|
+
const retryDelayMs = 50; // 50 ms delay between retries
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
15
|
+
let module;
|
|
16
|
+
let lastError;
|
|
17
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
18
|
+
// Add delay before retry attempts (not on first attempt)
|
|
19
|
+
if (attempt > 1) {
|
|
20
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
21
|
+
}
|
|
22
|
+
module = await import(/* webpackChunkName: "createNewModule" */ "./createNewModule.js")
|
|
23
|
+
.then((m) => {
|
|
24
|
+
odspLogger.sendTelemetryEvent({ eventName: "createNewModuleLoaded", attempt });
|
|
25
|
+
return m;
|
|
26
|
+
})
|
|
27
|
+
.catch((error) => {
|
|
28
|
+
lastError = error;
|
|
29
|
+
odspLogger.sendTelemetryEvent({
|
|
30
|
+
eventName: "createNewModuleImportRetry",
|
|
31
|
+
attempt,
|
|
32
|
+
maxRetries,
|
|
33
|
+
}, error);
|
|
34
|
+
return undefined;
|
|
35
|
+
});
|
|
36
|
+
// If successfully loaded the module, break out of the loop and use it
|
|
37
|
+
if (module) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (!module) {
|
|
42
|
+
// Final attempt failed
|
|
43
|
+
odspLogger.sendErrorEvent({
|
|
44
|
+
eventName: "createNewModuleLoadFailed",
|
|
45
|
+
maxRetries,
|
|
46
|
+
}, lastError);
|
|
47
|
+
throw lastError;
|
|
48
|
+
}
|
|
21
49
|
return func(module);
|
|
22
50
|
}
|
|
23
51
|
exports.useCreateNewModule = useCreateNewModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAII,KAAK,UAAU,kBAAkB,CACvC,UAA+B,EAC/B,IAGe;IAEf,gGAAgG;IAChG,sGAAsG;IACtG,sBAAsB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAII,KAAK,UAAU,kBAAkB,CACvC,UAA+B,EAC/B,IAGe;IAEf,gGAAgG;IAChG,sGAAsG;IACtG,sBAAsB;IAEtB,MAAM,UAAU,GAAG,CAAC,CAAC;IACrB,MAAM,YAAY,GAAG,EAAE,CAAC,CAAC,8BAA8B;IACvD,sEAAsE;IACtE,IAAI,MAAyD,CAAC;IAC9D,IAAI,SAAkB,CAAC;IAEvB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;QACxD,yDAAyD;QACzD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;QACnE,CAAC;QACD,MAAM,GAAG,MAAM,MAAM,CAAC,yCAAyC,CAAC,sBAAsB,CAAC;aACrF,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;YACX,UAAU,CAAC,kBAAkB,CAAC,EAAE,SAAS,EAAE,uBAAuB,EAAE,OAAO,EAAE,CAAC,CAAC;YAC/E,OAAO,CAAC,CAAC;QACV,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,UAAU,CAAC,kBAAkB,CAC5B;gBACC,SAAS,EAAE,4BAA4B;gBACvC,OAAO;gBACP,UAAU;aACV,EACD,KAAK,CACL,CAAC;YACF,OAAO,SAAS,CAAC;QAClB,CAAC,CAAC,CAAC;QACJ,sEAAsE;QACtE,IAAI,MAAM,EAAE,CAAC;YACZ,MAAM;QACP,CAAC;IACF,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,uBAAuB;QACvB,UAAU,CAAC,cAAc,CACxB;YACC,SAAS,EAAE,2BAA2B;YACtC,UAAU;SACV,EACD,SAAS,CACT,CAAC;QACF,MAAM,SAAS,CAAC;IACjB,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACrB,CAAC;AA1DD,gDA0DC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nexport async function useCreateNewModule<T = void>(\n\todspLogger: ITelemetryLoggerExt,\n\tfunc: (\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\t\tm: typeof import(\"./createNewModule.js\") /* webpackChunkName: \"createNewModule\" */,\n\t) => Promise<T>,\n): Promise<T> {\n\t// We can delay load this module as this path will not be executed in load flows and create flow\n\t// while only happens once in lifetime of a document which happens in the background after creation of\n\t// detached container.\n\n\tconst maxRetries = 3;\n\tconst retryDelayMs = 50; // 50 ms delay between retries\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\tlet module: typeof import(\"./createNewModule.js\") | undefined;\n\tlet lastError: unknown;\n\n\tfor (let attempt = 1; attempt <= maxRetries; attempt++) {\n\t\t// Add delay before retry attempts (not on first attempt)\n\t\tif (attempt > 1) {\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, retryDelayMs));\n\t\t}\n\t\tmodule = await import(/* webpackChunkName: \"createNewModule\" */ \"./createNewModule.js\")\n\t\t\t.then((m) => {\n\t\t\t\todspLogger.sendTelemetryEvent({ eventName: \"createNewModuleLoaded\", attempt });\n\t\t\t\treturn m;\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tlastError = error;\n\t\t\t\todspLogger.sendTelemetryEvent(\n\t\t\t\t\t{\n\t\t\t\t\t\teventName: \"createNewModuleImportRetry\",\n\t\t\t\t\t\tattempt,\n\t\t\t\t\t\tmaxRetries,\n\t\t\t\t\t},\n\t\t\t\t\terror,\n\t\t\t\t);\n\t\t\t\treturn undefined;\n\t\t\t});\n\t\t// If successfully loaded the module, break out of the loop and use it\n\t\tif (module) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!module) {\n\t\t// Final attempt failed\n\t\todspLogger.sendErrorEvent(\n\t\t\t{\n\t\t\t\teventName: \"createNewModuleLoadFailed\",\n\t\t\t\tmaxRetries,\n\t\t\t},\n\t\t\tlastError,\n\t\t);\n\t\tthrow lastError;\n\t}\n\n\treturn func(module);\n}\n"]}
|
package/dist/fetch.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated
|
|
6
|
+
* @deprecated Do not use. This is a temporary workaround to allow Pages
|
|
7
7
|
* webpack replacement to continue functioning without error.
|
|
8
8
|
*/
|
|
9
9
|
export declare const fetch: typeof globalThis.fetch;
|
package/dist/fetch.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.fetch = void 0;
|
|
8
8
|
/**
|
|
9
|
-
* @deprecated
|
|
9
|
+
* @deprecated Do not use. This is a temporary workaround to allow Pages
|
|
10
10
|
* webpack replacement to continue functioning without error.
|
|
11
11
|
*/
|
|
12
12
|
exports.fetch = globalThis.fetch;
|
package/dist/fetch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AACU,QAAA,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @deprecated
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AACU,QAAA,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @deprecated Do not use. This is a temporary workaround to allow Pages\n * webpack replacement to continue functioning without error.\n */\nexport const fetch = globalThis.fetch;\n"]}
|
|
@@ -14,7 +14,7 @@ export declare function getHashedDocumentId(driveId: string, itemId: string): Pr
|
|
|
14
14
|
/**
|
|
15
15
|
* @legacy
|
|
16
16
|
* @beta
|
|
17
|
-
* @deprecated
|
|
17
|
+
* @deprecated This is deprecated.
|
|
18
18
|
*/
|
|
19
19
|
export interface ISnapshotContents {
|
|
20
20
|
snapshotTree: ISnapshotTree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspPublicUtils.js","sourceRoot":"","sources":["../src/odspPublicUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAmE;AAMnE;;;;;;GAMG;AACI,KAAK,UAAU,mBAAmB,CAAC,OAAe,EAAE,MAAc;IACxE,MAAM,MAAM,GAAG,wBAAS,CAAC,IAAI,CAAC,GAAG,OAAO,IAAI,MAAM,EAAE,CAAC,CAAC;IACtD,OAAO,kBAAkB,CAAC,MAAM,IAAA,uBAAQ,EAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxE,CAAC;AAHD,kDAGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IsoBuffer, hashFile } from \"@fluid-internal/client-utils\";\nimport type {\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Creates a unique and stable id for a document stored in ODSP which doesn't expose the driveId and itemId of\n * said document.\n *\n * @legacy\n * @beta\n */\nexport async function getHashedDocumentId(driveId: string, itemId: string): Promise<string> {\n\tconst buffer = IsoBuffer.from(`${driveId}_${itemId}`);\n\treturn encodeURIComponent(await hashFile(buffer, \"SHA-256\", \"base64\"));\n}\n\n/**\n * @legacy\n * @beta\n * @deprecated
|
|
1
|
+
{"version":3,"file":"odspPublicUtils.js","sourceRoot":"","sources":["../src/odspPublicUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAmE;AAMnE;;;;;;GAMG;AACI,KAAK,UAAU,mBAAmB,CAAC,OAAe,EAAE,MAAc;IACxE,MAAM,MAAM,GAAG,wBAAS,CAAC,IAAI,CAAC,GAAG,OAAO,IAAI,MAAM,EAAE,CAAC,CAAC;IACtD,OAAO,kBAAkB,CAAC,MAAM,IAAA,uBAAQ,EAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxE,CAAC;AAHD,kDAGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IsoBuffer, hashFile } from \"@fluid-internal/client-utils\";\nimport type {\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Creates a unique and stable id for a document stored in ODSP which doesn't expose the driveId and itemId of\n * said document.\n *\n * @legacy\n * @beta\n */\nexport async function getHashedDocumentId(driveId: string, itemId: string): Promise<string> {\n\tconst buffer = IsoBuffer.from(`${driveId}_${itemId}`);\n\treturn encodeURIComponent(await hashFile(buffer, \"SHA-256\", \"base64\"));\n}\n\n/**\n * @legacy\n * @beta\n * @deprecated This is deprecated.\n */\nexport interface ISnapshotContents {\n\tsnapshotTree: ISnapshotTree;\n\tblobs: Map<string, ArrayBuffer>;\n\tops: ISequencedDocumentMessage[];\n\n\t/**\n\t * Sequence number of the snapshot\n\t */\n\tsequenceNumber: number | undefined;\n\n\t/**\n\t * Sequence number for the latest op/snapshot for the file in ODSP\n\t */\n\tlatestSequenceNumber: number | undefined;\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -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/odsp-driver";
|
|
8
|
-
export declare const pkgVersion = "2.70.0-
|
|
8
|
+
export declare const pkgVersion = "2.70.0-361248";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -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/odsp-driver";
|
|
11
|
-
exports.pkgVersion = "2.70.0-
|
|
11
|
+
exports.pkgVersion = "2.70.0-361248";
|
|
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,6BAA6B,CAAC;AACxC,QAAA,UAAU,GAAG,eAAe,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/odsp-driver\";\nexport const pkgVersion = \"2.70.0-
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,6BAA6B,CAAC;AACxC,QAAA,UAAU,GAAG,eAAe,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/odsp-driver\";\nexport const pkgVersion = \"2.70.0-361248\";\n"]}
|
package/lib/contracts.d.ts
CHANGED
|
@@ -177,7 +177,7 @@ export interface IFlushOpsResponse {
|
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* Represents the cached snapshot value.
|
|
180
|
-
* @deprecated
|
|
180
|
+
* @deprecated This will be replaced with ISnapshotCachedEntry2 which wraps the new ISnapshot interface.
|
|
181
181
|
* For now, to support back compat from cache, we need to keep it for now.
|
|
182
182
|
*/
|
|
183
183
|
export interface ISnapshotCachedEntry extends ISnapshotContents {
|
package/lib/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8MH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAuC5C;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tISnapshot,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { HostStoragePolicy } from \"@fluidframework/odsp-driver-definitions/internal\";\n\n// eslint-disable-next-line import/no-deprecated\nimport type { ISnapshotContents } from \"./odspPublicUtils.js\";\n\n/**\n * Interface for error responses for the WebSocket connection\n */\nexport interface IOdspSocketError {\n\t/**\n\t * An error code number for the error that occurred\n\t * It will be a valid HTTP status code\n\t */\n\tcode: number;\n\n\t/**\n\t * A message about the error that occurred for debugging / logging purposes\n\t * This should not be displayed to the user directly\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * The client should wait this many seconds before retrying its request\n\t */\n\tretryAfter?: number;\n\n\t/**\n\t * Any error supplied by the socket containing codes and inner errors with further\n\t * details about the error.\n\t */\n\terror?: unknown;\n}\n\n/**\n * Interface for delta storage response.\n * Contains either SequencedDocumentMessages or SequencedDeltaOpMessage.\n */\nexport interface IDeltaStorageGetResponse {\n\tvalue: ISequencedDocumentMessage[] | ISequencedDeltaOpMessage[];\n}\n\nexport interface ISequencedDeltaOpMessage {\n\top: ISequencedDocumentMessage;\n\tsequenceNumber: number;\n}\n\nexport interface IDocumentStorageGetVersionsResponse {\n\tvalue: IDocumentStorageVersion[];\n}\n\nexport interface IDocumentStorageVersion {\n\tid: string;\n}\n\n/**\n *\n * Data structures that form ODSP Summary\n *\n */\n\nexport interface IOdspSummaryPayload {\n\ttype: \"container\" | \"channel\";\n\tmessage: string;\n\tsequenceNumber: number;\n\tentries: OdspSummaryTreeEntry[];\n}\n\nexport interface IWriteSummaryResponse {\n\tid: string;\n}\n\nexport type OdspSummaryTreeEntry = IOdspSummaryTreeValueEntry | IOdspSummaryTreeHandleEntry;\n\nexport interface IOdspSummaryTreeBaseEntry {\n\tpath: string;\n\ttype: \"blob\" | \"tree\" | \"commit\";\n}\n\nexport interface IOdspSummaryTreeValueEntry extends IOdspSummaryTreeBaseEntry {\n\tvalue: OdspSummaryTreeValue;\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSummaryTreeHandleEntry extends IOdspSummaryTreeBaseEntry {\n\tid: string;\n}\n\nexport type OdspSummaryTreeValue = IOdspSummaryTree | IOdspSummaryBlob;\n\nexport interface IOdspSummaryTree {\n\ttype: \"tree\";\n\tentries?: OdspSummaryTreeEntry[];\n}\n\nexport interface IOdspSummaryBlob {\n\ttype: \"blob\";\n\tcontent: string;\n\tencoding: \"base64\" | \"utf-8\";\n}\n\n/**\n *\n * Data structures that form ODSP Snapshot\n *\n */\n\nexport interface IOdspSnapshotTreeEntryTree {\n\tpath: string;\n\ttype: \"tree\";\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSnapshotTreeEntryCommit {\n\tid: string;\n\tpath: string;\n\ttype: \"commit\";\n}\n\nexport interface IOdspSnapshotTreeEntryBlob {\n\tid: string;\n\tpath: string;\n\ttype: \"blob\";\n}\n\nexport type IOdspSnapshotTreeEntry =\n\t| IOdspSnapshotTreeEntryTree\n\t| IOdspSnapshotTreeEntryCommit\n\t| IOdspSnapshotTreeEntryBlob;\n\nexport interface IOdspSnapshotCommit {\n\tentries: IOdspSnapshotTreeEntry[];\n\tid: string;\n\tsequenceNumber: number;\n}\n\n/**\n * Blob content, represents blobs in downloaded snapshot.\n */\nexport interface IOdspSnapshotBlob {\n\tcontent: string;\n\t// SPO only uses \"base64\" today for download.\n\t// We are adding undefined too, as temp way to roundtrip strings unchanged.\n\tencoding: \"base64\" | undefined;\n\tid: string;\n\tsize: number;\n}\n\nexport interface IOdspSnapshot {\n\tid: string;\n\ttrees: IOdspSnapshotCommit[];\n\tblobs?: IOdspSnapshotBlob[];\n\tops?: ISequencedDeltaOpMessage[];\n}\n\n/**\n * Same as HostStoragePolicy, but adds options that are internal to runtime.\n * All fields should be optional.\n */\nexport interface HostStoragePolicyInternal extends HostStoragePolicy {\n\tsummarizerClient?: boolean;\n\n\tsupportGetSnapshotApi?: boolean;\n}\n\nexport interface ICreateFileResponse {\n\t\"@odata.context\": string;\n\t\"driveId\": string;\n\t\"id\": string;\n\t\"itemId\": string;\n\t\"itemUrl\": string;\n\t\"sequenceNumber\": number;\n\t// sharing object contains shareId, sharingLink data or error in the response\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\"sharing\"?: any;\n\t\"sharingLink\"?: string;\n\t\"sharingLinkErrorReason\"?: string;\n\t\"name\": string;\n}\n\nexport interface IRenameFileResponse {\n\t\"@odata.context\": string;\n\t\"id\": string;\n\t\"name\": string;\n}\n\nexport interface IVersionedValueWithEpoch {\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n\tfluidEpoch: string;\n\t// This is same as \"persistedCacheValueVersion\" below. This represents the version of data stored in cache.\n\tversion: 3;\n}\n\nexport const persistedCacheValueVersion = 3;\n\nexport interface IGetOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds. Currently never set by PUSH\n\t */\n\tretryAfter?: number;\n\tmessages?: ISequencedDocumentMessage[];\n}\n\nexport interface IFlushOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds\n\t */\n\tretryAfter?: number;\n\tlastPersistedSequenceNumber?: number;\n}\n\n/**\n * Represents the cached snapshot value.\n * @deprecated
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8MH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAuC5C;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tISnapshot,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport type { HostStoragePolicy } from \"@fluidframework/odsp-driver-definitions/internal\";\n\n// eslint-disable-next-line import/no-deprecated\nimport type { ISnapshotContents } from \"./odspPublicUtils.js\";\n\n/**\n * Interface for error responses for the WebSocket connection\n */\nexport interface IOdspSocketError {\n\t/**\n\t * An error code number for the error that occurred\n\t * It will be a valid HTTP status code\n\t */\n\tcode: number;\n\n\t/**\n\t * A message about the error that occurred for debugging / logging purposes\n\t * This should not be displayed to the user directly\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * The client should wait this many seconds before retrying its request\n\t */\n\tretryAfter?: number;\n\n\t/**\n\t * Any error supplied by the socket containing codes and inner errors with further\n\t * details about the error.\n\t */\n\terror?: unknown;\n}\n\n/**\n * Interface for delta storage response.\n * Contains either SequencedDocumentMessages or SequencedDeltaOpMessage.\n */\nexport interface IDeltaStorageGetResponse {\n\tvalue: ISequencedDocumentMessage[] | ISequencedDeltaOpMessage[];\n}\n\nexport interface ISequencedDeltaOpMessage {\n\top: ISequencedDocumentMessage;\n\tsequenceNumber: number;\n}\n\nexport interface IDocumentStorageGetVersionsResponse {\n\tvalue: IDocumentStorageVersion[];\n}\n\nexport interface IDocumentStorageVersion {\n\tid: string;\n}\n\n/**\n *\n * Data structures that form ODSP Summary\n *\n */\n\nexport interface IOdspSummaryPayload {\n\ttype: \"container\" | \"channel\";\n\tmessage: string;\n\tsequenceNumber: number;\n\tentries: OdspSummaryTreeEntry[];\n}\n\nexport interface IWriteSummaryResponse {\n\tid: string;\n}\n\nexport type OdspSummaryTreeEntry = IOdspSummaryTreeValueEntry | IOdspSummaryTreeHandleEntry;\n\nexport interface IOdspSummaryTreeBaseEntry {\n\tpath: string;\n\ttype: \"blob\" | \"tree\" | \"commit\";\n}\n\nexport interface IOdspSummaryTreeValueEntry extends IOdspSummaryTreeBaseEntry {\n\tvalue: OdspSummaryTreeValue;\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSummaryTreeHandleEntry extends IOdspSummaryTreeBaseEntry {\n\tid: string;\n}\n\nexport type OdspSummaryTreeValue = IOdspSummaryTree | IOdspSummaryBlob;\n\nexport interface IOdspSummaryTree {\n\ttype: \"tree\";\n\tentries?: OdspSummaryTreeEntry[];\n}\n\nexport interface IOdspSummaryBlob {\n\ttype: \"blob\";\n\tcontent: string;\n\tencoding: \"base64\" | \"utf-8\";\n}\n\n/**\n *\n * Data structures that form ODSP Snapshot\n *\n */\n\nexport interface IOdspSnapshotTreeEntryTree {\n\tpath: string;\n\ttype: \"tree\";\n\t// Indicates that this tree entry is unreferenced. If this is not present, the tree entry is considered referenced.\n\tunreferenced?: true;\n\tgroupId?: string;\n}\n\nexport interface IOdspSnapshotTreeEntryCommit {\n\tid: string;\n\tpath: string;\n\ttype: \"commit\";\n}\n\nexport interface IOdspSnapshotTreeEntryBlob {\n\tid: string;\n\tpath: string;\n\ttype: \"blob\";\n}\n\nexport type IOdspSnapshotTreeEntry =\n\t| IOdspSnapshotTreeEntryTree\n\t| IOdspSnapshotTreeEntryCommit\n\t| IOdspSnapshotTreeEntryBlob;\n\nexport interface IOdspSnapshotCommit {\n\tentries: IOdspSnapshotTreeEntry[];\n\tid: string;\n\tsequenceNumber: number;\n}\n\n/**\n * Blob content, represents blobs in downloaded snapshot.\n */\nexport interface IOdspSnapshotBlob {\n\tcontent: string;\n\t// SPO only uses \"base64\" today for download.\n\t// We are adding undefined too, as temp way to roundtrip strings unchanged.\n\tencoding: \"base64\" | undefined;\n\tid: string;\n\tsize: number;\n}\n\nexport interface IOdspSnapshot {\n\tid: string;\n\ttrees: IOdspSnapshotCommit[];\n\tblobs?: IOdspSnapshotBlob[];\n\tops?: ISequencedDeltaOpMessage[];\n}\n\n/**\n * Same as HostStoragePolicy, but adds options that are internal to runtime.\n * All fields should be optional.\n */\nexport interface HostStoragePolicyInternal extends HostStoragePolicy {\n\tsummarizerClient?: boolean;\n\n\tsupportGetSnapshotApi?: boolean;\n}\n\nexport interface ICreateFileResponse {\n\t\"@odata.context\": string;\n\t\"driveId\": string;\n\t\"id\": string;\n\t\"itemId\": string;\n\t\"itemUrl\": string;\n\t\"sequenceNumber\": number;\n\t// sharing object contains shareId, sharingLink data or error in the response\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\"sharing\"?: any;\n\t\"sharingLink\"?: string;\n\t\"sharingLinkErrorReason\"?: string;\n\t\"name\": string;\n}\n\nexport interface IRenameFileResponse {\n\t\"@odata.context\": string;\n\t\"id\": string;\n\t\"name\": string;\n}\n\nexport interface IVersionedValueWithEpoch {\n\t// TODO: use a stronger type\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tvalue: any;\n\tfluidEpoch: string;\n\t// This is same as \"persistedCacheValueVersion\" below. This represents the version of data stored in cache.\n\tversion: 3;\n}\n\nexport const persistedCacheValueVersion = 3;\n\nexport interface IGetOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds. Currently never set by PUSH\n\t */\n\tretryAfter?: number;\n\tmessages?: ISequencedDocumentMessage[];\n}\n\nexport interface IFlushOpsResponse {\n\tnonce: string;\n\tcode: number;\n\t/**\n\t * Time in seconds\n\t */\n\tretryAfter?: number;\n\tlastPersistedSequenceNumber?: number;\n}\n\n/**\n * Represents the cached snapshot value.\n * @deprecated This will be replaced with ISnapshotCachedEntry2 which wraps the new ISnapshot interface.\n * For now, to support back compat from cache, we need to keep it for now.\n */\n// eslint-disable-next-line import/no-deprecated\nexport interface ISnapshotCachedEntry extends ISnapshotContents {\n\tcacheEntryTime: number;\n}\n\n/**\n * Represents the cached snapshot value.\n */\nexport interface ISnapshotCachedEntry2 extends ISnapshot {\n\tcacheEntryTime: number;\n}\n\n/**\n * Represents the type of signal containing the sensitivity policy labels for the container.\n */\nexport const policyLabelsUpdatesSignalType = \"PolicyLabelsUpdate\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,IAAI,EAChD,UAAU,EAAE,mBAAmB,EAC/B,IAAI,EAAE,CAEL,CAAC,EAAE,cAAc,sBAAsB,CAAC,KACpC,OAAO,CAAC,CAAC,CAAC,GACb,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,IAAI,EAChD,UAAU,EAAE,mBAAmB,EAC/B,IAAI,EAAE,CAEL,CAAC,EAAE,cAAc,sBAAsB,CAAC,KACpC,OAAO,CAAC,CAAC,CAAC,GACb,OAAO,CAAC,CAAC,CAAC,CAoDZ"}
|
package/lib/createFile/index.js
CHANGED
|
@@ -6,15 +6,43 @@ export async function useCreateNewModule(odspLogger, func) {
|
|
|
6
6
|
// We can delay load this module as this path will not be executed in load flows and create flow
|
|
7
7
|
// while only happens once in lifetime of a document which happens in the background after creation of
|
|
8
8
|
// detached container.
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
const maxRetries = 3;
|
|
10
|
+
const retryDelayMs = 50; // 50 ms delay between retries
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
12
|
+
let module;
|
|
13
|
+
let lastError;
|
|
14
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
15
|
+
// Add delay before retry attempts (not on first attempt)
|
|
16
|
+
if (attempt > 1) {
|
|
17
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
18
|
+
}
|
|
19
|
+
module = await import(/* webpackChunkName: "createNewModule" */ "./createNewModule.js")
|
|
20
|
+
.then((m) => {
|
|
21
|
+
odspLogger.sendTelemetryEvent({ eventName: "createNewModuleLoaded", attempt });
|
|
22
|
+
return m;
|
|
23
|
+
})
|
|
24
|
+
.catch((error) => {
|
|
25
|
+
lastError = error;
|
|
26
|
+
odspLogger.sendTelemetryEvent({
|
|
27
|
+
eventName: "createNewModuleImportRetry",
|
|
28
|
+
attempt,
|
|
29
|
+
maxRetries,
|
|
30
|
+
}, error);
|
|
31
|
+
return undefined;
|
|
32
|
+
});
|
|
33
|
+
// If successfully loaded the module, break out of the loop and use it
|
|
34
|
+
if (module) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (!module) {
|
|
39
|
+
// Final attempt failed
|
|
40
|
+
odspLogger.sendErrorEvent({
|
|
41
|
+
eventName: "createNewModuleLoadFailed",
|
|
42
|
+
maxRetries,
|
|
43
|
+
}, lastError);
|
|
44
|
+
throw lastError;
|
|
45
|
+
}
|
|
18
46
|
return func(module);
|
|
19
47
|
}
|
|
20
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,UAA+B,EAC/B,IAGe;IAEf,gGAAgG;IAChG,sGAAsG;IACtG,sBAAsB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/createFile/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,UAA+B,EAC/B,IAGe;IAEf,gGAAgG;IAChG,sGAAsG;IACtG,sBAAsB;IAEtB,MAAM,UAAU,GAAG,CAAC,CAAC;IACrB,MAAM,YAAY,GAAG,EAAE,CAAC,CAAC,8BAA8B;IACvD,sEAAsE;IACtE,IAAI,MAAyD,CAAC;IAC9D,IAAI,SAAkB,CAAC;IAEvB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;QACxD,yDAAyD;QACzD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;QACnE,CAAC;QACD,MAAM,GAAG,MAAM,MAAM,CAAC,yCAAyC,CAAC,sBAAsB,CAAC;aACrF,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;YACX,UAAU,CAAC,kBAAkB,CAAC,EAAE,SAAS,EAAE,uBAAuB,EAAE,OAAO,EAAE,CAAC,CAAC;YAC/E,OAAO,CAAC,CAAC;QACV,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,UAAU,CAAC,kBAAkB,CAC5B;gBACC,SAAS,EAAE,4BAA4B;gBACvC,OAAO;gBACP,UAAU;aACV,EACD,KAAK,CACL,CAAC;YACF,OAAO,SAAS,CAAC;QAClB,CAAC,CAAC,CAAC;QACJ,sEAAsE;QACtE,IAAI,MAAM,EAAE,CAAC;YACZ,MAAM;QACP,CAAC;IACF,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,uBAAuB;QACvB,UAAU,CAAC,cAAc,CACxB;YACC,SAAS,EAAE,2BAA2B;YACtC,UAAU;SACV,EACD,SAAS,CACT,CAAC;QACF,MAAM,SAAS,CAAC;IACjB,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACrB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nexport async function useCreateNewModule<T = void>(\n\todspLogger: ITelemetryLoggerExt,\n\tfunc: (\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\t\tm: typeof import(\"./createNewModule.js\") /* webpackChunkName: \"createNewModule\" */,\n\t) => Promise<T>,\n): Promise<T> {\n\t// We can delay load this module as this path will not be executed in load flows and create flow\n\t// while only happens once in lifetime of a document which happens in the background after creation of\n\t// detached container.\n\n\tconst maxRetries = 3;\n\tconst retryDelayMs = 50; // 50 ms delay between retries\n\t// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\tlet module: typeof import(\"./createNewModule.js\") | undefined;\n\tlet lastError: unknown;\n\n\tfor (let attempt = 1; attempt <= maxRetries; attempt++) {\n\t\t// Add delay before retry attempts (not on first attempt)\n\t\tif (attempt > 1) {\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, retryDelayMs));\n\t\t}\n\t\tmodule = await import(/* webpackChunkName: \"createNewModule\" */ \"./createNewModule.js\")\n\t\t\t.then((m) => {\n\t\t\t\todspLogger.sendTelemetryEvent({ eventName: \"createNewModuleLoaded\", attempt });\n\t\t\t\treturn m;\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tlastError = error;\n\t\t\t\todspLogger.sendTelemetryEvent(\n\t\t\t\t\t{\n\t\t\t\t\t\teventName: \"createNewModuleImportRetry\",\n\t\t\t\t\t\tattempt,\n\t\t\t\t\t\tmaxRetries,\n\t\t\t\t\t},\n\t\t\t\t\terror,\n\t\t\t\t);\n\t\t\t\treturn undefined;\n\t\t\t});\n\t\t// If successfully loaded the module, break out of the loop and use it\n\t\tif (module) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!module) {\n\t\t// Final attempt failed\n\t\todspLogger.sendErrorEvent(\n\t\t\t{\n\t\t\t\teventName: \"createNewModuleLoadFailed\",\n\t\t\t\tmaxRetries,\n\t\t\t},\n\t\t\tlastError,\n\t\t);\n\t\tthrow lastError;\n\t}\n\n\treturn func(module);\n}\n"]}
|
package/lib/fetch.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated
|
|
6
|
+
* @deprecated Do not use. This is a temporary workaround to allow Pages
|
|
7
7
|
* webpack replacement to continue functioning without error.
|
|
8
8
|
*/
|
|
9
9
|
export declare const fetch: typeof globalThis.fetch;
|
package/lib/fetch.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated
|
|
6
|
+
* @deprecated Do not use. This is a temporary workaround to allow Pages
|
|
7
7
|
* webpack replacement to continue functioning without error.
|
|
8
8
|
*/
|
|
9
9
|
export const fetch = globalThis.fetch;
|
package/lib/fetch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @deprecated
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @deprecated Do not use. This is a temporary workaround to allow Pages\n * webpack replacement to continue functioning without error.\n */\nexport const fetch = globalThis.fetch;\n"]}
|
package/lib/odspPublicUtils.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare function getHashedDocumentId(driveId: string, itemId: string): Pr
|
|
|
14
14
|
/**
|
|
15
15
|
* @legacy
|
|
16
16
|
* @beta
|
|
17
|
-
* @deprecated
|
|
17
|
+
* @deprecated This is deprecated.
|
|
18
18
|
*/
|
|
19
19
|
export interface ISnapshotContents {
|
|
20
20
|
snapshotTree: ISnapshotTree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odspPublicUtils.js","sourceRoot":"","sources":["../src/odspPublicUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAMnE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAe,EAAE,MAAc;IACxE,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,OAAO,IAAI,MAAM,EAAE,CAAC,CAAC;IACtD,OAAO,kBAAkB,CAAC,MAAM,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IsoBuffer, hashFile } from \"@fluid-internal/client-utils\";\nimport type {\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Creates a unique and stable id for a document stored in ODSP which doesn't expose the driveId and itemId of\n * said document.\n *\n * @legacy\n * @beta\n */\nexport async function getHashedDocumentId(driveId: string, itemId: string): Promise<string> {\n\tconst buffer = IsoBuffer.from(`${driveId}_${itemId}`);\n\treturn encodeURIComponent(await hashFile(buffer, \"SHA-256\", \"base64\"));\n}\n\n/**\n * @legacy\n * @beta\n * @deprecated
|
|
1
|
+
{"version":3,"file":"odspPublicUtils.js","sourceRoot":"","sources":["../src/odspPublicUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAMnE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAe,EAAE,MAAc;IACxE,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,OAAO,IAAI,MAAM,EAAE,CAAC,CAAC;IACtD,OAAO,kBAAkB,CAAC,MAAM,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IsoBuffer, hashFile } from \"@fluid-internal/client-utils\";\nimport type {\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\n/**\n * Creates a unique and stable id for a document stored in ODSP which doesn't expose the driveId and itemId of\n * said document.\n *\n * @legacy\n * @beta\n */\nexport async function getHashedDocumentId(driveId: string, itemId: string): Promise<string> {\n\tconst buffer = IsoBuffer.from(`${driveId}_${itemId}`);\n\treturn encodeURIComponent(await hashFile(buffer, \"SHA-256\", \"base64\"));\n}\n\n/**\n * @legacy\n * @beta\n * @deprecated This is deprecated.\n */\nexport interface ISnapshotContents {\n\tsnapshotTree: ISnapshotTree;\n\tblobs: Map<string, ArrayBuffer>;\n\tops: ISequencedDocumentMessage[];\n\n\t/**\n\t * Sequence number of the snapshot\n\t */\n\tsequenceNumber: number | undefined;\n\n\t/**\n\t * Sequence number for the latest op/snapshot for the file in ODSP\n\t */\n\tlatestSequenceNumber: number | undefined;\n}\n"]}
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -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/odsp-driver";
|
|
8
|
-
export declare const pkgVersion = "2.70.0-
|
|
8
|
+
export declare const pkgVersion = "2.70.0-361248";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,6BAA6B,CAAC;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,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/odsp-driver\";\nexport const pkgVersion = \"2.70.0-
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,6BAA6B,CAAC;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,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/odsp-driver\";\nexport const pkgVersion = \"2.70.0-361248\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver",
|
|
3
|
-
"version": "2.70.0-
|
|
3
|
+
"version": "2.70.0-361248",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,26 +69,26 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "2.70.0-
|
|
73
|
-
"@fluidframework/core-interfaces": "2.70.0-
|
|
74
|
-
"@fluidframework/core-utils": "2.70.0-
|
|
75
|
-
"@fluidframework/driver-base": "2.70.0-
|
|
76
|
-
"@fluidframework/driver-definitions": "2.70.0-
|
|
77
|
-
"@fluidframework/driver-utils": "2.70.0-
|
|
78
|
-
"@fluidframework/odsp-doclib-utils": "2.70.0-
|
|
79
|
-
"@fluidframework/odsp-driver-definitions": "2.70.0-
|
|
80
|
-
"@fluidframework/telemetry-utils": "2.70.0-
|
|
72
|
+
"@fluid-internal/client-utils": "2.70.0-361248",
|
|
73
|
+
"@fluidframework/core-interfaces": "2.70.0-361248",
|
|
74
|
+
"@fluidframework/core-utils": "2.70.0-361248",
|
|
75
|
+
"@fluidframework/driver-base": "2.70.0-361248",
|
|
76
|
+
"@fluidframework/driver-definitions": "2.70.0-361248",
|
|
77
|
+
"@fluidframework/driver-utils": "2.70.0-361248",
|
|
78
|
+
"@fluidframework/odsp-doclib-utils": "2.70.0-361248",
|
|
79
|
+
"@fluidframework/odsp-driver-definitions": "2.70.0-361248",
|
|
80
|
+
"@fluidframework/telemetry-utils": "2.70.0-361248",
|
|
81
81
|
"socket.io-client": "~4.7.5",
|
|
82
82
|
"uuid": "^11.1.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
86
86
|
"@biomejs/biome": "~1.9.3",
|
|
87
|
-
"@fluid-internal/mocha-test-setup": "2.70.0-
|
|
87
|
+
"@fluid-internal/mocha-test-setup": "2.70.0-361248",
|
|
88
88
|
"@fluid-tools/build-cli": "^0.58.3",
|
|
89
89
|
"@fluidframework/build-common": "^2.0.3",
|
|
90
90
|
"@fluidframework/build-tools": "^0.58.3",
|
|
91
|
-
"@fluidframework/eslint-config-fluid": "^6.
|
|
91
|
+
"@fluidframework/eslint-config-fluid": "^6.1.0",
|
|
92
92
|
"@fluidframework/odsp-driver-previous": "npm:@fluidframework/odsp-driver@2.63.0",
|
|
93
93
|
"@microsoft/api-extractor": "7.52.11",
|
|
94
94
|
"@types/mocha": "^10.0.10",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"concurrently": "^8.2.1",
|
|
99
99
|
"copyfiles": "^2.4.1",
|
|
100
100
|
"cross-env": "^7.0.3",
|
|
101
|
-
"eslint": "~8.
|
|
101
|
+
"eslint": "~8.57.1",
|
|
102
102
|
"mocha": "^10.8.2",
|
|
103
103
|
"mocha-multi-reporters": "^1.5.1",
|
|
104
104
|
"rimraf": "^4.4.0",
|
package/src/contracts.ts
CHANGED
|
@@ -231,7 +231,7 @@ export interface IFlushOpsResponse {
|
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
233
|
* Represents the cached snapshot value.
|
|
234
|
-
* @deprecated
|
|
234
|
+
* @deprecated This will be replaced with ISnapshotCachedEntry2 which wraps the new ISnapshot interface.
|
|
235
235
|
* For now, to support back compat from cache, we need to keep it for now.
|
|
236
236
|
*/
|
|
237
237
|
// eslint-disable-next-line import/no-deprecated
|
package/src/createFile/index.ts
CHANGED
|
@@ -15,15 +15,52 @@ export async function useCreateNewModule<T = void>(
|
|
|
15
15
|
// We can delay load this module as this path will not be executed in load flows and create flow
|
|
16
16
|
// while only happens once in lifetime of a document which happens in the background after creation of
|
|
17
17
|
// detached container.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
|
|
19
|
+
const maxRetries = 3;
|
|
20
|
+
const retryDelayMs = 50; // 50 ms delay between retries
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
22
|
+
let module: typeof import("./createNewModule.js") | undefined;
|
|
23
|
+
let lastError: unknown;
|
|
24
|
+
|
|
25
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
26
|
+
// Add delay before retry attempts (not on first attempt)
|
|
27
|
+
if (attempt > 1) {
|
|
28
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
|
|
29
|
+
}
|
|
30
|
+
module = await import(/* webpackChunkName: "createNewModule" */ "./createNewModule.js")
|
|
31
|
+
.then((m) => {
|
|
32
|
+
odspLogger.sendTelemetryEvent({ eventName: "createNewModuleLoaded", attempt });
|
|
33
|
+
return m;
|
|
34
|
+
})
|
|
35
|
+
.catch((error) => {
|
|
36
|
+
lastError = error;
|
|
37
|
+
odspLogger.sendTelemetryEvent(
|
|
38
|
+
{
|
|
39
|
+
eventName: "createNewModuleImportRetry",
|
|
40
|
+
attempt,
|
|
41
|
+
maxRetries,
|
|
42
|
+
},
|
|
43
|
+
error,
|
|
44
|
+
);
|
|
45
|
+
return undefined;
|
|
46
|
+
});
|
|
47
|
+
// If successfully loaded the module, break out of the loop and use it
|
|
48
|
+
if (module) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!module) {
|
|
54
|
+
// Final attempt failed
|
|
55
|
+
odspLogger.sendErrorEvent(
|
|
56
|
+
{
|
|
57
|
+
eventName: "createNewModuleLoadFailed",
|
|
58
|
+
maxRetries,
|
|
59
|
+
},
|
|
60
|
+
lastError,
|
|
61
|
+
);
|
|
62
|
+
throw lastError;
|
|
63
|
+
}
|
|
27
64
|
|
|
28
65
|
return func(module);
|
|
29
66
|
}
|
package/src/fetch.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @deprecated
|
|
7
|
+
* @deprecated Do not use. This is a temporary workaround to allow Pages
|
|
8
8
|
* webpack replacement to continue functioning without error.
|
|
9
9
|
*/
|
|
10
10
|
export const fetch = globalThis.fetch;
|
package/src/odspPublicUtils.ts
CHANGED
|
@@ -24,7 +24,7 @@ export async function getHashedDocumentId(driveId: string, itemId: string): Prom
|
|
|
24
24
|
/**
|
|
25
25
|
* @legacy
|
|
26
26
|
* @beta
|
|
27
|
-
* @deprecated
|
|
27
|
+
* @deprecated This is deprecated.
|
|
28
28
|
*/
|
|
29
29
|
export interface ISnapshotContents {
|
|
30
30
|
snapshotTree: ISnapshotTree;
|
package/src/packageVersion.ts
CHANGED