@nanobpm/urban 0.77.1 → 0.77.2

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.
@@ -182,8 +182,7 @@ export function emitWorkerBindings(
182
182
  "// The bridge from the process model to the worker type system: each declared\n" +
183
183
  "// worker's `taskType` maps to the TS type of its input payload (`job.variables`)\n" +
184
184
  "// and result, so the typed `defineWorker` types a handler by its job type. Do\n" +
185
- "// not edit — regenerated from the manifest. Erased to plain JS at compile.\n" +
186
- "// eslint-disable\n";
185
+ "// not edit — regenerated from the manifest. Erased to plain JS at compile.\n";
187
186
 
188
187
  const needsRegistry = inputs.length > 0 || outputs.length > 0;
189
188
  const importTypes = needsRegistry
@@ -192,13 +191,13 @@ export function emitWorkerBindings(
192
191
 
193
192
  const inputsIface = inputs.length > 0
194
193
  ? `export interface WorkerInputs {\n${inputs.join("\n")}\n}\n`
195
- : `export interface WorkerInputs {}\n`;
194
+ : `export type WorkerInputs = Record<never, never>;\n`;
196
195
  const outputsIface = outputs.length > 0
197
196
  ? `export interface WorkerOutputs {\n${outputs.join("\n")}\n}\n`
198
- : `export interface WorkerOutputs {}\n`;
197
+ : `export type WorkerOutputs = Record<never, never>;\n`;
199
198
  const headersIface = headers.length > 0
200
199
  ? `export interface WorkerHeaders {\n${headers.join("\n")}\n}\n`
201
- : `export interface WorkerHeaders {}\n`;
200
+ : `export type WorkerHeaders = Record<never, never>;\n`;
202
201
 
203
202
  return `${header}\n` +
204
203
  importTypes +
@@ -373,11 +372,10 @@ export function emitWorkerBindingsRuntime(): string {
373
372
  "// Re-exports the worker SDK and overrides `defineWorker` with a taskType-keyed\n" +
374
373
  "// typed signature (job.variables, job.customHeaders + result typed from the\n" +
375
374
  "// worker's declared input/output/header contract). Erased to a pass-through at\n" +
376
- "// runtime. Do not edit.\n" +
377
- "// eslint-disable\n\n" +
378
- `import { defineWorker as defineWorkerRaw } from "./worker-sdk.ts";\n` +
375
+ "// runtime. Do not edit.\n\n" +
376
+ `import type { WorkerHdrs, WorkerHeaders, WorkerInputs, WorkerOutputs, WorkerTaskType, WorkerVars } from "./${WORKER_BINDINGS_DTS}";\n` +
379
377
  `import type { WorkerOptions } from "./worker-sdk.ts";\n` +
380
- `import type { WorkerInputs, WorkerOutputs, WorkerHeaders, WorkerTaskType, WorkerVars, WorkerHdrs } from "./${WORKER_BINDINGS_DTS}";\n\n` +
378
+ `import { defineWorker as defineWorkerRaw } from "./worker-sdk.ts";\n\n` +
381
379
  `export * from "./worker-sdk.ts";\n\n` +
382
380
  `type InFor<K extends WorkerTaskType> = K extends keyof WorkerInputs ? WorkerInputs[K] : WorkerVars;\n` +
383
381
  `type OutFor<K extends WorkerTaskType> = K extends keyof WorkerOutputs ? WorkerOutputs[K] : WorkerVars;\n` +
@@ -392,6 +390,7 @@ export function emitWorkerBindingsRuntime(): string {
392
390
  `export function defineWorker<K extends WorkerTaskType>(\n` +
393
391
  ` opts: { type: K } & WorkerOptions<InFor<K> & object, OutFor<K> & object, HdrFor<K> & object>,\n` +
394
392
  `): void {\n` +
393
+ ` // biome-ignore lint/plugin: generic-to-raw erasure at the worker-SDK boundary; the wire stays untyped JSON (ADR 0033 §3).\n` +
395
394
  ` defineWorkerRaw(opts as unknown as WorkerOptions);\n` +
396
395
  `}\n`;
397
396
  }