@firtoz/worker-helper 1.6.1 → 1.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @firtoz/worker-helper
2
2
 
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1e057aa`](https://github.com/firtoz/fullstack-toolkit/commit/1e057aad4b252223f4269a9bc6bd01a744cf56a8) Thanks [@firtoz](https://github.com/firtoz)! - **@firtoz/router-toolkit:** Stop re-exporting `@firtoz/maybe-error` from the package entry so `.d.ts` matches runtime. `@firtoz/maybe-error` is now a regular dependency; import `success`, `fail`, `MaybeError`, `exhaustiveGuard`, and related symbols from `@firtoz/maybe-error` directly.
8
+
9
+ **@firtoz/hono-fetcher** and **@firtoz/worker-helper:** Regenerate root `index.d.ts` after tsup so type-only symbols use `export type { ... }`, for compatibility with stricter consumer compiler settings.
10
+
11
+ **@firtoz/drizzle-sqlite-wasm:** Remove re-exports of `@firtoz/drizzle-utils` (`syncableTable`, `makeId`, branded/schema types, `SQLOperation`, `SQLInterceptor`) from the package entry. Import those from `@firtoz/drizzle-utils` directly.
12
+
13
+ **@firtoz/drizzle-durable-sqlite:** Stop re-exporting `SQLOperation` and `SQLInterceptor` from the package entry; import them from `@firtoz/drizzle-utils` when needed.
14
+
3
15
  ## 1.6.1
4
16
 
5
17
  ### Patch Changes
@@ -1,6 +1,5 @@
1
- import { ZodType } from 'zod/v4';
2
-
3
- interface WorkerClientOptions<TClientMessage, TServerMessage> {
1
+ import type { ZodType } from "zod/v4";
2
+ export interface WorkerClientOptions<TClientMessage, TServerMessage> {
4
3
  /**
5
4
  * Worker instance to wrap
6
5
  */
@@ -26,7 +25,7 @@ interface WorkerClientOptions<TClientMessage, TServerMessage> {
26
25
  */
27
26
  onError?: (event: ErrorEvent) => void;
28
27
  }
29
- declare class WorkerClient<TClientMessage, TServerMessage> {
28
+ export declare class WorkerClient<TClientMessage, TServerMessage> {
30
29
  private worker;
31
30
  private readonly clientSchema;
32
31
  private readonly serverSchema;
@@ -47,5 +46,3 @@ declare class WorkerClient<TClientMessage, TServerMessage> {
47
46
  */
48
47
  getWorker(): Worker;
49
48
  }
50
-
51
- export { WorkerClient, type WorkerClientOptions };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export { WorkerClient, WorkerClientOptions } from './WorkerClient.js';
2
- export { WorkerHelper, WorkerHelperHandlers } from './worker-helper.js';
3
- import 'zod/v4';
1
+ export type { WorkerClientOptions } from "./WorkerClient.js";
2
+ export { WorkerClient } from "./WorkerClient.js";
3
+ export type { WorkerHelperHandlers } from "./worker-helper.js";
4
+ export { WorkerHelper } from "./worker-helper.js";
@@ -1,13 +1,12 @@
1
- import { ZodType, ZodError } from 'zod/v4';
2
-
1
+ import type { ZodError, ZodType } from "zod/v4";
3
2
  type MessageTarget = DedicatedWorkerGlobalScope;
4
- type WorkerHelperHandlers<TInput, TOutput> = {
3
+ export type WorkerHelperHandlers<TInput, TOutput> = {
5
4
  handleMessage: (data: TInput) => void | Promise<void>;
6
5
  handleInputValidationError: (error: ZodError<TInput>, originalData: unknown) => void | Promise<void>;
7
6
  handleOutputValidationError: (error: ZodError<TOutput>, originalData: TOutput) => void | Promise<void>;
8
7
  handleProcessingError: (error: unknown, validatedData: TInput) => void | Promise<void>;
9
8
  };
10
- declare abstract class WorkerHelper<TInput, TOutput> {
9
+ export declare abstract class WorkerHelper<TInput, TOutput> {
11
10
  private self;
12
11
  private inputSchema;
13
12
  private outputSchema;
@@ -17,5 +16,4 @@ declare abstract class WorkerHelper<TInput, TOutput> {
17
16
  private setupMessageListener;
18
17
  private handleMessage;
19
18
  }
20
-
21
- export { WorkerHelper, type WorkerHelperHandlers };
19
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firtoz/worker-helper",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Type-safe Web Worker helper with Zod validation and Cloudflare Workers utilities (cf-typegen)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "CHANGELOG.md"
29
29
  ],
30
30
  "scripts": {
31
- "build": "tsup && bun ../../scripts/add-node-shebang.ts dist/cf-typegen.js",
31
+ "build": "tsup && tsc -p tsconfig.emit-index-dts.json && bun ../../scripts/add-node-shebang.ts dist/cf-typegen.js",
32
32
  "prepack": "bun run build",
33
33
  "typecheck": "tsgo --noEmit -p ./tsconfig.json",
34
34
  "lint": "biome check --write src",
@@ -73,6 +73,6 @@
73
73
  "devDependencies": {
74
74
  "@types/node": "^25.6.0",
75
75
  "@firtoz/maybe-error": "^1.6.1",
76
- "bun-types": "^1.3.12"
76
+ "bun-types": "^1.3.13"
77
77
  }
78
78
  }
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
- export {
2
- WorkerClient,
3
- type WorkerClientOptions,
4
- } from "./WorkerClient";
5
- export { WorkerHelper, type WorkerHelperHandlers } from "./worker-helper";
1
+ export type { WorkerClientOptions } from "./WorkerClient.js";
2
+ export { WorkerClient } from "./WorkerClient.js";
3
+ export type { WorkerHelperHandlers } from "./worker-helper.js";
4
+ export { WorkerHelper } from "./worker-helper.js";