gtx-cli 2.1.5-alpha.6 → 2.1.5-alpha.7

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.
@@ -235,7 +235,7 @@ function transformMdxUrls(mdxContent, defaultLocale, targetLocale, hideDefaultLo
235
235
  return {
236
236
  content: mdxContent,
237
237
  hasChanges: false,
238
- transformedUrls: [],
238
+ transformedUrls,
239
239
  };
240
240
  }
241
241
  // Helper function to transform URL based on pattern
@@ -249,6 +249,14 @@ function transformMdxUrls(mdxContent, defaultLocale, targetLocale, hideDefaultLo
249
249
  // Get everything after the base domain
250
250
  const afterDomain = originalUrl.substring(baseDomain.length);
251
251
  const transformedPath = transformUrlPath(afterDomain, patternHead, targetLocale, defaultLocale, hideDefaultLocale);
252
+ if (!transformedPath) {
253
+ return null;
254
+ }
255
+ transformedUrls.push({
256
+ originalPath: originalUrl,
257
+ newPath: transformedPath,
258
+ type: linkType,
259
+ });
252
260
  return transformedPath ? baseDomain + transformedPath : null;
253
261
  }
254
262
  // Exclude colon-prefixed URLs (http://, https://, //, etc.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtx-cli",
3
- "version": "2.1.5-alpha.6",
3
+ "version": "2.1.5-alpha.7",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "files": [