@lunora/do 1.0.0-alpha.27 → 1.0.0-alpha.28
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/index.d.mts
CHANGED
|
@@ -4355,6 +4355,8 @@ declare abstract class ShardDO {
|
|
|
4355
4355
|
* cleared in the `finally` block of `fetch` like the other per-request fields.
|
|
4356
4356
|
*/
|
|
4357
4357
|
private currentRequestIp;
|
|
4358
|
+
/** W3C `traceparent` of the inbound RPC; forwarded onto outbound container fetches. */
|
|
4359
|
+
private currentRequestTraceparent;
|
|
4358
4360
|
/**
|
|
4359
4361
|
* Client-issued idempotency key for the in-flight mutation, forwarded via the
|
|
4360
4362
|
* `x-lunora-mutation-id` header. When set, the dispatch path dedups the call
|
|
@@ -4765,6 +4767,12 @@ declare abstract class ShardDO {
|
|
|
4765
4767
|
*/
|
|
4766
4768
|
protected getCurrentIp(): string | undefined;
|
|
4767
4769
|
/**
|
|
4770
|
+
* W3C `traceparent` of the inbound RPC (forwarded by the runtime), or
|
|
4771
|
+
* `undefined`. `buildCtx` passes it to `createContainerContext` so outbound
|
|
4772
|
+
* container fetches carry it and the container's spans join the same trace.
|
|
4773
|
+
*/
|
|
4774
|
+
protected getCurrentTraceparent(): string | undefined;
|
|
4775
|
+
/**
|
|
4768
4776
|
* Identity claims (email, name, roles, …) forwarded by the runtime's
|
|
4769
4777
|
* `resolveIdentity` hook. Returns `undefined` for anonymous requests
|
|
4770
4778
|
* or when no extra claims were attached. Use this to populate the
|
package/dist/index.d.ts
CHANGED
|
@@ -4355,6 +4355,8 @@ declare abstract class ShardDO {
|
|
|
4355
4355
|
* cleared in the `finally` block of `fetch` like the other per-request fields.
|
|
4356
4356
|
*/
|
|
4357
4357
|
private currentRequestIp;
|
|
4358
|
+
/** W3C `traceparent` of the inbound RPC; forwarded onto outbound container fetches. */
|
|
4359
|
+
private currentRequestTraceparent;
|
|
4358
4360
|
/**
|
|
4359
4361
|
* Client-issued idempotency key for the in-flight mutation, forwarded via the
|
|
4360
4362
|
* `x-lunora-mutation-id` header. When set, the dispatch path dedups the call
|
|
@@ -4765,6 +4767,12 @@ declare abstract class ShardDO {
|
|
|
4765
4767
|
*/
|
|
4766
4768
|
protected getCurrentIp(): string | undefined;
|
|
4767
4769
|
/**
|
|
4770
|
+
* W3C `traceparent` of the inbound RPC (forwarded by the runtime), or
|
|
4771
|
+
* `undefined`. `buildCtx` passes it to `createContainerContext` so outbound
|
|
4772
|
+
* container fetches carry it and the container's spans join the same trace.
|
|
4773
|
+
*/
|
|
4774
|
+
protected getCurrentTraceparent(): string | undefined;
|
|
4775
|
+
/**
|
|
4768
4776
|
* Identity claims (email, name, roles, …) forwarded by the runtime's
|
|
4769
4777
|
* `resolveIdentity` hook. Returns `undefined` for anonymous requests
|
|
4770
4778
|
* or when no extra claims were attached. Use this to populate the
|
package/dist/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ export { RLS_UNWRAP_SYMBOL, RlsRequiredError, guardWriter } from './packem_share
|
|
|
26
26
|
export { buildFtsMatch, ftsTableName, scoreDocument, stringifySearchText, tokenizeSearch } from './packem_shared/buildFtsMatch-BLEMawrp.mjs';
|
|
27
27
|
export { M as MIN_ADMIN_TOKEN_LENGTH, a as MIN_AUTH_SECRET_LENGTH, b as buildSecurityAudit } from './packem_shared/security-audit-CucgBice.mjs';
|
|
28
28
|
export { SESSION_DO_TTL_DEFAULT, SessionDO } from './packem_shared/SESSION_DO_TTL_DEFAULT-BnSKgVO4.mjs';
|
|
29
|
-
export { ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, ShardDO } from './packem_shared/ROOT_DO_SIZE_WARN_BYTES-
|
|
29
|
+
export { ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, ShardDO } from './packem_shared/ROOT_DO_SIZE_WARN_BYTES-CszdLJhN.mjs';
|
|
30
30
|
export { SHARD_REGISTRY_DO_NAME, ShardRegistryDO } from './packem_shared/SHARD_REGISTRY_DO_NAME-D99roc-r.mjs';
|
|
31
31
|
export { MAX_SQL_ROWS, assertReadonly, runReadonlySql } from './packem_shared/MAX_SQL_ROWS-D57CJaT9.mjs';
|
|
32
32
|
export { createSystemReader } from './packem_shared/createSystemReader-D12eNH13.mjs';
|
|
@@ -2017,6 +2017,8 @@ class ShardDO {
|
|
|
2017
2017
|
* cleared in the `finally` block of `fetch` like the other per-request fields.
|
|
2018
2018
|
*/
|
|
2019
2019
|
currentRequestIp;
|
|
2020
|
+
/** W3C `traceparent` of the inbound RPC; forwarded onto outbound container fetches. */
|
|
2021
|
+
currentRequestTraceparent;
|
|
2020
2022
|
/**
|
|
2021
2023
|
* Client-issued idempotency key for the in-flight mutation, forwarded via the
|
|
2022
2024
|
* `x-lunora-mutation-id` header. When set, the dispatch path dedups the call
|
|
@@ -2335,6 +2337,7 @@ class ShardDO {
|
|
|
2335
2337
|
this.currentRequestIdentity = parseIdentityHeader(request.headers.get("x-lunora-identity"));
|
|
2336
2338
|
this.currentRequestIp = request.headers.get("x-lunora-client-ip") ?? void 0;
|
|
2337
2339
|
this.currentRequestSystem = request.headers.get("x-lunora-system") === "1";
|
|
2340
|
+
this.currentRequestTraceparent = request.headers.get("traceparent") ?? void 0;
|
|
2338
2341
|
this.currentRequestReadTables = void 0;
|
|
2339
2342
|
this.currentRequestCacheHit = void 0;
|
|
2340
2343
|
this.metrics.requests += 1;
|
|
@@ -2401,6 +2404,7 @@ class ShardDO {
|
|
|
2401
2404
|
this.currentRequestIdentity = void 0;
|
|
2402
2405
|
this.currentRequestIp = void 0;
|
|
2403
2406
|
this.currentRequestSystem = false;
|
|
2407
|
+
this.currentRequestTraceparent = void 0;
|
|
2404
2408
|
this.currentScannedTables = void 0;
|
|
2405
2409
|
this.currentIndexHits = void 0;
|
|
2406
2410
|
this.currentRequestReadTables = void 0;
|
|
@@ -2819,6 +2823,14 @@ class ShardDO {
|
|
|
2819
2823
|
getCurrentIp() {
|
|
2820
2824
|
return this.currentRequestIp;
|
|
2821
2825
|
}
|
|
2826
|
+
/**
|
|
2827
|
+
* W3C `traceparent` of the inbound RPC (forwarded by the runtime), or
|
|
2828
|
+
* `undefined`. `buildCtx` passes it to `createContainerContext` so outbound
|
|
2829
|
+
* container fetches carry it and the container's spans join the same trace.
|
|
2830
|
+
*/
|
|
2831
|
+
getCurrentTraceparent() {
|
|
2832
|
+
return this.currentRequestTraceparent;
|
|
2833
|
+
}
|
|
2822
2834
|
/**
|
|
2823
2835
|
* Identity claims (email, name, roles, …) forwarded by the runtime's
|
|
2824
2836
|
* `resolveIdentity` hook. Returns `undefined` for anonymous requests
|