@sentry/nuxt 8.41.0-beta.0 → 8.41.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as path from 'path';
2
2
  import { createResolver, defineNuxtModule, addPluginTemplate, addPlugin, addServerPlugin } from '@nuxt/kit';
3
- import { flatten, consoleSandbox } from '@sentry/core';
3
+ import { consoleSandbox } from '@sentry/core';
4
4
  import * as fs from 'fs';
5
5
  import { sentryRollupPlugin } from '@sentry/rollup-plugin';
6
6
  import { sentryVitePlugin } from '@sentry/vite-plugin';
@@ -41,16 +41,18 @@ function extractFunctionReexportQueryParameters(query) {
41
41
  return { wrap, reexport };
42
42
  }
43
43
  function constructWrappedFunctionExportQuery(exportedBindings, entrypointWrappedFunctions, debug) {
44
- const functionsToExport = flatten(Object.values(exportedBindings || {})).reduce(
45
- (functions, currFunctionName) => {
46
- if (entrypointWrappedFunctions.includes(currFunctionName)) {
47
- functions.wrap.push(currFunctionName);
44
+ const functionsToExport = {
45
+ wrap: [],
46
+ reexport: []
47
+ };
48
+ Object.values(exportedBindings || {}).forEach(
49
+ (functions) => functions.forEach((fn) => {
50
+ if (entrypointWrappedFunctions.includes(fn)) {
51
+ functionsToExport.wrap.push(fn);
48
52
  } else {
49
- functions.reexport.push(currFunctionName);
53
+ functionsToExport.reexport.push(fn);
50
54
  }
51
- return functions;
52
- },
53
- { wrap: [], reexport: [] }
55
+ })
54
56
  );
55
57
  if (debug && functionsToExport.wrap.length === 0) {
56
58
  consoleSandbox(
@@ -223,7 +225,7 @@ function getPluginOptions(moduleOptions, deleteFilesAfterUpload) {
223
225
  if (typeof sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload === "undefined" && deleteFilesAfterUpload) {
224
226
  consoleSandbox(() => {
225
227
  console.log(
226
- '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [".*/**/*.map"]` to delete generated source maps after they were uploaded to Sentry.'
228
+ '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [".*/**/public/**/*.map"]` to delete generated source maps after they were uploaded to Sentry.'
227
229
  );
228
230
  });
229
231
  }
@@ -245,7 +247,7 @@ function getPluginOptions(moduleOptions, deleteFilesAfterUpload) {
245
247
  // If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],
246
248
  assets: sourceMapsUploadOptions.sourcemaps?.assets ?? void 0,
247
249
  ignore: sourceMapsUploadOptions.sourcemaps?.ignore ?? void 0,
248
- filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload : deleteFilesAfterUpload ? [".*/**/*.map"] : void 0,
250
+ filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload : deleteFilesAfterUpload ? [".*/**/public/**/*.map"] : void 0,
249
251
  rewriteSources: (source) => normalizePath(source),
250
252
  ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps
251
253
  }
@@ -356,7 +358,7 @@ function logKeepSourceMapSetting(sentryNuxtModuleOptions, settingKey, settingVal
356
358
  function warnExplicitlyDisabledSourceMap(settingKey) {
357
359
  consoleSandbox(() => {
358
360
  console.warn(
359
- `[Sentry] Parts of source map generation are currently disabled in your Nuxt configuration (\`${settingKey}: false\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\`.`
361
+ `[Sentry] Parts of source map generation are currently disabled in your Nuxt configuration (\`${settingKey}: false\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\` (e.g. by setting them to \`hidden\`).`
360
362
  );
361
363
  });
362
364
  }
@@ -1,4 +1,4 @@
1
- import type { Client } from '@sentry/types';
1
+ import type { Client, EventProcessor } from '@sentry/types';
2
2
  import type { SentryNuxtServerOptions } from '../common/types';
3
3
  /**
4
4
  * Initializes the server-side of the Nuxt SDK
@@ -6,6 +6,19 @@ import type { SentryNuxtServerOptions } from '../common/types';
6
6
  * @param options Configuration options for the SDK.
7
7
  */
8
8
  export declare function init(options: SentryNuxtServerOptions): Client | undefined;
9
+ /**
10
+ * Filter out transactions for Nuxt build assets
11
+ * This regex matches the default path to the nuxt-generated build assets (`_nuxt`).
12
+ *
13
+ * Only exported for testing
14
+ */
15
+ export declare function lowQualityTransactionsFilter(options: SentryNuxtServerOptions): EventProcessor;
16
+ /**
17
+ * The browser devtools try to get the source maps, but as client source maps may not be available there is going to be an error (no problem for the application though).
18
+ *
19
+ * Only exported for testing
20
+ */
21
+ export declare function clientSourceMapErrorFilter(options: SentryNuxtServerOptions): EventProcessor;
9
22
  /**
10
23
  * Adds /vue/ to the registerEsmLoaderHooks options and merges it with the old values in the array if one is defined.
11
24
  * If the registerEsmLoaderHooks option is already a boolean, nothing is changed.
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAA+B,MAAM,eAAe,CAAC;AAEzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAmCzE;AAiBD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,uBAAuB,GAC/B,uBAAuB,CAAC,wBAAwB,CAAC,CASnD;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAQ5D"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/server/sdk.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAe,MAAM,eAAe,CAAC;AAEzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAezE;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CAe7F;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,uBAAuB,GAAG,cAAc,CAY3F;AAiBD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,uBAAuB,GAC/B,uBAAuB,CAAC,wBAAwB,CAAC,CASnD;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAQ5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vite/utils.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAkBpF;AAED,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAClE,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAC3E,eAAO,MAAM,2BAA2B,wCAAwC,CAAC;AACjF,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA+B5G;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EACjD,0BAA0B,EAAE,MAAM,EAAE,EACpC,KAAK,CAAC,EAAE,OAAO,GACd,MAAM,CAgCR;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAsBxF"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/vite/utils.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAkBpF;AAED,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAClE,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAC3E,eAAO,MAAM,2BAA2B,wCAAwC,CAAC;AACjF,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI7D;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA+B5G;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EACjD,0BAA0B,EAAE,MAAM,EAAE,EACpC,KAAK,CAAC,EAAE,OAAO,GACd,MAAM,CAmCR;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAsBxF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/nuxt",
3
- "version": "8.41.0-beta.0",
3
+ "version": "8.41.0-beta.1",
4
4
  "description": "Official Sentry SDK for Nuxt (EXPERIMENTAL)",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/nuxt",
@@ -43,14 +43,14 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@nuxt/kit": "^3.13.2",
46
- "@sentry/browser": "8.41.0-beta.0",
47
- "@sentry/core": "8.41.0-beta.0",
48
- "@sentry/node": "8.41.0-beta.0",
49
- "@sentry/opentelemetry": "8.41.0-beta.0",
46
+ "@sentry/browser": "8.41.0-beta.1",
47
+ "@sentry/core": "8.41.0-beta.1",
48
+ "@sentry/node": "8.41.0-beta.1",
49
+ "@sentry/opentelemetry": "8.41.0-beta.1",
50
50
  "@sentry/rollup-plugin": "2.22.6",
51
- "@sentry/types": "8.41.0-beta.0",
51
+ "@sentry/types": "8.41.0-beta.1",
52
52
  "@sentry/vite-plugin": "2.22.6",
53
- "@sentry/vue": "8.41.0-beta.0"
53
+ "@sentry/vue": "8.41.0-beta.1"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@nuxt/module-builder": "^0.8.4",