gtx-cli 2.6.1 → 2.6.2

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,13 @@
1
1
  # gtx-cli
2
2
 
3
+ ## 2.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#964](https://github.com/generaltranslation/gt/pull/964) [`e0da677`](https://github.com/generaltranslation/gt/commit/e0da677827434c5bfda945557f643c4468a2dac6) Thanks [@pie575](https://github.com/pie575)! - Refactor parseJSX and parseStringFunction
8
+
9
+ - [#966](https://github.com/generaltranslation/gt/pull/966) [`f446e01`](https://github.com/generaltranslation/gt/commit/f446e01754671d3586feb811c036d317a8693039) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Add config flag to filter Mintlify files based on `docs.json` pages
10
+
3
11
  ## 2.6.1
4
12
 
5
13
  ### Patch Changes
@@ -12,6 +12,7 @@ import chalk from 'chalk';
12
12
  import { resolveConfig } from './resolveConfig.js';
13
13
  import { gt } from '../utils/gt.js';
14
14
  import { generatePreset } from './optionPresets.js';
15
+ import { applyMintlifyDocsJsonFilter } from '../utils/mintlifyDocsJson.js';
15
16
  export const DEFAULT_SRC_PATTERNS = [
16
17
  'src/**/*.{js,jsx,ts,tsx}',
17
18
  'app/**/*.{js,jsx,ts,tsx}',
@@ -118,6 +119,11 @@ export async function generateSettings(flags, cwd = process.cwd()) {
118
119
  : { resolvedPaths: {}, placeholderPaths: {}, transformPaths: {} };
119
120
  mergedOptions.options = {
120
121
  ...(mergedOptions.options || {}),
122
+ mintlify: {
123
+ ...(mergedOptions.options?.mintlify || {}),
124
+ useDocsJsonNavigation: gtConfig.options?.mintlify?.useDocsJsonNavigation ||
125
+ mergedOptions.options?.mintlify?.useDocsJsonNavigation,
126
+ },
121
127
  experimentalLocalizeStaticImports: gtConfig.options?.experimentalLocalizeStaticImports ||
122
128
  flags.experimentalLocalizeStaticImports,
123
129
  experimentalLocalizeStaticUrls: gtConfig.options?.experimentalLocalizeStaticUrls ||
@@ -130,6 +136,7 @@ export async function generateSettings(flags, cwd = process.cwd()) {
130
136
  flags.experimentalClearLocaleDirs,
131
137
  clearLocaleDirsExclude: gtConfig.options?.clearLocaleDirsExclude || flags.clearLocaleDirsExclude,
132
138
  };
139
+ applyMintlifyDocsJsonFilter(mergedOptions, cwd);
133
140
  // Add additional options if provided
134
141
  if (mergedOptions.options) {
135
142
  if (mergedOptions.options.jsonSchema) {
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "2.6.1";
1
+ export declare const PACKAGE_VERSION = "2.6.2";
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
- export const PACKAGE_VERSION = '2.6.1';
2
+ export const PACKAGE_VERSION = '2.6.2';
@@ -3,18 +3,31 @@ import { ParsingConfigOptions } from '../../../../types/parsing.js';
3
3
  import traverseModule from '@babel/traverse';
4
4
  import { GTLibrary } from '../constants.js';
5
5
  /**
6
- * Entry point for JSX parsing
6
+ * Immutable configuration options for parsing.
7
7
  */
8
- export declare function parseTranslationComponent({ originalName, importAliases, localName, path, updates, errors, warnings, file, parsingOptions, pkgs, }: {
9
- ast: any;
8
+ type ConfigOptions = {
9
+ parsingOptions: ParsingConfigOptions;
10
+ importAliases: Record<string, string>;
10
11
  pkgs: GTLibrary[];
12
+ file: string;
13
+ };
14
+ /**
15
+ * Collectors for errors, warnings, and unwrapped expressions.
16
+ */
17
+ type OutputCollector = {
18
+ errors: string[];
19
+ warnings: Set<string>;
20
+ unwrappedExpressions: string[];
21
+ };
22
+ /**
23
+ * Entry point for JSX parsing
24
+ */
25
+ export declare function parseTranslationComponent({ originalName, localName, path, updates, config, output, }: {
11
26
  originalName: string;
12
- importAliases: Record<string, string>;
13
- path: traverseModule.NodePath<traverseModule.Node>;
14
27
  localName: string;
28
+ path: traverseModule.NodePath<traverseModule.Node>;
15
29
  updates: Updates;
16
- errors: string[];
17
- warnings: Set<string>;
18
- file: string;
19
- parsingOptions: ParsingConfigOptions;
30
+ config: ConfigOptions;
31
+ output: OutputCollector;
20
32
  }): void;
33
+ export {};