@forklaunch/implementation-worker-database 0.8.0 → 0.8.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.
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(schemas_exports);
28
28
  // domain/schemas/databaseWorker.schema.ts
29
29
  var import_internal = require("@forklaunch/internal");
30
30
 
31
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.17/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
31
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/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.17/node_modules/@forklaunch/common/lib/index.mjs
71
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.6.19/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.17/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
151
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/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.includes("any of")) {
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: [
@@ -723,7 +732,7 @@ var DatabaseWorkerOptionsSchema = {
723
732
  interval: number
724
733
  };
725
734
 
726
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.17/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
735
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
727
736
  var import_v3 = require("zod/v3");
728
737
 
729
738
  // ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
@@ -773,7 +782,7 @@ merge.withOptions = (options, ...objects) => {
773
782
  return result;
774
783
  };
775
784
 
776
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.17/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
785
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
777
786
  var import_v32 = require("zod/v3");
778
787
  function extendApi(schema, schemaObject = {}) {
779
788
  const This = schema.constructor;
@@ -19,7 +19,7 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
19
19
  // domain/schemas/databaseWorker.schema.ts
20
20
  import { serviceSchemaResolver } from "@forklaunch/internal";
21
21
 
22
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.17/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
22
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/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.17/node_modules/@forklaunch/common/lib/index.mjs
63
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.6.19/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.17/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
143
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/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.includes("any of")) {
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: [
@@ -724,7 +734,7 @@ var DatabaseWorkerOptionsSchema = {
724
734
  interval: number
725
735
  };
726
736
 
727
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.17/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
737
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
728
738
  import {
729
739
  z as z2,
730
740
  ZodType
@@ -777,7 +787,7 @@ merge.withOptions = (options, ...objects) => {
777
787
  return result;
778
788
  };
779
789
 
780
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.17/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
790
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.10.19/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
781
791
  import { z } from "zod/v3";
782
792
  function extendApi(schema, schemaObject = {}) {
783
793
  const This = schema.constructor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/implementation-worker-database",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Database 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.15.6",
46
- "@forklaunch/internal": "^0.3.17",
47
- "@mikro-orm/core": "^6.5.7",
45
+ "@forklaunch/core": "^0.15.8",
46
+ "@forklaunch/internal": "^0.3.19",
47
+ "@mikro-orm/core": "^6.5.8",
48
48
  "@sinclair/typebox": "^0.34.41",
49
49
  "zod": "^4.1.12",
50
- "@forklaunch/interfaces-worker": "0.7.0"
50
+ "@forklaunch/interfaces-worker": "0.7.2"
51
51
  },
52
52
  "devDependencies": {
53
- "@typescript/native-preview": "7.0.0-dev.20251007.1",
53
+ "@typescript/native-preview": "7.0.0-dev.20251016.1",
54
54
  "depcheck": "^1.4.7",
55
55
  "eslint": "^9.37.0",
56
56
  "prettier": "^3.6.2",
57
- "typedoc": "^0.28.13",
58
- "typescript-eslint": "^8.46.0"
57
+ "typedoc": "^0.28.14",
58
+ "typescript-eslint": "^8.46.1"
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",