gtx-cli 2.6.16 → 2.6.17

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # gtx-cli
2
2
 
3
+ ## 2.6.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1005](https://github.com/generaltranslation/gt/pull/1005) [`ca125b3`](https://github.com/generaltranslation/gt/commit/ca125b3212675b27fa756b8cad80b7a1f21f8306) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Add handling of `openapi` field in group nodes for Mintlify docs
8
+
3
9
  ## 2.6.16
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "2.6.16";
1
+ export declare const PACKAGE_VERSION = "2.6.17";
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
- export const PACKAGE_VERSION = '2.6.16';
2
+ export const PACKAGE_VERSION = '2.6.17';
@@ -152,8 +152,16 @@ function rewriteDocsJsonOpenApi(content, filePath, localeHint, specs, fileMappin
152
152
  if (typeof node.language === 'string') {
153
153
  nextLocale = node.language;
154
154
  }
155
- if (isRecord(node.openapi) && Array.isArray(node.pages)) {
156
- const locale = nextLocale || localeHint || defaultLocale;
155
+ const locale = nextLocale || localeHint || defaultLocale;
156
+ if (typeof node.openapi === 'string') {
157
+ const sourceValue = node.openapi;
158
+ const localizedSource = localizeDocsJsonSpecPath(sourceValue, locale, filePath, specs, fileMappingAbs, fileMappingRel, warnings, configDir);
159
+ if (localizedSource && localizedSource !== sourceValue) {
160
+ node.openapi = localizedSource;
161
+ changed = true;
162
+ }
163
+ }
164
+ else if (isRecord(node.openapi)) {
157
165
  const openapiConfig = node.openapi;
158
166
  const sourceValue = openapiConfig.source;
159
167
  if (typeof sourceValue === 'string') {
@@ -163,6 +171,8 @@ function rewriteDocsJsonOpenApi(content, filePath, localeHint, specs, fileMappin
163
171
  changed = true;
164
172
  }
165
173
  }
174
+ }
175
+ if (Array.isArray(node.pages)) {
166
176
  const pages = node.pages;
167
177
  for (let i = 0; i < pages.length; i += 1) {
168
178
  const page = pages[i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtx-cli",
3
- "version": "2.6.16",
3
+ "version": "2.6.17",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "files": [