gtx-cli 2.0.19 → 2.0.20
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 +6 -0
- package/dist/config/generateSettings.js +8 -1
- package/dist/types/index.d.ts +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# gtx-cli
|
|
2
2
|
|
|
3
|
+
## 2.0.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#521](https://github.com/generaltranslation/gt/pull/521) [`6b137bc`](https://github.com/generaltranslation/gt/commit/6b137bcf0b2aaf50adacd5fb03ed64525fb12473) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - refactor: add support for experimental flags in config file
|
|
8
|
+
|
|
3
9
|
## 2.0.19
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -76,7 +76,7 @@ export async function generateSettings(options, cwd = process.cwd()) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
// merge options
|
|
79
|
-
|
|
79
|
+
let mergedOptions = { ...gtConfig, ...options };
|
|
80
80
|
// merge locales
|
|
81
81
|
mergedOptions.locales = Array.from(new Set([...(gtConfig.locales || []), ...(options.locales || [])]));
|
|
82
82
|
// Add apiKey if not provided
|
|
@@ -107,6 +107,13 @@ export async function generateSettings(options, cwd = process.cwd()) {
|
|
|
107
107
|
mergedOptions.files = mergedOptions.files
|
|
108
108
|
? resolveFiles(mergedOptions.files, mergedOptions.defaultLocale, mergedOptions.locales, cwd)
|
|
109
109
|
: undefined;
|
|
110
|
+
mergedOptions = {
|
|
111
|
+
...mergedOptions,
|
|
112
|
+
experimentalLocalizeStaticImports: gtConfig.options?.experimentalLocalizeStaticImports,
|
|
113
|
+
experimentalLocalizeStaticUrls: gtConfig.options?.experimentalLocalizeStaticUrls,
|
|
114
|
+
experimentalHideDefaultLocale: gtConfig.options?.experimentalHideDefaultLocale,
|
|
115
|
+
experimentalFlattenJsonFiles: gtConfig.options?.experimentalFlattenJsonFiles,
|
|
116
|
+
};
|
|
110
117
|
// Add additional options if provided
|
|
111
118
|
if (mergedOptions.options) {
|
|
112
119
|
if (mergedOptions.options.jsonSchema) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -110,6 +110,10 @@ export type AdditionalOptions = {
|
|
|
110
110
|
docsImportPattern?: string;
|
|
111
111
|
docsHideDefaultLocaleImport?: boolean;
|
|
112
112
|
copyFiles?: string[];
|
|
113
|
+
experimentalLocalizeStaticImports?: boolean;
|
|
114
|
+
experimentalLocalizeStaticUrls?: boolean;
|
|
115
|
+
experimentalHideDefaultLocale?: boolean;
|
|
116
|
+
experimentalFlattenJsonFiles?: boolean;
|
|
113
117
|
};
|
|
114
118
|
export type JsonSchema = {
|
|
115
119
|
preset?: 'mintlify';
|