@brickkit/cli 0.16.0-beta.3 → 0.16.0-beta.4
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/dashboard-dist/{api-reference-ZQs4Z4Yd.js → api-reference-CA1ejOhs.js} +3 -3
- package/dashboard-dist/app.css +1 -1
- package/dashboard-dist/app.js +8 -8
- package/dashboard-dist/{client-CFM1S4Xv.js → client-C0YCIB2j.js} +1 -1
- package/dashboard-dist/{core-VNHGFYB7.js → core-CPETvDaW.js} +1 -1
- package/dashboard-dist/{docs-CM2krp6H.js → docs-e44llMgQ.js} +1 -1
- package/dashboard-dist/kit.js +1 -1
- package/dashboard-dist/{popover-CVY1eRNY.js → popover-CPp8Bc7H.js} +1 -1
- package/dashboard-dist/theme.css +3 -0
- package/dist/dashboard-host.js +2 -1
- package/dist/dashboard-host.js.map +1 -1
- package/dist/dev-telemetry.js +2 -2
- package/dist/dev-telemetry.js.map +1 -1
- package/dist/package.js +1 -1
- package/inspector-dist/client/assets/{app-PJHZvcxl.css → app-Dla3cd5X.css} +2 -0
- package/inspector-dist/client/assets/{manifest-274ef876.js → manifest-3c342844.js} +1 -1
- package/inspector-dist/client/assets/{root-CPvk93Fe.css → root-Cnc-DXen.css} +2 -0
- package/inspector-dist/server/assets/{app-DdYuYhBk.js → app-p2-vDk3q.js} +13 -13
- package/inspector-dist/server/assets/{functions-BebJWj30.js → functions-BIXA0YFQ.js} +2 -2
- package/inspector-dist/server/assets/{serialization-Cgu5b7aC.js → serialization-D4H52Sdp.js} +1 -1
- package/inspector-dist/server/assets/{token-DH652a7D.js → token-70XLMYnj.js} +1 -1
- package/inspector-dist/server/assets/{token-3-nUtxO2.js → token-Bro5a25u.js} +1 -1
- package/inspector-dist/server/assets/token-util-9OFaOQxs.js +3 -0
- package/inspector-dist/server/assets/{ws-transport-7nLI4Gq9.js → ws-transport-DALQS5qP.js} +1 -1
- package/inspector-dist/server/index.js +1 -1
- package/package.json +2 -2
- package/inspector-dist/server/assets/token-util-wQgchIHA.js +0 -3
- /package/inspector-dist/client/assets/{root-2KbsWt-J.js → root-C12dyylt.js} +0 -0
package/dist/dev-telemetry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as sendToSupervisor } from "./dev-protocol.js";
|
|
2
2
|
import { GLOBAL_SYMBOL } from "@brickkit/core";
|
|
3
|
-
import { SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
3
|
+
import { ROOT_CONTEXT, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
4
4
|
import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";
|
|
5
5
|
import { W3CTraceContextPropagator } from "@opentelemetry/core";
|
|
6
6
|
import { TracerProvider } from "@opentelemetry/sdk-trace";
|
|
@@ -133,7 +133,7 @@ var RecordBatcher = class {
|
|
|
133
133
|
if (this.#records.length === 0) return;
|
|
134
134
|
const records = this.#records;
|
|
135
135
|
this.#records = [];
|
|
136
|
-
this.#send(records);
|
|
136
|
+
context.with(ROOT_CONTEXT, () => this.#send(records));
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
var SupervisorSpanProcessor = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-telemetry.js","names":[],"sources":["../src/dev-telemetry.ts"],"sourcesContent":["import {\n context,\n propagation,\n SpanStatusCode,\n trace,\n type Attributes,\n type HrTime,\n} from \"@opentelemetry/api\";\nimport { AsyncLocalStorageContextManager } from \"@opentelemetry/context-async-hooks\";\nimport { W3CTraceContextPropagator } from \"@opentelemetry/core\";\nimport {\n TracerProvider,\n type ReadableSpan,\n type Span,\n type SpanProcessor,\n} from \"@opentelemetry/sdk-trace\";\nimport { GLOBAL_SYMBOL } from \"@brickkit/core\";\nimport type {\n SerializedError,\n TelemetryRecord,\n WorkerErrorPhase,\n} from \"./dashboard-protocol\";\nimport { sendToSupervisor } from \"./dev-protocol\";\n\n/** Read by @brickkit/core's logger; see `createLogger` there. */\nconst LOG_CAPTURE = Symbol.for(GLOBAL_SYMBOL.logsCapture);\n/** Core's function that records a line on the running span; see `recordActive` there. */\nconst LOG_RECORD = Symbol.for(GLOBAL_SYMBOL.logsRecord);\nconst CONSOLE_CAPTURED = Symbol.for(\"brickkit.console.captured\");\n\nconst CONSOLE_LEVELS = {\n log: \"info\",\n info: \"info\",\n warn: \"warn\",\n error: \"error\",\n debug: \"debug\",\n} as const;\n\nconst MAX_TEXT_LENGTH = 500;\nconst MAX_STACK_LENGTH = 4000;\nconst FLUSH_DELAY_MS = 20;\nconst MAX_BATCH_SIZE = 200;\n\n/**\n * Register the tracer provider, context manager, and W3C trace context\n * propagator. Span records are batched and passed to `onRecords`. Returns false\n * when another tracer provider was already registered, in which case\n * `onRecords` never runs.\n */\nexport function installTracing(\n onRecords: (records: TelemetryRecord[]) => void,\n): boolean {\n const batcher = new RecordBatcher(onRecords);\n const registered = trace.setGlobalTracerProvider(\n new TracerProvider({\n spanProcessors: [new SupervisorSpanProcessor(batcher)],\n }),\n );\n context.setGlobalContextManager(\n new AsyncLocalStorageContextManager().enable(),\n );\n propagation.setGlobalPropagator(new W3CTraceContextPropagator());\n // From here the dashboard shows what actions and tools log, as span events,\n // so @brickkit/core stops printing it. The key is shared by name because the\n // app and the dev server may each hold their own copy of core.\n if (registered) {\n (globalThis as Record<symbol, unknown>)[LOG_CAPTURE] = true;\n captureConsole();\n }\n return registered;\n}\n\ntype Restore = () => void;\n\n/**\n * Send `console.log`, `info`, `warn`, `error`, and `debug` to the dashboard\n * while a traced request is running, as `ctx.logger` does, so code that logs\n * with `console` needs no change. Lines logged outside a request print as\n * usual. Only a dashboard turns this on, `brick dev`'s or the monitoring one\n * of `brick start`: with neither, the console is left alone. Calling it again\n * does nothing; the returned function puts the console back.\n */\nexport function captureConsole(): Restore {\n const target = console as unknown as Record<string | symbol, unknown>;\n const existing = target[CONSOLE_CAPTURED];\n if (typeof existing === \"function\") return existing as Restore;\n\n const globals = globalThis as Record<symbol, unknown>;\n const originals = new Map<string, (...args: unknown[]) => void>();\n for (const [method, level] of Object.entries(CONSOLE_LEVELS)) {\n const original = target[method] as (...args: unknown[]) => void;\n originals.set(method, original);\n target[method] = function (this: unknown, ...args: unknown[]) {\n const record = globals[LOG_RECORD];\n if (\n globals[LOG_CAPTURE] === true &&\n typeof record === \"function\" &&\n record(level, args) === true\n )\n return;\n original.apply(this, args);\n };\n }\n const restore: Restore = () => {\n for (const [method, original] of originals) target[method] = original;\n delete target[CONSOLE_CAPTURED];\n };\n target[CONSOLE_CAPTURED] = restore;\n return restore;\n}\n\n/**\n * Install tracing in the dev worker, so spans from apps built with\n * `brick({ telemetry: true })` reach the supervisor and join callers' traces.\n * Call before the app entry is imported.\n */\nexport function installWorkerTelemetry(): void {\n installTracing((records) => {\n void sendToSupervisor({ type: \"brick:telemetry\", records });\n });\n}\n\nexport function reportWorkerError(\n phase: WorkerErrorPhase,\n error: unknown,\n): Promise<void> {\n return sendToSupervisor({\n type: \"brick:error\",\n phase,\n error: serializeError(error),\n });\n}\n\nfunction serializeError(error: unknown): SerializedError {\n if (error instanceof Error) {\n return {\n name: error.name,\n message: truncate(error.message),\n stack:\n error.stack === undefined\n ? undefined\n : truncate(error.stack, MAX_STACK_LENGTH),\n };\n }\n return { name: \"Error\", message: truncate(String(error)) };\n}\n\nfunction truncate(text: string, limit = MAX_TEXT_LENGTH): string {\n return text.length > limit ? `${text.slice(0, limit)}…` : text;\n}\n\nfunction toMs(time: HrTime): number {\n return time[0] * 1000 + time[1] / 1e6;\n}\n\nfunction statusName(code: SpanStatusCode): \"unset\" | \"ok\" | \"error\" {\n if (code === SpanStatusCode.ERROR) return \"error\";\n if (code === SpanStatusCode.OK) return \"ok\";\n return \"unset\";\n}\n\nfunction boundAttributes(attributes: Attributes | undefined): Attributes {\n const bounded: Attributes = {};\n for (const [key, value] of Object.entries(attributes ?? {})) {\n bounded[key] =\n typeof value === \"string\" ? truncate(value, MAX_STACK_LENGTH) : value;\n }\n return bounded;\n}\n\nclass RecordBatcher {\n #records: TelemetryRecord[] = [];\n #timer: ReturnType<typeof setTimeout> | undefined;\n readonly #send: (records: TelemetryRecord[]) => void;\n\n constructor(send: (records: TelemetryRecord[]) => void) {\n this.#send = send;\n }\n\n push(record: TelemetryRecord): void {\n this.#records.push(record);\n if (this.#records.length >= MAX_BATCH_SIZE) this.flush();\n else this.#timer ??= setTimeout(() => this.flush(), FLUSH_DELAY_MS);\n }\n\n flush(): void {\n clearTimeout(this.#timer);\n this.#timer = undefined;\n if (this.#records.length === 0) return;\n const records = this.#records;\n this.#records = [];\n this.#send(records);\n }\n}\n\nclass SupervisorSpanProcessor implements SpanProcessor {\n readonly #batcher: RecordBatcher;\n\n constructor(batcher: RecordBatcher) {\n this.#batcher = batcher;\n }\n\n onStart(span: Span): void {\n const { traceId, spanId } = span.spanContext();\n this.#batcher.push({\n phase: \"start\",\n traceId,\n spanId,\n parentSpanId: span.parentSpanContext?.spanId,\n name: span.name,\n startMs: toMs(span.startTime),\n attributes: boundAttributes(span.attributes),\n });\n }\n\n onEnd(span: ReadableSpan): void {\n const { traceId, spanId } = span.spanContext();\n this.#batcher.push({\n phase: \"end\",\n traceId,\n spanId,\n name: span.name,\n endMs: toMs(span.endTime),\n status: statusName(span.status.code),\n statusMessage: span.status.message,\n attributes: boundAttributes(span.attributes),\n events: span.events.map((event) => ({\n name: event.name,\n timeMs: toMs(event.time),\n attributes: boundAttributes(event.attributes),\n })),\n });\n }\n\n async forceFlush(): Promise<void> {\n this.#batcher.flush();\n }\n\n async shutdown(): Promise<void> {\n this.#batcher.flush();\n }\n}\n"],"mappings":";;;;;;;;AAyBA,MAAM,cAAc,OAAO,IAAI,cAAc,WAAW;;AAExD,MAAM,aAAa,OAAO,IAAI,cAAc,UAAU;AACtD,MAAM,mBAAmB,OAAO,IAAI,2BAA2B;AAE/D,MAAM,iBAAiB;CACrB,KAAK;CACL,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;AACT;A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AM,0BAAN,MAAuD;CAC5C;CAET,YAAY,SAAwB;EAClC,KAAK,WAAW;CAClB;CAEA,QAAQ,MAAkB;EACxB,MAAM,EAAE,SAAS,WAAW,KAAK,YAAY;EAC7C,KAAK,SAAS,KAAK;GACjB,OAAO;GACP;GACA;GACA,cAAc,KAAK,mBAAmB;GACtC,MAAM,KAAK;GACX,SAAS,KAAK,KAAK,SAAS;GAC5B,YAAY,gBAAgB,KAAK,UAAU;EAC7C,CAAC;CACH;CAEA,MAAM,MAA0B;EAC9B,MAAM,EAAE,SAAS,WAAW,KAAK,YAAY;EAC7C,KAAK,SAAS,KAAK;GACjB,OAAO;GACP;GACA;GACA,MAAM,KAAK;GACX,OAAO,KAAK,KAAK,OAAO;GACxB,QAAQ,WAAW,KAAK,OAAO,IAAI;GACnC,eAAe,KAAK,OAAO;GAC3B,YAAY,gBAAgB,KAAK,UAAU;GAC3C,QAAQ,KAAK,OAAO,KAAK,WAAW;IAClC,MAAM,MAAM;IACZ,QAAQ,KAAK,MAAM,IAAI;IACvB,YAAY,gBAAgB,MAAM,UAAU;GAC9C,EAAE;EACJ,CAAC;CACH;CAEA,MAAM,aAA4B;EAChC,KAAK,SAAS,MAAM;CACtB;CAEA,MAAM,WAA0B;EAC9B,KAAK,SAAS,MAAM;CACtB;AACF"}
|
|
1
|
+
{"version":3,"file":"dev-telemetry.js","names":[],"sources":["../src/dev-telemetry.ts"],"sourcesContent":["import {\n context,\n propagation,\n ROOT_CONTEXT,\n SpanStatusCode,\n trace,\n type Attributes,\n type HrTime,\n} from \"@opentelemetry/api\";\nimport { AsyncLocalStorageContextManager } from \"@opentelemetry/context-async-hooks\";\nimport { W3CTraceContextPropagator } from \"@opentelemetry/core\";\nimport {\n TracerProvider,\n type ReadableSpan,\n type Span,\n type SpanProcessor,\n} from \"@opentelemetry/sdk-trace\";\nimport { GLOBAL_SYMBOL } from \"@brickkit/core\";\nimport type {\n SerializedError,\n TelemetryRecord,\n WorkerErrorPhase,\n} from \"./dashboard-protocol\";\nimport { sendToSupervisor } from \"./dev-protocol\";\n\n/** Read by @brickkit/core's logger; see `createLogger` there. */\nconst LOG_CAPTURE = Symbol.for(GLOBAL_SYMBOL.logsCapture);\n/** Core's function that records a line on the running span; see `recordActive` there. */\nconst LOG_RECORD = Symbol.for(GLOBAL_SYMBOL.logsRecord);\nconst CONSOLE_CAPTURED = Symbol.for(\"brickkit.console.captured\");\n\nconst CONSOLE_LEVELS = {\n log: \"info\",\n info: \"info\",\n warn: \"warn\",\n error: \"error\",\n debug: \"debug\",\n} as const;\n\nconst MAX_TEXT_LENGTH = 500;\nconst MAX_STACK_LENGTH = 4000;\nconst FLUSH_DELAY_MS = 20;\nconst MAX_BATCH_SIZE = 200;\n\n/**\n * Register the tracer provider, context manager, and W3C trace context\n * propagator. Span records are batched and passed to `onRecords`. Returns false\n * when another tracer provider was already registered, in which case\n * `onRecords` never runs.\n */\nexport function installTracing(\n onRecords: (records: TelemetryRecord[]) => void,\n): boolean {\n const batcher = new RecordBatcher(onRecords);\n const registered = trace.setGlobalTracerProvider(\n new TracerProvider({\n spanProcessors: [new SupervisorSpanProcessor(batcher)],\n }),\n );\n context.setGlobalContextManager(\n new AsyncLocalStorageContextManager().enable(),\n );\n propagation.setGlobalPropagator(new W3CTraceContextPropagator());\n // From here the dashboard shows what actions and tools log, as span events,\n // so @brickkit/core stops printing it. The key is shared by name because the\n // app and the dev server may each hold their own copy of core.\n if (registered) {\n (globalThis as Record<symbol, unknown>)[LOG_CAPTURE] = true;\n captureConsole();\n }\n return registered;\n}\n\ntype Restore = () => void;\n\n/**\n * Send `console.log`, `info`, `warn`, `error`, and `debug` to the dashboard\n * while a traced request is running, as `ctx.logger` does, so code that logs\n * with `console` needs no change. Lines logged outside a request print as\n * usual. Only a dashboard turns this on, `brick dev`'s or the monitoring one\n * of `brick start`: with neither, the console is left alone. Calling it again\n * does nothing; the returned function puts the console back.\n */\nexport function captureConsole(): Restore {\n const target = console as unknown as Record<string | symbol, unknown>;\n const existing = target[CONSOLE_CAPTURED];\n if (typeof existing === \"function\") return existing as Restore;\n\n const globals = globalThis as Record<symbol, unknown>;\n const originals = new Map<string, (...args: unknown[]) => void>();\n for (const [method, level] of Object.entries(CONSOLE_LEVELS)) {\n const original = target[method] as (...args: unknown[]) => void;\n originals.set(method, original);\n target[method] = function (this: unknown, ...args: unknown[]) {\n const record = globals[LOG_RECORD];\n if (\n globals[LOG_CAPTURE] === true &&\n typeof record === \"function\" &&\n record(level, args) === true\n )\n return;\n original.apply(this, args);\n };\n }\n const restore: Restore = () => {\n for (const [method, original] of originals) target[method] = original;\n delete target[CONSOLE_CAPTURED];\n };\n target[CONSOLE_CAPTURED] = restore;\n return restore;\n}\n\n/**\n * Install tracing in the dev worker, so spans from apps built with\n * `brick({ telemetry: true })` reach the supervisor and join callers' traces.\n * Call before the app entry is imported.\n */\nexport function installWorkerTelemetry(): void {\n installTracing((records) => {\n void sendToSupervisor({ type: \"brick:telemetry\", records });\n });\n}\n\nexport function reportWorkerError(\n phase: WorkerErrorPhase,\n error: unknown,\n): Promise<void> {\n return sendToSupervisor({\n type: \"brick:error\",\n phase,\n error: serializeError(error),\n });\n}\n\nfunction serializeError(error: unknown): SerializedError {\n if (error instanceof Error) {\n return {\n name: error.name,\n message: truncate(error.message),\n stack:\n error.stack === undefined\n ? undefined\n : truncate(error.stack, MAX_STACK_LENGTH),\n };\n }\n return { name: \"Error\", message: truncate(String(error)) };\n}\n\nfunction truncate(text: string, limit = MAX_TEXT_LENGTH): string {\n return text.length > limit ? `${text.slice(0, limit)}…` : text;\n}\n\nfunction toMs(time: HrTime): number {\n return time[0] * 1000 + time[1] / 1e6;\n}\n\nfunction statusName(code: SpanStatusCode): \"unset\" | \"ok\" | \"error\" {\n if (code === SpanStatusCode.ERROR) return \"error\";\n if (code === SpanStatusCode.OK) return \"ok\";\n return \"unset\";\n}\n\nfunction boundAttributes(attributes: Attributes | undefined): Attributes {\n const bounded: Attributes = {};\n for (const [key, value] of Object.entries(attributes ?? {})) {\n bounded[key] =\n typeof value === \"string\" ? truncate(value, MAX_STACK_LENGTH) : value;\n }\n return bounded;\n}\n\nclass RecordBatcher {\n #records: TelemetryRecord[] = [];\n #timer: ReturnType<typeof setTimeout> | undefined;\n readonly #send: (records: TelemetryRecord[]) => void;\n\n constructor(send: (records: TelemetryRecord[]) => void) {\n this.#send = send;\n }\n\n push(record: TelemetryRecord): void {\n this.#records.push(record);\n if (this.#records.length >= MAX_BATCH_SIZE) this.flush();\n else this.#timer ??= setTimeout(() => this.flush(), FLUSH_DELAY_MS);\n }\n\n flush(): void {\n clearTimeout(this.#timer);\n this.#timer = undefined;\n if (this.#records.length === 0) return;\n const records = this.#records;\n this.#records = [];\n context.with(ROOT_CONTEXT, () => this.#send(records));\n }\n}\n\nclass SupervisorSpanProcessor implements SpanProcessor {\n readonly #batcher: RecordBatcher;\n\n constructor(batcher: RecordBatcher) {\n this.#batcher = batcher;\n }\n\n onStart(span: Span): void {\n const { traceId, spanId } = span.spanContext();\n this.#batcher.push({\n phase: \"start\",\n traceId,\n spanId,\n parentSpanId: span.parentSpanContext?.spanId,\n name: span.name,\n startMs: toMs(span.startTime),\n attributes: boundAttributes(span.attributes),\n });\n }\n\n onEnd(span: ReadableSpan): void {\n const { traceId, spanId } = span.spanContext();\n this.#batcher.push({\n phase: \"end\",\n traceId,\n spanId,\n name: span.name,\n endMs: toMs(span.endTime),\n status: statusName(span.status.code),\n statusMessage: span.status.message,\n attributes: boundAttributes(span.attributes),\n events: span.events.map((event) => ({\n name: event.name,\n timeMs: toMs(event.time),\n attributes: boundAttributes(event.attributes),\n })),\n });\n }\n\n async forceFlush(): Promise<void> {\n this.#batcher.flush();\n }\n\n async shutdown(): Promise<void> {\n this.#batcher.flush();\n }\n}\n"],"mappings":";;;;;;;;AA0BA,MAAM,cAAc,OAAO,IAAI,cAAc,WAAW;;AAExD,MAAM,aAAa,OAAO,IAAI,cAAc,UAAU;AACtD,MAAM,mBAAmB,OAAO,IAAI,2BAA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,MAAM,UAAU,KAAK;EACrB,KAAK,WAAW,CAAC;EACjB,QAAQ,KAAK,oBAAoB,KAAK,MAAM,OAAO,CAAC;CACtD;AACF;AAEA,IAAM,0BAAN,MAAuD;CAC5C;CAET,YAAY,SAAwB;EAClC,KAAK,WAAW;CAClB;CAEA,QAAQ,MAAkB;EACxB,MAAM,EAAE,SAAS,WAAW,KAAK,YAAY;EAC7C,KAAK,SAAS,KAAK;GACjB,OAAO;GACP;GACA;GACA,cAAc,KAAK,mBAAmB;GACtC,MAAM,KAAK;GACX,SAAS,KAAK,KAAK,SAAS;GAC5B,YAAY,gBAAgB,KAAK,UAAU;EAC7C,CAAC;CACH;CAEA,MAAM,MAA0B;EAC9B,MAAM,EAAE,SAAS,WAAW,KAAK,YAAY;EAC7C,KAAK,SAAS,KAAK;GACjB,OAAO;GACP;GACA;GACA,MAAM,KAAK;GACX,OAAO,KAAK,KAAK,OAAO;GACxB,QAAQ,WAAW,KAAK,OAAO,IAAI;GACnC,eAAe,KAAK,OAAO;GAC3B,YAAY,gBAAgB,KAAK,UAAU;GAC3C,QAAQ,KAAK,OAAO,KAAK,WAAW;IAClC,MAAM,MAAM;IACZ,QAAQ,KAAK,MAAM,IAAI;IACvB,YAAY,gBAAgB,MAAM,UAAU;GAC9C,EAAE;EACJ,CAAC;CACH;CAEA,MAAM,aAA4B;EAChC,KAAK,SAAS,MAAM;CACtB;CAEA,MAAM,WAA0B;EAC9B,KAAK,SAAS,MAAM;CACtB;AACF"}
|
package/dist/package.js
CHANGED
|
@@ -4087,6 +4087,7 @@
|
|
|
4087
4087
|
--span-action: oklch(55% .2 295);
|
|
4088
4088
|
--span-rpc: oklch(66% .17 65);
|
|
4089
4089
|
--span-sql: oklch(58% .12 195);
|
|
4090
|
+
--span-fetch: oklch(58% .12 110);
|
|
4090
4091
|
--span-event: oklch(58% .16 340);
|
|
4091
4092
|
--span-other: oklch(70% 0 0);
|
|
4092
4093
|
}
|
|
@@ -4121,6 +4122,7 @@
|
|
|
4121
4122
|
--span-action: oklch(72% .15 295);
|
|
4122
4123
|
--span-rpc: oklch(80% .15 75);
|
|
4123
4124
|
--span-sql: oklch(77% .12 190);
|
|
4125
|
+
--span-fetch: oklch(80% .13 105);
|
|
4124
4126
|
--span-event: oklch(74% .14 340);
|
|
4125
4127
|
--span-other: oklch(50% 0 0);
|
|
4126
4128
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__reactRouterManifest={"entry":{"module":"/workflows/assets/entry.client-Cszf0uLP.js","imports":["/workflows/assets/jsx-runtime-DRYYXgdJ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/workflows/assets/root-
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/workflows/assets/entry.client-Cszf0uLP.js","imports":["/workflows/assets/jsx-runtime-DRYYXgdJ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/workflows/assets/root-C12dyylt.js","imports":["/workflows/assets/jsx-runtime-DRYYXgdJ.js","/workflows/assets/dist-CEyPxAJU.js"],"css":["/workflows/assets/root-Cnc-DXen.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/workflows/assets/home-B2m1nnIz.js","imports":["/workflows/assets/jsx-runtime-DRYYXgdJ.js","/workflows/assets/dist-CEyPxAJU.js","/workflows/assets/tabs-C2hdi5D4.js"],"css":["/workflows/assets/tabs-BVrPbzfI.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/workflows/assets/run-detail-BdV01jxD.js","imports":["/workflows/assets/jsx-runtime-DRYYXgdJ.js","/workflows/assets/dist-CEyPxAJU.js","/workflows/assets/tabs-C2hdi5D4.js"],"css":["/workflows/assets/tabs-BVrPbzfI.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/workflows/assets/api.rpc-BvRk9kiK.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/workflows/assets/api.stream._streamId-BvRk9kiK.js","imports":[],"css":[]}},"url":"/workflows/assets/manifest-3c342844.js","version":"3c342844"};
|
|
@@ -4087,6 +4087,7 @@
|
|
|
4087
4087
|
--span-action: oklch(55% .2 295);
|
|
4088
4088
|
--span-rpc: oklch(66% .17 65);
|
|
4089
4089
|
--span-sql: oklch(58% .12 195);
|
|
4090
|
+
--span-fetch: oklch(58% .12 110);
|
|
4090
4091
|
--span-event: oklch(58% .16 340);
|
|
4091
4092
|
--span-other: oklch(70% 0 0);
|
|
4092
4093
|
}
|
|
@@ -4121,6 +4122,7 @@
|
|
|
4121
4122
|
--span-action: oklch(72% .15 295);
|
|
4122
4123
|
--span-rpc: oklch(80% .15 75);
|
|
4123
4124
|
--span-sql: oklch(77% .12 190);
|
|
4125
|
+
--span-fetch: oklch(80% .13 105);
|
|
4124
4126
|
--span-event: oklch(74% .14 340);
|
|
4125
4127
|
--span-other: oklch(50% 0 0);
|
|
4126
4128
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as __require, o as __toESM$1, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-C1I3wEg2.js";
|
|
2
2
|
import { c as require_jsx_runtime, l as require_react_dom, o as twMerge, r as Ui, s as clsx, u as require_react } from "./chunk-7TTQLYRW-BO6_qAAU.js";
|
|
3
|
-
import { $ as isRetryableWorldError, A as HookWakePublished, B as WorkflowOperation, C as trace$1, D as HookLookupResult, E as HookId, F as WorkflowDynamic, G as WorkflowStartHook, H as WorkflowRunSpecVersion, I as WorkflowDynamicCodeBytes, J as WorkflowStartHookEnqueueFailed, K as WorkflowStartHookConfirmAttempts, L as WorkflowDynamicCodeStorage, M as WorkflowCapabilityProbeCached, N as WorkflowCapabilityProbeError, O as HookResumeCommitted, P as WorkflowCapabilityProbeLatencyMs, Q as WorkflowStartHookRetentionUntil, R as WorkflowDynamicSourceHash, S as serializeTraceCarrier, T as HookFound, U as WorkflowRunSpecVersionSource, V as WorkflowRunId$1, W as WorkflowRunStatus, X as WorkflowStartHookOutcome, Y as WorkflowStartHookErrorCode, Z as WorkflowStartHookRejectionReason, _ as getWorldLazy, a as dehydrateWorkflowArguments, b as runtimeLogger, c as hydrateRunError, d as hydrateWorkflowReturnValue, et as withResolvers, f as tagForwardedWritableTarget, g as WORKFLOW_SERIALIZE, h as WORKFLOW_DESERIALIZE, i as dehydrateStepReturnValue, j as WorkflowArgumentsCount, k as HookToken, l as hydrateStepArguments, m as contextStorage, n as dehydrateDynamicWorkflowCode, nt as parseWorkflowName, o as getForwardedWritableEncryptionKey, p as getWorkflowRunStreamId, q as WorkflowStartHookConflictingRunId, r as dehydrateStepArguments, rt as workflowDisplayName, s as getRunReadableStream, t as createForwardedWritable, tt as parseStepName, u as hydrateWorkflowArguments, v as assertWorldSupportsInBandFence, w as DeploymentId, x as linkToTraceCarrier, y as assertWorldSupportsRuntimeProtocol, z as WorkflowName } from "./serialization-
|
|
3
|
+
import { $ as isRetryableWorldError, A as HookWakePublished, B as WorkflowOperation, C as trace$1, D as HookLookupResult, E as HookId, F as WorkflowDynamic, G as WorkflowStartHook, H as WorkflowRunSpecVersion, I as WorkflowDynamicCodeBytes, J as WorkflowStartHookEnqueueFailed, K as WorkflowStartHookConfirmAttempts, L as WorkflowDynamicCodeStorage, M as WorkflowCapabilityProbeCached, N as WorkflowCapabilityProbeError, O as HookResumeCommitted, P as WorkflowCapabilityProbeLatencyMs, Q as WorkflowStartHookRetentionUntil, R as WorkflowDynamicSourceHash, S as serializeTraceCarrier, T as HookFound, U as WorkflowRunSpecVersionSource, V as WorkflowRunId$1, W as WorkflowRunStatus, X as WorkflowStartHookOutcome, Y as WorkflowStartHookErrorCode, Z as WorkflowStartHookRejectionReason, _ as getWorldLazy, a as dehydrateWorkflowArguments, b as runtimeLogger, c as hydrateRunError, d as hydrateWorkflowReturnValue, et as withResolvers, f as tagForwardedWritableTarget, g as WORKFLOW_SERIALIZE, h as WORKFLOW_DESERIALIZE, i as dehydrateStepReturnValue, j as WorkflowArgumentsCount, k as HookToken, l as hydrateStepArguments, m as contextStorage, n as dehydrateDynamicWorkflowCode, nt as parseWorkflowName, o as getForwardedWritableEncryptionKey, p as getWorkflowRunStreamId, q as WorkflowStartHookConflictingRunId, r as dehydrateStepArguments, rt as workflowDisplayName, s as getRunReadableStream, t as createForwardedWritable, tt as parseStepName, u as hydrateWorkflowArguments, v as assertWorldSupportsInBandFence, w as DeploymentId, x as linkToTraceCarrier, y as assertWorldSupportsRuntimeProtocol, z as WorkflowName } from "./serialization-D4H52Sdp.js";
|
|
4
4
|
import { $ as WorkflowRunBaseSchema, $t as isValidIBAN, A as parseQueueRoute, At as _enum, B as parseWorldCapabilities, Bt as preprocess, C as ValidQueueName, Ct as applyAttributeChanges, D as isSingleOrchestratorMessage, Dt as date, E as getRunQueueNamespace, Et as validateAttributeEventDataSize, F as mintedSpecVersion, Ft as boolean, G as AnalyticsRunSchema, Gt as ZodError, H as AnalyticsAttributeKeySchema, Ht as string, I as requiresNewerWorld, It as discriminatedUnion, J as WaitSchema, Jt as isRecursiveSchema, K as AnalyticsStepSchema, Kt as _isoDateTime, L as envNumber, Lt as literal$1, M as singleOrchestratorContinuationPayload, Mt as _undefined, N as singleOrchestratorRunIdOf, Nt as any, O as orchestratorRunIdOf, Ot as number$2, P as isLegacySpecVersion, Pt as array, Q as BulkCancelWorkflowRunsResultSchema, Qt as isValidCreditCard, R as getMaxEventsForRun, Rt as number$1, S as QueuePrefix, St as ROOT_RUN_ID_ATTRIBUTE, T as getQueueTopicPrefix, Tt as validateAttributeChanges, U as AnalyticsEventSchema, Ut as union, V as ANALYTICS_RUN_SCOPED_PAGE_LIMIT, Vt as record, W as AnalyticsHookSchema, Wt as unknown, X as isTerminalStepStatus, Xt as isValidBase64URL, Y as StepSchema, Yt as isValidBase64, Z as BulkCancelWorkflowRunsRequestSchema, Zt as isValidCIDRv6, _ as reenqueueActiveRuns, _n as sizeCaps, _t as AttributeKeySchema, a as decodeTime, an as urlProtocolOk, at as isHookEventRequiringExistence, b as MessageId, bt as PARENT_RUN_ID_ATTRIBUTE, c as decodeSnapshotEnvelope, cn as number, ct as isTerminalRunEventType, d as isRunCreationEvent, dn as clone, dt as stripEventDataRefs, en as isValidIPv6, et as WorkflowRunSchema, f as isSlotEventId, fn as codePointLength, g as entityResolveData, gn as shallowClone, gt as SerializedDataSchema, h as StructuredErrorSchema, hn as isPlainObject$1, ht as startHookId, i as workflowRunIdSchema, in as urlHostnameOk, it as isChildEntityCreationEvent, j as resolveQueueNamespace, jt as _instanceof, k as parseQueueName, kt as ZodISODateTime, l as encodeSnapshotEnvelope, ln as $ZodAsyncError, lt as isTerminalStepEventType, m as PaginatedResponseSchema, mn as floatSafeRemainder, mt as isStartHookId, n as ulidToDate, nn as mergeValues, nt as EventSchema, o as monotonicFactory, on as validateURL, ot as isHookLifecycleEventType, p as slotToEventId, pn as esc, pt as START_HOOK_WIRE_CODES, q as AnalyticsWaitSchema, qt as isBackEdge, r as validateUlidTimestamp, rn as stripTabAndNewline, rt as EventTypeSchema, s as ulid$1, sn as Doc, st as isStepEventType, tn as isValidJWT, tt as isTerminalWorkflowRunStatus, u as eventIdToSlot, ut as isWaitEventType, v as isNodeHttpEnabled, vt as AttributeValueSchema, wt as readRunRetention, x as QueuePayloadSchema, xt as RETENTION_ATTRIBUTE, y as HookSchema, yt as AttributeValidationError, z as getMaxEventsPerRun, zt as object } from "./dist-DTHqO9VA.js";
|
|
5
5
|
import { a as isSealedNoopEvent$1, i as getEventDataRefFields, n as classifyEntityEvent, r as getEventDataPayloadField, t as TERMINAL_EVENT_CLASSES } from "./event-metadata-Bx8Ts484.js";
|
|
6
|
-
import { $ as WorkflowStreamStartIndex, A as recordInBandRefusal, B as StepLatencyOptimizations, C as getVercelDiagnostics, Ct as destroyNodeHttpAgents, D as instrumentedFetch, Dt as debugLog, E as inBandCounter, Et as decode$2, F as PeerService$1, G as WorkflowEventType, H as WorkflowClientVersion, I as RpcMethod$1, J as WorkflowRunId$2, K as WorkflowEventsTransport, L as RpcService$1, M as withHttpClientSpan, N as ErrorType, O as parseRetryAfter, P as NetworkProtocolName, Q as WorkflowStreamOperation, R as RpcSystem$1, S as getRequestTimeoutMs, St as createNodeHttpAgents, T as httpLog, Tt as encode$2, U as WorkflowEventExpectedSeqInBand, V as StepStsoMs, W as WorkflowEventInBand, X as WorkflowStepStartOwnerStamped, Y as WorkflowStepStartMode, Z as WorkflowStreamName, _ as makeRequest, _t as getStreamDispatcher, a as decodeFrame, at as getTraceContextHeaders, b as describeTransportFailure, bt as require_dist$3, c as isWsEventsTransportEnabled, ct as AfterCommitError, d as isWsEventsTransportStrict, dt as withEventPostRetry, et as WorkflowWsReplyParts, f as isWsStreamsTransportEnabled, ft as getDeadline, g as getHttpUrl, gt as getStreamCloseDispatcher, h as getHttpConfig, ht as getQueueDispatcher, i as V4_FRAME_CONTENT_TYPE, it as getSpanKind$1, j as resolveVercelApiToken, k as recordClientSpanStatus, l as isWsEventsTransportEnabledForWorkflow, lt as ReplayEventObserverError, m as getHeaders, mt as getEventsDispatcher, n as wsMaxMessageBytes, nt as WorkflowWsRequestParts, o as decodeFrames, ot as injectTraceContextIntoHeaders, p as deserializeError, pt as getDispatcher, q as WorkflowEventsTransportFallback, r as IncompleteFrameError, rt as WorkflowWsUrl, s as encodeFrame, st as trace$2, tt as WorkflowWsRequestId, u as isWsEventsTransportPossible, ut as createThrottleWaiter, v as resolveClientEnvironment, vt as noteEventsTransportOutcome, w as headersToRecord$1, wt as nodeHttpFetch, x as errorForResponse, xt as require_undici, y as HTTP_DEBUG_ENABLED, yt as version$2, z as StepId$1 } from "./ws-transport-
|
|
6
|
+
import { $ as WorkflowStreamStartIndex, A as recordInBandRefusal, B as StepLatencyOptimizations, C as getVercelDiagnostics, Ct as destroyNodeHttpAgents, D as instrumentedFetch, Dt as debugLog, E as inBandCounter, Et as decode$2, F as PeerService$1, G as WorkflowEventType, H as WorkflowClientVersion, I as RpcMethod$1, J as WorkflowRunId$2, K as WorkflowEventsTransport, L as RpcService$1, M as withHttpClientSpan, N as ErrorType, O as parseRetryAfter, P as NetworkProtocolName, Q as WorkflowStreamOperation, R as RpcSystem$1, S as getRequestTimeoutMs, St as createNodeHttpAgents, T as httpLog, Tt as encode$2, U as WorkflowEventExpectedSeqInBand, V as StepStsoMs, W as WorkflowEventInBand, X as WorkflowStepStartOwnerStamped, Y as WorkflowStepStartMode, Z as WorkflowStreamName, _ as makeRequest, _t as getStreamDispatcher, a as decodeFrame, at as getTraceContextHeaders, b as describeTransportFailure, bt as require_dist$3, c as isWsEventsTransportEnabled, ct as AfterCommitError, d as isWsEventsTransportStrict, dt as withEventPostRetry, et as WorkflowWsReplyParts, f as isWsStreamsTransportEnabled, ft as getDeadline, g as getHttpUrl, gt as getStreamCloseDispatcher, h as getHttpConfig, ht as getQueueDispatcher, i as V4_FRAME_CONTENT_TYPE, it as getSpanKind$1, j as resolveVercelApiToken, k as recordClientSpanStatus, l as isWsEventsTransportEnabledForWorkflow, lt as ReplayEventObserverError, m as getHeaders, mt as getEventsDispatcher, n as wsMaxMessageBytes, nt as WorkflowWsRequestParts, o as decodeFrames, ot as injectTraceContextIntoHeaders, p as deserializeError, pt as getDispatcher, q as WorkflowEventsTransportFallback, r as IncompleteFrameError, rt as WorkflowWsUrl, s as encodeFrame, st as trace$2, tt as WorkflowWsRequestId, u as isWsEventsTransportPossible, ut as createThrottleWaiter, v as resolveClientEnvironment, vt as noteEventsTransportOutcome, w as headersToRecord$1, wt as nodeHttpFetch, x as errorForResponse, xt as require_undici, y as HTTP_DEBUG_ENABLED, yt as version$2, z as StepId$1 } from "./ws-transport-DALQS5qP.js";
|
|
7
7
|
import { t as globalSingleton } from "./global-singleton-rNtXNHKV.js";
|
|
8
8
|
import { A as WorkflowStartError, C as TooEarlyError, D as WorkflowRunNotCompletedError, E as WorkflowRunFailedError, M as RUN_ERROR_CODES, N as parseDurationToDate, O as WorkflowRunNotFoundError, P as require_ms, S as ThrottleError, T as WorkflowRunCancelledError, _ as START_HOOK_CANDIDATE_CANCELLED, a as HookConflictError, b as StreamError, f as RunExpiredError, g as START_HOOK_ADMISSION_REJECTED, i as FatalError, j as WorkflowWorldError, k as WorkflowRuntimeError, l as InBandSupersededError, o as HookForceClaimedError, p as RunNotSupportedError, r as EntityConflictError, s as HookNotFoundError, t as CorruptedEventLogError, u as PreconditionFailedError, x as StreamExpiredError } from "./dist-OLuKLJ4s.js";
|
|
9
9
|
import "./state-resolver-DVs_zsEO.js";
|
|
@@ -76974,7 +76974,7 @@ var require_get_vercel_oidc_token_with_refresh = /* @__PURE__ */ __commonJSMin((
|
|
|
76974
76974
|
err = error;
|
|
76975
76975
|
}
|
|
76976
76976
|
try {
|
|
76977
|
-
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ __toESM$1(require_token_util())), await import("./token-
|
|
76977
|
+
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await Promise.resolve().then(() => /* @__PURE__ */ __toESM$1(require_token_util())), await import("./token-Bro5a25u.js").then((m) => /* @__PURE__ */ __toESM$1(m.default))]);
|
|
76978
76978
|
if (!token || isExpired(getTokenPayload(token), options?.expirationBufferMs)) {
|
|
76979
76979
|
await refreshToken(options);
|
|
76980
76980
|
token = (0, import_get_vercel_oidc_token_sync.getVercelOidcTokenSync)();
|
|
@@ -85473,7 +85473,7 @@ var wsEventsChannelForInvocation = (runId, workflowName, config) => {
|
|
|
85473
85473
|
*/
|
|
85474
85474
|
open() {
|
|
85475
85475
|
if (!runId || !isWsEventsTransportEnabledForWorkflow(workflowName)) return;
|
|
85476
|
-
claim = import("./ws-transport-
|
|
85476
|
+
claim = import("./ws-transport-DALQS5qP.js").then((n) => n.t).then(({ openWsChannel }) => openWsChannel(runId, config, { workflowName })).catch(() => void 0);
|
|
85477
85477
|
},
|
|
85478
85478
|
/**
|
|
85479
85479
|
* Awaited, unlike the open: work scheduled after the handler returns is not
|
|
@@ -87002,7 +87002,7 @@ function fallbackReasonOf(attempt) {
|
|
|
87002
87002
|
return attempt.kind === "fallback" ? attempt.reason : void 0;
|
|
87003
87003
|
}
|
|
87004
87004
|
async function postEventBatchOverWs(runId, body, restUrl, config) {
|
|
87005
|
-
const { resolveWsTransport } = await import("./ws-transport-
|
|
87005
|
+
const { resolveWsTransport } = await import("./ws-transport-DALQS5qP.js").then((n) => n.t);
|
|
87006
87006
|
const resolved = resolveWsTransport(runId, config);
|
|
87007
87007
|
if (resolved.kind !== "open") return attemptWithoutSocket(resolved);
|
|
87008
87008
|
const { transport, wsUrl } = resolved;
|
|
@@ -87102,7 +87102,7 @@ async function postEventBatchOverWs(runId, body, restUrl, config) {
|
|
|
87102
87102
|
* whole point to avoid.
|
|
87103
87103
|
*/
|
|
87104
87104
|
async function postEventFrameOverWs(input, config, options = {}) {
|
|
87105
|
-
const { resolveWsTransport } = await import("./ws-transport-
|
|
87105
|
+
const { resolveWsTransport } = await import("./ws-transport-DALQS5qP.js").then((n) => n.t);
|
|
87106
87106
|
const { runId } = input;
|
|
87107
87107
|
const resolved = resolveWsTransport(runId, config);
|
|
87108
87108
|
if (resolved.kind !== "open") return attemptWithoutSocket(resolved);
|
|
@@ -88497,7 +88497,7 @@ function subscribeRunEvents(runId, afterSlot, onEvent, options = {}, config, rea
|
|
|
88497
88497
|
queueMicrotask(() => fail(new LiveFeedError("world-vercel: live feed unavailable, the events WS transport is off")));
|
|
88498
88498
|
return stop;
|
|
88499
88499
|
}
|
|
88500
|
-
import("./ws-transport-
|
|
88500
|
+
import("./ws-transport-DALQS5qP.js").then((n) => n.t).then(({ openWsChannel, resolveWsTransport }) => {
|
|
88501
88501
|
if (!active) return;
|
|
88502
88502
|
const release = openWsChannel(runId, config);
|
|
88503
88503
|
const resolved = release ? resolveWsTransport(runId, config) : void 0;
|
|
@@ -88990,7 +88990,7 @@ function beginNormalWsClose(ws, reason) {
|
|
|
88990
88990
|
await observed;
|
|
88991
88991
|
span?.setAttribute("workflow.stream.ws.close_cleanup_timeout", timedOut);
|
|
88992
88992
|
});
|
|
88993
|
-
import("./functions-
|
|
88993
|
+
import("./functions-BIXA0YFQ.js").then((m) => /* @__PURE__ */ __toESM$1(m.default, 1)).then(({ waitUntil }) => waitUntil(cleanup)).catch(() => {});
|
|
88994
88994
|
cleanup.catch(() => {});
|
|
88995
88995
|
ws.close(1e3, reason);
|
|
88996
88996
|
}
|
|
@@ -90403,7 +90403,7 @@ var HookInvocationResultSchema = discriminatedUnion("status", [object({ status:
|
|
|
90403
90403
|
})]);
|
|
90404
90404
|
// ../../node_modules/.bun/@workflow+core@5.5.0+5f46f5d62fa32f36/node_modules/@workflow/core/dist/runtime/wait-until.js
|
|
90405
90405
|
function waitUntil(promise) {
|
|
90406
|
-
import("./functions-
|
|
90406
|
+
import("./functions-BIXA0YFQ.js").then((m) => /* @__PURE__ */ __toESM$1(m.default, 1)).then(({ waitUntil }) => {
|
|
90407
90407
|
waitUntil(promise);
|
|
90408
90408
|
});
|
|
90409
90409
|
}
|
|
@@ -99206,9 +99206,9 @@ var server_manifest_default = {
|
|
|
99206
99206
|
"hasClientMiddleware": false,
|
|
99207
99207
|
"hasDefaultExport": true,
|
|
99208
99208
|
"hasErrorBoundary": true,
|
|
99209
|
-
"module": "/workflows/assets/root-
|
|
99209
|
+
"module": "/workflows/assets/root-C12dyylt.js",
|
|
99210
99210
|
"imports": ["/workflows/assets/jsx-runtime-DRYYXgdJ.js", "/workflows/assets/dist-CEyPxAJU.js"],
|
|
99211
|
-
"css": ["/workflows/assets/root-
|
|
99211
|
+
"css": ["/workflows/assets/root-Cnc-DXen.css"],
|
|
99212
99212
|
"clientActionModule": void 0,
|
|
99213
99213
|
"clientLoaderModule": void 0,
|
|
99214
99214
|
"clientMiddlewareModule": void 0,
|
|
@@ -99307,8 +99307,8 @@ var server_manifest_default = {
|
|
|
99307
99307
|
"hydrateFallbackModule": void 0
|
|
99308
99308
|
}
|
|
99309
99309
|
},
|
|
99310
|
-
"url": "/workflows/assets/manifest-
|
|
99311
|
-
"version": "
|
|
99310
|
+
"url": "/workflows/assets/manifest-3c342844.js",
|
|
99311
|
+
"version": "3c342844",
|
|
99312
99312
|
"sri": void 0
|
|
99313
99313
|
};
|
|
99314
99314
|
// \0virtual:react-router/server-build
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require, o as __toESM$1, t as __commonJSMin } from "./rolldown-runtime-C1I3wEg2.js";
|
|
2
2
|
import { t as require_cjs } from "./cjs-DPK66Gxq.js";
|
|
3
|
-
import { a as require_dist$2 } from "./app-
|
|
3
|
+
import { a as require_dist$2 } from "./app-p2-vDk3q.js";
|
|
4
4
|
// ../../node_modules/.bun/@vercel+functions@3.11.3+cebf867cff8bd6b1/node_modules/@vercel/functions/headers.js
|
|
5
5
|
var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
@@ -1429,7 +1429,7 @@ var require_get_vercel_oidc_token_with_refresh = /* @__PURE__ */ __commonJSMin((
|
|
|
1429
1429
|
err = error;
|
|
1430
1430
|
}
|
|
1431
1431
|
try {
|
|
1432
|
-
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await import("./token-util-
|
|
1432
|
+
const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await import("./token-util-9OFaOQxs.js").then((m) => /* @__PURE__ */ __toESM$1(m.default)), await import("./token-70XLMYnj.js").then((m) => /* @__PURE__ */ __toESM$1(m.default))]);
|
|
1433
1433
|
if (!token || isExpired(getTokenPayload(token), options?.expirationBufferMs)) {
|
|
1434
1434
|
await refreshToken(options);
|
|
1435
1435
|
token = (0, import_get_vercel_oidc_token_sync.getVercelOidcTokenSync)();
|
package/inspector-dist/server/assets/{serialization-Cgu5b7aC.js → serialization-D4H52Sdp.js}
RENAMED
|
@@ -4935,7 +4935,7 @@ function reviveAbortController(value, ops, runId) {
|
|
|
4935
4935
|
if (value.hookToken) {
|
|
4936
4936
|
const hookResume = (async () => {
|
|
4937
4937
|
try {
|
|
4938
|
-
const { resumeHook } = await import("./app-
|
|
4938
|
+
const { resumeHook } = await import("./app-p2-vDk3q.js").then((n) => n.n);
|
|
4939
4939
|
await resumeHook(value.hookToken, {
|
|
4940
4940
|
aborted: true,
|
|
4941
4941
|
reason
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __commonJSMin } from "./rolldown-runtime-C1I3wEg2.js";
|
|
2
|
-
import { n as require_dist, r as require_token_error, t as require_token_util } from "./functions-
|
|
2
|
+
import { n as require_dist, r as require_token_error, t as require_token_util } from "./functions-BIXA0YFQ.js";
|
|
3
3
|
// ../../node_modules/.bun/@vercel+oidc@4.0.9/node_modules/@vercel/oidc/dist/token.js
|
|
4
4
|
var require_token = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __commonJSMin } from "./rolldown-runtime-C1I3wEg2.js";
|
|
2
|
-
import { i as require_dist, o as require_token_error, r as require_token_util } from "./app-
|
|
2
|
+
import { i as require_dist, o as require_token_error, r as require_token_util } from "./app-p2-vDk3q.js";
|
|
3
3
|
// ../../node_modules/.bun/@vercel+oidc@3.8.10/node_modules/@vercel/oidc/dist/token.js
|
|
4
4
|
var require_token = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -26736,7 +26736,7 @@ function getDefaultStreamCloseDispatcher() {
|
|
|
26736
26736
|
* `@workflow/world-vercel` does not evaluate that package at module load.
|
|
26737
26737
|
*/
|
|
26738
26738
|
async function getDeadline() {
|
|
26739
|
-
const { getDeadline } = await import("./functions-
|
|
26739
|
+
const { getDeadline } = await import("./functions-BIXA0YFQ.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
|
|
26740
26740
|
return getDeadline();
|
|
26741
26741
|
}
|
|
26742
26742
|
// ../../node_modules/.bun/@workflow+world-vercel@5.5.0+17cbff9eaaab0f5e/node_modules/@workflow/world-vercel/dist/event-retry.js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createFetchHandler } from "./assets/app-
|
|
1
|
+
export { t as createFetchHandler } from "./assets/app-p2-vDk3q.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brickkit/cli",
|
|
3
|
-
"version": "0.16.0-beta.
|
|
3
|
+
"version": "0.16.0-beta.4",
|
|
4
4
|
"description": "CLI and server engine for Brick-TS",
|
|
5
5
|
"homepage": "https://brickkit.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"format:check": "oxfmt --check ."
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
|
-
"@brickkit/core": "^0.16.0-beta.
|
|
96
|
+
"@brickkit/core": "^0.16.0-beta.4",
|
|
97
97
|
"@opentelemetry/api": "^1.10.0",
|
|
98
98
|
"@opentelemetry/context-async-hooks": "^3.1.1",
|
|
99
99
|
"@opentelemetry/core": "^3.1.1",
|
|
File without changes
|