test: add unit test for init tracker

This commit is contained in:
moonrailgun 2024-04-13 01:25:55 +08:00
parent cdcd6e2284
commit a1e4a26758
5 changed files with 461 additions and 3 deletions

View File

@ -6,7 +6,7 @@
"scripts": {
"build": "tsc",
"prepare": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "vitest"
},
"keywords": [
"tianji"
@ -15,5 +15,11 @@
"license": "MIT",
"dependencies": {
"load-script": "^2.0.0"
},
"devDependencies": {
"@testing-library/dom": "^10.0.0",
"happy-dom": "^14.7.1",
"msw": "^2.2.13",
"vitest": "^1.2.1"
}
}

View File

@ -0,0 +1,133 @@
import { describe, test, expect, beforeEach } from 'vitest';
import { initTianjiTracker } from './tracker';
describe('initTianjiTracker', () => {
beforeEach(() => {
document.head.innerHTML = '';
document.body.innerHTML = '';
});
test('simple', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/tracker.js');
expect(scriptDoms[0].async).toBe(true);
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
});
});
test('customTrackerName', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
customTrackerName: 'custom.js',
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/custom.js');
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
});
});
test('auto-track set true', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
autoTrack: true,
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/tracker.js');
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
});
});
test('auto-track set false', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
autoTrack: false,
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/tracker.js');
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
autoTrack: 'false',
});
});
test('domains', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
domains: ['example.com', 'www.example.com'],
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/tracker.js');
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
domains: 'example.com,www.example.com',
});
});
test('disableTrack', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
disableTrack: true,
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/tracker.js');
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
doNotTrack: 'true',
});
});
test('autoTrack set true', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
autoTrack: true,
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/tracker.js');
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
});
});
test('autoTrack set false', async () => {
await initTianjiTracker({
url: 'https://example.com',
websiteId: 'fooo',
autoTrack: false,
});
const scriptDoms = document.querySelectorAll('script');
expect(scriptDoms.length).toBe(1);
expect(scriptDoms[0].src).toBe('https://example.com/tracker.js');
expect(scriptDoms[0].dataset).toEqual({
websiteId: 'fooo',
autoTrack: 'false',
});
});
});

View File

@ -0,0 +1,20 @@
import { afterAll, afterEach, beforeAll } from 'vitest';
import { setupServer } from 'msw/node';
import { HttpResponse, http } from 'msw';
export const restHandlers = [
http.get('https://example.com/*', () => {
return HttpResponse.text('var a = 1;');
}),
];
const server = setupServer(...restHandlers);
// 在所有测试之前启动服务器
beforeAll(() => server.listen({ onUnhandledRequest: 'error' }));
// 所有测试后关闭服务器
afterAll(() => server.close());
// 每次测试后重置处理程序 `对测试隔离很重要`
afterEach(() => server.resetHandlers());

View File

@ -0,0 +1,8 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'happy-dom',
setupFiles: ['./tests/setup.ts'],
},
});

View File

@ -66,6 +66,19 @@ importers:
load-script:
specifier: ^2.0.0
version: 2.0.0
devDependencies:
'@testing-library/dom':
specifier: ^10.0.0
version: 10.0.0
happy-dom:
specifier: ^14.7.1
version: 14.7.1
msw:
specifier: ^2.2.13
version: 2.2.13(typescript@5.2.2)
vitest:
specifier: ^1.2.1
version: 1.2.1(@types/node@18.17.12)(happy-dom@14.7.1)
src/client:
dependencies:
@ -547,7 +560,7 @@ importers:
version: 5.0.12(@types/node@18.17.12)(less@4.2.0)
vitest:
specifier: ^1.2.1
version: 1.2.1(@types/node@18.17.12)(less@4.2.0)
version: 1.2.1(@types/node@18.17.12)(happy-dom@14.7.1)
src/shared:
dependencies:
@ -4461,6 +4474,18 @@ packages:
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
/@bundled-es-modules/cookie@2.0.0:
resolution: {integrity: sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==}
dependencies:
cookie: 0.5.0
dev: true
/@bundled-es-modules/statuses@1.0.1:
resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==}
dependencies:
statuses: 2.0.1
dev: true
/@colors/colors@1.5.0:
resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==}
engines: {node: '>=0.1.90'}
@ -6365,6 +6390,38 @@ packages:
react: 18.2.0
dev: false
/@inquirer/confirm@3.1.2:
resolution: {integrity: sha512-xQeRxRpVOQdBinIyOHX9+/nTrvt84NnaP8hym5ARdLr6a5T1ckowx70sEaItgULBHlxSIJL970BoRfFxlzO2IA==}
engines: {node: '>=18'}
dependencies:
'@inquirer/core': 7.1.2
'@inquirer/type': 1.2.1
dev: true
/@inquirer/core@7.1.2:
resolution: {integrity: sha512-ne5VhDqruYYzx8mmjDZ9F58ymrLJGxmSHJUcJGiW3tifzvl3goAm6gNX11w6+zUnGE54vgQ6ALDXL3IOSezMRw==}
engines: {node: '>=18'}
dependencies:
'@inquirer/type': 1.2.1
'@types/mute-stream': 0.0.4
'@types/node': 20.12.7
'@types/wrap-ansi': 3.0.0
ansi-escapes: 4.3.2
chalk: 4.1.2
cli-spinners: 2.9.2
cli-width: 4.1.0
figures: 3.2.0
mute-stream: 1.0.0
signal-exit: 4.1.0
strip-ansi: 6.0.1
wrap-ansi: 6.2.0
dev: true
/@inquirer/type@1.2.1:
resolution: {integrity: sha512-xwMfkPAxeo8Ji/IxfUSqzRi0/+F2GIqJmpc5/thelgMGsjNZcjDDRBO9TLXT1s/hdx/mK5QbVIvgoLIFgXhTMQ==}
engines: {node: '>=18'}
dev: true
/@jest/schemas@29.6.3:
resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@ -6678,6 +6735,23 @@ packages:
react-dom: 18.2.0(react@18.2.0)
dev: false
/@mswjs/cookies@1.1.0:
resolution: {integrity: sha512-0ZcCVQxifZmhwNBoQIrystCb+2sWBY2Zw8lpfJBPCHGCA/HWqehITeCRVIv4VMy8MPlaHo2w2pTHFV2pFfqKPw==}
engines: {node: '>=18'}
dev: true
/@mswjs/interceptors@0.26.15:
resolution: {integrity: sha512-HM47Lu1YFmnYHKMBynFfjCp0U/yRskHj/8QEJW0CBEPOlw8Gkmjfll+S9b8M7V5CNDw2/ciRxjjnWeaCiblSIQ==}
engines: {node: '>=18'}
dependencies:
'@open-draft/deferred-promise': 2.2.0
'@open-draft/logger': 0.3.0
'@open-draft/until': 2.1.0
is-node-process: 1.2.0
outvariant: 1.4.2
strict-event-emitter: 0.5.1
dev: true
/@next/env@14.1.3:
resolution: {integrity: sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ==}
dev: false
@ -6893,6 +6967,21 @@ packages:
'@octokit/openapi-types': 19.1.0
dev: true
/@open-draft/deferred-promise@2.2.0:
resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==}
dev: true
/@open-draft/logger@0.3.0:
resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==}
dependencies:
is-node-process: 1.2.0
outvariant: 1.4.2
dev: true
/@open-draft/until@2.1.0:
resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==}
dev: true
/@opentelemetry/api@1.4.1:
resolution: {integrity: sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==}
engines: {node: '>=8.0.0'}
@ -8705,6 +8794,20 @@ packages:
resolution: {integrity: sha512-SYXOBTjJb05rXa2vl55TTwO40A6wKu0R5i1qQwhJYNDIqaIGF7D0HsLw+pJAyi2OvntlEIVusx3xtbbgSUi6zg==}
dev: false
/@testing-library/dom@10.0.0:
resolution: {integrity: sha512-PmJPnogldqoVFf+EwbHvbBJ98MmqASV8kLrBYgsDNxQcFMeIS7JFL48sfyXvuMtgmWO/wMhh25odr+8VhDmn4g==}
engines: {node: '>=18'}
dependencies:
'@babel/code-frame': 7.23.5
'@babel/runtime': 7.24.0
'@types/aria-query': 5.0.4
aria-query: 5.3.0
chalk: 4.1.2
dom-accessibility-api: 0.5.16
lz-string: 1.5.0
pretty-format: 27.5.1
dev: true
/@tootallnate/quickjs-emscripten@0.23.0:
resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==}
@ -9819,6 +9922,10 @@ packages:
'@types/estree': 1.0.5
dev: true
/@types/aria-query@5.0.4:
resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==}
dev: true
/@types/bcryptjs@2.4.3:
resolution: {integrity: sha512-XTnH9E/rp51aKGsiMtQCHV/owDLW2E9QAxI7ItpWWm6Gi6XO1e4o3VuEYDma0lbitj1vNOBj05Qk8l2BYoiN4A==}
dev: true
@ -9855,6 +9962,10 @@ packages:
resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==}
dev: false
/@types/cookie@0.6.0:
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
dev: true
/@types/cookiejar@2.1.5:
resolution: {integrity: sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==}
dev: true
@ -10102,6 +10213,12 @@ packages:
/@types/ms@0.7.34:
resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==}
/@types/mute-stream@0.0.4:
resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==}
dependencies:
'@types/node': 18.17.12
dev: true
/@types/node-fetch@2.6.11:
resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==}
dependencies:
@ -10121,6 +10238,12 @@ packages:
/@types/node@18.17.12:
resolution: {integrity: sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ==}
/@types/node@20.12.7:
resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==}
dependencies:
undici-types: 5.26.5
dev: true
/@types/nodemailer@6.4.11:
resolution: {integrity: sha512-Ld2c0frwpGT4VseuoeboCXQ7UJIkK3X7Lx/4YsZEiUHtHsthWAOCYtf6PAiLhMtfwV0cWJRabLBS3+LD8x6Nrw==}
dependencies:
@ -10299,6 +10422,10 @@ packages:
dependencies:
'@types/node': 18.17.12
/@types/statuses@2.0.5:
resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==}
dev: true
/@types/superagent@8.1.6:
resolution: {integrity: sha512-yzBOv+6meEHSzV2NThYYOA6RtqvPr3Hbob9ZLp3i07SH27CrYVfm8CrF7ydTmidtelsFiKx2I4gZAiAOamGgvQ==}
dependencies:
@ -10353,6 +10480,10 @@ packages:
resolution: {integrity: sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==}
dev: true
/@types/wrap-ansi@3.0.0:
resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==}
dev: true
/@types/ws@8.5.10:
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
dependencies:
@ -11060,6 +11191,12 @@ packages:
tslib: 2.6.2
dev: false
/aria-query@5.3.0:
resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==}
dependencies:
dequal: 2.0.3
dev: true
/arr-union@3.1.0:
resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==}
engines: {node: '>=0.10.0'}
@ -13807,6 +13944,10 @@ packages:
- webpack-cli
dev: false
/dom-accessibility-api@0.5.16:
resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==}
dev: true
/dom-align@1.12.4:
resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==}
dev: false
@ -15478,6 +15619,11 @@ packages:
lodash: 4.17.21
dev: false
/graphql@16.8.1:
resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==}
engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0}
dev: true
/gray-matter@4.0.3:
resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==}
engines: {node: '>=6.0'}
@ -15537,6 +15683,15 @@ packages:
uglify-js: 3.17.4
dev: true
/happy-dom@14.7.1:
resolution: {integrity: sha512-v60Q0evZ4clvMcrAh5/F8EdxDdfHdFrtffz/CNe10jKD+nFweZVxM91tW+UyY2L4AtpgIaXdZ7TQmiO1pfcwbg==}
engines: {node: '>=16.0.0'}
dependencies:
entities: 4.5.0
webidl-conversions: 7.0.0
whatwg-mimetype: 3.0.0
dev: true
/has-ansi@2.0.0:
resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==}
engines: {node: '>=0.10.0'}
@ -15799,6 +15954,10 @@ packages:
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
hasBin: true
/headers-polyfill@4.0.3:
resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==}
dev: true
/hexoid@1.0.0:
resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==}
engines: {node: '>=8'}
@ -16568,6 +16727,10 @@ packages:
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
engines: {node: '>= 0.4'}
/is-node-process@1.2.0:
resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==}
dev: true
/is-npm@5.0.0:
resolution: {integrity: sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==}
engines: {node: '>=10'}
@ -17449,6 +17612,11 @@ packages:
react: 18.2.0
dev: false
/lz-string@1.5.0:
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
hasBin: true
dev: true
/macos-release@3.2.0:
resolution: {integrity: sha512-fSErXALFNsnowREYZ49XCdOHF8wOPWuFOGQrAhP7x5J/BqQv+B02cNsTykGpDgRVx43EKg++6ANmTaGTtW+hUA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@ -18605,6 +18773,37 @@ packages:
/ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
/msw@2.2.13(typescript@5.2.2):
resolution: {integrity: sha512-ljFf1xZsU0b4zv1l7xzEmC6OZA6yD06hcx0H+dc8V0VypaP3HGYJa1rMLjQbBWl32ptGhcfwcPCWDB1wjmsftw==}
engines: {node: '>=18'}
hasBin: true
requiresBuild: true
peerDependencies:
typescript: '>= 4.7.x'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@bundled-es-modules/cookie': 2.0.0
'@bundled-es-modules/statuses': 1.0.1
'@inquirer/confirm': 3.1.2
'@mswjs/cookies': 1.1.0
'@mswjs/interceptors': 0.26.15
'@open-draft/until': 2.1.0
'@types/cookie': 0.6.0
'@types/statuses': 2.0.5
chalk: 4.1.2
graphql: 16.8.1
headers-polyfill: 4.0.3
is-node-process: 1.2.0
outvariant: 1.4.2
path-to-regexp: 6.2.2
strict-event-emitter: 0.5.1
type-fest: 4.9.0
typescript: 5.2.2
yargs: 17.7.2
dev: true
/multicast-dns@7.2.5:
resolution: {integrity: sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==}
hasBin: true
@ -19230,6 +19429,10 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/outvariant@1.4.2:
resolution: {integrity: sha512-Ou3dJ6bA/UJ5GVHxah4LnqDwZRwAmWxrG3wtrHrbGnP4RnLCtA64A4F+ae7Y8ww660JaddSoArUR5HjipWSHAQ==}
dev: true
/p-cancelable@1.1.0:
resolution: {integrity: sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==}
engines: {node: '>=6'}
@ -19588,6 +19791,10 @@ packages:
/path-to-regexp@2.2.1:
resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==}
/path-to-regexp@6.2.2:
resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==}
dev: true
/path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
@ -20739,6 +20946,15 @@ packages:
lodash: 4.17.21
renderkid: 3.0.0
/pretty-format@27.5.1:
resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
ansi-regex: 5.0.1
ansi-styles: 5.2.0
react-is: 17.0.2
dev: true
/pretty-format@29.7.0:
resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@ -22478,7 +22694,6 @@ packages:
/react-is@17.0.2:
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
dev: false
/react-is@18.2.0:
resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==}
@ -24340,6 +24555,10 @@ packages:
optionalDependencies:
bare-events: 2.2.1
/strict-event-emitter@0.5.1:
resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==}
dev: true
/string-convert@0.2.1:
resolution: {integrity: sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==}
dev: false
@ -25536,6 +25755,10 @@ packages:
resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==}
dev: true
/undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
dev: true
/unenv@1.7.4:
resolution: {integrity: sha512-fjYsXYi30It0YCQYqLOcT6fHfMXsBr2hw9XC7ycf8rTG7Xxpe3ZssiqUnD0khrjiZEmkBXWLwm42yCSCH46fMw==}
dependencies:
@ -26292,6 +26515,64 @@ packages:
fsevents: 2.3.3
dev: true
/vitest@1.2.1(@types/node@18.17.12)(happy-dom@14.7.1):
resolution: {integrity: sha512-TRph8N8rnSDa5M2wKWJCMnztCZS9cDcgVTQ6tsTFTG/odHJ4l5yNVqvbeDJYJRZ6is3uxaEpFs8LL6QM+YFSdA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@types/node': ^18.0.0 || >=20.0.0
'@vitest/browser': ^1.0.0
'@vitest/ui': ^1.0.0
happy-dom: '*'
jsdom: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true
'@types/node':
optional: true
'@vitest/browser':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
dependencies:
'@types/node': 18.17.12
'@vitest/expect': 1.2.1
'@vitest/runner': 1.2.1
'@vitest/snapshot': 1.2.1
'@vitest/spy': 1.2.1
'@vitest/utils': 1.2.1
acorn-walk: 8.3.2
cac: 6.7.14
chai: 4.4.1
debug: 4.3.4(supports-color@5.5.0)
execa: 8.0.1
happy-dom: 14.7.1
local-pkg: 0.5.0
magic-string: 0.30.5
pathe: 1.1.2
picocolors: 1.0.0
std-env: 3.7.0
strip-literal: 1.3.0
tinybench: 2.5.1
tinypool: 0.8.1
vite: 5.0.12(@types/node@18.17.12)(less@4.2.0)
vite-node: 1.2.1(@types/node@18.17.12)(less@4.2.0)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vitest@1.2.1(@types/node@18.17.12)(less@4.2.0):
resolution: {integrity: sha512-TRph8N8rnSDa5M2wKWJCMnztCZS9cDcgVTQ6tsTFTG/odHJ4l5yNVqvbeDJYJRZ6is3uxaEpFs8LL6QM+YFSdA==}
engines: {node: ^18.0.0 || >=20.0.0}
@ -26419,6 +26700,11 @@ packages:
/webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
/webidl-conversions@7.0.0:
resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==}
engines: {node: '>=12'}
dev: true
/webpack-bundle-analyzer@4.10.1:
resolution: {integrity: sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==}
engines: {node: '>= 10.13.0'}
@ -26700,6 +26986,11 @@ packages:
resolution: {integrity: sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==}
engines: {node: '>=0.8.0'}
/whatwg-mimetype@3.0.0:
resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==}
engines: {node: '>=12'}
dev: true
/whatwg-url@5.0.0:
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
dependencies: