gtx-cli 1.1.9 → 1.1.11

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.
@@ -46,6 +46,7 @@ function sendFiles(files, options) {
46
46
  formData.append('projectId', options.projectId);
47
47
  formData.append('publish', String(options.publish));
48
48
  formData.append('versionId', options.versionId || '');
49
+ formData.append('description', options.description || '');
49
50
  const response = yield fetch(`${options.baseUrl}/v1/project/translations/files/upload`, {
50
51
  method: 'POST',
51
52
  headers: Object.assign({}, (apiKey && { 'x-gt-api-key': apiKey })),
@@ -5,6 +5,7 @@ type ApiOptions = Settings & {
5
5
  wait: boolean;
6
6
  timeout: string;
7
7
  dataFormat: DataFormat;
8
+ description?: string;
8
9
  };
9
10
  /**
10
11
  * Sends updates to the API
@@ -30,7 +30,7 @@ function sendUpdates(updates, options, library) {
30
30
  // If additionalLocales is provided, additionalLocales + project.current_locales will be translated
31
31
  // If not, then options.locales will be translated
32
32
  // If neither, then project.current_locales will be translated
33
- const body = Object.assign(Object.assign(Object.assign(Object.assign({ updates }, (options.locales && { locales: options.locales })), { metadata: globalMetadata, publish: options.publish }), (dataFormat && { dataFormat })), (options.versionId && { versionId: options.versionId }));
33
+ const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ updates }, (options.locales && { locales: options.locales })), { metadata: globalMetadata, publish: options.publish }), (dataFormat && { dataFormat })), (options.versionId && { versionId: options.versionId })), (options.description && { description: options.description }));
34
34
  console.log();
35
35
  const spinner = yield (0, console_1.displayLoadingAnimation)(`Sending ${library} updates to General Translation API...`);
36
36
  try {
package/dist/cli/next.js CHANGED
@@ -71,7 +71,7 @@ class NextCLI extends react_1.ReactCLI {
71
71
  default: 'app',
72
72
  });
73
73
  if (routerType === 'pages') {
74
- console.log(chalk_1.default.red('\nPlease use gt-react and gt-react-cli instead. gt-next is currently not supported for the Pages router.'));
74
+ console.log(chalk_1.default.red('\nPlease install gt-react instead. gt-next is currently not supported for the Pages router.'));
75
75
  process.exit(0);
76
76
  }
77
77
  const addGTProvider = yield (0, prompts_1.select)({
@@ -93,4 +93,5 @@ export type Settings = {
93
93
  transformPaths: TransformFiles;
94
94
  };
95
95
  versionId?: string;
96
+ description?: string;
96
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtx-cli",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "scripts": {