@kopynator/cli 1.0.13 → 1.1.0

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 CHANGED
@@ -333,7 +333,7 @@ async function syncCommand() {
333
333
  return;
334
334
  }
335
335
  const syncConfig = await getSyncConfig();
336
- const baseUrl = config.baseUrl || "http://localhost:7300/api/tokens";
336
+ const baseUrl = config.baseUrl || "https://api.kopynator.com/api/tokens";
337
337
  const token = config.apiKey;
338
338
  const spinner = (0, import_ora.default)("\u{1F4E1} Connecting to Kopynator Cloud...").start();
339
339
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopynator/cli",
3
- "version": "1.0.13",
3
+ "version": "1.1.0",
4
4
  "description": "CLI tool for Kopynator - The i18n management solution",
5
5
  "bin": {
6
6
  "kopynator": "dist/index.js"
@@ -22,6 +22,7 @@
22
22
  "author": "Carlos Florio",
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
+ "@kopynator/core": "^1.0.1",
25
26
  "chalk": "^4.1.2",
26
27
  "commander": "^11.1.0",
27
28
  "inquirer": "^8.2.6",
@@ -193,7 +193,7 @@ export async function syncCommand() {
193
193
  // Get sync configuration
194
194
  const syncConfig = await getSyncConfig();
195
195
 
196
- const baseUrl = config.baseUrl || 'http://localhost:7300/api/tokens';
196
+ const baseUrl = config.baseUrl || 'https://api.kopynator.com/api/tokens';
197
197
  const token = config.apiKey;
198
198
 
199
199
  const spinner = ora('📡 Connecting to Kopynator Cloud...').start();
@@ -202,8 +202,11 @@ export async function syncCommand() {
202
202
  // 1. Fetch available languages
203
203
  spinner.text = '📡 Fetching available languages...';
204
204
  const languagesUrl = `${baseUrl}/languages?token=${token}`;
205
- const languagesResponse = await fetch(languagesUrl);
206
-
205
+ const languagesResponse = await fetch(languagesUrl, {
206
+ headers: {
207
+ 'x-kopynator-version': '1.1.0'
208
+ }
209
+ });
207
210
  if (!languagesResponse.ok) {
208
211
  spinner.fail(`Failed to fetch languages: ${languagesResponse.status} ${languagesResponse.statusText}`);
209
212
  return;
@@ -225,7 +228,11 @@ export async function syncCommand() {
225
228
  const fetchUrl = `${baseUrl}/fetch?token=${token}&langs=${locale}&nested=${syncConfig.nested}&includeLangKey=${syncConfig.includeLangKey}&pretty=${syncConfig.pretty}&indent=${syncConfig.indent}`;
226
229
 
227
230
  try {
228
- const translationResponse = await fetch(fetchUrl);
231
+ const translationResponse = await fetch(fetchUrl, {
232
+ headers: {
233
+ 'x-kopynator-version': '1.1.0'
234
+ }
235
+ });
229
236
 
230
237
  if (!translationResponse.ok) {
231
238
  downloadSpinner.warn(`Failed to fetch ${locale}: ${translationResponse.status}`);
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@ const program = new Command();
8
8
  program
9
9
  .name('kopynator')
10
10
  .description('Kopynator CLI - Manage your i18n workflow')
11
- .version('1.0.0');
11
+ .version('1.1.0');
12
12
 
13
13
  program
14
14
  .command('init')