bitfab 0.36.0 → 0.36.1
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-4YTIVUYX.js → chunk-6ZBZBR5K.js} +2 -2
- package/dist/chunk-6ZBZBR5K.js.map +1 -0
- package/dist/{chunk-JECWMVJG.js → chunk-HD4DRDRE.js} +21 -9
- package/dist/chunk-HD4DRDRE.js.map +1 -0
- package/dist/index.cjs +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -5
- package/dist/index.d.ts +17 -5
- package/dist/index.js +2 -2
- package/dist/node.cjs +19 -7
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +2 -2
- package/dist/{replay-CVMULH7T.js → replay-ZR4KIZIB.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4YTIVUYX.js.map +0 -1
- package/dist/chunk-JECWMVJG.js.map +0 -1
- /package/dist/{replay-CVMULH7T.js.map → replay-ZR4KIZIB.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -266,9 +266,11 @@ interface ReplayContext {
|
|
|
266
266
|
* obtains `databaseUrl` for this item. Reported on the trace completion inside
|
|
267
267
|
* `db_snapshot_usage` so the server can distinguish "branch was
|
|
268
268
|
* provisioned and exposed" from "branch URL was actually consumed".
|
|
269
|
-
*
|
|
270
|
-
* other means (e.g. a process-isolated runner writing an env
|
|
271
|
-
* must
|
|
269
|
+
* Only an explicit `databaseUrl` read may set it. A path that hands the URL
|
|
270
|
+
* over by other means (e.g. a process-isolated runner writing an env
|
|
271
|
+
* overlay) must leave it alone: setting it there would make every such
|
|
272
|
+
* replay report `accessed` for free, and the flag would stop separating
|
|
273
|
+
* "branch was used" from "branch was offered".
|
|
272
274
|
*/
|
|
273
275
|
dbSnapshotAccessed?: boolean;
|
|
274
276
|
}
|
|
@@ -1393,10 +1395,20 @@ interface ReplayResult<T> {
|
|
|
1393
1395
|
* exposed directly here so customer code never sees the word.
|
|
1394
1396
|
*/
|
|
1395
1397
|
|
|
1396
|
-
declare class ReplayBranch {
|
|
1398
|
+
declare class ReplayBranch implements Omit<DbBranchLease, "databaseUrl"> {
|
|
1397
1399
|
#private;
|
|
1400
|
+
/** The provider's own id for this branch, e.g. for correlating with its console. */
|
|
1401
|
+
readonly neonBranchId: string;
|
|
1402
|
+
/** Env var name the customer's app reads, e.g. `DATABASE_URL`. */
|
|
1403
|
+
readonly envKey: string;
|
|
1398
1404
|
/** When this branch's URL stops being valid. ISO-8601. */
|
|
1399
1405
|
readonly expiresAt: string;
|
|
1406
|
+
/**
|
|
1407
|
+
* The instant this branch is pinned to: the source trace's wall clock, read
|
|
1408
|
+
* just before the traced function ran. Compare it against the trace you meant
|
|
1409
|
+
* to replay to confirm the branch is the right point in history.
|
|
1410
|
+
*/
|
|
1411
|
+
readonly snapshotTimestamp?: string;
|
|
1400
1412
|
/** Deep link to the branch in the provider console, if available. */
|
|
1401
1413
|
readonly providerConsoleUrl?: string;
|
|
1402
1414
|
/**
|
|
@@ -2336,7 +2348,7 @@ declare class BitfabFunction {
|
|
|
2336
2348
|
/**
|
|
2337
2349
|
* SDK version from package.json (injected at build time)
|
|
2338
2350
|
*/
|
|
2339
|
-
declare const __version__ = "0.36.
|
|
2351
|
+
declare const __version__ = "0.36.1";
|
|
2340
2352
|
|
|
2341
2353
|
/**
|
|
2342
2354
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -266,9 +266,11 @@ interface ReplayContext {
|
|
|
266
266
|
* obtains `databaseUrl` for this item. Reported on the trace completion inside
|
|
267
267
|
* `db_snapshot_usage` so the server can distinguish "branch was
|
|
268
268
|
* provisioned and exposed" from "branch URL was actually consumed".
|
|
269
|
-
*
|
|
270
|
-
* other means (e.g. a process-isolated runner writing an env
|
|
271
|
-
* must
|
|
269
|
+
* Only an explicit `databaseUrl` read may set it. A path that hands the URL
|
|
270
|
+
* over by other means (e.g. a process-isolated runner writing an env
|
|
271
|
+
* overlay) must leave it alone: setting it there would make every such
|
|
272
|
+
* replay report `accessed` for free, and the flag would stop separating
|
|
273
|
+
* "branch was used" from "branch was offered".
|
|
272
274
|
*/
|
|
273
275
|
dbSnapshotAccessed?: boolean;
|
|
274
276
|
}
|
|
@@ -1393,10 +1395,20 @@ interface ReplayResult<T> {
|
|
|
1393
1395
|
* exposed directly here so customer code never sees the word.
|
|
1394
1396
|
*/
|
|
1395
1397
|
|
|
1396
|
-
declare class ReplayBranch {
|
|
1398
|
+
declare class ReplayBranch implements Omit<DbBranchLease, "databaseUrl"> {
|
|
1397
1399
|
#private;
|
|
1400
|
+
/** The provider's own id for this branch, e.g. for correlating with its console. */
|
|
1401
|
+
readonly neonBranchId: string;
|
|
1402
|
+
/** Env var name the customer's app reads, e.g. `DATABASE_URL`. */
|
|
1403
|
+
readonly envKey: string;
|
|
1398
1404
|
/** When this branch's URL stops being valid. ISO-8601. */
|
|
1399
1405
|
readonly expiresAt: string;
|
|
1406
|
+
/**
|
|
1407
|
+
* The instant this branch is pinned to: the source trace's wall clock, read
|
|
1408
|
+
* just before the traced function ran. Compare it against the trace you meant
|
|
1409
|
+
* to replay to confirm the branch is the right point in history.
|
|
1410
|
+
*/
|
|
1411
|
+
readonly snapshotTimestamp?: string;
|
|
1400
1412
|
/** Deep link to the branch in the provider console, if available. */
|
|
1401
1413
|
readonly providerConsoleUrl?: string;
|
|
1402
1414
|
/**
|
|
@@ -2336,7 +2348,7 @@ declare class BitfabFunction {
|
|
|
2336
2348
|
/**
|
|
2337
2349
|
* SDK version from package.json (injected at build time)
|
|
2338
2350
|
*/
|
|
2339
|
-
declare const __version__ = "0.36.
|
|
2351
|
+
declare const __version__ = "0.36.1";
|
|
2340
2352
|
|
|
2341
2353
|
/**
|
|
2342
2354
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getCurrentReplayBranch,
|
|
21
21
|
getCurrentSpan,
|
|
22
22
|
getCurrentTrace
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HD4DRDRE.js";
|
|
24
24
|
import {
|
|
25
25
|
BITFAB_PROGRESS_PREFIX,
|
|
26
26
|
BitfabError,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
__version__,
|
|
30
30
|
flushTraces,
|
|
31
31
|
reportReplayProgress
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-6ZBZBR5K.js";
|
|
33
33
|
export {
|
|
34
34
|
BITFAB_PROGRESS_PREFIX,
|
|
35
35
|
Bitfab,
|
package/dist/node.cjs
CHANGED
|
@@ -97,7 +97,7 @@ var __version__;
|
|
|
97
97
|
var init_version_generated = __esm({
|
|
98
98
|
"src/version.generated.ts"() {
|
|
99
99
|
"use strict";
|
|
100
|
-
__version__ = "0.36.
|
|
100
|
+
__version__ = "0.36.1";
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
|
|
@@ -4204,12 +4204,20 @@ var ReplayBranch = class {
|
|
|
4204
4204
|
// context can ride along into a log line or a serialized payload.
|
|
4205
4205
|
__privateAdd(this, _url);
|
|
4206
4206
|
__privateAdd(this, _context);
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4207
|
+
const { databaseUrl, ...exposed } = lease;
|
|
4208
|
+
for (const [key, value] of Object.entries(exposed)) {
|
|
4209
|
+
Object.defineProperty(this, key, {
|
|
4210
|
+
value,
|
|
4211
|
+
enumerable: true,
|
|
4212
|
+
configurable: true
|
|
4213
|
+
});
|
|
4214
|
+
}
|
|
4215
|
+
Object.defineProperty(this, "traceId", {
|
|
4216
|
+
value: traceId,
|
|
4217
|
+
enumerable: true,
|
|
4218
|
+
configurable: true
|
|
4219
|
+
});
|
|
4220
|
+
__privateSet(this, _url, databaseUrl);
|
|
4213
4221
|
__privateSet(this, _context, context);
|
|
4214
4222
|
}
|
|
4215
4223
|
/**
|
|
@@ -5549,6 +5557,7 @@ var Bitfab = class {
|
|
|
5549
5557
|
dbSnapshotUsage: {
|
|
5550
5558
|
neonBranchId: replayCtx.dbBranchLease.neonBranchId,
|
|
5551
5559
|
snapshotTimestamp: replayCtx.dbBranchLease.snapshotTimestamp,
|
|
5560
|
+
region: replayCtx.dbBranchLease.region,
|
|
5552
5561
|
originalTraceId: replayCtx.sourceBitfabTraceId,
|
|
5553
5562
|
accessed: replayCtx.dbSnapshotAccessed === true
|
|
5554
5563
|
}
|
|
@@ -5824,6 +5833,9 @@ var Bitfab = class {
|
|
|
5824
5833
|
...params.dbSnapshotUsage.snapshotTimestamp && {
|
|
5825
5834
|
snapshot_timestamp: params.dbSnapshotUsage.snapshotTimestamp
|
|
5826
5835
|
},
|
|
5836
|
+
...params.dbSnapshotUsage.region && {
|
|
5837
|
+
region: params.dbSnapshotUsage.region
|
|
5838
|
+
},
|
|
5827
5839
|
...params.dbSnapshotUsage.originalTraceId && {
|
|
5828
5840
|
original_trace_id: params.dbSnapshotUsage.originalTraceId,
|
|
5829
5841
|
// Deprecated wire alias, kept so this SDK still reports usage
|