11import { Response , HTTPError } from 'got' ;
2- import { Authentication , postRequestAPI } from './modules/api-connect/index.js ' ;
2+ import { Authentication , postRequestAPI } from '@dashlane/apiconnect-worker ' ;
33import { CLI_VERSION , cliVersionToString } from './cliVersion.js' ;
44import { gotImplementation } from './utils/index.js' ;
55import { logger } from './logger.js' ;
@@ -34,14 +34,6 @@ const dashlaneApiKeys = {
3434 appSecretKey : 'boUtXxmDgLUtNFaigCMQ3+u+LAx0tg1ePAUE13nkR7dto+Zwq1naOHZTwbxxM7iL' ,
3535} ;
3636
37- const makeStagingCloudflareHeaders = ( ) =>
38- process . env . CLOUDFLARE_SERVICE_TOKEN_ACCESS
39- ? {
40- 'CF-Access-Client-Id' : process . env . CLOUDFLARE_SERVICE_TOKEN_ACCESS ?? '' ,
41- 'CF-Access-Client-Secret' : process . env . CLOUDFLARE_SERVICE_TOKEN_SECRET ?? '' ,
42- }
43- : undefined ;
44-
4537const requestApi = async < T > ( params : RequestApi ) : Promise < T > => {
4638 const { payload, path, authentication, isNitroEncryptionService } = params ;
4739
@@ -53,7 +45,6 @@ const requestApi = async <T>(params: RequestApi): Promise<T> => {
5345 path : ( isNitroEncryptionService ? 'v1-nitro-encryption-service/' : 'v1/' ) + path ,
5446 payload,
5547 userAgent : `Dashlane CLI v${ cliVersionToString ( CLI_VERSION ) } ` ,
56- customHeaders : makeStagingCloudflareHeaders ( ) ,
5748 customHost : process . env . DCLI_STAGING_HOST ,
5849 } ) ;
5950 } catch ( error : unknown ) {
0 commit comments