@intlayer/docs 7.5.0-canary.0 → 7.5.0-canary.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.
Files changed (62) hide show
  1. package/dist/cjs/generated/docs.entry.cjs +19 -0
  2. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  3. package/dist/esm/generated/docs.entry.mjs +19 -0
  4. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  5. package/dist/types/generated/docs.entry.d.ts +1 -0
  6. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  7. package/docs/ar/cli/index.md +5 -0
  8. package/docs/ar/cli/login.md +157 -0
  9. package/docs/ar/configuration.md +12 -0
  10. package/docs/de/cli/index.md +5 -0
  11. package/docs/de/cli/login.md +160 -0
  12. package/docs/de/configuration.md +12 -0
  13. package/docs/en/cli/index.md +5 -0
  14. package/docs/en/cli/login.md +157 -0
  15. package/docs/en/configuration.md +13 -0
  16. package/docs/en/index.md +1 -0
  17. package/docs/en/intlayer_with_tanstack.md +7 -6
  18. package/docs/en-GB/cli/index.md +5 -0
  19. package/docs/en-GB/cli/login.md +181 -0
  20. package/docs/en-GB/configuration.md +12 -0
  21. package/docs/es/cli/index.md +5 -0
  22. package/docs/es/cli/login.md +182 -0
  23. package/docs/es/configuration.md +12 -0
  24. package/docs/fr/cli/index.md +5 -0
  25. package/docs/fr/cli/login.md +185 -0
  26. package/docs/fr/configuration.md +12 -0
  27. package/docs/hi/cli/index.md +5 -0
  28. package/docs/hi/cli/login.md +181 -0
  29. package/docs/hi/configuration.md +12 -0
  30. package/docs/id/cli/index.md +5 -0
  31. package/docs/id/cli/login.md +157 -0
  32. package/docs/id/configuration.md +12 -0
  33. package/docs/it/cli/index.md +5 -0
  34. package/docs/it/cli/login.md +157 -0
  35. package/docs/it/configuration.md +12 -0
  36. package/docs/ja/cli/index.md +5 -0
  37. package/docs/ja/cli/login.md +159 -0
  38. package/docs/ja/configuration.md +12 -0
  39. package/docs/ko/cli/index.md +5 -0
  40. package/docs/ko/cli/login.md +188 -0
  41. package/docs/ko/configuration.md +12 -0
  42. package/docs/pl/cli/index.md +5 -0
  43. package/docs/pl/cli/login.md +187 -0
  44. package/docs/pl/configuration.md +12 -0
  45. package/docs/pt/cli/index.md +5 -0
  46. package/docs/pt/cli/login.md +186 -0
  47. package/docs/pt/configuration.md +12 -0
  48. package/docs/pt/intlayer_with_react_router_v7_fs_routes.md +570 -0
  49. package/docs/ru/cli/index.md +5 -0
  50. package/docs/ru/cli/login.md +181 -0
  51. package/docs/ru/configuration.md +12 -0
  52. package/docs/tr/cli/index.md +5 -0
  53. package/docs/tr/cli/login.md +171 -0
  54. package/docs/tr/configuration.md +12 -0
  55. package/docs/vi/cli/index.md +5 -0
  56. package/docs/vi/cli/login.md +186 -0
  57. package/docs/vi/configuration.md +12 -0
  58. package/docs/zh/cli/index.md +5 -0
  59. package/docs/zh/cli/login.md +182 -0
  60. package/docs/zh/configuration.md +12 -0
  61. package/package.json +9 -9
  62. package/src/generated/docs.entry.ts +19 -0
@@ -220,17 +220,17 @@ const appContent = {
220
220
  }),
221
221
  },
222
222
  meta: {
223
+ title: t({
224
+ en: "Welcome to Intlayer + TanStack Router",
225
+ es: "Bienvenido a Intlayer + TanStack Router",
226
+ fr: "Bienvenue à Intlayer + TanStack Router",
227
+ }),
223
228
  description: t({
224
229
  en: "This is an example of using Intlayer with TanStack Router",
225
230
  es: "Este es un ejemplo de uso de Intlayer con TanStack Router",
226
231
  fr: "Ceci est un exemple d'utilisation d'Intlayer avec TanStack Router",
227
232
  }),
228
233
  },
229
- title: t({
230
- en: "Welcome to Intlayer + TanStack Router",
231
- es: "Bienvenido a Intlayer + TanStack Router",
232
- fr: "Bienvenue à Intlayer + TanStack Router",
233
- }),
234
234
  },
235
235
  key: "app",
236
236
  } satisfies Dictionary;
@@ -512,10 +512,11 @@ function LayoutComponent() {
512
512
  useI18nHTMLAttributes(); // add this line
513
513
 
514
514
  const { locale } = Route.useParams();
515
+ const { defaultLocale } = useLocale();
515
516
 
516
517
  return (
517
518
  <IntlayerProvider
518
- locale={locale} // If no locale included as a parameter, the default locale will be used
519
+ locale={locale ?? defaultLocale} // If no locale included as a parameter, the default locale will be used
519
520
  >
520
521
  <Outlet />
521
522
  </IntlayerProvider>
@@ -103,6 +103,10 @@ To see how to configure available locales, or other parameters, refer to the [co
103
103
 
104
104
  ## Run intlayer commands
105
105
 
106
+ ### Authentication
107
+
108
+ - **[Login](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/login.md)** - Authenticate with the Intlayer CMS and get access credentials
109
+
106
110
  ### Core Commands
107
111
 
108
112
  - **[Build Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/build.md)** - Build your dictionaries from content declaration files
@@ -144,6 +148,7 @@ To see how to configure available locales, or other parameters, refer to the [co
144
148
 
145
149
  ```json fileName="package.json"
146
150
  "scripts": {
151
+ "intlayer:login": "npx intlayer login",
147
152
  "intlayer:build": "npx intlayer build",
148
153
  "intlayer:watch": "npx intlayer build --watch",
149
154
  "intlayer:push": "npx intlayer push",
@@ -0,0 +1,181 @@
1
+ ---
2
+ createdAt: 2025-12-16
3
+ updatedAt: 2025-12-16
4
+ title: CLI - Login
5
+ description: Learn how to use the Intlayer CLI login command to authenticate with the Intlayer CMS and obtain access credentials.
6
+ keywords:
7
+ - CLI
8
+ - Login
9
+ - Authentication
10
+ - CMS
11
+ - Intlayer
12
+ - Credentials
13
+ slugs:
14
+ - doc
15
+ - concept
16
+ - cli
17
+ - login
18
+ ---
19
+
20
+ # Intlayer CLI Login Command
21
+
22
+ ---
23
+
24
+ ## Description
25
+
26
+ The `login` command of the Intlayer CLI allows you to authenticate with the Intlayer CMS. This command automatically opens your default browser to complete the authentication process and receive the necessary credentials (Client ID and Client Secret) to use Intlayer services.
27
+
28
+ ## Usage
29
+
30
+ ```bash
31
+ npx intlayer login [options]
32
+ ```
33
+
34
+ or
35
+
36
+ ```bash
37
+ intlayer login [options]
38
+ ```
39
+
40
+ ## Options
41
+
42
+ ### `--cms-url <url>`
43
+
44
+ Specify the URL of the Intlayer CMS to connect to for authentication.
45
+
46
+ - **Type**: `string`
47
+ - **Default**: The value configured in `intlayer.config.*` or `https://intlayer.org`
48
+ - **Example**:
49
+
50
+ ```bash
51
+ npx intlayer login --cms-url https://intlayer.org
52
+ ```
53
+
54
+ ### Configuration Options
55
+
56
+ You can also use common configuration options:
57
+
58
+ - `--env-file <path>`: Path to the environment file
59
+ - `-e, --env <env>`: Execution environment
60
+ - `--base-dir <dir>`: Base directory of the project
61
+ - `--verbose`: Enable detailed output (default: true)
62
+ - `--prefix <prefix>`: Prefix for logs
63
+
64
+ ## How It Works
65
+
66
+ 1. **Local server start**: The command starts a local HTTP server on a random port to receive credentials from the CMS
67
+
68
+ Specify the URL of the Intlayer CMS to connect to for authentication.
69
+
70
+ - **Type**: `string`
71
+ - **Default**: The value configured in `intlayer.config.*` or `https://intlayer.org`
72
+ - **Example**:
73
+
74
+ ```bash
75
+ npx intlayer login --cms-url https://intlayer.org
76
+ ```
77
+
78
+ ### Configuration Options
79
+
80
+ You can also use common configuration options:
81
+
82
+ - `--env-file <path>`: Path to the environment file
83
+ - `-e, --env <env>`: Execution environment
84
+ - `--base-dir <dir>`: Base directory of the project
85
+ - `--verbose`: Enable verbose output (default: true)
86
+ - `--prefix <prefix>`: Prefix for logs
87
+
88
+ ## How It Works
89
+
90
+ 1. **Local Server Start**: The command starts a local HTTP server on a random port to receive credentials from the CMS.
91
+ 2. **Browser opening**: The command automatically opens your default browser to the CMS login URL
92
+ 3. **Authentication**: Complete the authentication in the browser using your Intlayer account
93
+ 4. **Credentials reception**: The local server receives the Client ID and Client Secret from the CMS
94
+ 5. **Instructions**: The command displays instructions for configuring credentials in your project
95
+
96
+ ## Output
97
+
98
+ After a successful login, the command will display:
99
+
100
+ 1. **The received credentials** (Client ID and Client Secret)
101
+ 2. **Instructions for the `.env` file**:
102
+
103
+ ```bash
104
+ INTLAYER_CLIENT_ID=your_client_id
105
+ INTLAYER_CLIENT_SECRET=your_client_secret
106
+ ```
107
+
108
+ 3. **Instructions for the Intlayer configuration file**:
109
+
110
+ ```typescript
111
+ {
112
+ editor: {
113
+ cmsURL: 'https://intlayer.org',
114
+ clientId: process.env.INTLAYER_CLIENT_ID,
115
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
116
+ },
117
+ }
118
+ ```
119
+
120
+ ## Manual Configuration
121
+
122
+ If the browser does not open automatically, you can manually visit the URL displayed in the terminal.
123
+
124
+ ## Examples
125
+
126
+ ### Login with Custom CMS URL
127
+
128
+ ```bash
129
+ npx intlayer login --cms-url https://custom-cms.example.com
130
+ ```
131
+
132
+ ### Login with Specific Environment File
133
+
134
+ ```bash
135
+ npx intlayer login --env-file .env.production
136
+ ```
137
+
138
+ ### Login in Verbose Mode
139
+
140
+ ```bash
141
+ npx intlayer login --verbose
142
+ ```
143
+
144
+ ## Troubleshooting
145
+
146
+ ### Browser Doesn't Open
147
+
148
+ If the browser does not open automatically, copy the URL displayed in the terminal and open it manually in your browser.
149
+
150
+ ### Connection Issues
151
+
152
+ If you encounter connection issues, verify:
153
+
154
+ 1. That the CMS URL is correct
155
+ 2. That your internet connection is working correctly
156
+ 3. That no firewalls are blocking the connection
157
+
158
+ ### Credentials Not Received
159
+
160
+ If credentials are not received:
161
+
162
+ 1. Ensure you have completed the authentication process in the browser
163
+ 2. Verify that the local port is not blocked
164
+ 3. Try the command again
165
+
166
+ ## Next Steps
167
+
168
+ After completing the login:
169
+
170
+ 1. Add the credentials to your `.env` file
171
+ 2. Configure your `intlayer.config.*` file with the credentials
172
+ 3. Use CLI commands to manage your dictionaries:
173
+ - [`npx intlayer push`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/push.md) - Push dictionaries to the CMS
174
+ - [`npx intlayer pull`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/pull.md) - Pull dictionaries from the CMS
175
+ - [`npx intlayer fill`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/fill.md) - Fill in missing translations
176
+
177
+ ## See Also
178
+
179
+ - [CLI Documentation](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/index.md)
180
+ - [Intlayer Configuration](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/configuration.md)
181
+ - [Intlayer CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/intlayer_CMS.md)
@@ -14,6 +14,9 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 7.5.0
18
+ date: 2025-12-17
19
+ changes: Add `buildMode` option
17
20
  - version: 6.0.0
18
21
  date: 2025-09-16
19
22
  changes: Add `live` import mode
@@ -528,6 +531,15 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
528
531
 
529
532
  #### Properties
530
533
 
534
+ - **mode**:
535
+ - _Type_: `'auto' | 'manual'`
536
+ - _Default_: `'auto'`
537
+ - _Description_: Controls the mode of the build.
538
+ - _Example_: `'manual'`
539
+ - _Note_: If 'auto', the build will be enabled automatically when the application is built.
540
+ - _Note_: If 'manual', the build will be set only when the build command is executed.
541
+ - _Note_: Can be used to disable dictionaries build, for instance when execution on Node.js environment should be avoided.
542
+
531
543
  - **optimize**:
532
544
  - _Type_: `boolean`
533
545
  - _Default_: `process.env.NODE_ENV === 'production'`
@@ -103,6 +103,10 @@ Para ver cómo configurar los locales disponibles u otros parámetros, consulta
103
103
 
104
104
  ## Ejecutar comandos de intlayer
105
105
 
106
+ ### Autenticación
107
+
108
+ - **[Iniciar sesión](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/login.md)** - Autenticarse con el CMS de Intlayer y obtener credenciales de acceso
109
+
106
110
  ### Comandos principales
107
111
 
108
112
  - **[Construir Diccionarios](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/build.md)** - Construye tus diccionarios a partir de archivos de declaración de contenido
@@ -144,6 +148,7 @@ Para ver cómo configurar los locales disponibles u otros parámetros, consulta
144
148
 
145
149
  ```json fileName="package.json"
146
150
  "scripts": {
151
+ "intlayer:login": "npx intlayer login",
147
152
  "intlayer:build": "npx intlayer build",
148
153
  "intlayer:watch": "npx intlayer build --watch",
149
154
  "intlayer:push": "npx intlayer push",
@@ -0,0 +1,182 @@
1
+ ---
2
+ createdAt: 2025-12-16
3
+ updatedAt: 2025-12-16
4
+ title: CLI - Inicio de sesión
5
+ description: Aprende a usar el comando login del CLI de Intlayer para autenticarte con el CMS de Intlayer y obtener credenciales de acceso.
6
+ keywords:
7
+ - CLI
8
+ - Login
9
+ - Authentication
10
+ - CMS
11
+ - Intlayer
12
+ - Credentials
13
+ slugs:
14
+ - doc
15
+ - concept
16
+ - cli
17
+ - login
18
+ ---
19
+
20
+ # Comando 'login' del CLI de Intlayer
21
+
22
+ ---
23
+
24
+ ## Descripción
25
+
26
+ El comando `login` del CLI de Intlayer te permite autenticarte con el CMS de Intlayer. Este comando abre automáticamente tu navegador por defecto para completar el proceso de autenticación y recibir las credenciales necesarias (Client ID y Client Secret) para usar los servicios de Intlayer.
27
+
28
+ ## Uso
29
+
30
+ ```bash
31
+ npx intlayer login [options]
32
+ ```
33
+
34
+ o
35
+
36
+ ```bash
37
+ intlayer login [options]
38
+ ```
39
+
40
+ ## Opciones
41
+
42
+ ### `--cms-url <url>`
43
+
44
+ Especifica la URL del CMS de Intlayer con la que conectarse para la autenticación.
45
+
46
+ - **Tipo**: `string`
47
+ - **Por defecto**: El valor configurado en `intlayer.config.*` o `https://intlayer.org`
48
+ - **Ejemplo**:
49
+
50
+ ```bash
51
+ npx intlayer login --cms-url https://intlayer.org
52
+ ```
53
+
54
+ ### Opciones de configuración
55
+
56
+ También puedes usar opciones de configuración comunes:
57
+
58
+ - `--env-file <path>`: Ruta al archivo de entorno
59
+ - `-e, --env <env>`: Entorno de ejecución
60
+ - `--base-dir <dir>`: Directorio base del proyecto
61
+ - `--verbose`: Habilitar salida detallada (por defecto: true)
62
+ - `--prefix <prefix>`: Prefijo para los logs
63
+
64
+ ## Cómo funciona
65
+
66
+ 1. **Inicio de servidor local**: El comando inicia un servidor HTTP local en un puerto aleatorio para recibir las credenciales desde el CMS
67
+
68
+ Especifica la URL del CMS de Intlayer al que conectarse para la autenticación.
69
+
70
+ - **Tipo**: `string`
71
+ - **Por defecto**: El valor configurado en `intlayer.config.*` o `https://intlayer.org`
72
+ - **Ejemplo**:
73
+
74
+ ```bash
75
+ npx intlayer login --cms-url https://intlayer.org
76
+ ```
77
+
78
+ ### Opciones de configuración
79
+
80
+ También puedes usar las opciones de configuración comunes:
81
+
82
+ - `--env-file <path>`: Ruta al archivo de entorno
83
+ - `-e, --env <env>`: Entorno de ejecución
84
+ - `--base-dir <dir>`: Directorio base del proyecto
85
+ - `--verbose`: Habilitar salida detallada (por defecto: true)
86
+ - `--prefix <prefix>`: Prefijo para los logs
87
+
88
+ ## Cómo funciona
89
+
90
+ 1. **Inicio del servidor local**: El comando inicia un servidor HTTP local en un puerto aleatorio para recibir credenciales del CMS
91
+ 2. **Apertura del navegador**: El comando abre automáticamente tu navegador predeterminado en la URL de inicio de sesión del CMS
92
+ 3. **Autenticación**: Completa la autenticación en el navegador usando tu cuenta de Intlayer
93
+ 4. **Recepción de credenciales**: El servidor local recibe el Client ID y el Client Secret desde el CMS
94
+ 5. **Instrucciones**: El comando muestra instrucciones para configurar las credenciales en tu proyecto
95
+
96
+ ## Salida
97
+
98
+ Después de un inicio de sesión exitoso, el comando mostrará:
99
+
100
+ 1. **Las credenciales recibidas** (Client ID y Client Secret)
101
+ 2. **Instrucciones para el archivo `.env`**:
102
+
103
+ ```bash
104
+ INTLAYER_CLIENT_ID=your_client_id
105
+ INTLAYER_CLIENT_SECRET=your_client_secret
106
+ ```
107
+
108
+ 3. **Instrucciones para el archivo de configuración de Intlayer**:
109
+
110
+ ```typescript
111
+ {
112
+ editor: {
113
+ cmsURL: 'https://intlayer.org',
114
+ clientId: process.env.INTLAYER_CLIENT_ID,
115
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
116
+ },
117
+ }
118
+ ```
119
+
120
+ ## Configuración manual
121
+
122
+ Si el navegador no se abre automáticamente, puedes visitar manualmente la URL que se muestra en el terminal.
123
+
124
+ ## Ejemplos
125
+
126
+ ### Iniciar sesión con URL de CMS personalizada
127
+
128
+ ```bash
129
+ npx intlayer login --cms-url https://custom-cms.example.com
130
+ ```
131
+
132
+ ### Iniciar sesión con archivo de entorno específico
133
+
134
+ ```bash
135
+ npx intlayer login --env-file .env.production
136
+ ```
137
+
138
+ ### Iniciar sesión en modo verbose
139
+
140
+ ```bash
141
+ npx intlayer login --verbose
142
+ ```
143
+
144
+ ## Solución de problemas
145
+
146
+ ### El navegador no se abre
147
+
148
+ Si el navegador no se abre automáticamente, copia la URL que se muestra en el terminal y ábrela manualmente en tu navegador.
149
+
150
+ ### Problemas de conexión
151
+
152
+ Si encuentras problemas de conexión, verifica:
153
+
154
+ 1. Que la URL del CMS sea correcta
155
+ 2. Que tu conexión a internet funcione correctamente
156
+ 3. Que no haya firewalls que bloqueen la conexión
157
+
158
+ ### Credenciales no recibidas
159
+
160
+ Si no se reciben las credenciales:
161
+
162
+ 1. Asegúrate de haber completado el proceso de autenticación en el navegador
163
+ 2. Verifica que el puerto local no esté bloqueado
164
+ 3. Intenta ejecutar el comando de nuevo
165
+
166
+ ## Próximos pasos
167
+
168
+ Después de completar el inicio de sesión:
169
+
170
+ 1. Añade las credenciales a tu archivo `.env`
171
+ 2. Configura tu archivo `intlayer.config.*` con las credenciales
172
+ 3. Usa los comandos de la CLI para gestionar tus diccionarios:
173
+ - [`npx intlayer push`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/push.md) - Enviar diccionarios al CMS
174
+ - [`npx intlayer pull`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/pull.md) - Extraer diccionarios del CMS
175
+
176
+ - [`npx intlayer fill`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/fill.md) - Rellenar traducciones faltantes
177
+
178
+ ## Véase también
179
+
180
+ - [Documentación del CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/index.md)
181
+ - [Configuración de Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/configuration.md)
182
+ - [Intlayer CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/intlayer_CMS.md)
@@ -14,6 +14,9 @@ slugs:
14
14
  - concept
15
15
  - configuration
16
16
  history:
17
+ - version: 7.5.0
18
+ date: 2025-12-17
19
+ changes: Añadir opción `buildMode`
17
20
  - version: 6.0.0
18
21
  date: 2025-09-16
19
22
  changes: Añadido modo de importación `live`
@@ -524,6 +527,15 @@ Las opciones de compilación se aplican a los plugins `@intlayer/babel` y `@intl
524
527
 
525
528
  #### Propiedades
526
529
 
530
+ - **mode**:
531
+ - _Tipo_: `'auto' | 'manual'`
532
+ - _Por defecto_: `'auto'`
533
+ - _Descripción_: Controla el modo de la compilación.
534
+ - _Ejemplo_: `'manual'`
535
+ - _Nota_: Si 'auto', la compilación se habilitará automáticamente cuando se construya la aplicación.
536
+ - _Nota_: Si 'manual', la compilación se establecerá solo cuando se ejecute el comando de compilación.
537
+ - _Nota_: Puede usarse para deshabilitar la compilación de diccionarios, por ejemplo cuando se debe evitar la ejecución en un entorno Node.js.
538
+
527
539
  - **optimize**:
528
540
  - _Tipo_: `boolean`
529
541
  - _Por defecto_: `process.env.NODE_ENV === 'production'`
@@ -103,6 +103,10 @@ Pour voir comment configurer les locales disponibles, ou d'autres paramètres, r
103
103
 
104
104
  ## Exécuter les commandes intlayer
105
105
 
106
+ ### Authentification
107
+
108
+ - **[Connexion](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/login.md)** - S'authentifier avec le CMS Intlayer et obtenir les identifiants d'accès
109
+
106
110
  ### Commandes principales
107
111
 
108
112
  - **[Construire les dictionnaires](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/build.md)** - Construisez vos dictionnaires à partir des fichiers de déclaration de contenu
@@ -144,6 +148,7 @@ Pour voir comment configurer les locales disponibles, ou d'autres paramètres, r
144
148
 
145
149
  ```json fileName="package.json"
146
150
  "scripts": {
151
+ "intlayer:login": "npx intlayer login",
147
152
  "intlayer:build": "npx intlayer build",
148
153
  "intlayer:watch": "npx intlayer build --watch",
149
154
  "intlayer:push": "npx intlayer push",
@@ -0,0 +1,185 @@
1
+ ---
2
+ createdAt: 2025-12-16
3
+ updatedAt: 2025-12-16
4
+ title: CLI - Connexion
5
+ description: Apprenez à utiliser la commande login de l'Intlayer CLI pour vous authentifier auprès du CMS Intlayer et obtenir des identifiants d'accès.
6
+ keywords:
7
+ - CLI
8
+ - Connexion
9
+ - Authentification
10
+ - CMS
11
+ - Intlayer
12
+ - Identifiants
13
+ slugs:
14
+ - doc
15
+ - concept
16
+ - cli
17
+ - login
18
+ ---
19
+
20
+ # Commande `login` de l'Intlayer CLI
21
+
22
+ ---
23
+
24
+ ## Description
25
+
26
+ La commande `login` de l'Intlayer CLI vous permet de vous authentifier auprès du CMS Intlayer. Cette commande ouvre automatiquement votre navigateur par défaut pour compléter le processus d'authentification et recevoir les identifiants nécessaires (Client ID et Client Secret) pour utiliser les services Intlayer.
27
+
28
+ ## Utilisation
29
+
30
+ ```bash
31
+ npx intlayer login [options]
32
+ ```
33
+
34
+ ou
35
+
36
+ ```bash
37
+ intlayer login [options]
38
+ ```
39
+
40
+ ## Options
41
+
42
+ ### `--cms-url <url>`
43
+
44
+ Spécifie l'URL du CMS Intlayer auquel se connecter pour l'authentification.
45
+
46
+ - **Type**: `string`
47
+ - **Par défaut**: la valeur configurée dans `intlayer.config.*` ou `https://intlayer.org`
48
+ - **Exemple**:
49
+
50
+ ```bash
51
+ npx intlayer login --cms-url https://intlayer.org
52
+ ```
53
+
54
+ ### Options de configuration
55
+
56
+ Vous pouvez également utiliser les options de configuration communes :
57
+
58
+ - `--env-file <path>` : Chemin vers le fichier d'environnement
59
+ - `-e, --env <env>` : Environnement d'exécution
60
+ - `--base-dir <dir>` : Répertoire de base du projet
61
+ - `--verbose` : Active la sortie détaillée (par défaut : true)
62
+ - `--prefix <prefix>` : Préfixe pour les logs
63
+
64
+ ## Fonctionnement
65
+
66
+ 1. **Démarrage d'un serveur local** : La commande démarre un serveur HTTP local sur un port aléatoire pour recevoir les identifiants depuis le CMS
67
+
68
+ Spécifiez l'URL du CMS Intlayer auquel se connecter pour l'authentification.
69
+
70
+ - **Type**: `string`
71
+ - **Par défaut**: La valeur configurée dans `intlayer.config.*` ou `https://intlayer.org`
72
+ - **Exemple**:
73
+
74
+ ```bash
75
+ npx intlayer login --cms-url https://intlayer.org
76
+ ```
77
+
78
+ ### Options de configuration
79
+
80
+ Vous pouvez également utiliser les options de configuration courantes :
81
+
82
+ - `--env-file <path>` : Chemin vers le fichier d'environnement
83
+ - `-e, --env <env>` : Environnement d'exécution
84
+ - `--base-dir <dir>` : Répertoire de base du projet
85
+ - `--verbose` : Activer la sortie détaillée (par défaut : true)
86
+ - `--prefix <prefix>` : Préfixe pour les logs
87
+
88
+ ## Fonctionnement
89
+
90
+ 1. **Démarrage du serveur local** : la commande lance un serveur HTTP local sur un port aléatoire pour recevoir les identifiants depuis le CMS
91
+ 2. **Ouverture du navigateur** : La commande ouvre automatiquement votre navigateur par défaut à l'URL de connexion du CMS
92
+ 3. **Authentification** : Complétez l'authentification dans le navigateur en utilisant votre compte Intlayer
93
+ 4. **Réception des identifiants** : Le serveur local reçoit le Client ID et le Client Secret depuis le CMS
94
+ 5. **Instructions** : La commande affiche des instructions pour configurer les identifiants dans votre projet
95
+
96
+ ## Sortie
97
+
98
+ Après une connexion réussie, la commande affichera :
99
+
100
+ 1. **Les identifiants reçus** (Client ID et Client Secret)
101
+ 2. **Instructions pour le fichier `.env`** :
102
+
103
+ ```bash
104
+ INTLAYER_CLIENT_ID=your_client_id
105
+ INTLAYER_CLIENT_SECRET=your_client_secret
106
+ ```
107
+
108
+ 3. **Instructions pour le fichier de configuration Intlayer** :
109
+
110
+ ```typescript
111
+ {
112
+ editor: {
113
+ cmsURL: 'https://intlayer.org',
114
+ clientId: process.env.INTLAYER_CLIENT_ID,
115
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
116
+ },
117
+ }
118
+ clientId: process.env.INTLAYER_CLIENT_ID,
119
+ clientSecret: process.env.INTLAYER_CLIENT_SECRET,
120
+ },
121
+ }
122
+ ```
123
+
124
+ ## Configuration manuelle
125
+
126
+ Si le navigateur ne s'ouvre pas automatiquement, vous pouvez visiter manuellement l'URL affichée dans le terminal.
127
+
128
+ ## Exemples
129
+
130
+ ### Connexion avec une URL CMS personnalisée
131
+
132
+ ```bash
133
+ npx intlayer login --cms-url https://custom-cms.example.com
134
+ ```
135
+
136
+ ### Connexion avec un fichier d'environnement spécifique
137
+
138
+ ```bash
139
+ npx intlayer login --env-file .env.production
140
+ ```
141
+
142
+ ### Connexion en mode verbeux
143
+
144
+ ```bash
145
+ npx intlayer login --verbose
146
+ ```
147
+
148
+ ## Dépannage
149
+
150
+ ### Le navigateur ne s'ouvre pas
151
+
152
+ Si le navigateur ne s'ouvre pas automatiquement, copiez l'URL affichée dans le terminal et ouvrez-la manuellement dans votre navigateur.
153
+
154
+ ### Problèmes de connexion
155
+
156
+ Si vous rencontrez des problèmes de connexion, vérifiez :
157
+
158
+ 1. Que l'URL du CMS est correcte
159
+ 2. Que votre connexion internet fonctionne correctement
160
+ 3. Qu'aucun pare-feu ne bloque la connexion
161
+
162
+ ### Identifiants non reçus
163
+
164
+ Si les identifiants ne sont pas reçus :
165
+
166
+ 1. Assurez-vous d'avoir complété le processus d'authentification dans le navigateur
167
+ 2. Vérifiez que le port local n'est pas bloqué
168
+ 3. Réessayez la commande
169
+
170
+ ## Étapes suivantes
171
+
172
+ Après avoir terminé la connexion :
173
+
174
+ 1. Ajoutez les identifiants à votre fichier `.env`
175
+ 2. Configurez votre fichier `intlayer.config.*` avec les identifiants
176
+ 3. Utilisez les commandes CLI pour gérer vos dictionnaires :
177
+ - [`npx intlayer push`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/push.md) - Pousser les dictionnaires vers le CMS
178
+ - [`npx intlayer pull`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/pull.md) - Récupérer les dictionnaires depuis le CMS
179
+ - [`npx intlayer fill`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/fill.md) - Remplir les traductions manquantes
180
+
181
+ ## Voir aussi
182
+
183
+ - [Documentation CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/cli/index.md)
184
+ - [Configuration d'Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/configuration.md)
185
+ - [CMS Intlayer](https://github.com/aymericzip/intlayer/blob/main/docs/docs/fr/intlayer_CMS.md)