@fluidframework/driver-utils 2.0.2 → 2.1.0-276326

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/README.md CHANGED
@@ -21,6 +21,15 @@ To get started, install the package by running the following command:
21
21
  npm i @fluidframework/driver-utils
22
22
  ```
23
23
 
24
+ ## Importing from this package
25
+
26
+ This package leverages [package.json exports](https://nodejs.org/api/packages.html#exports) to separate its APIs by support level.
27
+ For more information on the related support guarantees, see [API Support Levels](https://fluidframework.com/docs/build/releases-and-apitags/#api-support-levels).
28
+
29
+ To access the `public` ([SemVer](https://semver.org/)) APIs, import via `@fluidframework/driver-utils` like normal.
30
+
31
+ To access the `legacy` APIs, import via `@fluidframework/driver-utils/legacy`.
32
+
24
33
  ## API Documentation
25
34
 
26
35
  API documentation for **@fluidframework/driver-utils** is available at <https://fluidframework.com/docs/apis/driver-utils>.
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-base.esm.legacy.json"
4
+ }
@@ -4,46 +4,6 @@
4
4
 
5
5
  ```ts
6
6
 
7
- import { FetchSource } from '@fluidframework/driver-definitions/internal';
8
- import { IAttachment } from '@fluidframework/driver-definitions/internal';
9
- import { IAuthorizationError } from '@fluidframework/driver-definitions/internal';
10
- import { IBlob } from '@fluidframework/driver-definitions/internal';
11
- import { ICommittedProposal } from '@fluidframework/driver-definitions/internal';
12
- import { ICreateBlobResponse } from '@fluidframework/driver-definitions/internal';
13
- import { IDeltasFetchResult } from '@fluidframework/driver-definitions/internal';
14
- import { IDocumentAttributes } from '@fluidframework/driver-definitions/internal';
15
- import { IDocumentMessage } from '@fluidframework/driver-definitions/internal';
16
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
17
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
18
- import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
19
- import { IDriverErrorBase } from '@fluidframework/driver-definitions/internal';
20
- import { IFluidErrorBase } from '@fluidframework/telemetry-utils/internal';
21
- import { IGitTree } from '@fluidframework/driver-definitions/internal';
22
- import { ILocationRedirectionError } from '@fluidframework/driver-definitions/internal';
23
- import { IRequest } from '@fluidframework/core-interfaces';
24
- import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
25
- import { ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
26
- import { ISnapshot } from '@fluidframework/driver-definitions/internal';
27
- import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
28
- import { ISnapshotTree } from '@fluidframework/driver-definitions/internal';
29
- import { ISnapshotTreeEx } from '@fluidframework/driver-definitions/internal';
30
- import { IStream } from '@fluidframework/driver-definitions/internal';
31
- import { IStreamResult } from '@fluidframework/driver-definitions/internal';
32
- import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
33
- import { ISummaryHandle } from '@fluidframework/driver-definitions';
34
- import { ISummaryTree } from '@fluidframework/driver-definitions';
35
- import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
36
- import type { ITelemetryErrorEventExt } from '@fluidframework/telemetry-utils/internal';
37
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
38
- import { IThrottlingWarning } from '@fluidframework/driver-definitions/internal';
39
- import { ITree } from '@fluidframework/driver-definitions/internal';
40
- import { ITreeEntry } from '@fluidframework/driver-definitions/internal';
41
- import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
42
- import { IVersion } from '@fluidframework/driver-definitions/internal';
43
- import { LoaderCachingPolicy } from '@fluidframework/driver-definitions/internal';
44
- import { LoggingError } from '@fluidframework/telemetry-utils/internal';
45
- import { SummaryObject } from '@fluidframework/driver-definitions/internal';
46
-
47
7
  // @public (undocumented)
48
8
  export interface ICompressionStorageConfig {
49
9
  // (undocumented)
@@ -0,0 +1,38 @@
1
+ ## Alpha API Report File for "@fluidframework/driver-utils"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ // @public (undocumented)
8
+ export interface ICompressionStorageConfig {
9
+ // (undocumented)
10
+ algorithm: SummaryCompressionAlgorithm;
11
+ // (undocumented)
12
+ minSizeToCompress: number;
13
+ }
14
+
15
+ // @alpha (undocumented)
16
+ export class RateLimiter {
17
+ constructor(maxRequests: number);
18
+ // (undocumented)
19
+ protected acquire(): Promise<void>;
20
+ // (undocumented)
21
+ protected readonly release: () => void;
22
+ // (undocumented)
23
+ schedule<T>(work: () => Promise<T>): Promise<T>;
24
+ // (undocumented)
25
+ get waitQueueLength(): number;
26
+ }
27
+
28
+ // @public (undocumented)
29
+ export enum SummaryCompressionAlgorithm {
30
+ // (undocumented)
31
+ LZ4 = 1,
32
+ // (undocumented)
33
+ None = 0
34
+ }
35
+
36
+ // (No @packageDocumentation comment for this package)
37
+
38
+ ```
@@ -4,46 +4,6 @@
4
4
 
5
5
  ```ts
6
6
 
7
- import { FetchSource } from '@fluidframework/driver-definitions/internal';
8
- import { IAttachment } from '@fluidframework/driver-definitions/internal';
9
- import { IAuthorizationError } from '@fluidframework/driver-definitions/internal';
10
- import { IBlob } from '@fluidframework/driver-definitions/internal';
11
- import { ICommittedProposal } from '@fluidframework/driver-definitions/internal';
12
- import { ICreateBlobResponse } from '@fluidframework/driver-definitions/internal';
13
- import { IDeltasFetchResult } from '@fluidframework/driver-definitions/internal';
14
- import { IDocumentAttributes } from '@fluidframework/driver-definitions/internal';
15
- import { IDocumentMessage } from '@fluidframework/driver-definitions/internal';
16
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
17
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
18
- import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
19
- import { IDriverErrorBase } from '@fluidframework/driver-definitions/internal';
20
- import { IFluidErrorBase } from '@fluidframework/telemetry-utils/internal';
21
- import { IGitTree } from '@fluidframework/driver-definitions/internal';
22
- import { ILocationRedirectionError } from '@fluidframework/driver-definitions/internal';
23
- import { IRequest } from '@fluidframework/core-interfaces';
24
- import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
25
- import { ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
26
- import { ISnapshot } from '@fluidframework/driver-definitions/internal';
27
- import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
28
- import { ISnapshotTree } from '@fluidframework/driver-definitions/internal';
29
- import { ISnapshotTreeEx } from '@fluidframework/driver-definitions/internal';
30
- import { IStream } from '@fluidframework/driver-definitions/internal';
31
- import { IStreamResult } from '@fluidframework/driver-definitions/internal';
32
- import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
33
- import { ISummaryHandle } from '@fluidframework/driver-definitions';
34
- import { ISummaryTree } from '@fluidframework/driver-definitions';
35
- import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
36
- import type { ITelemetryErrorEventExt } from '@fluidframework/telemetry-utils/internal';
37
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
38
- import { IThrottlingWarning } from '@fluidframework/driver-definitions/internal';
39
- import { ITree } from '@fluidframework/driver-definitions/internal';
40
- import { ITreeEntry } from '@fluidframework/driver-definitions/internal';
41
- import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
42
- import { IVersion } from '@fluidframework/driver-definitions/internal';
43
- import { LoaderCachingPolicy } from '@fluidframework/driver-definitions/internal';
44
- import { LoggingError } from '@fluidframework/telemetry-utils/internal';
45
- import { SummaryObject } from '@fluidframework/driver-definitions/internal';
46
-
47
7
  // @public (undocumented)
48
8
  export interface ICompressionStorageConfig {
49
9
  // (undocumented)
package/dist/legacy.d.ts CHANGED
@@ -13,6 +13,6 @@ export {
13
13
  ICompressionStorageConfig,
14
14
  SummaryCompressionAlgorithm,
15
15
 
16
- // @alpha APIs
16
+ // @legacy APIs
17
17
  RateLimiter
18
18
  } from "./index.js";
@@ -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/driver-utils";
8
- export declare const pkgVersion = "2.0.2";
8
+ export declare const pkgVersion = "2.1.0-276326";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,UAAU,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,iBAAiB,CAAC"}
@@ -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/driver-utils";
11
- exports.pkgVersion = "2.0.2";
11
+ exports.pkgVersion = "2.1.0-276326";
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,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,OAAO,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/driver-utils\";\nexport const pkgVersion = \"2.0.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,cAAc,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/driver-utils\";\nexport const pkgVersion = \"2.1.0-276326\";\n"]}
@@ -3,6 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
+ * @legacy
6
7
  * @alpha
7
8
  */
8
9
  export declare class RateLimiter {
@@ -1 +1 @@
1
- {"version":3,"file":"rateLimiter.d.ts","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,qBAAa,WAAW;IAEX,OAAO,CAAC,WAAW;IAD/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBACxB,WAAW,EAAE,MAAM;IAIvC,IAAW,eAAe,IAAI,MAAM,CAEnC;IAID,SAAS,CAAC,QAAQ,CAAC,OAAO,aAMxB;cAEc,OAAO;IAWV,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;CAI/C"}
1
+ {"version":3,"file":"rateLimiter.d.ts","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,qBAAa,WAAW;IAEX,OAAO,CAAC,WAAW;IAD/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBACxB,WAAW,EAAE,MAAM;IAIvC,IAAW,eAAe,IAAI,MAAM,CAEnC;IAID,SAAS,CAAC,QAAQ,CAAC,OAAO,aAMxB;cAEc,OAAO;IAWV,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;CAI/C"}
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.RateLimiter = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  /**
10
+ * @legacy
10
11
  * @alpha
11
12
  */
12
13
  class RateLimiter {
@@ -1 +1 @@
1
- {"version":3,"file":"rateLimiter.js","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D;;GAEG;AACH,MAAa,WAAW;IAEvB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QADtB,UAAK,GAAmB,EAAE,CAAC;QAS5C,8CAA8C;QAC9C,0EAA0E;QACvD,YAAO,GAAG,GAAG,EAAE;YACjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAO,IAAI,EAAE,CAAC;YACf,CAAC;YACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACpB,CAAC,CAAC;QAfD,IAAA,iBAAM,EAAC,WAAW,GAAG,CAAC,EAAE,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC1F,CAAC;IAED,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAYS,KAAK,CAAC,OAAO;QACtB,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO;QACR,CAAC;QAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACpC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAI,IAAsB;QAC9C,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACD;AAnCD,kCAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * @alpha\n */\nexport class RateLimiter {\n\tprivate readonly tasks: (() => void)[] = [];\n\tconstructor(private maxRequests: number) {\n\t\tassert(maxRequests > 0, 0x0ae /* \"Tried to create rate limiter with 0 max requests!\" */);\n\t}\n\n\tpublic get waitQueueLength(): number {\n\t\treturn this.tasks.length;\n\t}\n\n\t// Run when one of the tasks finished running.\n\t// Release next task if we have one, or allow more tasks to run in future.\n\tprotected readonly release = () => {\n\t\tconst task = this.tasks.shift();\n\t\tif (task !== undefined) {\n\t\t\treturn task();\n\t\t}\n\t\tthis.maxRequests++;\n\t};\n\n\tprotected async acquire() {\n\t\tif (this.maxRequests > 0) {\n\t\t\tthis.maxRequests--;\n\t\t\treturn;\n\t\t}\n\n\t\treturn new Promise<void>((resolve) => {\n\t\t\tthis.tasks.push(resolve);\n\t\t});\n\t}\n\n\tpublic async schedule<T>(work: () => Promise<T>) {\n\t\tawait this.acquire();\n\t\treturn work().finally(this.release);\n\t}\n}\n"]}
1
+ {"version":3,"file":"rateLimiter.js","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D;;;GAGG;AACH,MAAa,WAAW;IAEvB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QADtB,UAAK,GAAmB,EAAE,CAAC;QAS5C,8CAA8C;QAC9C,0EAA0E;QACvD,YAAO,GAAG,GAAG,EAAE;YACjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAO,IAAI,EAAE,CAAC;YACf,CAAC;YACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACpB,CAAC,CAAC;QAfD,IAAA,iBAAM,EAAC,WAAW,GAAG,CAAC,EAAE,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC1F,CAAC;IAED,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAYS,KAAK,CAAC,OAAO;QACtB,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO;QACR,CAAC;QAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACpC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAI,IAAsB;QAC9C,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACD;AAnCD,kCAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * @legacy\n * @alpha\n */\nexport class RateLimiter {\n\tprivate readonly tasks: (() => void)[] = [];\n\tconstructor(private maxRequests: number) {\n\t\tassert(maxRequests > 0, 0x0ae /* \"Tried to create rate limiter with 0 max requests!\" */);\n\t}\n\n\tpublic get waitQueueLength(): number {\n\t\treturn this.tasks.length;\n\t}\n\n\t// Run when one of the tasks finished running.\n\t// Release next task if we have one, or allow more tasks to run in future.\n\tprotected readonly release = () => {\n\t\tconst task = this.tasks.shift();\n\t\tif (task !== undefined) {\n\t\t\treturn task();\n\t\t}\n\t\tthis.maxRequests++;\n\t};\n\n\tprotected async acquire() {\n\t\tif (this.maxRequests > 0) {\n\t\t\tthis.maxRequests--;\n\t\t\treturn;\n\t\t}\n\n\t\treturn new Promise<void>((resolve) => {\n\t\t\tthis.tasks.push(resolve);\n\t\t});\n\t}\n\n\tpublic async schedule<T>(work: () => Promise<T>) {\n\t\tawait this.acquire();\n\t\treturn work().finally(this.release);\n\t}\n}\n"]}
package/lib/legacy.d.ts CHANGED
@@ -13,6 +13,6 @@ export {
13
13
  ICompressionStorageConfig,
14
14
  SummaryCompressionAlgorithm,
15
15
 
16
- // @alpha APIs
16
+ // @legacy APIs
17
17
  RateLimiter
18
18
  } from "./index.js";
@@ -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/driver-utils";
8
- export declare const pkgVersion = "2.0.2";
8
+ export declare const pkgVersion = "2.1.0-276326";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,UAAU,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,iBAAiB,CAAC"}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/driver-utils";
8
- export const pkgVersion = "2.0.2";
8
+ export const pkgVersion = "2.1.0-276326";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,8BAA8B,CAAC;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,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/driver-utils\";\nexport const pkgVersion = \"2.0.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,8BAA8B,CAAC;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,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/driver-utils\";\nexport const pkgVersion = \"2.1.0-276326\";\n"]}
@@ -3,6 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
+ * @legacy
6
7
  * @alpha
7
8
  */
8
9
  export declare class RateLimiter {
@@ -1 +1 @@
1
- {"version":3,"file":"rateLimiter.d.ts","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,qBAAa,WAAW;IAEX,OAAO,CAAC,WAAW;IAD/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBACxB,WAAW,EAAE,MAAM;IAIvC,IAAW,eAAe,IAAI,MAAM,CAEnC;IAID,SAAS,CAAC,QAAQ,CAAC,OAAO,aAMxB;cAEc,OAAO;IAWV,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;CAI/C"}
1
+ {"version":3,"file":"rateLimiter.d.ts","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,qBAAa,WAAW;IAEX,OAAO,CAAC,WAAW;IAD/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBACxB,WAAW,EAAE,MAAM;IAIvC,IAAW,eAAe,IAAI,MAAM,CAEnC;IAID,SAAS,CAAC,QAAQ,CAAC,OAAO,aAMxB;cAEc,OAAO;IAWV,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;CAI/C"}
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { assert } from "@fluidframework/core-utils/internal";
6
6
  /**
7
+ * @legacy
7
8
  * @alpha
8
9
  */
9
10
  export class RateLimiter {
@@ -1 +1 @@
1
- {"version":3,"file":"rateLimiter.js","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,WAAW;IAEvB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QADtB,UAAK,GAAmB,EAAE,CAAC;QAS5C,8CAA8C;QAC9C,0EAA0E;QACvD,YAAO,GAAG,GAAG,EAAE;YACjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAO,IAAI,EAAE,CAAC;YACf,CAAC;YACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACpB,CAAC,CAAC;QAfD,MAAM,CAAC,WAAW,GAAG,CAAC,EAAE,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC1F,CAAC;IAED,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAYS,KAAK,CAAC,OAAO;QACtB,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO;QACR,CAAC;QAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACpC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAI,IAAsB;QAC9C,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * @alpha\n */\nexport class RateLimiter {\n\tprivate readonly tasks: (() => void)[] = [];\n\tconstructor(private maxRequests: number) {\n\t\tassert(maxRequests > 0, 0x0ae /* \"Tried to create rate limiter with 0 max requests!\" */);\n\t}\n\n\tpublic get waitQueueLength(): number {\n\t\treturn this.tasks.length;\n\t}\n\n\t// Run when one of the tasks finished running.\n\t// Release next task if we have one, or allow more tasks to run in future.\n\tprotected readonly release = () => {\n\t\tconst task = this.tasks.shift();\n\t\tif (task !== undefined) {\n\t\t\treturn task();\n\t\t}\n\t\tthis.maxRequests++;\n\t};\n\n\tprotected async acquire() {\n\t\tif (this.maxRequests > 0) {\n\t\t\tthis.maxRequests--;\n\t\t\treturn;\n\t\t}\n\n\t\treturn new Promise<void>((resolve) => {\n\t\t\tthis.tasks.push(resolve);\n\t\t});\n\t}\n\n\tpublic async schedule<T>(work: () => Promise<T>) {\n\t\tawait this.acquire();\n\t\treturn work().finally(this.release);\n\t}\n}\n"]}
1
+ {"version":3,"file":"rateLimiter.js","sourceRoot":"","sources":["../src/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D;;;GAGG;AACH,MAAM,OAAO,WAAW;IAEvB,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QADtB,UAAK,GAAmB,EAAE,CAAC;QAS5C,8CAA8C;QAC9C,0EAA0E;QACvD,YAAO,GAAG,GAAG,EAAE;YACjC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACxB,OAAO,IAAI,EAAE,CAAC;YACf,CAAC;YACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACpB,CAAC,CAAC;QAfD,MAAM,CAAC,WAAW,GAAG,CAAC,EAAE,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC1F,CAAC;IAED,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC1B,CAAC;IAYS,KAAK,CAAC,OAAO;QACtB,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO;QACR,CAAC;QAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACpC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAI,IAAsB;QAC9C,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * @legacy\n * @alpha\n */\nexport class RateLimiter {\n\tprivate readonly tasks: (() => void)[] = [];\n\tconstructor(private maxRequests: number) {\n\t\tassert(maxRequests > 0, 0x0ae /* \"Tried to create rate limiter with 0 max requests!\" */);\n\t}\n\n\tpublic get waitQueueLength(): number {\n\t\treturn this.tasks.length;\n\t}\n\n\t// Run when one of the tasks finished running.\n\t// Release next task if we have one, or allow more tasks to run in future.\n\tprotected readonly release = () => {\n\t\tconst task = this.tasks.shift();\n\t\tif (task !== undefined) {\n\t\t\treturn task();\n\t\t}\n\t\tthis.maxRequests++;\n\t};\n\n\tprotected async acquire() {\n\t\tif (this.maxRequests > 0) {\n\t\t\tthis.maxRequests--;\n\t\t\treturn;\n\t\t}\n\n\t\treturn new Promise<void>((resolve) => {\n\t\t\tthis.tasks.push(resolve);\n\t\t});\n\t}\n\n\tpublic async schedule<T>(work: () => Promise<T>) {\n\t\tawait this.acquire();\n\t\treturn work().finally(this.release);\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/driver-utils",
3
- "version": "2.0.2",
3
+ "version": "2.1.0-276326",
4
4
  "description": "Collection of utility functions for Fluid drivers",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -67,11 +67,11 @@
67
67
  "temp-directory": "nyc/.nyc_output"
68
68
  },
69
69
  "dependencies": {
70
- "@fluid-internal/client-utils": "~2.0.2",
71
- "@fluidframework/core-interfaces": "~2.0.2",
72
- "@fluidframework/core-utils": "~2.0.2",
73
- "@fluidframework/driver-definitions": "~2.0.2",
74
- "@fluidframework/telemetry-utils": "~2.0.2",
70
+ "@fluid-internal/client-utils": "2.1.0-276326",
71
+ "@fluidframework/core-interfaces": "2.1.0-276326",
72
+ "@fluidframework/core-utils": "2.1.0-276326",
73
+ "@fluidframework/driver-definitions": "2.1.0-276326",
74
+ "@fluidframework/telemetry-utils": "2.1.0-276326",
75
75
  "axios": "^1.6.2",
76
76
  "lz4js": "^0.2.0",
77
77
  "uuid": "^9.0.0"
@@ -79,11 +79,11 @@
79
79
  "devDependencies": {
80
80
  "@arethetypeswrong/cli": "^0.15.2",
81
81
  "@biomejs/biome": "^1.7.3",
82
- "@fluid-internal/mocha-test-setup": "~2.0.2",
82
+ "@fluid-internal/mocha-test-setup": "2.1.0-276326",
83
83
  "@fluid-tools/build-cli": "^0.39.0",
84
84
  "@fluidframework/build-common": "^2.0.3",
85
85
  "@fluidframework/build-tools": "^0.39.0",
86
- "@fluidframework/driver-utils-previous": "npm:@fluidframework/driver-utils@2.0.0-rc.4.0.0",
86
+ "@fluidframework/driver-utils-previous": "npm:@fluidframework/driver-utils@2.0.0-rc.5.0.0",
87
87
  "@fluidframework/eslint-config-fluid": "^5.3.0",
88
88
  "@microsoft/api-extractor": "^7.45.1",
89
89
  "@types/mocha": "^9.1.1",
@@ -109,12 +109,14 @@
109
109
  },
110
110
  "scripts": {
111
111
  "api": "fluid-build . --task api",
112
- "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist",
113
- "api-extractor:esnext": "flub generate entrypoints --outFileAlpha legacy --outDir ./lib --node10TypeCompat",
112
+ "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
113
+ "api-extractor:esnext": "flub generate entrypoints --outDir ./lib --node10TypeCompat",
114
114
  "build": "fluid-build . --task build",
115
115
  "build:commonjs": "fluid-build . --task commonjs",
116
116
  "build:compile": "fluid-build . --task compile",
117
- "build:docs": "api-extractor run --local",
117
+ "build:docs": "concurrently \"npm:build:docs:*\"",
118
+ "build:docs:current": "api-extractor run --local",
119
+ "build:docs:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json",
118
120
  "build:esnext": "tsc --project ./tsconfig.json",
119
121
  "build:genver": "gen-version",
120
122
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
@@ -130,7 +132,9 @@
130
132
  "check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
131
133
  "check:format": "npm run check:biome",
132
134
  "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
133
- "ci:build:docs": "api-extractor run",
135
+ "ci:build:docs": "concurrently \"npm:ci:build:docs:*\"",
136
+ "ci:build:docs:current": "api-extractor run",
137
+ "ci:build:docs:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
134
138
  "clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
135
139
  "eslint": "eslint --format stylish src",
136
140
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
@@ -146,7 +150,7 @@
146
150
  "test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit",
147
151
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
148
152
  "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
149
- "typetests:gen": "flub generate typetests --dir . -v --publicFallback",
153
+ "typetests:gen": "flub generate typetests --dir . -v",
150
154
  "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
151
155
  }
152
156
  }
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/driver-utils";
9
- export const pkgVersion = "2.0.2";
9
+ export const pkgVersion = "2.1.0-276326";
@@ -6,6 +6,7 @@
6
6
  import { assert } from "@fluidframework/core-utils/internal";
7
7
 
8
8
  /**
9
+ * @legacy
9
10
  * @alpha
10
11
  */
11
12
  export class RateLimiter {
@@ -1,78 +0,0 @@
1
- ## Alpha API Report File for "@fluidframework/driver-utils"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { FetchSource } from '@fluidframework/driver-definitions/internal';
8
- import { IAttachment } from '@fluidframework/driver-definitions/internal';
9
- import { IAuthorizationError } from '@fluidframework/driver-definitions/internal';
10
- import { IBlob } from '@fluidframework/driver-definitions/internal';
11
- import { ICommittedProposal } from '@fluidframework/driver-definitions/internal';
12
- import { ICreateBlobResponse } from '@fluidframework/driver-definitions/internal';
13
- import { IDeltasFetchResult } from '@fluidframework/driver-definitions/internal';
14
- import { IDocumentAttributes } from '@fluidframework/driver-definitions/internal';
15
- import { IDocumentMessage } from '@fluidframework/driver-definitions/internal';
16
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
17
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
18
- import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions/internal';
19
- import { IDriverErrorBase } from '@fluidframework/driver-definitions/internal';
20
- import { IFluidErrorBase } from '@fluidframework/telemetry-utils/internal';
21
- import { IGitTree } from '@fluidframework/driver-definitions/internal';
22
- import { ILocationRedirectionError } from '@fluidframework/driver-definitions/internal';
23
- import { IRequest } from '@fluidframework/core-interfaces';
24
- import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
25
- import { ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
26
- import { ISnapshot } from '@fluidframework/driver-definitions/internal';
27
- import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions/internal';
28
- import { ISnapshotTree } from '@fluidframework/driver-definitions/internal';
29
- import { ISnapshotTreeEx } from '@fluidframework/driver-definitions/internal';
30
- import { IStream } from '@fluidframework/driver-definitions/internal';
31
- import { IStreamResult } from '@fluidframework/driver-definitions/internal';
32
- import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
33
- import { ISummaryHandle } from '@fluidframework/driver-definitions';
34
- import { ISummaryTree } from '@fluidframework/driver-definitions';
35
- import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
36
- import type { ITelemetryErrorEventExt } from '@fluidframework/telemetry-utils/internal';
37
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
38
- import { IThrottlingWarning } from '@fluidframework/driver-definitions/internal';
39
- import { ITree } from '@fluidframework/driver-definitions/internal';
40
- import { ITreeEntry } from '@fluidframework/driver-definitions/internal';
41
- import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
42
- import { IVersion } from '@fluidframework/driver-definitions/internal';
43
- import { LoaderCachingPolicy } from '@fluidframework/driver-definitions/internal';
44
- import { LoggingError } from '@fluidframework/telemetry-utils/internal';
45
- import { SummaryObject } from '@fluidframework/driver-definitions/internal';
46
-
47
- // @public (undocumented)
48
- export interface ICompressionStorageConfig {
49
- // (undocumented)
50
- algorithm: SummaryCompressionAlgorithm;
51
- // (undocumented)
52
- minSizeToCompress: number;
53
- }
54
-
55
- // @alpha (undocumented)
56
- export class RateLimiter {
57
- constructor(maxRequests: number);
58
- // (undocumented)
59
- protected acquire(): Promise<void>;
60
- // (undocumented)
61
- protected readonly release: () => void;
62
- // (undocumented)
63
- schedule<T>(work: () => Promise<T>): Promise<T>;
64
- // (undocumented)
65
- get waitQueueLength(): number;
66
- }
67
-
68
- // @public (undocumented)
69
- export enum SummaryCompressionAlgorithm {
70
- // (undocumented)
71
- LZ4 = 1,
72
- // (undocumented)
73
- None = 0
74
- }
75
-
76
- // (No @packageDocumentation comment for this package)
77
-
78
- ```