@bitfab/sdk 0.33.4 → 0.33.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-HWQB73HK.js → chunk-DPV6PBWE.js} +7 -4
- package/dist/chunk-DPV6PBWE.js.map +1 -0
- package/dist/{chunk-OMW6EFXC.js → chunk-JANSX65W.js} +4 -4
- package/dist/{chunk-OMW6EFXC.js.map → chunk-JANSX65W.js.map} +1 -1
- package/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +2 -2
- package/dist/node.cjs +7 -4
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +2 -2
- package/dist/{replay-4Y23OZYE.js → replay-SRQI4QMY.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-HWQB73HK.js.map +0 -1
- /package/dist/{replay-4Y23OZYE.js.map → replay-SRQI4QMY.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -752,8 +752,9 @@ type MockStrategy = "none" | "all" | "marked";
|
|
|
752
752
|
/**
|
|
753
753
|
* How the DB-snapshot branch each replay item runs against is sized and warmed.
|
|
754
754
|
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
755
|
+
* Every field is optional, so this object is only worth passing when you want
|
|
756
|
+
* to override the mirror project's own sizing. To branch with those defaults,
|
|
757
|
+
* pass `dbBranch: true` instead of an empty object.
|
|
757
758
|
*/
|
|
758
759
|
interface DbBranchOptions {
|
|
759
760
|
/**
|
|
@@ -826,17 +827,17 @@ interface ReplayOptions {
|
|
|
826
827
|
mockOverride?: MockOverride | MockOverride[];
|
|
827
828
|
/**
|
|
828
829
|
* Run each item against a database branch restored to the state its source
|
|
829
|
-
* trace saw.
|
|
830
|
-
*
|
|
831
|
-
*
|
|
832
|
-
* `getCurrentReplayBranch()`.
|
|
830
|
+
* trace saw. Pass `true` to branch with the mirror project's own sizing, or a
|
|
831
|
+
* {@link DbBranchOptions} object to tune how each branch is sized and warmed.
|
|
832
|
+
* `false` and omission leave branching off. Inside `fn`, read the resolved
|
|
833
|
+
* branch with `getCurrentReplayBranch()`.
|
|
833
834
|
*
|
|
834
835
|
* Items whose source trace carried no DB snapshot reference get no branch and
|
|
835
836
|
* run against the live database. An item whose branch was requested but could
|
|
836
837
|
* not be resolved fails instead of running, so a replay never silently
|
|
837
838
|
* reports a result that did not use the historical data you asked for.
|
|
838
839
|
*/
|
|
839
|
-
dbBranch?: DbBranchOptions;
|
|
840
|
+
dbBranch?: DbBranchOptions | boolean;
|
|
840
841
|
/** Group ID to associate this replay with an experiment group for live streaming in Studio. */
|
|
841
842
|
experimentGroupId?: string;
|
|
842
843
|
/**
|
|
@@ -1982,7 +1983,7 @@ declare class BitfabFunction {
|
|
|
1982
1983
|
/**
|
|
1983
1984
|
* SDK version from package.json (injected at build time)
|
|
1984
1985
|
*/
|
|
1985
|
-
declare const __version__ = "0.33.
|
|
1986
|
+
declare const __version__ = "0.33.6";
|
|
1986
1987
|
|
|
1987
1988
|
/**
|
|
1988
1989
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -752,8 +752,9 @@ type MockStrategy = "none" | "all" | "marked";
|
|
|
752
752
|
/**
|
|
753
753
|
* How the DB-snapshot branch each replay item runs against is sized and warmed.
|
|
754
754
|
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
755
|
+
* Every field is optional, so this object is only worth passing when you want
|
|
756
|
+
* to override the mirror project's own sizing. To branch with those defaults,
|
|
757
|
+
* pass `dbBranch: true` instead of an empty object.
|
|
757
758
|
*/
|
|
758
759
|
interface DbBranchOptions {
|
|
759
760
|
/**
|
|
@@ -826,17 +827,17 @@ interface ReplayOptions {
|
|
|
826
827
|
mockOverride?: MockOverride | MockOverride[];
|
|
827
828
|
/**
|
|
828
829
|
* Run each item against a database branch restored to the state its source
|
|
829
|
-
* trace saw.
|
|
830
|
-
*
|
|
831
|
-
*
|
|
832
|
-
* `getCurrentReplayBranch()`.
|
|
830
|
+
* trace saw. Pass `true` to branch with the mirror project's own sizing, or a
|
|
831
|
+
* {@link DbBranchOptions} object to tune how each branch is sized and warmed.
|
|
832
|
+
* `false` and omission leave branching off. Inside `fn`, read the resolved
|
|
833
|
+
* branch with `getCurrentReplayBranch()`.
|
|
833
834
|
*
|
|
834
835
|
* Items whose source trace carried no DB snapshot reference get no branch and
|
|
835
836
|
* run against the live database. An item whose branch was requested but could
|
|
836
837
|
* not be resolved fails instead of running, so a replay never silently
|
|
837
838
|
* reports a result that did not use the historical data you asked for.
|
|
838
839
|
*/
|
|
839
|
-
dbBranch?: DbBranchOptions;
|
|
840
|
+
dbBranch?: DbBranchOptions | boolean;
|
|
840
841
|
/** Group ID to associate this replay with an experiment group for live streaming in Studio. */
|
|
841
842
|
experimentGroupId?: string;
|
|
842
843
|
/**
|
|
@@ -1982,7 +1983,7 @@ declare class BitfabFunction {
|
|
|
1982
1983
|
/**
|
|
1983
1984
|
* SDK version from package.json (injected at build time)
|
|
1984
1985
|
*/
|
|
1985
|
-
declare const __version__ = "0.33.
|
|
1986
|
+
declare const __version__ = "0.33.6";
|
|
1986
1987
|
|
|
1987
1988
|
/**
|
|
1988
1989
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
getCurrentReplayBranch,
|
|
15
15
|
getCurrentSpan,
|
|
16
16
|
getCurrentTrace
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JANSX65W.js";
|
|
18
18
|
import {
|
|
19
19
|
BITFAB_PROGRESS_PREFIX,
|
|
20
20
|
BitfabError,
|
|
21
21
|
reportReplayProgress
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DPV6PBWE.js";
|
|
23
23
|
export {
|
|
24
24
|
BITFAB_PROGRESS_PREFIX,
|
|
25
25
|
Bitfab,
|
package/dist/node.cjs
CHANGED
|
@@ -549,8 +549,11 @@ __export(replay_exports, {
|
|
|
549
549
|
replay: () => replay,
|
|
550
550
|
reportReplayProgress: () => reportReplayProgress
|
|
551
551
|
});
|
|
552
|
+
function dbBranchEnabled(dbBranch) {
|
|
553
|
+
return dbBranch !== void 0 && dbBranch !== false;
|
|
554
|
+
}
|
|
552
555
|
function resolveDbBranchSettings(dbBranch) {
|
|
553
|
-
if (!dbBranch) {
|
|
556
|
+
if (!dbBranch || dbBranch === true) {
|
|
554
557
|
return void 0;
|
|
555
558
|
}
|
|
556
559
|
const { minCu, maxCu, warmupSql } = dbBranch;
|
|
@@ -819,7 +822,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
819
822
|
options?.name,
|
|
820
823
|
codeChangeDescription,
|
|
821
824
|
codeChangeFiles,
|
|
822
|
-
options?.dbBranch
|
|
825
|
+
dbBranchEnabled(options?.dbBranch),
|
|
823
826
|
// includeDbBranchLease
|
|
824
827
|
options?.experimentGroupId,
|
|
825
828
|
options?.datasetId,
|
|
@@ -842,7 +845,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options, reg
|
|
|
842
845
|
mockStrategy,
|
|
843
846
|
resolvedOverrides,
|
|
844
847
|
replayedTraceIds[index],
|
|
845
|
-
options?.dbBranch
|
|
848
|
+
dbBranchEnabled(options?.dbBranch),
|
|
846
849
|
resolveDbBranchSettings(options?.dbBranch),
|
|
847
850
|
options?.adaptInputs
|
|
848
851
|
)
|
|
@@ -1019,7 +1022,7 @@ registerAsyncLocalStorageClass(
|
|
|
1019
1022
|
);
|
|
1020
1023
|
|
|
1021
1024
|
// src/version.generated.ts
|
|
1022
|
-
var __version__ = "0.33.
|
|
1025
|
+
var __version__ = "0.33.6";
|
|
1023
1026
|
|
|
1024
1027
|
// src/constants.ts
|
|
1025
1028
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|