@automagik/omni 2.260910.13 → 2.260910.15
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/commands/events.d.ts +22 -0
- package/dist/commands/events.d.ts.map +1 -1
- package/dist/index.js +45 -9
- package/dist/server/index.js +7 -7
- package/package.json +1 -1
|
@@ -137,11 +137,28 @@ export interface FormatLineOptions {
|
|
|
137
137
|
/** Print raw uuid8 ids even when a name is known (#1036 ask 2, `--ids`). */
|
|
138
138
|
ids?: boolean;
|
|
139
139
|
names?: StreamNames;
|
|
140
|
+
/** `--pretty` (#1079): compact colored `time type who: text` line. */
|
|
141
|
+
pretty?: boolean;
|
|
142
|
+
/** Force ANSI on/off (tests); defaults to `areColorsEnabled()`. */
|
|
143
|
+
color?: boolean;
|
|
140
144
|
}
|
|
141
145
|
/** Sender label: resolved person name, then channel push name, then raw `from`. */
|
|
142
146
|
export declare function senderLabel(event: StreamEventRow, names?: StreamNames): string;
|
|
143
147
|
/** Format an event as a single human-readable line. */
|
|
144
148
|
export declare function formatEventLine(event: StreamEventRow, options?: FormatLineOptions): string;
|
|
149
|
+
/**
|
|
150
|
+
* `--pretty` content column (#1079): message text first, then the webhook
|
|
151
|
+
* body fields humans grep for (github: action #number title; purchase: subject).
|
|
152
|
+
* ponytail: one generic key list instead of per-family formatters; add a
|
|
153
|
+
* per-family switch when a family needs a shape this cannot express.
|
|
154
|
+
*/
|
|
155
|
+
export declare function prettyContent(event: StreamEventRow): string;
|
|
156
|
+
/**
|
|
157
|
+
* `--pretty` (#1079): one compact `time type who: text` line, colored when
|
|
158
|
+
* stdout is a TTY and NO_COLOR / --no-color are unset. Sender resolution is
|
|
159
|
+
* the `--verbose` one (`senderLabel`), not a second copy.
|
|
160
|
+
*/
|
|
161
|
+
export declare function formatPrettyLine(event: StreamEventRow, options?: FormatLineOptions): string;
|
|
145
162
|
/**
|
|
146
163
|
* The journal row as the API actually returns it: the generated SDK `Event`
|
|
147
164
|
* type is a projection, but GET /events returns full omni_events rows —
|
|
@@ -213,6 +230,11 @@ export interface FollowParams {
|
|
|
213
230
|
isStopped?: () => boolean;
|
|
214
231
|
/** Line sink — defaults to output.raw (stdout). Injected by tests. */
|
|
215
232
|
emit?: (line: string) => void;
|
|
233
|
+
/** `--pretty` (#1079): print formatPrettyLine instead of JSON lines; names resolved via `client`. */
|
|
234
|
+
pretty?: {
|
|
235
|
+
client: OmniClient;
|
|
236
|
+
format: FormatLineOptions;
|
|
237
|
+
};
|
|
216
238
|
/** Consecutive transport failures tolerated before giving up (default 5). */
|
|
217
239
|
maxRetries?: number;
|
|
218
240
|
/** First backoff delay; doubles per retry up to 30s (default 1000). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/commands/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,YAAY,CAAC;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/commands/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,KAAK,mBAAmB,EAAsB,MAAM,YAAY,CAAC;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE1E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwJpC,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzF;AAqDD,2DAA2D;AAC3D,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE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G,OAAO,CAAC,CAAC,CAAC,CAepH;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAY/E;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,GAAG,EAAE,OAAO,CAAC;IACb,8EAA8E;IAC9E,SAAS,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;IAC1B,sEAAsE;IACtE,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,qGAAqG;IACrG,MAAM,CAAC,EAAE;QAAE,MAAM,EAAE,UAAU,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAA;KAAE,CAAC;IAC3D,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA2CD;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAyCxE;AA8FD,wBAAgB,mBAAmB,IAAI,OAAO,CAga7C"}
|
package/dist/index.js
CHANGED
|
@@ -115765,7 +115765,7 @@ var require_client2 = __commonJS((exports) => {
|
|
|
115765
115765
|
|
|
115766
115766
|
// ../../node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js
|
|
115767
115767
|
var require_esmLoader = __commonJS((exports) => {
|
|
115768
|
-
var __filename = "/home/runner/work/omni/omni/node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js";
|
|
115768
|
+
var __filename = "/home/runner/work/omni/omni/.stable-source/node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js";
|
|
115769
115769
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
115770
115770
|
var core = require_cjs();
|
|
115771
115771
|
var importInTheMiddle = require_import_in_the_middle();
|
|
@@ -137198,7 +137198,7 @@ import { fileURLToPath } from "url";
|
|
|
137198
137198
|
// package.json
|
|
137199
137199
|
var package_default = {
|
|
137200
137200
|
name: "@automagik/omni",
|
|
137201
|
-
version: "2.260910.
|
|
137201
|
+
version: "2.260910.15",
|
|
137202
137202
|
repository: {
|
|
137203
137203
|
type: "git",
|
|
137204
137204
|
url: "git+https://github.com/automagik-dev/omni.git",
|
|
@@ -143917,10 +143917,12 @@ function createDoneCommand() {
|
|
|
143917
143917
|
|
|
143918
143918
|
// src/commands/events.ts
|
|
143919
143919
|
init_src();
|
|
143920
|
+
init_source();
|
|
143920
143921
|
import { readFileSync as readFileSync11 } from "fs";
|
|
143921
143922
|
init_zod();
|
|
143922
143923
|
init_config();
|
|
143923
143924
|
init_output();
|
|
143925
|
+
init_output();
|
|
143924
143926
|
function parseSinceTime(since) {
|
|
143925
143927
|
const match = since.match(/^(\d+)([hdwm]|min)$/);
|
|
143926
143928
|
if (!match) {
|
|
@@ -144270,6 +144272,29 @@ function formatEventLine(event, options = {}) {
|
|
|
144270
144272
|
}
|
|
144271
144273
|
return `${cols.join(" ")} ${trimmed}`.trimEnd();
|
|
144272
144274
|
}
|
|
144275
|
+
function prettyContent(event) {
|
|
144276
|
+
const text = event.textContent ?? event.transcription ?? event.imageDescription;
|
|
144277
|
+
if (text)
|
|
144278
|
+
return text;
|
|
144279
|
+
const p11 = event.rawPayload ?? {};
|
|
144280
|
+
const nested = p11.pull_request ?? p11.issue ?? {};
|
|
144281
|
+
const str = (v4) => typeof v4 === "string" && v4 ? v4 : undefined;
|
|
144282
|
+
const number2 = p11.number ?? nested.number;
|
|
144283
|
+
const title = ["title", "subject", "text", "message", "body"].map((k4) => str(p11[k4]) ?? str(nested[k4])).find(Boolean);
|
|
144284
|
+
return [str(p11.action), number2 === undefined ? undefined : `#${String(number2)}`, title].filter(Boolean).join(" ");
|
|
144285
|
+
}
|
|
144286
|
+
var chalk2 = new Chalk({ level: 1 });
|
|
144287
|
+
var paint = (on, fn, s2) => on && s2 ? fn(s2) : s2;
|
|
144288
|
+
function formatPrettyLine(event, options = {}) {
|
|
144289
|
+
const color = options.color ?? (areColorsEnabled() && !process.env.NO_COLOR);
|
|
144290
|
+
const time = new Date(event.receivedAt).toISOString().slice(11, 19);
|
|
144291
|
+
const typeColor = isErrorEvent(event.eventType) ? chalk2.red : event.direction === "outbound" ? chalk2.magenta : chalk2.cyan;
|
|
144292
|
+
const who = event.direction === "outbound" && !event.rawPayload?.pushName ? "me" : senderLabel(event, options.names);
|
|
144293
|
+
const content = prettyContent(event);
|
|
144294
|
+
const head = `${paint(color, chalk2.dim, time)} ${paint(color, typeColor, event.eventType)}`;
|
|
144295
|
+
const tail = [paint(color, chalk2.bold, who), content].filter(Boolean).join(": ");
|
|
144296
|
+
return `${head} ${tail}`.trimEnd();
|
|
144297
|
+
}
|
|
144273
144298
|
async function warmStreamNames(client, names, events2) {
|
|
144274
144299
|
const lookup2 = async (map2, id, fetch2) => {
|
|
144275
144300
|
if (map2.has(id))
|
|
@@ -144294,7 +144319,7 @@ function emitStreamEvent(event, ndjson, format) {
|
|
|
144294
144319
|
if (ndjson) {
|
|
144295
144320
|
raw(JSON.stringify(event));
|
|
144296
144321
|
} else {
|
|
144297
|
-
raw(formatEventLine(event, format));
|
|
144322
|
+
raw(format.pretty ? formatPrettyLine(event, format) : formatEventLine(event, format));
|
|
144298
144323
|
}
|
|
144299
144324
|
}
|
|
144300
144325
|
async function fetchStreamBatch(client, filters, channel2, type, sinceIso) {
|
|
@@ -144356,6 +144381,7 @@ async function streamEvents(client, options) {
|
|
|
144356
144381
|
const format = {
|
|
144357
144382
|
verbose: options.verbose,
|
|
144358
144383
|
ids: options.ids,
|
|
144384
|
+
pretty: options.pretty,
|
|
144359
144385
|
names: { instances: new Map, chats: new Map, persons: new Map }
|
|
144360
144386
|
};
|
|
144361
144387
|
let stopped = false;
|
|
@@ -144472,6 +144498,14 @@ async function pullWithRetry(params) {
|
|
|
144472
144498
|
}
|
|
144473
144499
|
}
|
|
144474
144500
|
}
|
|
144501
|
+
async function emitFollowPage(params, items, emit) {
|
|
144502
|
+
const pretty = params.pretty;
|
|
144503
|
+
if (pretty?.format.names && !pretty.format.ids)
|
|
144504
|
+
await warmStreamNames(pretty.client, pretty.format.names, items);
|
|
144505
|
+
for (const item of items) {
|
|
144506
|
+
emit(pretty ? formatPrettyLine(item, pretty.format) : JSON.stringify(item));
|
|
144507
|
+
}
|
|
144508
|
+
}
|
|
144475
144509
|
async function followConsumer(params) {
|
|
144476
144510
|
const emit = params.emit ?? raw;
|
|
144477
144511
|
let acked = -1;
|
|
@@ -144479,9 +144513,7 @@ async function followConsumer(params) {
|
|
|
144479
144513
|
if (params.isStopped?.())
|
|
144480
144514
|
return;
|
|
144481
144515
|
const page = await pullWithRetry(params);
|
|
144482
|
-
|
|
144483
|
-
emit(JSON.stringify(item));
|
|
144484
|
-
}
|
|
144516
|
+
await emitFollowPage(params, page.items, emit);
|
|
144485
144517
|
if (!params.ack) {
|
|
144486
144518
|
await flushStdout();
|
|
144487
144519
|
return;
|
|
@@ -144583,7 +144615,7 @@ function createEventsCommand() {
|
|
|
144583
144615
|
error(`Failed to list events: ${message2}`);
|
|
144584
144616
|
}
|
|
144585
144617
|
});
|
|
144586
|
-
events2.command("stream").description("Stream events in real-time (tail -f style). Ctrl+C to stop.").option("--instance <id>", "Filter by instance ID").option("--channel <type>", "Filter by channel type").option("--type <type>", "Filter by event type (trailing * = prefix glob, e.g. custom.*)").option("--exclude <glob>", "Drop event types matching this glob, repeatable; wins over --type (e.g. --exclude custom.chat.*)", (value, previous) => [...previous, value], []).option("--chat-id <id>", "Filter by chat ID").option("--person-id <id>", "Filter by person ID").option("--since <time>", "Start cursor (e.g., 5min, 24h, 7d, or ISO timestamp)").option("--errors-only", "Show only error/failure events").option("--all", "Include noisy event types (presence, delivered, read, progress)").option("--ndjson", "Emit JSON Lines (one event per line) \u2014 same as global --json in stream mode").option("-v, --verbose", "Add sender, fromMe marker and contentType columns").option("--ids", "Print raw ids instead of resolved instance/chat names").option("--poll-ms <n>", "Polling interval in milliseconds", (v4) => Number.parseInt(v4, 10), 2000).action(async (options) => {
|
|
144618
|
+
events2.command("stream").description("Stream events in real-time (tail -f style). Ctrl+C to stop.").option("--instance <id>", "Filter by instance ID").option("--channel <type>", "Filter by channel type").option("--type <type>", "Filter by event type (trailing * = prefix glob, e.g. custom.*)").option("--exclude <glob>", "Drop event types matching this glob, repeatable; wins over --type (e.g. --exclude custom.chat.*)", (value, previous) => [...previous, value], []).option("--chat-id <id>", "Filter by chat ID").option("--person-id <id>", "Filter by person ID").option("--since <time>", "Start cursor (e.g., 5min, 24h, 7d, or ISO timestamp)").option("--errors-only", "Show only error/failure events").option("--all", "Include noisy event types (presence, delivered, read, progress)").option("--ndjson", "Emit JSON Lines (one event per line) \u2014 same as global --json in stream mode").option("-v, --verbose", "Add sender, fromMe marker and contentType columns").option("--ids", "Print raw ids instead of resolved instance/chat names").option("--pretty", "One colored `time type who: text` line per event (no ANSI when piped or NO_COLOR)").option("--poll-ms <n>", "Polling interval in milliseconds", (v4) => Number.parseInt(v4, 10), 2000).action(async (options) => {
|
|
144587
144619
|
const client = getClient();
|
|
144588
144620
|
try {
|
|
144589
144621
|
await streamEvents(client, options);
|
|
@@ -144628,7 +144660,7 @@ function createEventsCommand() {
|
|
|
144628
144660
|
error(`Failed to wait for event: ${message2}`);
|
|
144629
144661
|
}
|
|
144630
144662
|
});
|
|
144631
|
-
events2.command("follow").description("Tail the journal through a durable consumer: resumes from its stored cursor, prints JSON lines, acks as it goes.").requiredOption("--consumer <name>", "Durable consumer to follow (create with: omni events consumers create)").option("--limit <n>", "Max journal rows scanned per pull", (v4) => Number.parseInt(v4, 10), 100).option("--wait-ms <n>", "Server-side long-poll window per pull when idle (max 30000)", (v4) => Number.parseInt(v4, 10), 1e4).option("--no-ack", "Peek: print one page without advancing the cursor, then exit").option("--until-idle", "Exit 0 once caught up with the journal instead of tailing forever").option("--ndjson", "Accepted for symmetry with `events stream` \u2014 follow
|
|
144663
|
+
events2.command("follow").description("Tail the journal through a durable consumer: resumes from its stored cursor, prints JSON lines, acks as it goes.").requiredOption("--consumer <name>", "Durable consumer to follow (create with: omni events consumers create)").option("--limit <n>", "Max journal rows scanned per pull", (v4) => Number.parseInt(v4, 10), 100).option("--wait-ms <n>", "Server-side long-poll window per pull when idle (max 30000)", (v4) => Number.parseInt(v4, 10), 1e4).option("--no-ack", "Peek: print one page without advancing the cursor, then exit").option("--until-idle", "Exit 0 once caught up with the journal instead of tailing forever").option("--ndjson", "Accepted for symmetry with `events stream` \u2014 follow emits JSON Lines unless --pretty").option("--pretty", "One colored `time type who: text` line per event (no ANSI when piped or NO_COLOR)").option("--ids", "With --pretty: print raw ids instead of resolved names").action(async (options) => {
|
|
144632
144664
|
let stopped = false;
|
|
144633
144665
|
const shutdown = () => {
|
|
144634
144666
|
stopped = true;
|
|
@@ -144643,7 +144675,11 @@ function createEventsCommand() {
|
|
|
144643
144675
|
waitMs: Math.min(Math.max(options.waitMs, 0), 30000),
|
|
144644
144676
|
ack: options.ack,
|
|
144645
144677
|
untilIdle: options.untilIdle === true,
|
|
144646
|
-
isStopped: () => stopped
|
|
144678
|
+
isStopped: () => stopped,
|
|
144679
|
+
pretty: options.pretty && !options.ndjson && getOutputFormat() !== "json" ? {
|
|
144680
|
+
client: getClient(),
|
|
144681
|
+
format: { ids: options.ids, names: { instances: new Map, chats: new Map, persons: new Map } }
|
|
144682
|
+
} : undefined
|
|
144647
144683
|
});
|
|
144648
144684
|
} catch (err2) {
|
|
144649
144685
|
error(`Failed to follow consumer: ${errorMessage(err2)}`);
|
package/dist/server/index.js
CHANGED
|
@@ -76973,7 +76973,7 @@ var require_ClientVoiceManager = __commonJS((exports, module) => {
|
|
|
76973
76973
|
|
|
76974
76974
|
// ../../node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist/index.js
|
|
76975
76975
|
var require_dist9 = __commonJS((exports, module) => {
|
|
76976
|
-
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist";
|
|
76976
|
+
var __dirname = "/home/runner/work/omni/omni/.stable-source/node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist";
|
|
76977
76977
|
var __create2 = Object.create;
|
|
76978
76978
|
var __defProp2 = Object.defineProperty;
|
|
76979
76979
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -162253,7 +162253,7 @@ var require_indexes = __commonJS((exports, module) => {
|
|
|
162253
162253
|
|
|
162254
162254
|
// ../../node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream/index.js
|
|
162255
162255
|
var require_thread_stream = __commonJS((exports, module) => {
|
|
162256
|
-
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream";
|
|
162256
|
+
var __dirname = "/home/runner/work/omni/omni/.stable-source/node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream";
|
|
162257
162257
|
var { version } = require_package5();
|
|
162258
162258
|
var { EventEmitter: EventEmitter3 } = __require("events");
|
|
162259
162259
|
var { Worker } = __require("worker_threads");
|
|
@@ -162674,7 +162674,7 @@ var require_thread_stream = __commonJS((exports, module) => {
|
|
|
162674
162674
|
|
|
162675
162675
|
// ../../node_modules/.bun/pino@9.14.0/node_modules/pino/lib/transport.js
|
|
162676
162676
|
var require_transport2 = __commonJS((exports, module) => {
|
|
162677
|
-
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/pino@9.14.0/node_modules/pino/lib";
|
|
162677
|
+
var __dirname = "/home/runner/work/omni/omni/.stable-source/node_modules/.bun/pino@9.14.0/node_modules/pino/lib";
|
|
162678
162678
|
var { createRequire: createRequire2 } = __require("module");
|
|
162679
162679
|
var getCallers = require_caller();
|
|
162680
162680
|
var { join: join8, isAbsolute, sep: sep2 } = __require("path");
|
|
@@ -244419,7 +244419,7 @@ var require_client3 = __commonJS((exports) => {
|
|
|
244419
244419
|
|
|
244420
244420
|
// ../../node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js
|
|
244421
244421
|
var require_esmLoader = __commonJS((exports) => {
|
|
244422
|
-
var __filename = "/home/runner/work/omni/omni/node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js";
|
|
244422
|
+
var __filename = "/home/runner/work/omni/omni/.stable-source/node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js";
|
|
244423
244423
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
244424
244424
|
var core3 = require_cjs6();
|
|
244425
244425
|
var importInTheMiddle = require_import_in_the_middle();
|
|
@@ -251645,7 +251645,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
251645
251645
|
var require_package7 = __commonJS((exports, module) => {
|
|
251646
251646
|
module.exports = {
|
|
251647
251647
|
name: "@omni/api",
|
|
251648
|
-
version: "2.260910.
|
|
251648
|
+
version: "2.260910.15",
|
|
251649
251649
|
private: true,
|
|
251650
251650
|
type: "module",
|
|
251651
251651
|
exports: {
|
|
@@ -278747,7 +278747,7 @@ var require_src45 = __commonJS((exports) => {
|
|
|
278747
278747
|
|
|
278748
278748
|
// ../../node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/channelz.js
|
|
278749
278749
|
var require_channelz = __commonJS((exports) => {
|
|
278750
|
-
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src";
|
|
278750
|
+
var __dirname = "/home/runner/work/omni/omni/.stable-source/node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src";
|
|
278751
278751
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
278752
278752
|
exports.registerChannelzSocket = exports.registerChannelzServer = exports.registerChannelzSubchannel = exports.registerChannelzChannel = exports.ChannelzCallTrackerStub = exports.ChannelzCallTracker = exports.ChannelzChildrenTrackerStub = exports.ChannelzChildrenTracker = exports.ChannelzTrace = exports.ChannelzTraceStub = undefined;
|
|
278753
278753
|
exports.unregisterChannelzRef = unregisterChannelzRef;
|
|
@@ -284150,7 +284150,7 @@ var require_duration = __commonJS((exports) => {
|
|
|
284150
284150
|
|
|
284151
284151
|
// ../../node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/orca.js
|
|
284152
284152
|
var require_orca = __commonJS((exports) => {
|
|
284153
|
-
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src";
|
|
284153
|
+
var __dirname = "/home/runner/work/omni/omni/.stable-source/node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src";
|
|
284154
284154
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
284155
284155
|
exports.OrcaOobMetricsSubchannelWrapper = exports.GRPC_METRICS_HEADER = exports.ServerMetricRecorder = exports.PerRequestMetricRecorder = undefined;
|
|
284156
284156
|
exports.createOrcaClient = createOrcaClient;
|