From 3124fd94ed088403b793c31a1f0b55c4d6eb81c6 Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 13 Feb 2024 15:03:03 +0000 Subject: [PATCH 01/14] Creation of load script and addition to readMe for logging dashboard --- k6/README.md | 2 +- k6/k6-html-report.html | 44 ++++++++++++++++++++++++++++++++++++++++++ k6/load.js | 25 ++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 k6/k6-html-report.html create mode 100644 k6/load.js diff --git a/k6/README.md b/k6/README.md index cbb299c4c..a46335b92 100644 --- a/k6/README.md +++ b/k6/README.md @@ -11,4 +11,4 @@ Grafana k6 is an open-source load testing tool that makes performance testing ea ## Running locally 1. Make sure local backend is running, [refer to the backend README](../backend/README.md) -1. in a separate terminal cd into the K6 folder and run `k6 run script.js` (Where 'script' is the name of the script you want to run) \ No newline at end of file +1. in a separate terminal cd into the K6 folder and run `K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_EXPORT=k6-html-report.html K6_WEB_DASHBOARD_OPEN=true k6 run script.js` (Where 'script' is the name of the script you want to run) \ No newline at end of file diff --git a/k6/k6-html-report.html b/k6/k6-html-report.html new file mode 100644 index 000000000..23dd43154 --- /dev/null +++ b/k6/k6-html-report.html @@ -0,0 +1,44 @@ + + + + + + + + + k6 report + + + + + +
+ + + + diff --git a/k6/load.js b/k6/load.js new file mode 100644 index 000000000..e63715821 --- /dev/null +++ b/k6/load.js @@ -0,0 +1,25 @@ +import http from 'k6/http'; +import {check, sleep} from 'k6'; + +export const options = { + // Key configurations for avg load test in this section + stages: [ + { duration: '5m', target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes. + { duration: '5m', target: 100 }, // stay at 100 users for 30 minutes + { duration: '5m', target: 0 }, // ramp-down to 0 users + ], +}; + +export default () => { + const data = { message: "hi", currentLevel: '3' }; + const url = 'http://localhost:3001/test/load'; + + // console.log('VU ID:' + exec.vu.idInTest); + let response = http.post(url, JSON.stringify(data), { + headers: { 'Content-Type': 'application/json' }, + }); + check(response, { + 'response code was 200': (response) => response.status === 200, + }); + sleep(1); +}; \ No newline at end of file From a0a9db58e5ebda0c78edfe47345c7bb39d469cbc Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 20 Feb 2024 11:13:42 +0000 Subject: [PATCH 02/14] Load test vu and cookie logging --- backend/src/controller/testController.ts | 3 +-- k6/load.js | 24 ++++++++++++++++-------- k6/smoke.js | 4 +--- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/backend/src/controller/testController.ts b/backend/src/controller/testController.ts index 3d132a7aa..b11709eb1 100644 --- a/backend/src/controller/testController.ts +++ b/backend/src/controller/testController.ts @@ -1,5 +1,4 @@ import { Response } from 'express'; - import { handleAddInfoToChatHistory } from '@src/controller/chatController'; import { OpenAiAddInfoToChatHistoryRequest } from '@src/models/api/OpenAiAddInfoToChatHistoryRequest'; @@ -8,6 +7,6 @@ function handleTest(req: OpenAiAddInfoToChatHistoryRequest, res: Response) { for (let x = 0; x <= 1000000; x++) { num = num++; } - handleAddInfoToChatHistory(req, res); + handleAddInfoToChatHistory(req, res); } export { handleTest }; diff --git a/k6/load.js b/k6/load.js index e63715821..5c45d75a3 100644 --- a/k6/load.js +++ b/k6/load.js @@ -1,25 +1,33 @@ import http from 'k6/http'; +import exec from 'k6/execution'; import {check, sleep} from 'k6'; export const options = { // Key configurations for avg load test in this section - stages: [ - { duration: '5m', target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes. - { duration: '5m', target: 100 }, // stay at 100 users for 30 minutes - { duration: '5m', target: 0 }, // ramp-down to 0 users - ], + // stages: [ + // { duration: '5m', target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes. + // { duration: '5m', target: 100 }, // stay at 100 users for 30 minutes + // { duration: '5m', target: 0 }, // ramp-down to 0 users + // ], + + vus: 2, // Key for Smoke test. Keep it at 2, 3, max 5 VUs + // duration: '10s', // This can be shorter or just a few iterations + iterations: 4 }; export default () => { - const data = { message: "hi", currentLevel: '3' }; + const data = { infoMessage: "Hi", chatMessageType: 'LEVEL_INFO' , level: 3}; const url = 'http://localhost:3001/test/load'; - // console.log('VU ID:' + exec.vu.idInTest); let response = http.post(url, JSON.stringify(data), { headers: { 'Content-Type': 'application/json' }, - }); + } + ); check(response, { 'response code was 200': (response) => response.status === 200, }); + console.log('VU ID:' + exec.vu.idInTest); + console.log('Cookie:' + response.cookies['prompt-injection.sid'][0].value); + sleep(1); }; \ No newline at end of file diff --git a/k6/smoke.js b/k6/smoke.js index f334467b7..c4df27968 100644 --- a/k6/smoke.js +++ b/k6/smoke.js @@ -1,5 +1,4 @@ import http from 'k6/http'; -// import exec from 'k6/execution'; import { check, sleep } from 'k6'; export const options = { @@ -8,10 +7,9 @@ export const options = { }; export default () => { - const data = { message: "hi", currentLevel: '3' }; + const data = { infoMessage: "Hi", chatMessageType: 'LEVEL_INFO' , level: 3}; const url = 'http://localhost:3001/test/load'; - // console.log('VU ID:' + exec.vu.idInTest); let response = http.post(url, JSON.stringify(data), { headers: { 'Content-Type': 'application/json' }, }); From 039f640e22d2fb79e0d4bc2885e73c45cc7f40c4 Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 20 Feb 2024 11:22:13 +0000 Subject: [PATCH 03/14] linting --- backend/src/controller/testController.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/controller/testController.ts b/backend/src/controller/testController.ts index b11709eb1..a0f7a1b5f 100644 --- a/backend/src/controller/testController.ts +++ b/backend/src/controller/testController.ts @@ -1,4 +1,5 @@ import { Response } from 'express'; + import { handleAddInfoToChatHistory } from '@src/controller/chatController'; import { OpenAiAddInfoToChatHistoryRequest } from '@src/models/api/OpenAiAddInfoToChatHistoryRequest'; From 8da1ddda9f86a136731320b567fe419aa6d3f776 Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 20 Feb 2024 11:23:44 +0000 Subject: [PATCH 04/14] linting again --- backend/src/controller/testController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/controller/testController.ts b/backend/src/controller/testController.ts index a0f7a1b5f..3d132a7aa 100644 --- a/backend/src/controller/testController.ts +++ b/backend/src/controller/testController.ts @@ -8,6 +8,6 @@ function handleTest(req: OpenAiAddInfoToChatHistoryRequest, res: Response) { for (let x = 0; x <= 1000000; x++) { num = num++; } - handleAddInfoToChatHistory(req, res); + handleAddInfoToChatHistory(req, res); } export { handleTest }; From 7d48e2a5fe1f1499754e4563e44c7109045c688a Mon Sep 17 00:00:00 2001 From: Chris Wilton-Magras Date: Wed, 21 Feb 2024 13:47:08 +0000 Subject: [PATCH 05/14] Preserve session cookie in k6 tests --- backend/src/sessionRoutes.ts | 6 +-- k6/load.js | 74 +++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 29 deletions(-) diff --git a/backend/src/sessionRoutes.ts b/backend/src/sessionRoutes.ts index d9a19660e..6f0e656ee 100644 --- a/backend/src/sessionRoutes.ts +++ b/backend/src/sessionRoutes.ts @@ -120,6 +120,9 @@ router.post('/openai/model/configure', handleConfigureModel); // reset progress for all levels router.post('/reset', handleResetProgress); +// Testing endpoints +router.post('/test/load', handleTest); + // Debugging: log headers in prod for primary routes if (isProd) { router.use('/openai', (req, res, next) => { @@ -131,7 +134,4 @@ if (isProd) { }); } -// Testing dummy endpoint -router.post('/test/load', handleTest); - export default router; diff --git a/k6/load.js b/k6/load.js index 5c45d75a3..6199a1dc3 100644 --- a/k6/load.js +++ b/k6/load.js @@ -1,33 +1,55 @@ -import http from 'k6/http'; +import { check, sleep } from 'k6'; import exec from 'k6/execution'; -import {check, sleep} from 'k6'; +import http from 'k6/http'; export const options = { - // Key configurations for avg load test in this section - // stages: [ - // { duration: '5m', target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes. - // { duration: '5m', target: 100 }, // stay at 100 users for 30 minutes - // { duration: '5m', target: 0 }, // ramp-down to 0 users - // ], - - vus: 2, // Key for Smoke test. Keep it at 2, 3, max 5 VUs - // duration: '10s', // This can be shorter or just a few iterations - iterations: 4 + // Key configurations for avg load test in this section + // stages: [ + // { duration: '5m', target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes. + // { duration: '5m', target: 100 }, // stay at 100 users for 30 minutes + // { duration: '5m', target: 0 }, // ramp-down to 0 users + // ], + vus: 2, // Key for Smoke test. Keep it at 2, 3, max 5 VUs + // duration: '10s', // This can be shorter or just a few iterations + iterations: 4 }; +const baseUrl = 'http://localhost:3001'; +const cookieName = 'prompt-injection.sid'; +const vuCookieJar = (() => { + const cookieJars = {}; + return { + get: (id) => cookieJars[id], + set: (id, jar) => cookieJars[id] = jar, + }; +})(); + export default () => { - const data = { infoMessage: "Hi", chatMessageType: 'LEVEL_INFO' , level: 3}; - const url = 'http://localhost:3001/test/load'; - - let response = http.post(url, JSON.stringify(data), { - headers: { 'Content-Type': 'application/json' }, - } - ); - check(response, { - 'response code was 200': (response) => response.status === 200, - }); - console.log('VU ID:' + exec.vu.idInTest); - console.log('Cookie:' + response.cookies['prompt-injection.sid'][0].value); - - sleep(1); + // Use same jar for every iteration of same VU! k6 doesn't do this for us :( + const vuID = exec.vu.idInTest; + let jar = vuCookieJar.get(vuID); + if (!jar) { + jar = http.cookieJar(); + vuCookieJar.set(vuID, jar); + } + let originalCookie = (jar.cookiesForURL(baseUrl)[cookieName] || [])[0]; + console.log(`Cookie was (${vuID}): ${originalCookie}`); //TODO Can remove this + + const data = { infoMessage: "Hi", chatMessageType: 'LEVEL_INFO', level: 3 }; + const response = http.post(`${baseUrl}/test/load`, JSON.stringify(data), { + headers: { 'Content-Type': 'application/json' }, + jar + }); + // Expecting cookie to match original, OR first-time be added to the jar + const expectedCookie = originalCookie || jar.cookiesForURL(baseUrl)[cookieName][0]; + check(response, { + 'response code was 200': (response) => response.status === 200, + 'cookie was preserved': (response) => + response.cookies[cookieName].length === 1 && + response.cookies[cookieName][0].value === expectedCookie, + }); + + console.log(`Cookie now (${vuID}): ${jar.cookiesForURL(baseUrl)[cookieName][0]}`); //TODO Can remove this + + sleep(1); }; \ No newline at end of file From 7bf0c89c20766494074d9696f21bfe93da52df8d Mon Sep 17 00:00:00 2001 From: kclark Date: Thu, 22 Feb 2024 16:36:43 +0000 Subject: [PATCH 06/14] Executor change for more realistic simulation and readme changes --- k6/README.md | 3 ++- k6/k6-html-report.html | 44 ------------------------------------------ k6/load.js | 19 +++++++----------- 3 files changed, 9 insertions(+), 57 deletions(-) delete mode 100644 k6/k6-html-report.html diff --git a/k6/README.md b/k6/README.md index a46335b92..684c33c18 100644 --- a/k6/README.md +++ b/k6/README.md @@ -11,4 +11,5 @@ Grafana k6 is an open-source load testing tool that makes performance testing ea ## Running locally 1. Make sure local backend is running, [refer to the backend README](../backend/README.md) -1. in a separate terminal cd into the K6 folder and run `K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_EXPORT=k6-html-report.html K6_WEB_DASHBOARD_OPEN=true k6 run script.js` (Where 'script' is the name of the script you want to run) \ No newline at end of file +1. in a separate terminal cd into the K6 folder and run `k6 run script.js` (Where 'script' is the name of the script you want to run) +1. If you want a dashboard to view track trends in real time run `K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_OPEN=true k6 run script.js` (Where 'script' is the name of the script you want to run). Note: When running this refresh the dashboard at the end of the run for the test to finish in the terminal \ No newline at end of file diff --git a/k6/k6-html-report.html b/k6/k6-html-report.html deleted file mode 100644 index 23dd43154..000000000 --- a/k6/k6-html-report.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - k6 report - - - - - -
- - - - diff --git a/k6/load.js b/k6/load.js index 6199a1dc3..7b3be560c 100644 --- a/k6/load.js +++ b/k6/load.js @@ -3,15 +3,13 @@ import exec from 'k6/execution'; import http from 'k6/http'; export const options = { - // Key configurations for avg load test in this section - // stages: [ - // { duration: '5m', target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes. - // { duration: '5m', target: 100 }, // stay at 100 users for 30 minutes - // { duration: '5m', target: 0 }, // ramp-down to 0 users - // ], - vus: 2, // Key for Smoke test. Keep it at 2, 3, max 5 VUs - // duration: '10s', // This can be shorter or just a few iterations - iterations: 4 + scenarios: { + contacts: { + executor: 'constant-vus', + vus: 100, + duration: '30m', + }, + }, }; const baseUrl = 'http://localhost:3001'; @@ -33,7 +31,6 @@ export default () => { vuCookieJar.set(vuID, jar); } let originalCookie = (jar.cookiesForURL(baseUrl)[cookieName] || [])[0]; - console.log(`Cookie was (${vuID}): ${originalCookie}`); //TODO Can remove this const data = { infoMessage: "Hi", chatMessageType: 'LEVEL_INFO', level: 3 }; const response = http.post(`${baseUrl}/test/load`, JSON.stringify(data), { @@ -49,7 +46,5 @@ export default () => { response.cookies[cookieName][0].value === expectedCookie, }); - console.log(`Cookie now (${vuID}): ${jar.cookiesForURL(baseUrl)[cookieName][0]}`); //TODO Can remove this - sleep(1); }; \ No newline at end of file From 2c4523edcc22c123471f34a125bf3cebde6e92ce Mon Sep 17 00:00:00 2001 From: kclark Date: Mon, 26 Feb 2024 10:58:06 +0000 Subject: [PATCH 07/14] executor change and added "chaos" --- backend/src/controller/testController.ts | 8 +++----- k6/load.js | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/src/controller/testController.ts b/backend/src/controller/testController.ts index 3d132a7aa..5bfd245c3 100644 --- a/backend/src/controller/testController.ts +++ b/backend/src/controller/testController.ts @@ -4,10 +4,8 @@ import { handleAddInfoToChatHistory } from '@src/controller/chatController'; import { OpenAiAddInfoToChatHistoryRequest } from '@src/models/api/OpenAiAddInfoToChatHistoryRequest'; function handleTest(req: OpenAiAddInfoToChatHistoryRequest, res: Response) { - let num = 0; - for (let x = 0; x <= 1000000; x++) { - num = num++; - } - handleAddInfoToChatHistory(req, res); + const ranNum = Math.round((Math.random()+1)*1000); + + setTimeout(() => handleAddInfoToChatHistory(req, res), ranNum); } export { handleTest }; diff --git a/k6/load.js b/k6/load.js index 7b3be560c..6947d306f 100644 --- a/k6/load.js +++ b/k6/load.js @@ -3,6 +3,7 @@ import exec from 'k6/execution'; import http from 'k6/http'; export const options = { + //vus and duration can be changed depending on what simulation needed running scenarios: { contacts: { executor: 'constant-vus', From 62a7a81187130b12f05f018e030cc4ec08d43073 Mon Sep 17 00:00:00 2001 From: kclark Date: Mon, 26 Feb 2024 11:01:50 +0000 Subject: [PATCH 08/14] linting --- backend/src/controller/testController.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/controller/testController.ts b/backend/src/controller/testController.ts index 5bfd245c3..13882ccdb 100644 --- a/backend/src/controller/testController.ts +++ b/backend/src/controller/testController.ts @@ -4,8 +4,10 @@ import { handleAddInfoToChatHistory } from '@src/controller/chatController'; import { OpenAiAddInfoToChatHistoryRequest } from '@src/models/api/OpenAiAddInfoToChatHistoryRequest'; function handleTest(req: OpenAiAddInfoToChatHistoryRequest, res: Response) { - const ranNum = Math.round((Math.random()+1)*1000); - - setTimeout(() => handleAddInfoToChatHistory(req, res), ranNum); + const ranNum = Math.round((Math.random() + 1) * 1000); + + setTimeout(() => { + handleAddInfoToChatHistory(req, res); + }, ranNum); } export { handleTest }; From 605450e9456c527a739ef7df7e4eeefd9296a217 Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 27 Feb 2024 10:34:37 +0000 Subject: [PATCH 09/14] Adding in prettier to k6 file --- k6/.eslintrc.cjs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ k6/README.md | 4 ++-- k6/load.js | 23 ++++++++++--------- k6/package.json | 15 +++++++++++++ k6/smoke.js | 24 ++++++++++---------- 5 files changed, 99 insertions(+), 25 deletions(-) create mode 100644 k6/.eslintrc.cjs create mode 100644 k6/package.json diff --git a/k6/.eslintrc.cjs b/k6/.eslintrc.cjs new file mode 100644 index 000000000..25b8dfa6e --- /dev/null +++ b/k6/.eslintrc.cjs @@ -0,0 +1,58 @@ +/* eslint-env node */ +module.exports = { + root: true, + settings: { + 'import/resolver': { + alias: { + map: [['@src', './src']], + extensions: ['.ts', '.js', '.json'], + }, + }, + }, + extends: [ + 'eslint:recommended', + 'plugin:import/recommended', + ], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + ignorePatterns: ['node_modules'], + rules: { + eqeqeq: 'error', + 'func-style': ['error', 'declaration'], + 'object-shorthand': 'error', + 'no-restricted-imports': [ + 'error', + { + patterns: ['../*'], + }, + ], + 'prefer-template': 'error', + 'import/no-unresolved': [ + 'error', + { + ignore: ['k6/*'] + } + ], + 'import/order': [ + 'error', + { + alphabetize: { order: 'asc' }, + 'newlines-between': 'always', + warnOnUnassignedImports: true, + pathGroups: [ + { + pattern: '@src/**', + group: 'internal', + position: 'before', + }, + ], + groups: [ + ['builtin', 'external'], + ['internal', 'parent', 'index', 'sibling'], + ['object', 'type'], + ], + }, + ], + 'no-mixed-spaces-and-tabs': 0, // disable rule + }, +}; diff --git a/k6/README.md b/k6/README.md index 684c33c18..08d004cea 100644 --- a/k6/README.md +++ b/k6/README.md @@ -11,5 +11,5 @@ Grafana k6 is an open-source load testing tool that makes performance testing ea ## Running locally 1. Make sure local backend is running, [refer to the backend README](../backend/README.md) -1. in a separate terminal cd into the K6 folder and run `k6 run script.js` (Where 'script' is the name of the script you want to run) -1. If you want a dashboard to view track trends in real time run `K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_OPEN=true k6 run script.js` (Where 'script' is the name of the script you want to run). Note: When running this refresh the dashboard at the end of the run for the test to finish in the terminal \ No newline at end of file +1. in a separate terminal cd into the K6 folder and run `npm test script.js` (Where 'script' is the name of the script you want to run) +1. If you want a dashboard to view track trends in real time run `K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_OPEN=true k6 run script.js` (Where 'script' is the name of the script you want to run). Note: When running this refresh the dashboard at the end of the run for the test to finish in the terminal diff --git a/k6/load.js b/k6/load.js index 6947d306f..2bbfb370d 100644 --- a/k6/load.js +++ b/k6/load.js @@ -5,12 +5,12 @@ import http from 'k6/http'; export const options = { //vus and duration can be changed depending on what simulation needed running scenarios: { - contacts: { - executor: 'constant-vus', - vus: 100, - duration: '30m', - }, - }, + contacts: { + executor: 'constant-vus', + vus: 100, + duration: '30m', + }, + }, }; const baseUrl = 'http://localhost:3001'; @@ -19,7 +19,7 @@ const vuCookieJar = (() => { const cookieJars = {}; return { get: (id) => cookieJars[id], - set: (id, jar) => cookieJars[id] = jar, + set: (id, jar) => (cookieJars[id] = jar), }; })(); @@ -33,13 +33,14 @@ export default () => { } let originalCookie = (jar.cookiesForURL(baseUrl)[cookieName] || [])[0]; - const data = { infoMessage: "Hi", chatMessageType: 'LEVEL_INFO', level: 3 }; + const data = { infoMessage: 'Hi', chatMessageType: 'LEVEL_INFO', level: 3 }; const response = http.post(`${baseUrl}/test/load`, JSON.stringify(data), { headers: { 'Content-Type': 'application/json' }, - jar + jar, }); // Expecting cookie to match original, OR first-time be added to the jar - const expectedCookie = originalCookie || jar.cookiesForURL(baseUrl)[cookieName][0]; + const expectedCookie = + originalCookie || jar.cookiesForURL(baseUrl)[cookieName][0]; check(response, { 'response code was 200': (response) => response.status === 200, 'cookie was preserved': (response) => @@ -48,4 +49,4 @@ export default () => { }); sleep(1); -}; \ No newline at end of file +}; diff --git a/k6/package.json b/k6/package.json new file mode 100644 index 000000000..e359f4783 --- /dev/null +++ b/k6/package.json @@ -0,0 +1,15 @@ +{ + "name": "prompt-injection-k6", + "version": "0.1.0", + "type": "module", + "scripts": { + "format": "prettier --write .", + "lint": "eslint . --fix", + "test" : "k6 run" + }, + "dependencies": {}, + "devDependencies": { + "eslint": "^8.53.0", + "prettier": "^2.8.8" + } +} diff --git a/k6/smoke.js b/k6/smoke.js index c4df27968..380b9519d 100644 --- a/k6/smoke.js +++ b/k6/smoke.js @@ -1,20 +1,20 @@ -import http from 'k6/http'; import { check, sleep } from 'k6'; +import http from 'k6/http'; export const options = { - vus: 3, // Key for Smoke test. Keep it at 2, 3, max 5 VUs - duration: '10s', // This can be shorter or just a few iterations + vus: 3, // Key for Smoke test. Keep it at 2, 3, max 5 VUs + duration: '10s', // This can be shorter or just a few iterations }; export default () => { - const data = { infoMessage: "Hi", chatMessageType: 'LEVEL_INFO' , level: 3}; - const url = 'http://localhost:3001/test/load'; + const data = { infoMessage: 'Hi', chatMessageType: 'LEVEL_INFO', level: 3 }; + const url = 'http://localhost:3001/test/load'; - let response = http.post(url, JSON.stringify(data), { - headers: { 'Content-Type': 'application/json' }, - }); - check(response, { - 'response code was 200': (response) => response.status === 200, - }); - sleep(0.1); + let response = http.post(url, JSON.stringify(data), { + headers: { 'Content-Type': 'application/json' }, + }); + check(response, { + 'response code was 200': (response) => response.status === 200, + }); + sleep(0.1); }; From 06659cf019ed1d39e395b4582fc3b4a3d1730fc1 Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 27 Feb 2024 10:41:17 +0000 Subject: [PATCH 10/14] github workflow job addition --- .github/workflows/node.js.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b1191bdde..97181ac08 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -64,3 +64,15 @@ jobs: - run: npx prettier . --check - run: npm run build - run: npm test + + build-test-k6: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./k6 + steps: + - uses: actions/checkout@v3 + - run: npx eslint . + - run: npx stylelint '**/*.css' + - run: npx prettier . --check From a68dc4c726205b67c6d220ccea328df127e462cf Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 27 Feb 2024 10:48:55 +0000 Subject: [PATCH 11/14] package fix --- .github/workflows/node.js.yml | 12 + k6/package-lock.json | 2738 +++++++++++++++++++++++++++++++++ k6/package.json | 5 +- 3 files changed, 2754 insertions(+), 1 deletion(-) create mode 100644 k6/package-lock.json diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 97181ac08..c193415fc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -68,11 +68,23 @@ jobs: build-test-k6: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + defaults: run: working-directory: ./k6 steps: - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + cache-dependency-path: "./frontend/package-lock.json" + - run: npm ci - run: npx eslint . - run: npx stylelint '**/*.css' - run: npx prettier . --check diff --git a/k6/package-lock.json b/k6/package-lock.json new file mode 100644 index 000000000..eb3cb26eb --- /dev/null +++ b/k6/package-lock.json @@ -0,0 +1,2738 @@ +{ + "name": "prompt-injection-k6", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "prompt-injection-k6", + "version": "0.1.0", + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.53.0", + "eslint-plugin-import": "^2.29.0", + "prettier": "^2.8.8" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "dev": true, + "license": "ISC" + }, + "node_modules/acorn": { + "version": "8.11.3", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.filter": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/es-abstract": { + "version": "1.22.4", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.7", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.2", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.1", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.0", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.1", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.29.1", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.17.1", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "dev": true, + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "array.prototype.filter": "^1.0.3", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.0.0" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "7.6.0", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.14", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.5", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/k6/package.json b/k6/package.json index e359f4783..d728c1d3d 100644 --- a/k6/package.json +++ b/k6/package.json @@ -10,6 +10,9 @@ "dependencies": {}, "devDependencies": { "eslint": "^8.53.0", - "prettier": "^2.8.8" + "prettier": "^2.8.8", + "eslint-plugin-import": "^2.29.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0" } } From cbab24fbab393aa1fa60686c5e227823e621b048 Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 27 Feb 2024 10:52:36 +0000 Subject: [PATCH 12/14] alias --- k6/.eslintrc.cjs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/k6/.eslintrc.cjs b/k6/.eslintrc.cjs index 25b8dfa6e..fd9840052 100644 --- a/k6/.eslintrc.cjs +++ b/k6/.eslintrc.cjs @@ -1,14 +1,6 @@ /* eslint-env node */ module.exports = { root: true, - settings: { - 'import/resolver': { - alias: { - map: [['@src', './src']], - extensions: ['.ts', '.js', '.json'], - }, - }, - }, extends: [ 'eslint:recommended', 'plugin:import/recommended', From ca3765ab46137192b203746c48a83088ffa684a7 Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 27 Feb 2024 10:55:01 +0000 Subject: [PATCH 13/14] stlylelint --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c193415fc..a0e31b589 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -86,5 +86,4 @@ jobs: cache-dependency-path: "./frontend/package-lock.json" - run: npm ci - run: npx eslint . - - run: npx stylelint '**/*.css' - run: npx prettier . --check From f51ef2fb94e744695f8e004ae6595dc53064050d Mon Sep 17 00:00:00 2001 From: kclark Date: Tue, 27 Feb 2024 10:56:23 +0000 Subject: [PATCH 14/14] linting --- k6/.eslintrc.cjs | 11 ++++------- k6/package.json | 6 +++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/k6/.eslintrc.cjs b/k6/.eslintrc.cjs index fd9840052..9afdc0d9e 100644 --- a/k6/.eslintrc.cjs +++ b/k6/.eslintrc.cjs @@ -1,10 +1,7 @@ /* eslint-env node */ module.exports = { root: true, - extends: [ - 'eslint:recommended', - 'plugin:import/recommended', - ], + extends: ['eslint:recommended', 'plugin:import/recommended'], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], ignorePatterns: ['node_modules'], @@ -19,11 +16,11 @@ module.exports = { }, ], 'prefer-template': 'error', - 'import/no-unresolved': [ + 'import/no-unresolved': [ 'error', { - ignore: ['k6/*'] - } + ignore: ['k6/*'], + }, ], 'import/order': [ 'error', diff --git a/k6/package.json b/k6/package.json index d728c1d3d..e27325218 100644 --- a/k6/package.json +++ b/k6/package.json @@ -5,14 +5,14 @@ "scripts": { "format": "prettier --write .", "lint": "eslint . --fix", - "test" : "k6 run" + "test": "k6 run" }, "dependencies": {}, "devDependencies": { "eslint": "^8.53.0", "prettier": "^2.8.8", - "eslint-plugin-import": "^2.29.0", - "@typescript-eslint/eslint-plugin": "^6.0.0", + "eslint-plugin-import": "^2.29.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0" } }