@sjawhar/pi-envoy 16.38.2 → 16.39.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/dispatch.js +17 -3
- package/dist/envoy.js +21 -4
- package/package.json +1 -1
package/dist/dispatch.js
CHANGED
|
@@ -14599,6 +14599,17 @@ var IDEMPOTENCY_KEY_TTL_MS = 24 * 60 * 60 * 1000;
|
|
|
14599
14599
|
var IDEMPOTENCY_LEASE_MS = 60 * 1000;
|
|
14600
14600
|
var DELIVERY_DUPLICATE_WINDOW_MS = 72 * 60 * 60 * 1000;
|
|
14601
14601
|
var SEARCH_DEGRADED_EMBEDDER_UNAVAILABLE = "embedder_unavailable";
|
|
14602
|
+
var SEARCH_MEMBERS_EVERY_BUILD_READS = [
|
|
14603
|
+
"q",
|
|
14604
|
+
"project",
|
|
14605
|
+
"limit",
|
|
14606
|
+
"offset",
|
|
14607
|
+
"session"
|
|
14608
|
+
];
|
|
14609
|
+
function everyBuildReadsSearch(request) {
|
|
14610
|
+
const read = SEARCH_MEMBERS_EVERY_BUILD_READS;
|
|
14611
|
+
return Object.entries(request).every(([member, value]) => value === undefined || read.includes(member));
|
|
14612
|
+
}
|
|
14602
14613
|
var IssueDeployedEventPayloadSchema = strictObject({
|
|
14603
14614
|
repo: string2(),
|
|
14604
14615
|
number: number2().int().positive(),
|
|
@@ -17940,7 +17951,9 @@ class DispatchClient {
|
|
|
17940
17951
|
]);
|
|
17941
17952
|
}
|
|
17942
17953
|
async search(query, options = {}) {
|
|
17943
|
-
|
|
17954
|
+
const request = { q: query, ...options };
|
|
17955
|
+
const path = everyBuildReadsSearch(request) ? ["api", "v1", "search"] : ["api", "v1", "search", "results"];
|
|
17956
|
+
return this.#json("GET", path, undefined, request);
|
|
17944
17957
|
}
|
|
17945
17958
|
async related(project, input) {
|
|
17946
17959
|
return this.#json("POST", ["api", "v1", "projects", project, "related"], input);
|
|
@@ -18467,7 +18480,7 @@ class DispatchClient {
|
|
|
18467
18480
|
const url = new URL(`${path.map((segment) => encodeURIComponent(segment)).join("/")}`, `${this.#baseUrl}/`);
|
|
18468
18481
|
if (query) {
|
|
18469
18482
|
for (const [name, value] of Object.entries(query)) {
|
|
18470
|
-
if (typeof value === "string" || typeof value === "number") {
|
|
18483
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
18471
18484
|
url.searchParams.set(name, String(value));
|
|
18472
18485
|
} else if (Array.isArray(value)) {
|
|
18473
18486
|
for (const item of value)
|
|
@@ -26237,7 +26250,8 @@ var DeliveryAnswerWireSchema = discriminatedUnion("mode", [
|
|
|
26237
26250
|
mode: literal("consumer"),
|
|
26238
26251
|
subject: string2().min(1),
|
|
26239
26252
|
stream_id: string2(),
|
|
26240
|
-
gap: boolean2()
|
|
26253
|
+
gap: boolean2(),
|
|
26254
|
+
consumer_start: number2().int().nonnegative().optional()
|
|
26241
26255
|
}),
|
|
26242
26256
|
object({ mode: literal("core"), reason: string2() })
|
|
26243
26257
|
]);
|
package/dist/envoy.js
CHANGED
|
@@ -29688,6 +29688,17 @@ function answerNotKept(status, replayed, body) {
|
|
|
29688
29688
|
var IDEMPOTENCY_KEY_TTL_MS = 24 * 60 * 60 * 1000;
|
|
29689
29689
|
var IDEMPOTENCY_LEASE_MS = 60 * 1000;
|
|
29690
29690
|
var DELIVERY_DUPLICATE_WINDOW_MS = 72 * 60 * 60 * 1000;
|
|
29691
|
+
var SEARCH_MEMBERS_EVERY_BUILD_READS = [
|
|
29692
|
+
"q",
|
|
29693
|
+
"project",
|
|
29694
|
+
"limit",
|
|
29695
|
+
"offset",
|
|
29696
|
+
"session"
|
|
29697
|
+
];
|
|
29698
|
+
function everyBuildReadsSearch(request) {
|
|
29699
|
+
const read = SEARCH_MEMBERS_EVERY_BUILD_READS;
|
|
29700
|
+
return Object.entries(request).every(([member, value]) => value === undefined || read.includes(member));
|
|
29701
|
+
}
|
|
29691
29702
|
var IssueDeployedEventPayloadSchema = strictObject({
|
|
29692
29703
|
repo: string2(),
|
|
29693
29704
|
number: number2().int().positive(),
|
|
@@ -35739,7 +35750,9 @@ class DispatchClient {
|
|
|
35739
35750
|
]);
|
|
35740
35751
|
}
|
|
35741
35752
|
async search(query, options = {}) {
|
|
35742
|
-
|
|
35753
|
+
const request = { q: query, ...options };
|
|
35754
|
+
const path = everyBuildReadsSearch(request) ? ["api", "v1", "search"] : ["api", "v1", "search", "results"];
|
|
35755
|
+
return this.#json("GET", path, undefined, request);
|
|
35743
35756
|
}
|
|
35744
35757
|
async related(project, input) {
|
|
35745
35758
|
return this.#json("POST", ["api", "v1", "projects", project, "related"], input);
|
|
@@ -36266,7 +36279,7 @@ class DispatchClient {
|
|
|
36266
36279
|
const url = new URL(`${path.map((segment) => encodeURIComponent(segment)).join("/")}`, `${this.#baseUrl}/`);
|
|
36267
36280
|
if (query) {
|
|
36268
36281
|
for (const [name, value] of Object.entries(query)) {
|
|
36269
|
-
if (typeof value === "string" || typeof value === "number") {
|
|
36282
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
36270
36283
|
url.searchParams.set(name, String(value));
|
|
36271
36284
|
} else if (Array.isArray(value)) {
|
|
36272
36285
|
for (const item of value)
|
|
@@ -38007,7 +38020,8 @@ var DeliveryAnswerWireSchema = discriminatedUnion("mode", [
|
|
|
38007
38020
|
mode: literal("consumer"),
|
|
38008
38021
|
subject: string2().min(1),
|
|
38009
38022
|
stream_id: string2(),
|
|
38010
|
-
gap: boolean2()
|
|
38023
|
+
gap: boolean2(),
|
|
38024
|
+
consumer_start: number2().int().nonnegative().optional()
|
|
38011
38025
|
}),
|
|
38012
38026
|
object({ mode: literal("core"), reason: string2() })
|
|
38013
38027
|
]);
|
|
@@ -39657,6 +39671,9 @@ function createConsumerDelivery(options) {
|
|
|
39657
39671
|
tellReplacedResume(answer.stream_id);
|
|
39658
39672
|
switchStream(answer.stream_id);
|
|
39659
39673
|
}
|
|
39674
|
+
const floor = (answer.consumer_start ?? 0) - 1;
|
|
39675
|
+
if (answer.stream_id === streamID && floor > (written ?? -1))
|
|
39676
|
+
written = floor;
|
|
39660
39677
|
if (answer.gap) {
|
|
39661
39678
|
tellGap("retention_gap");
|
|
39662
39679
|
gapTold = true;
|
|
@@ -42680,7 +42697,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
42680
42697
|
|
|
42681
42698
|
// package.json
|
|
42682
42699
|
var name = "@sjawhar/pi-envoy";
|
|
42683
|
-
var version2 = "16.
|
|
42700
|
+
var version2 = "16.39.1";
|
|
42684
42701
|
var package_default = {
|
|
42685
42702
|
name,
|
|
42686
42703
|
version: version2,
|