From 948251fd55e7c627999e83b19b765534b2779a9e Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 21 Feb 2023 15:07:14 +0000 Subject: [PATCH 01/32] feat(nextjs): Add performance monitoring to server components --- packages/nextjs/rollup.npm.config.js | 4 +- packages/nextjs/src/client/index.ts | 2 - .../client/wrapAppDirComponentWithSentry.ts | 7 -- packages/nextjs/src/common/types.ts | 8 ++ .../src/config/loaders/wrappingLoader.ts | 36 ++++++++- .../serverComponentWrapperTemplate.ts | 15 +++- packages/nextjs/src/config/webpack.ts | 4 +- packages/nextjs/src/edge/index.ts | 2 +- ...ry.ts => wrapServerComponentWithSentry.ts} | 7 +- packages/nextjs/src/index.types.ts | 8 +- packages/nextjs/src/server/index.ts | 2 +- .../server/wrapAppDirComponentWithSentry.ts | 32 -------- .../server/wrapServerComponentWithSentry.ts | 75 +++++++++++++++++++ 13 files changed, 148 insertions(+), 54 deletions(-) delete mode 100644 packages/nextjs/src/client/wrapAppDirComponentWithSentry.ts create mode 100644 packages/nextjs/src/common/types.ts rename packages/nextjs/src/edge/{wrapAppDirComponentWithSentry.ts => wrapServerComponentWithSentry.ts} (82%) delete mode 100644 packages/nextjs/src/server/wrapAppDirComponentWithSentry.ts create mode 100644 packages/nextjs/src/server/wrapServerComponentWithSentry.ts diff --git a/packages/nextjs/rollup.npm.config.js b/packages/nextjs/rollup.npm.config.js index 63f420f466ad..5b23aa2fa0a4 100644 --- a/packages/nextjs/rollup.npm.config.js +++ b/packages/nextjs/rollup.npm.config.js @@ -16,7 +16,7 @@ export default [ // prevent this internal nextjs code from ending up in our built package (this doesn't happen automatially because // the name doesn't match an SDK dependency) - packageSpecificConfig: { external: ['next/router', 'next/constants'] }, + packageSpecificConfig: { external: ['next/router', 'next/constants', 'next/headers'] }, }), ), ...makeNPMConfigVariants( @@ -41,7 +41,7 @@ export default [ // make it so Rollup calms down about the fact that we're combining default and named exports exports: 'named', }, - external: ['@sentry/nextjs', '__SENTRY_WRAPPING_TARGET_FILE__'], + external: ['@sentry/nextjs', 'next/headers', '__SENTRY_WRAPPING_TARGET_FILE__'], }, }), ), diff --git a/packages/nextjs/src/client/index.ts b/packages/nextjs/src/client/index.ts index 27eb57858e40..3d01b8c4d519 100644 --- a/packages/nextjs/src/client/index.ts +++ b/packages/nextjs/src/client/index.ts @@ -133,5 +133,3 @@ export { withSentryServerSideErrorGetInitialProps, wrapErrorGetInitialPropsWithSentry, } from './wrapErrorGetInitialPropsWithSentry'; - -export { wrapAppDirComponentWithSentry } from './wrapAppDirComponentWithSentry'; diff --git a/packages/nextjs/src/client/wrapAppDirComponentWithSentry.ts b/packages/nextjs/src/client/wrapAppDirComponentWithSentry.ts deleted file mode 100644 index 767f2beb5be7..000000000000 --- a/packages/nextjs/src/client/wrapAppDirComponentWithSentry.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Currently just a pass-through to provide isomorphism for the client. May be used in the future to add instrumentation - * for client components. - */ -export function wrapAppDirComponentWithSentry(wrappingTarget: any): any { - return wrappingTarget; -} diff --git a/packages/nextjs/src/common/types.ts b/packages/nextjs/src/common/types.ts new file mode 100644 index 000000000000..77af76fb414f --- /dev/null +++ b/packages/nextjs/src/common/types.ts @@ -0,0 +1,8 @@ +export type ServerComponentContext = { + componentRoute: string; + componentType: string; + // Ideally we shouldn't have to pass these headers in and we should be able to call headers() inside of the wrapper + // but it doesn't seem to work for third party modules at this point in time. + sentryTraceHeader?: string; + baggageHeader?: string; +}; diff --git a/packages/nextjs/src/config/loaders/wrappingLoader.ts b/packages/nextjs/src/config/loaders/wrappingLoader.ts index eba33dfb7ac3..879855cafa08 100644 --- a/packages/nextjs/src/config/loaders/wrappingLoader.ts +++ b/packages/nextjs/src/config/loaders/wrappingLoader.ts @@ -34,7 +34,7 @@ type LoaderOptions = { appDir: string; pageExtensionRegex: string; excludeServerRoutes: Array; - wrappingTargetKind: 'page' | 'api-route' | 'middleware' | 'page-server-component'; + wrappingTargetKind: 'page' | 'api-route' | 'middleware' | 'server-component'; }; /** @@ -95,14 +95,14 @@ export default function wrappingLoader( // Inject the route and the path to the file we're wrapping into the template templateCode = templateCode.replace(/__ROUTE__/g, parameterizedPagesRoute.replace(/\\/g, '\\\\')); - } else if (wrappingTargetKind === 'page-server-component') { + } else if (wrappingTargetKind === 'server-component') { // Get the parameterized route name from this page's filepath const parameterizedPagesRoute = path.posix .normalize(path.relative(appDir, this.resourcePath)) // Add a slash at the beginning .replace(/(.*)/, '/$1') // Pull off the file name - .replace(/\/page\.(js|jsx|tsx)$/, '') + .replace(/\/[^/]+\.(js|jsx|tsx)$/, '') // Remove routing groups: https://beta.nextjs.org/docs/routing/defining-routes#example-creating-multiple-root-layouts .replace(/\/(\(.*?\)\/)+/g, '/') // In case all of the above have left us with an empty string (which will happen if we're dealing with the @@ -125,6 +125,36 @@ export default function wrappingLoader( } templateCode = serverComponentWrapperTemplateCode; + + templateCode = templateCode.replace(/__ROUTE__/g, parameterizedPagesRoute.replace(/\\/g, '\\\\')); + + const componentTypeMatch = path.posix + .normalize(path.relative(appDir, this.resourcePath)) + .match(/\/?([^/]+)\.(?:js|jsx|tsx)$/); + + if (componentTypeMatch && componentTypeMatch[1]) { + let componentType; + switch (componentTypeMatch[1]) { + case 'page': + componentType = 'Page'; + break; + case 'layout': + componentType = 'Layout'; + break; + case 'head': + componentType = 'Head'; + break; + case 'not-found': + componentType = 'Not-found'; + break; + default: + componentType = 'Unknown'; + } + + templateCode = templateCode.replace(/__COMPONENT_TYPE__/g, componentType); + } else { + templateCode = templateCode.replace(/__COMPONENT_TYPE__/g, 'Unknown'); + } } else if (wrappingTargetKind === 'middleware') { templateCode = middlewareWrapperTemplateCode; } else { diff --git a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts index 4ba89238aad8..69af87292078 100644 --- a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts +++ b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts @@ -11,6 +11,9 @@ import * as wrapee from '__SENTRY_WRAPPING_TARGET_FILE__'; // eslint-disable-next-line import/no-extraneous-dependencies import * as Sentry from '@sentry/nextjs'; +// @ts-ignore TODO +// eslint-disable-next-line import/no-unresolved +import { headers } from 'next/headers'; type ServerComponentModule = { default: unknown; @@ -22,7 +25,17 @@ const serverComponent = serverComponentModule.default; let wrappedServerComponent; if (typeof serverComponent === 'function') { - wrappedServerComponent = Sentry.wrapAppDirComponentWithSentry(serverComponent); + wrappedServerComponent = new Proxy(serverComponent, { + apply: (originalServerComponent, thisArg, args) => { + const headersList = headers(); + return Sentry.wrapServerComponentWithSentry(serverComponent, { + componentRoute: '__ROUTE__', + componentType: '__COMPONENT_TYPE__', + sentryTraceHeader: headersList.get('sentry-trace'), + baggageHeader: headersList.get('baggage'), + }).apply(thisArg, args); + }, + }); } else { wrappedServerComponent = serverComponent; } diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 0849ff761ea4..e8b37d8cb455 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -199,7 +199,7 @@ export function constructWebpackConfigFunction( // https://beta.nextjs.org/docs/routing/pages-and-layouts#pages:~:text=.js%2C%20.jsx%2C%20or%20.tsx%20file%20extensions%20can%20be%20used%20for%20Pages. return ( normalizedAbsoluteResourcePath.startsWith(appDirPath) && - !!normalizedAbsoluteResourcePath.match(/[\\/]page\.(js|jsx|tsx)$/) + !!normalizedAbsoluteResourcePath.match(/[\\/](page|layout|loading|head|not-found)\.(js|jsx|tsx)$/) ); }, use: [ @@ -207,7 +207,7 @@ export function constructWebpackConfigFunction( loader: path.resolve(__dirname, 'loaders', 'wrappingLoader.js'), options: { ...staticWrappingLoaderOptions, - wrappingTargetKind: 'page-server-component', + wrappingTargetKind: 'server-component', }, }, ], diff --git a/packages/nextjs/src/edge/index.ts b/packages/nextjs/src/edge/index.ts index 087e0a1482d5..6f8cd2f42cc4 100644 --- a/packages/nextjs/src/edge/index.ts +++ b/packages/nextjs/src/edge/index.ts @@ -140,4 +140,4 @@ export { export { wrapMiddlewareWithSentry } from './wrapMiddlewareWithSentry'; -export { wrapAppDirComponentWithSentry } from './wrapAppDirComponentWithSentry'; +export { wrapServerComponentWithSentry } from './wrapServerComponentWithSentry'; diff --git a/packages/nextjs/src/edge/wrapAppDirComponentWithSentry.ts b/packages/nextjs/src/edge/wrapServerComponentWithSentry.ts similarity index 82% rename from packages/nextjs/src/edge/wrapAppDirComponentWithSentry.ts rename to packages/nextjs/src/edge/wrapServerComponentWithSentry.ts index 116df75a4caa..349207e7b039 100644 --- a/packages/nextjs/src/edge/wrapAppDirComponentWithSentry.ts +++ b/packages/nextjs/src/edge/wrapServerComponentWithSentry.ts @@ -1,9 +1,14 @@ import { captureException } from '@sentry/core'; +import type { ServerComponentContext } from '../common/types'; + /** * Wraps an `app` directory server component with Sentry error instrumentation. */ -export function wrapAppDirComponentWithSentry any>(appDirComponent: F): F { +export function wrapServerComponentWithSentry any>( + appDirComponent: F, + _context: ServerComponentContext, +): F { // Even though users may define server components as async functions, for the client bundles // Next.js will turn them into synchronous functions and it will transform any`await`s into instances of the`use` // hook. 🤯 diff --git a/packages/nextjs/src/index.types.ts b/packages/nextjs/src/index.types.ts index 0b115d213d5d..dd4b72b0af47 100644 --- a/packages/nextjs/src/index.types.ts +++ b/packages/nextjs/src/index.types.ts @@ -10,6 +10,7 @@ export * from './edge'; import type { Integration, Options, StackParser } from '@sentry/types'; import type * as clientSdk from './client'; +import type { ServerComponentContext } from './common/types'; import type * as edgeSdk from './edge'; import type * as serverSdk from './server'; @@ -128,6 +129,9 @@ export declare function withSentryServerSideErrorGetInitialProps) => ReturnType extends Promise ? ReturnType : Promise>; /** - * Wraps an `app` directory component with Sentry error instrumentation. (Currently only reports errors for server components) + * Wraps an `app` directory server component with Sentry error and performance instrumentation. */ -export declare function wrapAppDirComponentWithSentry any>(WrappingTarget: F): F; +export declare function wrapServerComponentWithSentry any>( + WrappingTarget: F, + context: ServerComponentContext, +): F; diff --git a/packages/nextjs/src/server/index.ts b/packages/nextjs/src/server/index.ts index b27d07d11733..13cb323aa346 100644 --- a/packages/nextjs/src/server/index.ts +++ b/packages/nextjs/src/server/index.ts @@ -224,4 +224,4 @@ export { wrapApiHandlerWithSentry, } from './wrapApiHandlerWithSentry'; -export { wrapAppDirComponentWithSentry } from './wrapAppDirComponentWithSentry'; +export { wrapServerComponentWithSentry } from './wrapServerComponentWithSentry'; diff --git a/packages/nextjs/src/server/wrapAppDirComponentWithSentry.ts b/packages/nextjs/src/server/wrapAppDirComponentWithSentry.ts deleted file mode 100644 index 116df75a4caa..000000000000 --- a/packages/nextjs/src/server/wrapAppDirComponentWithSentry.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { captureException } from '@sentry/core'; - -/** - * Wraps an `app` directory server component with Sentry error instrumentation. - */ -export function wrapAppDirComponentWithSentry any>(appDirComponent: F): F { - // Even though users may define server components as async functions, for the client bundles - // Next.js will turn them into synchronous functions and it will transform any`await`s into instances of the`use` - // hook. 🤯 - return new Proxy(appDirComponent, { - apply: (originalFunction, thisArg, args) => { - let maybePromiseResult; - - try { - maybePromiseResult = originalFunction.apply(thisArg, args); - } catch (e) { - captureException(e); - throw e; - } - - if (typeof maybePromiseResult === 'object' && maybePromiseResult !== null && 'then' in maybePromiseResult) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return maybePromiseResult.then(null, (e: Error) => { - captureException(e); - throw e; - }); - } else { - return maybePromiseResult; - } - }, - }); -} diff --git a/packages/nextjs/src/server/wrapServerComponentWithSentry.ts b/packages/nextjs/src/server/wrapServerComponentWithSentry.ts new file mode 100644 index 000000000000..a4ea8c9c2699 --- /dev/null +++ b/packages/nextjs/src/server/wrapServerComponentWithSentry.ts @@ -0,0 +1,75 @@ +import { captureException, getCurrentHub, startTransaction } from '@sentry/core'; +import { baggageHeaderToDynamicSamplingContext, extractTraceparentData } from '@sentry/utils'; +import * as domain from 'domain'; + +import type { ServerComponentContext } from '../common/types'; + +/** + * Wraps an `app` directory server component with Sentry error instrumentation. + */ +export function wrapServerComponentWithSentry any>( + appDirComponent: F, + context: ServerComponentContext, +): F { + const { componentRoute, componentType, sentryTraceHeader, baggageHeader } = context; + + // Even though users may define server components as async functions, for the client bundles + // Next.js will turn them into synchronous functions and it will transform any `await`s into instances of the `use` + // hook. 🤯 + return new Proxy(appDirComponent, { + apply: (originalFunction, thisArg, args) => { + return domain.create().bind(() => { + let maybePromiseResult; + + const traceparentData = + typeof sentryTraceHeader === 'string' ? extractTraceparentData(sentryTraceHeader) : undefined; + + const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggageHeader); + + const transaction = startTransaction({ + op: 'function.nextjs', + name: `${componentType} Server Component (${componentRoute})`, + ...traceparentData, + status: 'ok', + metadata: { + source: 'component', + dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, + }, + }); + + const currentScope = getCurrentHub().getScope(); + if (currentScope) { + currentScope.setSpan(transaction); + } + + try { + maybePromiseResult = originalFunction.apply(thisArg, args); + } catch (e) { + transaction.setStatus('internal_error'); + captureException(e); + transaction.finish(); + throw e; + } + + if (typeof maybePromiseResult === 'object' && maybePromiseResult !== null && 'then' in maybePromiseResult) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return maybePromiseResult.then( + (res: unknown) => { + transaction.finish(); + return res; + }, + (e: Error) => { + transaction.setStatus('internal_error'); + captureException(e); + transaction.finish(); + throw e; + }, + ); + } else { + transaction.finish(); + return maybePromiseResult; + } + })(); + }, + }); +} From 9b969135993f784966247ad656b804f27ed40c09 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 21 Feb 2023 15:35:24 +0000 Subject: [PATCH 02/32] Use original comp --- .../src/config/templates/serverComponentWrapperTemplate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts index 69af87292078..38c44a2c7faa 100644 --- a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts +++ b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts @@ -28,7 +28,8 @@ if (typeof serverComponent === 'function') { wrappedServerComponent = new Proxy(serverComponent, { apply: (originalServerComponent, thisArg, args) => { const headersList = headers(); - return Sentry.wrapServerComponentWithSentry(serverComponent, { + + return Sentry.wrapServerComponentWithSentry(originalServerComponent, { componentRoute: '__ROUTE__', componentType: '__COMPONENT_TYPE__', sentryTraceHeader: headersList.get('sentry-trace'), From eb9b72b1c2548ac0e04db0b145c71ec7e9b2fff5 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 22 Feb 2023 12:35:19 +0000 Subject: [PATCH 03/32] Fix tests --- packages/nextjs/test/config/loaders.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nextjs/test/config/loaders.test.ts b/packages/nextjs/test/config/loaders.test.ts index 84fb39ea80da..94a6a5ec0654 100644 --- a/packages/nextjs/test/config/loaders.test.ts +++ b/packages/nextjs/test/config/loaders.test.ts @@ -157,11 +157,11 @@ describe('webpack loaders', () => { }, { resourcePath: '/Users/Maisey/projects/squirrelChasingSimulator/src/app/page.js', - expectedWrappingTargetKind: 'page-server-component', + expectedWrappingTargetKind: 'server-component', }, { resourcePath: '/Users/Maisey/projects/squirrelChasingSimulator/src/app/nested/page.js', - expectedWrappingTargetKind: 'page-server-component', + expectedWrappingTargetKind: 'server-component', }, { resourcePath: '/Users/Maisey/projects/squirrelChasingSimulator/src/app/nested/page.ts', // ts is not a valid file ending for pages in the app dir @@ -169,7 +169,7 @@ describe('webpack loaders', () => { }, { resourcePath: '/Users/Maisey/projects/squirrelChasingSimulator/src/app/(group)/nested/page.tsx', - expectedWrappingTargetKind: 'page-server-component', + expectedWrappingTargetKind: 'server-component', }, { resourcePath: '/Users/Maisey/projects/squirrelChasingSimulator/src/app/(group)/nested/loading.ts', @@ -177,7 +177,7 @@ describe('webpack loaders', () => { }, { resourcePath: '/Users/Maisey/projects/squirrelChasingSimulator/src/app/layout.js', - expectedWrappingTargetKind: undefined, + expectedWrappingTargetKind: 'server-component', }, ])( 'should apply the right wrappingTargetKind with wrapping loader ($resourcePath)', From 041cb5ea55bb96a264a34247e3684ca4782bf9fd Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 22 Feb 2023 13:31:40 +0000 Subject: [PATCH 04/32] Lint --- .../src/config/templates/serverComponentWrapperTemplate.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts index 38c44a2c7faa..63250b669f95 100644 --- a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts +++ b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts @@ -32,7 +32,9 @@ if (typeof serverComponent === 'function') { return Sentry.wrapServerComponentWithSentry(originalServerComponent, { componentRoute: '__ROUTE__', componentType: '__COMPONENT_TYPE__', + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access sentryTraceHeader: headersList.get('sentry-trace'), + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access baggageHeader: headersList.get('baggage'), }).apply(thisArg, args); }, From 351f6f43ef166f68b98f9fc4212b456ff3bf9731 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 22 Feb 2023 14:47:14 +0000 Subject: [PATCH 05/32] lil test --- .../standard-frontend-next-app-dir/.gitignore | 41 ++ .../standard-frontend-next-app-dir/.npmrc | 2 + .../.vscode/settings.json | 4 + .../app/head.tsx | 10 + .../app/layout.tsx | 11 + .../app/page.tsx | 23 + .../app/user/[id]/page.tsx | 4 + .../globals.d.ts | 4 + .../next-env.d.ts | 5 + .../next.config.js | 33 + .../package.json | 28 + .../playwright.config.ts | 69 ++ .../sentry.client.config.ts | 30 + .../sentry.server.config.ts | 38 + .../test-recipe.json | 24 + .../tests/behaviour-client.test.ts | 171 +++++ .../tests/behaviour-server.test.ts | 75 ++ .../tsconfig.json | 37 + .../standard-frontend-next-app-dir/yarn.lock | 681 ++++++++++++++++++ 19 files changed, 1290 insertions(+) create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.gitignore create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.npmrc create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.vscode/settings.json create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/head.tsx create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/layout.tsx create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/page.tsx create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/user/[id]/page.tsx create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/globals.d.ts create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next-env.d.ts create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next.config.js create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/package.json create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/playwright.config.ts create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/test-recipe.json create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tsconfig.json create mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/yarn.lock diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.gitignore b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.gitignore new file mode 100644 index 000000000000..d9f766878259 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.gitignore @@ -0,0 +1,41 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +!*.d.ts + +# Sentry +.sentryclirc diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.npmrc b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.npmrc new file mode 100644 index 000000000000..c6b3ef9b3eaa --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.npmrc @@ -0,0 +1,2 @@ +@sentry:registry=http://localhost:4873 +@sentry-internal:registry=http://localhost:4873 diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.vscode/settings.json b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.vscode/settings.json new file mode 100644 index 000000000000..d0679104bdab --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true +} \ No newline at end of file diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/head.tsx b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/head.tsx new file mode 100644 index 000000000000..f11b259697ff --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/head.tsx @@ -0,0 +1,10 @@ +export default function Head() { + return ( + <> + Create Next App + + + + + ); +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/layout.tsx b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/layout.tsx new file mode 100644 index 000000000000..225b6038d7fb --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/layout.tsx @@ -0,0 +1,11 @@ +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + {children} + + ); +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/page.tsx b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/page.tsx new file mode 100644 index 000000000000..79f1c280024f --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/page.tsx @@ -0,0 +1,23 @@ +'use client'; + +import * as Sentry from '@sentry/nextjs'; +import Link from 'next/link'; + +export default function Home() { + return ( +
+ { + const eventId = Sentry.captureException(new Error('I am an error!')); + window.capturedExceptionId = eventId; + }} + /> + + navigate + +
+ ); +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/user/[id]/page.tsx b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/user/[id]/page.tsx new file mode 100644 index 000000000000..bdb52ea5547a --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/user/[id]/page.tsx @@ -0,0 +1,4 @@ +export default async function Home() { + const dynamid = await (await fetch('http://example.com', { cache: 'no-store' })).text(); // do a fetch request so that this server component is always rendered when requested + return

I am a blank page :) {dynamid}

; +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/globals.d.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/globals.d.ts new file mode 100644 index 000000000000..109dbcd55648 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/globals.d.ts @@ -0,0 +1,4 @@ +interface Window { + recordedTransactions?: string[]; + capturedExceptionId?: string; +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next-env.d.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next-env.d.ts new file mode 100644 index 000000000000..4f11a03dc6cc --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next.config.js b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next.config.js new file mode 100644 index 000000000000..b4110295ace3 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next.config.js @@ -0,0 +1,33 @@ +// This file sets a custom webpack configuration to use your Next.js app +// with Sentry. +// https://nextjs.org/docs/api-reference/next.config.js/introduction +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +const { withSentryConfig } = require('@sentry/nextjs'); + +const moduleExports = { + experimental: { + appDir: true, + }, +}; + +const sentryWebpackPluginOptions = { + // Additional config options for the Sentry Webpack plugin. Keep in mind that + // the following options are set automatically, and overriding them is not + // recommended: + // release, url, org, project, authToken, configFile, stripPrefix, + // urlPrefix, include, ignore + + silent: true, // Suppresses all logs + // For all available options, see: + // https://github.com/getsentry/sentry-webpack-plugin#options. + + // We're not testing source map uploads at the moment. + dryRun: true, +}; + +// Make sure adding Sentry options is the last code to run before exporting, to +// ensure that your source maps include changes from all other Webpack plugins +module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions, { + hideSourceMaps: true, +}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/package.json b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/package.json new file mode 100644 index 000000000000..ec95e8707519 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/package.json @@ -0,0 +1,28 @@ +{ + "name": "create-next-app", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint", + "test": "test:prod && test:dev", + "test:prod": "TEST_MODE=prod playwright test", + "test:dev": "TEST_MODE=dev playwright test" + }, + "dependencies": { + "@next/font": "13.0.7", + "@sentry/nextjs": "*", + "@types/node": "18.11.17", + "@types/react": "18.0.26", + "@types/react-dom": "18.0.9", + "next": "13.1.6", + "react": "18.2.0", + "react-dom": "18.2.0", + "typescript": "4.9.4" + }, + "devDependencies": { + "@playwright/test": "^1.27.1" + } +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/playwright.config.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/playwright.config.ts new file mode 100644 index 000000000000..dabfa9c23619 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/playwright.config.ts @@ -0,0 +1,69 @@ +import type { PlaywrightTestConfig } from '@playwright/test'; +import { devices } from '@playwright/test'; + +/** + * See https://playwright.dev/docs/test-configuration. + */ +const config: PlaywrightTestConfig = { + testDir: './tests', + /* Maximum time one test can run for. */ + timeout: 60 * 1000, + expect: { + /** + * Maximum time expect() should wait for the condition to be met. + * For example in `await expect(locator).toHaveText();` + */ + timeout: 5000, + }, + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: 0, + /* Opt out of parallel tests on CI. */ + workers: 1, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: 'dot', + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ + actionTimeout: 0, + /* Base URL to use in actions like `await page.goto('/')`. */ + // baseURL: 'http://localhost:3000', + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { + ...devices['Desktop Chrome'], + }, + }, + // For now we only test Chrome! + // { + // name: 'firefox', + // use: { + // ...devices['Desktop Firefox'], + // }, + // }, + // { + // name: 'webkit', + // use: { + // ...devices['Desktop Safari'], + // }, + // }, + ], + + /* Run your local dev server before starting the tests */ + webServer: { + command: process.env.TEST_MODE === 'prod' ? 'yarn start' : 'yarn dev', + port: 3000, + }, +}; + +export default config; diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts new file mode 100644 index 000000000000..9357b9eedc41 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts @@ -0,0 +1,30 @@ +// This file configures the initialization of Sentry on the browser. +// The config you add here will be used whenever a page is visited. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from '@sentry/nextjs'; + +Sentry.init({ + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 1.0, + // ... + // Note: if you want to override the automatic release value, do not set a + // `release` value here - use the environment variable `SENTRY_RELEASE`, so + // that it will also get attached to your source maps +}); + +Sentry.addGlobalEventProcessor(event => { + if ( + event.type === 'transaction' && + (event.contexts?.trace?.op === 'pageload' || event.contexts?.trace?.op === 'navigation') + ) { + const eventId = event.event_id; + if (eventId) { + window.recordedTransactions = window.recordedTransactions || []; + window.recordedTransactions.push(eventId); + } + } + + return event; +}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts new file mode 100644 index 000000000000..de18a1117990 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts @@ -0,0 +1,38 @@ +// This file configures the initialization of Sentry on the server. +// The config you add here will be used whenever the server handles a request. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from '@sentry/nextjs'; + +declare global { + namespace globalThis { + var transactionIds: string[]; + } +} + +Sentry.init({ + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + // Adjust this value in production, or use tracesSampler for greater control + tracesSampleRate: 1.0, + // ... + // Note: if you want to override the automatic release value, do not set a + // `release` value here - use the environment variable `SENTRY_RELEASE`, so + // that it will also get attached to your source maps + + integrations: [new Sentry.Integrations.LocalVariables()], +}); + +Sentry.addGlobalEventProcessor(event => { + global.transactionIds = global.transactionIds || []; + + if (event.type === 'transaction') { + const eventId = event.event_id; + + if (eventId) { + global.transactionIds.push(eventId); + console.log('Recorded', event.transaction, eventId); + } + } + + return event; +}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/test-recipe.json b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/test-recipe.json new file mode 100644 index 000000000000..345a90a420d4 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/test-recipe.json @@ -0,0 +1,24 @@ +{ + "$schema": "../../test-recipe-schema.json", + "testApplicationName": "next-app-app-dir", + "buildCommand": "yarn install --pure-lockfile && npx playwright install && yarn build", + "tests": [ + { + "testName": "Playwright tests - Prod Mode", + "testCommand": "yarn test:prod" + }, + { + "testName": "Playwright tests - Dev Mode", + "testCommand": "yarn test:dev" + } + ], + "canaryVersions": [ + { + "dependencyOverrides": { + "next": "latest", + "react": "latest", + "react-dom": "latest" + } + } + ] +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts new file mode 100644 index 000000000000..d0ede66cf32f --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts @@ -0,0 +1,171 @@ +import { test, expect } from '@playwright/test'; +import axios, { AxiosError } from 'axios'; + +const authToken = process.env.E2E_TEST_AUTH_TOKEN; +const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; +const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; +const EVENT_POLLING_TIMEOUT = 30_000; + +test('Sends a client-side exception to Sentry', async ({ page }) => { + await page.goto('/'); + + const exceptionButton = page.locator('id=exception-button'); + await exceptionButton.click(); + + const exceptionIdHandle = await page.waitForFunction(() => window.capturedExceptionId); + const exceptionEventId = await exceptionIdHandle.jsonValue(); + + console.log(`Polling for error eventId: ${exceptionEventId}`); + + await expect + .poll( + async () => { + try { + const response = await axios.get( + `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionEventId}/`, + { headers: { Authorization: `Bearer ${authToken}` } }, + ); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { + timeout: EVENT_POLLING_TIMEOUT, + }, + ) + .toBe(200); +}); + +test('Sends a pageload transaction to Sentry', async ({ page }) => { + await page.goto('/'); + + const recordedTransactionsHandle = await page.waitForFunction(() => { + if (window.recordedTransactions && window.recordedTransactions?.length >= 1) { + return window.recordedTransactions; + } else { + return undefined; + } + }); + const recordedTransactionEventIds = await recordedTransactionsHandle.jsonValue(); + + if (recordedTransactionEventIds === undefined) { + throw new Error("Application didn't record any transaction event IDs."); + } + + let hadPageLoadTransaction = false; + + console.log(`Polling for transaction eventIds: ${JSON.stringify(recordedTransactionEventIds)}`); + + await Promise.all( + recordedTransactionEventIds.map(async transactionEventId => { + await expect + .poll( + async () => { + try { + const response = await axios.get( + `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`, + { headers: { Authorization: `Bearer ${authToken}` } }, + ); + + if (response.data.contexts.trace.op === 'pageload') { + hadPageLoadTransaction = true; + } + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { + timeout: EVENT_POLLING_TIMEOUT, + }, + ) + .toBe(200); + }), + ); + + expect(hadPageLoadTransaction).toBe(true); +}); + +test('Sends a navigation transaction to Sentry', async ({ page }) => { + await page.goto('/'); + + // Give pageload transaction time to finish + await page.waitForTimeout(4000); + + const linkElement = page.locator('id=navigation'); + await linkElement.click(); + + const recordedTransactionsHandle = await page.waitForFunction(() => { + if (window.recordedTransactions && window.recordedTransactions?.length >= 2) { + return window.recordedTransactions; + } else { + return undefined; + } + }); + const recordedTransactionEventIds = await recordedTransactionsHandle.jsonValue(); + + if (recordedTransactionEventIds === undefined) { + throw new Error("Application didn't record any transaction event IDs."); + } + + let hadPageNavigationTransaction = false; + + console.log(`Polling for transaction eventIds: ${JSON.stringify(recordedTransactionEventIds)}`); + + await Promise.all( + recordedTransactionEventIds.map(async transactionEventId => { + await expect + .poll( + async () => { + try { + const response = await axios.get( + `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`, + { headers: { Authorization: `Bearer ${authToken}` } }, + ); + + if (response.data.contexts.trace.op === 'navigation') { + hadPageNavigationTransaction = true; + } + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { + timeout: EVENT_POLLING_TIMEOUT, + }, + ) + .toBe(200); + }), + ); + + expect(hadPageNavigationTransaction).toBe(true); +}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts new file mode 100644 index 000000000000..3b3d74af1885 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts @@ -0,0 +1,75 @@ +import { test, expect } from '@playwright/test'; +import axios, { AxiosError } from 'axios'; + +const authToken = process.env.E2E_TEST_AUTH_TOKEN; +const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; +const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; +const EVENT_POLLING_TIMEOUT = 30_000; + +test('Sends a server-side exception to Sentry', async ({ baseURL }) => { + const { data } = await axios.get(`${baseURL}/api/error`); + const { exceptionId } = data; + + const url = `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionId}/`; + + console.log(`Polling for error eventId: ${exceptionId}`); + + await expect + .poll( + async () => { + try { + const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } }); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { timeout: EVENT_POLLING_TIMEOUT }, + ) + .toBe(200); +}); + +test('Sends server-side transactions to Sentry', async ({ baseURL }) => { + const { data } = await axios.get(`${baseURL}/api/success`); + const { transactionIds } = data; + + console.log(`Polling for transaction eventIds: ${JSON.stringify(transactionIds)}`); + + await Promise.all( + transactionIds.map(async (transactionId: string) => { + const url = `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionId}/`; + + await expect + .poll( + async () => { + try { + const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } }); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { timeout: EVENT_POLLING_TIMEOUT }, + ) + .toBe(200); + }), + ); +}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tsconfig.json b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tsconfig.json new file mode 100644 index 000000000000..5816e0adb26c --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ] + }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + "next.config.js", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/yarn.lock b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/yarn.lock new file mode 100644 index 000000000000..a73259212b41 --- /dev/null +++ b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/yarn.lock @@ -0,0 +1,681 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@jridgewell/sourcemap-codec@^1.4.13": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@next/env@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/env/-/env-13.1.6.tgz#c4925609f16142ded1a5cb833359ab17359b7a93" + integrity sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg== + +"@next/font@13.0.7": + version "13.0.7" + resolved "https://registry.yarnpkg.com/@next/font/-/font-13.0.7.tgz#e0046376edb0ce592d9cfddea8f4ab321eb1515a" + integrity sha512-39SzuoMI6jbrIzPs3KtXdKX03OrVp6Y7kRHcoVmOg69spiBzruPJ5x5DQSfN+OXqznbvVBNZBXnmdnSqs3qXiA== + +"@next/swc-android-arm-eabi@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.6.tgz#d766dfc10e27814d947b20f052067c239913dbcc" + integrity sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ== + +"@next/swc-android-arm64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.1.6.tgz#f37a98d5f18927d8c9970d750d516ac779465176" + integrity sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw== + +"@next/swc-darwin-arm64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.6.tgz#ec1b90fd9bf809d8b81004c5182e254dced4ad96" + integrity sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw== + +"@next/swc-darwin-x64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.6.tgz#e869ac75d16995eee733a7d1550322d9051c1eb4" + integrity sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA== + +"@next/swc-freebsd-x64@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.6.tgz#84a7b2e423a2904afc2edca21c2f1ba6b53fa4c1" + integrity sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw== + +"@next/swc-linux-arm-gnueabihf@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.6.tgz#980eed1f655ff8a72187d8a6ef9e73ac39d20d23" + integrity sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw== + +"@next/swc-linux-arm64-gnu@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.6.tgz#87a71db21cded3f7c63d1d19079845c59813c53d" + integrity sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ== + +"@next/swc-linux-arm64-musl@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.6.tgz#c5aac8619331b9fd030603bbe2b36052011e11de" + integrity sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ== + +"@next/swc-linux-x64-gnu@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.6.tgz#9513d36d540bbfea575576746736054c31aacdea" + integrity sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q== + +"@next/swc-linux-x64-musl@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.6.tgz#d61fc6884899f5957251f4ce3f522e34a2c479b7" + integrity sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ== + +"@next/swc-win32-arm64-msvc@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.6.tgz#fac2077a8ae9768e31444c9ae90807e64117cda7" + integrity sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ== + +"@next/swc-win32-ia32-msvc@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.6.tgz#498bc11c91b4c482a625bf4b978f98ae91111e46" + integrity sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w== + +"@next/swc-win32-x64-msvc@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.6.tgz#17ed919c723426b7d0ce1cd73d40ce3dcd342089" + integrity sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA== + +"@playwright/test@^1.27.1": + version "1.29.1" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.29.1.tgz#f2ed4dc143b9c7825a7ad2703b2f1ac4354e1145" + integrity sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w== + dependencies: + "@types/node" "*" + playwright-core "1.29.1" + +"@rollup/plugin-commonjs@24.0.0": + version "24.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.0.tgz#fb7cf4a6029f07ec42b25daa535c75b05a43f75c" + integrity sha512-0w0wyykzdyRRPHOb0cQt14mIBLujfAv6GgP6g8nvg/iBxEm112t3YPPq+Buqe2+imvElTka+bjNlJ/gB56TD8g== + dependencies: + "@rollup/pluginutils" "^5.0.1" + commondir "^1.0.1" + estree-walker "^2.0.2" + glob "^8.0.3" + is-reference "1.2.1" + magic-string "^0.27.0" + +"@rollup/pluginutils@^5.0.1": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" + integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + +"@sentry/browser@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.38.0.tgz#cdb39da23f9ee2ce47395b2c12542acb4969efa7" + integrity sha512-rPJr+2jRYL29PeMYA2JgzYKTZQx6bc3T9evbAdIh0n+popSjpVyOpOMV/3l6A7KZeeix3dpp6eUZUxTJukqriQ== + dependencies: + "@sentry/core" "7.38.0" + "@sentry/replay" "7.38.0" + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + tslib "^1.9.3" + +"@sentry/cli@^1.74.6": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.75.0.tgz#4a5e71b5619cd4e9e6238cc77857c66f6b38d86a" + integrity sha512-vT8NurHy00GcN8dNqur4CMIYvFH3PaKdkX3qllVvi4syybKqjwoz+aWRCvprbYv0knweneFkLt1SmBWqazUMfA== + dependencies: + https-proxy-agent "^5.0.0" + mkdirp "^0.5.5" + node-fetch "^2.6.7" + progress "^2.0.3" + proxy-from-env "^1.1.0" + which "^2.0.2" + +"@sentry/core@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.38.0.tgz#52f1f1f2ba5e88ab7b33c3abb0ea9730c78d953d" + integrity sha512-+hXh/SO3Ie6WC2b+wi01xLhyVREdkRXS5QBmCiv3z2ks2HvYXp7PoKSXJvNKiwCP+pBD+enOnM1YEzM2yEy5yw== + dependencies: + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + tslib "^1.9.3" + +"@sentry/integrations@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.38.0.tgz#6caf04f9aff5780a2b7b146a620141ed90369572" + integrity sha512-n1OK+X5xaMo7j0lZxpEvEqjQSH4gIcVxeE2KXMI/2/sM7dJyQvfgjogh6ZPOpCAZnT9sUmesH5FevjXXT2493A== + dependencies: + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + localforage "^1.8.1" + tslib "^1.9.3" + +"@sentry/nextjs@*": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.38.0.tgz#f48d7d9d24b43bbeffd6401cae1eeb507f2c5f0a" + integrity sha512-NWI03kftJWyssUsMOFZ/MMtJHYcRdvQR8nh6nky5lT6c7y8uBzj9+mAad7KPxX9M+OXyfA+ZM54fPK+4DCUiDw== + dependencies: + "@rollup/plugin-commonjs" "24.0.0" + "@sentry/core" "7.38.0" + "@sentry/integrations" "7.38.0" + "@sentry/node" "7.38.0" + "@sentry/react" "7.38.0" + "@sentry/tracing" "7.38.0" + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + "@sentry/webpack-plugin" "1.20.0" + chalk "3.0.0" + rollup "2.78.0" + tslib "^1.9.3" + +"@sentry/node@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.38.0.tgz#957524fa4764dc19ef970ccdffb802d62e0db3ae" + integrity sha512-jNIN6NZvgzn/oms8RQzffjX8Z0LQDTN6N28nnhzqGCvnfmS1QtTt0FlU+pTuFXZNNSjfGy4XMXMYvLlbvhm2bg== + dependencies: + "@sentry/core" "7.38.0" + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/react@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.38.0.tgz#7294bc8d85000994267fabf8d6f817369ca09a7a" + integrity sha512-IZpQ0aptV3UPjvDj+xorrgPgnW2xIL6Zcy7B6wAgwTC81OUITE7YaShglGD0sJ8M1ReFuH9duwTysr/uv8AytQ== + dependencies: + "@sentry/browser" "7.38.0" + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + hoist-non-react-statics "^3.3.2" + tslib "^1.9.3" + +"@sentry/replay@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.38.0.tgz#48d240b67de6b4ab41c951d19abeceb0d3f7706d" + integrity sha512-Ai78/OIYedny605x8uS0n/a5uj7qnuevogGD6agLat9lGc8DFvC07m2iS+EFyGOwtQzyDlRYJvYkHL8peR3crQ== + dependencies: + "@sentry/core" "7.38.0" + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + +"@sentry/tracing@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.38.0.tgz#ba28f15f526e87df167de206fd4fb0a39277dac6" + integrity sha512-ejXJp8oOT64MVtBzqdECUUaNzKbpu25St8Klub1i4Sm7xO+ZjDQDI4TIHvWojZvtkwQ3F4jcsCclc8KuyJunyQ== + dependencies: + "@sentry/core" "7.38.0" + "@sentry/types" "7.38.0" + "@sentry/utils" "7.38.0" + tslib "^1.9.3" + +"@sentry/types@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.38.0.tgz#6e2611544446271ed237440b12de782805aefe25" + integrity sha512-NKOALR6pNUMzUrsk2m+dkPrO8uGNvNh1LD0BCPswKNjC2qHo1h1mDGCgBmF9+EWyii8ZoACTIsxvsda+MBf97Q== + +"@sentry/utils@7.38.0": + version "7.38.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.38.0.tgz#d10716e730108301f58766970493e9c5da0ba502" + integrity sha512-MgbI3YmYuyyhUtvcXkgGBqjOW+nuLLNGUdWCK+C4kObf8VbLt3dSE/7SEMT6TSHLYQmxs2BxFgx5Agn97m68kQ== + dependencies: + "@sentry/types" "7.38.0" + tslib "^1.9.3" + +"@sentry/webpack-plugin@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.20.0.tgz#e7add76122708fb6b4ee7951294b521019720e58" + integrity sha512-Ssj1mJVFsfU6vMCOM2d+h+KQR7QHSfeIP16t4l20Uq/neqWXZUQ2yvQfe4S3BjdbJXz/X4Rw8Hfy1Sd0ocunYw== + dependencies: + "@sentry/cli" "^1.74.6" + webpack-sources "^2.0.0 || ^3.0.0" + +"@swc/helpers@0.4.14": + version "0.4.14" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74" + integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw== + dependencies: + tslib "^2.4.0" + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" + integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== + +"@types/node@*": + version "18.11.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" + integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== + +"@types/node@18.11.17": + version "18.11.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.17.tgz#5c009e1d9c38f4a2a9d45c0b0c493fe6cdb4bcb5" + integrity sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng== + +"@types/prop-types@*": + version "15.7.5" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" + integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + +"@types/react-dom@18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.9.tgz#ffee5e4bfc2a2f8774b15496474f8e7fe8d0b504" + integrity sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg== + dependencies: + "@types/react" "*" + +"@types/react@*", "@types/react@18.0.26": + version "18.0.26" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917" + integrity sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.2" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" + integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +caniuse-lite@^1.0.30001406: + version "1.0.30001442" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001442.tgz#40337f1cf3be7c637b061e2f78582dc1daec0614" + integrity sha512-239m03Pqy0hwxYPYR5JwOIxRJfLTWtle9FV8zosfV5pHg+/51uD4nxcUlM8+mWWGfwKtt8lJNHnD3cWw9VZ6ow== + +chalk@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +client-only@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" + integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + +cookie@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +csstype@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9" + integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== + +debug@4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +hoist-non-react-statics@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-reference@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + dependencies: + "@types/estree" "*" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== + dependencies: + immediate "~3.0.5" + +localforage@^1.8.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== + dependencies: + lie "3.1.1" + +loose-envify@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== + +magic-string@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" + integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" + +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + +next@13.1.6: + version "13.1.6" + resolved "https://registry.yarnpkg.com/next/-/next-13.1.6.tgz#054babe20b601f21f682f197063c9b0b32f1a27c" + integrity sha512-hHlbhKPj9pW+Cymvfzc15lvhaOZ54l+8sXDXJWm3OBNBzgrVj6hwGPmqqsXg40xO1Leq+kXpllzRPuncpC0Phw== + dependencies: + "@next/env" "13.1.6" + "@swc/helpers" "0.4.14" + caniuse-lite "^1.0.30001406" + postcss "8.4.14" + styled-jsx "5.1.1" + optionalDependencies: + "@next/swc-android-arm-eabi" "13.1.6" + "@next/swc-android-arm64" "13.1.6" + "@next/swc-darwin-arm64" "13.1.6" + "@next/swc-darwin-x64" "13.1.6" + "@next/swc-freebsd-x64" "13.1.6" + "@next/swc-linux-arm-gnueabihf" "13.1.6" + "@next/swc-linux-arm64-gnu" "13.1.6" + "@next/swc-linux-arm64-musl" "13.1.6" + "@next/swc-linux-x64-gnu" "13.1.6" + "@next/swc-linux-x64-musl" "13.1.6" + "@next/swc-win32-arm64-msvc" "13.1.6" + "@next/swc-win32-ia32-msvc" "13.1.6" + "@next/swc-win32-x64-msvc" "13.1.6" + +node-fetch@^2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +playwright-core@1.29.1: + version "1.29.1" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.29.1.tgz#9ec15d61c4bd2f386ddf6ce010db53a030345a47" + integrity sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg== + +postcss@8.4.14: + version "8.4.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +progress@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +react-dom@18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.0" + +react-is@^16.7.0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react@18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + +rollup@2.78.0: + version "2.78.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.78.0.tgz#00995deae70c0f712ea79ad904d5f6b033209d9e" + integrity sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg== + optionalDependencies: + fsevents "~2.3.2" + +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== + dependencies: + loose-envify "^1.1.0" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +styled-jsx@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" + integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== + dependencies: + client-only "0.0.1" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + +typescript@4.9.4: + version "4.9.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" + integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +"webpack-sources@^2.0.0 || ^3.0.0": + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== From 482286155ac537cfc96e37ef335973ac17121bb3 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 14:23:47 +0000 Subject: [PATCH 06/32] test: Add test utitilty to intercept sentry requests --- package.json | 1 + packages/event-proxy-server/.eslintrc.js | 9 + packages/event-proxy-server/LICENSE | 14 ++ packages/event-proxy-server/package.json | 24 +++ packages/event-proxy-server/src/index.ts | 209 ++++++++++++++++++++++ packages/event-proxy-server/tsconfig.json | 8 + 6 files changed, 265 insertions(+) create mode 100644 packages/event-proxy-server/.eslintrc.js create mode 100644 packages/event-proxy-server/LICENSE create mode 100644 packages/event-proxy-server/package.json create mode 100644 packages/event-proxy-server/src/index.ts create mode 100644 packages/event-proxy-server/tsconfig.json diff --git a/package.json b/package.json index bd6bd97c3970..48ee8c0f781b 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "packages/ember", "packages/eslint-config-sdk", "packages/eslint-plugin-sdk", + "packages/event-proxy-server", "packages/gatsby", "packages/hub", "packages/integration-tests", diff --git a/packages/event-proxy-server/.eslintrc.js b/packages/event-proxy-server/.eslintrc.js new file mode 100644 index 000000000000..f4142bfee21b --- /dev/null +++ b/packages/event-proxy-server/.eslintrc.js @@ -0,0 +1,9 @@ +module.exports = { + env: { + node: true, + }, + extends: ['../../.eslintrc.js'], + parserOptions: { + sourceType: 'module', + }, +}; diff --git a/packages/event-proxy-server/LICENSE b/packages/event-proxy-server/LICENSE new file mode 100644 index 000000000000..d11896ba1181 --- /dev/null +++ b/packages/event-proxy-server/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2023 Sentry (https://sentry.io) and individual contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/event-proxy-server/package.json b/packages/event-proxy-server/package.json new file mode 100644 index 000000000000..78a111333caa --- /dev/null +++ b/packages/event-proxy-server/package.json @@ -0,0 +1,24 @@ +{ + "name": "@sentry-internal/event-proxy-server", + "version": "7.38.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "type": "module", + "module": "build/index.js", + "private": true, + "scripts": { + "build": "tsc --project tsconfig.json", + "build:transpile": "tsc --project tsconfig.json" + }, + "devDependencies": { + "typescript": "3.8.3", + "express": "4.18.2", + "@sentry/utils": "7.38.0", + "@sentry/types": "7.38.0" + }, + "volta": { + "extends": "../../package.json" + } +} diff --git a/packages/event-proxy-server/src/index.ts b/packages/event-proxy-server/src/index.ts new file mode 100644 index 000000000000..1d57a8e1baad --- /dev/null +++ b/packages/event-proxy-server/src/index.ts @@ -0,0 +1,209 @@ +import type { Envelope, EnvelopeItem, Event } from '@sentry/types'; +import { parseEnvelope } from '@sentry/utils'; +import * as fs from 'fs'; +import * as http from 'http'; +import * as https from 'https'; +import type { AddressInfo } from 'net'; +import * as os from 'os'; +import * as path from 'path'; + +interface SentryRequestCallbackData { + envelope: Envelope; + rawProxyRequestBody: string; + rawSentryResponseBody: string; + sentryResponseStatusCode?: number; +} + +export async function startEventProxyServer(options: { port: number; proxyServerName: string }): Promise { + const eventCallbackListeners: Set<(data: string) => void> = new Set(); + + const proxyServer = http.createServer((proxyRequest, proxyResponse) => { + const proxyRequestChunks: Uint8Array[] = []; + + proxyRequest.addListener('data', (chunk: Buffer) => { + proxyRequestChunks.push(chunk); + }); + + proxyRequest.addListener('error', err => { + throw err; + }); + + proxyRequest.addListener('end', () => { + const proxyRequestBody = Buffer.concat(proxyRequestChunks).toString(); + const envelopeHeader: { dsn?: string } = JSON.parse(proxyRequestBody.split('\n')[0]); + + if (!envelopeHeader.dsn) { + throw new Error('[event-proxy-server] No dsn on envelope header. Please set tunnel option.'); + } + + const { origin, pathname, host } = new URL(envelopeHeader.dsn); + + const projectId = pathname.substring(1); + const sentryIngestUrl = `${origin}/api/${projectId}/envelope/`; + + proxyRequest.headers.host = host; + + const sentryResponseChunks: Uint8Array[] = []; + + const sentryRequest = https.request( + sentryIngestUrl, + { headers: proxyRequest.headers, method: proxyRequest.method }, + sentryResponse => { + sentryResponse.addListener('data', (chunk: Buffer) => { + proxyResponse.write(chunk, 'binary'); + sentryResponseChunks.push(chunk); + }); + + sentryResponse.addListener('end', () => { + eventCallbackListeners.forEach(listener => { + const rawProxyRequestBody = Buffer.concat(proxyRequestChunks).toString(); + const rawSentryResponseBody = Buffer.concat(sentryResponseChunks).toString(); + + const data: SentryRequestCallbackData = { + envelope: parseEnvelope(rawProxyRequestBody, new TextEncoder(), new TextDecoder()), + rawProxyRequestBody, + rawSentryResponseBody, + sentryResponseStatusCode: sentryResponse.statusCode, + }; + + listener(Buffer.from(JSON.stringify(data)).toString('base64')); + }); + proxyResponse.end(); + }); + + sentryResponse.addListener('error', err => { + throw err; + }); + + proxyResponse.writeHead(sentryResponse.statusCode || 500, sentryResponse.headers); + }, + ); + + sentryRequest.write(Buffer.concat(proxyRequestChunks), 'binary'); + sentryRequest.end(); + }); + }); + + const proxyServerStartupPromise = new Promise(resolve => { + proxyServer.listen(options.port, () => { + resolve(); + }); + }); + + const eventCallbackServer = http.createServer((eventCallbackRequest, eventCallbackResponse) => { + eventCallbackResponse.statusCode = 200; + eventCallbackResponse.setHeader('connection', 'keep-alive'); + + const callbackListener = (data: string): void => { + eventCallbackResponse.write(data.concat('\n'), 'utf8'); + }; + + eventCallbackListeners.add(callbackListener); + + eventCallbackRequest.on('close', () => { + eventCallbackListeners.delete(callbackListener); + }); + + eventCallbackRequest.on('error', () => { + eventCallbackListeners.delete(callbackListener); + }); + }); + + const eventCallbackServerStartupPromise = new Promise(resolve => { + const listener = eventCallbackServer.listen(0, () => { + const port = String((listener.address() as AddressInfo).port); + const tmpFileWithPort = path.join(os.tmpdir(), `event-proxy-server-${options.proxyServerName}`); + fs.writeFileSync(tmpFileWithPort, port, { encoding: 'utf8' }); + resolve(); + }); + }); + + await eventCallbackServerStartupPromise; + await proxyServerStartupPromise; + return; +} + +export function waitForRequest( + proxyServerName: string, + callback: (eventData: SentryRequestCallbackData) => boolean, +): Promise { + const tmpFileWithPort = path.join(os.tmpdir(), `event-proxy-server-${proxyServerName}`); + const eventCallbackServerPort = fs.readFileSync(tmpFileWithPort, 'utf8'); + + return new Promise((resolve, reject) => { + const request = http.request(`http://localhost:${eventCallbackServerPort}/`, {}, response => { + let eventContents = ''; + + response.on('error', err => { + reject(err); + }); + + response.on('data', (chunk: Buffer) => { + const chunkString = chunk.toString('utf8'); + chunkString.split('').forEach(char => { + if (char === '\n') { + const eventCallbackData: SentryRequestCallbackData = JSON.parse( + Buffer.from(eventContents, 'base64').toString('utf8'), + ); + if (callback(eventCallbackData)) { + response.destroy(); + resolve(eventCallbackData); + } + eventContents = ''; + } else { + eventContents = eventContents.concat(char); + } + }); + }); + }); + + request.end(); + }); +} + +export function waitForEnvelopeItem( + proxyServerName: string, + callback: (envelopeItem: EnvelopeItem) => boolean, +): Promise { + return new Promise((resolve, reject) => { + waitForRequest(proxyServerName, eventData => { + const envelopeItems = eventData.envelope[1]; + for (const envelopeItem of envelopeItems) { + if (callback(envelopeItem)) { + resolve(envelopeItem); + return true; + } + } + return false; + }).catch(reject); + }); +} + +export function waitForError(proxyServerName: string, callback: (transactionEvent: Event) => boolean): Promise { + return new Promise((resolve, reject) => { + waitForEnvelopeItem(proxyServerName, envelopeItem => { + const [envelopeItemHeader, envelopeItemBody] = envelopeItem; + if (envelopeItemHeader.type === 'event' && callback(envelopeItemBody as Event)) { + resolve(envelopeItemBody as Event); + return true; + } + return false; + }).catch(reject); + }); +} + +export function waitForTransaction( + proxyServerName: string, + callback: (transactionEvent: Event) => boolean, +): Promise { + return new Promise((resolve, reject) => { + waitForEnvelopeItem(proxyServerName, envelopeItem => { + const [envelopeItemHeader, envelopeItemBody] = envelopeItem; + if (envelopeItemHeader.type === 'transaction' && callback(envelopeItemBody as Event)) { + resolve(envelopeItemBody as Event); + return true; + } + return false; + }).catch(reject); + }); +} diff --git a/packages/event-proxy-server/tsconfig.json b/packages/event-proxy-server/tsconfig.json new file mode 100644 index 000000000000..9ab8207a9d81 --- /dev/null +++ b/packages/event-proxy-server/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "build" + }, + "include": ["src/**/*.ts"] +} From 2e832cab65feb69475ab362401ac4f678d84cdec Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 14:50:13 +0000 Subject: [PATCH 07/32] Add some comments --- packages/event-proxy-server/src/index.ts | 13 ++++++++++++- packages/event-proxy-server/tsconfig.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/event-proxy-server/src/index.ts b/packages/event-proxy-server/src/index.ts index 1d57a8e1baad..35966a7d3e1c 100644 --- a/packages/event-proxy-server/src/index.ts +++ b/packages/event-proxy-server/src/index.ts @@ -7,6 +7,13 @@ import type { AddressInfo } from 'net'; import * as os from 'os'; import * as path from 'path'; +interface EventProxyServerOptions { + /** Port to start the event proxy server at. */ + port: number; + /** The name for the proxy server used for referencing it with listener functions */ + proxyServerName: string; +} + interface SentryRequestCallbackData { envelope: Envelope; rawProxyRequestBody: string; @@ -14,7 +21,11 @@ interface SentryRequestCallbackData { sentryResponseStatusCode?: number; } -export async function startEventProxyServer(options: { port: number; proxyServerName: string }): Promise { +/** + * Starts an event proxy server that will proxy events to sentry when the `tunnel` option is used. Point the `tunnel` + * option to this server (like this `tunnel: http://localhost:${port option}/`). + */ +export async function startEventProxyServer(options: EventProxyServerOptions): Promise { const eventCallbackListeners: Set<(data: string) => void> = new Set(); const proxyServer = http.createServer((proxyRequest, proxyResponse) => { diff --git a/packages/event-proxy-server/tsconfig.json b/packages/event-proxy-server/tsconfig.json index 9ab8207a9d81..8b6bbaf70de7 100644 --- a/packages/event-proxy-server/tsconfig.json +++ b/packages/event-proxy-server/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "module": "esnext", + "module": "ES2015", "outDir": "build" }, "include": ["src/**/*.ts"] From d379fc8f9f5fd7cd18a23344f6551d231d550c8b Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 16:37:13 +0000 Subject: [PATCH 08/32] Add tests --- .../.gitignore | 0 .../.npmrc | 0 .../.vscode/settings.json | 0 .../app/head.tsx | 0 .../app/layout.tsx | 0 .../app/page.tsx | 3 +- .../app/user/[id]/page.tsx | 0 .../globals.d.ts | 0 .../next-env.d.ts | 0 .../next.config.js | 0 .../package.json | 5 +- .../playwright.config.ts | 29 ++- .../nextjs-13-app-dir/sentry.client.config.ts | 11 ++ .../nextjs-13-app-dir/sentry.server.config.ts | 11 ++ .../nextjs-13-app-dir/start-event-proxy.js | 6 + .../test-recipe.json | 11 +- .../tests/exceptions.test.ts | 52 ++++++ .../tests/transactions.test.ts | 94 ++++++++++ .../tsconfig.json | 18 +- .../yarn.lock | 3 + .../sentry.client.config.ts | 30 --- .../sentry.server.config.ts | 38 ---- .../tests/behaviour-client.test.ts | 171 ------------------ .../tests/behaviour-server.test.ts | 75 -------- packages/event-proxy-server/package.json | 5 +- packages/event-proxy-server/tsconfig.json | 6 +- 26 files changed, 201 insertions(+), 367 deletions(-) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/.gitignore (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/.npmrc (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/.vscode/settings.json (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/app/head.tsx (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/app/layout.tsx (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/app/page.tsx (74%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/app/user/[id]/page.tsx (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/globals.d.ts (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/next-env.d.ts (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/next.config.js (100%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/package.json (79%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/playwright.config.ts (78%) create mode 100644 packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts create mode 100644 packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts create mode 100644 packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.js rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/test-recipe.json (63%) create mode 100644 packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts create mode 100644 packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/tsconfig.json (65%) rename packages/e2e-tests/test-applications/{standard-frontend-next-app-dir => nextjs-13-app-dir}/yarn.lock (99%) delete mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts delete mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts delete mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts delete mode 100644 packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.gitignore b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.gitignore rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.npmrc b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.npmrc rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/.npmrc diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.vscode/settings.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.vscode/settings.json similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/.vscode/settings.json rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/.vscode/settings.json diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/head.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/head.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/head.tsx rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/app/head.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/layout.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/layout.tsx rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/page.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/page.tsx similarity index 74% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/page.tsx rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/app/page.tsx index 79f1c280024f..1caf96ed7786 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/page.tsx +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/page.tsx @@ -11,8 +11,7 @@ export default function Home() { value="Capture Exception" id="exception-button" onClick={() => { - const eventId = Sentry.captureException(new Error('I am an error!')); - window.capturedExceptionId = eventId; + Sentry.captureException(new Error('I am a click error!')); }} /> diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/user/[id]/page.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/user/[id]/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/app/user/[id]/page.tsx rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/app/user/[id]/page.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/globals.d.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/globals.d.ts rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/globals.d.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next-env.d.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next-env.d.ts rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next.config.js b/packages/e2e-tests/test-applications/nextjs-13-app-dir/next.config.js similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/next.config.js rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/next.config.js diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/package.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json similarity index 79% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/package.json rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json index ec95e8707519..6022279c2316 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/package.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json @@ -7,9 +7,7 @@ "build": "next build", "start": "next start", "lint": "next lint", - "test": "test:prod && test:dev", - "test:prod": "TEST_MODE=prod playwright test", - "test:dev": "TEST_MODE=dev playwright test" + "test": "playwright test" }, "dependencies": { "@next/font": "13.0.7", @@ -23,6 +21,7 @@ "typescript": "4.9.4" }, "devDependencies": { + "@sentry-internal/event-proxy-server": "file:../../../event-proxy-server", "@playwright/test": "^1.27.1" } } diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/playwright.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts similarity index 78% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/playwright.config.ts rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts index dabfa9c23619..3951ed03e2f6 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/playwright.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts @@ -30,7 +30,7 @@ const config: PlaywrightTestConfig = { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ - // baseURL: 'http://localhost:3000', + baseURL: 'http://localhost:3000', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -44,26 +44,19 @@ const config: PlaywrightTestConfig = { ...devices['Desktop Chrome'], }, }, - // For now we only test Chrome! - // { - // name: 'firefox', - // use: { - // ...devices['Desktop Firefox'], - // }, - // }, - // { - // name: 'webkit', - // use: { - // ...devices['Desktop Safari'], - // }, - // }, ], /* Run your local dev server before starting the tests */ - webServer: { - command: process.env.TEST_MODE === 'prod' ? 'yarn start' : 'yarn dev', - port: 3000, - }, + webServer: [ + { + command: 'yarn start', + port: 3000, + }, + { + command: 'node start-event-proxy.js', + port: 27496, + }, + ], }; export default config; diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts new file mode 100644 index 000000000000..b03390a12be4 --- /dev/null +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts @@ -0,0 +1,11 @@ +// This file configures the initialization of Sentry on the browser. +// The config you add here will be used whenever a page is visited. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from '@sentry/nextjs'; + +Sentry.init({ + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + tunnel: 'http://localhost:27496/', // proxy server + tracesSampleRate: 1.0, +}); diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts new file mode 100644 index 000000000000..3485dab269c9 --- /dev/null +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts @@ -0,0 +1,11 @@ +// This file configures the initialization of Sentry on the server. +// The config you add here will be used whenever the server handles a request. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from '@sentry/nextjs'; + +Sentry.init({ + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + tunnel: 'http://localhost:27496/', + tracesSampleRate: 1.0, +}); diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.js b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.js new file mode 100644 index 000000000000..5469cb066c9e --- /dev/null +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.js @@ -0,0 +1,6 @@ +const { startEventProxyServer } = require('@sentry-internal/event-proxy-server'); + +startEventProxyServer({ + port: 27496, + proxyServerName: 'nextjs-13-app-dir', +}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/test-recipe.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json similarity index 63% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/test-recipe.json rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json index 345a90a420d4..6f34be16d944 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/test-recipe.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json @@ -1,6 +1,6 @@ { "$schema": "../../test-recipe-schema.json", - "testApplicationName": "next-app-app-dir", + "testApplicationName": "nextjs-13-app-dir", "buildCommand": "yarn install --pure-lockfile && npx playwright install && yarn build", "tests": [ { @@ -11,14 +11,5 @@ "testName": "Playwright tests - Dev Mode", "testCommand": "yarn test:dev" } - ], - "canaryVersions": [ - { - "dependencyOverrides": { - "next": "latest", - "react": "latest", - "react-dom": "latest" - } - } ] } diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts new file mode 100644 index 000000000000..ae2b208f79e1 --- /dev/null +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts @@ -0,0 +1,52 @@ +import { test, expect } from '@playwright/test'; +import { waitForError, waitForTransaction } from '@sentry-internal/event-proxy-server'; +import axios, { AxiosError } from 'axios'; + +const authToken = process.env.E2E_TEST_AUTH_TOKEN; +const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; +const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; +const EVENT_POLLING_TIMEOUT = 30_000; + +test('Sends a client-side exception to Sentry', async ({ page }) => { + await page.goto('/'); + + const errorEventPromise = waitForError('nextjs-13-app-dir', errorEvent => { + return errorEvent?.exception?.values?.[0]?.value === 'I am a click error!'; + }); + + const exceptionButton = page.locator('id=exception-button'); + await exceptionButton.click(); + + const errorEvent = await errorEventPromise; + const exceptionEventId = errorEvent.event_id; + + console.log(`Polling for error eventId: ${exceptionEventId}`); + + await expect + .poll( + async () => { + try { + const response = await axios.get( + `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionEventId}/`, + { headers: { Authorization: `Bearer ${authToken}` } }, + ); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { + timeout: EVENT_POLLING_TIMEOUT, + }, + ) + .toBe(200); +}); diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts new file mode 100644 index 000000000000..e2f0b6ecf88b --- /dev/null +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts @@ -0,0 +1,94 @@ +import { test, expect } from '@playwright/test'; +import { waitForError, waitForTransaction } from '@sentry-internal/event-proxy-server'; +import axios, { AxiosError } from 'axios'; + +const authToken = process.env.E2E_TEST_AUTH_TOKEN; +const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; +const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; +const EVENT_POLLING_TIMEOUT = 30_000; + +test('Sends a pageload transaction', async ({ page }) => { + const pageloadTransactionEventPromise = waitForTransaction('nextjs-13-app-dir', transactionEvent => { + return transactionEvent?.contexts?.trace?.op === 'pageload' && transactionEvent?.transaction === '/'; + }); + + await page.goto('/'); + + const transactionEvent = await pageloadTransactionEventPromise; + const transactionEventId = transactionEvent.event_id; + + console.log(`Polling for pageload transaction eventId: ${transactionEventId}`); + + await expect + .poll( + async () => { + try { + const response = await axios.get( + `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`, + { headers: { Authorization: `Bearer ${authToken}` } }, + ); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { + timeout: EVENT_POLLING_TIMEOUT, + }, + ) + .toBe(200); +}); + +test('Sends a transaction for a server component', async ({ page }) => { + const serverComponentTransactionPromise = waitForTransaction('nextjs-13-app-dir', transactionEvent => { + console.log(transactionEvent); + return ( + transactionEvent?.contexts?.trace?.op === 'function.nextjs' && + transactionEvent?.transaction === 'Page Server Component (/user/[id])' + ); + }); + + await page.goto('/user/4'); + + const transactionEvent = await serverComponentTransactionPromise; + const transactionEventId = transactionEvent.event_id; + + console.log(`Polling for server component transaction eventId: ${transactionEventId}`); + + await expect + .poll( + async () => { + try { + const response = await axios.get( + `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`, + { headers: { Authorization: `Bearer ${authToken}` } }, + ); + + return response.status; + } catch (e) { + if (e instanceof AxiosError && e.response) { + if (e.response.status !== 404) { + throw e; + } else { + return e.response.status; + } + } else { + throw e; + } + } + }, + { + timeout: EVENT_POLLING_TIMEOUT, + }, + ) + .toBe(200); +}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tsconfig.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tsconfig.json similarity index 65% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tsconfig.json rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/tsconfig.json index 5816e0adb26c..17538d1bad93 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tsconfig.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -24,14 +20,6 @@ } ] }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - "next.config.js", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js", ".next/types/**/*.ts"], + "exclude": ["node_modules"] } diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/yarn.lock b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock similarity index 99% rename from packages/e2e-tests/test-applications/standard-frontend-next-app-dir/yarn.lock rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock index a73259212b41..6a4bfb083b18 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/yarn.lock +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock @@ -111,6 +111,9 @@ estree-walker "^2.0.2" picomatch "^2.3.1" +"@sentry-internal/event-proxy-server@file:../../../event-proxy-server": + version "7.38.0" + "@sentry/browser@7.38.0": version "7.38.0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.38.0.tgz#cdb39da23f9ee2ce47395b2c12542acb4969efa7" diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts deleted file mode 100644 index 9357b9eedc41..000000000000 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.client.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -// This file configures the initialization of Sentry on the browser. -// The config you add here will be used whenever a page is visited. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - -import * as Sentry from '@sentry/nextjs'; - -Sentry.init({ - dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1.0, - // ... - // Note: if you want to override the automatic release value, do not set a - // `release` value here - use the environment variable `SENTRY_RELEASE`, so - // that it will also get attached to your source maps -}); - -Sentry.addGlobalEventProcessor(event => { - if ( - event.type === 'transaction' && - (event.contexts?.trace?.op === 'pageload' || event.contexts?.trace?.op === 'navigation') - ) { - const eventId = event.event_id; - if (eventId) { - window.recordedTransactions = window.recordedTransactions || []; - window.recordedTransactions.push(eventId); - } - } - - return event; -}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts deleted file mode 100644 index de18a1117990..000000000000 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/sentry.server.config.ts +++ /dev/null @@ -1,38 +0,0 @@ -// This file configures the initialization of Sentry on the server. -// The config you add here will be used whenever the server handles a request. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - -import * as Sentry from '@sentry/nextjs'; - -declare global { - namespace globalThis { - var transactionIds: string[]; - } -} - -Sentry.init({ - dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - // Adjust this value in production, or use tracesSampler for greater control - tracesSampleRate: 1.0, - // ... - // Note: if you want to override the automatic release value, do not set a - // `release` value here - use the environment variable `SENTRY_RELEASE`, so - // that it will also get attached to your source maps - - integrations: [new Sentry.Integrations.LocalVariables()], -}); - -Sentry.addGlobalEventProcessor(event => { - global.transactionIds = global.transactionIds || []; - - if (event.type === 'transaction') { - const eventId = event.event_id; - - if (eventId) { - global.transactionIds.push(eventId); - console.log('Recorded', event.transaction, eventId); - } - } - - return event; -}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts deleted file mode 100644 index d0ede66cf32f..000000000000 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-client.test.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { test, expect } from '@playwright/test'; -import axios, { AxiosError } from 'axios'; - -const authToken = process.env.E2E_TEST_AUTH_TOKEN; -const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; -const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; -const EVENT_POLLING_TIMEOUT = 30_000; - -test('Sends a client-side exception to Sentry', async ({ page }) => { - await page.goto('/'); - - const exceptionButton = page.locator('id=exception-button'); - await exceptionButton.click(); - - const exceptionIdHandle = await page.waitForFunction(() => window.capturedExceptionId); - const exceptionEventId = await exceptionIdHandle.jsonValue(); - - console.log(`Polling for error eventId: ${exceptionEventId}`); - - await expect - .poll( - async () => { - try { - const response = await axios.get( - `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionEventId}/`, - { headers: { Authorization: `Bearer ${authToken}` } }, - ); - - return response.status; - } catch (e) { - if (e instanceof AxiosError && e.response) { - if (e.response.status !== 404) { - throw e; - } else { - return e.response.status; - } - } else { - throw e; - } - } - }, - { - timeout: EVENT_POLLING_TIMEOUT, - }, - ) - .toBe(200); -}); - -test('Sends a pageload transaction to Sentry', async ({ page }) => { - await page.goto('/'); - - const recordedTransactionsHandle = await page.waitForFunction(() => { - if (window.recordedTransactions && window.recordedTransactions?.length >= 1) { - return window.recordedTransactions; - } else { - return undefined; - } - }); - const recordedTransactionEventIds = await recordedTransactionsHandle.jsonValue(); - - if (recordedTransactionEventIds === undefined) { - throw new Error("Application didn't record any transaction event IDs."); - } - - let hadPageLoadTransaction = false; - - console.log(`Polling for transaction eventIds: ${JSON.stringify(recordedTransactionEventIds)}`); - - await Promise.all( - recordedTransactionEventIds.map(async transactionEventId => { - await expect - .poll( - async () => { - try { - const response = await axios.get( - `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`, - { headers: { Authorization: `Bearer ${authToken}` } }, - ); - - if (response.data.contexts.trace.op === 'pageload') { - hadPageLoadTransaction = true; - } - - return response.status; - } catch (e) { - if (e instanceof AxiosError && e.response) { - if (e.response.status !== 404) { - throw e; - } else { - return e.response.status; - } - } else { - throw e; - } - } - }, - { - timeout: EVENT_POLLING_TIMEOUT, - }, - ) - .toBe(200); - }), - ); - - expect(hadPageLoadTransaction).toBe(true); -}); - -test('Sends a navigation transaction to Sentry', async ({ page }) => { - await page.goto('/'); - - // Give pageload transaction time to finish - await page.waitForTimeout(4000); - - const linkElement = page.locator('id=navigation'); - await linkElement.click(); - - const recordedTransactionsHandle = await page.waitForFunction(() => { - if (window.recordedTransactions && window.recordedTransactions?.length >= 2) { - return window.recordedTransactions; - } else { - return undefined; - } - }); - const recordedTransactionEventIds = await recordedTransactionsHandle.jsonValue(); - - if (recordedTransactionEventIds === undefined) { - throw new Error("Application didn't record any transaction event IDs."); - } - - let hadPageNavigationTransaction = false; - - console.log(`Polling for transaction eventIds: ${JSON.stringify(recordedTransactionEventIds)}`); - - await Promise.all( - recordedTransactionEventIds.map(async transactionEventId => { - await expect - .poll( - async () => { - try { - const response = await axios.get( - `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`, - { headers: { Authorization: `Bearer ${authToken}` } }, - ); - - if (response.data.contexts.trace.op === 'navigation') { - hadPageNavigationTransaction = true; - } - - return response.status; - } catch (e) { - if (e instanceof AxiosError && e.response) { - if (e.response.status !== 404) { - throw e; - } else { - return e.response.status; - } - } else { - throw e; - } - } - }, - { - timeout: EVENT_POLLING_TIMEOUT, - }, - ) - .toBe(200); - }), - ); - - expect(hadPageNavigationTransaction).toBe(true); -}); diff --git a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts b/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts deleted file mode 100644 index 3b3d74af1885..000000000000 --- a/packages/e2e-tests/test-applications/standard-frontend-next-app-dir/tests/behaviour-server.test.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { test, expect } from '@playwright/test'; -import axios, { AxiosError } from 'axios'; - -const authToken = process.env.E2E_TEST_AUTH_TOKEN; -const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG; -const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT; -const EVENT_POLLING_TIMEOUT = 30_000; - -test('Sends a server-side exception to Sentry', async ({ baseURL }) => { - const { data } = await axios.get(`${baseURL}/api/error`); - const { exceptionId } = data; - - const url = `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionId}/`; - - console.log(`Polling for error eventId: ${exceptionId}`); - - await expect - .poll( - async () => { - try { - const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } }); - - return response.status; - } catch (e) { - if (e instanceof AxiosError && e.response) { - if (e.response.status !== 404) { - throw e; - } else { - return e.response.status; - } - } else { - throw e; - } - } - }, - { timeout: EVENT_POLLING_TIMEOUT }, - ) - .toBe(200); -}); - -test('Sends server-side transactions to Sentry', async ({ baseURL }) => { - const { data } = await axios.get(`${baseURL}/api/success`); - const { transactionIds } = data; - - console.log(`Polling for transaction eventIds: ${JSON.stringify(transactionIds)}`); - - await Promise.all( - transactionIds.map(async (transactionId: string) => { - const url = `https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionId}/`; - - await expect - .poll( - async () => { - try { - const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } }); - - return response.status; - } catch (e) { - if (e instanceof AxiosError && e.response) { - if (e.response.status !== 404) { - throw e; - } else { - return e.response.status; - } - } else { - throw e; - } - } - }, - { timeout: EVENT_POLLING_TIMEOUT }, - ) - .toBe(200); - }), - ); -}); diff --git a/packages/event-proxy-server/package.json b/packages/event-proxy-server/package.json index 78a111333caa..44eca4eb341c 100644 --- a/packages/event-proxy-server/package.json +++ b/packages/event-proxy-server/package.json @@ -5,8 +5,8 @@ "engines": { "node": ">=10" }, - "type": "module", - "module": "build/index.js", + "main": "build/index.js", + "types": "build/index.d.ts", "private": true, "scripts": { "build": "tsc --project tsconfig.json", @@ -14,7 +14,6 @@ }, "devDependencies": { "typescript": "3.8.3", - "express": "4.18.2", "@sentry/utils": "7.38.0", "@sentry/types": "7.38.0" }, diff --git a/packages/event-proxy-server/tsconfig.json b/packages/event-proxy-server/tsconfig.json index 8b6bbaf70de7..3e5752b2cd24 100644 --- a/packages/event-proxy-server/tsconfig.json +++ b/packages/event-proxy-server/tsconfig.json @@ -1,8 +1,10 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "module": "ES2015", - "outDir": "build" + "module": "CommonJS", + "outDir": "build", + "declaration": true, + "esModuleInterop": true }, "include": ["src/**/*.ts"] } From b41ce3b208484f1b1902d9e55bcbf04ba579c3f0 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 16:43:05 +0000 Subject: [PATCH 09/32] cjs --- packages/event-proxy-server/package.json | 5 ++--- packages/event-proxy-server/tsconfig.json | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/event-proxy-server/package.json b/packages/event-proxy-server/package.json index 78a111333caa..44eca4eb341c 100644 --- a/packages/event-proxy-server/package.json +++ b/packages/event-proxy-server/package.json @@ -5,8 +5,8 @@ "engines": { "node": ">=10" }, - "type": "module", - "module": "build/index.js", + "main": "build/index.js", + "types": "build/index.d.ts", "private": true, "scripts": { "build": "tsc --project tsconfig.json", @@ -14,7 +14,6 @@ }, "devDependencies": { "typescript": "3.8.3", - "express": "4.18.2", "@sentry/utils": "7.38.0", "@sentry/types": "7.38.0" }, diff --git a/packages/event-proxy-server/tsconfig.json b/packages/event-proxy-server/tsconfig.json index 8b6bbaf70de7..3e5752b2cd24 100644 --- a/packages/event-proxy-server/tsconfig.json +++ b/packages/event-proxy-server/tsconfig.json @@ -1,8 +1,10 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "module": "ES2015", - "outDir": "build" + "module": "CommonJS", + "outDir": "build", + "declaration": true, + "esModuleInterop": true }, "include": ["src/**/*.ts"] } From ffcc206fb1381ecd719e31f8f8fa8d1ebd675eee Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 17:55:47 +0000 Subject: [PATCH 10/32] . --- .../test-applications/nextjs-13-app-dir/test-recipe.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json index 6f34be16d944..bfdef9508d7b 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/test-recipe.json @@ -4,12 +4,8 @@ "buildCommand": "yarn install --pure-lockfile && npx playwright install && yarn build", "tests": [ { - "testName": "Playwright tests - Prod Mode", - "testCommand": "yarn test:prod" - }, - { - "testName": "Playwright tests - Dev Mode", - "testCommand": "yarn test:dev" + "testName": "Playwright tests", + "testCommand": "yarn test" } ] } From 94daab4f0e8e0dc076688b36ee1f76511d8a0a1f Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 21:00:31 +0000 Subject: [PATCH 11/32] move --- .../test-utils/event-proxy-server.ts} | 0 packages/event-proxy-server/.eslintrc.js | 9 -------- packages/event-proxy-server/LICENSE | 14 ----------- packages/event-proxy-server/package.json | 23 ------------------- packages/event-proxy-server/tsconfig.json | 10 -------- 5 files changed, 56 deletions(-) rename packages/{event-proxy-server/src/index.ts => e2e-tests/test-utils/event-proxy-server.ts} (100%) delete mode 100644 packages/event-proxy-server/.eslintrc.js delete mode 100644 packages/event-proxy-server/LICENSE delete mode 100644 packages/event-proxy-server/package.json delete mode 100644 packages/event-proxy-server/tsconfig.json diff --git a/packages/event-proxy-server/src/index.ts b/packages/e2e-tests/test-utils/event-proxy-server.ts similarity index 100% rename from packages/event-proxy-server/src/index.ts rename to packages/e2e-tests/test-utils/event-proxy-server.ts diff --git a/packages/event-proxy-server/.eslintrc.js b/packages/event-proxy-server/.eslintrc.js deleted file mode 100644 index f4142bfee21b..000000000000 --- a/packages/event-proxy-server/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - env: { - node: true, - }, - extends: ['../../.eslintrc.js'], - parserOptions: { - sourceType: 'module', - }, -}; diff --git a/packages/event-proxy-server/LICENSE b/packages/event-proxy-server/LICENSE deleted file mode 100644 index d11896ba1181..000000000000 --- a/packages/event-proxy-server/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2023 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/event-proxy-server/package.json b/packages/event-proxy-server/package.json deleted file mode 100644 index 44eca4eb341c..000000000000 --- a/packages/event-proxy-server/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@sentry-internal/event-proxy-server", - "version": "7.38.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "main": "build/index.js", - "types": "build/index.d.ts", - "private": true, - "scripts": { - "build": "tsc --project tsconfig.json", - "build:transpile": "tsc --project tsconfig.json" - }, - "devDependencies": { - "typescript": "3.8.3", - "@sentry/utils": "7.38.0", - "@sentry/types": "7.38.0" - }, - "volta": { - "extends": "../../package.json" - } -} diff --git a/packages/event-proxy-server/tsconfig.json b/packages/event-proxy-server/tsconfig.json deleted file mode 100644 index 3e5752b2cd24..000000000000 --- a/packages/event-proxy-server/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "module": "CommonJS", - "outDir": "build", - "declaration": true, - "esModuleInterop": true - }, - "include": ["src/**/*.ts"] -} From 24249cf0d0ba9850b305d6f4414d26b9e4db31bc Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 21:03:33 +0000 Subject: [PATCH 12/32] . --- .../{start-event-proxy.js => start-event-proxy.ts} | 2 +- .../nextjs-13-app-dir/tests/exceptions.test.ts | 2 +- .../nextjs-13-app-dir/tests/transactions.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename packages/e2e-tests/test-applications/nextjs-13-app-dir/{start-event-proxy.js => start-event-proxy.ts} (50%) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.js b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts similarity index 50% rename from packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.js rename to packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts index 5469cb066c9e..c4b99606e9bb 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.js +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts @@ -1,4 +1,4 @@ -const { startEventProxyServer } = require('@sentry-internal/event-proxy-server'); +import { startEventProxyServer } from '../../test-utils/event-proxy-server'; startEventProxyServer({ port: 27496, diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts index ae2b208f79e1..f487310cea04 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts @@ -1,5 +1,5 @@ import { test, expect } from '@playwright/test'; -import { waitForError, waitForTransaction } from '@sentry-internal/event-proxy-server'; +import { waitForError } from '../../../test-utils/event-proxy-server'; import axios, { AxiosError } from 'axios'; const authToken = process.env.E2E_TEST_AUTH_TOKEN; diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts index e2f0b6ecf88b..c99f209e0d46 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts @@ -1,5 +1,5 @@ import { test, expect } from '@playwright/test'; -import { waitForError, waitForTransaction } from '@sentry-internal/event-proxy-server'; +import { waitForTransaction } from '../../../test-utils/event-proxy-server'; import axios, { AxiosError } from 'axios'; const authToken = process.env.E2E_TEST_AUTH_TOKEN; From b505bf2ac214a3f09bed7b8655ce66d8b132ea22 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 21:19:46 +0000 Subject: [PATCH 13/32] . --- .../e2e-tests/test-applications/nextjs-13-app-dir/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json index 6022279c2316..5f581632b51d 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json @@ -21,7 +21,6 @@ "typescript": "4.9.4" }, "devDependencies": { - "@sentry-internal/event-proxy-server": "file:../../../event-proxy-server", "@playwright/test": "^1.27.1" } } From a70e3fa80cd01fc03fe85ffc8f8fefb6fbaa9ac0 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 21:34:32 +0000 Subject: [PATCH 14/32] . --- .../e2e-tests/test-applications/nextjs-13-app-dir/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore index d9f766878259..f2001e2eb568 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore @@ -39,3 +39,5 @@ next-env.d.ts # Sentry .sentryclirc + +.vscode/ From a3eb731e4807d415f86d25e98b2666e3aad20c96 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 21:34:58 +0000 Subject: [PATCH 15/32] . --- .../test-applications/nextjs-13-app-dir/app/layout.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx index 225b6038d7fb..f3ef34cd8b91 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/app/layout.tsx @@ -1,8 +1,4 @@ -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { +export default function RootLayout({ children }: { children: React.ReactNode }) { return ( {children} From cc3905a683b0b528b41a3819b4bb302142c2a576 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 21:36:27 +0000 Subject: [PATCH 16/32] . --- .../e2e-tests/test-applications/nextjs-13-app-dir/.gitignore | 2 +- .../test-applications/nextjs-13-app-dir/.vscode/settings.json | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 packages/e2e-tests/test-applications/nextjs-13-app-dir/.vscode/settings.json diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore index f2001e2eb568..35b1048ce099 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.gitignore @@ -40,4 +40,4 @@ next-env.d.ts # Sentry .sentryclirc -.vscode/ +.vscode diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.vscode/settings.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/.vscode/settings.json deleted file mode 100644 index d0679104bdab..000000000000 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/.vscode/settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true -} \ No newline at end of file From 417056864419ee497610d4198711b084a676004a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 21:41:00 +0000 Subject: [PATCH 17/32] . --- .../e2e-tests/test-applications/nextjs-13-app-dir/package.json | 1 + .../test-applications/nextjs-13-app-dir/playwright.config.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json index 5f581632b51d..7da0ca024410 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json @@ -21,6 +21,7 @@ "typescript": "4.9.4" }, "devDependencies": { + "ts-node": "10.9.1", "@playwright/test": "^1.27.1" } } diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts index 3951ed03e2f6..39ebbf131a3d 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts @@ -53,7 +53,7 @@ const config: PlaywrightTestConfig = { port: 3000, }, { - command: 'node start-event-proxy.js', + command: 'yarn ts-node start-event-proxy.ts', port: 27496, }, ], From d9a8153b26657df21db4469fd96a75da43f2ecc9 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 23 Feb 2023 22:00:50 +0000 Subject: [PATCH 18/32] . --- .../test-applications/nextjs-13-app-dir/start-event-proxy.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts index c4b99606e9bb..045fcfce6040 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts @@ -1,6 +1,8 @@ -import { startEventProxyServer } from '../../test-utils/event-proxy-server'; +const { startEventProxyServer } = require('../../test-utils/event-proxy-server'); startEventProxyServer({ port: 27496, proxyServerName: 'nextjs-13-app-dir', }); + +export {}; From 130084cca9fa5f4873254f778fa5d65beda9f42a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 09:15:06 +0000 Subject: [PATCH 19/32] pls finally pass --- .../nextjs-13-app-dir/playwright.config.ts | 2 +- .../test-applications/nextjs-13-app-dir/tsconfig.json | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts index 39ebbf131a3d..80b597cc27db 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts @@ -53,7 +53,7 @@ const config: PlaywrightTestConfig = { port: 3000, }, { - command: 'yarn ts-node start-event-proxy.ts', + command: 'yarn ts-nod-script start-event-proxy.ts', port: 27496, }, ], diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tsconfig.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tsconfig.json index 17538d1bad93..bacd391b697e 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tsconfig.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tsconfig.json @@ -21,5 +21,10 @@ ] }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "ts-node": { + "compilerOptions": { + "module": "CommonJS" + } + } } From 41f266ae7e39e2a777efa046347f4241e4cd63c6 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 09:38:38 +0000 Subject: [PATCH 20/32] sigh --- .../test-applications/nextjs-13-app-dir/playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts index 80b597cc27db..55e54aefaefa 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/playwright.config.ts @@ -53,7 +53,7 @@ const config: PlaywrightTestConfig = { port: 3000, }, { - command: 'yarn ts-nod-script start-event-proxy.ts', + command: 'yarn ts-node-script start-event-proxy.ts', port: 27496, }, ], From bb16d7d5e1108bcbb5d3aebb4954e93cb88a3f09 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 09:42:08 +0000 Subject: [PATCH 21/32] remove console.log --- .../nextjs-13-app-dir/tests/transactions.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts index c99f209e0d46..0092a01ebef6 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts @@ -50,7 +50,6 @@ test('Sends a pageload transaction', async ({ page }) => { test('Sends a transaction for a server component', async ({ page }) => { const serverComponentTransactionPromise = waitForTransaction('nextjs-13-app-dir', transactionEvent => { - console.log(transactionEvent); return ( transactionEvent?.contexts?.trace?.op === 'function.nextjs' && transactionEvent?.transaction === 'Page Server Component (/user/[id])' From f1b5be4184c95608225aac160d7fab4a0610daed Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 09:59:45 +0000 Subject: [PATCH 22/32] . --- .../nextjs-13-app-dir/sentry.client.config.ts | 4 ---- .../nextjs-13-app-dir/sentry.edge.config.ts | 7 +++++++ .../nextjs-13-app-dir/sentry.server.config.ts | 6 +----- .../nextjs-13-app-dir/tests/transactions.test.ts | 3 +++ 4 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.edge.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts index b03390a12be4..af39dd76f384 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.client.config.ts @@ -1,7 +1,3 @@ -// This file configures the initialization of Sentry on the browser. -// The config you add here will be used whenever a page is visited. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - import * as Sentry from '@sentry/nextjs'; Sentry.init({ diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.edge.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.edge.config.ts new file mode 100644 index 000000000000..af39dd76f384 --- /dev/null +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.edge.config.ts @@ -0,0 +1,7 @@ +import * as Sentry from '@sentry/nextjs'; + +Sentry.init({ + dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, + tunnel: 'http://localhost:27496/', // proxy server + tracesSampleRate: 1.0, +}); diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts index 3485dab269c9..af39dd76f384 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts @@ -1,11 +1,7 @@ -// This file configures the initialization of Sentry on the server. -// The config you add here will be used whenever the server handles a request. -// https://docs.sentry.io/platforms/javascript/guides/nextjs/ - import * as Sentry from '@sentry/nextjs'; Sentry.init({ dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: 'http://localhost:27496/', + tunnel: 'http://localhost:27496/', // proxy server tracesSampleRate: 1.0, }); diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts index 0092a01ebef6..16451f6c62b4 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts @@ -50,6 +50,7 @@ test('Sends a pageload transaction', async ({ page }) => { test('Sends a transaction for a server component', async ({ page }) => { const serverComponentTransactionPromise = waitForTransaction('nextjs-13-app-dir', transactionEvent => { + console.log('AAA', JSON.stringify(transactionEvent)); return ( transactionEvent?.contexts?.trace?.op === 'function.nextjs' && transactionEvent?.transaction === 'Page Server Component (/user/[id])' @@ -58,6 +59,8 @@ test('Sends a transaction for a server component', async ({ page }) => { await page.goto('/user/4'); + console.log('Waiting for server component transaction.'); + const transactionEvent = await serverComponentTransactionPromise; const transactionEventId = transactionEvent.event_id; From 493098b6a62b5dfdcffb05932894aef2565da9d5 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 11:14:55 +0000 Subject: [PATCH 23/32] work pls? --- .../nextjs-13-app-dir/package.json | 2 +- .../nextjs-13-app-dir/yarn.lock | 104 +++++++++++++++++- packages/nextjs/src/common/types.ts | 4 - .../serverComponentWrapperTemplate.ts | 19 +--- .../server/wrapServerComponentWithSentry.ts | 10 +- 5 files changed, 105 insertions(+), 34 deletions(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json index 7da0ca024410..2bb563d85e25 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/package.json @@ -15,7 +15,7 @@ "@types/node": "18.11.17", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", - "next": "13.1.6", + "next": "13.2.1", "react": "18.2.0", "react-dom": "18.2.0", "typescript": "4.9.4" diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock index 6a4bfb083b18..fba43fcf6a6e 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock @@ -2,11 +2,31 @@ # yarn lockfile v1 -"@jridgewell/sourcemap-codec@^1.4.13": +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13": version "1.4.14" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@next/env@13.1.6": version "13.1.6" resolved "https://registry.yarnpkg.com/@next/env/-/env-13.1.6.tgz#c4925609f16142ded1a5cb833359ab17359b7a93" @@ -111,9 +131,6 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@sentry-internal/event-proxy-server@file:../../../event-proxy-server": - version "7.38.0" - "@sentry/browser@7.38.0": version "7.38.0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.38.0.tgz#cdb39da23f9ee2ce47395b2c12542acb4969efa7" @@ -245,6 +262,26 @@ dependencies: tslib "^2.4.0" +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + "@types/estree@*", "@types/estree@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" @@ -286,6 +323,16 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -300,6 +347,11 @@ ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -352,6 +404,11 @@ cookie@^0.4.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + csstype@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9" @@ -364,6 +421,11 @@ debug@4: dependencies: ms "2.1.2" +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + estree-walker@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" @@ -478,6 +540,11 @@ magic-string@^0.27.0: dependencies: "@jridgewell/sourcemap-codec" "^1.4.13" +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + minimatch@^5.0.1: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" @@ -638,6 +705,25 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-node@10.9.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -653,6 +739,11 @@ typescript@4.9.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -682,3 +773,8 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== diff --git a/packages/nextjs/src/common/types.ts b/packages/nextjs/src/common/types.ts index 77af76fb414f..d21f3fa92880 100644 --- a/packages/nextjs/src/common/types.ts +++ b/packages/nextjs/src/common/types.ts @@ -1,8 +1,4 @@ export type ServerComponentContext = { componentRoute: string; componentType: string; - // Ideally we shouldn't have to pass these headers in and we should be able to call headers() inside of the wrapper - // but it doesn't seem to work for third party modules at this point in time. - sentryTraceHeader?: string; - baggageHeader?: string; }; diff --git a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts index 63250b669f95..74e8e1a5b1c3 100644 --- a/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts +++ b/packages/nextjs/src/config/templates/serverComponentWrapperTemplate.ts @@ -11,9 +11,6 @@ import * as wrapee from '__SENTRY_WRAPPING_TARGET_FILE__'; // eslint-disable-next-line import/no-extraneous-dependencies import * as Sentry from '@sentry/nextjs'; -// @ts-ignore TODO -// eslint-disable-next-line import/no-unresolved -import { headers } from 'next/headers'; type ServerComponentModule = { default: unknown; @@ -25,19 +22,9 @@ const serverComponent = serverComponentModule.default; let wrappedServerComponent; if (typeof serverComponent === 'function') { - wrappedServerComponent = new Proxy(serverComponent, { - apply: (originalServerComponent, thisArg, args) => { - const headersList = headers(); - - return Sentry.wrapServerComponentWithSentry(originalServerComponent, { - componentRoute: '__ROUTE__', - componentType: '__COMPONENT_TYPE__', - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - sentryTraceHeader: headersList.get('sentry-trace'), - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - baggageHeader: headersList.get('baggage'), - }).apply(thisArg, args); - }, + wrappedServerComponent = Sentry.wrapServerComponentWithSentry(serverComponent, { + componentRoute: '__ROUTE__', + componentType: '__COMPONENT_TYPE__', }); } else { wrappedServerComponent = serverComponent; diff --git a/packages/nextjs/src/server/wrapServerComponentWithSentry.ts b/packages/nextjs/src/server/wrapServerComponentWithSentry.ts index a4ea8c9c2699..05c17c6bede3 100644 --- a/packages/nextjs/src/server/wrapServerComponentWithSentry.ts +++ b/packages/nextjs/src/server/wrapServerComponentWithSentry.ts @@ -1,5 +1,4 @@ import { captureException, getCurrentHub, startTransaction } from '@sentry/core'; -import { baggageHeaderToDynamicSamplingContext, extractTraceparentData } from '@sentry/utils'; import * as domain from 'domain'; import type { ServerComponentContext } from '../common/types'; @@ -11,7 +10,7 @@ export function wrapServerComponentWithSentry any> appDirComponent: F, context: ServerComponentContext, ): F { - const { componentRoute, componentType, sentryTraceHeader, baggageHeader } = context; + const { componentRoute, componentType } = context; // Even though users may define server components as async functions, for the client bundles // Next.js will turn them into synchronous functions and it will transform any `await`s into instances of the `use` @@ -21,19 +20,12 @@ export function wrapServerComponentWithSentry any> return domain.create().bind(() => { let maybePromiseResult; - const traceparentData = - typeof sentryTraceHeader === 'string' ? extractTraceparentData(sentryTraceHeader) : undefined; - - const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggageHeader); - const transaction = startTransaction({ op: 'function.nextjs', name: `${componentType} Server Component (${componentRoute})`, - ...traceparentData, status: 'ok', metadata: { source: 'component', - dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, }, }); From aadeb29d3b00672c86718b3550675759f9063fdf Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 14:38:22 +0100 Subject: [PATCH 24/32] Update package.json Co-authored-by: Abhijeet Prasad --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 48ee8c0f781b..bd6bd97c3970 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "packages/ember", "packages/eslint-config-sdk", "packages/eslint-plugin-sdk", - "packages/event-proxy-server", "packages/gatsby", "packages/hub", "packages/integration-tests", From 6f4aa7bb1f93044ebd7c51ab28dcc583d3498092 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 13:41:01 +0000 Subject: [PATCH 25/32] debug --- .../test-applications/nextjs-13-app-dir/sentry.server.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts index af39dd76f384..d3e6a7c5a136 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts @@ -4,4 +4,5 @@ Sentry.init({ dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, tunnel: 'http://localhost:27496/', // proxy server tracesSampleRate: 1.0, + debug: true, }); From 2493a52fc45ecae65288f9358c43d6ad6a5e3560 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 14:34:59 +0000 Subject: [PATCH 26/32] pls finally work --- .../nextjs-13-app-dir/next-env.d.ts | 1 + .../nextjs-13-app-dir/sentry.server.config.ts | 1 - .../nextjs-13-app-dir/start-event-proxy.ts | 4 +- .../nextjs-13-app-dir/yarn.lock | 275 +++++++++--------- packages/nextjs/src/config/webpack.ts | 8 +- 5 files changed, 151 insertions(+), 138 deletions(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts index 4f11a03dc6cc..7aa8e8ef74e1 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts index d3e6a7c5a136..af39dd76f384 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/sentry.server.config.ts @@ -4,5 +4,4 @@ Sentry.init({ dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, tunnel: 'http://localhost:27496/', // proxy server tracesSampleRate: 1.0, - debug: true, }); diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts index 045fcfce6040..9c959e1e180e 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/start-event-proxy.ts @@ -1,8 +1,6 @@ -const { startEventProxyServer } = require('../../test-utils/event-proxy-server'); +import { startEventProxyServer, waitForTransaction } from '../../test-utils/event-proxy-server'; startEventProxyServer({ port: 27496, proxyServerName: 'nextjs-13-app-dir', }); - -export {}; diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock index fba43fcf6a6e..d8f5dfd63942 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock @@ -27,88 +27,90 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@next/env@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/env/-/env-13.1.6.tgz#c4925609f16142ded1a5cb833359ab17359b7a93" - integrity sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg== +"@next/env@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/env/-/env-13.2.1.tgz#082d42cfc0c794e9185d7b4133d71440ba2e795d" + integrity sha512-Hq+6QZ6kgmloCg8Kgrix+4F0HtvLqVK3FZAnlAoS0eonaDemHe1Km4kwjSWRE3JNpJNcKxFHF+jsZrYo0SxWoQ== "@next/font@13.0.7": version "13.0.7" resolved "https://registry.yarnpkg.com/@next/font/-/font-13.0.7.tgz#e0046376edb0ce592d9cfddea8f4ab321eb1515a" integrity sha512-39SzuoMI6jbrIzPs3KtXdKX03OrVp6Y7kRHcoVmOg69spiBzruPJ5x5DQSfN+OXqznbvVBNZBXnmdnSqs3qXiA== -"@next/swc-android-arm-eabi@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.6.tgz#d766dfc10e27814d947b20f052067c239913dbcc" - integrity sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ== - -"@next/swc-android-arm64@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.1.6.tgz#f37a98d5f18927d8c9970d750d516ac779465176" - integrity sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw== - -"@next/swc-darwin-arm64@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.6.tgz#ec1b90fd9bf809d8b81004c5182e254dced4ad96" - integrity sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw== - -"@next/swc-darwin-x64@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.6.tgz#e869ac75d16995eee733a7d1550322d9051c1eb4" - integrity sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA== - -"@next/swc-freebsd-x64@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.6.tgz#84a7b2e423a2904afc2edca21c2f1ba6b53fa4c1" - integrity sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw== - -"@next/swc-linux-arm-gnueabihf@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.6.tgz#980eed1f655ff8a72187d8a6ef9e73ac39d20d23" - integrity sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw== - -"@next/swc-linux-arm64-gnu@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.6.tgz#87a71db21cded3f7c63d1d19079845c59813c53d" - integrity sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ== - -"@next/swc-linux-arm64-musl@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.6.tgz#c5aac8619331b9fd030603bbe2b36052011e11de" - integrity sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ== - -"@next/swc-linux-x64-gnu@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.6.tgz#9513d36d540bbfea575576746736054c31aacdea" - integrity sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q== - -"@next/swc-linux-x64-musl@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.6.tgz#d61fc6884899f5957251f4ce3f522e34a2c479b7" - integrity sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ== - -"@next/swc-win32-arm64-msvc@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.6.tgz#fac2077a8ae9768e31444c9ae90807e64117cda7" - integrity sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ== - -"@next/swc-win32-ia32-msvc@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.6.tgz#498bc11c91b4c482a625bf4b978f98ae91111e46" - integrity sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w== - -"@next/swc-win32-x64-msvc@13.1.6": - version "13.1.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.6.tgz#17ed919c723426b7d0ce1cd73d40ce3dcd342089" - integrity sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA== +"@next/swc-android-arm-eabi@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.1.tgz#67f2580fbbe05ee006220688972c5e3a555fc741" + integrity sha512-Yua7mUpEd1wzIT6Jjl3dpRizIfGp9NR4F2xeRuQv+ae+SDI1Em2WyM9m46UL+oeW5GpMiEHoaBagr47RScZFmQ== + +"@next/swc-android-arm64@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.2.1.tgz#460a02b69eb23bb5f402266bcea9cadae59415c1" + integrity sha512-Bifcr2f6VwInOdq1uH/9lp8fH7Nf7XGkIx4XceVd32LPJqG2c6FZU8ZRBvTdhxzXVpt5TPtuXhOP4Ij9UPqsVw== + +"@next/swc-darwin-arm64@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.1.tgz#8b8530ff417802027471aee2419f78a58a863ccb" + integrity sha512-gvqm+fGMYxAkwBapH0Vvng5yrb6HTkIvZfY4oEdwwYrwuLdkjqnJygCMgpNqIFmAHSXgtlWxfYv1VC8sjN81Kw== + +"@next/swc-darwin-x64@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.1.tgz#80aebb3329a1e4568a28de1ee177780b3d50330c" + integrity sha512-HGqVqmaZWj6zomqOZUVbO5NhlABL0iIaxTmd0O5B0MoMa5zpDGoaHSG+fxgcWMXcGcxmUNchv1NfNOYiTKoHOg== + +"@next/swc-freebsd-x64@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.1.tgz#250ea2ab7e1734f22d11c677c463fab9ac33a516" + integrity sha512-N/a4JarAq+E+g+9K2ywJUmDIgU2xs2nA+BBldH0oq4zYJMRiUhL0iaN9G4e72VmGOJ61L/3W6VN8RIUOwTLoqQ== + +"@next/swc-linux-arm-gnueabihf@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.1.tgz#fe6bb29ed348a5f8ecae3740df22a8d8130c474a" + integrity sha512-WaFoerF/eRbhbE57TaIGJXbQAERADZ/RZ45u6qox9beb5xnWsyYgzX+WuN7Tkhyvga0/aMuVYFzS9CEay7D+bw== + +"@next/swc-linux-arm64-gnu@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.1.tgz#4781b927fc5e421f3cea2b29e5d38e5e4837b198" + integrity sha512-R+Jhc1/RJTnncE9fkePboHDNOCm1WJ8daanWbjKhfPySMyeniKYRwGn5SLYW3S8YlRS0QVdZaaszDSZWgUcsmA== + +"@next/swc-linux-arm64-musl@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.1.tgz#c2ba0a121b0255ba62450916bc70e6d0e26cbc98" + integrity sha512-oI1UfZPidGAVddlL2eOTmfsuKV9EaT1aktIzVIxIAgxzQSdwsV371gU3G55ggkurzfdlgF3GThFePDWF0d8dmw== + +"@next/swc-linux-x64-gnu@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.1.tgz#573c220f8b087e5d131d1fba58d3e1a670b220ad" + integrity sha512-PCygPwrQmS+7WUuAWWioWMZCzZm4PG91lfRxToLDg7yIm/3YfAw5N2EK2TaM9pzlWdvHQAqRMX/oLvv027xUiA== + +"@next/swc-linux-x64-musl@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.1.tgz#950b5bb920b322ca7b447efbd12a9c7a10c3a642" + integrity sha512-sUAKxo7CFZYGHNxheGh9nIBElLYBM6md/liEGfOTwh/xna4/GTTcmkGWkF7PdnvaYNgcPIQgHIMYiAa6yBKAVw== + +"@next/swc-win32-arm64-msvc@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.1.tgz#dbff3c4f5a3812a7059dac05804148a0f98682db" + integrity sha512-qDmyEjDBpl/vBXxuOOKKWmPQOcARcZIMach1s7kjzaien0SySut/PHRlj56sosa81Wt4hTGhfhZ1R7g1n7+B8w== + +"@next/swc-win32-ia32-msvc@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.1.tgz#7d2c17be7b8d9963984f5c15cc2588127101f620" + integrity sha512-2joqFQ81ZYPg6DcikIzQn3DgjKglNhPAozx6dL5sCNkr1CPMD0YIkJgT3CnYyMHQ04Qi3Npv0XX3MD6LJO8OCA== + +"@next/swc-win32-x64-msvc@13.2.1": + version "13.2.1" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.1.tgz#09713c6a925461f414e89422851326d1625bd4d2" + integrity sha512-r3+0fSaIZT6N237iMzwUhfNwjhAFvXjqB+4iuW+wcpxW+LHm1g/IoxN8eSRcb8jPItC86JxjAxpke0QL97qd6g== "@playwright/test@^1.27.1": - version "1.29.1" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.29.1.tgz#f2ed4dc143b9c7825a7ad2703b2f1ac4354e1145" - integrity sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w== + version "1.31.1" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.31.1.tgz#39d6873dc46af135f12451d79707db7d1357455d" + integrity sha512-IsytVZ+0QLDh1Hj83XatGp/GsI1CDJWbyDaBGbainsh0p2zC7F4toUocqowmjS6sQff2NGT3D9WbDj/3K2CJiA== dependencies: "@types/node" "*" - playwright-core "1.29.1" + playwright-core "1.31.1" + optionalDependencies: + fsevents "2.3.2" "@rollup/plugin-commonjs@24.0.0": version "24.0.0" @@ -133,7 +135,7 @@ "@sentry/browser@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.38.0.tgz#cdb39da23f9ee2ce47395b2c12542acb4969efa7" + resolved "http://localhost:4873/@sentry%2fbrowser/-/browser-7.38.0.tgz#cdb39da23f9ee2ce47395b2c12542acb4969efa7" integrity sha512-rPJr+2jRYL29PeMYA2JgzYKTZQx6bc3T9evbAdIh0n+popSjpVyOpOMV/3l6A7KZeeix3dpp6eUZUxTJukqriQ== dependencies: "@sentry/core" "7.38.0" @@ -144,7 +146,7 @@ "@sentry/cli@^1.74.6": version "1.75.0" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.75.0.tgz#4a5e71b5619cd4e9e6238cc77857c66f6b38d86a" + resolved "http://localhost:4873/@sentry%2fcli/-/cli-1.75.0.tgz#4a5e71b5619cd4e9e6238cc77857c66f6b38d86a" integrity sha512-vT8NurHy00GcN8dNqur4CMIYvFH3PaKdkX3qllVvi4syybKqjwoz+aWRCvprbYv0knweneFkLt1SmBWqazUMfA== dependencies: https-proxy-agent "^5.0.0" @@ -156,8 +158,8 @@ "@sentry/core@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.38.0.tgz#52f1f1f2ba5e88ab7b33c3abb0ea9730c78d953d" - integrity sha512-+hXh/SO3Ie6WC2b+wi01xLhyVREdkRXS5QBmCiv3z2ks2HvYXp7PoKSXJvNKiwCP+pBD+enOnM1YEzM2yEy5yw== + resolved "http://localhost:4873/@sentry%2fcore/-/core-7.38.0.tgz#0b044dc2b650a7678209b0348cfb370c51744f20" + integrity sha512-1qYFdEZcG6OfKfftDIR7Jt6Gcvd0Y9og8aXtMC6gCzHtc+jYud9D5InIEXylAY6JaiP0fmxvN8HTPmR79q5oVQ== dependencies: "@sentry/types" "7.38.0" "@sentry/utils" "7.38.0" @@ -165,8 +167,8 @@ "@sentry/integrations@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.38.0.tgz#6caf04f9aff5780a2b7b146a620141ed90369572" - integrity sha512-n1OK+X5xaMo7j0lZxpEvEqjQSH4gIcVxeE2KXMI/2/sM7dJyQvfgjogh6ZPOpCAZnT9sUmesH5FevjXXT2493A== + resolved "http://localhost:4873/@sentry%2fintegrations/-/integrations-7.38.0.tgz#5da1a257e8567e3ecfe270f2aba233ecb4984f89" + integrity sha512-eP2zdvODqAA5rmQuaBwTBucgpFozVoFc1cFtFBAcqknWh/X+4TuGfPU9+k4lbnUVh7siWZYR/uH1QEOsY4eUww== dependencies: "@sentry/types" "7.38.0" "@sentry/utils" "7.38.0" @@ -175,8 +177,8 @@ "@sentry/nextjs@*": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-7.38.0.tgz#f48d7d9d24b43bbeffd6401cae1eeb507f2c5f0a" - integrity sha512-NWI03kftJWyssUsMOFZ/MMtJHYcRdvQR8nh6nky5lT6c7y8uBzj9+mAad7KPxX9M+OXyfA+ZM54fPK+4DCUiDw== + resolved "http://localhost:4873/@sentry%2fnextjs/-/nextjs-7.38.0.tgz#9f5832e978a4ab993fe98342f06e1ec307527e39" + integrity sha512-MIeZhSRE+PupOWwYNC4d6CnujKcpbU+gfBBo47uwXBjcRImPL1dAQOGaxoW6noAvNilkT3d8pssJ+KwxXG/cJQ== dependencies: "@rollup/plugin-commonjs" "24.0.0" "@sentry/core" "7.38.0" @@ -193,8 +195,8 @@ "@sentry/node@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.38.0.tgz#957524fa4764dc19ef970ccdffb802d62e0db3ae" - integrity sha512-jNIN6NZvgzn/oms8RQzffjX8Z0LQDTN6N28nnhzqGCvnfmS1QtTt0FlU+pTuFXZNNSjfGy4XMXMYvLlbvhm2bg== + resolved "http://localhost:4873/@sentry%2fnode/-/node-7.38.0.tgz#812eaaeb78e3502a41edf2d109c027aa51ab024a" + integrity sha512-DV6gRIRSkjkaUv0UR4t4/u6+0GLV/pvehqLmELWlMfQqv4SQC9DKDvEmjLa5pSpReTR8cnf2SIofg0fyK7dq0A== dependencies: "@sentry/core" "7.38.0" "@sentry/types" "7.38.0" @@ -206,8 +208,8 @@ "@sentry/react@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.38.0.tgz#7294bc8d85000994267fabf8d6f817369ca09a7a" - integrity sha512-IZpQ0aptV3UPjvDj+xorrgPgnW2xIL6Zcy7B6wAgwTC81OUITE7YaShglGD0sJ8M1ReFuH9duwTysr/uv8AytQ== + resolved "http://localhost:4873/@sentry%2freact/-/react-7.38.0.tgz#40e680686aa1b695f9e544b046bab04345c83ce2" + integrity sha512-4xV4TdwEmE2pgd7yjhjqLfumxdTM6KaRuWVfoz/ikQqOaXIhelRxxy+NbGmy1n/F4cZN8fkPWMfaY6ndG9uU0g== dependencies: "@sentry/browser" "7.38.0" "@sentry/types" "7.38.0" @@ -217,8 +219,8 @@ "@sentry/replay@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.38.0.tgz#48d240b67de6b4ab41c951d19abeceb0d3f7706d" - integrity sha512-Ai78/OIYedny605x8uS0n/a5uj7qnuevogGD6agLat9lGc8DFvC07m2iS+EFyGOwtQzyDlRYJvYkHL8peR3crQ== + resolved "http://localhost:4873/@sentry%2freplay/-/replay-7.38.0.tgz#ec62760e3eb84a817288ca4601a96a0676737bce" + integrity sha512-6NDqCvkL9DHrShPVxdRkU7ST6K2g9S1Ie0nnY5SjpGeuic01nDJR61G/xi8eMm+4pzOUCXtptwBj8A6fUvEN6Q== dependencies: "@sentry/core" "7.38.0" "@sentry/types" "7.38.0" @@ -226,8 +228,8 @@ "@sentry/tracing@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.38.0.tgz#ba28f15f526e87df167de206fd4fb0a39277dac6" - integrity sha512-ejXJp8oOT64MVtBzqdECUUaNzKbpu25St8Klub1i4Sm7xO+ZjDQDI4TIHvWojZvtkwQ3F4jcsCclc8KuyJunyQ== + resolved "http://localhost:4873/@sentry%2ftracing/-/tracing-7.38.0.tgz#f32d2b4e931e8e35192e95872b03578cc08de58b" + integrity sha512-minKSDsn5uZelwPW4Ad6Diga8v/Y+3lPCDy1HwehCUt5Q0d0/Q3jEaQcyraXgGQTV7MINX+JMmsp80Usvr8pxg== dependencies: "@sentry/core" "7.38.0" "@sentry/types" "7.38.0" @@ -236,20 +238,20 @@ "@sentry/types@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.38.0.tgz#6e2611544446271ed237440b12de782805aefe25" - integrity sha512-NKOALR6pNUMzUrsk2m+dkPrO8uGNvNh1LD0BCPswKNjC2qHo1h1mDGCgBmF9+EWyii8ZoACTIsxvsda+MBf97Q== + resolved "http://localhost:4873/@sentry%2ftypes/-/types-7.38.0.tgz#7f9618c687e163205ab87a550d9b3e907383800b" + integrity sha512-TNbIEMjDaQ3NLOW1pmUljATXPhH5VHRu4o8M3PLqFenH1Ko7/J5bYmB7FcruhJS9qroszE7xpqIluVuRU6bAyg== "@sentry/utils@7.38.0": version "7.38.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.38.0.tgz#d10716e730108301f58766970493e9c5da0ba502" - integrity sha512-MgbI3YmYuyyhUtvcXkgGBqjOW+nuLLNGUdWCK+C4kObf8VbLt3dSE/7SEMT6TSHLYQmxs2BxFgx5Agn97m68kQ== + resolved "http://localhost:4873/@sentry%2futils/-/utils-7.38.0.tgz#166902085bb9342953b4821bacc048e30667cc61" + integrity sha512-a84H3WgkizvDAr2u3TCZ0qXRetN/xjaeGYicRHPKp494zbQSCL4gHpZO5U+9Wol5Me90PMW4uk5RraXD/dT1Fg== dependencies: "@sentry/types" "7.38.0" tslib "^1.9.3" "@sentry/webpack-plugin@1.20.0": version "1.20.0" - resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.20.0.tgz#e7add76122708fb6b4ee7951294b521019720e58" + resolved "http://localhost:4873/@sentry%2fwebpack-plugin/-/webpack-plugin-1.20.0.tgz#e7add76122708fb6b4ee7951294b521019720e58" integrity sha512-Ssj1mJVFsfU6vMCOM2d+h+KQR7QHSfeIP16t4l20Uq/neqWXZUQ2yvQfe4S3BjdbJXz/X4Rw8Hfy1Sd0ocunYw== dependencies: "@sentry/cli" "^1.74.6" @@ -288,9 +290,9 @@ integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== "@types/node@*": - version "18.11.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" - integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== + version "18.14.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.1.tgz#90dad8476f1e42797c49d6f8b69aaf9f876fc69f" + integrity sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ== "@types/node@18.11.17": version "18.11.17" @@ -309,7 +311,16 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@18.0.26": +"@types/react@*": + version "18.0.28" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.28.tgz#accaeb8b86f4908057ad629a26635fe641480065" + integrity sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/react@18.0.26": version "18.0.26" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917" integrity sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug== @@ -365,9 +376,9 @@ brace-expansion@^2.0.1: balanced-match "^1.0.0" caniuse-lite@^1.0.30001406: - version "1.0.30001442" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001442.tgz#40337f1cf3be7c637b061e2f78582dc1daec0614" - integrity sha512-239m03Pqy0hwxYPYR5JwOIxRJfLTWtle9FV8zosfV5pHg+/51uD4nxcUlM8+mWWGfwKtt8lJNHnD3cWw9VZ6ow== + version "1.0.30001457" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz#6af34bb5d720074e2099432aa522c21555a18301" + integrity sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA== chalk@3.0.0: version "3.0.0" @@ -436,7 +447,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: +fsevents@2.3.2, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -553,9 +564,9 @@ minimatch@^5.0.1: brace-expansion "^2.0.1" minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp@^0.5.5: version "0.5.6" @@ -574,35 +585,35 @@ nanoid@^3.3.4: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== -next@13.1.6: - version "13.1.6" - resolved "https://registry.yarnpkg.com/next/-/next-13.1.6.tgz#054babe20b601f21f682f197063c9b0b32f1a27c" - integrity sha512-hHlbhKPj9pW+Cymvfzc15lvhaOZ54l+8sXDXJWm3OBNBzgrVj6hwGPmqqsXg40xO1Leq+kXpllzRPuncpC0Phw== +next@13.2.1: + version "13.2.1" + resolved "https://registry.yarnpkg.com/next/-/next-13.2.1.tgz#34d823f518632b36379863228ed9f861c335b9c0" + integrity sha512-qhgJlDtG0xidNViJUPeQHLGJJoT4zDj/El7fP3D3OzpxJDUfxsm16cK4WTMyvSX1ciIfAq05u+0HqFAa+VJ+Hg== dependencies: - "@next/env" "13.1.6" + "@next/env" "13.2.1" "@swc/helpers" "0.4.14" caniuse-lite "^1.0.30001406" postcss "8.4.14" styled-jsx "5.1.1" optionalDependencies: - "@next/swc-android-arm-eabi" "13.1.6" - "@next/swc-android-arm64" "13.1.6" - "@next/swc-darwin-arm64" "13.1.6" - "@next/swc-darwin-x64" "13.1.6" - "@next/swc-freebsd-x64" "13.1.6" - "@next/swc-linux-arm-gnueabihf" "13.1.6" - "@next/swc-linux-arm64-gnu" "13.1.6" - "@next/swc-linux-arm64-musl" "13.1.6" - "@next/swc-linux-x64-gnu" "13.1.6" - "@next/swc-linux-x64-musl" "13.1.6" - "@next/swc-win32-arm64-msvc" "13.1.6" - "@next/swc-win32-ia32-msvc" "13.1.6" - "@next/swc-win32-x64-msvc" "13.1.6" + "@next/swc-android-arm-eabi" "13.2.1" + "@next/swc-android-arm64" "13.2.1" + "@next/swc-darwin-arm64" "13.2.1" + "@next/swc-darwin-x64" "13.2.1" + "@next/swc-freebsd-x64" "13.2.1" + "@next/swc-linux-arm-gnueabihf" "13.2.1" + "@next/swc-linux-arm64-gnu" "13.2.1" + "@next/swc-linux-arm64-musl" "13.2.1" + "@next/swc-linux-x64-gnu" "13.2.1" + "@next/swc-linux-x64-musl" "13.2.1" + "@next/swc-win32-arm64-msvc" "13.2.1" + "@next/swc-win32-ia32-msvc" "13.2.1" + "@next/swc-win32-x64-msvc" "13.2.1" node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + version "2.6.9" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" + integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== dependencies: whatwg-url "^5.0.0" @@ -623,10 +634,10 @@ picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -playwright-core@1.29.1: - version "1.29.1" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.29.1.tgz#9ec15d61c4bd2f386ddf6ce010db53a030345a47" - integrity sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg== +playwright-core@1.31.1: + version "1.31.1" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.31.1.tgz#4deeebbb8fb73b512593fe24bea206d8fd85ff7f" + integrity sha512-JTyX4kV3/LXsvpHkLzL2I36aCdml4zeE35x+G5aPc4bkLsiRiQshU5lWeVpHFAuC8xAcbI6FDcw/8z3q2xtJSQ== postcss@8.4.14: version "8.4.14" @@ -730,9 +741,9 @@ tslib@^1.9.3: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" - integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== typescript@4.9.4: version "4.9.4" diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index e8b37d8cb455..4fd52851fc39 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -87,12 +87,16 @@ export function constructWebpackConfigFunction( }); let pagesDirPath: string; - let appDirPath: string; if (fs.existsSync(path.join(projectDir, 'pages')) && fs.lstatSync(path.join(projectDir, 'pages')).isDirectory()) { pagesDirPath = path.join(projectDir, 'pages'); - appDirPath = path.join(projectDir, 'app'); } else { pagesDirPath = path.join(projectDir, 'src', 'pages'); + } + + let appDirPath: string; + if (fs.existsSync(path.join(projectDir, 'app')) && fs.lstatSync(path.join(projectDir, 'app')).isDirectory()) { + appDirPath = path.join(projectDir, 'app'); + } else { appDirPath = path.join(projectDir, 'src', 'app'); } From b5feedc785e745317f41bacf7c312b48ef6d5bf0 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 14:40:48 +0000 Subject: [PATCH 27/32] Friggin finally --- .../nextjs-13-app-dir/tests/transactions.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts index 16451f6c62b4..25b1ce189ac4 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts @@ -50,7 +50,6 @@ test('Sends a pageload transaction', async ({ page }) => { test('Sends a transaction for a server component', async ({ page }) => { const serverComponentTransactionPromise = waitForTransaction('nextjs-13-app-dir', transactionEvent => { - console.log('AAA', JSON.stringify(transactionEvent)); return ( transactionEvent?.contexts?.trace?.op === 'function.nextjs' && transactionEvent?.transaction === 'Page Server Component (/user/[id])' From ae7ca3db670f4d5335d72a8e81ee0e681c6bac5f Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 14:55:49 +0000 Subject: [PATCH 28/32] spare me --- .../nextjs-13-app-dir/yarn.lock | 426 +----------------- 1 file changed, 2 insertions(+), 424 deletions(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock index d8f5dfd63942..14727ded24f5 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/yarn.lock @@ -14,7 +14,7 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13": +"@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== @@ -112,151 +112,6 @@ optionalDependencies: fsevents "2.3.2" -"@rollup/plugin-commonjs@24.0.0": - version "24.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.0.tgz#fb7cf4a6029f07ec42b25daa535c75b05a43f75c" - integrity sha512-0w0wyykzdyRRPHOb0cQt14mIBLujfAv6GgP6g8nvg/iBxEm112t3YPPq+Buqe2+imvElTka+bjNlJ/gB56TD8g== - dependencies: - "@rollup/pluginutils" "^5.0.1" - commondir "^1.0.1" - estree-walker "^2.0.2" - glob "^8.0.3" - is-reference "1.2.1" - magic-string "^0.27.0" - -"@rollup/pluginutils@^5.0.1": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" - integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== - dependencies: - "@types/estree" "^1.0.0" - estree-walker "^2.0.2" - picomatch "^2.3.1" - -"@sentry/browser@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2fbrowser/-/browser-7.38.0.tgz#cdb39da23f9ee2ce47395b2c12542acb4969efa7" - integrity sha512-rPJr+2jRYL29PeMYA2JgzYKTZQx6bc3T9evbAdIh0n+popSjpVyOpOMV/3l6A7KZeeix3dpp6eUZUxTJukqriQ== - dependencies: - "@sentry/core" "7.38.0" - "@sentry/replay" "7.38.0" - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - tslib "^1.9.3" - -"@sentry/cli@^1.74.6": - version "1.75.0" - resolved "http://localhost:4873/@sentry%2fcli/-/cli-1.75.0.tgz#4a5e71b5619cd4e9e6238cc77857c66f6b38d86a" - integrity sha512-vT8NurHy00GcN8dNqur4CMIYvFH3PaKdkX3qllVvi4syybKqjwoz+aWRCvprbYv0knweneFkLt1SmBWqazUMfA== - dependencies: - https-proxy-agent "^5.0.0" - mkdirp "^0.5.5" - node-fetch "^2.6.7" - progress "^2.0.3" - proxy-from-env "^1.1.0" - which "^2.0.2" - -"@sentry/core@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2fcore/-/core-7.38.0.tgz#0b044dc2b650a7678209b0348cfb370c51744f20" - integrity sha512-1qYFdEZcG6OfKfftDIR7Jt6Gcvd0Y9og8aXtMC6gCzHtc+jYud9D5InIEXylAY6JaiP0fmxvN8HTPmR79q5oVQ== - dependencies: - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - tslib "^1.9.3" - -"@sentry/integrations@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2fintegrations/-/integrations-7.38.0.tgz#5da1a257e8567e3ecfe270f2aba233ecb4984f89" - integrity sha512-eP2zdvODqAA5rmQuaBwTBucgpFozVoFc1cFtFBAcqknWh/X+4TuGfPU9+k4lbnUVh7siWZYR/uH1QEOsY4eUww== - dependencies: - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - localforage "^1.8.1" - tslib "^1.9.3" - -"@sentry/nextjs@*": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2fnextjs/-/nextjs-7.38.0.tgz#9f5832e978a4ab993fe98342f06e1ec307527e39" - integrity sha512-MIeZhSRE+PupOWwYNC4d6CnujKcpbU+gfBBo47uwXBjcRImPL1dAQOGaxoW6noAvNilkT3d8pssJ+KwxXG/cJQ== - dependencies: - "@rollup/plugin-commonjs" "24.0.0" - "@sentry/core" "7.38.0" - "@sentry/integrations" "7.38.0" - "@sentry/node" "7.38.0" - "@sentry/react" "7.38.0" - "@sentry/tracing" "7.38.0" - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - "@sentry/webpack-plugin" "1.20.0" - chalk "3.0.0" - rollup "2.78.0" - tslib "^1.9.3" - -"@sentry/node@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2fnode/-/node-7.38.0.tgz#812eaaeb78e3502a41edf2d109c027aa51ab024a" - integrity sha512-DV6gRIRSkjkaUv0UR4t4/u6+0GLV/pvehqLmELWlMfQqv4SQC9DKDvEmjLa5pSpReTR8cnf2SIofg0fyK7dq0A== - dependencies: - "@sentry/core" "7.38.0" - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - cookie "^0.4.1" - https-proxy-agent "^5.0.0" - lru_map "^0.3.3" - tslib "^1.9.3" - -"@sentry/react@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2freact/-/react-7.38.0.tgz#40e680686aa1b695f9e544b046bab04345c83ce2" - integrity sha512-4xV4TdwEmE2pgd7yjhjqLfumxdTM6KaRuWVfoz/ikQqOaXIhelRxxy+NbGmy1n/F4cZN8fkPWMfaY6ndG9uU0g== - dependencies: - "@sentry/browser" "7.38.0" - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - hoist-non-react-statics "^3.3.2" - tslib "^1.9.3" - -"@sentry/replay@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2freplay/-/replay-7.38.0.tgz#ec62760e3eb84a817288ca4601a96a0676737bce" - integrity sha512-6NDqCvkL9DHrShPVxdRkU7ST6K2g9S1Ie0nnY5SjpGeuic01nDJR61G/xi8eMm+4pzOUCXtptwBj8A6fUvEN6Q== - dependencies: - "@sentry/core" "7.38.0" - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - -"@sentry/tracing@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2ftracing/-/tracing-7.38.0.tgz#f32d2b4e931e8e35192e95872b03578cc08de58b" - integrity sha512-minKSDsn5uZelwPW4Ad6Diga8v/Y+3lPCDy1HwehCUt5Q0d0/Q3jEaQcyraXgGQTV7MINX+JMmsp80Usvr8pxg== - dependencies: - "@sentry/core" "7.38.0" - "@sentry/types" "7.38.0" - "@sentry/utils" "7.38.0" - tslib "^1.9.3" - -"@sentry/types@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2ftypes/-/types-7.38.0.tgz#7f9618c687e163205ab87a550d9b3e907383800b" - integrity sha512-TNbIEMjDaQ3NLOW1pmUljATXPhH5VHRu4o8M3PLqFenH1Ko7/J5bYmB7FcruhJS9qroszE7xpqIluVuRU6bAyg== - -"@sentry/utils@7.38.0": - version "7.38.0" - resolved "http://localhost:4873/@sentry%2futils/-/utils-7.38.0.tgz#166902085bb9342953b4821bacc048e30667cc61" - integrity sha512-a84H3WgkizvDAr2u3TCZ0qXRetN/xjaeGYicRHPKp494zbQSCL4gHpZO5U+9Wol5Me90PMW4uk5RraXD/dT1Fg== - dependencies: - "@sentry/types" "7.38.0" - tslib "^1.9.3" - -"@sentry/webpack-plugin@1.20.0": - version "1.20.0" - resolved "http://localhost:4873/@sentry%2fwebpack-plugin/-/webpack-plugin-1.20.0.tgz#e7add76122708fb6b4ee7951294b521019720e58" - integrity sha512-Ssj1mJVFsfU6vMCOM2d+h+KQR7QHSfeIP16t4l20Uq/neqWXZUQ2yvQfe4S3BjdbJXz/X4Rw8Hfy1Sd0ocunYw== - dependencies: - "@sentry/cli" "^1.74.6" - webpack-sources "^2.0.0 || ^3.0.0" - "@swc/helpers@0.4.14": version "0.4.14" resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74" @@ -284,11 +139,6 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== -"@types/estree@*", "@types/estree@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - "@types/node@*": version "18.14.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.1.tgz#90dad8476f1e42797c49d6f8b69aaf9f876fc69f" @@ -344,77 +194,21 @@ acorn@^8.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - caniuse-lite@^1.0.30001406: version "1.0.30001457" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001457.tgz#6af34bb5d720074e2099432aa522c21555a18301" integrity sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA== -chalk@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - client-only@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -cookie@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -425,113 +219,21 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== -debug@4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -estree-walker@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@2.3.2, fsevents@~2.3.2: +fsevents@2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -hoist-non-react-statics@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" - integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== - dependencies: - react-is "^16.7.0" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -immediate@~3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" - integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-reference@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" - integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== - dependencies: - "@types/estree" "*" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - "js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -lie@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" - integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== - dependencies: - immediate "~3.0.5" - -localforage@^1.8.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" - integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== - dependencies: - lie "3.1.1" - loose-envify@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -539,47 +241,11 @@ loose-envify@^1.1.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lru_map@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" - integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== - -magic-string@^0.27.0: - version "0.27.0" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" - integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.4.13" - make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -mkdirp@^0.5.5: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - nanoid@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" @@ -610,30 +276,11 @@ next@13.2.1: "@next/swc-win32-ia32-msvc" "13.2.1" "@next/swc-win32-x64-msvc" "13.2.1" -node-fetch@^2.6.7: - version "2.6.9" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" - integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== - dependencies: - whatwg-url "^5.0.0" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - playwright-core@1.31.1: version "1.31.1" resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.31.1.tgz#4deeebbb8fb73b512593fe24bea206d8fd85ff7f" @@ -648,16 +295,6 @@ postcss@8.4.14: picocolors "^1.0.0" source-map-js "^1.0.2" -progress@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - react-dom@18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -666,11 +303,6 @@ react-dom@18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-is@^16.7.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - react@18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" @@ -678,13 +310,6 @@ react@18.2.0: dependencies: loose-envify "^1.1.0" -rollup@2.78.0: - version "2.78.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.78.0.tgz#00995deae70c0f712ea79ad904d5f6b033209d9e" - integrity sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg== - optionalDependencies: - fsevents "~2.3.2" - scheduler@^0.23.0: version "0.23.0" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" @@ -704,18 +329,6 @@ styled-jsx@5.1.1: dependencies: client-only "0.0.1" -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - ts-node@10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -735,11 +348,6 @@ ts-node@10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - tslib@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" @@ -755,36 +363,6 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -"webpack-sources@^2.0.0 || ^3.0.0": - version "3.2.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From 9090f797dcbf9986c216b6ee464cc7aa628badcc Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 15:24:19 +0000 Subject: [PATCH 29/32] Extract server port registration into helper function --- .../test-utils/event-proxy-server.ts | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/packages/e2e-tests/test-utils/event-proxy-server.ts b/packages/e2e-tests/test-utils/event-proxy-server.ts index 35966a7d3e1c..7b3251cf0a4c 100644 --- a/packages/e2e-tests/test-utils/event-proxy-server.ts +++ b/packages/e2e-tests/test-utils/event-proxy-server.ts @@ -6,6 +6,10 @@ import * as https from 'https'; import type { AddressInfo } from 'net'; import * as os from 'os'; import * as path from 'path'; +import * as util from 'util'; + +const readFile = util.promisify(fs.readFile); +const writeFile = util.promisify(fs.writeFile); interface EventProxyServerOptions { /** Port to start the event proxy server at. */ @@ -123,9 +127,7 @@ export async function startEventProxyServer(options: EventProxyServerOptions): P const eventCallbackServerStartupPromise = new Promise(resolve => { const listener = eventCallbackServer.listen(0, () => { const port = String((listener.address() as AddressInfo).port); - const tmpFileWithPort = path.join(os.tmpdir(), `event-proxy-server-${options.proxyServerName}`); - fs.writeFileSync(tmpFileWithPort, port, { encoding: 'utf8' }); - resolve(); + void registerCallbackServerPort(options.proxyServerName, port).then(resolve); }); }); @@ -134,12 +136,11 @@ export async function startEventProxyServer(options: EventProxyServerOptions): P return; } -export function waitForRequest( +export async function waitForRequest( proxyServerName: string, callback: (eventData: SentryRequestCallbackData) => boolean, ): Promise { - const tmpFileWithPort = path.join(os.tmpdir(), `event-proxy-server-${proxyServerName}`); - const eventCallbackServerPort = fs.readFileSync(tmpFileWithPort, 'utf8'); + const eventCallbackServerPort = await retrieveCallbackServerPort(proxyServerName); return new Promise((resolve, reject) => { const request = http.request(`http://localhost:${eventCallbackServerPort}/`, {}, response => { @@ -218,3 +219,15 @@ export function waitForTransaction( }).catch(reject); }); } + +const TEMP_FILE_PREFIX = 'event-proxy-server-'; + +async function registerCallbackServerPort(serverName: string, port: string): Promise { + const tmpFilePath = path.join(os.tmpdir(), `${TEMP_FILE_PREFIX}${serverName}`); + await writeFile(tmpFilePath, port, { encoding: 'utf8' }); +} + +async function retrieveCallbackServerPort(serverName: string): Promise { + const tmpFilePath = path.join(os.tmpdir(), `${TEMP_FILE_PREFIX}${serverName}`); + return await readFile(tmpFilePath, 'utf8'); +} From f2bc116438863fe202c457fcca260de52a87f7a3 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 15:28:14 +0000 Subject: [PATCH 30/32] remove redundant stuff --- packages/e2e-tests/test-utils/event-proxy-server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/e2e-tests/test-utils/event-proxy-server.ts b/packages/e2e-tests/test-utils/event-proxy-server.ts index 7b3251cf0a4c..f914f68f8d88 100644 --- a/packages/e2e-tests/test-utils/event-proxy-server.ts +++ b/packages/e2e-tests/test-utils/event-proxy-server.ts @@ -125,8 +125,8 @@ export async function startEventProxyServer(options: EventProxyServerOptions): P }); const eventCallbackServerStartupPromise = new Promise(resolve => { - const listener = eventCallbackServer.listen(0, () => { - const port = String((listener.address() as AddressInfo).port); + eventCallbackServer.listen(0, () => { + const port = String((eventCallbackServer.address() as AddressInfo).port); void registerCallbackServerPort(options.proxyServerName, port).then(resolve); }); }); From 3e328bce31a8a55819555b0164d40c80705391b9 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 21:47:06 +0000 Subject: [PATCH 31/32] Remove console.logs from tests --- .../nextjs-13-app-dir/tests/exceptions.test.ts | 2 -- .../nextjs-13-app-dir/tests/transactions.test.ts | 6 ------ 2 files changed, 8 deletions(-) diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts index f487310cea04..d1b88470fd37 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/exceptions.test.ts @@ -20,8 +20,6 @@ test('Sends a client-side exception to Sentry', async ({ page }) => { const errorEvent = await errorEventPromise; const exceptionEventId = errorEvent.event_id; - console.log(`Polling for error eventId: ${exceptionEventId}`); - await expect .poll( async () => { diff --git a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts index 25b1ce189ac4..c52ab35475bd 100644 --- a/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts +++ b/packages/e2e-tests/test-applications/nextjs-13-app-dir/tests/transactions.test.ts @@ -17,8 +17,6 @@ test('Sends a pageload transaction', async ({ page }) => { const transactionEvent = await pageloadTransactionEventPromise; const transactionEventId = transactionEvent.event_id; - console.log(`Polling for pageload transaction eventId: ${transactionEventId}`); - await expect .poll( async () => { @@ -58,13 +56,9 @@ test('Sends a transaction for a server component', async ({ page }) => { await page.goto('/user/4'); - console.log('Waiting for server component transaction.'); - const transactionEvent = await serverComponentTransactionPromise; const transactionEventId = transactionEvent.event_id; - console.log(`Polling for server component transaction eventId: ${transactionEventId}`); - await expect .poll( async () => { From 98499ec374d408ee732ac8df670ae813830c253d Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 24 Feb 2023 21:51:55 +0000 Subject: [PATCH 32/32] extract var --- packages/nextjs/src/config/webpack.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 4fd52851fc39..7fd142fc8aa8 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -87,14 +87,16 @@ export function constructWebpackConfigFunction( }); let pagesDirPath: string; - if (fs.existsSync(path.join(projectDir, 'pages')) && fs.lstatSync(path.join(projectDir, 'pages')).isDirectory()) { + const maybePagesDirPath = path.join(projectDir, 'pages'); + if (fs.existsSync(maybePagesDirPath) && fs.lstatSync(maybePagesDirPath).isDirectory()) { pagesDirPath = path.join(projectDir, 'pages'); } else { pagesDirPath = path.join(projectDir, 'src', 'pages'); } let appDirPath: string; - if (fs.existsSync(path.join(projectDir, 'app')) && fs.lstatSync(path.join(projectDir, 'app')).isDirectory()) { + const maybeAppDirPath = path.join(projectDir, 'app'); + if (fs.existsSync(maybeAppDirPath) && fs.lstatSync(maybeAppDirPath).isDirectory()) { appDirPath = path.join(projectDir, 'app'); } else { appDirPath = path.join(projectDir, 'src', 'app');