@forklaunch/implementation-worker-database 0.5.5 → 0.5.7

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/databaseWorker.schema.ts
36
36
  var import_internal = require('@forklaunch/internal');
37
37
 
38
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
38
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
39
39
  var typebox_exports = {};
40
40
  __export(typebox_exports, {
41
41
  SchemaValidator: () => SchemaValidator,
@@ -75,15 +75,15 @@ __export(typebox_exports, {
75
75
  });
76
76
  __reExport(typebox_exports, require('@sinclair/typebox'));
77
77
 
78
- // ../../../node_modules/.pnpm/@forklaunch+common@0.5.2/node_modules/@forklaunch/common/lib/index.mjs
78
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.5.3/node_modules/@forklaunch/common/lib/index.mjs
79
79
  var InMemoryBlob = class extends Blob {
80
80
  constructor(content) {
81
- super([Buffer.from(content)]);
81
+ super([content]);
82
82
  this.content = content;
83
83
  }
84
84
  };
85
85
 
86
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
86
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/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\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
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])+)])`,
125
125
  errorType: 'email',
126
126
  example: 'a@b.com',
127
127
  title: 'Email'
@@ -289,22 +289,22 @@ var TypeboxSchemaValidator = class {
289
289
  import_typebox.Type.String({
290
290
  errorType: 'binary',
291
291
  format: 'binary',
292
- example: 'a utf-8 encodable string',
292
+ example: 'a base-64 encodable string',
293
293
  title: 'Binary'
294
294
  })
295
295
  )
296
- .Decode((value) => new TextEncoder().encode(value))
296
+ .Decode((value) => new Uint8Array(Buffer.from(value, 'base64')))
297
297
  .Encode((value) => {
298
- if (value instanceof ArrayBuffer) {
298
+ if (value instanceof Buffer) {
299
299
  return String.fromCharCode(...new Uint8Array(value));
300
300
  }
301
301
  return '';
302
302
  });
303
303
  file = import_typebox.Type.Transform(
304
- import_typebox.Type.String({
304
+ import_typebox.Type.Unsafe({
305
305
  errorType: 'binary',
306
306
  format: 'binary',
307
- example: 'a utf-8 encodable blob or file',
307
+ example: 'a raw buffer or file stream',
308
308
  title: 'File'
309
309
  })
310
310
  )
@@ -631,7 +631,7 @@ var DatabaseWorkerOptionsSchema = {
631
631
  interval: number
632
632
  };
633
633
 
634
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
634
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
635
635
  var import_v3 = require('zod/v3');
636
636
 
637
637
  // ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
@@ -693,7 +693,7 @@ merge.withOptions = (options, ...objects) => {
693
693
  return result;
694
694
  };
695
695
 
696
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
696
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
697
697
  var import_v32 = require('zod/v3');
698
698
  function extendApi(schema, schemaObject = {}) {
699
699
  const This = schema.constructor;
@@ -1245,7 +1245,7 @@ var ZodSchemaValidator = class {
1245
1245
  email = import_v3.z.string().email().openapi({
1246
1246
  title: 'Email',
1247
1247
  format: 'email',
1248
- 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\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
1248
+ 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])+)])`,
1249
1249
  example: 'a@b.com'
1250
1250
  });
1251
1251
  uri = import_v3.z.string().url().openapi({
@@ -1367,15 +1367,15 @@ var ZodSchemaValidator = class {
1367
1367
  });
1368
1368
  binary = import_v3.z
1369
1369
  .string()
1370
- .transform((v) => new TextEncoder().encode(v))
1370
+ .transform((val) => new Uint8Array(Buffer.from(val, 'base64')))
1371
1371
  .openapi({
1372
1372
  title: 'Binary',
1373
1373
  type: 'string',
1374
1374
  format: 'binary',
1375
- example: 'a utf-8 encodable string'
1375
+ example: 'a base-64 encodable string'
1376
1376
  });
1377
1377
  file = import_v3.z
1378
- .string()
1378
+ .instanceof(Buffer)
1379
1379
  .transform((val) => {
1380
1380
  return new Blob([val]);
1381
1381
  })
@@ -1383,7 +1383,7 @@ var ZodSchemaValidator = class {
1383
1383
  title: 'File',
1384
1384
  type: 'string',
1385
1385
  format: 'binary',
1386
- example: 'a utf-8 encodable blob or file'
1386
+ example: 'a base-64 encodable blob or file'
1387
1387
  });
1388
1388
  type = () => this.any;
1389
1389
  /**
@@ -25,7 +25,7 @@ var __reExport = (target, mod, secondTarget) => (
25
25
  // domain/schemas/databaseWorker.schema.ts
26
26
  import { serviceSchemaResolver } from '@forklaunch/internal';
27
27
 
28
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
28
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
29
29
  var typebox_exports = {};
30
30
  __export(typebox_exports, {
31
31
  SchemaValidator: () => SchemaValidator,
@@ -66,15 +66,15 @@ __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.2/node_modules/@forklaunch/common/lib/index.mjs
69
+ // ../../../node_modules/.pnpm/@forklaunch+common@0.5.3/node_modules/@forklaunch/common/lib/index.mjs
70
70
  var InMemoryBlob = class extends Blob {
71
71
  constructor(content) {
72
- super([Buffer.from(content)]);
72
+ super([content]);
73
73
  this.content = content;
74
74
  }
75
75
  };
76
76
 
77
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/typebox/index.mjs
77
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/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\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
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])+)])`,
117
117
  errorType: 'email',
118
118
  example: 'a@b.com',
119
119
  title: 'Email'
@@ -274,22 +274,22 @@ var TypeboxSchemaValidator = class {
274
274
  Type.String({
275
275
  errorType: 'binary',
276
276
  format: 'binary',
277
- example: 'a utf-8 encodable string',
277
+ example: 'a base-64 encodable string',
278
278
  title: 'Binary'
279
279
  })
280
280
  )
281
- .Decode((value) => new TextEncoder().encode(value))
281
+ .Decode((value) => new Uint8Array(Buffer.from(value, 'base64')))
282
282
  .Encode((value) => {
283
- if (value instanceof ArrayBuffer) {
283
+ if (value instanceof Buffer) {
284
284
  return String.fromCharCode(...new Uint8Array(value));
285
285
  }
286
286
  return '';
287
287
  });
288
288
  file = Type.Transform(
289
- Type.String({
289
+ Type.Unsafe({
290
290
  errorType: 'binary',
291
291
  format: 'binary',
292
- example: 'a utf-8 encodable blob or file',
292
+ example: 'a raw buffer or file stream',
293
293
  title: 'File'
294
294
  })
295
295
  )
@@ -607,7 +607,7 @@ var DatabaseWorkerOptionsSchema = {
607
607
  interval: number
608
608
  };
609
609
 
610
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
610
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
611
611
  import { z as z2, ZodType } from 'zod/v3';
612
612
 
613
613
  // ../../../node_modules/.pnpm/ts-deepmerge@7.0.3/node_modules/ts-deepmerge/esm/index.js
@@ -669,7 +669,7 @@ merge.withOptions = (options, ...objects) => {
669
669
  return result;
670
670
  };
671
671
 
672
- // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.3/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
672
+ // ../../../node_modules/.pnpm/@forklaunch+validator@0.9.4/node_modules/@forklaunch/validator/lib/src/zod/index.mjs
673
673
  import { z } from 'zod/v3';
674
674
  function extendApi(schema, schemaObject = {}) {
675
675
  const This = schema.constructor;
@@ -1217,7 +1217,7 @@ var ZodSchemaValidator = class {
1217
1217
  email = z2.string().email().openapi({
1218
1218
  title: 'Email',
1219
1219
  format: 'email',
1220
- 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\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)])`,
1220
+ 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])+)])`,
1221
1221
  example: 'a@b.com'
1222
1222
  });
1223
1223
  uri = z2.string().url().openapi({
@@ -1337,15 +1337,15 @@ var ZodSchemaValidator = class {
1337
1337
  });
1338
1338
  binary = z2
1339
1339
  .string()
1340
- .transform((v) => new TextEncoder().encode(v))
1340
+ .transform((val) => new Uint8Array(Buffer.from(val, 'base64')))
1341
1341
  .openapi({
1342
1342
  title: 'Binary',
1343
1343
  type: 'string',
1344
1344
  format: 'binary',
1345
- example: 'a utf-8 encodable string'
1345
+ example: 'a base-64 encodable string'
1346
1346
  });
1347
1347
  file = z2
1348
- .string()
1348
+ .instanceof(Buffer)
1349
1349
  .transform((val) => {
1350
1350
  return new Blob([val]);
1351
1351
  })
@@ -1353,7 +1353,7 @@ var ZodSchemaValidator = class {
1353
1353
  title: 'File',
1354
1354
  type: 'string',
1355
1355
  format: 'binary',
1356
- example: 'a utf-8 encodable blob or file'
1356
+ example: 'a base-64 encodable blob or file'
1357
1357
  });
1358
1358
  type = () => this.any;
1359
1359
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/implementation-worker-database",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "Database 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.13.3",
46
- "@forklaunch/internal": "^0.2.3",
45
+ "@forklaunch/core": "^0.13.4",
46
+ "@forklaunch/internal": "^0.2.4",
47
47
  "@mikro-orm/core": "^6.4.16",
48
48
  "@sinclair/typebox": "^0.34.40",
49
- "zod": "^4.1.0",
50
- "@forklaunch/interfaces-worker": "0.4.4"
49
+ "zod": "^4.1.1",
50
+ "@forklaunch/interfaces-worker": "0.4.6"
51
51
  },
52
52
  "devDependencies": {
53
- "@typescript/native-preview": "7.0.0-dev.20250823.8",
53
+ "@typescript/native-preview": "7.0.0-dev.20250824.1",
54
54
  "depcheck": "^1.4.7",
55
55
  "eslint": "^9.34.0",
56
56
  "prettier": "^3.6.2",