@twin.org/tools-core 0.0.2-next.2 → 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.
@@ -72,18 +72,21 @@ class JsonSchemaHelper {
72
72
  */
73
73
  static normaliseTypeName(typeName) {
74
74
  // Remove the partial markers
75
- let sTypeName = typeName.replace(/^Partial<(.*?)>/g, "$1");
75
+ let sTypeName = typeName.replace(/^Partial<I(.*?)>/g, "$1");
76
76
  sTypeName = sTypeName.replace(/Partial%3CI(.*?)%3E/g, "$1");
77
77
  // Remove the omit markers
78
- sTypeName = sTypeName.replace(/^Omit<(.*?),.*>/g, "$1");
78
+ sTypeName = sTypeName.replace(/^Omit<I(.*?),.*>/g, "$1");
79
79
  sTypeName = sTypeName.replace(/Omit%3CI(.*?)%2C.*%3E/g, "$1");
80
80
  // Remove the pick markers
81
- sTypeName = sTypeName.replace(/^Pick<(.*?),.*>/g, "$1");
81
+ sTypeName = sTypeName.replace(/^Pick<I(.*?),.*>/g, "$1");
82
82
  sTypeName = sTypeName.replace(/Pick%3CI(.*?)%2C.*%3E/g, "$1");
83
+ // Cleanup the generic markers
84
+ sTypeName = sTypeName.replace(/^(.*?)<I(.*?)>/g, "$1<$2>");
85
+ sTypeName = sTypeName.replace(/(.*?)%3CI(.*?)%3E/g, "$1<$2>");
83
86
  // Cleanup the unknown markers
84
87
  sTypeName = sTypeName.replace(/<unknown>/g, "");
85
88
  sTypeName = sTypeName.replace(/%3Cunknown%3E/g, "");
86
- // Replace the generic markers with the base URL
89
+ // Replace the other url markers
87
90
  sTypeName = sTypeName.replace(/%7C/g, "|").replace(/%3C/g, "<").replace(/%3E/g, ">");
88
91
  return sTypeName;
89
92
  }
@@ -70,18 +70,21 @@ class JsonSchemaHelper {
70
70
  */
71
71
  static normaliseTypeName(typeName) {
72
72
  // Remove the partial markers
73
- let sTypeName = typeName.replace(/^Partial<(.*?)>/g, "$1");
73
+ let sTypeName = typeName.replace(/^Partial<I(.*?)>/g, "$1");
74
74
  sTypeName = sTypeName.replace(/Partial%3CI(.*?)%3E/g, "$1");
75
75
  // Remove the omit markers
76
- sTypeName = sTypeName.replace(/^Omit<(.*?),.*>/g, "$1");
76
+ sTypeName = sTypeName.replace(/^Omit<I(.*?),.*>/g, "$1");
77
77
  sTypeName = sTypeName.replace(/Omit%3CI(.*?)%2C.*%3E/g, "$1");
78
78
  // Remove the pick markers
79
- sTypeName = sTypeName.replace(/^Pick<(.*?),.*>/g, "$1");
79
+ sTypeName = sTypeName.replace(/^Pick<I(.*?),.*>/g, "$1");
80
80
  sTypeName = sTypeName.replace(/Pick%3CI(.*?)%2C.*%3E/g, "$1");
81
+ // Cleanup the generic markers
82
+ sTypeName = sTypeName.replace(/^(.*?)<I(.*?)>/g, "$1<$2>");
83
+ sTypeName = sTypeName.replace(/(.*?)%3CI(.*?)%3E/g, "$1<$2>");
81
84
  // Cleanup the unknown markers
82
85
  sTypeName = sTypeName.replace(/<unknown>/g, "");
83
86
  sTypeName = sTypeName.replace(/%3Cunknown%3E/g, "");
84
- // Replace the generic markers with the base URL
87
+ // Replace the other url markers
85
88
  sTypeName = sTypeName.replace(/%7C/g, "|").replace(/%3C/g, "<").replace(/%3E/g, ">");
86
89
  return sTypeName;
87
90
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.2-next.3](https://github.com/twinfoundation/tools/compare/tools-core-v0.0.2-next.2...tools-core-v0.0.2-next.3) (2025-08-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * improve type name normalisation ([1fe28e5](https://github.com/twinfoundation/tools/commit/1fe28e567593e46a41a833fbba95fe4cd958f525))
9
+
3
10
  ## [0.0.2-next.2](https://github.com/twinfoundation/tools/compare/tools-core-v0.0.2-next.1...tools-core-v0.0.2-next.2) (2025-07-17)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/tools-core",
3
- "version": "0.0.2-next.2",
3
+ "version": "0.0.2-next.3",
4
4
  "description": "Shared components for the tools",
5
5
  "repository": {
6
6
  "type": "git",