@aloma.io/integration-sdk 3.8.63 → 3.8.64
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.
|
@@ -158,7 +158,9 @@ export class OpenAPIToConnector {
|
|
|
158
158
|
// Extract the last part after underscore if it exists
|
|
159
159
|
const parts = cleaned.split('_');
|
|
160
160
|
if (parts.length > 1) {
|
|
161
|
-
|
|
161
|
+
let lastPart = parts[parts.length - 1];
|
|
162
|
+
// Convert hyphens to camelCase before testing
|
|
163
|
+
lastPart = lastPart.replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
|
|
162
164
|
// If the last part looks like a method name (camelCase), use it
|
|
163
165
|
if (lastPart && /^[a-z][a-zA-Z0-9]*$/.test(lastPart)) {
|
|
164
166
|
cleaned = lastPart;
|
|
@@ -198,7 +200,7 @@ export class OpenAPIToConnector {
|
|
|
198
200
|
.filter((p) => p.toLowerCase() !== baseName.toLowerCase());
|
|
199
201
|
// Use the last path segment before the method name as a distinguishing prefix
|
|
200
202
|
if (pathParts.length > 0) {
|
|
201
|
-
const prefix = pathParts[pathParts.length - 1];
|
|
203
|
+
const prefix = pathParts[pathParts.length - 1].replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
|
|
202
204
|
const capitalizedBase = baseName.charAt(0).toUpperCase() + baseName.slice(1);
|
|
203
205
|
return `${prefix}${capitalizedBase}`;
|
|
204
206
|
}
|
package/package.json
CHANGED
|
@@ -197,7 +197,9 @@ export class OpenAPIToConnector {
|
|
|
197
197
|
// Extract the last part after underscore if it exists
|
|
198
198
|
const parts = cleaned.split('_');
|
|
199
199
|
if (parts.length > 1) {
|
|
200
|
-
|
|
200
|
+
let lastPart = parts[parts.length - 1];
|
|
201
|
+
// Convert hyphens to camelCase before testing
|
|
202
|
+
lastPart = lastPart.replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
|
|
201
203
|
// If the last part looks like a method name (camelCase), use it
|
|
202
204
|
if (lastPart && /^[a-z][a-zA-Z0-9]*$/.test(lastPart)) {
|
|
203
205
|
cleaned = lastPart;
|
|
@@ -244,7 +246,7 @@ export class OpenAPIToConnector {
|
|
|
244
246
|
|
|
245
247
|
// Use the last path segment before the method name as a distinguishing prefix
|
|
246
248
|
if (pathParts.length > 0) {
|
|
247
|
-
const prefix = pathParts[pathParts.length - 1];
|
|
249
|
+
const prefix = pathParts[pathParts.length - 1].replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
|
|
248
250
|
const capitalizedBase = baseName.charAt(0).toUpperCase() + baseName.slice(1);
|
|
249
251
|
return `${prefix}${capitalizedBase}`;
|
|
250
252
|
}
|