@forklaunch/implementation-worker-bullmq 0.5.7 → 0.5.8

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.
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(schemas_exports);
35
35
  // domain/schemas/bullMqWorker.schema.ts
36
36
  var import_internal = require('@forklaunch/internal');
37
37
 
38
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
38
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
39
39
  var typebox_exports = {};
40
40
  __export(typebox_exports, {
41
41
  SchemaValidator: () => SchemaValidator,
@@ -75,7 +75,7 @@ __export(typebox_exports, {
75
75
  });
76
76
  __reExport(typebox_exports, require('@sinclair/typebox'));
77
77
 
78
- // ../../../node_modules/.pnpm/@forklaunch+common@0.5.3/node_modules/@forklaunch/common/lib/index.mjs
78
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.5.7/node_modules/@forklaunch/common/lib/index.mjs
79
79
  var InMemoryBlob = class extends Blob {
80
80
  constructor(content) {
81
81
  super([content]);
@@ -83,7 +83,7 @@ var InMemoryBlob = class extends Blob {
83
83
  }
84
84
  };
85
85
 
86
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
86
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
87
87
  var import_typebox = require('@sinclair/typebox');
88
88
  var import_compiler = require('@sinclair/typebox/compiler');
89
89
  var import_errors = require('@sinclair/typebox/errors');
@@ -121,7 +121,7 @@ var TypeboxSchemaValidator = class {
121
121
  title: 'UUID'
122
122
  });
123
123
  email = import_typebox.Type.String({
124
- pattern: `(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
124
+ pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
125
125
  errorType: 'email',
126
126
  example: 'a@b.com',
127
127
  title: 'Email'
@@ -308,7 +308,9 @@ var TypeboxSchemaValidator = class {
308
308
  title: 'File'
309
309
  })
310
310
  )
311
- .Decode((value) => new InMemoryBlob(value))
311
+ .Decode((value) => {
312
+ return new InMemoryBlob(value);
313
+ })
312
314
  .Encode((value) => value.content);
313
315
  type = () => this.any;
314
316
  /**
@@ -511,10 +513,40 @@ var TypeboxSchemaValidator = class {
511
513
  }
512
514
  } else {
513
515
  const schemified = this.schemify(schema);
514
- if (import_value.Value.Check(schemified, value)) {
515
- conversion = import_value.Value.Decode(schemified, value);
516
+ if (schemified[import_typebox.Kind] === 'Unsafe') {
517
+ try {
518
+ if (value instanceof Buffer) {
519
+ conversion = new InMemoryBlob(value);
520
+ } else {
521
+ errors = [
522
+ {
523
+ type: import_errors.ValueErrorType.String,
524
+ schema: schemified,
525
+ path: '',
526
+ message: `Invalid file type: expected Buffer or string, got ${typeof value}`,
527
+ value,
528
+ errors: []
529
+ }
530
+ ];
531
+ }
532
+ } catch (err) {
533
+ errors = [
534
+ {
535
+ type: import_errors.ValueErrorType.String,
536
+ schema: schemified,
537
+ path: '',
538
+ message: err instanceof Error ? err.message : 'Invalid file type',
539
+ value,
540
+ errors: []
541
+ }
542
+ ];
543
+ }
516
544
  } else {
517
- errors = Array.from(import_value.Value.Errors(schemified, value));
545
+ if (import_value.Value.Check(schemified, value)) {
546
+ conversion = import_value.Value.Decode(schemified, value);
547
+ } else {
548
+ errors = Array.from(import_value.Value.Errors(schemified, value));
549
+ }
518
550
  }
519
551
  }
520
552
  return errors != null && errors.length === 0
@@ -633,7 +665,7 @@ var BullMqWorkerOptionsSchema = {
633
665
  interval: number
634
666
  };
635
667
 
636
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
668
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
637
669
  var import_v3 = require('zod/v3');
638
670
 
639
671
  // ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
@@ -695,7 +727,7 @@ merge.withOptions = (options, ...objects) => {
695
727
  return result;
696
728
  };
697
729
 
698
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
730
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
699
731
  var import_v32 = require('zod/v3');
700
732
  function extendApi(schema, schemaObject = {}) {
701
733
  const This = schema.constructor;
@@ -1247,7 +1279,7 @@ var ZodSchemaValidator = class {
1247
1279
  email = import_v3.z.string().email().openapi({
1248
1280
  title: 'Email',
1249
1281
  format: 'email',
1250
- pattern: `(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
1282
+ pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
1251
1283
  example: 'a@b.com'
1252
1284
  });
1253
1285
  uri = import_v3.z.string().url().openapi({
@@ -25,7 +25,7 @@ var __reExport = (target, mod, secondTarget) => (
25
25
  // domain/schemas/bullMqWorker.schema.ts
26
26
  import { serviceSchemaResolver } from '@forklaunch/internal';
27
27
 
28
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
28
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
29
29
  var typebox_exports = {};
30
30
  __export(typebox_exports, {
31
31
  SchemaValidator: () => SchemaValidator,
@@ -66,7 +66,7 @@ __export(typebox_exports, {
66
66
  __reExport(typebox_exports, typebox_star);
67
67
  import * as typebox_star from '@sinclair/typebox';
68
68
 
69
- // ../../../node_modules/.pnpm/@forklaunch+common@0.5.3/node_modules/@forklaunch/common/lib/index.mjs
69
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.5.7/node_modules/@forklaunch/common/lib/index.mjs
70
70
  var InMemoryBlob = class extends Blob {
71
71
  constructor(content) {
72
72
  super([content]);
@@ -74,7 +74,7 @@ var InMemoryBlob = class extends Blob {
74
74
  }
75
75
  };
76
76
 
77
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
77
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
78
78
  import { FormatRegistry, Kind, KindGuard, Type } from '@sinclair/typebox';
79
79
  import { TypeCheck, TypeCompiler } from '@sinclair/typebox/compiler';
80
80
  import {
@@ -113,7 +113,7 @@ var TypeboxSchemaValidator = class {
113
113
  title: 'UUID'
114
114
  });
115
115
  email = Type.String({
116
- pattern: `(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
116
+ pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
117
117
  errorType: 'email',
118
118
  example: 'a@b.com',
119
119
  title: 'Email'
@@ -293,7 +293,9 @@ var TypeboxSchemaValidator = class {
293
293
  title: 'File'
294
294
  })
295
295
  )
296
- .Decode((value) => new InMemoryBlob(value))
296
+ .Decode((value) => {
297
+ return new InMemoryBlob(value);
298
+ })
297
299
  .Encode((value) => value.content);
298
300
  type = () => this.any;
299
301
  /**
@@ -490,10 +492,40 @@ var TypeboxSchemaValidator = class {
490
492
  }
491
493
  } else {
492
494
  const schemified = this.schemify(schema);
493
- if (Value.Check(schemified, value)) {
494
- conversion = Value.Decode(schemified, value);
495
+ if (schemified[Kind] === 'Unsafe') {
496
+ try {
497
+ if (value instanceof Buffer) {
498
+ conversion = new InMemoryBlob(value);
499
+ } else {
500
+ errors = [
501
+ {
502
+ type: ValueErrorType.String,
503
+ schema: schemified,
504
+ path: '',
505
+ message: `Invalid file type: expected Buffer or string, got ${typeof value}`,
506
+ value,
507
+ errors: []
508
+ }
509
+ ];
510
+ }
511
+ } catch (err) {
512
+ errors = [
513
+ {
514
+ type: ValueErrorType.String,
515
+ schema: schemified,
516
+ path: '',
517
+ message: err instanceof Error ? err.message : 'Invalid file type',
518
+ value,
519
+ errors: []
520
+ }
521
+ ];
522
+ }
495
523
  } else {
496
- errors = Array.from(Value.Errors(schemified, value));
524
+ if (Value.Check(schemified, value)) {
525
+ conversion = Value.Decode(schemified, value);
526
+ } else {
527
+ errors = Array.from(Value.Errors(schemified, value));
528
+ }
497
529
  }
498
530
  }
499
531
  return errors != null && errors.length === 0
@@ -609,7 +641,7 @@ var BullMqWorkerOptionsSchema = {
609
641
  interval: number
610
642
  };
611
643
 
612
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
644
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
613
645
  import { z as z2, ZodType } from 'zod/v3';
614
646
 
615
647
  // ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
@@ -671,7 +703,7 @@ merge.withOptions = (options, ...objects) => {
671
703
  return result;
672
704
  };
673
705
 
674
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
706
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.8/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
675
707
  import { z } from 'zod/v3';
676
708
  function extendApi(schema, schemaObject = {}) {
677
709
  const This = schema.constructor;
@@ -1219,7 +1251,7 @@ var ZodSchemaValidator = class {
1219
1251
  email = z2.string().email().openapi({
1220
1252
  title: 'Email',
1221
1253
  format: 'email',
1222
- pattern: `(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x5b-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
1254
+ pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',
1223
1255
  example: 'a@b.com'
1224
1256
  });
1225
1257
  uri = z2.string().url().openapi({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/implementation-worker-bullmq",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "BullMQ implementation for forklaunch workers",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {
@@ -42,20 +42,20 @@
42
42
  "lib/**"
43
43
  ],
44
44
  "dependencies": {
45
- "@forklaunch/core": "^0.13.4",
46
- "@forklaunch/internal": "^0.2.4",
45
+ "@forklaunch/core": "^0.13.8",
46
+ "@forklaunch/internal": "^0.2.8",
47
47
  "@sinclair/typebox": "^0.34.40",
48
48
  "bullmq": "^5.58.1",
49
49
  "zod": "^4.1.1",
50
- "@forklaunch/interfaces-worker": "0.4.6"
50
+ "@forklaunch/interfaces-worker": "0.4.7"
51
51
  },
52
52
  "devDependencies": {
53
- "@typescript/native-preview": "7.0.0-dev.20250824.1",
53
+ "@typescript/native-preview": "7.0.0-dev.20250825.1",
54
54
  "depcheck": "^1.4.7",
55
55
  "eslint": "^9.34.0",
56
56
  "prettier": "^3.6.2",
57
- "typedoc": "^0.28.10",
58
- "typescript-eslint": "^8.40.0"
57
+ "typedoc": "^0.28.11",
58
+ "typescript-eslint": "^8.41.0"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "tsc --noEmit && tsup producers/index.ts consumers/index.ts domain/schemas/index.ts domain/types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",