@moltium/world-core 0.1.15 → 0.1.17
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/dist/{PostgresAdapter-PKCTUAUZ.js → PostgresAdapter-6ZAAUL2O.js} +18 -10
- package/dist/PostgresAdapter-6ZAAUL2O.js.map +1 -0
- package/dist/{PostgresAdapter-MI4UUSXK.cjs → PostgresAdapter-BDIXQOXA.cjs} +18 -10
- package/dist/PostgresAdapter-BDIXQOXA.cjs.map +1 -0
- package/dist/index.cjs +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -66
- package/dist/index.d.ts +115 -66
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/PostgresAdapter-MI4UUSXK.cjs.map +0 -1
- package/dist/PostgresAdapter-PKCTUAUZ.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -165,11 +165,12 @@ interface RuleViolation {
|
|
|
165
165
|
interface PersistenceConfig {
|
|
166
166
|
type: 'memory' | 'postgres' | 'redis' | 'mongodb' | 'sqlite' | 'leveldb';
|
|
167
167
|
postgres?: {
|
|
168
|
-
|
|
168
|
+
connectionString?: string;
|
|
169
|
+
host?: string;
|
|
169
170
|
port?: number;
|
|
170
|
-
database
|
|
171
|
-
user
|
|
172
|
-
password
|
|
171
|
+
database?: string;
|
|
172
|
+
user?: string;
|
|
173
|
+
password?: string;
|
|
173
174
|
ssl?: boolean;
|
|
174
175
|
max?: number;
|
|
175
176
|
};
|
|
@@ -298,28 +299,49 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
298
299
|
filename: string;
|
|
299
300
|
memory?: boolean | undefined;
|
|
300
301
|
}>>;
|
|
301
|
-
postgres: z.ZodOptional<z.ZodObject<{
|
|
302
|
-
|
|
302
|
+
postgres: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
303
|
+
connectionString: z.ZodOptional<z.ZodString>;
|
|
304
|
+
host: z.ZodOptional<z.ZodString>;
|
|
303
305
|
port: z.ZodOptional<z.ZodNumber>;
|
|
304
|
-
database: z.ZodString
|
|
305
|
-
user: z.ZodString
|
|
306
|
-
password: z.ZodString
|
|
306
|
+
database: z.ZodOptional<z.ZodString>;
|
|
307
|
+
user: z.ZodOptional<z.ZodString>;
|
|
308
|
+
password: z.ZodOptional<z.ZodString>;
|
|
307
309
|
ssl: z.ZodOptional<z.ZodBoolean>;
|
|
308
310
|
max: z.ZodOptional<z.ZodNumber>;
|
|
309
311
|
}, "strip", z.ZodTypeAny, {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
user: string;
|
|
313
|
-
password: string;
|
|
312
|
+
connectionString?: string | undefined;
|
|
313
|
+
host?: string | undefined;
|
|
314
314
|
port?: number | undefined;
|
|
315
|
+
database?: string | undefined;
|
|
316
|
+
user?: string | undefined;
|
|
317
|
+
password?: string | undefined;
|
|
315
318
|
ssl?: boolean | undefined;
|
|
316
319
|
max?: number | undefined;
|
|
317
320
|
}, {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
321
|
+
connectionString?: string | undefined;
|
|
322
|
+
host?: string | undefined;
|
|
323
|
+
port?: number | undefined;
|
|
324
|
+
database?: string | undefined;
|
|
325
|
+
user?: string | undefined;
|
|
326
|
+
password?: string | undefined;
|
|
327
|
+
ssl?: boolean | undefined;
|
|
328
|
+
max?: number | undefined;
|
|
329
|
+
}>, {
|
|
330
|
+
connectionString?: string | undefined;
|
|
331
|
+
host?: string | undefined;
|
|
322
332
|
port?: number | undefined;
|
|
333
|
+
database?: string | undefined;
|
|
334
|
+
user?: string | undefined;
|
|
335
|
+
password?: string | undefined;
|
|
336
|
+
ssl?: boolean | undefined;
|
|
337
|
+
max?: number | undefined;
|
|
338
|
+
}, {
|
|
339
|
+
connectionString?: string | undefined;
|
|
340
|
+
host?: string | undefined;
|
|
341
|
+
port?: number | undefined;
|
|
342
|
+
database?: string | undefined;
|
|
343
|
+
user?: string | undefined;
|
|
344
|
+
password?: string | undefined;
|
|
323
345
|
ssl?: boolean | undefined;
|
|
324
346
|
max?: number | undefined;
|
|
325
347
|
}>>;
|
|
@@ -356,21 +378,22 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
356
378
|
useUnifiedTopology?: boolean | undefined;
|
|
357
379
|
}>>;
|
|
358
380
|
leveldb: z.ZodOptional<z.ZodObject<{
|
|
359
|
-
|
|
381
|
+
location: z.ZodString;
|
|
360
382
|
}, "strip", z.ZodTypeAny, {
|
|
361
|
-
|
|
383
|
+
location: string;
|
|
362
384
|
}, {
|
|
363
|
-
|
|
385
|
+
location: string;
|
|
364
386
|
}>>;
|
|
365
387
|
autoSaveIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
366
388
|
}, "strip", z.ZodTypeAny, {
|
|
367
389
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
368
390
|
postgres?: {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
user: string;
|
|
372
|
-
password: string;
|
|
391
|
+
connectionString?: string | undefined;
|
|
392
|
+
host?: string | undefined;
|
|
373
393
|
port?: number | undefined;
|
|
394
|
+
database?: string | undefined;
|
|
395
|
+
user?: string | undefined;
|
|
396
|
+
password?: string | undefined;
|
|
374
397
|
ssl?: boolean | undefined;
|
|
375
398
|
max?: number | undefined;
|
|
376
399
|
} | undefined;
|
|
@@ -391,17 +414,18 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
391
414
|
memory?: boolean | undefined;
|
|
392
415
|
} | undefined;
|
|
393
416
|
leveldb?: {
|
|
394
|
-
|
|
417
|
+
location: string;
|
|
395
418
|
} | undefined;
|
|
396
419
|
autoSaveIntervalMs?: number | undefined;
|
|
397
420
|
}, {
|
|
398
421
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
399
422
|
postgres?: {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
user: string;
|
|
403
|
-
password: string;
|
|
423
|
+
connectionString?: string | undefined;
|
|
424
|
+
host?: string | undefined;
|
|
404
425
|
port?: number | undefined;
|
|
426
|
+
database?: string | undefined;
|
|
427
|
+
user?: string | undefined;
|
|
428
|
+
password?: string | undefined;
|
|
405
429
|
ssl?: boolean | undefined;
|
|
406
430
|
max?: number | undefined;
|
|
407
431
|
} | undefined;
|
|
@@ -422,7 +446,7 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
422
446
|
memory?: boolean | undefined;
|
|
423
447
|
} | undefined;
|
|
424
448
|
leveldb?: {
|
|
425
|
-
|
|
449
|
+
location: string;
|
|
426
450
|
} | undefined;
|
|
427
451
|
autoSaveIntervalMs?: number | undefined;
|
|
428
452
|
}>;
|
|
@@ -547,28 +571,49 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
547
571
|
filename: string;
|
|
548
572
|
memory?: boolean | undefined;
|
|
549
573
|
}>>;
|
|
550
|
-
postgres: z.ZodOptional<z.ZodObject<{
|
|
551
|
-
|
|
574
|
+
postgres: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
575
|
+
connectionString: z.ZodOptional<z.ZodString>;
|
|
576
|
+
host: z.ZodOptional<z.ZodString>;
|
|
552
577
|
port: z.ZodOptional<z.ZodNumber>;
|
|
553
|
-
database: z.ZodString
|
|
554
|
-
user: z.ZodString
|
|
555
|
-
password: z.ZodString
|
|
578
|
+
database: z.ZodOptional<z.ZodString>;
|
|
579
|
+
user: z.ZodOptional<z.ZodString>;
|
|
580
|
+
password: z.ZodOptional<z.ZodString>;
|
|
556
581
|
ssl: z.ZodOptional<z.ZodBoolean>;
|
|
557
582
|
max: z.ZodOptional<z.ZodNumber>;
|
|
558
583
|
}, "strip", z.ZodTypeAny, {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
user: string;
|
|
562
|
-
password: string;
|
|
584
|
+
connectionString?: string | undefined;
|
|
585
|
+
host?: string | undefined;
|
|
563
586
|
port?: number | undefined;
|
|
587
|
+
database?: string | undefined;
|
|
588
|
+
user?: string | undefined;
|
|
589
|
+
password?: string | undefined;
|
|
564
590
|
ssl?: boolean | undefined;
|
|
565
591
|
max?: number | undefined;
|
|
566
592
|
}, {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
593
|
+
connectionString?: string | undefined;
|
|
594
|
+
host?: string | undefined;
|
|
595
|
+
port?: number | undefined;
|
|
596
|
+
database?: string | undefined;
|
|
597
|
+
user?: string | undefined;
|
|
598
|
+
password?: string | undefined;
|
|
599
|
+
ssl?: boolean | undefined;
|
|
600
|
+
max?: number | undefined;
|
|
601
|
+
}>, {
|
|
602
|
+
connectionString?: string | undefined;
|
|
603
|
+
host?: string | undefined;
|
|
604
|
+
port?: number | undefined;
|
|
605
|
+
database?: string | undefined;
|
|
606
|
+
user?: string | undefined;
|
|
607
|
+
password?: string | undefined;
|
|
608
|
+
ssl?: boolean | undefined;
|
|
609
|
+
max?: number | undefined;
|
|
610
|
+
}, {
|
|
611
|
+
connectionString?: string | undefined;
|
|
612
|
+
host?: string | undefined;
|
|
571
613
|
port?: number | undefined;
|
|
614
|
+
database?: string | undefined;
|
|
615
|
+
user?: string | undefined;
|
|
616
|
+
password?: string | undefined;
|
|
572
617
|
ssl?: boolean | undefined;
|
|
573
618
|
max?: number | undefined;
|
|
574
619
|
}>>;
|
|
@@ -605,21 +650,22 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
605
650
|
useUnifiedTopology?: boolean | undefined;
|
|
606
651
|
}>>;
|
|
607
652
|
leveldb: z.ZodOptional<z.ZodObject<{
|
|
608
|
-
|
|
653
|
+
location: z.ZodString;
|
|
609
654
|
}, "strip", z.ZodTypeAny, {
|
|
610
|
-
|
|
655
|
+
location: string;
|
|
611
656
|
}, {
|
|
612
|
-
|
|
657
|
+
location: string;
|
|
613
658
|
}>>;
|
|
614
659
|
autoSaveIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
615
660
|
}, "strip", z.ZodTypeAny, {
|
|
616
661
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
617
662
|
postgres?: {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
user: string;
|
|
621
|
-
password: string;
|
|
663
|
+
connectionString?: string | undefined;
|
|
664
|
+
host?: string | undefined;
|
|
622
665
|
port?: number | undefined;
|
|
666
|
+
database?: string | undefined;
|
|
667
|
+
user?: string | undefined;
|
|
668
|
+
password?: string | undefined;
|
|
623
669
|
ssl?: boolean | undefined;
|
|
624
670
|
max?: number | undefined;
|
|
625
671
|
} | undefined;
|
|
@@ -640,17 +686,18 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
640
686
|
memory?: boolean | undefined;
|
|
641
687
|
} | undefined;
|
|
642
688
|
leveldb?: {
|
|
643
|
-
|
|
689
|
+
location: string;
|
|
644
690
|
} | undefined;
|
|
645
691
|
autoSaveIntervalMs?: number | undefined;
|
|
646
692
|
}, {
|
|
647
693
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
648
694
|
postgres?: {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
user: string;
|
|
652
|
-
password: string;
|
|
695
|
+
connectionString?: string | undefined;
|
|
696
|
+
host?: string | undefined;
|
|
653
697
|
port?: number | undefined;
|
|
698
|
+
database?: string | undefined;
|
|
699
|
+
user?: string | undefined;
|
|
700
|
+
password?: string | undefined;
|
|
654
701
|
ssl?: boolean | undefined;
|
|
655
702
|
max?: number | undefined;
|
|
656
703
|
} | undefined;
|
|
@@ -671,7 +718,7 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
671
718
|
memory?: boolean | undefined;
|
|
672
719
|
} | undefined;
|
|
673
720
|
leveldb?: {
|
|
674
|
-
|
|
721
|
+
location: string;
|
|
675
722
|
} | undefined;
|
|
676
723
|
autoSaveIntervalMs?: number | undefined;
|
|
677
724
|
}>>;
|
|
@@ -755,11 +802,12 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
755
802
|
persistence?: {
|
|
756
803
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
757
804
|
postgres?: {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
user: string;
|
|
761
|
-
password: string;
|
|
805
|
+
connectionString?: string | undefined;
|
|
806
|
+
host?: string | undefined;
|
|
762
807
|
port?: number | undefined;
|
|
808
|
+
database?: string | undefined;
|
|
809
|
+
user?: string | undefined;
|
|
810
|
+
password?: string | undefined;
|
|
763
811
|
ssl?: boolean | undefined;
|
|
764
812
|
max?: number | undefined;
|
|
765
813
|
} | undefined;
|
|
@@ -780,7 +828,7 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
780
828
|
memory?: boolean | undefined;
|
|
781
829
|
} | undefined;
|
|
782
830
|
leveldb?: {
|
|
783
|
-
|
|
831
|
+
location: string;
|
|
784
832
|
} | undefined;
|
|
785
833
|
autoSaveIntervalMs?: number | undefined;
|
|
786
834
|
} | undefined;
|
|
@@ -832,11 +880,12 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
832
880
|
persistence?: {
|
|
833
881
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
834
882
|
postgres?: {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
user: string;
|
|
838
|
-
password: string;
|
|
883
|
+
connectionString?: string | undefined;
|
|
884
|
+
host?: string | undefined;
|
|
839
885
|
port?: number | undefined;
|
|
886
|
+
database?: string | undefined;
|
|
887
|
+
user?: string | undefined;
|
|
888
|
+
password?: string | undefined;
|
|
840
889
|
ssl?: boolean | undefined;
|
|
841
890
|
max?: number | undefined;
|
|
842
891
|
} | undefined;
|
|
@@ -857,7 +906,7 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
857
906
|
memory?: boolean | undefined;
|
|
858
907
|
} | undefined;
|
|
859
908
|
leveldb?: {
|
|
860
|
-
|
|
909
|
+
location: string;
|
|
861
910
|
} | undefined;
|
|
862
911
|
autoSaveIntervalMs?: number | undefined;
|
|
863
912
|
} | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -165,11 +165,12 @@ interface RuleViolation {
|
|
|
165
165
|
interface PersistenceConfig {
|
|
166
166
|
type: 'memory' | 'postgres' | 'redis' | 'mongodb' | 'sqlite' | 'leveldb';
|
|
167
167
|
postgres?: {
|
|
168
|
-
|
|
168
|
+
connectionString?: string;
|
|
169
|
+
host?: string;
|
|
169
170
|
port?: number;
|
|
170
|
-
database
|
|
171
|
-
user
|
|
172
|
-
password
|
|
171
|
+
database?: string;
|
|
172
|
+
user?: string;
|
|
173
|
+
password?: string;
|
|
173
174
|
ssl?: boolean;
|
|
174
175
|
max?: number;
|
|
175
176
|
};
|
|
@@ -298,28 +299,49 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
298
299
|
filename: string;
|
|
299
300
|
memory?: boolean | undefined;
|
|
300
301
|
}>>;
|
|
301
|
-
postgres: z.ZodOptional<z.ZodObject<{
|
|
302
|
-
|
|
302
|
+
postgres: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
303
|
+
connectionString: z.ZodOptional<z.ZodString>;
|
|
304
|
+
host: z.ZodOptional<z.ZodString>;
|
|
303
305
|
port: z.ZodOptional<z.ZodNumber>;
|
|
304
|
-
database: z.ZodString
|
|
305
|
-
user: z.ZodString
|
|
306
|
-
password: z.ZodString
|
|
306
|
+
database: z.ZodOptional<z.ZodString>;
|
|
307
|
+
user: z.ZodOptional<z.ZodString>;
|
|
308
|
+
password: z.ZodOptional<z.ZodString>;
|
|
307
309
|
ssl: z.ZodOptional<z.ZodBoolean>;
|
|
308
310
|
max: z.ZodOptional<z.ZodNumber>;
|
|
309
311
|
}, "strip", z.ZodTypeAny, {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
user: string;
|
|
313
|
-
password: string;
|
|
312
|
+
connectionString?: string | undefined;
|
|
313
|
+
host?: string | undefined;
|
|
314
314
|
port?: number | undefined;
|
|
315
|
+
database?: string | undefined;
|
|
316
|
+
user?: string | undefined;
|
|
317
|
+
password?: string | undefined;
|
|
315
318
|
ssl?: boolean | undefined;
|
|
316
319
|
max?: number | undefined;
|
|
317
320
|
}, {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
321
|
+
connectionString?: string | undefined;
|
|
322
|
+
host?: string | undefined;
|
|
323
|
+
port?: number | undefined;
|
|
324
|
+
database?: string | undefined;
|
|
325
|
+
user?: string | undefined;
|
|
326
|
+
password?: string | undefined;
|
|
327
|
+
ssl?: boolean | undefined;
|
|
328
|
+
max?: number | undefined;
|
|
329
|
+
}>, {
|
|
330
|
+
connectionString?: string | undefined;
|
|
331
|
+
host?: string | undefined;
|
|
322
332
|
port?: number | undefined;
|
|
333
|
+
database?: string | undefined;
|
|
334
|
+
user?: string | undefined;
|
|
335
|
+
password?: string | undefined;
|
|
336
|
+
ssl?: boolean | undefined;
|
|
337
|
+
max?: number | undefined;
|
|
338
|
+
}, {
|
|
339
|
+
connectionString?: string | undefined;
|
|
340
|
+
host?: string | undefined;
|
|
341
|
+
port?: number | undefined;
|
|
342
|
+
database?: string | undefined;
|
|
343
|
+
user?: string | undefined;
|
|
344
|
+
password?: string | undefined;
|
|
323
345
|
ssl?: boolean | undefined;
|
|
324
346
|
max?: number | undefined;
|
|
325
347
|
}>>;
|
|
@@ -356,21 +378,22 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
356
378
|
useUnifiedTopology?: boolean | undefined;
|
|
357
379
|
}>>;
|
|
358
380
|
leveldb: z.ZodOptional<z.ZodObject<{
|
|
359
|
-
|
|
381
|
+
location: z.ZodString;
|
|
360
382
|
}, "strip", z.ZodTypeAny, {
|
|
361
|
-
|
|
383
|
+
location: string;
|
|
362
384
|
}, {
|
|
363
|
-
|
|
385
|
+
location: string;
|
|
364
386
|
}>>;
|
|
365
387
|
autoSaveIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
366
388
|
}, "strip", z.ZodTypeAny, {
|
|
367
389
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
368
390
|
postgres?: {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
user: string;
|
|
372
|
-
password: string;
|
|
391
|
+
connectionString?: string | undefined;
|
|
392
|
+
host?: string | undefined;
|
|
373
393
|
port?: number | undefined;
|
|
394
|
+
database?: string | undefined;
|
|
395
|
+
user?: string | undefined;
|
|
396
|
+
password?: string | undefined;
|
|
374
397
|
ssl?: boolean | undefined;
|
|
375
398
|
max?: number | undefined;
|
|
376
399
|
} | undefined;
|
|
@@ -391,17 +414,18 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
391
414
|
memory?: boolean | undefined;
|
|
392
415
|
} | undefined;
|
|
393
416
|
leveldb?: {
|
|
394
|
-
|
|
417
|
+
location: string;
|
|
395
418
|
} | undefined;
|
|
396
419
|
autoSaveIntervalMs?: number | undefined;
|
|
397
420
|
}, {
|
|
398
421
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
399
422
|
postgres?: {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
user: string;
|
|
403
|
-
password: string;
|
|
423
|
+
connectionString?: string | undefined;
|
|
424
|
+
host?: string | undefined;
|
|
404
425
|
port?: number | undefined;
|
|
426
|
+
database?: string | undefined;
|
|
427
|
+
user?: string | undefined;
|
|
428
|
+
password?: string | undefined;
|
|
405
429
|
ssl?: boolean | undefined;
|
|
406
430
|
max?: number | undefined;
|
|
407
431
|
} | undefined;
|
|
@@ -422,7 +446,7 @@ declare const PersistenceConfigSchema: z.ZodObject<{
|
|
|
422
446
|
memory?: boolean | undefined;
|
|
423
447
|
} | undefined;
|
|
424
448
|
leveldb?: {
|
|
425
|
-
|
|
449
|
+
location: string;
|
|
426
450
|
} | undefined;
|
|
427
451
|
autoSaveIntervalMs?: number | undefined;
|
|
428
452
|
}>;
|
|
@@ -547,28 +571,49 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
547
571
|
filename: string;
|
|
548
572
|
memory?: boolean | undefined;
|
|
549
573
|
}>>;
|
|
550
|
-
postgres: z.ZodOptional<z.ZodObject<{
|
|
551
|
-
|
|
574
|
+
postgres: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
575
|
+
connectionString: z.ZodOptional<z.ZodString>;
|
|
576
|
+
host: z.ZodOptional<z.ZodString>;
|
|
552
577
|
port: z.ZodOptional<z.ZodNumber>;
|
|
553
|
-
database: z.ZodString
|
|
554
|
-
user: z.ZodString
|
|
555
|
-
password: z.ZodString
|
|
578
|
+
database: z.ZodOptional<z.ZodString>;
|
|
579
|
+
user: z.ZodOptional<z.ZodString>;
|
|
580
|
+
password: z.ZodOptional<z.ZodString>;
|
|
556
581
|
ssl: z.ZodOptional<z.ZodBoolean>;
|
|
557
582
|
max: z.ZodOptional<z.ZodNumber>;
|
|
558
583
|
}, "strip", z.ZodTypeAny, {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
user: string;
|
|
562
|
-
password: string;
|
|
584
|
+
connectionString?: string | undefined;
|
|
585
|
+
host?: string | undefined;
|
|
563
586
|
port?: number | undefined;
|
|
587
|
+
database?: string | undefined;
|
|
588
|
+
user?: string | undefined;
|
|
589
|
+
password?: string | undefined;
|
|
564
590
|
ssl?: boolean | undefined;
|
|
565
591
|
max?: number | undefined;
|
|
566
592
|
}, {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
593
|
+
connectionString?: string | undefined;
|
|
594
|
+
host?: string | undefined;
|
|
595
|
+
port?: number | undefined;
|
|
596
|
+
database?: string | undefined;
|
|
597
|
+
user?: string | undefined;
|
|
598
|
+
password?: string | undefined;
|
|
599
|
+
ssl?: boolean | undefined;
|
|
600
|
+
max?: number | undefined;
|
|
601
|
+
}>, {
|
|
602
|
+
connectionString?: string | undefined;
|
|
603
|
+
host?: string | undefined;
|
|
604
|
+
port?: number | undefined;
|
|
605
|
+
database?: string | undefined;
|
|
606
|
+
user?: string | undefined;
|
|
607
|
+
password?: string | undefined;
|
|
608
|
+
ssl?: boolean | undefined;
|
|
609
|
+
max?: number | undefined;
|
|
610
|
+
}, {
|
|
611
|
+
connectionString?: string | undefined;
|
|
612
|
+
host?: string | undefined;
|
|
571
613
|
port?: number | undefined;
|
|
614
|
+
database?: string | undefined;
|
|
615
|
+
user?: string | undefined;
|
|
616
|
+
password?: string | undefined;
|
|
572
617
|
ssl?: boolean | undefined;
|
|
573
618
|
max?: number | undefined;
|
|
574
619
|
}>>;
|
|
@@ -605,21 +650,22 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
605
650
|
useUnifiedTopology?: boolean | undefined;
|
|
606
651
|
}>>;
|
|
607
652
|
leveldb: z.ZodOptional<z.ZodObject<{
|
|
608
|
-
|
|
653
|
+
location: z.ZodString;
|
|
609
654
|
}, "strip", z.ZodTypeAny, {
|
|
610
|
-
|
|
655
|
+
location: string;
|
|
611
656
|
}, {
|
|
612
|
-
|
|
657
|
+
location: string;
|
|
613
658
|
}>>;
|
|
614
659
|
autoSaveIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
615
660
|
}, "strip", z.ZodTypeAny, {
|
|
616
661
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
617
662
|
postgres?: {
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
user: string;
|
|
621
|
-
password: string;
|
|
663
|
+
connectionString?: string | undefined;
|
|
664
|
+
host?: string | undefined;
|
|
622
665
|
port?: number | undefined;
|
|
666
|
+
database?: string | undefined;
|
|
667
|
+
user?: string | undefined;
|
|
668
|
+
password?: string | undefined;
|
|
623
669
|
ssl?: boolean | undefined;
|
|
624
670
|
max?: number | undefined;
|
|
625
671
|
} | undefined;
|
|
@@ -640,17 +686,18 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
640
686
|
memory?: boolean | undefined;
|
|
641
687
|
} | undefined;
|
|
642
688
|
leveldb?: {
|
|
643
|
-
|
|
689
|
+
location: string;
|
|
644
690
|
} | undefined;
|
|
645
691
|
autoSaveIntervalMs?: number | undefined;
|
|
646
692
|
}, {
|
|
647
693
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
648
694
|
postgres?: {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
user: string;
|
|
652
|
-
password: string;
|
|
695
|
+
connectionString?: string | undefined;
|
|
696
|
+
host?: string | undefined;
|
|
653
697
|
port?: number | undefined;
|
|
698
|
+
database?: string | undefined;
|
|
699
|
+
user?: string | undefined;
|
|
700
|
+
password?: string | undefined;
|
|
654
701
|
ssl?: boolean | undefined;
|
|
655
702
|
max?: number | undefined;
|
|
656
703
|
} | undefined;
|
|
@@ -671,7 +718,7 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
671
718
|
memory?: boolean | undefined;
|
|
672
719
|
} | undefined;
|
|
673
720
|
leveldb?: {
|
|
674
|
-
|
|
721
|
+
location: string;
|
|
675
722
|
} | undefined;
|
|
676
723
|
autoSaveIntervalMs?: number | undefined;
|
|
677
724
|
}>>;
|
|
@@ -755,11 +802,12 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
755
802
|
persistence?: {
|
|
756
803
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
757
804
|
postgres?: {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
user: string;
|
|
761
|
-
password: string;
|
|
805
|
+
connectionString?: string | undefined;
|
|
806
|
+
host?: string | undefined;
|
|
762
807
|
port?: number | undefined;
|
|
808
|
+
database?: string | undefined;
|
|
809
|
+
user?: string | undefined;
|
|
810
|
+
password?: string | undefined;
|
|
763
811
|
ssl?: boolean | undefined;
|
|
764
812
|
max?: number | undefined;
|
|
765
813
|
} | undefined;
|
|
@@ -780,7 +828,7 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
780
828
|
memory?: boolean | undefined;
|
|
781
829
|
} | undefined;
|
|
782
830
|
leveldb?: {
|
|
783
|
-
|
|
831
|
+
location: string;
|
|
784
832
|
} | undefined;
|
|
785
833
|
autoSaveIntervalMs?: number | undefined;
|
|
786
834
|
} | undefined;
|
|
@@ -832,11 +880,12 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
832
880
|
persistence?: {
|
|
833
881
|
type: "memory" | "postgres" | "redis" | "mongodb" | "sqlite" | "leveldb";
|
|
834
882
|
postgres?: {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
user: string;
|
|
838
|
-
password: string;
|
|
883
|
+
connectionString?: string | undefined;
|
|
884
|
+
host?: string | undefined;
|
|
839
885
|
port?: number | undefined;
|
|
886
|
+
database?: string | undefined;
|
|
887
|
+
user?: string | undefined;
|
|
888
|
+
password?: string | undefined;
|
|
840
889
|
ssl?: boolean | undefined;
|
|
841
890
|
max?: number | undefined;
|
|
842
891
|
} | undefined;
|
|
@@ -857,7 +906,7 @@ declare const WorldConfigSchema: z.ZodObject<{
|
|
|
857
906
|
memory?: boolean | undefined;
|
|
858
907
|
} | undefined;
|
|
859
908
|
leveldb?: {
|
|
860
|
-
|
|
909
|
+
location: string;
|
|
861
910
|
} | undefined;
|
|
862
911
|
autoSaveIntervalMs?: number | undefined;
|
|
863
912
|
} | undefined;
|
package/dist/index.js
CHANGED
|
@@ -36,14 +36,18 @@ var SQLiteConfigSchema = z.object({
|
|
|
36
36
|
memory: z.boolean().optional()
|
|
37
37
|
});
|
|
38
38
|
var PostgresConfigSchema = z.object({
|
|
39
|
-
|
|
39
|
+
connectionString: z.string().optional(),
|
|
40
|
+
host: z.string().optional(),
|
|
40
41
|
port: z.number().optional(),
|
|
41
|
-
database: z.string(),
|
|
42
|
-
user: z.string(),
|
|
43
|
-
password: z.string(),
|
|
42
|
+
database: z.string().optional(),
|
|
43
|
+
user: z.string().optional(),
|
|
44
|
+
password: z.string().optional(),
|
|
44
45
|
ssl: z.boolean().optional(),
|
|
45
46
|
max: z.number().optional()
|
|
46
|
-
})
|
|
47
|
+
}).refine(
|
|
48
|
+
(data) => data.connectionString || data.host && data.database && data.user,
|
|
49
|
+
{ message: "Either connectionString or host+database+user is required" }
|
|
50
|
+
);
|
|
47
51
|
var RedisConfigSchema = z.object({
|
|
48
52
|
host: z.string(),
|
|
49
53
|
port: z.number().optional(),
|
|
@@ -57,7 +61,7 @@ var MongoDBConfigSchema = z.object({
|
|
|
57
61
|
useUnifiedTopology: z.boolean().optional()
|
|
58
62
|
});
|
|
59
63
|
var LevelDBConfigSchema = z.object({
|
|
60
|
-
|
|
64
|
+
location: z.string()
|
|
61
65
|
});
|
|
62
66
|
var PersistenceConfigSchema = z.object({
|
|
63
67
|
type: z.enum(["memory", "postgres", "redis", "mongodb", "sqlite", "leveldb"]),
|
|
@@ -354,7 +358,7 @@ async function createPostgresAdapter(config) {
|
|
|
354
358
|
try {
|
|
355
359
|
const pg = await import("pg");
|
|
356
360
|
const Pool = pg.default?.Pool || pg.Pool;
|
|
357
|
-
const { PostgresAdapter } = await import("./PostgresAdapter-
|
|
361
|
+
const { PostgresAdapter } = await import("./PostgresAdapter-6ZAAUL2O.js");
|
|
358
362
|
return new PostgresAdapter(config);
|
|
359
363
|
} catch (error) {
|
|
360
364
|
if (error.code === "ERR_MODULE_NOT_FOUND" || error.code === "MODULE_NOT_FOUND") {
|