@twin.org/node-core 0.0.2-next.1 → 0.0.2-next.3
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/cjs/index.cjs +43 -55
- package/dist/esm/index.mjs +43 -55
- package/dist/types/models/IEngineEnvironmentVariables.d.ts +22 -16
- package/docs/changelog.md +14 -0
- package/docs/reference/interfaces/IEngineEnvironmentVariables.md +36 -26
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +48 -34
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -245,7 +245,7 @@ async function finaliseWallet(engineCore, envVars, features, finalIdentity, addr
|
|
|
245
245
|
const engineDefaultTypes = engineCore.getDefaultTypes();
|
|
246
246
|
// If we are using entity storage for wallet the identity associated with the
|
|
247
247
|
// address will be wrong, so fix it
|
|
248
|
-
if (engineDefaultTypes.walletConnector ===
|
|
248
|
+
if (engineDefaultTypes.walletConnector === engineTypes.WalletConnectorType.EntityStorage) {
|
|
249
249
|
const walletAddress = entityStorageModels.EntityStorageConnectorFactory.get(core.StringHelper.kebabCase("WalletAddress"));
|
|
250
250
|
const addr = await walletAddress.get(addresses[0]);
|
|
251
251
|
if (!core.Is.empty(addr)) {
|
|
@@ -313,7 +313,7 @@ async function finaliseMnemonic(vaultConnector, workingIdentity, finalIdentity)
|
|
|
313
313
|
async function bootstrapNodeUser(engineCore, context, envVars, features) {
|
|
314
314
|
if (features.includes(NodeFeatures.NodeUser)) {
|
|
315
315
|
const engineDefaultTypes = engineCore.getDefaultTypes();
|
|
316
|
-
if (engineDefaultTypes.authenticationComponent === "
|
|
316
|
+
if (engineDefaultTypes.authenticationComponent === "entity-storage-authentication-service" &&
|
|
317
317
|
core.Is.stringValue(context.state.nodeIdentity)) {
|
|
318
318
|
const authUserEntityStorage = entityStorageModels.EntityStorageConnectorFactory.get(core.StringHelper.kebabCase("AuthenticationUser"));
|
|
319
319
|
const email = envVars.username ?? DEFAULT_NODE_USERNAME;
|
|
@@ -497,7 +497,7 @@ async function bootstrapBlobEncryption(engineCore, context, envVars, features) {
|
|
|
497
497
|
*/
|
|
498
498
|
async function bootstrapAuth(engineCore, context, envVars, features) {
|
|
499
499
|
const engineDefaultTypes = engineCore.getDefaultTypes();
|
|
500
|
-
if (engineDefaultTypes.authenticationComponent === "
|
|
500
|
+
if (engineDefaultTypes.authenticationComponent === "entity-storage-authentication-service" &&
|
|
501
501
|
core.Is.stringValue(context.state.nodeIdentity)) {
|
|
502
502
|
// Create a new JWT signing key and a user login for the node
|
|
503
503
|
const vaultConnector = vaultModels.VaultConnectorFactory.get(engineDefaultTypes.vaultConnector);
|
|
@@ -581,14 +581,13 @@ function getIotaConfig(coreConfig) {
|
|
|
581
581
|
function configureEntityStorage(coreConfig, envVars) {
|
|
582
582
|
coreConfig.types ??= {};
|
|
583
583
|
coreConfig.types.entityStorageConnector ??= [];
|
|
584
|
-
|
|
585
|
-
|
|
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 ((
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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
|
|
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 (
|
|
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
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
717
|
-
|
|
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 ===
|
|
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
|
-
|
|
733
|
-
|
|
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 ((
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
807
|
-
|
|
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
|
}
|
|
@@ -1357,7 +1343,7 @@ function configureTaskScheduler(coreConfig, envVars) {
|
|
|
1357
1343
|
if (core.Coerce.boolean(envVars.taskSchedulerEnabled) ?? true) {
|
|
1358
1344
|
coreConfig.types.taskSchedulerComponent ??= [];
|
|
1359
1345
|
coreConfig.types.taskSchedulerComponent.push({
|
|
1360
|
-
type: engineTypes.TaskSchedulerComponentType.
|
|
1346
|
+
type: engineTypes.TaskSchedulerComponentType.Service
|
|
1361
1347
|
});
|
|
1362
1348
|
}
|
|
1363
1349
|
}
|
|
@@ -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
|
-
|
|
1551
|
-
|
|
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.2-next.
|
|
1590
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.3" // 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)) {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -224,7 +224,7 @@ async function finaliseWallet(engineCore, envVars, features, finalIdentity, addr
|
|
|
224
224
|
const engineDefaultTypes = engineCore.getDefaultTypes();
|
|
225
225
|
// If we are using entity storage for wallet the identity associated with the
|
|
226
226
|
// address will be wrong, so fix it
|
|
227
|
-
if (engineDefaultTypes.walletConnector ===
|
|
227
|
+
if (engineDefaultTypes.walletConnector === WalletConnectorType.EntityStorage) {
|
|
228
228
|
const walletAddress = EntityStorageConnectorFactory.get(StringHelper.kebabCase("WalletAddress"));
|
|
229
229
|
const addr = await walletAddress.get(addresses[0]);
|
|
230
230
|
if (!Is.empty(addr)) {
|
|
@@ -292,7 +292,7 @@ async function finaliseMnemonic(vaultConnector, workingIdentity, finalIdentity)
|
|
|
292
292
|
async function bootstrapNodeUser(engineCore, context, envVars, features) {
|
|
293
293
|
if (features.includes(NodeFeatures.NodeUser)) {
|
|
294
294
|
const engineDefaultTypes = engineCore.getDefaultTypes();
|
|
295
|
-
if (engineDefaultTypes.authenticationComponent === "
|
|
295
|
+
if (engineDefaultTypes.authenticationComponent === "entity-storage-authentication-service" &&
|
|
296
296
|
Is.stringValue(context.state.nodeIdentity)) {
|
|
297
297
|
const authUserEntityStorage = EntityStorageConnectorFactory.get(StringHelper.kebabCase("AuthenticationUser"));
|
|
298
298
|
const email = envVars.username ?? DEFAULT_NODE_USERNAME;
|
|
@@ -476,7 +476,7 @@ async function bootstrapBlobEncryption(engineCore, context, envVars, features) {
|
|
|
476
476
|
*/
|
|
477
477
|
async function bootstrapAuth(engineCore, context, envVars, features) {
|
|
478
478
|
const engineDefaultTypes = engineCore.getDefaultTypes();
|
|
479
|
-
if (engineDefaultTypes.authenticationComponent === "
|
|
479
|
+
if (engineDefaultTypes.authenticationComponent === "entity-storage-authentication-service" &&
|
|
480
480
|
Is.stringValue(context.state.nodeIdentity)) {
|
|
481
481
|
// Create a new JWT signing key and a user login for the node
|
|
482
482
|
const vaultConnector = VaultConnectorFactory.get(engineDefaultTypes.vaultConnector);
|
|
@@ -560,14 +560,13 @@ function getIotaConfig(coreConfig) {
|
|
|
560
560
|
function configureEntityStorage(coreConfig, envVars) {
|
|
561
561
|
coreConfig.types ??= {};
|
|
562
562
|
coreConfig.types.entityStorageConnector ??= [];
|
|
563
|
-
|
|
564
|
-
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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
|
|
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 (
|
|
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
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
696
|
-
|
|
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 ===
|
|
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
|
-
|
|
712
|
-
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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
|
-
|
|
786
|
-
|
|
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
|
}
|
|
@@ -1336,7 +1322,7 @@ function configureTaskScheduler(coreConfig, envVars) {
|
|
|
1336
1322
|
if (Coerce.boolean(envVars.taskSchedulerEnabled) ?? true) {
|
|
1337
1323
|
coreConfig.types.taskSchedulerComponent ??= [];
|
|
1338
1324
|
coreConfig.types.taskSchedulerComponent.push({
|
|
1339
|
-
type: TaskSchedulerComponentType.
|
|
1325
|
+
type: TaskSchedulerComponentType.Service
|
|
1340
1326
|
});
|
|
1341
1327
|
}
|
|
1342
1328
|
}
|
|
@@ -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
|
-
|
|
1530
|
-
|
|
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.2-next.
|
|
1569
|
+
version: nodeOptions?.serverVersion ?? "0.0.2-next.3" // 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)) {
|
|
@@ -15,21 +15,22 @@ export interface IEngineEnvironmentVariables {
|
|
|
15
15
|
*/
|
|
16
16
|
stateFilename?: string;
|
|
17
17
|
/**
|
|
18
|
-
* The type of the
|
|
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
|
-
*
|
|
23
|
+
* The default entity storage connector to use, defaults to the first one in the list.
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
+
entityStorageConnectorDefault?: string;
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
+
* Entity storage connector for decentralized storage
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
+
entityStorageConnectorDecentralised?: string;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* A prefix for all the table in entity-storage, can be empty.
|
|
31
32
|
*/
|
|
32
|
-
|
|
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
|
|
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,19 @@
|
|
|
1
1
|
# @twin.org/node-core - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.3](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.2...node-core-v0.0.2-next.3) (2025-07-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update to latest engine config ([347386c](https://github.com/twinfoundation/node/commit/347386c0609e717dc20c456ad2264c83df793c59))
|
|
9
|
+
|
|
10
|
+
## [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)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* support multiple entity and blob storage connectors ([a489f79](https://github.com/twinfoundation/node/commit/a489f7907544aef5708d5111e9f72985e1377bae))
|
|
16
|
+
|
|
3
17
|
## [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)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -36,31 +36,32 @@ The name of the state file.
|
|
|
36
36
|
|
|
37
37
|
> `optional` **entityStorageConnectorType**: `string`
|
|
38
38
|
|
|
39
|
-
The type of the
|
|
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
|
-
###
|
|
44
|
+
### entityStorageConnectorDefault?
|
|
44
45
|
|
|
45
|
-
> `optional` **
|
|
46
|
+
> `optional` **entityStorageConnectorDefault**: `string`
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
The default entity storage connector to use, defaults to the first one in the list.
|
|
48
49
|
|
|
49
50
|
***
|
|
50
51
|
|
|
51
|
-
###
|
|
52
|
+
### entityStorageConnectorDecentralised?
|
|
52
53
|
|
|
53
|
-
> `optional` **
|
|
54
|
+
> `optional` **entityStorageConnectorDecentralised**: `string`
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
Entity storage connector for decentralized storage
|
|
56
57
|
|
|
57
58
|
***
|
|
58
59
|
|
|
59
|
-
###
|
|
60
|
+
### entityStorageTablePrefix?
|
|
60
61
|
|
|
61
|
-
> `optional` **
|
|
62
|
+
> `optional` **entityStorageTablePrefix**: `string`
|
|
62
63
|
|
|
63
|
-
|
|
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
|
|
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
|
-
###
|
|
349
|
+
### blobStorageConnectorDefault?
|
|
340
350
|
|
|
341
|
-
> `optional` **
|
|
351
|
+
> `optional` **blobStorageConnectorDefault**: `string`
|
|
342
352
|
|
|
343
|
-
|
|
353
|
+
The default blob storage connector to use, defaults to the first one in the list.
|
|
344
354
|
|
|
345
355
|
***
|
|
346
356
|
|
|
347
|
-
###
|
|
357
|
+
### blobStorageConnectorDecentralised?
|
|
348
358
|
|
|
349
|
-
> `optional` **
|
|
359
|
+
> `optional` **blobStorageConnectorDecentralised**: `string`
|
|
350
360
|
|
|
351
|
-
|
|
361
|
+
Blog storage connector for decentralized storage
|
|
352
362
|
|
|
353
363
|
***
|
|
354
364
|
|
|
355
|
-
###
|
|
365
|
+
### blobStorageEnableEncryption?
|
|
356
366
|
|
|
357
|
-
> `optional` **
|
|
367
|
+
> `optional` **blobStorageEnableEncryption**: `string`
|
|
358
368
|
|
|
359
|
-
|
|
369
|
+
Enable encryption for the blob storage.
|
|
360
370
|
|
|
361
371
|
***
|
|
362
372
|
|
|
363
|
-
###
|
|
373
|
+
### blobStorageEncryptionKey?
|
|
364
374
|
|
|
365
|
-
> `optional` **
|
|
375
|
+
> `optional` **blobStorageEncryptionKey**: `string`
|
|
366
376
|
|
|
367
|
-
|
|
377
|
+
The encryption key for the blob storage.
|
|
368
378
|
|
|
369
379
|
***
|
|
370
380
|
|
|
371
|
-
###
|
|
381
|
+
### blobStoragePrefix?
|
|
372
382
|
|
|
373
|
-
> `optional` **
|
|
383
|
+
> `optional` **blobStoragePrefix**: `string`
|
|
374
384
|
|
|
375
|
-
|
|
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
|
|
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
|
-
###
|
|
60
|
+
### entityStorageConnectorDefault?
|
|
60
61
|
|
|
61
|
-
> `optional` **
|
|
62
|
+
> `optional` **entityStorageConnectorDefault**: `string`
|
|
62
63
|
|
|
63
|
-
|
|
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).[`
|
|
68
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityStorageConnectorDefault`](IEngineEnvironmentVariables.md#entitystorageconnectordefault)
|
|
68
69
|
|
|
69
70
|
***
|
|
70
71
|
|
|
71
|
-
###
|
|
72
|
+
### entityStorageConnectorDecentralised?
|
|
72
73
|
|
|
73
|
-
> `optional` **
|
|
74
|
+
> `optional` **entityStorageConnectorDecentralised**: `string`
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
Entity storage connector for decentralized storage
|
|
76
77
|
|
|
77
78
|
#### Inherited from
|
|
78
79
|
|
|
79
|
-
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`
|
|
80
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`entityStorageConnectorDecentralised`](IEngineEnvironmentVariables.md#entitystorageconnectordecentralised)
|
|
80
81
|
|
|
81
82
|
***
|
|
82
83
|
|
|
83
|
-
###
|
|
84
|
+
### entityStorageTablePrefix?
|
|
84
85
|
|
|
85
|
-
> `optional` **
|
|
86
|
+
> `optional` **entityStorageTablePrefix**: `string`
|
|
86
87
|
|
|
87
|
-
|
|
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).[`
|
|
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
|
|
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
|
-
###
|
|
517
|
+
### blobStorageConnectorDefault?
|
|
504
518
|
|
|
505
|
-
> `optional` **
|
|
519
|
+
> `optional` **blobStorageConnectorDefault**: `string`
|
|
506
520
|
|
|
507
|
-
|
|
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).[`
|
|
525
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageConnectorDefault`](IEngineEnvironmentVariables.md#blobstorageconnectordefault)
|
|
512
526
|
|
|
513
527
|
***
|
|
514
528
|
|
|
515
|
-
###
|
|
529
|
+
### blobStorageConnectorDecentralised?
|
|
516
530
|
|
|
517
|
-
> `optional` **
|
|
531
|
+
> `optional` **blobStorageConnectorDecentralised**: `string`
|
|
518
532
|
|
|
519
|
-
|
|
533
|
+
Blog storage connector for decentralized storage
|
|
520
534
|
|
|
521
535
|
#### Inherited from
|
|
522
536
|
|
|
523
|
-
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`
|
|
537
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageConnectorDecentralised`](IEngineEnvironmentVariables.md#blobstorageconnectordecentralised)
|
|
524
538
|
|
|
525
539
|
***
|
|
526
540
|
|
|
527
|
-
###
|
|
541
|
+
### blobStorageEnableEncryption?
|
|
528
542
|
|
|
529
|
-
> `optional` **
|
|
543
|
+
> `optional` **blobStorageEnableEncryption**: `string`
|
|
530
544
|
|
|
531
|
-
|
|
545
|
+
Enable encryption for the blob storage.
|
|
532
546
|
|
|
533
547
|
#### Inherited from
|
|
534
548
|
|
|
535
|
-
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`
|
|
549
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageEnableEncryption`](IEngineEnvironmentVariables.md#blobstorageenableencryption)
|
|
536
550
|
|
|
537
551
|
***
|
|
538
552
|
|
|
539
|
-
###
|
|
553
|
+
### blobStorageEncryptionKey?
|
|
540
554
|
|
|
541
|
-
> `optional` **
|
|
555
|
+
> `optional` **blobStorageEncryptionKey**: `string`
|
|
542
556
|
|
|
543
|
-
|
|
557
|
+
The encryption key for the blob storage.
|
|
544
558
|
|
|
545
559
|
#### Inherited from
|
|
546
560
|
|
|
547
|
-
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`
|
|
561
|
+
[`IEngineEnvironmentVariables`](IEngineEnvironmentVariables.md).[`blobStorageEncryptionKey`](IEngineEnvironmentVariables.md#blobstorageencryptionkey)
|
|
548
562
|
|
|
549
563
|
***
|
|
550
564
|
|
|
551
|
-
###
|
|
565
|
+
### blobStoragePrefix?
|
|
552
566
|
|
|
553
|
-
> `optional` **
|
|
567
|
+
> `optional` **blobStoragePrefix**: `string`
|
|
554
568
|
|
|
555
|
-
|
|
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).[`
|
|
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.2-next.
|
|
3
|
+
"version": "0.0.2-next.3",
|
|
4
4
|
"description": "TWIN Node Core for serving APIs using the specified configuration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@twin.org/identity-models": "next",
|
|
29
29
|
"@twin.org/vault-models": "next",
|
|
30
30
|
"@twin.org/wallet-models": "next",
|
|
31
|
-
"dotenv": "
|
|
31
|
+
"dotenv": "17.2.0",
|
|
32
32
|
"schema-dts": "1.1.5"
|
|
33
33
|
},
|
|
34
34
|
"main": "./dist/cjs/index.cjs",
|