@twin.org/node-core 0.0.2-next.19 → 0.0.2-next.20

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.
@@ -936,39 +936,41 @@ async function configureBlobStorage(coreConfig, envVars) {
936
936
  */
937
937
  async function configureLogging(coreConfig, envVars) {
938
938
  coreConfig.types.loggingConnector ??= [];
939
- const loggingConnectors = (envVars.loggingConnector ?? "").split(",");
940
- for (const loggingConnector of loggingConnectors) {
939
+ const loggingConnectorTypes = (envVars.loggingConnector ?? "").split(",");
940
+ let additionalConnectorCount = 0;
941
+ for (const loggingConnector of loggingConnectorTypes) {
941
942
  if (loggingConnector === engineTypes.LoggingConnectorType.Console) {
942
- coreConfig.types.loggingConnector?.push({
943
+ coreConfig.types.loggingConnector.push({
943
944
  type: engineTypes.LoggingConnectorType.Console,
944
945
  options: {
945
946
  config: {
946
947
  translateMessages: true,
947
948
  hideGroups: true
948
949
  }
949
- },
950
- isDefault: loggingConnectors.length === 1
950
+ }
951
951
  });
952
+ additionalConnectorCount++;
952
953
  }
953
954
  else if (loggingConnector === engineTypes.LoggingConnectorType.EntityStorage) {
954
- coreConfig.types.loggingConnector?.push({
955
- type: engineTypes.LoggingConnectorType.EntityStorage,
956
- isDefault: loggingConnectors.length === 1
955
+ coreConfig.types.loggingConnector.push({
956
+ type: engineTypes.LoggingConnectorType.EntityStorage
957
957
  });
958
+ additionalConnectorCount++;
958
959
  }
959
960
  }
960
- if (loggingConnectors.length > 1) {
961
+ if (additionalConnectorCount > 1) {
961
962
  coreConfig.types.loggingConnector?.push({
962
963
  type: engineTypes.LoggingConnectorType.Multi,
963
- isDefault: true,
964
964
  options: {
965
- loggingConnectorTypes: loggingConnectors
965
+ loggingConnectorTypes
966
966
  }
967
967
  });
968
968
  }
969
- if (loggingConnectors.length > 0) {
969
+ if (additionalConnectorCount > 0) {
970
970
  coreConfig.types.loggingComponent ??= [];
971
- coreConfig.types.loggingComponent.push({ type: engineTypes.LoggingComponentType.Service });
971
+ // We set the isDefault flag so that other components will get this service by default
972
+ // and not the generic one from the engine core
973
+ coreConfig.types.loggingComponent.push({ type: engineTypes.LoggingComponentType.Service, isDefault: true });
972
974
  }
973
975
  }
974
976
  /**
@@ -1982,7 +1984,7 @@ async function run(nodeOptions) {
1982
1984
  nodeOptions ??= {};
1983
1985
  const serverInfo = {
1984
1986
  name: nodeOptions?.serverName ?? "TWIN Node Server",
1985
- version: nodeOptions?.serverVersion ?? "0.0.2-next.19" // x-release-please-version
1987
+ version: nodeOptions?.serverVersion ?? "0.0.2-next.20" // x-release-please-version
1986
1988
  };
1987
1989
  cliCore.CLIDisplay.header(serverInfo.name, serverInfo.version, "đŸŒŠī¸ ");
1988
1990
  if (!core.Is.stringValue(nodeOptions?.executionDirectory)) {
@@ -915,39 +915,41 @@ async function configureBlobStorage(coreConfig, envVars) {
915
915
  */
916
916
  async function configureLogging(coreConfig, envVars) {
917
917
  coreConfig.types.loggingConnector ??= [];
918
- const loggingConnectors = (envVars.loggingConnector ?? "").split(",");
919
- for (const loggingConnector of loggingConnectors) {
918
+ const loggingConnectorTypes = (envVars.loggingConnector ?? "").split(",");
919
+ let additionalConnectorCount = 0;
920
+ for (const loggingConnector of loggingConnectorTypes) {
920
921
  if (loggingConnector === LoggingConnectorType.Console) {
921
- coreConfig.types.loggingConnector?.push({
922
+ coreConfig.types.loggingConnector.push({
922
923
  type: LoggingConnectorType.Console,
923
924
  options: {
924
925
  config: {
925
926
  translateMessages: true,
926
927
  hideGroups: true
927
928
  }
928
- },
929
- isDefault: loggingConnectors.length === 1
929
+ }
930
930
  });
931
+ additionalConnectorCount++;
931
932
  }
932
933
  else if (loggingConnector === LoggingConnectorType.EntityStorage) {
933
- coreConfig.types.loggingConnector?.push({
934
- type: LoggingConnectorType.EntityStorage,
935
- isDefault: loggingConnectors.length === 1
934
+ coreConfig.types.loggingConnector.push({
935
+ type: LoggingConnectorType.EntityStorage
936
936
  });
937
+ additionalConnectorCount++;
937
938
  }
938
939
  }
939
- if (loggingConnectors.length > 1) {
940
+ if (additionalConnectorCount > 1) {
940
941
  coreConfig.types.loggingConnector?.push({
941
942
  type: LoggingConnectorType.Multi,
942
- isDefault: true,
943
943
  options: {
944
- loggingConnectorTypes: loggingConnectors
944
+ loggingConnectorTypes
945
945
  }
946
946
  });
947
947
  }
948
- if (loggingConnectors.length > 0) {
948
+ if (additionalConnectorCount > 0) {
949
949
  coreConfig.types.loggingComponent ??= [];
950
- coreConfig.types.loggingComponent.push({ type: LoggingComponentType.Service });
950
+ // We set the isDefault flag so that other components will get this service by default
951
+ // and not the generic one from the engine core
952
+ coreConfig.types.loggingComponent.push({ type: LoggingComponentType.Service, isDefault: true });
951
953
  }
952
954
  }
953
955
  /**
@@ -1961,7 +1963,7 @@ async function run(nodeOptions) {
1961
1963
  nodeOptions ??= {};
1962
1964
  const serverInfo = {
1963
1965
  name: nodeOptions?.serverName ?? "TWIN Node Server",
1964
- version: nodeOptions?.serverVersion ?? "0.0.2-next.19" // x-release-please-version
1966
+ version: nodeOptions?.serverVersion ?? "0.0.2-next.20" // x-release-please-version
1965
1967
  };
1966
1968
  CLIDisplay.header(serverInfo.name, serverInfo.version, "đŸŒŠī¸ ");
1967
1969
  if (!Is.stringValue(nodeOptions?.executionDirectory)) {
package/docs/changelog.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @twin.org/node-core - Changelog
2
2
 
3
+ ## [0.0.2-next.20](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.19...node-core-v0.0.2-next.20) (2025-10-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * improve node logging ([63d6ea6](https://github.com/twinfoundation/node/commit/63d6ea661c2c76985d98addb8d905ad6f0c7f164))
9
+ * improve node logging ([c25b9c6](https://github.com/twinfoundation/node/commit/c25b9c6779bdb76f341df072c39b4c2fae4565a3))
10
+
3
11
  ## [0.0.2-next.19](https://github.com/twinfoundation/node/compare/node-core-v0.0.2-next.18...node-core-v0.0.2-next.19) (2025-10-03)
4
12
 
5
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/node-core",
3
- "version": "0.0.2-next.19",
3
+ "version": "0.0.2-next.20",
4
4
  "description": "TWIN Node Core for serving APIs using the specified configuration",
5
5
  "repository": {
6
6
  "type": "git",