Skip to content

Commit

Permalink
Remove env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
likimmy committed Feb 8, 2024
1 parent 9cd2a8d commit 097d676
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 20 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/acceptance_headless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ jobs:
headless-acceptance-tests:
name: Chrome Acceptance Tests (Headless)
runs-on: ubuntu-latest
env:
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions static/js/default-map-api-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export function getDefaultMapApiKey(mapProvider) {
}
switch (mapProvider.toLowerCase()) {
case 'google':
return process.env.GOOGLE_API_KEY;
return 'AIzaSyB5D45ghF1YMfqTLSzWubmlCN1euBVPhFw';
case 'mapbox':
return process.env.MAPBOX_API_KEY;
return 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
default:
throw new Error(
`Given mapProvider: '${mapProvider}' is invalid. Expects either 'google' or 'mapbox'.`
Expand Down
2 changes: 1 addition & 1 deletion static/js/theme-map/Maps/Providers/Leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class LeafletPin extends ProviderPin {

// Load Function

const yextAPIKey = process.env.LEAFLET_API_KEY;
const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
const baseUrl = 'https://unpkg.com/leaflet@1.6.0/dist/leaflet';

/**
Expand Down
2 changes: 1 addition & 1 deletion static/js/theme-map/Maps/Providers/Mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class MapboxPin extends ProviderPin {

// Load Function

const yextAPIKey = process.env.MAPBOX_API_KEY;
const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';

/**
* This function is called when calling {@link MapProvider#load} on {@link module:Maps/Providers/Mapbox.MapboxMaps}.
Expand Down
4 changes: 0 additions & 4 deletions static/sample.env

This file was deleted.

5 changes: 0 additions & 5 deletions static/webpack-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const RemovePlugin = require('remove-files-webpack-plugin');
const { merge } = require('webpack-merge');
const { parse } = require('comment-json');
const RtlCssPlugin = require('rtlcss-webpack-plugin');
require('dotenv').config({ path: './.env' });

module.exports = function () {
const jamboConfig = require('./jambo.json');
Expand Down Expand Up @@ -73,10 +72,6 @@ module.exports = function () {
...htmlPlugins,
new webpack.DefinePlugin({
'process.env.JAMBO_INJECTED_DATA': JSON.stringify(jamboInjectedData),
'process.env.MAPBOX_API_KEY': JSON.stringify(process.env.MAPBOX_API_KEY) || 'REPLACE_ME',
'process.env.BAIDU_API_KEY': JSON.stringify(process.env.BAIDU_API_KEY) || 'REPLACE_ME',
'process.env.GOOGLE_API_KEY': JSON.stringify(process.env.GOOGLE_API_KEY) || 'REPLACE_ME',
'process.env.LEAFLET_API_KEY': JSON.stringify(process.env.LEAFLET_API_KEY) || 'REPLACE_ME',
}),
new RemovePlugin({
after: {
Expand Down
4 changes: 0 additions & 4 deletions test-site/sample.env

This file was deleted.

0 comments on commit 097d676

Please sign in to comment.