export const pluginName = require ( '../package.json' ) . name ; export const envOverrideOperationManifest = 'APOLLO_OPERATION_MANIFEST_BASE_URL' ; export const envOverrideStorageSecretBaseUrl = 'APOLLO_STORAGE_SECRET_BASE_URL' ; export const fakeTestBaseUrl = 'https://fake-host-for-apollo-op-reg-tests' ; export const urlOperationManifestBase = process . env [ envOverrideOperationManifest ] ?. replace ( /\/$/ , '' ) || process . env [ '__APOLLO_OPERATION_REGISTRY_TESTS__' ] === 'true' ? fakeTestBaseUrl : 'https://operations.api.apollographql.com' ; export const urlStorageSecretBase = process . env [ envOverrideStorageSecretBaseUrl ] ?. replace ( /\/$/ , '' ) || process . env [ '__APOLLO_OPERATION_REGISTRY_TESTS__' ] === 'true' ? fakeTestBaseUrl : 'https://storage-secrets.api.apollographql.com' ; export const getStoreKey = ( signature ) => `${ signature }` ; export function getStorageSecretUrl ( graphId , apiKeyHash ) { return `${ urlStorageSecretBase }/${ graphId }/storage-secret/${ apiKeyHash }.json` ; } export function getOperationManifestUrl ( graphId , storageSecret , graphVariant ) { return `${ urlOperationManifestBase }/${ graphId }/${ storageSecret }/${ graphVariant }/manifest.v2.json` ; } export function signatureForLogging ( signature ) { if ( typeof signature !== 'string' ) { return '<non-string>' ; } return signature . substring ( 0 , 8 ) ; }