Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Vulnerabilities #259

Merged
merged 5 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
720 changes: 350 additions & 370 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"jest-environment-jsdom": "^28.1.0",
"ts-loader": "^8.4.0",
"typescript": "^4.0.3",
"webpack": "^5.73.0",
"webpack": "^5.90.0",
"webpack-cli": "^4.4.0"
},
"dependencies": {
Expand Down
982 changes: 514 additions & 468 deletions test-site/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"devDependencies": {
"ts-loader": "^9.2.6",
"typescript": "^4.4.3",
"webpack": "^5.58.1",
"webpack": "^5.90.0",
"webpack-cli": "^4.9.0"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions test-site/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import questionRequest from './requests/questionRequest';
import { univeralAutocompleteRequest, verticalAutocompleteRequest, filterSearchRequest } from './requests/autocompleteRequests';

const coreConfig = {
apiKey: 'df4b24f4075800e5e9705090c54c6c13',
apiKey: process.env.API_KEY,
experienceKey: 'rosetest',
locale: 'en',
experienceVersion: 'PRODUCTION',
Expand Down Expand Up @@ -62,13 +62,13 @@ export async function filterSearch() {
}

function loadingSpinner() {
element.innerHTML = 'Loading...';
element.textContent = 'Loading...';
}

function updateUI(data, startTime, msg) {
const latency = new Date().getTime() - startTime + 'ms';
const dataString = JSON.stringify(data, undefined, 2);
element.innerHTML = latency + '\n' + dataString;
element.textContent = latency + '\n' + dataString;

console.log(msg);
console.log(data);
Expand Down
6 changes: 3 additions & 3 deletions test-site/src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { univeralAutocompleteRequest, verticalAutocompleteRequest, filterSearchR
import initDirectAnswers from './initDirectAnswers';

const coreConfig: SearchConfig = {
apiKey: '2d8c550071a64ea23e263118a2b0680b',
apiKey: process.env.API_KEY,
experienceKey: 'slanswers',
locale: 'en',
experienceVersion: 'PRODUCTION',
Expand Down Expand Up @@ -72,13 +72,13 @@ export async function filterSearch(): Promise<void> {
}

function loadingSpinner() {
element.innerHTML = 'Loading...';
element.textContent = 'Loading...';
}

function updateUI(data: unknown, startTime: number, msg: string) {
const latency = new Date().getTime() - startTime + 'ms';
const dataString = JSON.stringify(data, undefined, 2);
element.innerHTML = latency + '\n' + dataString;
element.textContent = latency + '\n' + dataString;

console.log(msg);
console.log(data);
Expand Down
7 changes: 7 additions & 0 deletions test-site/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
const path = require('path');
const webpack = require('webpack');

const webpackPlugin = new webpack.DefinePlugin({
'process.env.API_KEY': JSON.stringify(process.env.API_KEY),
});

module.exports = [{
mode: 'development',
Expand All @@ -20,6 +25,7 @@ module.exports = [{
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'window'
},
plugins: [webpackPlugin],
}, {
mode: 'development',
entry: './src/js/index.js',
Expand All @@ -32,4 +38,5 @@ module.exports = [{
libraryTarget: 'window'
},
target: ['web', 'es5'],
plugins: [webpackPlugin],
}];
Loading