@twin.org/node-core 0.0.2-next.23 → 0.0.2-next.25

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.
@@ -959,14 +959,22 @@ async function configureLogging(coreConfig, envVars) {
959
959
  additionalConnectorCount++;
960
960
  }
961
961
  }
962
+ // If more than one logging connector, then we need to add a multi connector
963
+ // and set it as the default one
962
964
  if (additionalConnectorCount > 1) {
963
- coreConfig.types.loggingConnector?.push({
965
+ coreConfig.types.loggingConnector.push({
964
966
  type: engineTypes.LoggingConnectorType.Multi,
965
967
  options: {
966
968
  loggingConnectorTypes
967
- }
969
+ },
970
+ isDefault: true
968
971
  });
969
972
  }
973
+ else if (additionalConnectorCount > 0) {
974
+ // If only one connector, then we set it as the default one
975
+ coreConfig.types.loggingConnector[coreConfig.types.loggingConnector.length - 1].isDefault =
976
+ true;
977
+ }
970
978
  if (additionalConnectorCount > 0) {
971
979
  coreConfig.types.loggingComponent ??= [];
972
980
  // We set the isDefault flag so that other components will get this service by default
@@ -1507,7 +1515,7 @@ async function configureRightsManagement(coreConfig, envVars) {
1507
1515
  offers: core.Is.arrayValue(envVars.rightsManagementOffers)
1508
1516
  ? envVars.rightsManagementOffers
1509
1517
  : [],
1510
- negotiationComponentCreator: async (url) => new rightsManagementRestClient.PolicyNegotiationPointClient({ endpoint: url })
1518
+ negotiationComponentCreator: async (url) => new rightsManagementRestClient.PolicyNegotiationPointRestClient({ endpoint: url })
1511
1519
  }
1512
1520
  }
1513
1521
  });
@@ -1524,7 +1532,7 @@ async function configureRightsManagement(coreConfig, envVars) {
1524
1532
  type: engineTypes.RightsManagementDarpComponentType.Service,
1525
1533
  options: {
1526
1534
  config: {
1527
- dataAccessComponentCreator: async (url) => new rightsManagementRestClient.DataAccessPointClient({ endpoint: url })
1535
+ dataAccessComponentCreator: async (url) => new rightsManagementRestClient.DataAccessPointRestClient({ endpoint: url })
1528
1536
  }
1529
1537
  }
1530
1538
  });
@@ -1986,7 +1994,7 @@ async function run(nodeOptions) {
1986
1994
  nodeOptions ??= {};
1987
1995
  const serverInfo = {
1988
1996
  name: nodeOptions?.serverName ?? "TWIN Node Server",
1989
- version: nodeOptions?.serverVersion ?? "0.0.2-next.23" // x-release-please-version
1997
+ version: nodeOptions?.serverVersion ?? "0.0.2-next.25" // x-release-please-version
1990
1998
  };
1991
1999
  cliCore.CLIDisplay.header(serverInfo.name, serverInfo.version, "đŸŒŠī¸ ");
1992
2000
  if (!core.Is.stringValue(nodeOptions?.executionDirectory)) {
@@ -10,7 +10,7 @@ import { WalletConnectorFactory } from '@twin.org/wallet-models';
10
10
  import { readFile, stat, readdir } from 'node:fs/promises';
11
11
  import path from 'node:path';
12
12
  import { CLIDisplay } from '@twin.org/cli-core';
13
- import { PolicyNegotiationPointClient, DataAccessPointClient } from '@twin.org/rights-management-rest-client';
13
+ import { PolicyNegotiationPointRestClient, DataAccessPointRestClient } from '@twin.org/rights-management-rest-client';
14
14
  import { addDefaultRestPaths, addDefaultSocketPaths, EngineServer } from '@twin.org/engine-server';
15
15
  import { ModuleHelper } from '@twin.org/modules';
16
16
  import { execSync } from 'node:child_process';
@@ -938,14 +938,22 @@ async function configureLogging(coreConfig, envVars) {
938
938
  additionalConnectorCount++;
939
939
  }
940
940
  }
941
+ // If more than one logging connector, then we need to add a multi connector
942
+ // and set it as the default one
941
943
  if (additionalConnectorCount > 1) {
942
- coreConfig.types.loggingConnector?.push({
944
+ coreConfig.types.loggingConnector.push({
943
945
  type: LoggingConnectorType.Multi,
944
946
  options: {
945
947
  loggingConnectorTypes
946
- }
948
+ },
949
+ isDefault: true
947
950
  });
948
951
  }
952
+ else if (additionalConnectorCount > 0) {
953
+ // If only one connector, then we set it as the default one
954
+ coreConfig.types.loggingConnector[coreConfig.types.loggingConnector.length - 1].isDefault =
955
+ true;
956
+ }
949
957
  if (additionalConnectorCount > 0) {
950
958
  coreConfig.types.loggingComponent ??= [];
951
959
  // We set the isDefault flag so that other components will get this service by default
@@ -1486,7 +1494,7 @@ async function configureRightsManagement(coreConfig, envVars) {
1486
1494
  offers: Is.arrayValue(envVars.rightsManagementOffers)
1487
1495
  ? envVars.rightsManagementOffers
1488
1496
  : [],
1489
- negotiationComponentCreator: async (url) => new PolicyNegotiationPointClient({ endpoint: url })
1497
+ negotiationComponentCreator: async (url) => new PolicyNegotiationPointRestClient({ endpoint: url })
1490
1498
  }
1491
1499
  }
1492
1500
  });
@@ -1503,7 +1511,7 @@ async function configureRightsManagement(coreConfig, envVars) {
1503
1511
  type: RightsManagementDarpComponentType.Service,
1504
1512
  options: {
1505
1513
  config: {
1506
- dataAccessComponentCreator: async (url) => new DataAccessPointClient({ endpoint: url })
1514
+ dataAccessComponentCreator: async (url) => new DataAccessPointRestClient({ endpoint: url })
1507
1515
  }
1508
1516
  }
1509
1517
  });
@@ -1965,7 +1973,7 @@ async function run(nodeOptions) {
1965
1973
  nodeOptions ??= {};
1966
1974
  const serverInfo = {
1967
1975
  name: nodeOptions?.serverName ?? "TWIN Node Server",
1968
- version: nodeOptions?.serverVersion ?? "0.0.2-next.23" // x-release-please-version
1976
+ version: nodeOptions?.serverVersion ?? "0.0.2-next.25" // x-release-please-version
1969
1977
  };
1970
1978
  CLIDisplay.header(serverInfo.name, serverInfo.version, "đŸŒŠī¸ ");
1971
1979
  if (!Is.stringValue(nodeOptions?.executionDirectory)) {
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @twin.org/node-core - Changelog
2
2
 
3
+ ## [0.0.2-next.25](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.24...node-core-v0.0.2-next.25) (2025-10-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * add validate-locales ([1a19dcb](https://github.com/twinfoundation/node/commit/1a19dcb005c2f0e3103e290db28c48a3464094cb))
9
+
10
+ ## [0.0.2-next.24](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.23...node-core-v0.0.2-next.24) (2025-10-08)
11
+
12
+
13
+ ### Features
14
+
15
+ * add isDefault flag to logging connectors ([358e839](https://github.com/twinfoundation/node/commit/358e8394819dab9832d3a9ebfac74b897b7d5f40))
16
+
3
17
  ## [0.0.2-next.23](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.22...node-core-v0.0.2-next.23) (2025-10-07)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/node-core",
3
- "version": "0.0.2-next.23",
3
+ "version": "0.0.2-next.25",
4
4
  "description": "TWIN Node Core for serving APIs using the specified configuration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  "@twin.org/standards-w3c-odrl": "next",
34
34
  "@twin.org/vault-models": "next",
35
35
  "@twin.org/wallet-models": "next",
36
- "dotenv": "17.2.2",
36
+ "dotenv": "17.2.3",
37
37
  "schema-dts": "1.1.5"
38
38
  },
39
39
  "main": "./dist/cjs/index.cjs",
@@ -64,5 +64,9 @@
64
64
  "core",
65
65
  "foundation",
66
66
  "utilities"
67
- ]
67
+ ],
68
+ "bugs": {
69
+ "url": "git+https://github.com/twinfoundation/node/issues"
70
+ },
71
+ "homepage": "https://twindev.org"
68
72
  }