@fluidframework/test-utils 2.0.0-dev.7.4.0.215747 → 2.0.0-dev.7.4.0.216897
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/api-extractor-lint.json +13 -0
- package/api-extractor.json +0 -4
- package/api-report/test-utils.api.md +79 -73
- package/dist/DriverWrappers.d.ts +3 -0
- package/dist/DriverWrappers.d.ts.map +1 -1
- package/dist/DriverWrappers.js +3 -0
- package/dist/DriverWrappers.js.map +1 -1
- package/dist/TestConfigs.d.ts +3 -0
- package/dist/TestConfigs.d.ts.map +1 -1
- package/dist/TestConfigs.js +3 -0
- package/dist/TestConfigs.js.map +1 -1
- package/dist/TestSummaryUtils.d.ts +3 -0
- package/dist/TestSummaryUtils.d.ts.map +1 -1
- package/dist/TestSummaryUtils.js +3 -0
- package/dist/TestSummaryUtils.js.map +1 -1
- package/dist/containerUtils.d.ts +11 -0
- package/dist/containerUtils.d.ts.map +1 -1
- package/dist/containerUtils.js +27 -2
- package/dist/containerUtils.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +6 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/loaderContainerTracker.d.ts +3 -0
- package/dist/loaderContainerTracker.d.ts.map +1 -1
- package/dist/loaderContainerTracker.js +3 -0
- package/dist/loaderContainerTracker.js.map +1 -1
- package/dist/localCodeLoader.d.ts +7 -0
- package/dist/localCodeLoader.d.ts.map +1 -1
- package/dist/localCodeLoader.js +1 -0
- package/dist/localCodeLoader.js.map +1 -1
- package/dist/localLoader.d.ts +2 -0
- package/dist/localLoader.d.ts.map +1 -1
- package/dist/localLoader.js +2 -0
- package/dist/localLoader.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/retry.d.ts +1 -0
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +1 -0
- package/dist/retry.js.map +1 -1
- package/dist/test-utils-alpha.d.ts +176 -678
- package/dist/test-utils-beta.d.ts +176 -678
- package/dist/test-utils-public.d.ts +176 -678
- package/dist/test-utils-untrimmed.d.ts +348 -37
- package/dist/testContainerRuntimeFactory.d.ts +2 -0
- package/dist/testContainerRuntimeFactory.d.ts.map +1 -1
- package/dist/testContainerRuntimeFactory.js +15 -7
- package/dist/testContainerRuntimeFactory.js.map +1 -1
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts +1 -0
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js +1 -0
- package/dist/testContainerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
- package/dist/testFluidObject.d.ts +5 -0
- package/dist/testFluidObject.d.ts.map +1 -1
- package/dist/testFluidObject.js +2 -0
- package/dist/testFluidObject.js.map +1 -1
- package/dist/testObjectProvider.d.ts +287 -37
- package/dist/testObjectProvider.d.ts.map +1 -1
- package/dist/testObjectProvider.js +310 -25
- package/dist/testObjectProvider.js.map +1 -1
- package/dist/timeoutUtils.d.ts +11 -0
- package/dist/timeoutUtils.d.ts.map +1 -1
- package/dist/timeoutUtils.js +5 -0
- package/dist/timeoutUtils.js.map +1 -1
- package/lib/test-utils-alpha.d.ts +176 -678
- package/lib/test-utils-beta.d.ts +176 -678
- package/lib/test-utils-public.d.ts +176 -678
- package/lib/test-utils-untrimmed.d.ts +348 -37
- package/package.json +34 -24
- package/src/DriverWrappers.ts +3 -0
- package/src/TestConfigs.ts +3 -0
- package/src/TestSummaryUtils.ts +3 -0
- package/src/containerUtils.ts +27 -1
- package/src/index.ts +7 -1
- package/src/interfaces.ts +6 -0
- package/src/loaderContainerTracker.ts +3 -0
- package/src/localCodeLoader.ts +7 -0
- package/src/localLoader.ts +2 -0
- package/src/packageVersion.ts +1 -1
- package/src/retry.ts +1 -0
- package/src/testContainerRuntimeFactory.ts +24 -5
- package/src/testContainerRuntimeFactoryWithDefaultDataStore.ts +1 -0
- package/src/testFluidObject.ts +5 -0
- package/src/testObjectProvider.ts +524 -47
- package/src/timeoutUtils.ts +11 -0
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/test-utils";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-dev.7.4.0.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-dev.7.4.0.216897";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/test-utils";
|
|
11
|
-
exports.pkgVersion = "2.0.0-dev.7.4.0.
|
|
11
|
+
exports.pkgVersion = "2.0.0-dev.7.4.0.216897";
|
|
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,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,wBAAwB,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/test-utils\";\nexport const pkgVersion = \"2.0.0-dev.7.4.0.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,wBAAwB,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/test-utils\";\nexport const pkgVersion = \"2.0.0-dev.7.4.0.216897\";\n"]}
|
package/dist/retry.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @param maxTries - maximum number of attempts
|
|
13
13
|
* @param backOffMs - back off between attempts in milliseconds
|
|
14
14
|
* @returns the actual value from the callback when successful or the default value otherwise
|
|
15
|
+
* @internal
|
|
15
16
|
*/
|
|
16
17
|
export declare const retryWithEventualValue: <T>(callback: () => Promise<T>, check: (value: T) => boolean, defaultValue: T, maxTries?: number, backOffMs?: number) => Promise<T>;
|
|
17
18
|
//# sourceMappingURL=retry.d.ts.map
|
package/dist/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,uDAEb,OAAO,uEAiB3B,CAAC"}
|
package/dist/retry.js
CHANGED
|
@@ -28,6 +28,7 @@ const retry = async (callback, defaultValue, maxTries, backOffMs) => {
|
|
|
28
28
|
* @param maxTries - maximum number of attempts
|
|
29
29
|
* @param backOffMs - back off between attempts in milliseconds
|
|
30
30
|
* @returns the actual value from the callback when successful or the default value otherwise
|
|
31
|
+
* @internal
|
|
31
32
|
*/
|
|
32
33
|
const retryWithEventualValue = async (callback, check, defaultValue, maxTries = 20, backOffMs = 50) => retry(async () => {
|
|
33
34
|
const value = await callback();
|
package/dist/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAmD;AAEnD,MAAM,KAAK,GAAG,KAAK,EAClB,QAA0B,EAC1B,YAAe,EACf,QAAgB,EAChB,SAAiB,EACJ,EAAE;IACf,KAAK,IAAI,UAAU,GAAG,CAAC,EAAE,UAAU,IAAI,QAAQ,EAAE,UAAU,EAAE,EAAE;QAC9D,IAAI;YACH,MAAM,MAAM,GAAG,MAAM,QAAQ,EAAE,CAAC;YAChC,OAAO,MAAM,CAAC;SACd;QAAC,OAAO,KAAK,EAAE;YACf,MAAM,IAAA,kBAAK,EAAC,UAAU,GAAG,SAAS,CAAC,CAAC;SACpC;KACD;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAmD;AAEnD,MAAM,KAAK,GAAG,KAAK,EAClB,QAA0B,EAC1B,YAAe,EACf,QAAgB,EAChB,SAAiB,EACJ,EAAE;IACf,KAAK,IAAI,UAAU,GAAG,CAAC,EAAE,UAAU,IAAI,QAAQ,EAAE,UAAU,EAAE,EAAE;QAC9D,IAAI;YACH,MAAM,MAAM,GAAG,MAAM,QAAQ,EAAE,CAAC;YAChC,OAAO,MAAM,CAAC;SACd;QAAC,OAAO,KAAK,EAAE;YACf,MAAM,IAAA,kBAAK,EAAC,UAAU,GAAG,SAAS,CAAC,CAAC;SACpC;KACD;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACI,MAAM,sBAAsB,GAAG,KAAK,EAC1C,QAA0B,EAC1B,KAA4B,EAC5B,YAAe,EACf,QAAQ,GAAG,EAAE,EACb,SAAS,GAAG,EAAE,EACD,EAAE,CACf,KAAK,CACJ,KAAK,IAAI,EAAE;IACV,MAAM,KAAK,GAAG,MAAM,QAAQ,EAAE,CAAC;IAC/B,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE;QACjB,OAAO,KAAK,CAAC;KACb;IAED,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC;AAC1B,CAAC,EACD,YAAY,EACZ,QAAQ,EACR,SAAS,CACT,CAAC;AAnBU,QAAA,sBAAsB,0BAmBhC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { delay } from \"@fluidframework/core-utils\";\n\nconst retry = async <T>(\n\tcallback: () => Promise<T>,\n\tdefaultValue: T,\n\tmaxTries: number,\n\tbackOffMs: number,\n): Promise<T> => {\n\tfor (let currentTry = 1; currentTry <= maxTries; currentTry++) {\n\t\ttry {\n\t\t\tconst result = await callback();\n\t\t\treturn result;\n\t\t} catch (error) {\n\t\t\tawait delay(currentTry * backOffMs);\n\t\t}\n\t}\n\n\treturn Promise.resolve(defaultValue);\n};\n\n/**\n * Simple retry mechanism with linear back off to call\n * a function which may eventually return an accepted value.\n *\n * @param callback - the function to execute\n * @param check - the function to check if the value is acceptable\n * @param defaultValue - the default value\n * @param maxTries - maximum number of attempts\n * @param backOffMs - back off between attempts in milliseconds\n * @returns the actual value from the callback when successful or the default value otherwise\n * @internal\n */\nexport const retryWithEventualValue = async <T>(\n\tcallback: () => Promise<T>,\n\tcheck: (value: T) => boolean,\n\tdefaultValue: T,\n\tmaxTries = 20,\n\tbackOffMs = 50,\n): Promise<T> =>\n\tretry(\n\t\tasync () => {\n\t\t\tconst value = await callback();\n\t\t\tif (check(value)) {\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\tthrow Error(\"Not ready\");\n\t\t},\n\t\tdefaultValue,\n\t\tmaxTries,\n\t\tbackOffMs,\n\t);\n"]}
|