@kopynator/cli 1.4.0 ā 1.4.1
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/dist/index.js +4 -5
- package/package.json +1 -1
- package/src/commands/sync.ts +2 -2
- package/src/commands/upload.ts +1 -1
- package/src/index.ts +3 -2
package/dist/index.js
CHANGED
|
@@ -465,7 +465,7 @@ async function syncCommand() {
|
|
|
465
465
|
const languagesUrl = `${baseUrl}/languages?token=${token}`;
|
|
466
466
|
const languagesResponse = await fetch(languagesUrl, {
|
|
467
467
|
headers: {
|
|
468
|
-
"x-kopynator-version": "1.4.
|
|
468
|
+
"x-kopynator-version": "1.4.1"
|
|
469
469
|
}
|
|
470
470
|
});
|
|
471
471
|
if (!languagesResponse.ok) {
|
|
@@ -485,7 +485,7 @@ async function syncCommand() {
|
|
|
485
485
|
try {
|
|
486
486
|
const translationResponse = await fetch(fetchUrl, {
|
|
487
487
|
headers: {
|
|
488
|
-
"x-kopynator-version": "1.4.
|
|
488
|
+
"x-kopynator-version": "1.4.1"
|
|
489
489
|
}
|
|
490
490
|
});
|
|
491
491
|
if (!translationResponse.ok) {
|
|
@@ -638,7 +638,7 @@ async function uploadCommand(options) {
|
|
|
638
638
|
headers: {
|
|
639
639
|
"Content-Type": "application/json",
|
|
640
640
|
"x-api-token": token,
|
|
641
|
-
"x-kopynator-version": "1.4.
|
|
641
|
+
"x-kopynator-version": "1.4.1"
|
|
642
642
|
},
|
|
643
643
|
body: JSON.stringify({ lang, data: batches[i] })
|
|
644
644
|
});
|
|
@@ -691,7 +691,7 @@ async function uploadCommand(options) {
|
|
|
691
691
|
|
|
692
692
|
// src/index.ts
|
|
693
693
|
var program = new import_commander.Command();
|
|
694
|
-
program.name("kopynator").description("Kopynator CLI - Manage your i18n workflow").version("1.4.
|
|
694
|
+
program.name("kopynator").description("Kopynator CLI - Manage your i18n workflow").version("1.4.1", "-v, --version").helpOption("-h, --help", "Display help for command").addHelpText("beforeAll", import_chalk5.default.blue("\n\u{1F44B} Welcome to Kopynator CLI!\n"));
|
|
695
695
|
program.command("init").description("Initialize Kopynator in your project").action(initCommand);
|
|
696
696
|
program.command("check").description("Validate your local JSON translation files").action(checkCommand);
|
|
697
697
|
program.command("sync").description("Sync your translations with the Kopynator Cloud").action(syncCommand);
|
|
@@ -702,6 +702,5 @@ program.command("help").description("Show help for all commands").action(() => {
|
|
|
702
702
|
});
|
|
703
703
|
program.parse(process.argv);
|
|
704
704
|
if (!process.argv.slice(2).length) {
|
|
705
|
-
console.log(import_chalk5.default.blue("\u{1F44B} Welcome to Kopynator CLI!"));
|
|
706
705
|
program.outputHelp();
|
|
707
706
|
}
|
package/package.json
CHANGED
package/src/commands/sync.ts
CHANGED
|
@@ -223,7 +223,7 @@ export async function syncCommand() {
|
|
|
223
223
|
const languagesUrl = `${baseUrl}/languages?token=${token}`;
|
|
224
224
|
const languagesResponse = await fetch(languagesUrl, {
|
|
225
225
|
headers: {
|
|
226
|
-
'x-kopynator-version': '1.4.
|
|
226
|
+
'x-kopynator-version': '1.4.1'
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
if (!languagesResponse.ok) {
|
|
@@ -249,7 +249,7 @@ export async function syncCommand() {
|
|
|
249
249
|
try {
|
|
250
250
|
const translationResponse = await fetch(fetchUrl, {
|
|
251
251
|
headers: {
|
|
252
|
-
'x-kopynator-version': '1.4.
|
|
252
|
+
'x-kopynator-version': '1.4.1'
|
|
253
253
|
}
|
|
254
254
|
});
|
|
255
255
|
|
package/src/commands/upload.ts
CHANGED
|
@@ -164,7 +164,7 @@ export async function uploadCommand(options: { file?: string; lang?: string }) {
|
|
|
164
164
|
headers: {
|
|
165
165
|
'Content-Type': 'application/json',
|
|
166
166
|
'x-api-token': token,
|
|
167
|
-
'x-kopynator-version': '1.4.
|
|
167
|
+
'x-kopynator-version': '1.4.1',
|
|
168
168
|
},
|
|
169
169
|
body: JSON.stringify({ lang, data: batches[i] }),
|
|
170
170
|
});
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,9 @@ const program = new Command();
|
|
|
8
8
|
program
|
|
9
9
|
.name('kopynator')
|
|
10
10
|
.description('Kopynator CLI - Manage your i18n workflow')
|
|
11
|
-
.version('1.4.
|
|
11
|
+
.version('1.4.1', '-v, --version')
|
|
12
|
+
.helpOption('-h, --help', 'Display help for command')
|
|
13
|
+
.addHelpText('beforeAll', chalk.blue('\nš Welcome to Kopynator CLI!\n'));
|
|
12
14
|
|
|
13
15
|
program
|
|
14
16
|
.command('init')
|
|
@@ -43,6 +45,5 @@ program
|
|
|
43
45
|
program.parse(process.argv);
|
|
44
46
|
|
|
45
47
|
if (!process.argv.slice(2).length) {
|
|
46
|
-
console.log(chalk.blue('š Welcome to Kopynator CLI!'));
|
|
47
48
|
program.outputHelp();
|
|
48
49
|
}
|