@fluidframework/driver-definitions 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.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/.eslintrc.js +2 -5
- package/api-extractor.json +2 -2
- package/dist/driverError.d.ts +7 -3
- package/dist/driverError.d.ts.map +1 -1
- package/dist/driverError.js +6 -2
- package/dist/driverError.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js.map +1 -1
- package/dist/urlResolver.d.ts +3 -3
- package/dist/urlResolver.d.ts.map +1 -1
- package/dist/urlResolver.js.map +1 -1
- package/lib/driverError.d.ts +7 -3
- package/lib/driverError.d.ts.map +1 -1
- package/lib/driverError.js +6 -2
- package/lib/driverError.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/storage.d.ts +2 -2
- package/lib/storage.d.ts.map +1 -1
- package/lib/storage.js.map +1 -1
- package/lib/urlResolver.d.ts +3 -3
- package/lib/urlResolver.d.ts.map +1 -1
- package/lib/urlResolver.js.map +1 -1
- package/package.json +31 -30
- package/prettier.config.cjs +1 -1
- package/src/driverError.ts +145 -139
- package/src/index.ts +34 -34
- package/src/storage.ts +330 -323
- package/src/urlResolver.ts +54 -55
- package/tsconfig.esnext.json +6 -6
- package/tsconfig.json +8 -13
package/.eslintrc.js
CHANGED
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "@fluidframework/build-common/api-extractor-common-strict.json"
|
|
4
4
|
}
|
package/dist/driverError.d.ts
CHANGED
|
@@ -46,6 +46,10 @@ export declare enum DriverErrorType {
|
|
|
46
46
|
* CSP violation, etc.
|
|
47
47
|
*/
|
|
48
48
|
fetchFailure = "fetchFailure",
|
|
49
|
+
/**
|
|
50
|
+
* This error occurs when token provider fails to fetch orderer token
|
|
51
|
+
*/
|
|
52
|
+
fetchTokenError = "fetchTokenError",
|
|
49
53
|
/**
|
|
50
54
|
* Unexpected response from server. Either JSON is malformed, or some required properties are missing
|
|
51
55
|
*/
|
|
@@ -54,7 +58,7 @@ export declare enum DriverErrorType {
|
|
|
54
58
|
* This error occurs when the file is modified externally (not through Fluid protocol) in storage.
|
|
55
59
|
* It will occur in cases where client has some state or cache that is based on old content (identity) of a file,
|
|
56
60
|
* and storage / driver / loader detects such mismatch.
|
|
57
|
-
* When it's hit, client needs to forget all the
|
|
61
|
+
* When it's hit, client needs to forget all the knowledge about this file and start over.
|
|
58
62
|
*/
|
|
59
63
|
fileOverwrittenInStorage = "fileOverwrittenInStorage",
|
|
60
64
|
/**
|
|
@@ -75,7 +79,7 @@ export declare enum DriverErrorType {
|
|
|
75
79
|
/**
|
|
76
80
|
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
77
81
|
* ! Should match the value of ContainerErrorType.usageError
|
|
78
|
-
|
|
82
|
+
*/
|
|
79
83
|
usageError = "usageError",
|
|
80
84
|
/**
|
|
81
85
|
* File is locked for read/write by storage, e.g. whole collection is locked and access denied.
|
|
@@ -138,7 +142,7 @@ export interface ILocationRedirectionError extends IDriverErrorBase {
|
|
|
138
142
|
* allows compiler to differentiate interfaces based on error type
|
|
139
143
|
*/
|
|
140
144
|
export interface IDriverBasicError extends IDriverErrorBase {
|
|
141
|
-
readonly errorType: DriverErrorType.genericError | DriverErrorType.fileNotFoundOrAccessDeniedError | DriverErrorType.offlineError | DriverErrorType.unsupportedClientProtocolVersion | DriverErrorType.writeError | DriverErrorType.fetchFailure | DriverErrorType.incorrectServerResponse | DriverErrorType.fileOverwrittenInStorage | DriverErrorType.fluidInvalidSchema | DriverErrorType.usageError | DriverErrorType.fileIsLocked;
|
|
145
|
+
readonly errorType: DriverErrorType.genericError | DriverErrorType.fileNotFoundOrAccessDeniedError | DriverErrorType.offlineError | DriverErrorType.unsupportedClientProtocolVersion | DriverErrorType.writeError | DriverErrorType.fetchFailure | DriverErrorType.fetchTokenError | DriverErrorType.incorrectServerResponse | DriverErrorType.fileOverwrittenInStorage | DriverErrorType.fluidInvalidSchema | DriverErrorType.usageError | DriverErrorType.fileIsLocked;
|
|
142
146
|
readonly statusCode?: number;
|
|
143
147
|
}
|
|
144
148
|
export declare type DriverError = IThrottlingWarning | IGenericNetworkError | IAuthorizationError | ILocationRedirectionError | IDriverBasicError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverError.d.ts","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,oBAAY,eAAe;
|
|
1
|
+
{"version":3,"file":"driverError.d.ts","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,oBAAY,eAAe;IAC1B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;;OAGG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,kBAAkB,uBAAuB;IAEzC;;OAEG;IACH,+BAA+B,oCAAoC;IAEnE;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,YAAY,iBAAiB;IAK7B,gCAAgC,qCAAqC;IAErE;;;OAGG;IACH,UAAU,eAAe;IAEzB;;;;;OAKG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,uBAAuB,4BAA4B;IAEnD;;;;;OAKG;IACH,wBAAwB,6BAA6B;IAErD;;OAEG;IACH,8BAA8B,mCAAmC;IAEjE;;;OAGG;IACH,mBAAmB,wBAAwB;IAE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,SAAS,EACf,eAAe,CAAC,YAAY,GAC5B,eAAe,CAAC,+BAA+B,GAC/C,eAAe,CAAC,YAAY,GAC5B,eAAe,CAAC,gCAAgC,GAChD,eAAe,CAAC,UAAU,GAC1B,eAAe,CAAC,YAAY,GAC5B,eAAe,CAAC,eAAe,GAC/B,eAAe,CAAC,uBAAuB,GACvC,eAAe,CAAC,wBAAwB,GACxC,eAAe,CAAC,kBAAkB,GAClC,eAAe,CAAC,UAAU,GAC1B,eAAe,CAAC,YAAY,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,oBAAY,WAAW,GACpB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,yBAAyB,GACzB,iBAAiB,CAAC"}
|
package/dist/driverError.js
CHANGED
|
@@ -52,6 +52,10 @@ var DriverErrorType;
|
|
|
52
52
|
* CSP violation, etc.
|
|
53
53
|
*/
|
|
54
54
|
DriverErrorType["fetchFailure"] = "fetchFailure";
|
|
55
|
+
/**
|
|
56
|
+
* This error occurs when token provider fails to fetch orderer token
|
|
57
|
+
*/
|
|
58
|
+
DriverErrorType["fetchTokenError"] = "fetchTokenError";
|
|
55
59
|
/**
|
|
56
60
|
* Unexpected response from server. Either JSON is malformed, or some required properties are missing
|
|
57
61
|
*/
|
|
@@ -60,7 +64,7 @@ var DriverErrorType;
|
|
|
60
64
|
* This error occurs when the file is modified externally (not through Fluid protocol) in storage.
|
|
61
65
|
* It will occur in cases where client has some state or cache that is based on old content (identity) of a file,
|
|
62
66
|
* and storage / driver / loader detects such mismatch.
|
|
63
|
-
* When it's hit, client needs to forget all the
|
|
67
|
+
* When it's hit, client needs to forget all the knowledge about this file and start over.
|
|
64
68
|
*/
|
|
65
69
|
DriverErrorType["fileOverwrittenInStorage"] = "fileOverwrittenInStorage";
|
|
66
70
|
/**
|
|
@@ -81,7 +85,7 @@ var DriverErrorType;
|
|
|
81
85
|
/**
|
|
82
86
|
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
83
87
|
* ! Should match the value of ContainerErrorType.usageError
|
|
84
|
-
|
|
88
|
+
*/
|
|
85
89
|
DriverErrorType["usageError"] = "usageError";
|
|
86
90
|
/**
|
|
87
91
|
* File is locked for read/write by storage, e.g. whole collection is locked and access denied.
|
package/dist/driverError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverError.js","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"driverError.js","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACH,IAAY,eAiGX;AAjGD,WAAY,eAAe;IAC1B;;OAEG;IACH,gDAA6B,CAAA;IAE7B;;;OAGG;IACH,8DAA2C,CAAA;IAE3C;;OAEG;IACH,4DAAyC,CAAA;IAEzC;;OAEG;IACH,sFAAmE,CAAA;IAEnE;;OAEG;IACH,sDAAmC,CAAA;IAEnC;;OAEG;IACH,gDAA6B,CAAA;IAE7B;;OAEG;IACH,wFAAqE,CAAA;IAErE;;;OAGG;IACH,4CAAyB,CAAA;IAEzB;;;;;OAKG;IACH,gDAA6B,CAAA;IAE7B;;OAEG;IACH,sDAAmC,CAAA;IAEnC;;OAEG;IACH,sEAAmD,CAAA;IAEnD;;;;;OAKG;IACH,wEAAqD,CAAA;IAErD;;OAEG;IACH,oFAAiE,CAAA;IAEjE;;;OAGG;IACH,8DAA2C,CAAA;IAE3C;;;;OAIG;IACH,4DAAyC,CAAA;IAEzC;;;OAGG;IACH,4CAAyB,CAAA;IAEzB;;OAEG;IACH,gDAA6B,CAAA;AAC9B,CAAC,EAjGW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAiG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"./urlResolver\";\n\n/**\n * Driver Error types\n * Lists types that are likely to be used by all drivers\n */\nexport enum DriverErrorType {\n\t/**\n\t * A fatal error with no specific interpretation covered by other DriverErrorType values\n\t */\n\tgenericError = \"genericError\",\n\n\t/**\n\t * Some non-categorized (below) networking error\n\t * Include errors like fatal server error (usually 500).\n\t */\n\tgenericNetworkError = \"genericNetworkError\",\n\n\t/**\n\t * Access denied - user does not have enough privileges to open a file, or continue to operate on a file\n\t */\n\tauthorizationError = \"authorizationError\",\n\n\t/**\n\t * File not found, or file deleted during session\n\t */\n\tfileNotFoundOrAccessDeniedError = \"fileNotFoundOrAccessDeniedError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError = \"throttlingError\",\n\n\t/**\n\t * We can not reach server due to computer being offline.\n\t */\n\tofflineError = \"offlineError\",\n\n\t/*\n\t * Unsupported client protocol\n\t */\n\tunsupportedClientProtocolVersion = \"unsupportedClientProtocolVersion\",\n\n\t/**\n\t * User does not have write permissions to a file, but is changing content of a file.\n\t * That might be indication of some data store error - data stores should not generate ops in readonly mode.\n\t */\n\twriteError = \"writeError\",\n\n\t/**\n\t * A generic fetch failure that indicates we were not able to get a response from the server.\n\t * This may be due to the client being offline (though, if we are able to detect offline state it will be\n\t * logged as an offlineError instead). Other possibilities could be DNS errors, malformed fetch request,\n\t * CSP violation, etc.\n\t */\n\tfetchFailure = \"fetchFailure\",\n\n\t/**\n\t * This error occurs when token provider fails to fetch orderer token\n\t */\n\tfetchTokenError = \"fetchTokenError\",\n\n\t/**\n\t * Unexpected response from server. Either JSON is malformed, or some required properties are missing\n\t */\n\tincorrectServerResponse = \"incorrectServerResponse\",\n\n\t/**\n\t * This error occurs when the file is modified externally (not through Fluid protocol) in storage.\n\t * It will occur in cases where client has some state or cache that is based on old content (identity) of a file,\n\t * and storage / driver / loader detects such mismatch.\n\t * When it's hit, client needs to forget all the knowledge about this file and start over.\n\t */\n\tfileOverwrittenInStorage = \"fileOverwrittenInStorage\",\n\n\t/**\n\t * The document is read-only and delta stream connection is forbidden.\n\t */\n\tdeltaStreamConnectionForbidden = \"deltaStreamConnectionForbidden\",\n\n\t/**\n\t * The location of file/container can change on server. So if the file location moves and we try to access the old\n\t * location, then this error is thrown to let the client know about the new location info.\n\t */\n\tlocationRedirection = \"locationRedirection\",\n\n\t/**\n\t * When a file is not a Fluid file, but has Fluid extension such as \".note\",\n\t * server won't be able to open it and will return this error. The innerMostErrorCode will be\n\t * \"fluidInvalidSchema\"\n\t */\n\tfluidInvalidSchema = \"fluidInvalidSchema\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t * ! Should match the value of ContainerErrorType.usageError\n\t */\n\tusageError = \"usageError\",\n\n\t/**\n\t * File is locked for read/write by storage, e.g. whole collection is locked and access denied.\n\t */\n\tfileIsLocked = \"fileIsLocked\",\n}\n\n/**\n * Interface describing errors and warnings raised by any driver code.\n * Not expected to be implemented by a class or an object literal, but rather used in place of\n * any or unknown in various function signatures that pass errors around.\n *\n * \"Any\" in the interface name is a nod to the fact that errorType has lost its type constraint.\n * It will be either DriverErrorType or the specific driver's specialized error type enum,\n * but we can't reference a specific driver's error type enum in this code.\n */\nexport interface IAnyDriverError extends Omit<IDriverErrorBase, \"errorType\"> {\n\treadonly errorType: string;\n}\n\n/**\n * Base interface for all errors and warnings\n */\nexport interface IDriverErrorBase {\n\t/**\n\t * Classification of what type of error this is, used programmatically by consumers to interpret the error\n\t */\n\treadonly errorType: DriverErrorType;\n\n\t/**\n\t * Free-form error message\n\t */\n\treadonly message: string;\n\n\t/**\n\t * True indicates the caller may retry the failed action. False indicates it's a fatal error\n\t */\n\tcanRetry: boolean;\n\n\t/**\n\t * Best guess as to network conditions (online/offline) when the error arose.\n\t * See OnlineStatus enum in driver-utils package for expected values.\n\t */\n\tonline?: string;\n}\n\nexport interface IThrottlingWarning extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n\nexport interface IGenericNetworkError extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.genericNetworkError;\n\treadonly statusCode?: number;\n}\n\nexport interface IAuthorizationError extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.authorizationError;\n\treadonly claims?: string;\n\treadonly tenantId?: string;\n}\n\nexport interface ILocationRedirectionError extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.locationRedirection;\n\treadonly redirectUrl: IResolvedUrl;\n}\n\n/**\n * Having this uber interface without types that have their own interfaces\n * allows compiler to differentiate interfaces based on error type\n */\nexport interface IDriverBasicError extends IDriverErrorBase {\n\treadonly errorType:\n\t\t| DriverErrorType.genericError\n\t\t| DriverErrorType.fileNotFoundOrAccessDeniedError\n\t\t| DriverErrorType.offlineError\n\t\t| DriverErrorType.unsupportedClientProtocolVersion\n\t\t| DriverErrorType.writeError\n\t\t| DriverErrorType.fetchFailure\n\t\t| DriverErrorType.fetchTokenError\n\t\t| DriverErrorType.incorrectServerResponse\n\t\t| DriverErrorType.fileOverwrittenInStorage\n\t\t| DriverErrorType.fluidInvalidSchema\n\t\t| DriverErrorType.usageError\n\t\t| DriverErrorType.fileIsLocked;\n\treadonly statusCode?: number;\n}\n\nexport type DriverError =\n\t| IThrottlingWarning\n\t| IGenericNetworkError\n\t| IAuthorizationError\n\t| ILocationRedirectionError\n\t| IDriverBasicError;\n"]}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAC/B,OAAO,EACP,aAAa,EACb,eAAe,EACf,mBAAmB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,GACZ,MAAM,eAAe,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAUuB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAUuB;AARtB,8GAAA,eAAe,OAAA;AAShB,qCAiBmB;AAhBlB,sGAAA,WAAW,OAAA;AAeX,8GAAA,mBAAmB,OAAA;AAEpB,6CAUuB;AARtB,2GAAA,YAAY,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tDriverError,\n\tDriverErrorType,\n\tIAnyDriverError,\n\tIAuthorizationError,\n\tIDriverErrorBase,\n\tIDriverBasicError,\n\tIGenericNetworkError,\n\tILocationRedirectionError,\n\tIThrottlingWarning,\n} from \"./driverError\";\nexport {\n\tFetchSource,\n\tFiveDaysMs,\n\tIDeltasFetchResult,\n\tIDeltaStorageService,\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaConnectionEvents,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIDocumentServicePolicies,\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tIStream,\n\tIStreamResult,\n\tISummaryContext,\n\tLoaderCachingPolicy,\n} from \"./storage\";\nexport {\n\tDriverPreCheckInfo,\n\tDriverHeader,\n\tIContainerPackageInfo,\n\tIDriverHeader,\n\tIFluidResolvedUrl,\n\tIResolvedUrl,\n\tIResolvedUrlBase,\n\tIWebResolvedUrl,\n\tIUrlResolver,\n} from \"./urlResolver\";\n"]}
|
package/dist/storage.d.ts
CHANGED
|
@@ -231,7 +231,7 @@ export interface IDocumentService {
|
|
|
231
231
|
*/
|
|
232
232
|
policies?: IDocumentServicePolicies;
|
|
233
233
|
/**
|
|
234
|
-
* Access to storage associated with the document
|
|
234
|
+
* Access to storage associated with the document
|
|
235
235
|
*/
|
|
236
236
|
connectToStorage(): Promise<IDocumentStorageService>;
|
|
237
237
|
/**
|
|
@@ -248,7 +248,7 @@ export interface IDocumentService {
|
|
|
248
248
|
* Please note that it does not remove the need for caller to close all active delta connections,
|
|
249
249
|
* as storage may not be tracking such objects.
|
|
250
250
|
* @param error - tells if container (and storage) are closed due to critical error.
|
|
251
|
-
* Error might be due to disconnect between client & server
|
|
251
|
+
* Error might be due to disconnect between client & server knowledge about file, like file being overwritten
|
|
252
252
|
* in storage, but client having stale local cache.
|
|
253
253
|
* If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.
|
|
254
254
|
*/
|
package/dist/storage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,mBAAmB,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H,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAEvC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CACzC;AAED,oBAAY,WAAW;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;CACnB"}
|
package/dist/storage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAqRH,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC3B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACZ,CAAC,EAVW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAU9B;AA4GD,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACvB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable, IEventProvider, IErrorEvent, ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport {\n ConnectionMode,\n IClient,\n IClientConfiguration,\n ICreateBlobResponse,\n IDocumentMessage,\n INack,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ISnapshotTree,\n ISummaryHandle,\n ISummaryTree,\n ITokenClaims,\n IVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAnyDriverError } from \"./driverError\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\nexport interface IDeltasFetchResult {\n /**\n * Sequential set of messages starting from 'from' sequence number.\n * May be partial result, i.e. not fulfill original request in full.\n */\n messages: ISequencedDocumentMessage[];\n\n /**\n * If true, storage only partially fulfilled request, but has more ops\n * If false, the request was fulfilled. If less ops were returned then\n * requested, then storage does not have more ops in this range.\n */\n partialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDeltaStorageService {\n /**\n * Retrieves all the delta operations within the inclusive sequence number range\n * @param tenantId - Id of the tenant.\n * @param id - document id.\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n get(\n tenantId: string,\n id: string,\n from: number, // inclusive\n to: number, // exclusive\n fetchReason?: string,\n ): Promise<IDeltasFetchResult>;\n}\n\nexport type IStreamResult<T> = { done: true; } | { done: false; value: T; };\n\n/**\n * Read interface for the Queue\n */\nexport interface IStream<T> {\n read(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDocumentDeltaStorageService {\n /**\n * Retrieves all the delta operations within the exclusive sequence number range\n * @param from - first op to retrieve (inclusive)\n * @param to - first op not to retrieve (exclusive end)\n * @param abortSignal - signal that aborts operation\n * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n * spo which could help in debugging sessions if any issue occurs.\n */\n fetchMessages(from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean,\n fetchReason?: string,\n ): IStream<ISequencedDocumentMessage[]>;\n}\n\n// DO NOT INCREASE THIS TYPE'S VALUE\n// If a driver started using a larger value,\n// internal assumptions of the Runtime's GC feature will be violated\n// DO NOT INCREASE THIS TYPE'S VALUE\nexport type FiveDaysMs = 432_000_000; /* 5 days in milliseconds */\n\n/**\n * Policies describing attributes or characteristics of the driver's storage service,\n * to direct how other components interact with the driver\n */\nexport interface IDocumentStorageServicePolicies {\n /**\n * Should the Loader implement any sort of pre-fetching or caching mechanism?\n */\n readonly caching?: LoaderCachingPolicy;\n\n /**\n * If this policy is provided, it tells runtime on ideal size for blobs.\n * Blobs that are smaller than that size should be aggregated into bigger blobs.\n */\n readonly minBlobSize?: number;\n\n /**\n * IMPORTANT: This policy MUST be set to 5 days and PROPERLY ENFORCED for drivers that are used\n * in applications where Garbage Collection is enabled. Otherwise data loss may occur.\n *\n * This policy pertains to requests for the latest snapshot from the service.\n * If set, it means that the driver guarantees not to use a cached value that was fetched more than 5 days ago.\n * If undefined, the driver makes no guarantees about the age of snapshots used for loading.\n */\n readonly maximumCacheDurationMs?: FiveDaysMs;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n repositoryUrl: string;\n\n /**\n * Policies implemented/instructed by driver.\n */\n readonly policies?: IDocumentStorageServicePolicies;\n\n /**\n * Returns the snapshot tree.\n * @param version - Version of the snapshot to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n */\n // TODO: use `undefined` instead.\n // eslint-disable-next-line @rushstack/no-new-null\n getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n /**\n * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n * @param versionId - Version id of the requested version.\n * @param count - Number of the versions to be fetched.\n * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n * in debugging purposes to see why this call was made.\n * @param fetchSource - Callers can specify the source of the response. For ex. Driver may choose to cache\n * requests and serve data from cache. That will result in stale info returned. Callers can disable this\n * functionality by passing fetchSource = noCache and ensuring that driver will return latest information\n * from storage.\n */\n getVersions(\n // TODO: use `undefined` instead.\n // eslint-disable-next-line @rushstack/no-new-null\n versionId: string | null,\n count: number,\n scenarioName?: string,\n fetchSource?: FetchSource,\n ): Promise<IVersion[]>;\n\n /**\n * Creates a blob out of the given buffer\n */\n createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n /**\n * Reads the object with the given ID, returns content in arrayBufferLike\n */\n readBlob(id: string): Promise<ArrayBufferLike>;\n\n /**\n * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n * referencing from the previously acked summary.\n * Returns the uploaded summary handle.\n */\n uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n /**\n * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n * server has deleted it this call may result in a broken promise.\n */\n downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n (event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n (event: \"disconnect\", listener: (reason: IAnyDriverError) => void);\n (event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n (event: \"signal\", listener: (message: ISignalMessage) => void);\n (event: \"pong\", listener: (latency: number) => void);\n // TODO: Use something other than `any`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (event: \"error\", listener: (error: any) => void);\n}\n\nexport interface IDocumentDeltaConnection extends IDisposable, IEventProvider<IDocumentDeltaConnectionEvents> {\n /**\n * ClientID for the connection\n */\n clientId: string;\n\n /**\n * Claims for the client\n */\n claims: ITokenClaims;\n\n /**\n * Mode of the client\n */\n mode: ConnectionMode;\n\n /**\n * Whether the connection was made to a new or existing document\n */\n existing: boolean;\n\n /**\n * Protocol version being used with the service\n */\n version: string;\n\n /**\n * Messages sent during the connection\n */\n initialMessages: ISequencedDocumentMessage[];\n\n /**\n * Signals sent during the connection\n */\n initialSignals: ISignalMessage[];\n\n /**\n * Prior clients already connected.\n */\n initialClients: ISignalClient[];\n\n /**\n * Configuration details provided by the service\n */\n serviceConfiguration: IClientConfiguration;\n\n /**\n * Last known sequence number to ordering service at the time of connection\n * It may lap actual last sequence number (quite a bit, if container is very active).\n * But it's best information for client to figure out how far it is behind, at least\n * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n * that is likely to be more up-to-date.\n */\n checkpointSequenceNumber?: number;\n\n /**\n * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n * it could contain info like build version, environment, region etc. These properties can be logged by client\n * to better understand server environment etc. and use it in case error occurs.\n * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n */\n relayServiceAgent?: string;\n\n /**\n * Submit a new message to the server\n */\n submit(messages: IDocumentMessage[]): void;\n\n /**\n * Submit a new signal to the server\n */\n // TODO: Use something other than `any`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n submitSignal(message: any): void;\n}\n\nexport enum LoaderCachingPolicy {\n /**\n * The loader should not implement any prefetching or caching policy.\n */\n NoCaching,\n\n /**\n * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n */\n Prefetch,\n}\n\nexport interface IDocumentServicePolicies {\n /**\n * Do not connect to delta stream\n */\n readonly storageOnly?: boolean;\n}\n\nexport interface IDocumentService {\n\n resolvedUrl: IResolvedUrl;\n\n /**\n * Policies implemented/instructed by driver.\n */\n policies?: IDocumentServicePolicies;\n\n /**\n * Access to storage associated with the document...\n */\n connectToStorage(): Promise<IDocumentStorageService>;\n\n /**\n * Access to delta storage associated with the document\n */\n connectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n /**\n * Subscribes to the document delta stream\n */\n connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n /**\n * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n * Useful for storage to commit any pending state if any (including any local caching).\n * Please note that it does not remove the need for caller to close all active delta connections,\n * as storage may not be tracking such objects.\n * @param error - tells if container (and storage) are closed due to critical error.\n * Error might be due to disconnect between client & server knowlege about file, like file being overwritten\n * in storage, but client having stale local cache.\n * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n */\n // TODO: Use something other than `any`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dispose(error?: any): void;\n}\n\nexport interface IDocumentServiceFactory {\n /**\n * Name of the protocol used by factory\n */\n protocolName: string;\n\n /**\n * Creates the document service after extracting different endpoints URLs from a resolved URL.\n *\n * @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n *\n * @returns An instance of {@link IDocumentService}.\n */\n createDocumentService(\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n\n /**\n * Creates a new document with the provided options. Returns the document service.\n *\n * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n * should be posted later, before connecting to ordering service.\n * @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n * @param clientIsSummarizer - Whether or not the client is the\n * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n * `undefined` =\\> false\n */\n createContainer(\n createNewSummary: ISummaryTree | undefined,\n createNewResolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n */\nexport interface ISummaryContext {\n /**\n * Parent summary proposed handle (from summary op)\n */\n readonly proposalHandle: string | undefined;\n\n /**\n * Parent summary acked handle (from summary ack)\n */\n readonly ackHandle: string | undefined;\n\n readonly referenceSequenceNumber: number;\n}\n\nexport enum FetchSource {\n default = \"default\",\n noCache = \"noCache\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA6RH,IAAY,mBAUX;AAVD,WAAY,mBAAmB;IAC9B;;OAEG;IACH,uEAAS,CAAA;IAET;;OAEG;IACH,qEAAQ,CAAA;AACT,CAAC,EAVW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAU9B;AA2GD,IAAY,WAGX;AAHD,WAAY,WAAW;IACtB,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;AACpB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDisposable,\n\tIEventProvider,\n\tIErrorEvent,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/common-definitions\";\nimport {\n\tConnectionMode,\n\tIClient,\n\tIClientConfiguration,\n\tICreateBlobResponse,\n\tIDocumentMessage,\n\tINack,\n\tISequencedDocumentMessage,\n\tISignalClient,\n\tISignalMessage,\n\tISnapshotTree,\n\tISummaryHandle,\n\tISummaryTree,\n\tITokenClaims,\n\tIVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAnyDriverError } from \"./driverError\";\nimport { IResolvedUrl } from \"./urlResolver\";\n\nexport interface IDeltasFetchResult {\n\t/**\n\t * Sequential set of messages starting from 'from' sequence number.\n\t * May be partial result, i.e. not fulfill original request in full.\n\t */\n\tmessages: ISequencedDocumentMessage[];\n\n\t/**\n\t * If true, storage only partially fulfilled request, but has more ops\n\t * If false, the request was fulfilled. If less ops were returned then\n\t * requested, then storage does not have more ops in this range.\n\t */\n\tpartialResult: boolean;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDeltaStorageService {\n\t/**\n\t * Retrieves all the delta operations within the inclusive sequence number range\n\t * @param tenantId - Id of the tenant.\n\t * @param id - document id.\n\t * @param from - first op to retrieve (inclusive)\n\t * @param to - first op not to retrieve (exclusive end)\n\t * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n\t * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n\t * spo which could help in debugging sessions if any issue occurs.\n\t */\n\tget(\n\t\ttenantId: string,\n\t\tid: string,\n\t\tfrom: number, // inclusive\n\t\tto: number, // exclusive\n\t\tfetchReason?: string,\n\t): Promise<IDeltasFetchResult>;\n}\n\nexport type IStreamResult<T> = { done: true } | { done: false; value: T };\n\n/**\n * Read interface for the Queue\n */\nexport interface IStream<T> {\n\tread(): Promise<IStreamResult<T>>;\n}\n\n/**\n * Interface to provide access to stored deltas for a shared object\n */\nexport interface IDocumentDeltaStorageService {\n\t/**\n\t * Retrieves all the delta operations within the exclusive sequence number range\n\t * @param from - first op to retrieve (inclusive)\n\t * @param to - first op not to retrieve (exclusive end)\n\t * @param abortSignal - signal that aborts operation\n\t * @param cachedOnly - return only cached ops, i.e. ops available locally on client.\n\t * @param fetchReason - Reason for fetching the messages. Example, gap between seq number\n\t * of Op on wire and known seq number. It should not contain any PII. It can be logged by\n\t * spo which could help in debugging sessions if any issue occurs.\n\t */\n\tfetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\tabortSignal?: AbortSignal,\n\t\tcachedOnly?: boolean,\n\t\tfetchReason?: string,\n\t): IStream<ISequencedDocumentMessage[]>;\n}\n\n// DO NOT INCREASE THIS TYPE'S VALUE\n// If a driver started using a larger value,\n// internal assumptions of the Runtime's GC feature will be violated\n// DO NOT INCREASE THIS TYPE'S VALUE\nexport type FiveDaysMs = 432_000_000; /* 5 days in milliseconds */\n\n/**\n * Policies describing attributes or characteristics of the driver's storage service,\n * to direct how other components interact with the driver\n */\nexport interface IDocumentStorageServicePolicies {\n\t/**\n\t * Should the Loader implement any sort of pre-fetching or caching mechanism?\n\t */\n\treadonly caching?: LoaderCachingPolicy;\n\n\t/**\n\t * If this policy is provided, it tells runtime on ideal size for blobs.\n\t * Blobs that are smaller than that size should be aggregated into bigger blobs.\n\t */\n\treadonly minBlobSize?: number;\n\n\t/**\n\t * IMPORTANT: This policy MUST be set to 5 days and PROPERLY ENFORCED for drivers that are used\n\t * in applications where Garbage Collection is enabled. Otherwise data loss may occur.\n\t *\n\t * This policy pertains to requests for the latest snapshot from the service.\n\t * If set, it means that the driver guarantees not to use a cached value that was fetched more than 5 days ago.\n\t * If undefined, the driver makes no guarantees about the age of snapshots used for loading.\n\t */\n\treadonly maximumCacheDurationMs?: FiveDaysMs;\n}\n\n/**\n * Interface to provide access to snapshots saved for a shared object\n */\nexport interface IDocumentStorageService extends Partial<IDisposable> {\n\trepositoryUrl: string;\n\n\t/**\n\t * Policies implemented/instructed by driver.\n\t */\n\treadonly policies?: IDocumentStorageServicePolicies;\n\n\t/**\n\t * Returns the snapshot tree.\n\t * @param version - Version of the snapshot to be fetched.\n\t * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n\t * in debugging purposes to see why this call was made.\n\t */\n\t// TODO: use `undefined` instead.\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tgetSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;\n\n\t/**\n\t * Retrieves all versions of the document starting at the specified versionId - or null if from the head\n\t * @param versionId - Version id of the requested version.\n\t * @param count - Number of the versions to be fetched.\n\t * @param scenarioName - scenario in which this api is called. This will be recorded by server and would help\n\t * in debugging purposes to see why this call was made.\n\t * @param fetchSource - Callers can specify the source of the response. For ex. Driver may choose to cache\n\t * requests and serve data from cache. That will result in stale info returned. Callers can disable this\n\t * functionality by passing fetchSource = noCache and ensuring that driver will return latest information\n\t * from storage.\n\t */\n\tgetVersions(\n\t\t// TODO: use `undefined` instead.\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]>;\n\n\t/**\n\t * Creates a blob out of the given buffer\n\t */\n\tcreateBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;\n\n\t/**\n\t * Reads the object with the given ID, returns content in arrayBufferLike\n\t */\n\treadBlob(id: string): Promise<ArrayBufferLike>;\n\n\t/**\n\t * Uploads a summary tree to storage using the given context for reference of previous summary handle.\n\t * The ISummaryHandles in the uploaded tree should have paths to indicate which summary object they are\n\t * referencing from the previously acked summary.\n\t * Returns the uploaded summary handle.\n\t */\n\tuploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;\n\n\t/**\n\t * Retrieves the commit that matches the packfile handle. If the packfile has already been committed and the\n\t * server has deleted it this call may result in a broken promise.\n\t */\n\tdownloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;\n}\n\nexport interface IDocumentDeltaConnectionEvents extends IErrorEvent {\n\t(event: \"nack\", listener: (documentId: string, message: INack[]) => void);\n\t(event: \"disconnect\", listener: (reason: IAnyDriverError) => void);\n\t(event: \"op\", listener: (documentId: string, messages: ISequencedDocumentMessage[]) => void);\n\t(event: \"signal\", listener: (message: ISignalMessage) => void);\n\t(event: \"pong\", listener: (latency: number) => void);\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t(event: \"error\", listener: (error: any) => void);\n}\n\nexport interface IDocumentDeltaConnection\n\textends IDisposable,\n\t\tIEventProvider<IDocumentDeltaConnectionEvents> {\n\t/**\n\t * ClientID for the connection\n\t */\n\tclientId: string;\n\n\t/**\n\t * Claims for the client\n\t */\n\tclaims: ITokenClaims;\n\n\t/**\n\t * Mode of the client\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * Whether the connection was made to a new or existing document\n\t */\n\texisting: boolean;\n\n\t/**\n\t * Protocol version being used with the service\n\t */\n\tversion: string;\n\n\t/**\n\t * Messages sent during the connection\n\t */\n\tinitialMessages: ISequencedDocumentMessage[];\n\n\t/**\n\t * Signals sent during the connection\n\t */\n\tinitialSignals: ISignalMessage[];\n\n\t/**\n\t * Prior clients already connected.\n\t */\n\tinitialClients: ISignalClient[];\n\n\t/**\n\t * Configuration details provided by the service\n\t */\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection\n\t * It may lap actual last sequence number (quite a bit, if container is very active).\n\t * But it's best information for client to figure out how far it is behind, at least\n\t * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n\t * that is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber?: number;\n\n\t/**\n\t * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n\t * it could contain info like build version, environment, region etc. These properties can be logged by client\n\t * to better understand server environment etc. and use it in case error occurs.\n\t * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n\t */\n\trelayServiceAgent?: string;\n\n\t/**\n\t * Submit a new message to the server\n\t */\n\tsubmit(messages: IDocumentMessage[]): void;\n\n\t/**\n\t * Submit a new signal to the server\n\t */\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsubmitSignal(message: any): void;\n}\n\nexport enum LoaderCachingPolicy {\n\t/**\n\t * The loader should not implement any prefetching or caching policy.\n\t */\n\tNoCaching,\n\n\t/**\n\t * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n\t */\n\tPrefetch,\n}\n\nexport interface IDocumentServicePolicies {\n\t/**\n\t * Do not connect to delta stream\n\t */\n\treadonly storageOnly?: boolean;\n}\n\nexport interface IDocumentService {\n\tresolvedUrl: IResolvedUrl;\n\n\t/**\n\t * Policies implemented/instructed by driver.\n\t */\n\tpolicies?: IDocumentServicePolicies;\n\n\t/**\n\t * Access to storage associated with the document\n\t */\n\tconnectToStorage(): Promise<IDocumentStorageService>;\n\n\t/**\n\t * Access to delta storage associated with the document\n\t */\n\tconnectToDeltaStorage(): Promise<IDocumentDeltaStorageService>;\n\n\t/**\n\t * Subscribes to the document delta stream\n\t */\n\tconnectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection>;\n\n\t/**\n\t * Dispose storage. Called by storage consumer (Container) when it's done with storage (Container closed).\n\t * Useful for storage to commit any pending state if any (including any local caching).\n\t * Please note that it does not remove the need for caller to close all active delta connections,\n\t * as storage may not be tracking such objects.\n\t * @param error - tells if container (and storage) are closed due to critical error.\n\t * Error might be due to disconnect between client & server knowledge about file, like file being overwritten\n\t * in storage, but client having stale local cache.\n\t * If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.\n\t */\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdispose(error?: any): void;\n}\n\nexport interface IDocumentServiceFactory {\n\t/**\n\t * Name of the protocol used by factory\n\t */\n\tprotocolName: string;\n\n\t/**\n\t * Creates the document service after extracting different endpoints URLs from a resolved URL.\n\t *\n\t * @param resolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n\t * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n\t * @param clientIsSummarizer - Whether or not the client is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n\t * `undefined` =\\> false\n\t *\n\t * @returns An instance of {@link IDocumentService}.\n\t */\n\tcreateDocumentService(\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService>;\n\n\t/**\n\t * Creates a new document with the provided options. Returns the document service.\n\t *\n\t * @param createNewSummary - Summary used to create file. If undefined, an empty file will be created and a summary\n\t * should be posted later, before connecting to ordering service.\n\t * @param createNewResolvedUrl - Endpoint URL data. See {@link IResolvedUrl}.\n\t * @param logger - Optional telemetry logger to which telemetry events will be forwarded.\n\t * @param clientIsSummarizer - Whether or not the client is the\n\t * {@link https://fluidframework.com/docs/concepts/summarizer/ | summarizer}.\n\t * `undefined` =\\> false\n\t */\n\tcreateContainer(\n\t\tcreateNewSummary: ISummaryTree | undefined,\n\t\tcreateNewResolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService>;\n}\n\n/**\n * Context for uploading a summary to storage.\n * Indicates the previously acked summary.\n */\nexport interface ISummaryContext {\n\t/**\n\t * Parent summary proposed handle (from summary op)\n\t */\n\treadonly proposalHandle: string | undefined;\n\n\t/**\n\t * Parent summary acked handle (from summary ack)\n\t */\n\treadonly ackHandle: string | undefined;\n\n\treadonly referenceSequenceNumber: number;\n}\n\nexport enum FetchSource {\n\tdefault = \"default\",\n\tnoCache = \"noCache\",\n}\n"]}
|
package/dist/urlResolver.d.ts
CHANGED
|
@@ -46,9 +46,9 @@ export interface IUrlResolver {
|
|
|
46
46
|
getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string, packageInfoSource?: IContainerPackageInfo): Promise<string>;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL
|
|
50
|
-
* for driver compatibility and preload information.
|
|
51
|
-
*/
|
|
49
|
+
* Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL
|
|
50
|
+
* for driver compatibility and preload information.
|
|
51
|
+
*/
|
|
52
52
|
export interface DriverPreCheckInfo {
|
|
53
53
|
/**
|
|
54
54
|
* A code details hint that can potentially be used to prefetch container code prior to having a snapshot.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,oBAAY,YAAY,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE/D,MAAM,WAAW,gBAAgB;
|
|
1
|
+
{"version":3,"file":"urlResolver.d.ts","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,oBAAY,YAAY,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE/D,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACxD,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IAC1D,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnC,SAAS,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAI5B,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,cAAc,CACb,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,qBAAqB,GACvC,OAAO,CAAC,MAAM,CAAC,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,oBAAY,YAAY;IAEvB,iBAAiB,4BAA4B;IAE7C,SAAS,cAAc;CACvB;AAED,MAAM,WAAW,aAAa;IAC7B,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAG1C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC;CAC9B;AAED,OAAO,QAAQ,iCAAiC,CAAC;IAEhD,UAAiB,cAAe,SAAQ,OAAO,CAAC,aAAa,CAAC;KAAG;CACjE"}
|
package/dist/urlResolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"urlResolver.js","sourceRoot":"","sources":["../src/urlResolver.ts"],"names":[],"mappings":";;;AA2EA;;GAEG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,qDAAqD;IACrD,6DAA6C,CAAA;IAC7C,iDAAiD;IACjD,uCAAuB,CAAA;AACxB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest } from \"@fluidframework/core-interfaces\";\n\nexport type IResolvedUrl = IWebResolvedUrl | IFluidResolvedUrl;\n\nexport interface IResolvedUrlBase {\n\ttype: string;\n}\n\nexport interface IWebResolvedUrl extends IResolvedUrlBase {\n\ttype: \"web\";\n\tdata: string;\n}\n\nexport interface IFluidResolvedUrl extends IResolvedUrlBase {\n\ttype: \"fluid\";\n\t/**\n\t * The id of the container this resolved url is for.\n\t */\n\tid: string;\n\turl: string;\n\ttokens: { [name: string]: string };\n\tendpoints: { [name: string]: string };\n}\n\n/**\n * Container package info handed off to resolver.\n */\nexport interface IContainerPackageInfo {\n\t/**\n\t * Container package name.\n\t */\n\tname: string;\n}\n\nexport interface IUrlResolver {\n\t// Like DNS should be able to cache resolution requests. Then possibly just have a token provider go and do stuff?\n\t// the expiration of it could be relative to the lifetime of the token? Requests after need to refresh?\n\t// or do we split the token access from this?\n\tresolve(request: IRequest): Promise<IResolvedUrl | undefined>;\n\n\t/**\n\t * Creates a url for the created container with any data store path given in the relative url.\n\t * @param resolvedUrl - resolved url for the container.\n\t * @param relativeUrl - relative url containing data store path; '/' represents root path.\n\t * @param packageInfoSource - optional, represents container package information to be included in url.\n\t * @returns absolute url combining container url with dta store path and optional additional information.\n\t */\n\tgetAbsoluteUrl(\n\t\tresolvedUrl: IResolvedUrl,\n\t\trelativeUrl: string,\n\t\tpackageInfoSource?: IContainerPackageInfo,\n\t): Promise<string>;\n}\n\n/**\n * Information that can be returned by a lightweight, seperately exported driver function. Used to preanalyze a URL\n * for driver compatibility and preload information.\n */\nexport interface DriverPreCheckInfo {\n\t/**\n\t * A code details hint that can potentially be used to prefetch container code prior to having a snapshot.\n\t */\n\tcodeDetailsHint?: string;\n\n\t/**\n\t * Domains that will be connected to on the critical boot path. Hosts can choose to preconnect to these for\n\t * improved performance.\n\t */\n\tcriticalBootDomains?: string[];\n}\n\n/**\n * Additional key in the loader request header\n */\nexport enum DriverHeader {\n\t// Key to indicate whether the request for summarizer\n\tsummarizingClient = \"fluid-client-summarizer\",\n\t// createNew information, specific to each driver\n\tcreateNew = \"createNew\",\n}\n\nexport interface IDriverHeader {\n\t[DriverHeader.summarizingClient]: boolean;\n\t// TODO: Use something other than `any`.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t[DriverHeader.createNew]: any;\n}\n\ndeclare module \"@fluidframework/core-interfaces\" {\n\t// eslint-disable-next-line @typescript-eslint/no-empty-interface\n\texport interface IRequestHeader extends Partial<IDriverHeader> {}\n}\n"]}
|
package/lib/driverError.d.ts
CHANGED
|
@@ -46,6 +46,10 @@ export declare enum DriverErrorType {
|
|
|
46
46
|
* CSP violation, etc.
|
|
47
47
|
*/
|
|
48
48
|
fetchFailure = "fetchFailure",
|
|
49
|
+
/**
|
|
50
|
+
* This error occurs when token provider fails to fetch orderer token
|
|
51
|
+
*/
|
|
52
|
+
fetchTokenError = "fetchTokenError",
|
|
49
53
|
/**
|
|
50
54
|
* Unexpected response from server. Either JSON is malformed, or some required properties are missing
|
|
51
55
|
*/
|
|
@@ -54,7 +58,7 @@ export declare enum DriverErrorType {
|
|
|
54
58
|
* This error occurs when the file is modified externally (not through Fluid protocol) in storage.
|
|
55
59
|
* It will occur in cases where client has some state or cache that is based on old content (identity) of a file,
|
|
56
60
|
* and storage / driver / loader detects such mismatch.
|
|
57
|
-
* When it's hit, client needs to forget all the
|
|
61
|
+
* When it's hit, client needs to forget all the knowledge about this file and start over.
|
|
58
62
|
*/
|
|
59
63
|
fileOverwrittenInStorage = "fileOverwrittenInStorage",
|
|
60
64
|
/**
|
|
@@ -75,7 +79,7 @@ export declare enum DriverErrorType {
|
|
|
75
79
|
/**
|
|
76
80
|
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
77
81
|
* ! Should match the value of ContainerErrorType.usageError
|
|
78
|
-
|
|
82
|
+
*/
|
|
79
83
|
usageError = "usageError",
|
|
80
84
|
/**
|
|
81
85
|
* File is locked for read/write by storage, e.g. whole collection is locked and access denied.
|
|
@@ -138,7 +142,7 @@ export interface ILocationRedirectionError extends IDriverErrorBase {
|
|
|
138
142
|
* allows compiler to differentiate interfaces based on error type
|
|
139
143
|
*/
|
|
140
144
|
export interface IDriverBasicError extends IDriverErrorBase {
|
|
141
|
-
readonly errorType: DriverErrorType.genericError | DriverErrorType.fileNotFoundOrAccessDeniedError | DriverErrorType.offlineError | DriverErrorType.unsupportedClientProtocolVersion | DriverErrorType.writeError | DriverErrorType.fetchFailure | DriverErrorType.incorrectServerResponse | DriverErrorType.fileOverwrittenInStorage | DriverErrorType.fluidInvalidSchema | DriverErrorType.usageError | DriverErrorType.fileIsLocked;
|
|
145
|
+
readonly errorType: DriverErrorType.genericError | DriverErrorType.fileNotFoundOrAccessDeniedError | DriverErrorType.offlineError | DriverErrorType.unsupportedClientProtocolVersion | DriverErrorType.writeError | DriverErrorType.fetchFailure | DriverErrorType.fetchTokenError | DriverErrorType.incorrectServerResponse | DriverErrorType.fileOverwrittenInStorage | DriverErrorType.fluidInvalidSchema | DriverErrorType.usageError | DriverErrorType.fileIsLocked;
|
|
142
146
|
readonly statusCode?: number;
|
|
143
147
|
}
|
|
144
148
|
export declare type DriverError = IThrottlingWarning | IGenericNetworkError | IAuthorizationError | ILocationRedirectionError | IDriverBasicError;
|
package/lib/driverError.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverError.d.ts","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GA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
* CSP violation, etc.
|
|
50
50
|
*/
|
|
51
51
|
DriverErrorType["fetchFailure"] = "fetchFailure";
|
|
52
|
+
/**
|
|
53
|
+
* This error occurs when token provider fails to fetch orderer token
|
|
54
|
+
*/
|
|
55
|
+
DriverErrorType["fetchTokenError"] = "fetchTokenError";
|
|
52
56
|
/**
|
|
53
57
|
* Unexpected response from server. Either JSON is malformed, or some required properties are missing
|
|
54
58
|
*/
|
|
@@ -57,7 +61,7 @@ export var DriverErrorType;
|
|
|
57
61
|
* This error occurs when the file is modified externally (not through Fluid protocol) in storage.
|
|
58
62
|
* It will occur in cases where client has some state or cache that is based on old content (identity) of a file,
|
|
59
63
|
* and storage / driver / loader detects such mismatch.
|
|
60
|
-
* When it's hit, client needs to forget all the
|
|
64
|
+
* When it's hit, client needs to forget all the knowledge about this file and start over.
|
|
61
65
|
*/
|
|
62
66
|
DriverErrorType["fileOverwrittenInStorage"] = "fileOverwrittenInStorage";
|
|
63
67
|
/**
|
|
@@ -78,7 +82,7 @@ export var DriverErrorType;
|
|
|
78
82
|
/**
|
|
79
83
|
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
80
84
|
* ! Should match the value of ContainerErrorType.usageError
|
|
81
|
-
|
|
85
|
+
*/
|
|
82
86
|
DriverErrorType["usageError"] = "usageError";
|
|
83
87
|
/**
|
|
84
88
|
* File is locked for read/write by storage, e.g. whole collection is locked and access denied.
|
package/lib/driverError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driverError.js","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"driverError.js","sourceRoot":"","sources":["../src/driverError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAN,IAAY,eAiGX;AAjGD,WAAY,eAAe;IAC1B;;OAEG;IACH,gDAA6B,CAAA;IAE7B;;;OAGG;IACH,8DAA2C,CAAA;IAE3C;;OAEG;IACH,4DAAyC,CAAA;IAEzC;;OAEG;IACH,sFAAmE,CAAA;IAEnE;;OAEG;IACH,sDAAmC,CAAA;IAEnC;;OAEG;IACH,gDAA6B,CAAA;IAE7B;;OAEG;IACH,wFAAqE,CAAA;IAErE;;;OAGG;IACH,4CAAyB,CAAA;IAEzB;;;;;OAKG;IACH,gDAA6B,CAAA;IAE7B;;OAEG;IACH,sDAAmC,CAAA;IAEnC;;OAEG;IACH,sEAAmD,CAAA;IAEnD;;;;;OAKG;IACH,wEAAqD,CAAA;IAErD;;OAEG;IACH,oFAAiE,CAAA;IAEjE;;;OAGG;IACH,8DAA2C,CAAA;IAE3C;;;;OAIG;IACH,4DAAyC,CAAA;IAEzC;;;OAGG;IACH,4CAAyB,CAAA;IAEzB;;OAEG;IACH,gDAA6B,CAAA;AAC9B,CAAC,EAjGW,eAAe,KAAf,eAAe,QAiG1B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"./urlResolver\";\n\n/**\n * Driver Error types\n * Lists types that are likely to be used by all drivers\n */\nexport enum DriverErrorType {\n\t/**\n\t * A fatal error with no specific interpretation covered by other DriverErrorType values\n\t */\n\tgenericError = \"genericError\",\n\n\t/**\n\t * Some non-categorized (below) networking error\n\t * Include errors like fatal server error (usually 500).\n\t */\n\tgenericNetworkError = \"genericNetworkError\",\n\n\t/**\n\t * Access denied - user does not have enough privileges to open a file, or continue to operate on a file\n\t */\n\tauthorizationError = \"authorizationError\",\n\n\t/**\n\t * File not found, or file deleted during session\n\t */\n\tfileNotFoundOrAccessDeniedError = \"fileNotFoundOrAccessDeniedError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError = \"throttlingError\",\n\n\t/**\n\t * We can not reach server due to computer being offline.\n\t */\n\tofflineError = \"offlineError\",\n\n\t/*\n\t * Unsupported client protocol\n\t */\n\tunsupportedClientProtocolVersion = \"unsupportedClientProtocolVersion\",\n\n\t/**\n\t * User does not have write permissions to a file, but is changing content of a file.\n\t * That might be indication of some data store error - data stores should not generate ops in readonly mode.\n\t */\n\twriteError = \"writeError\",\n\n\t/**\n\t * A generic fetch failure that indicates we were not able to get a response from the server.\n\t * This may be due to the client being offline (though, if we are able to detect offline state it will be\n\t * logged as an offlineError instead). Other possibilities could be DNS errors, malformed fetch request,\n\t * CSP violation, etc.\n\t */\n\tfetchFailure = \"fetchFailure\",\n\n\t/**\n\t * This error occurs when token provider fails to fetch orderer token\n\t */\n\tfetchTokenError = \"fetchTokenError\",\n\n\t/**\n\t * Unexpected response from server. Either JSON is malformed, or some required properties are missing\n\t */\n\tincorrectServerResponse = \"incorrectServerResponse\",\n\n\t/**\n\t * This error occurs when the file is modified externally (not through Fluid protocol) in storage.\n\t * It will occur in cases where client has some state or cache that is based on old content (identity) of a file,\n\t * and storage / driver / loader detects such mismatch.\n\t * When it's hit, client needs to forget all the knowledge about this file and start over.\n\t */\n\tfileOverwrittenInStorage = \"fileOverwrittenInStorage\",\n\n\t/**\n\t * The document is read-only and delta stream connection is forbidden.\n\t */\n\tdeltaStreamConnectionForbidden = \"deltaStreamConnectionForbidden\",\n\n\t/**\n\t * The location of file/container can change on server. So if the file location moves and we try to access the old\n\t * location, then this error is thrown to let the client know about the new location info.\n\t */\n\tlocationRedirection = \"locationRedirection\",\n\n\t/**\n\t * When a file is not a Fluid file, but has Fluid extension such as \".note\",\n\t * server won't be able to open it and will return this error. The innerMostErrorCode will be\n\t * \"fluidInvalidSchema\"\n\t */\n\tfluidInvalidSchema = \"fluidInvalidSchema\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t * ! Should match the value of ContainerErrorType.usageError\n\t */\n\tusageError = \"usageError\",\n\n\t/**\n\t * File is locked for read/write by storage, e.g. whole collection is locked and access denied.\n\t */\n\tfileIsLocked = \"fileIsLocked\",\n}\n\n/**\n * Interface describing errors and warnings raised by any driver code.\n * Not expected to be implemented by a class or an object literal, but rather used in place of\n * any or unknown in various function signatures that pass errors around.\n *\n * \"Any\" in the interface name is a nod to the fact that errorType has lost its type constraint.\n * It will be either DriverErrorType or the specific driver's specialized error type enum,\n * but we can't reference a specific driver's error type enum in this code.\n */\nexport interface IAnyDriverError extends Omit<IDriverErrorBase, \"errorType\"> {\n\treadonly errorType: string;\n}\n\n/**\n * Base interface for all errors and warnings\n */\nexport interface IDriverErrorBase {\n\t/**\n\t * Classification of what type of error this is, used programmatically by consumers to interpret the error\n\t */\n\treadonly errorType: DriverErrorType;\n\n\t/**\n\t * Free-form error message\n\t */\n\treadonly message: string;\n\n\t/**\n\t * True indicates the caller may retry the failed action. False indicates it's a fatal error\n\t */\n\tcanRetry: boolean;\n\n\t/**\n\t * Best guess as to network conditions (online/offline) when the error arose.\n\t * See OnlineStatus enum in driver-utils package for expected values.\n\t */\n\tonline?: string;\n}\n\nexport interface IThrottlingWarning extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n\nexport interface IGenericNetworkError extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.genericNetworkError;\n\treadonly statusCode?: number;\n}\n\nexport interface IAuthorizationError extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.authorizationError;\n\treadonly claims?: string;\n\treadonly tenantId?: string;\n}\n\nexport interface ILocationRedirectionError extends IDriverErrorBase {\n\treadonly errorType: DriverErrorType.locationRedirection;\n\treadonly redirectUrl: IResolvedUrl;\n}\n\n/**\n * Having this uber interface without types that have their own interfaces\n * allows compiler to differentiate interfaces based on error type\n */\nexport interface IDriverBasicError extends IDriverErrorBase {\n\treadonly errorType:\n\t\t| DriverErrorType.genericError\n\t\t| DriverErrorType.fileNotFoundOrAccessDeniedError\n\t\t| DriverErrorType.offlineError\n\t\t| DriverErrorType.unsupportedClientProtocolVersion\n\t\t| DriverErrorType.writeError\n\t\t| DriverErrorType.fetchFailure\n\t\t| DriverErrorType.fetchTokenError\n\t\t| DriverErrorType.incorrectServerResponse\n\t\t| DriverErrorType.fileOverwrittenInStorage\n\t\t| DriverErrorType.fluidInvalidSchema\n\t\t| DriverErrorType.usageError\n\t\t| DriverErrorType.fileIsLocked;\n\treadonly statusCode?: number;\n}\n\nexport type DriverError =\n\t| IThrottlingWarning\n\t| IGenericNetworkError\n\t| IAuthorizationError\n\t| ILocationRedirectionError\n\t| IDriverBasicError;\n"]}
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAC/B,OAAO,EACP,aAAa,EACb,eAAe,EACf,mBAAmB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,GACZ,MAAM,eAAe,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,eAAe,GAQf,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,WAAW,EAeX,mBAAmB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAEN,YAAY,GAQZ,MAAM,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tDriverError,\n\tDriverErrorType,\n\tIAnyDriverError,\n\tIAuthorizationError,\n\tIDriverErrorBase,\n\tIDriverBasicError,\n\tIGenericNetworkError,\n\tILocationRedirectionError,\n\tIThrottlingWarning,\n} from \"./driverError\";\nexport {\n\tFetchSource,\n\tFiveDaysMs,\n\tIDeltasFetchResult,\n\tIDeltaStorageService,\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaConnectionEvents,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIDocumentServicePolicies,\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tIStream,\n\tIStreamResult,\n\tISummaryContext,\n\tLoaderCachingPolicy,\n} from \"./storage\";\nexport {\n\tDriverPreCheckInfo,\n\tDriverHeader,\n\tIContainerPackageInfo,\n\tIDriverHeader,\n\tIFluidResolvedUrl,\n\tIResolvedUrl,\n\tIResolvedUrlBase,\n\tIWebResolvedUrl,\n\tIUrlResolver,\n} from \"./urlResolver\";\n"]}
|
package/lib/storage.d.ts
CHANGED
|
@@ -231,7 +231,7 @@ export interface IDocumentService {
|
|
|
231
231
|
*/
|
|
232
232
|
policies?: IDocumentServicePolicies;
|
|
233
233
|
/**
|
|
234
|
-
* Access to storage associated with the document
|
|
234
|
+
* Access to storage associated with the document
|
|
235
235
|
*/
|
|
236
236
|
connectToStorage(): Promise<IDocumentStorageService>;
|
|
237
237
|
/**
|
|
@@ -248,7 +248,7 @@ export interface IDocumentService {
|
|
|
248
248
|
* Please note that it does not remove the need for caller to close all active delta connections,
|
|
249
249
|
* as storage may not be tracking such objects.
|
|
250
250
|
* @param error - tells if container (and storage) are closed due to critical error.
|
|
251
|
-
* Error might be due to disconnect between client & server
|
|
251
|
+
* Error might be due to disconnect between client & server knowledge about file, like file being overwritten
|
|
252
252
|
* in storage, but client having stale local cache.
|
|
253
253
|
* If driver implements any kind of local caching, such caches needs to be cleared on on critical errors.
|
|
254
254
|
*/
|
package/lib/storage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,EACL,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,QAAQ,EAAE,yBAAyB,EAAE,CAAC;IAEtC;;;;OAIG;IACH,aAAa,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;;;;;;OASG;IACH,GAAG,CACF,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EAAE,YAAY;IAC1B,EAAE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