@twin.org/node-core 0.0.1 → 0.0.2-next.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.
@@ -10,9 +10,9 @@ var vaultModels = require('@twin.org/vault-models');
10
10
  var walletModels = require('@twin.org/wallet-models');
11
11
  var promises = require('node:fs/promises');
12
12
  var path = require('node:path');
13
- var dotenv = require('dotenv');
14
13
  var engineServer = require('@twin.org/engine-server');
15
14
  var engineServerTypes = require('@twin.org/engine-server-types');
15
+ var dotenv = require('dotenv');
16
16
  var engine = require('@twin.org/engine');
17
17
  var engineCore = require('@twin.org/engine-core');
18
18
  var engineModels = require('@twin.org/engine-models');
@@ -581,14 +581,13 @@ function getIotaConfig(coreConfig) {
581
581
  function configureEntityStorage(coreConfig, envVars) {
582
582
  coreConfig.types ??= {};
583
583
  coreConfig.types.entityStorageConnector ??= [];
584
- if ((core.Coerce.boolean(envVars.entityMemoryEnable) ?? false) ||
585
- envVars.entityStorageConnectorType === engineTypes.EntityStorageConnectorType.Memory) {
584
+ const entityStorageConnectorTypes = envVars.entityStorageConnectorType?.split(",") ?? [];
585
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.Memory)) {
586
586
  coreConfig.types.entityStorageConnector.push({
587
587
  type: engineTypes.EntityStorageConnectorType.Memory
588
588
  });
589
589
  }
590
- if ((core.Coerce.boolean(envVars.entityFileEnable) ?? false) ||
591
- envVars.entityStorageConnectorType === engineTypes.EntityStorageConnectorType.File) {
590
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.File)) {
592
591
  coreConfig.types.entityStorageConnector.push({
593
592
  type: engineTypes.EntityStorageConnectorType.File,
594
593
  options: {
@@ -597,7 +596,7 @@ function configureEntityStorage(coreConfig, envVars) {
597
596
  }
598
597
  });
599
598
  }
600
- if (core.Is.stringValue(envVars.awsDynamodbAccessKeyId)) {
599
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.AwsDynamoDb)) {
601
600
  coreConfig.types.entityStorageConnector.push({
602
601
  type: engineTypes.EntityStorageConnectorType.AwsDynamoDb,
603
602
  options: {
@@ -611,7 +610,7 @@ function configureEntityStorage(coreConfig, envVars) {
611
610
  }
612
611
  });
613
612
  }
614
- if (core.Is.stringValue(envVars.azureCosmosdbKey)) {
613
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.AzureCosmosDb)) {
615
614
  coreConfig.types.entityStorageConnector.push({
616
615
  type: engineTypes.EntityStorageConnectorType.AzureCosmosDb,
617
616
  options: {
@@ -625,7 +624,7 @@ function configureEntityStorage(coreConfig, envVars) {
625
624
  }
626
625
  });
627
626
  }
628
- if (core.Is.stringValue(envVars.gcpFirestoreCredentials)) {
627
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.GcpFirestoreDb)) {
629
628
  coreConfig.types.entityStorageConnector.push({
630
629
  type: engineTypes.EntityStorageConnectorType.GcpFirestoreDb,
631
630
  options: {
@@ -640,26 +639,27 @@ function configureEntityStorage(coreConfig, envVars) {
640
639
  }
641
640
  });
642
641
  }
643
- if (core.Is.stringValue(envVars.scylladbHosts)) {
642
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.ScyllaDb)) {
644
643
  coreConfig.types.entityStorageConnector.push({
645
644
  type: engineTypes.EntityStorageConnectorType.ScyllaDb,
646
645
  options: {
647
646
  config: {
648
- hosts: envVars.scylladbHosts.split(",") ?? "",
647
+ hosts: envVars.scylladbHosts?.split(",") ?? [],
649
648
  localDataCenter: envVars.scylladbLocalDataCenter ?? "",
650
- keyspace: envVars.scylladbKeyspace ?? ""
649
+ keyspace: envVars.scylladbKeyspace ?? "",
650
+ port: core.Coerce.integer(envVars.scylladbPort)
651
651
  },
652
652
  tablePrefix: envVars.entityStorageTablePrefix
653
653
  }
654
654
  });
655
655
  }
656
- if (core.Is.stringValue(envVars.mySqlHost)) {
656
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.MySqlDb)) {
657
657
  coreConfig.types.entityStorageConnector.push({
658
658
  type: engineTypes.EntityStorageConnectorType.MySqlDb,
659
659
  options: {
660
660
  config: {
661
- host: envVars.mySqlHost,
662
- port: envVars.mySqlPort ?? 3306,
661
+ host: envVars.mySqlHost ?? "",
662
+ port: core.Coerce.integer(envVars.mySqlPort),
663
663
  user: envVars.mySqlUser ?? "",
664
664
  password: envVars.mySqlPassword ?? "",
665
665
  database: envVars.mySqlDatabase ?? ""
@@ -668,28 +668,13 @@ function configureEntityStorage(coreConfig, envVars) {
668
668
  }
669
669
  });
670
670
  }
671
- if (core.Is.stringValue(envVars.mySqlHost)) {
672
- coreConfig.types.entityStorageConnector.push({
673
- type: engineTypes.EntityStorageConnectorType.MySqlDb,
674
- options: {
675
- config: {
676
- host: envVars.mySqlHost,
677
- port: envVars.mySqlPort ?? 3306,
678
- user: envVars.mySqlUser ?? "",
679
- password: envVars.mySqlPassword ?? "",
680
- database: envVars.mySqlDatabase ?? ""
681
- },
682
- tablePrefix: envVars.entityStorageTablePrefix
683
- }
684
- });
685
- }
686
- if (core.Is.stringValue(envVars.mongoDbHost)) {
671
+ if (entityStorageConnectorTypes.includes(engineTypes.EntityStorageConnectorType.MongoDb)) {
687
672
  coreConfig.types.entityStorageConnector.push({
688
673
  type: engineTypes.EntityStorageConnectorType.MongoDb,
689
674
  options: {
690
675
  config: {
691
- host: envVars.mongoDbHost,
692
- port: envVars.mongoDbPort,
676
+ host: envVars.mongoDbHost ?? "",
677
+ port: core.Coerce.integer(envVars.mongoDbPort),
693
678
  user: envVars.mongoDbUser ?? "",
694
679
  password: envVars.mongoDbPassword ?? "",
695
680
  database: envVars.mongoDbDatabase ?? ""
@@ -698,13 +683,13 @@ function configureEntityStorage(coreConfig, envVars) {
698
683
  }
699
684
  });
700
685
  }
701
- if (core.Is.stringValue(envVars.postgreSqlHost)) {
686
+ if (entityStorageConnectorTypes) {
702
687
  coreConfig.types.entityStorageConnector.push({
703
688
  type: engineTypes.EntityStorageConnectorType.PostgreSql,
704
689
  options: {
705
690
  config: {
706
- host: envVars.postgreSqlHost,
707
- port: envVars.postgreSqlPort,
691
+ host: envVars.postgreSqlHost ?? "",
692
+ port: core.Coerce.integer(envVars.postgreSqlPort),
708
693
  user: envVars.postgreSqlUser ?? "",
709
694
  password: envVars.postgreSqlPassword ?? "",
710
695
  database: envVars.postgreSqlDatabase ?? ""
@@ -713,11 +698,12 @@ function configureEntityStorage(coreConfig, envVars) {
713
698
  }
714
699
  });
715
700
  }
716
- const defaultStorageConnector = envVars.entityStorageConnectorType;
717
- if (core.Is.stringValue(defaultStorageConnector)) {
701
+ if (core.Is.arrayValue(entityStorageConnectorTypes)) {
702
+ const defaultStorageConnectorType = envVars.entityStorageConnectorDefault ?? entityStorageConnectorTypes[0];
718
703
  for (const config of coreConfig.types.entityStorageConnector) {
719
- if (config.type === defaultStorageConnector) {
704
+ if (config.type === defaultStorageConnectorType) {
720
705
  config.isDefault = true;
706
+ break;
721
707
  }
722
708
  }
723
709
  }
@@ -729,14 +715,13 @@ function configureEntityStorage(coreConfig, envVars) {
729
715
  */
730
716
  function configureBlobStorage(coreConfig, envVars) {
731
717
  coreConfig.types.blobStorageConnector ??= [];
732
- if ((core.Coerce.boolean(envVars.blobMemoryEnable) ?? false) ||
733
- envVars.blobStorageConnectorType === engineTypes.BlobStorageConnectorType.Memory) {
718
+ const blobStorageConnectorTypes = envVars.blobStorageConnectorType?.split(",") ?? [];
719
+ if (blobStorageConnectorTypes.includes(engineTypes.BlobStorageConnectorType.Memory)) {
734
720
  coreConfig.types.blobStorageConnector.push({
735
721
  type: engineTypes.BlobStorageConnectorType.Memory
736
722
  });
737
723
  }
738
- if ((core.Coerce.boolean(envVars.blobFileEnable) ?? false) ||
739
- envVars.blobStorageConnectorType === engineTypes.BlobStorageConnectorType.File) {
724
+ if (blobStorageConnectorTypes.includes(engineTypes.BlobStorageConnectorType.File)) {
740
725
  coreConfig.types.blobStorageConnector.push({
741
726
  type: engineTypes.BlobStorageConnectorType.File,
742
727
  options: {
@@ -749,18 +734,18 @@ function configureBlobStorage(coreConfig, envVars) {
749
734
  }
750
735
  });
751
736
  }
752
- if (core.Is.stringValue(envVars.ipfsApiUrl)) {
737
+ if (blobStorageConnectorTypes.includes(engineTypes.BlobStorageConnectorType.Ipfs)) {
753
738
  coreConfig.types.blobStorageConnector.push({
754
739
  type: engineTypes.BlobStorageConnectorType.Ipfs,
755
740
  options: {
756
741
  config: {
757
- apiUrl: envVars.ipfsApiUrl,
742
+ apiUrl: envVars.ipfsApiUrl ?? "",
758
743
  bearerToken: envVars.ipfsBearerToken
759
744
  }
760
745
  }
761
746
  });
762
747
  }
763
- if (core.Is.stringValue(envVars.awsS3AccessKeyId)) {
748
+ if (blobStorageConnectorTypes.includes(engineTypes.BlobStorageConnectorType.AwsS3)) {
764
749
  coreConfig.types.blobStorageConnector.push({
765
750
  type: engineTypes.BlobStorageConnectorType.AwsS3,
766
751
  options: {
@@ -775,7 +760,7 @@ function configureBlobStorage(coreConfig, envVars) {
775
760
  }
776
761
  });
777
762
  }
778
- if (core.Is.stringValue(envVars.azureStorageAccountKey)) {
763
+ if (blobStorageConnectorTypes.includes(engineTypes.BlobStorageConnectorType.AzureStorage)) {
779
764
  coreConfig.types.blobStorageConnector.push({
780
765
  type: engineTypes.BlobStorageConnectorType.AzureStorage,
781
766
  options: {
@@ -789,7 +774,7 @@ function configureBlobStorage(coreConfig, envVars) {
789
774
  }
790
775
  });
791
776
  }
792
- if (core.Is.stringValue(envVars.gcpStorageCredentials)) {
777
+ if (blobStorageConnectorTypes.includes(engineTypes.BlobStorageConnectorType.GcpStorage)) {
793
778
  coreConfig.types.blobStorageConnector.push({
794
779
  type: engineTypes.BlobStorageConnectorType.GcpStorage,
795
780
  options: {
@@ -803,11 +788,12 @@ function configureBlobStorage(coreConfig, envVars) {
803
788
  }
804
789
  });
805
790
  }
806
- const defaultStorageConnectorType = envVars.blobStorageConnectorType;
807
- if (core.Is.stringValue(defaultStorageConnectorType)) {
791
+ if (core.Is.arrayValue(blobStorageConnectorTypes)) {
792
+ const defaultStorageConnectorType = envVars.blobStorageConnectorDefault ?? blobStorageConnectorTypes[0];
808
793
  for (const config of coreConfig.types.blobStorageConnector) {
809
794
  if (config.type === defaultStorageConnectorType) {
810
795
  config.isDefault = true;
796
+ break;
811
797
  }
812
798
  }
813
799
  }
@@ -1547,8 +1533,10 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
1547
1533
  */
1548
1534
  async function start(nodeOptions, engineServerConfig, envVars) {
1549
1535
  envVars.storageFileRoot ??= "";
1550
- if ((envVars.entityStorageConnectorType === engineTypes.EntityStorageConnectorType.File ||
1551
- envVars.blobStorageConnectorType === engineTypes.BlobStorageConnectorType.File ||
1536
+ const entityStorageConnectorType = envVars.entityStorageConnectorType?.split(",") ?? [];
1537
+ const blobStorageConnectorType = envVars.blobStorageConnectorType?.split(",") ?? [];
1538
+ if ((entityStorageConnectorType.includes(engineTypes.EntityStorageConnectorType.File) ||
1539
+ blobStorageConnectorType.includes(engineTypes.BlobStorageConnectorType.File) ||
1552
1540
  core.Is.empty(nodeOptions?.stateStorage)) &&
1553
1541
  !core.Is.stringValue(envVars.storageFileRoot)) {
1554
1542
  throw new core.GeneralError("node", "storageFileRootNotSet", {
@@ -1599,7 +1587,7 @@ async function run(nodeOptions) {
1599
1587
  nodeOptions ??= {};
1600
1588
  const serverInfo = {
1601
1589
  name: nodeOptions?.serverName ?? "TWIN Node Server",
1602
- version: nodeOptions?.serverVersion ?? "0.0.1-next.11" // x-release-please-version
1590
+ version: nodeOptions?.serverVersion ?? "0.0.2-next.2" // x-release-please-version
1603
1591
  };
1604
1592
  console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
1605
1593
  if (!core.Is.stringValue(nodeOptions?.executionDirectory)) {
@@ -1719,6 +1707,7 @@ exports.bootstrapNodeIdentity = bootstrapNodeIdentity;
1719
1707
  exports.bootstrapNodeUser = bootstrapNodeUser;
1720
1708
  exports.buildConfiguration = buildConfiguration;
1721
1709
  exports.buildEngineConfiguration = buildEngineConfiguration;
1710
+ exports.buildEngineServerConfiguration = buildEngineServerConfiguration;
1722
1711
  exports.fileExists = fileExists;
1723
1712
  exports.getExecutionDirectory = getExecutionDirectory;
1724
1713
  exports.getFeatures = getFeatures;
@@ -8,9 +8,9 @@ import { VaultConnectorFactory, VaultKeyType } from '@twin.org/vault-models';
8
8
  import { WalletConnectorFactory } from '@twin.org/wallet-models';
9
9
  import { readFile, stat } from 'node:fs/promises';
10
10
  import path from 'node:path';
11
- import * as dotenv from 'dotenv';
12
11
  import { addDefaultRestPaths, addDefaultSocketPaths, EngineServer } from '@twin.org/engine-server';
13
12
  import { InformationComponentType, RestRouteProcessorType, SocketRouteProcessorType, AuthenticationAdminComponentType, AuthenticationComponentType } from '@twin.org/engine-server-types';
13
+ import * as dotenv from 'dotenv';
14
14
  import { Engine } from '@twin.org/engine';
15
15
  import { FileStateStorage } from '@twin.org/engine-core';
16
16
  import { EngineCoreFactory } from '@twin.org/engine-models';
@@ -560,14 +560,13 @@ function getIotaConfig(coreConfig) {
560
560
  function configureEntityStorage(coreConfig, envVars) {
561
561
  coreConfig.types ??= {};
562
562
  coreConfig.types.entityStorageConnector ??= [];
563
- if ((Coerce.boolean(envVars.entityMemoryEnable) ?? false) ||
564
- envVars.entityStorageConnectorType === EntityStorageConnectorType.Memory) {
563
+ const entityStorageConnectorTypes = envVars.entityStorageConnectorType?.split(",") ?? [];
564
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.Memory)) {
565
565
  coreConfig.types.entityStorageConnector.push({
566
566
  type: EntityStorageConnectorType.Memory
567
567
  });
568
568
  }
569
- if ((Coerce.boolean(envVars.entityFileEnable) ?? false) ||
570
- envVars.entityStorageConnectorType === EntityStorageConnectorType.File) {
569
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.File)) {
571
570
  coreConfig.types.entityStorageConnector.push({
572
571
  type: EntityStorageConnectorType.File,
573
572
  options: {
@@ -576,7 +575,7 @@ function configureEntityStorage(coreConfig, envVars) {
576
575
  }
577
576
  });
578
577
  }
579
- if (Is.stringValue(envVars.awsDynamodbAccessKeyId)) {
578
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.AwsDynamoDb)) {
580
579
  coreConfig.types.entityStorageConnector.push({
581
580
  type: EntityStorageConnectorType.AwsDynamoDb,
582
581
  options: {
@@ -590,7 +589,7 @@ function configureEntityStorage(coreConfig, envVars) {
590
589
  }
591
590
  });
592
591
  }
593
- if (Is.stringValue(envVars.azureCosmosdbKey)) {
592
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.AzureCosmosDb)) {
594
593
  coreConfig.types.entityStorageConnector.push({
595
594
  type: EntityStorageConnectorType.AzureCosmosDb,
596
595
  options: {
@@ -604,7 +603,7 @@ function configureEntityStorage(coreConfig, envVars) {
604
603
  }
605
604
  });
606
605
  }
607
- if (Is.stringValue(envVars.gcpFirestoreCredentials)) {
606
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.GcpFirestoreDb)) {
608
607
  coreConfig.types.entityStorageConnector.push({
609
608
  type: EntityStorageConnectorType.GcpFirestoreDb,
610
609
  options: {
@@ -619,26 +618,27 @@ function configureEntityStorage(coreConfig, envVars) {
619
618
  }
620
619
  });
621
620
  }
622
- if (Is.stringValue(envVars.scylladbHosts)) {
621
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.ScyllaDb)) {
623
622
  coreConfig.types.entityStorageConnector.push({
624
623
  type: EntityStorageConnectorType.ScyllaDb,
625
624
  options: {
626
625
  config: {
627
- hosts: envVars.scylladbHosts.split(",") ?? "",
626
+ hosts: envVars.scylladbHosts?.split(",") ?? [],
628
627
  localDataCenter: envVars.scylladbLocalDataCenter ?? "",
629
- keyspace: envVars.scylladbKeyspace ?? ""
628
+ keyspace: envVars.scylladbKeyspace ?? "",
629
+ port: Coerce.integer(envVars.scylladbPort)
630
630
  },
631
631
  tablePrefix: envVars.entityStorageTablePrefix
632
632
  }
633
633
  });
634
634
  }
635
- if (Is.stringValue(envVars.mySqlHost)) {
635
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.MySqlDb)) {
636
636
  coreConfig.types.entityStorageConnector.push({
637
637
  type: EntityStorageConnectorType.MySqlDb,
638
638
  options: {
639
639
  config: {
640
- host: envVars.mySqlHost,
641
- port: envVars.mySqlPort ?? 3306,
640
+ host: envVars.mySqlHost ?? "",
641
+ port: Coerce.integer(envVars.mySqlPort),
642
642
  user: envVars.mySqlUser ?? "",
643
643
  password: envVars.mySqlPassword ?? "",
644
644
  database: envVars.mySqlDatabase ?? ""
@@ -647,28 +647,13 @@ function configureEntityStorage(coreConfig, envVars) {
647
647
  }
648
648
  });
649
649
  }
650
- if (Is.stringValue(envVars.mySqlHost)) {
651
- coreConfig.types.entityStorageConnector.push({
652
- type: EntityStorageConnectorType.MySqlDb,
653
- options: {
654
- config: {
655
- host: envVars.mySqlHost,
656
- port: envVars.mySqlPort ?? 3306,
657
- user: envVars.mySqlUser ?? "",
658
- password: envVars.mySqlPassword ?? "",
659
- database: envVars.mySqlDatabase ?? ""
660
- },
661
- tablePrefix: envVars.entityStorageTablePrefix
662
- }
663
- });
664
- }
665
- if (Is.stringValue(envVars.mongoDbHost)) {
650
+ if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.MongoDb)) {
666
651
  coreConfig.types.entityStorageConnector.push({
667
652
  type: EntityStorageConnectorType.MongoDb,
668
653
  options: {
669
654
  config: {
670
- host: envVars.mongoDbHost,
671
- port: envVars.mongoDbPort,
655
+ host: envVars.mongoDbHost ?? "",
656
+ port: Coerce.integer(envVars.mongoDbPort),
672
657
  user: envVars.mongoDbUser ?? "",
673
658
  password: envVars.mongoDbPassword ?? "",
674
659
  database: envVars.mongoDbDatabase ?? ""
@@ -677,13 +662,13 @@ function configureEntityStorage(coreConfig, envVars) {
677
662
  }
678
663
  });
679
664
  }
680
- if (Is.stringValue(envVars.postgreSqlHost)) {
665
+ if (entityStorageConnectorTypes) {
681
666
  coreConfig.types.entityStorageConnector.push({
682
667
  type: EntityStorageConnectorType.PostgreSql,
683
668
  options: {
684
669
  config: {
685
- host: envVars.postgreSqlHost,
686
- port: envVars.postgreSqlPort,
670
+ host: envVars.postgreSqlHost ?? "",
671
+ port: Coerce.integer(envVars.postgreSqlPort),
687
672
  user: envVars.postgreSqlUser ?? "",
688
673
  password: envVars.postgreSqlPassword ?? "",
689
674
  database: envVars.postgreSqlDatabase ?? ""
@@ -692,11 +677,12 @@ function configureEntityStorage(coreConfig, envVars) {
692
677
  }
693
678
  });
694
679
  }
695
- const defaultStorageConnector = envVars.entityStorageConnectorType;
696
- if (Is.stringValue(defaultStorageConnector)) {
680
+ if (Is.arrayValue(entityStorageConnectorTypes)) {
681
+ const defaultStorageConnectorType = envVars.entityStorageConnectorDefault ?? entityStorageConnectorTypes[0];
697
682
  for (const config of coreConfig.types.entityStorageConnector) {
698
- if (config.type === defaultStorageConnector) {
683
+ if (config.type === defaultStorageConnectorType) {
699
684
  config.isDefault = true;
685
+ break;
700
686
  }
701
687
  }
702
688
  }
@@ -708,14 +694,13 @@ function configureEntityStorage(coreConfig, envVars) {
708
694
  */
709
695
  function configureBlobStorage(coreConfig, envVars) {
710
696
  coreConfig.types.blobStorageConnector ??= [];
711
- if ((Coerce.boolean(envVars.blobMemoryEnable) ?? false) ||
712
- envVars.blobStorageConnectorType === BlobStorageConnectorType.Memory) {
697
+ const blobStorageConnectorTypes = envVars.blobStorageConnectorType?.split(",") ?? [];
698
+ if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.Memory)) {
713
699
  coreConfig.types.blobStorageConnector.push({
714
700
  type: BlobStorageConnectorType.Memory
715
701
  });
716
702
  }
717
- if ((Coerce.boolean(envVars.blobFileEnable) ?? false) ||
718
- envVars.blobStorageConnectorType === BlobStorageConnectorType.File) {
703
+ if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.File)) {
719
704
  coreConfig.types.blobStorageConnector.push({
720
705
  type: BlobStorageConnectorType.File,
721
706
  options: {
@@ -728,18 +713,18 @@ function configureBlobStorage(coreConfig, envVars) {
728
713
  }
729
714
  });
730
715
  }
731
- if (Is.stringValue(envVars.ipfsApiUrl)) {
716
+ if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.Ipfs)) {
732
717
  coreConfig.types.blobStorageConnector.push({
733
718
  type: BlobStorageConnectorType.Ipfs,
734
719
  options: {
735
720
  config: {
736
- apiUrl: envVars.ipfsApiUrl,
721
+ apiUrl: envVars.ipfsApiUrl ?? "",
737
722
  bearerToken: envVars.ipfsBearerToken
738
723
  }
739
724
  }
740
725
  });
741
726
  }
742
- if (Is.stringValue(envVars.awsS3AccessKeyId)) {
727
+ if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.AwsS3)) {
743
728
  coreConfig.types.blobStorageConnector.push({
744
729
  type: BlobStorageConnectorType.AwsS3,
745
730
  options: {
@@ -754,7 +739,7 @@ function configureBlobStorage(coreConfig, envVars) {
754
739
  }
755
740
  });
756
741
  }
757
- if (Is.stringValue(envVars.azureStorageAccountKey)) {
742
+ if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.AzureStorage)) {
758
743
  coreConfig.types.blobStorageConnector.push({
759
744
  type: BlobStorageConnectorType.AzureStorage,
760
745
  options: {
@@ -768,7 +753,7 @@ function configureBlobStorage(coreConfig, envVars) {
768
753
  }
769
754
  });
770
755
  }
771
- if (Is.stringValue(envVars.gcpStorageCredentials)) {
756
+ if (blobStorageConnectorTypes.includes(BlobStorageConnectorType.GcpStorage)) {
772
757
  coreConfig.types.blobStorageConnector.push({
773
758
  type: BlobStorageConnectorType.GcpStorage,
774
759
  options: {
@@ -782,11 +767,12 @@ function configureBlobStorage(coreConfig, envVars) {
782
767
  }
783
768
  });
784
769
  }
785
- const defaultStorageConnectorType = envVars.blobStorageConnectorType;
786
- if (Is.stringValue(defaultStorageConnectorType)) {
770
+ if (Is.arrayValue(blobStorageConnectorTypes)) {
771
+ const defaultStorageConnectorType = envVars.blobStorageConnectorDefault ?? blobStorageConnectorTypes[0];
787
772
  for (const config of coreConfig.types.blobStorageConnector) {
788
773
  if (config.type === defaultStorageConnectorType) {
789
774
  config.isDefault = true;
775
+ break;
790
776
  }
791
777
  }
792
778
  }
@@ -1526,8 +1512,10 @@ function buildEngineServerConfiguration(envVars, coreEngineConfig, serverInfo, o
1526
1512
  */
1527
1513
  async function start(nodeOptions, engineServerConfig, envVars) {
1528
1514
  envVars.storageFileRoot ??= "";
1529
- if ((envVars.entityStorageConnectorType === EntityStorageConnectorType.File ||
1530
- envVars.blobStorageConnectorType === BlobStorageConnectorType.File ||
1515
+ const entityStorageConnectorType = envVars.entityStorageConnectorType?.split(",") ?? [];
1516
+ const blobStorageConnectorType = envVars.blobStorageConnectorType?.split(",") ?? [];
1517
+ if ((entityStorageConnectorType.includes(EntityStorageConnectorType.File) ||
1518
+ blobStorageConnectorType.includes(BlobStorageConnectorType.File) ||
1531
1519
  Is.empty(nodeOptions?.stateStorage)) &&
1532
1520
  !Is.stringValue(envVars.storageFileRoot)) {
1533
1521
  throw new GeneralError("node", "storageFileRootNotSet", {
@@ -1578,7 +1566,7 @@ async function run(nodeOptions) {
1578
1566
  nodeOptions ??= {};
1579
1567
  const serverInfo = {
1580
1568
  name: nodeOptions?.serverName ?? "TWIN Node Server",
1581
- version: nodeOptions?.serverVersion ?? "0.0.1-next.11" // x-release-please-version
1569
+ version: nodeOptions?.serverVersion ?? "0.0.2-next.2" // x-release-please-version
1582
1570
  };
1583
1571
  console.log(`\u001B[4m🌩️ ${serverInfo.name} v${serverInfo.version}\u001B[24m\n`);
1584
1572
  if (!Is.stringValue(nodeOptions?.executionDirectory)) {
@@ -1688,4 +1676,4 @@ async function buildConfiguration(processEnv, options, serverInfo) {
1688
1676
  return { engineServerConfig, nodeEnvVars: envVars };
1689
1677
  }
1690
1678
 
1691
- export { NodeFeatures, bootstrap, bootstrapAttestationMethod, bootstrapAuth, bootstrapBlobEncryption, bootstrapImmutableProofMethod, bootstrapNodeIdentity, bootstrapNodeUser, buildConfiguration, buildEngineConfiguration, fileExists, getExecutionDirectory, getFeatures, initialiseLocales, loadJsonFile, run, start };
1679
+ export { NodeFeatures, bootstrap, bootstrapAttestationMethod, bootstrapAuth, bootstrapBlobEncryption, bootstrapImmutableProofMethod, bootstrapNodeIdentity, bootstrapNodeUser, buildConfiguration, buildEngineConfiguration, buildEngineServerConfiguration, fileExists, getExecutionDirectory, getFeatures, initialiseLocales, loadJsonFile, run, start };
@@ -1,5 +1,6 @@
1
1
  export * from "./bootstrap";
2
2
  export * from "./builders/engineEnvBuilder";
3
+ export * from "./builders/engineServerEnvBuilder";
3
4
  export * from "./models/IEngineEnvironmentVariables";
4
5
  export * from "./models/IEngineServerEnvironmentVariables";
5
6
  export * from "./models/INodeEnvironmentVariables";
@@ -15,21 +15,22 @@ export interface IEngineEnvironmentVariables {
15
15
  */
16
16
  stateFilename?: string;
17
17
  /**
18
- * The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql.
18
+ * The type of the entity storage to create, comma separate for more than one connector.
19
+ * values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql
19
20
  */
20
21
  entityStorageConnectorType?: string;
21
22
  /**
22
- * A prefix for all the table in entity-storage, can be empty.
23
+ * The default entity storage connector to use, defaults to the first one in the list.
23
24
  */
24
- entityStorageTablePrefix?: string;
25
+ entityStorageConnectorDefault?: string;
25
26
  /**
26
- * Enable the file entity storage connector.
27
+ * Entity storage connector for decentralized storage
27
28
  */
28
- entityFileEnable?: string;
29
+ entityStorageConnectorDecentralised?: string;
29
30
  /**
30
- * Enable the memory entity storage connector.
31
+ * A prefix for all the table in entity-storage, can be empty.
31
32
  */
32
- entityMemoryEnable?: string;
33
+ entityStorageTablePrefix?: string;
33
34
  /**
34
35
  * AWS Dynamo DB access key id.
35
36
  */
@@ -94,6 +95,10 @@ export interface IEngineEnvironmentVariables {
94
95
  * ScyllaDB local data center.
95
96
  */
96
97
  scylladbLocalDataCenter?: string;
98
+ /**
99
+ * ScyllaDB port.
100
+ */
101
+ scylladbPort?: string;
97
102
  /**
98
103
  * MySQL host.
99
104
  */
@@ -163,9 +168,18 @@ export interface IEngineEnvironmentVariables {
163
168
  */
164
169
  ipfsApiUrl?: string;
165
170
  /**
166
- * The type of the default blob storage: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.
171
+ * The type of the entity storage to create, comma separate for more than one connector.
172
+ * values: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.
167
173
  */
168
174
  blobStorageConnectorType?: string;
175
+ /**
176
+ * The default blob storage connector to use, defaults to the first one in the list.
177
+ */
178
+ blobStorageConnectorDefault?: string;
179
+ /**
180
+ * Blog storage connector for decentralized storage
181
+ */
182
+ blobStorageConnectorDecentralised?: string;
169
183
  /**
170
184
  * Enable encryption for the blob storage.
171
185
  */
@@ -178,14 +192,6 @@ export interface IEngineEnvironmentVariables {
178
192
  * A prefix for all the blobs in blob-storage, can be empty.
179
193
  */
180
194
  blobStoragePrefix?: string;
181
- /**
182
- * Enable the file blob storage connector.
183
- */
184
- blobFileEnable?: string;
185
- /**
186
- * Enable the memory blob storage connector.
187
- */
188
- blobMemoryEnable?: string;
189
195
  /**
190
196
  * AWS S3 access key id.
191
197
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @twin.org/node-core - Changelog
2
2
 
3
+ ## [0.0.2-next.2](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.1...node-core-v0.0.2-next.2) (2025-07-17)
4
+
5
+
6
+ ### Features
7
+
8
+ * support multiple entity and blob storage connectors ([a489f79](https://github.com/twinfoundation/node/commit/a489f7907544aef5708d5111e9f72985e1377bae))
9
+
10
+ ## [0.0.2-next.1](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.0...node-core-v0.0.2-next.1) (2025-07-15)
11
+
12
+
13
+ ### Features
14
+
15
+ * add auth admin component ([1661e57](https://github.com/twinfoundation/node/commit/1661e57a699d5cf9ebde333e3cbc3aaea89d7c9c))
16
+ * add extend engine and server methods ([ec09c7e](https://github.com/twinfoundation/node/commit/ec09c7eb882d9f5797f2fd372e96cad1a3716f59))
17
+ * add extend engine and server methods ([0136a6f](https://github.com/twinfoundation/node/commit/0136a6f3f4e1a82b1427ee9618b8a17c79bc7fda))
18
+ * add missing export ([e8eb621](https://github.com/twinfoundation/node/commit/e8eb6213937a202520b164a9970a891004122b61))
19
+ * additional run options ([c35e5bb](https://github.com/twinfoundation/node/commit/c35e5bbb8a80fe6a36628d41f64585b3723d9ad7))
20
+ * additional startup logging ([0740293](https://github.com/twinfoundation/node/commit/0740293b366032f2907046603abf587c9c324aff))
21
+ * improve default options and spec ([b538721](https://github.com/twinfoundation/node/commit/b538721902e7f65021d2715148ba59409ccce035))
22
+ * improve error reporting ([fcd39a1](https://github.com/twinfoundation/node/commit/fcd39a18da2a6ce33965a99ca5f2f36f4aba712f))
23
+ * initial commit ([522f1e5](https://github.com/twinfoundation/node/commit/522f1e515348f9b1dd1eeb3170b1249e2b0b5371))
24
+ * migrate env config from engine to node ([5da29b8](https://github.com/twinfoundation/node/commit/5da29b8d714495308320d237a68e84355bba2b47))
25
+ * node app use JavaScript ([14fe08c](https://github.com/twinfoundation/node/commit/14fe08cb760dd885a5dac9056a4d5dbc3d61df64))
26
+ * update dependencies ([9d25f16](https://github.com/twinfoundation/node/commit/9d25f16f1d554cd38f3bec28fdf7f8fff892ceaf))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * adding a condition to verify if the password exists when bootstrapping ([6030a42](https://github.com/twinfoundation/node/commit/6030a42bdaf581678d96932fd0b809396bf7b8b0))
32
+ * adding a condition to verify if the password exists when bootstrapping ([c66f396](https://github.com/twinfoundation/node/commit/c66f396717394161a7647d1f08b3d87729d96e96))
33
+ * broken docs ([61479fd](https://github.com/twinfoundation/node/commit/61479fd618f766d22c5aafec5277e1a89e22b453))
34
+ * pr comments [#1](https://github.com/twinfoundation/node/issues/1) ([66e795b](https://github.com/twinfoundation/node/commit/66e795b16c372ab131ec1de30085aee90e4dbbd0))
35
+
3
36
  ## 0.0.1 (2025-07-11)
4
37
 
5
38
 
@@ -0,0 +1,37 @@
1
+ # Function: buildEngineServerConfiguration()
2
+
3
+ > **buildEngineServerConfiguration**(`envVars`, `coreEngineConfig`, `serverInfo`, `openApiSpecPath?`): `IEngineServerConfig`
4
+
5
+ Handles the configuration of the server.
6
+
7
+ ## Parameters
8
+
9
+ ### envVars
10
+
11
+ [`IEngineServerEnvironmentVariables`](../interfaces/IEngineServerEnvironmentVariables.md)
12
+
13
+ The environment variables for the engine server.
14
+
15
+ ### coreEngineConfig
16
+
17
+ `IEngineCoreConfig`
18
+
19
+ The core engine config.
20
+
21
+ ### serverInfo
22
+
23
+ `IServerInfo`
24
+
25
+ The server information.
26
+
27
+ ### openApiSpecPath?
28
+
29
+ `string`
30
+
31
+ The path to the open api spec.
32
+
33
+ ## Returns
34
+
35
+ `IEngineServerConfig`
36
+
37
+ The the config for the core and the server.
@@ -25,6 +25,7 @@
25
25
  - [bootstrapBlobEncryption](functions/bootstrapBlobEncryption.md)
26
26
  - [bootstrapAuth](functions/bootstrapAuth.md)
27
27
  - [buildEngineConfiguration](functions/buildEngineConfiguration.md)
28
+ - [buildEngineServerConfiguration](functions/buildEngineServerConfiguration.md)
28
29
  - [run](functions/run.md)
29
30
  - [buildConfiguration](functions/buildConfiguration.md)
30
31
  - [start](functions/start.md)
@@ -36,31 +36,32 @@ The name of the state file.
36
36
 
37
37
  > `optional` **entityStorageConnectorType**: `string`
38
38
 
39
- The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql.
39
+ The type of the entity storage to create, comma separate for more than one connector.
40
+ values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql
40
41
 
41
42
  ***
42
43
 
43
- ### entityStorageTablePrefix?
44
+ ### entityStorageConnectorDefault?
44
45
 
45
- > `optional` **entityStorageTablePrefix**: `string`
46
+ > `optional` **entityStorageConnectorDefault**: `string`
46
47
 
47
- A prefix for all the table in entity-storage, can be empty.
48
+ The default entity storage connector to use, defaults to the first one in the list.
48
49
 
49
50
  ***
50
51
 
51
- ### entityFileEnable?
52
+ ### entityStorageConnectorDecentralised?
52
53
 
53
- > `optional` **entityFileEnable**: `string`
54
+ > `optional` **entityStorageConnectorDecentralised**: `string`
54
55
 
55
- Enable the file entity storage connector.
56
+ Entity storage connector for decentralized storage
56
57
 
57
58
  ***
58
59
 
59
- ### entityMemoryEnable?
60
+ ### entityStorageTablePrefix?
60
61
 
61
- > `optional` **entityMemoryEnable**: `string`
62
+ > `optional` **entityStorageTablePrefix**: `string`
62
63
 
63
- Enable the memory entity storage connector.
64
+ A prefix for all the table in entity-storage, can be empty.
64
65
 
65
66
  ***
66
67
 
@@ -192,6 +193,14 @@ ScyllaDB local data center.
192
193
 
193
194
  ***
194
195
 
196
+ ### scylladbPort?
197
+
198
+ > `optional` **scylladbPort**: `string`
199
+
200
+ ScyllaDB port.
201
+
202
+ ***
203
+
195
204
  ### mySqlHost?
196
205
 
197
206
  > `optional` **mySqlHost**: `string`
@@ -332,47 +341,48 @@ The url for accessing IPFS API.
332
341
 
333
342
  > `optional` **blobStorageConnectorType**: `string`
334
343
 
335
- The type of the default blob storage: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.
344
+ The type of the entity storage to create, comma separate for more than one connector.
345
+ values: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.
336
346
 
337
347
  ***
338
348
 
339
- ### blobStorageEnableEncryption?
349
+ ### blobStorageConnectorDefault?
340
350
 
341
- > `optional` **blobStorageEnableEncryption**: `string`
351
+ > `optional` **blobStorageConnectorDefault**: `string`
342
352
 
343
- Enable encryption for the blob storage.
353
+ The default blob storage connector to use, defaults to the first one in the list.
344
354
 
345
355
  ***
346
356
 
347
- ### blobStorageEncryptionKey?
357
+ ### blobStorageConnectorDecentralised?
348
358
 
349
- > `optional` **blobStorageEncryptionKey**: `string`
359
+ > `optional` **blobStorageConnectorDecentralised**: `string`
350
360
 
351
- The encryption key for the blob storage.
361
+ Blog storage connector for decentralized storage
352
362
 
353
363
  ***
354
364
 
355
- ### blobStoragePrefix?
365
+ ### blobStorageEnableEncryption?
356
366
 
357
- > `optional` **blobStoragePrefix**: `string`
367
+ > `optional` **blobStorageEnableEncryption**: `string`
358
368
 
359
- A prefix for all the blobs in blob-storage, can be empty.
369
+ Enable encryption for the blob storage.
360
370
 
361
371
  ***
362
372
 
363
- ### blobFileEnable?
373
+ ### blobStorageEncryptionKey?
364
374
 
365
- > `optional` **blobFileEnable**: `string`
375
+ > `optional` **blobStorageEncryptionKey**: `string`
366
376
 
367
- Enable the file blob storage connector.
377
+ The encryption key for the blob storage.
368
378
 
369
379
  ***
370
380
 
371
- ### blobMemoryEnable?
381
+ ### blobStoragePrefix?
372
382
 
373
- > `optional` **blobMemoryEnable**: `string`
383
+ > `optional` **blobStoragePrefix**: `string`
374
384
 
375
- Enable the memory blob storage connector.
385
+ A prefix for all the blobs in blob-storage, can be empty.
376
386
 
377
387
  ***
378
388
 
@@ -48,7 +48,8 @@ The name of the state file.
48
48
 
49
49
  > `optional` **entityStorageConnectorType**: `string`
50
50
 
51
- The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql.
51
+ The type of the entity storage to create, comma separate for more than one connector.
52
+ values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql
52
53
 
53
54
  #### Inherited from
54
55
 
@@ -56,39 +57,39 @@ The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmos
56
57
 
57
58
  ***
58
59
 
59
- ### entityStorageTablePrefix?
60
+ ### entityStorageConnectorDefault?
60
61
 
61
- > `optional` **entityStorageTablePrefix**: `string`
62
+ > `optional` **entityStorageConnectorDefault**: `string`
62
63
 
63
- A prefix for all the table in entity-storage, can be empty.
64
+ The default entity storage connector to use, defaults to the first one in the list.
64
65
 
65
66
  #### Inherited from
66
67
 
67
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityStorageTablePrefix`](IEngineEnvironmentVariables.md#entitystoragetableprefix)
68
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityStorageConnectorDefault`](IEngineEnvironmentVariables.md#entitystorageconnectordefault)
68
69
 
69
70
  ***
70
71
 
71
- ### entityFileEnable?
72
+ ### entityStorageConnectorDecentralised?
72
73
 
73
- > `optional` **entityFileEnable**: `string`
74
+ > `optional` **entityStorageConnectorDecentralised**: `string`
74
75
 
75
- Enable the file entity storage connector.
76
+ Entity storage connector for decentralized storage
76
77
 
77
78
  #### Inherited from
78
79
 
79
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityFileEnable`](IEngineEnvironmentVariables.md#entityfileenable)
80
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityStorageConnectorDecentralised`](IEngineEnvironmentVariables.md#entitystorageconnectordecentralised)
80
81
 
81
82
  ***
82
83
 
83
- ### entityMemoryEnable?
84
+ ### entityStorageTablePrefix?
84
85
 
85
- > `optional` **entityMemoryEnable**: `string`
86
+ > `optional` **entityStorageTablePrefix**: `string`
86
87
 
87
- Enable the memory entity storage connector.
88
+ A prefix for all the table in entity-storage, can be empty.
88
89
 
89
90
  #### Inherited from
90
91
 
91
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityMemoryEnable`](IEngineEnvironmentVariables.md#entitymemoryenable)
92
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityStorageTablePrefix`](IEngineEnvironmentVariables.md#entitystoragetableprefix)
92
93
 
93
94
  ***
94
95
 
@@ -284,6 +285,18 @@ ScyllaDB local data center.
284
285
 
285
286
  ***
286
287
 
288
+ ### scylladbPort?
289
+
290
+ > `optional` **scylladbPort**: `string`
291
+
292
+ ScyllaDB port.
293
+
294
+ #### Inherited from
295
+
296
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`scylladbPort`](IEngineEnvironmentVariables.md#scylladbport)
297
+
298
+ ***
299
+
287
300
  ### mySqlHost?
288
301
 
289
302
  > `optional` **mySqlHost**: `string`
@@ -492,7 +505,8 @@ The url for accessing IPFS API.
492
505
 
493
506
  > `optional` **blobStorageConnectorType**: `string`
494
507
 
495
- The type of the default blob storage: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.
508
+ The type of the entity storage to create, comma separate for more than one connector.
509
+ values: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.
496
510
 
497
511
  #### Inherited from
498
512
 
@@ -500,63 +514,63 @@ The type of the default blob storage: memory, file, ipfs, aws-s3, azure-storage,
500
514
 
501
515
  ***
502
516
 
503
- ### blobStorageEnableEncryption?
517
+ ### blobStorageConnectorDefault?
504
518
 
505
- > `optional` **blobStorageEnableEncryption**: `string`
519
+ > `optional` **blobStorageConnectorDefault**: `string`
506
520
 
507
- Enable encryption for the blob storage.
521
+ The default blob storage connector to use, defaults to the first one in the list.
508
522
 
509
523
  #### Inherited from
510
524
 
511
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageEnableEncryption`](IEngineEnvironmentVariables.md#blobstorageenableencryption)
525
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageConnectorDefault`](IEngineEnvironmentVariables.md#blobstorageconnectordefault)
512
526
 
513
527
  ***
514
528
 
515
- ### blobStorageEncryptionKey?
529
+ ### blobStorageConnectorDecentralised?
516
530
 
517
- > `optional` **blobStorageEncryptionKey**: `string`
531
+ > `optional` **blobStorageConnectorDecentralised**: `string`
518
532
 
519
- The encryption key for the blob storage.
533
+ Blog storage connector for decentralized storage
520
534
 
521
535
  #### Inherited from
522
536
 
523
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageEncryptionKey`](IEngineEnvironmentVariables.md#blobstorageencryptionkey)
537
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageConnectorDecentralised`](IEngineEnvironmentVariables.md#blobstorageconnectordecentralised)
524
538
 
525
539
  ***
526
540
 
527
- ### blobStoragePrefix?
541
+ ### blobStorageEnableEncryption?
528
542
 
529
- > `optional` **blobStoragePrefix**: `string`
543
+ > `optional` **blobStorageEnableEncryption**: `string`
530
544
 
531
- A prefix for all the blobs in blob-storage, can be empty.
545
+ Enable encryption for the blob storage.
532
546
 
533
547
  #### Inherited from
534
548
 
535
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStoragePrefix`](IEngineEnvironmentVariables.md#blobstorageprefix)
549
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageEnableEncryption`](IEngineEnvironmentVariables.md#blobstorageenableencryption)
536
550
 
537
551
  ***
538
552
 
539
- ### blobFileEnable?
553
+ ### blobStorageEncryptionKey?
540
554
 
541
- > `optional` **blobFileEnable**: `string`
555
+ > `optional` **blobStorageEncryptionKey**: `string`
542
556
 
543
- Enable the file blob storage connector.
557
+ The encryption key for the blob storage.
544
558
 
545
559
  #### Inherited from
546
560
 
547
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobFileEnable`](IEngineEnvironmentVariables.md#blobfileenable)
561
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageEncryptionKey`](IEngineEnvironmentVariables.md#blobstorageencryptionkey)
548
562
 
549
563
  ***
550
564
 
551
- ### blobMemoryEnable?
565
+ ### blobStoragePrefix?
552
566
 
553
- > `optional` **blobMemoryEnable**: `string`
567
+ > `optional` **blobStoragePrefix**: `string`
554
568
 
555
- Enable the memory blob storage connector.
569
+ A prefix for all the blobs in blob-storage, can be empty.
556
570
 
557
571
  #### Inherited from
558
572
 
559
- [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobMemoryEnable`](IEngineEnvironmentVariables.md#blobmemoryenable)
573
+ [`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStoragePrefix`](IEngineEnvironmentVariables.md#blobstorageprefix)
560
574
 
561
575
  ***
562
576
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/node-core",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-next.2",
4
4
  "description": "TWIN Node Core for serving APIs using the specified configuration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,21 +14,21 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-auth-entity-storage-service": "^0.0.2-next.1",
18
- "@twin.org/core": "^0.0.1",
19
- "@twin.org/crypto": "^0.0.1",
20
- "@twin.org/engine": "^0.0.2-next.1",
21
- "@twin.org/engine-core": "^0.0.2-next.1",
22
- "@twin.org/engine-models": "^0.0.2-next.1",
23
- "@twin.org/engine-server": "^0.0.2-next.1",
24
- "@twin.org/engine-server-types": "^0.0.2-next.1",
25
- "@twin.org/engine-types": "^0.0.2-next.1",
26
- "@twin.org/entity": "^0.0.1",
27
- "@twin.org/entity-storage-models": "^0.0.1",
28
- "@twin.org/identity-models": "^0.0.1",
29
- "@twin.org/vault-models": "^0.0.1",
30
- "@twin.org/wallet-models": "^0.0.1",
31
- "dotenv": "16.5.0",
17
+ "@twin.org/api-auth-entity-storage-service": "next",
18
+ "@twin.org/core": "next",
19
+ "@twin.org/crypto": "next",
20
+ "@twin.org/engine": "next",
21
+ "@twin.org/engine-core": "next",
22
+ "@twin.org/engine-models": "next",
23
+ "@twin.org/engine-server": "next",
24
+ "@twin.org/engine-server-types": "next",
25
+ "@twin.org/engine-types": "next",
26
+ "@twin.org/entity": "next",
27
+ "@twin.org/entity-storage-models": "next",
28
+ "@twin.org/identity-models": "next",
29
+ "@twin.org/vault-models": "next",
30
+ "@twin.org/wallet-models": "next",
31
+ "dotenv": "17.2.0",
32
32
  "schema-dts": "1.1.5"
33
33
  },
34
34
  "main": "./dist/cjs/index.cjs",