@forklaunch/implementation-worker-kafka 0.8.0 → 0.8.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.
|
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(schemas_exports);
|
|
|
28
28
|
// domain/schemas/kafka.schema.ts
|
|
29
29
|
var import_internal = require("@forklaunch/internal");
|
|
30
30
|
|
|
31
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
31
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
|
|
32
32
|
var typebox_exports = {};
|
|
33
33
|
__export(typebox_exports, {
|
|
34
34
|
SchemaValidator: () => SchemaValidator,
|
|
@@ -68,7 +68,7 @@ __export(typebox_exports, {
|
|
|
68
68
|
});
|
|
69
69
|
__reExport(typebox_exports, require("@sinclair/typebox"));
|
|
70
70
|
|
|
71
|
-
// ../../../node_modules/.pnpm/@forklaunch+common@0.6.
|
|
71
|
+
// ../../../node_modules/.pnpm/@forklaunch+common@0.6.18/node_modules/@forklaunch/common/lib/index.mjs
|
|
72
72
|
function deepCloneWithoutUndefined(obj, seen = /* @__PURE__ */ new WeakMap()) {
|
|
73
73
|
if (obj === null || obj === void 0) {
|
|
74
74
|
return obj;
|
|
@@ -148,12 +148,18 @@ var InMemoryBlob = class extends Blob {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
151
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
|
|
152
152
|
var import_typebox = require("@sinclair/typebox");
|
|
153
153
|
var import_compiler = require("@sinclair/typebox/compiler");
|
|
154
154
|
var import_errors = require("@sinclair/typebox/errors");
|
|
155
155
|
var import_value = require("@sinclair/typebox/value");
|
|
156
156
|
import_typebox.FormatRegistry.Set("binary", (value) => typeof value === "string");
|
|
157
|
+
import_typebox.TypeRegistry.Set("Blob", (_schema, value) => value instanceof Blob);
|
|
158
|
+
import_typebox.TypeRegistry.Set(
|
|
159
|
+
"ArrayBuffer",
|
|
160
|
+
(_schema, value) => value instanceof ArrayBuffer
|
|
161
|
+
);
|
|
162
|
+
import_typebox.TypeRegistry.Set("Buffer", (_schema, value) => value instanceof Buffer);
|
|
157
163
|
(0, import_errors.SetErrorFunction)((params) => {
|
|
158
164
|
switch (params.errorType) {
|
|
159
165
|
case import_errors.ValueErrorType.Union:
|
|
@@ -347,18 +353,21 @@ var TypeboxSchemaValidator = class {
|
|
|
347
353
|
file = import_typebox.Type.Transform(
|
|
348
354
|
import_typebox.Type.Union([
|
|
349
355
|
import_typebox.Type.Unsafe({
|
|
356
|
+
[import_typebox.Kind]: "Buffer",
|
|
350
357
|
errorType: "binary",
|
|
351
358
|
format: "binary",
|
|
352
359
|
example: "a raw buffer or file stream",
|
|
353
360
|
title: "File"
|
|
354
361
|
}),
|
|
355
362
|
import_typebox.Type.Unsafe({
|
|
363
|
+
[import_typebox.Kind]: "ArrayBuffer",
|
|
356
364
|
errorType: "binary",
|
|
357
365
|
format: "binary",
|
|
358
366
|
example: "an array buffer",
|
|
359
367
|
title: "File"
|
|
360
368
|
}),
|
|
361
369
|
import_typebox.Type.Unsafe({
|
|
370
|
+
[import_typebox.Kind]: "Blob",
|
|
362
371
|
errorType: "binary",
|
|
363
372
|
format: "binary",
|
|
364
373
|
example: "a blob object",
|
|
@@ -614,7 +623,7 @@ var TypeboxSchemaValidator = class {
|
|
|
614
623
|
} : {
|
|
615
624
|
ok: false,
|
|
616
625
|
errors: errors.flatMap((error) => {
|
|
617
|
-
if (error.type === import_errors.ValueErrorType.Union && error.schema.errorType
|
|
626
|
+
if (error.type === import_errors.ValueErrorType.Union && error.schema.errorType?.includes("any of")) {
|
|
618
627
|
return error.errors.flatMap(
|
|
619
628
|
(e, idx) => Array.from(e).map((e2) => ({
|
|
620
629
|
path: [
|
|
@@ -727,7 +736,7 @@ var KafkaWorkerOptionsSchema = {
|
|
|
727
736
|
peekCount: number
|
|
728
737
|
};
|
|
729
738
|
|
|
730
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
739
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
|
|
731
740
|
var import_v3 = require("zod/v3");
|
|
732
741
|
|
|
733
742
|
// ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
|
|
@@ -777,7 +786,7 @@ merge.withOptions = (options, ...objects) => {
|
|
|
777
786
|
return result;
|
|
778
787
|
};
|
|
779
788
|
|
|
780
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
789
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
|
|
781
790
|
var import_v32 = require("zod/v3");
|
|
782
791
|
function extendApi(schema, schemaObject = {}) {
|
|
783
792
|
const This = schema.constructor;
|
|
@@ -19,7 +19,7 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
19
19
|
// domain/schemas/kafka.schema.ts
|
|
20
20
|
import { serviceSchemaResolver } from "@forklaunch/internal";
|
|
21
21
|
|
|
22
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
22
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
|
|
23
23
|
var typebox_exports = {};
|
|
24
24
|
__export(typebox_exports, {
|
|
25
25
|
SchemaValidator: () => SchemaValidator,
|
|
@@ -60,7 +60,7 @@ __export(typebox_exports, {
|
|
|
60
60
|
__reExport(typebox_exports, typebox_star);
|
|
61
61
|
import * as typebox_star from "@sinclair/typebox";
|
|
62
62
|
|
|
63
|
-
// ../../../node_modules/.pnpm/@forklaunch+common@0.6.
|
|
63
|
+
// ../../../node_modules/.pnpm/@forklaunch+common@0.6.18/node_modules/@forklaunch/common/lib/index.mjs
|
|
64
64
|
function deepCloneWithoutUndefined(obj, seen = /* @__PURE__ */ new WeakMap()) {
|
|
65
65
|
if (obj === null || obj === void 0) {
|
|
66
66
|
return obj;
|
|
@@ -140,12 +140,13 @@ var InMemoryBlob = class extends Blob {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
143
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
|
|
144
144
|
import {
|
|
145
145
|
FormatRegistry,
|
|
146
146
|
Kind,
|
|
147
147
|
KindGuard,
|
|
148
|
-
Type
|
|
148
|
+
Type,
|
|
149
|
+
TypeRegistry
|
|
149
150
|
} from "@sinclair/typebox";
|
|
150
151
|
import { TypeCheck, TypeCompiler } from "@sinclair/typebox/compiler";
|
|
151
152
|
import {
|
|
@@ -155,6 +156,12 @@ import {
|
|
|
155
156
|
} from "@sinclair/typebox/errors";
|
|
156
157
|
import { Value } from "@sinclair/typebox/value";
|
|
157
158
|
FormatRegistry.Set("binary", (value) => typeof value === "string");
|
|
159
|
+
TypeRegistry.Set("Blob", (_schema, value) => value instanceof Blob);
|
|
160
|
+
TypeRegistry.Set(
|
|
161
|
+
"ArrayBuffer",
|
|
162
|
+
(_schema, value) => value instanceof ArrayBuffer
|
|
163
|
+
);
|
|
164
|
+
TypeRegistry.Set("Buffer", (_schema, value) => value instanceof Buffer);
|
|
158
165
|
SetErrorFunction((params) => {
|
|
159
166
|
switch (params.errorType) {
|
|
160
167
|
case ValueErrorType.Union:
|
|
@@ -348,18 +355,21 @@ var TypeboxSchemaValidator = class {
|
|
|
348
355
|
file = Type.Transform(
|
|
349
356
|
Type.Union([
|
|
350
357
|
Type.Unsafe({
|
|
358
|
+
[Kind]: "Buffer",
|
|
351
359
|
errorType: "binary",
|
|
352
360
|
format: "binary",
|
|
353
361
|
example: "a raw buffer or file stream",
|
|
354
362
|
title: "File"
|
|
355
363
|
}),
|
|
356
364
|
Type.Unsafe({
|
|
365
|
+
[Kind]: "ArrayBuffer",
|
|
357
366
|
errorType: "binary",
|
|
358
367
|
format: "binary",
|
|
359
368
|
example: "an array buffer",
|
|
360
369
|
title: "File"
|
|
361
370
|
}),
|
|
362
371
|
Type.Unsafe({
|
|
372
|
+
[Kind]: "Blob",
|
|
363
373
|
errorType: "binary",
|
|
364
374
|
format: "binary",
|
|
365
375
|
example: "a blob object",
|
|
@@ -615,7 +625,7 @@ var TypeboxSchemaValidator = class {
|
|
|
615
625
|
} : {
|
|
616
626
|
ok: false,
|
|
617
627
|
errors: errors.flatMap((error) => {
|
|
618
|
-
if (error.type === ValueErrorType.Union && error.schema.errorType
|
|
628
|
+
if (error.type === ValueErrorType.Union && error.schema.errorType?.includes("any of")) {
|
|
619
629
|
return error.errors.flatMap(
|
|
620
630
|
(e, idx) => Array.from(e).map((e2) => ({
|
|
621
631
|
path: [
|
|
@@ -728,7 +738,7 @@ var KafkaWorkerOptionsSchema = {
|
|
|
728
738
|
peekCount: number
|
|
729
739
|
};
|
|
730
740
|
|
|
731
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
741
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
|
|
732
742
|
import {
|
|
733
743
|
z as z2,
|
|
734
744
|
ZodType
|
|
@@ -781,7 +791,7 @@ merge.withOptions = (options, ...objects) => {
|
|
|
781
791
|
return result;
|
|
782
792
|
};
|
|
783
793
|
|
|
784
|
-
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.
|
|
794
|
+
// ../../../node_modules/.pnpm/@forklaunch+validator@0.10.18/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
|
|
785
795
|
import { z } from "zod/v3";
|
|
786
796
|
function extendApi(schema, schemaObject = {}) {
|
|
787
797
|
const This = schema.constructor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/implementation-worker-kafka",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Kafka implementation for forklaunch workers",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"lib/**"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@forklaunch/core": "^0.15.
|
|
46
|
-
"@forklaunch/internal": "^0.3.
|
|
45
|
+
"@forklaunch/core": "^0.15.7",
|
|
46
|
+
"@forklaunch/internal": "^0.3.18",
|
|
47
47
|
"@sinclair/typebox": "^0.34.41",
|
|
48
48
|
"kafkajs": "^2.2.4",
|
|
49
49
|
"zod": "^4.1.12",
|
|
50
|
-
"@forklaunch/interfaces-worker": "0.7.
|
|
50
|
+
"@forklaunch/interfaces-worker": "0.7.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
53
|
+
"@typescript/native-preview": "7.0.0-dev.20251008.1",
|
|
54
54
|
"depcheck": "^1.4.7",
|
|
55
55
|
"eslint": "^9.37.0",
|
|
56
56
|
"prettier": "^3.6.2",
|