File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export default new Command()
8888
8989 if ( ! settings . auth . apiKey ) {
9090 console . error (
91- "No API key provided. Set LINGO_API_KEY environment variable or use --api-key flag." ,
91+ "No API key provided. Set LINGODOTDEV_API_KEY environment variable or use --api-key flag." ,
9292 ) ;
9393 return ;
9494 }
@@ -105,9 +105,7 @@ export default new Command()
105105 }
106106
107107 const env = {
108- ...( settings . auth . apiKey && {
109- LINGO_API_KEY : settings . auth . apiKey ,
110- } ) ,
108+ LINGODOTDEV_API_KEY : settings . auth . apiKey ,
111109 LINGODOTDEV_PULL_REQUEST : options . pullRequest ?. toString ( ) || "false" ,
112110 ...( options . commitMessage && {
113111 LINGODOTDEV_COMMIT_MESSAGE : options . commitMessage ,
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ export abstract class PlatformKit<
4747
4848 get config ( ) {
4949 const env = Z . object ( {
50- LINGO_API_KEY : Z . string ( ) . optional ( ) ,
5150 LINGODOTDEV_API_KEY : Z . string ( ) . optional ( ) ,
5251 LINGODOTDEV_PULL_REQUEST : Z . preprocess (
5352 ( val ) => val === "true" || val === true ,
@@ -69,7 +68,7 @@ export abstract class PlatformKit<
6968 } ) . parse ( process . env ) ;
7069
7170 return {
72- replexicaApiKey : env . LINGO_API_KEY || env . LINGODOTDEV_API_KEY || "" ,
71+ replexicaApiKey : env . LINGODOTDEV_API_KEY || "" ,
7372 isPullRequestMode : env . LINGODOTDEV_PULL_REQUEST ,
7473 commitMessage : env . LINGODOTDEV_COMMIT_MESSAGE || defaultMessage ,
7574 pullRequestTitle : env . LINGODOTDEV_PULL_REQUEST_TITLE || defaultMessage ,
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Press Enter to open the browser for authentication.
4949
5050---
5151
52- Having issues? Put LINGO_API_KEY in your .env file instead.
52+ Having issues? Put LINGODOTDEV_API_KEY in your .env file instead.
5353 ` . trim ( ) + "\n" ,
5454 ) ;
5555
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ export default function createLingoDotDevLocalizer(
2020
2121 To fix this issue:
2222 1. Run ${ chalk . dim ( "lingo.dev login" ) } to authenticate, or
23- 2. Set ${ chalk . dim ( "LINGO_API_KEY " ) } environment variable, or
24- 3. Use the ${ chalk . dim ( "--api-key " ) } flag to provide an API key .
23+ 2. Use the ${ chalk . dim ( "--api-key " ) } flag to provide an API key.
24+ 3. Set ${ chalk . dim ( "LINGODOTDEV_API_KEY " ) } environment variable .
2525 ` ,
2626 ) ;
2727 }
Original file line number Diff line number Diff line change @@ -160,33 +160,7 @@ function _legacyEnvVarWarning() {
160160⚠️ WARNING: REPLEXICA_API_KEY env var is deprecated ⚠️
161161===========================================================
162162
163- Please use LINGO_API_KEY instead.
164- ===========================================================
165- ` ,
166- ) ;
167- }
168-
169- if ( env . LINGODOTDEV_API_KEY && ! env . LINGO_API_KEY ) {
170- console . warn (
171- "\x1b[33m%s\x1b[0m" ,
172- `
173- ⚠️ WARNING: LINGODOTDEV_API_KEY env var is deprecated ⚠️
174- ===========================================================
175-
176- Please use LINGO_API_KEY instead.
177- ===========================================================
178- ` ,
179- ) ;
180- }
181-
182- if ( env . LINGODOTDEV_API_URL && ! env . LINGO_API_URL ) {
183- console . warn (
184- "\x1b[33m%s\x1b[0m" ,
185- `
186- ⚠️ WARNING: LINGODOTDEV_API_URL env var is deprecated ⚠️
187- ===========================================================
188-
189- Please use LINGO_API_URL instead.
163+ Please use LINGODOTDEV_API_KEY instead.
190164===========================================================
191165` ,
192166 ) ;
Original file line number Diff line number Diff line change @@ -96,12 +96,8 @@ async function getDistinctId(): Promise<{
9696
9797async function tryGetEmail ( ) : Promise < string | null > {
9898 const rc = getRc ( ) ;
99- const apiKey =
100- process . env . LINGO_API_KEY ||
101- process . env . LINGODOTDEV_API_KEY ||
102- rc ?. auth ?. apiKey ;
99+ const apiKey = process . env . LINGODOTDEV_API_KEY || rc ?. auth ?. apiKey ;
103100 const apiUrl =
104- process . env . LINGO_API_URL ||
105101 process . env . LINGODOTDEV_API_URL ||
106102 rc ?. auth ?. apiUrl ||
107103 "https://api.lingo.dev" ;
Original file line number Diff line number Diff line change @@ -96,12 +96,8 @@ async function getDistinctId(): Promise<{
9696
9797async function tryGetEmail ( ) : Promise < string | null > {
9898 const rc = getRc ( ) ;
99- const apiKey =
100- process . env . LINGO_API_KEY ||
101- process . env . LINGODOTDEV_API_KEY ||
102- rc ?. auth ?. apiKey ;
99+ const apiKey = process . env . LINGODOTDEV_API_KEY || rc ?. auth ?. apiKey ;
103100 const apiUrl =
104- process . env . LINGO_API_URL ||
105101 process . env . LINGODOTDEV_API_URL ||
106102 rc ?. auth ?. apiUrl ||
107103 "https://api.lingo.dev" ;
You can’t perform that action at this time.
0 commit comments