@twin.org/node-core 0.0.3-next.53 → 0.0.3-next.55

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.
Files changed (113) hide show
  1. package/dist/es/builders/engineEnvBuilder.js +52 -10
  2. package/dist/es/builders/engineEnvBuilder.js.map +1 -1
  3. package/dist/es/builders/engineServerEnvBuilder.js +32 -32
  4. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
  5. package/dist/es/builders/extensionsBuilder.js +3 -3
  6. package/dist/es/builders/extensionsBuilder.js.map +1 -1
  7. package/dist/es/cli.js +6 -3
  8. package/dist/es/cli.js.map +1 -1
  9. package/dist/es/commands/bootstrapLegacy.js +173 -116
  10. package/dist/es/commands/bootstrapLegacy.js.map +1 -1
  11. package/dist/es/commands/help.js +1 -0
  12. package/dist/es/commands/help.js.map +1 -1
  13. package/dist/es/commands/identityCreate.js +38 -16
  14. package/dist/es/commands/identityCreate.js.map +1 -1
  15. package/dist/es/commands/identityImports.js +1 -0
  16. package/dist/es/commands/identityImports.js.map +1 -1
  17. package/dist/es/commands/identityVerificationMethodCreate.js +13 -11
  18. package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -1
  19. package/dist/es/commands/identityVerificationMethodImport.js +2 -1
  20. package/dist/es/commands/identityVerificationMethodImport.js.map +1 -1
  21. package/dist/es/commands/nodeSetIdentity.js +5 -0
  22. package/dist/es/commands/nodeSetIdentity.js.map +1 -1
  23. package/dist/es/commands/removeTenantOrgAlias.js +3 -1
  24. package/dist/es/commands/removeTenantOrgAlias.js.map +1 -1
  25. package/dist/es/commands/setNodeOrgId.js +2 -0
  26. package/dist/es/commands/setNodeOrgId.js.map +1 -1
  27. package/dist/es/commands/setTenantOrgId.js +7 -66
  28. package/dist/es/commands/setTenantOrgId.js.map +1 -1
  29. package/dist/es/commands/tenantCreate.js +1 -7
  30. package/dist/es/commands/tenantCreate.js.map +1 -1
  31. package/dist/es/commands/tenantImport.js +17 -4
  32. package/dist/es/commands/tenantImport.js.map +1 -1
  33. package/dist/es/commands/tenantUpdate.js +21 -6
  34. package/dist/es/commands/tenantUpdate.js.map +1 -1
  35. package/dist/es/commands/vaultKeyImport.js +4 -3
  36. package/dist/es/commands/vaultKeyImport.js.map +1 -1
  37. package/dist/es/defaults.js +21 -0
  38. package/dist/es/defaults.js.map +1 -1
  39. package/dist/es/models/ICliArgs.js.map +1 -1
  40. package/dist/es/models/ICliCommand.js.map +1 -1
  41. package/dist/es/models/ICliCommandDefinition.js.map +1 -1
  42. package/dist/es/models/ICliCommandDefinitionParam.js.map +1 -1
  43. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
  44. package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -1
  45. package/dist/es/models/nodeExtensionInitialiseEngineMethod.js.map +1 -1
  46. package/dist/es/models/nodeExtensionInitialiseEngineServerMethod.js.map +1 -1
  47. package/dist/es/models/nodeExtensionInitialiseMethod.js.map +1 -1
  48. package/dist/es/models/nodeExtensionShutdownMethod.js.map +1 -1
  49. package/dist/es/node.js +1 -1
  50. package/dist/es/node.js.map +1 -1
  51. package/dist/es/start.js +11 -13
  52. package/dist/es/start.js.map +1 -1
  53. package/dist/es/utils.js +5 -4
  54. package/dist/es/utils.js.map +1 -1
  55. package/dist/types/builders/engineEnvBuilder.d.ts +4 -4
  56. package/dist/types/builders/extensionsBuilder.d.ts +3 -3
  57. package/dist/types/cli.d.ts +2 -2
  58. package/dist/types/commands/bootstrapLegacy.d.ts +8 -7
  59. package/dist/types/commands/help.d.ts +1 -0
  60. package/dist/types/commands/identityCreate.d.ts +2 -0
  61. package/dist/types/commands/identityImports.d.ts +1 -0
  62. package/dist/types/commands/identityVerificationMethodImport.d.ts +2 -1
  63. package/dist/types/commands/nodeSetIdentity.d.ts +1 -0
  64. package/dist/types/commands/removeTenantOrgAlias.d.ts +2 -0
  65. package/dist/types/commands/setNodeOrgId.d.ts +2 -0
  66. package/dist/types/commands/setTenantOrgId.d.ts +5 -22
  67. package/dist/types/commands/tenantImport.d.ts +7 -4
  68. package/dist/types/commands/tenantUpdate.d.ts +5 -2
  69. package/dist/types/commands/vaultKeyImport.d.ts +4 -3
  70. package/dist/types/defaults.d.ts +21 -0
  71. package/dist/types/models/ICliArgs.d.ts +1 -1
  72. package/dist/types/models/ICliCommand.d.ts +1 -1
  73. package/dist/types/models/ICliCommandDefinition.d.ts +2 -2
  74. package/dist/types/models/ICliCommandDefinitionParam.d.ts +1 -1
  75. package/dist/types/models/IEngineEnvironmentVariables.d.ts +0 -4
  76. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +4 -0
  77. package/dist/types/models/nodeExtensionInitialiseEngineMethod.d.ts +1 -0
  78. package/dist/types/models/nodeExtensionInitialiseEngineServerMethod.d.ts +1 -0
  79. package/dist/types/models/nodeExtensionInitialiseMethod.d.ts +1 -0
  80. package/dist/types/models/nodeExtensionShutdownMethod.d.ts +1 -0
  81. package/dist/types/utils.d.ts +4 -3
  82. package/docs/changelog.md +15 -0
  83. package/docs/reference/functions/extensionsInitialiseEngine.md +1 -1
  84. package/docs/reference/functions/extensionsInitialiseEngineServer.md +1 -1
  85. package/docs/reference/functions/getScriptDirectory.md +1 -1
  86. package/docs/reference/functions/initialiseLocales.md +2 -0
  87. package/docs/reference/functions/isFederatedCatalogueRequired.md +3 -3
  88. package/docs/reference/functions/isRightsManagementRequired.md +1 -1
  89. package/docs/reference/functions/loadJsonFile.md +1 -1
  90. package/docs/reference/functions/loadTextFile.md +1 -1
  91. package/docs/reference/functions/processEnvOptions.md +1 -1
  92. package/docs/reference/functions/registerCommands.md +1 -1
  93. package/docs/reference/functions/shutdownExtensions.md +1 -1
  94. package/docs/reference/interfaces/ICliArgs.md +1 -1
  95. package/docs/reference/interfaces/ICliCommand.md +1 -1
  96. package/docs/reference/interfaces/ICliCommandDefinition.md +2 -2
  97. package/docs/reference/interfaces/ICliCommandDefinitionParam.md +1 -1
  98. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +0 -8
  99. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +8 -12
  100. package/docs/reference/interfaces/INodeEnvironmentVariables.md +12 -12
  101. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +2 -0
  102. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +2 -0
  103. package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +2 -0
  104. package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +2 -0
  105. package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +2 -0
  106. package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +2 -0
  107. package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +2 -0
  108. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_DID.md +2 -0
  109. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_TENANT.md +2 -0
  110. package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +2 -0
  111. package/docs/reference/variables/TRUST_VERIFICATION_METHOD_ID.md +2 -0
  112. package/locales/en.json +17 -9
  113. package/package.json +1 -1
@@ -62,6 +62,7 @@ export async function buildEngineConfiguration(envVars) {
62
62
  * Configures the entity storage.
63
63
  * @param coreConfig The core config.
64
64
  * @param envVars The environment variables.
65
+ * @returns A promise that resolves when the entity storage configuration has been applied.
65
66
  */
66
67
  async function configureEntityStorage(coreConfig, envVars) {
67
68
  coreConfig.types ??= {};
@@ -69,7 +70,8 @@ async function configureEntityStorage(coreConfig, envVars) {
69
70
  const entityStorageConnectorTypes = commaSeparatedListToArray(envVars.entityStorageConnectorType);
70
71
  if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.Memory)) {
71
72
  coreConfig.types.entityStorageConnector.push({
72
- type: EntityStorageConnectorType.Memory
73
+ type: EntityStorageConnectorType.Memory,
74
+ options: {}
73
75
  });
74
76
  }
75
77
  if (entityStorageConnectorTypes.includes(EntityStorageConnectorType.File)) {
@@ -199,6 +201,7 @@ async function configureEntityStorage(coreConfig, envVars) {
199
201
  * Configures the blob storage.
200
202
  * @param coreConfig The core config.
201
203
  * @param envVars The environment variables.
204
+ * @returns A promise that resolves when the blob storage configuration has been applied.
202
205
  */
203
206
  async function configureBlobStorage(coreConfig, envVars) {
204
207
  coreConfig.types.blobStorageConnector ??= [];
@@ -302,6 +305,7 @@ async function configureBlobStorage(coreConfig, envVars) {
302
305
  * Configures the logging.
303
306
  * @param coreConfig The core config.
304
307
  * @param envVars The environment variables.
308
+ * @returns A promise that resolves when the logging configuration has been applied.
305
309
  */
306
310
  async function configureLogging(coreConfig, envVars) {
307
311
  coreConfig.types.loggingConnector ??= [];
@@ -360,6 +364,7 @@ async function configureLogging(coreConfig, envVars) {
360
364
  * Configures the vault.
361
365
  * @param coreConfig The core config.
362
366
  * @param envVars The environment variables.
367
+ * @returns A promise that resolves when the vault configuration has been applied.
363
368
  */
364
369
  async function configureVault(coreConfig, envVars) {
365
370
  coreConfig.types.vaultConnector ??= [];
@@ -390,6 +395,7 @@ async function configureVault(coreConfig, envVars) {
390
395
  * Configures the background task.
391
396
  * @param coreConfig The core config.
392
397
  * @param envVars The environment variables.
398
+ * @returns A promise that resolves when the background task configuration has been applied.
393
399
  */
394
400
  async function configureBackgroundTask(coreConfig, envVars) {
395
401
  coreConfig.types.backgroundTaskComponent ??= [];
@@ -400,9 +406,10 @@ async function configureBackgroundTask(coreConfig, envVars) {
400
406
  }
401
407
  }
402
408
  /**
403
- * Configures the event bud.
409
+ * Configures the event bus.
404
410
  * @param coreConfig The core config.
405
411
  * @param envVars The environment variables.
412
+ * @returns A promise that resolves when the event bus configuration has been applied.
406
413
  */
407
414
  async function configureEventBus(coreConfig, envVars) {
408
415
  coreConfig.types.eventBusConnector ??= [];
@@ -420,6 +427,7 @@ async function configureEventBus(coreConfig, envVars) {
420
427
  * Configures the telemetry.
421
428
  * @param coreConfig The core config.
422
429
  * @param envVars The environment variables.
430
+ * @returns A promise that resolves when the telemetry configuration has been applied.
423
431
  */
424
432
  async function configureTelemetry(coreConfig, envVars) {
425
433
  coreConfig.types.telemetryConnector ??= [];
@@ -458,6 +466,7 @@ async function configureTelemetry(coreConfig, envVars) {
458
466
  * Configures the metrics producers and orchestrator service.
459
467
  * @param coreConfig The core config.
460
468
  * @param envVars The environment variables.
469
+ * @returns A promise that resolves when the metrics collector configuration has been applied.
461
470
  */
462
471
  async function configureMetricsCollector(coreConfig, envVars) {
463
472
  if (isTelemetryRequired(envVars)) {
@@ -483,6 +492,7 @@ async function configureMetricsCollector(coreConfig, envVars) {
483
492
  * Configures the automation.
484
493
  * @param coreConfig The core config.
485
494
  * @param envVars The environment variables.
495
+ * @returns A promise that resolves when the automation configuration has been applied.
486
496
  */
487
497
  async function configureAutomation(coreConfig, envVars) {
488
498
  coreConfig.types.automationComponent ??= [];
@@ -506,6 +516,7 @@ async function configureAutomation(coreConfig, envVars) {
506
516
  * Configures the health.
507
517
  * @param coreConfig The core config.
508
518
  * @param envVars The environment variables.
519
+ * @returns A promise that resolves when the health configuration has been applied.
509
520
  */
510
521
  async function configureHealth(coreConfig, envVars) {
511
522
  coreConfig.types.healthComponent ??= [];
@@ -525,6 +536,7 @@ async function configureHealth(coreConfig, envVars) {
525
536
  * Configures the platform.
526
537
  * @param coreConfig The core config.
527
538
  * @param envVars The environment variables.
539
+ * @returns A promise that resolves when the platform configuration has been applied.
528
540
  */
529
541
  async function configurePlatform(coreConfig, envVars) {
530
542
  const isTenantEnabled = Coerce.boolean(envVars.tenantEnabled) ?? false;
@@ -542,6 +554,7 @@ async function configurePlatform(coreConfig, envVars) {
542
554
  * Configures the tenant.
543
555
  * @param coreConfig The core config.
544
556
  * @param envVars The environment variables.
557
+ * @returns A promise that resolves when the tenant configuration has been applied.
545
558
  */
546
559
  async function configureTenant(coreConfig, envVars) {
547
560
  const isTenantEnabled = Coerce.boolean(envVars.tenantEnabled) ?? false;
@@ -553,9 +566,10 @@ async function configureTenant(coreConfig, envVars) {
553
566
  }
554
567
  }
555
568
  /**
556
- * Configures the context id handlers.
569
+ * Configures the context ID handlers.
557
570
  * @param coreConfig The core config.
558
571
  * @param envVars The environment variables.
572
+ * @returns A promise that resolves when the context ID handler configuration has been applied.
559
573
  */
560
574
  async function configureContextIdHandlers(coreConfig, envVars) {
561
575
  coreConfig.types.contextIdHandlerComponent ??= [];
@@ -574,6 +588,7 @@ async function configureContextIdHandlers(coreConfig, envVars) {
574
588
  * Configures the messaging.
575
589
  * @param coreConfig The core config.
576
590
  * @param envVars The environment variables.
591
+ * @returns A promise that resolves when the messaging configuration has been applied.
577
592
  */
578
593
  async function configureMessaging(coreConfig, envVars) {
579
594
  if (Coerce.boolean(envVars.messagingEnabled) ?? false) {
@@ -625,6 +640,16 @@ async function configureMessaging(coreConfig, envVars) {
625
640
  });
626
641
  }
627
642
  else if (envVars.messagingPushNotificationConnector === MessagingPushNotificationConnectorType.Aws) {
643
+ let messagingApps;
644
+ if (Is.stringValue(envVars.awsMessagingPushNotificationApplications)) {
645
+ try {
646
+ messagingApps = JSON.parse(envVars.awsMessagingPushNotificationApplications);
647
+ }
648
+ catch { }
649
+ }
650
+ else if (Is.array(envVars.awsMessagingPushNotificationApplications)) {
651
+ messagingApps = envVars.awsMessagingPushNotificationApplications;
652
+ }
628
653
  coreConfig.types.messagingPushNotificationConnector.push({
629
654
  type: MessagingPushNotificationConnectorType.Aws,
630
655
  options: {
@@ -634,9 +659,7 @@ async function configureMessaging(coreConfig, envVars) {
634
659
  accessKeyId: envVars.awsSesAccessKeyId,
635
660
  secretAccessKey: envVars.awsSesSecretAccessKey,
636
661
  endpoint: envVars.awsSesEndpoint,
637
- applicationsSettings: Is.array(envVars.awsMessagingPushNotificationApplications)
638
- ? JSON.parse(envVars.awsMessagingPushNotificationApplications)
639
- : []
662
+ applicationsSettings: messagingApps ?? []
640
663
  }
641
664
  }
642
665
  });
@@ -653,6 +676,7 @@ async function configureMessaging(coreConfig, envVars) {
653
676
  * Configures the faucet.
654
677
  * @param coreConfig The core config.
655
678
  * @param envVars The environment variables.
679
+ * @returns A promise that resolves when the faucet configuration has been applied.
656
680
  */
657
681
  async function configureFaucet(coreConfig, envVars) {
658
682
  coreConfig.types.faucetConnector ??= [];
@@ -679,6 +703,7 @@ async function configureFaucet(coreConfig, envVars) {
679
703
  * Configures the wallet.
680
704
  * @param coreConfig The core config.
681
705
  * @param envVars The environment variables.
706
+ * @returns A promise that resolves when the wallet configuration has been applied.
682
707
  */
683
708
  async function configureWallet(coreConfig, envVars) {
684
709
  coreConfig.types.walletConnector ??= [];
@@ -701,6 +726,7 @@ async function configureWallet(coreConfig, envVars) {
701
726
  * Configures the NFT.
702
727
  * @param coreConfig The core config.
703
728
  * @param envVars The environment variables.
729
+ * @returns A promise that resolves when the NFT configuration has been applied.
704
730
  */
705
731
  async function configureNft(coreConfig, envVars) {
706
732
  coreConfig.types.nftConnector ??= [];
@@ -731,6 +757,7 @@ async function configureNft(coreConfig, envVars) {
731
757
  * Configures the notarization.
732
758
  * @param coreConfig The core config.
733
759
  * @param envVars The environment variables.
760
+ * @returns A promise that resolves when the notarization configuration has been applied.
734
761
  */
735
762
  async function configureNotarization(coreConfig, envVars) {
736
763
  coreConfig.types.notarizationConnector ??= [];
@@ -757,6 +784,7 @@ async function configureNotarization(coreConfig, envVars) {
757
784
  * Configures the immutable proof.
758
785
  * @param coreConfig The core config.
759
786
  * @param envVars The environment variables.
787
+ * @returns A promise that resolves when the immutable proof configuration has been applied.
760
788
  */
761
789
  async function configureImmutableProof(coreConfig, envVars) {
762
790
  if (isImmutableProofRequired(envVars)) {
@@ -775,6 +803,7 @@ async function configureImmutableProof(coreConfig, envVars) {
775
803
  * Configures the identity.
776
804
  * @param coreConfig The core config.
777
805
  * @param envVars The environment variables.
806
+ * @returns A promise that resolves when the identity configuration has been applied.
778
807
  */
779
808
  async function configureIdentity(coreConfig, envVars) {
780
809
  coreConfig.types.identityConnector ??= [];
@@ -807,6 +836,7 @@ async function configureIdentity(coreConfig, envVars) {
807
836
  * Configures the identity resolver.
808
837
  * @param coreConfig The core config.
809
838
  * @param envVars The environment variables.
839
+ * @returns A promise that resolves when the identity resolver configuration has been applied.
810
840
  */
811
841
  async function configureIdentityResolver(coreConfig, envVars) {
812
842
  coreConfig.types.identityResolverConnector ??= [];
@@ -850,6 +880,7 @@ async function configureIdentityResolver(coreConfig, envVars) {
850
880
  * Configures the identity profile.
851
881
  * @param coreConfig The core config.
852
882
  * @param envVars The environment variables.
883
+ * @returns A promise that resolves when the identity profile configuration has been applied.
853
884
  */
854
885
  async function configureIdentityProfile(coreConfig, envVars) {
855
886
  coreConfig.types.identityProfileConnector ??= [];
@@ -867,6 +898,7 @@ async function configureIdentityProfile(coreConfig, envVars) {
867
898
  * Configures the attestation.
868
899
  * @param coreConfig The core config.
869
900
  * @param envVars The environment variables.
901
+ * @returns A promise that resolves when the attestation configuration has been applied.
870
902
  */
871
903
  async function configureAttestation(coreConfig, envVars) {
872
904
  coreConfig.types.attestationConnector ??= [];
@@ -891,6 +923,7 @@ async function configureAttestation(coreConfig, envVars) {
891
923
  * Configures the auditable item graph.
892
924
  * @param coreConfig The core config.
893
925
  * @param envVars The environment variables.
926
+ * @returns A promise that resolves when the auditable item graph configuration has been applied.
894
927
  */
895
928
  async function configureAuditableItemGraph(coreConfig, envVars) {
896
929
  if (Coerce.boolean(envVars.auditableItemGraphEnabled) ?? false) {
@@ -904,6 +937,7 @@ async function configureAuditableItemGraph(coreConfig, envVars) {
904
937
  * Configures the auditable item stream.
905
938
  * @param coreConfig The core config.
906
939
  * @param envVars The environment variables.
940
+ * @returns A promise that resolves when the auditable item stream configuration has been applied.
907
941
  */
908
942
  async function configureAuditableItemStream(coreConfig, envVars) {
909
943
  if (Coerce.boolean(envVars.auditableItemStreamEnabled) ?? false) {
@@ -917,6 +951,7 @@ async function configureAuditableItemStream(coreConfig, envVars) {
917
951
  * Configures the data processing.
918
952
  * @param coreConfig The core config.
919
953
  * @param envVars The environment variables.
954
+ * @returns A promise that resolves when the data processing configuration has been applied.
920
955
  */
921
956
  async function configureDataProcessing(coreConfig, envVars) {
922
957
  if (Coerce.boolean(envVars.dataProcessingEnabled) ?? false) {
@@ -942,6 +977,7 @@ async function configureDataProcessing(coreConfig, envVars) {
942
977
  * Configures the document management.
943
978
  * @param coreConfig The core config.
944
979
  * @param envVars The environment variables.
980
+ * @returns A promise that resolves when the document management configuration has been applied.
945
981
  */
946
982
  async function configureDocumentManagement(coreConfig, envVars) {
947
983
  if (Coerce.boolean(envVars.documentManagementEnabled) ?? false) {
@@ -955,6 +991,7 @@ async function configureDocumentManagement(coreConfig, envVars) {
955
991
  * Configures the trust components.
956
992
  * @param coreConfig The core config.
957
993
  * @param envVars The environment variables.
994
+ * @returns A promise that resolves when the trust configuration has been applied.
958
995
  */
959
996
  async function configureTrust(coreConfig, envVars) {
960
997
  if (isTrustRequired(envVars)) {
@@ -1002,6 +1039,7 @@ async function configureTrust(coreConfig, envVars) {
1002
1039
  * Configures the rights management.
1003
1040
  * @param coreConfig The core config.
1004
1041
  * @param envVars The environment variables.
1042
+ * @returns A promise that resolves when the rights management configuration has been applied.
1005
1043
  */
1006
1044
  async function configureRightsManagement(coreConfig, envVars) {
1007
1045
  if (isRightsManagementRequired(envVars)) {
@@ -1115,6 +1153,7 @@ async function configureRightsManagement(coreConfig, envVars) {
1115
1153
  * Configures the task scheduler.
1116
1154
  * @param coreConfig The core config.
1117
1155
  * @param envVars The environment variables.
1156
+ * @returns A promise that resolves when the task scheduler configuration has been applied.
1118
1157
  */
1119
1158
  async function configureTaskScheduler(coreConfig, envVars) {
1120
1159
  if (isTaskSchedulerRequired(envVars)) {
@@ -1128,6 +1167,7 @@ async function configureTaskScheduler(coreConfig, envVars) {
1128
1167
  * Configures the federated catalogue.
1129
1168
  * @param coreConfig The core config.
1130
1169
  * @param envVars The environment variables.
1170
+ * @returns A promise that resolves when the federated catalogue configuration has been applied.
1131
1171
  */
1132
1172
  async function configureFederatedCatalogue(coreConfig, envVars) {
1133
1173
  if (isFederatedCatalogueRequired(envVars)) {
@@ -1160,6 +1200,7 @@ async function configureFederatedCatalogue(coreConfig, envVars) {
1160
1200
  * Configures the dataspace control plane and data plane.
1161
1201
  * @param coreConfig The core config.
1162
1202
  * @param envVars The environment variables.
1203
+ * @returns A promise that resolves when the dataspace configuration has been applied.
1163
1204
  */
1164
1205
  async function configureDataspace(coreConfig, envVars) {
1165
1206
  if (Coerce.boolean(envVars.dataspaceEnabled) ?? false) {
@@ -1198,6 +1239,7 @@ async function configureDataspace(coreConfig, envVars) {
1198
1239
  * Configures the DLT.
1199
1240
  * @param coreConfig The core config.
1200
1241
  * @param envVars The environment variables.
1242
+ * @returns A promise that resolves when the DLT configuration has been applied.
1201
1243
  */
1202
1244
  async function configureDlt(coreConfig, envVars) {
1203
1245
  // Create centralized DLT configuration for IOTA if essential IOTA variables are set
@@ -1269,10 +1311,10 @@ export function isImmutableProofRequired(envVars) {
1269
1311
  (Coerce.boolean(envVars.documentManagementEnabled) ?? false));
1270
1312
  }
1271
1313
  /**
1272
- * Checks if the immutable proof subsystem is required.
1273
- * Returns true when any component that depends on the immutable proof subsystem is enabled.
1314
+ * Checks if the federated catalogue subsystem is required.
1315
+ * Returns true when the catalogue is explicitly enabled, a remote endpoint is configured, filters are set, or dataspace is enabled.
1274
1316
  * @param envVars The environment variables.
1275
- * @returns True if verifiable storage is enabled.
1317
+ * @returns True if the federated catalogue is required.
1276
1318
  */
1277
1319
  export function isFederatedCatalogueRequired(envVars) {
1278
1320
  return ((Coerce.boolean(envVars.federatedCatalogueEnabled) ?? false) ||
@@ -1283,7 +1325,7 @@ export function isFederatedCatalogueRequired(envVars) {
1283
1325
  /**
1284
1326
  * Checks if the rights management subsystem is required.
1285
1327
  * Returns true when any component that depends on the rights management subsystem is enabled.
1286
- * Note: rights management has no standalone enable flag it is gated entirely on
1328
+ * Note: rights management has no standalone enable flag - it is gated entirely on
1287
1329
  * `dataspaceEnabled`. Setting `TWIN_RIGHTS_MANAGEMENT_*` env var in isolation does not
1288
1330
  * enable the subsystem; `TWIN_DATASPACE_ENABLED` must also be true.
1289
1331
  * @param envVars The environment variables.