@sentry/bundler-plugins 11.12.0 → 11.13.0
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.
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/assertClassBrand.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js +5 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js +6 -0
- package/build/cjs/_virtual/_rolldown/runtime.js +22 -0
- package/build/cjs/babel-plugin/component-annotation.js +14 -32
- package/build/cjs/babel-plugin/component-annotation.js.map +1 -1
- package/build/cjs/babel-plugin/constants.js +140 -122
- package/build/cjs/babel-plugin/constants.js.map +1 -1
- package/build/cjs/babel-plugin/experimental.js +204 -307
- package/build/cjs/babel-plugin/experimental.js.map +1 -1
- package/build/cjs/babel-plugin/index.js +315 -437
- package/build/cjs/babel-plugin/index.js.map +1 -1
- package/build/cjs/bun/index.js +81 -117
- package/build/cjs/bun/index.js.map +1 -1
- package/build/cjs/core/build-plugin-manager.js +626 -702
- package/build/cjs/core/build-plugin-manager.js.map +1 -1
- package/build/cjs/core/cli.js +134 -129
- package/build/cjs/core/cli.js.map +1 -1
- package/build/cjs/core/component-annotate-hooks.js +16 -27
- package/build/cjs/core/component-annotate-hooks.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-ast.js +10 -21
- package/build/cjs/core/component-annotation-oxc-ast.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-fragments.js +45 -74
- package/build/cjs/core/component-annotation-oxc-fragments.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-jsx.js +116 -156
- package/build/cjs/core/component-annotation-oxc-jsx.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-walk.js +62 -123
- package/build/cjs/core/component-annotation-oxc-walk.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc.js +68 -103
- package/build/cjs/core/component-annotation-oxc.js.map +1 -1
- package/build/cjs/core/debug-id-upload.js +223 -234
- package/build/cjs/core/debug-id-upload.js.map +1 -1
- package/build/cjs/core/get-code-injection-position.js +59 -74
- package/build/cjs/core/get-code-injection-position.js.map +1 -1
- package/build/cjs/core/glob.js +9 -7
- package/build/cjs/core/glob.js.map +1 -1
- package/build/cjs/core/index.js +77 -61
- package/build/cjs/core/index.js.map +1 -1
- package/build/cjs/core/logger.js +17 -26
- package/build/cjs/core/logger.js.map +1 -1
- package/build/cjs/core/options-mapping.js +95 -117
- package/build/cjs/core/options-mapping.js.map +1 -1
- package/build/cjs/core/sentry/telemetry.js +90 -105
- package/build/cjs/core/sentry/telemetry.js.map +1 -1
- package/build/cjs/core/sentry/transports.js +92 -99
- package/build/cjs/core/sentry/transports.js.map +1 -1
- package/build/cjs/core/sourcemap-settings.js +98 -61
- package/build/cjs/core/sourcemap-settings.js.map +1 -1
- package/build/cjs/core/upload-filter.js +41 -46
- package/build/cjs/core/upload-filter.js.map +1 -1
- package/build/cjs/core/utils.js +228 -219
- package/build/cjs/core/utils.js.map +1 -1
- package/build/cjs/core/version.js +4 -5
- package/build/cjs/core/version.js.map +1 -1
- package/build/cjs/esbuild/index.js +180 -211
- package/build/cjs/esbuild/index.js.map +1 -1
- package/build/cjs/loader-utils/index.js +5 -10
- package/build/cjs/rollup/debug-id-injection.js +22 -38
- package/build/cjs/rollup/debug-id-injection.js.map +1 -1
- package/build/cjs/rollup/debug-id-stamping.js +14 -24
- package/build/cjs/rollup/debug-id-stamping.js.map +1 -1
- package/build/cjs/rollup/index.js +192 -246
- package/build/cjs/rollup/index.js.map +1 -1
- package/build/cjs/rollup/source-map-handling.js +151 -175
- package/build/cjs/rollup/source-map-handling.js.map +1 -1
- package/build/cjs/vite/index.js +19 -21
- package/build/cjs/vite/index.js.map +1 -1
- package/build/cjs/vite/source-map-hooks.js +112 -89
- package/build/cjs/vite/source-map-hooks.js.map +1 -1
- package/build/cjs/webpack/component-annotation-transform.js +20 -26
- package/build/cjs/webpack/component-annotation-transform.js.map +1 -1
- package/build/cjs/webpack/index.js +271 -340
- package/build/cjs/webpack/index.js.map +1 -1
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/assertClassBrand.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js +5 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js +6 -0
- package/build/esm/_virtual/_rolldown/runtime.js +2 -0
- package/build/esm/babel-plugin/component-annotation.js +13 -29
- package/build/esm/babel-plugin/component-annotation.js.map +1 -1
- package/build/esm/babel-plugin/constants.js +140 -120
- package/build/esm/babel-plugin/constants.js.map +1 -1
- package/build/esm/babel-plugin/experimental.js +204 -305
- package/build/esm/babel-plugin/experimental.js.map +1 -1
- package/build/esm/babel-plugin/index.js +311 -434
- package/build/esm/babel-plugin/index.js.map +1 -1
- package/build/esm/bun/index.js +76 -101
- package/build/esm/bun/index.js.map +1 -1
- package/build/esm/core/build-plugin-manager.js +621 -683
- package/build/esm/core/build-plugin-manager.js.map +1 -1
- package/build/esm/core/cli.js +134 -127
- package/build/esm/core/cli.js.map +1 -1
- package/build/esm/core/component-annotate-hooks.js +16 -25
- package/build/esm/core/component-annotate-hooks.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-ast.js +9 -19
- package/build/esm/core/component-annotation-oxc-ast.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-fragments.js +44 -72
- package/build/esm/core/component-annotation-oxc-fragments.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-jsx.js +115 -154
- package/build/esm/core/component-annotation-oxc-jsx.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-walk.js +61 -121
- package/build/esm/core/component-annotation-oxc-walk.js.map +1 -1
- package/build/esm/core/component-annotation-oxc.js +65 -96
- package/build/esm/core/component-annotation-oxc.js.map +1 -1
- package/build/esm/core/debug-id-upload.js +218 -213
- package/build/esm/core/debug-id-upload.js.map +1 -1
- package/build/esm/core/get-code-injection-position.js +59 -72
- package/build/esm/core/get-code-injection-position.js.map +1 -1
- package/build/esm/core/glob.js +9 -5
- package/build/esm/core/glob.js.map +1 -1
- package/build/esm/core/index.js +62 -47
- package/build/esm/core/index.js.map +1 -1
- package/build/esm/core/logger.js +17 -24
- package/build/esm/core/logger.js.map +1 -1
- package/build/esm/core/options-mapping.js +95 -115
- package/build/esm/core/options-mapping.js.map +1 -1
- package/build/esm/core/sentry/telemetry.js +89 -102
- package/build/esm/core/sentry/telemetry.js.map +1 -1
- package/build/esm/core/sentry/transports.js +90 -83
- package/build/esm/core/sentry/transports.js.map +1 -1
- package/build/esm/core/sourcemap-settings.js +96 -59
- package/build/esm/core/sourcemap-settings.js.map +1 -1
- package/build/esm/core/upload-filter.js +39 -30
- package/build/esm/core/upload-filter.js.map +1 -1
- package/build/esm/core/utils.js +221 -209
- package/build/esm/core/utils.js.map +1 -1
- package/build/esm/core/version.js +4 -3
- package/build/esm/core/version.js.map +1 -1
- package/build/esm/esbuild/index.js +176 -195
- package/build/esm/esbuild/index.js.map +1 -1
- package/build/esm/loader-utils/index.js +4 -3
- package/build/esm/package.json +1 -1
- package/build/esm/rollup/debug-id-injection.js +22 -36
- package/build/esm/rollup/debug-id-injection.js.map +1 -1
- package/build/esm/rollup/debug-id-stamping.js +14 -22
- package/build/esm/rollup/debug-id-stamping.js.map +1 -1
- package/build/esm/rollup/index.js +189 -226
- package/build/esm/rollup/index.js.map +1 -1
- package/build/esm/rollup/source-map-handling.js +149 -159
- package/build/esm/rollup/source-map-handling.js.map +1 -1
- package/build/esm/vite/index.js +19 -18
- package/build/esm/vite/index.js.map +1 -1
- package/build/esm/vite/source-map-hooks.js +109 -72
- package/build/esm/vite/source-map-hooks.js.map +1 -1
- package/build/esm/webpack/component-annotation-transform.js +17 -24
- package/build/esm/webpack/component-annotation-transform.js.map +1 -1
- package/build/esm/webpack/index.js +268 -322
- package/build/esm/webpack/index.js.map +1 -1
- package/build/types/core/build-plugin-manager.d.ts +16 -5
- package/build/types/core/build-plugin-manager.d.ts.map +1 -1
- package/build/types/core/cli.d.ts +6 -1
- package/build/types/core/cli.d.ts.map +1 -1
- package/build/types/core/debug-id-upload.d.ts +7 -4
- package/build/types/core/debug-id-upload.d.ts.map +1 -1
- package/build/types/core/index.d.ts +3 -3
- package/build/types/core/index.d.ts.map +1 -1
- package/build/types/core/options-mapping.d.ts +4 -3
- package/build/types/core/options-mapping.d.ts.map +1 -1
- package/build/types/core/sentry/telemetry.d.ts.map +1 -1
- package/build/types/core/sourcemap-settings.d.ts +10 -1
- package/build/types/core/sourcemap-settings.d.ts.map +1 -1
- package/build/types/core/types.d.ts +25 -1
- package/build/types/core/types.d.ts.map +1 -1
- package/build/types/core/utils.d.ts +4 -0
- package/build/types/core/utils.d.ts.map +1 -1
- package/build/types/core/version.d.ts +1 -1
- package/build/types/esbuild/index.d.ts +2 -2
- package/build/types/esbuild/index.d.ts.map +1 -1
- package/build/types/rollup/index.d.ts +2 -2
- package/build/types/rollup/index.d.ts.map +1 -1
- package/build/types/rollup/source-map-handling.d.ts.map +1 -1
- package/build/types/vite/index.d.ts +3 -3
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/source-map-hooks.d.ts.map +1 -1
- package/build/types/webpack/index.d.ts +7 -3
- package/build/types/webpack/index.d.ts.map +1 -1
- package/package.json +8 -15
- package/build/cjs/loader-utils/index.js.map +0 -1
- package/build/esm/loader-utils/index.js.map +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/assertClassBrand.js
|
|
2
|
+
function _assertClassBrand(e, t, n) {
|
|
3
|
+
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
4
|
+
throw new TypeError("Private element is not present on this object");
|
|
5
|
+
}
|
|
6
|
+
exports.default = _assertClassBrand;
|
package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js
|
|
2
|
+
function _checkPrivateRedeclaration(e, t) {
|
|
3
|
+
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
4
|
+
}
|
|
5
|
+
exports.default = _checkPrivateRedeclaration;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const require_assertClassBrand = require("./assertClassBrand.js");
|
|
2
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js
|
|
3
|
+
function _classPrivateFieldGet2(s, a) {
|
|
4
|
+
return s.get(require_assertClassBrand.default(s, a));
|
|
5
|
+
}
|
|
6
|
+
exports.default = _classPrivateFieldGet2;
|
package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const require_checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
|
|
2
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
3
|
+
function _classPrivateFieldInitSpec(e, t, a) {
|
|
4
|
+
require_checkPrivateRedeclaration.default(e, t), t.set(e, a);
|
|
5
|
+
}
|
|
6
|
+
exports.default = _classPrivateFieldInitSpec;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const require_assertClassBrand = require("./assertClassBrand.js");
|
|
2
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js
|
|
3
|
+
function _classPrivateFieldSet2(s, a, r) {
|
|
4
|
+
return s.set(require_assertClassBrand.default(s, a), r), r;
|
|
5
|
+
}
|
|
6
|
+
exports.default = _classPrivateFieldSet2;
|
package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const require_checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
|
|
2
|
+
// \0@oxc-project+runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
3
|
+
function _classPrivateMethodInitSpec(e, a) {
|
|
4
|
+
require_checkPrivateRedeclaration.default(e, a), a.add(e);
|
|
5
|
+
}
|
|
6
|
+
exports.default = _classPrivateMethodInitSpec;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
exports.__toESM = __toESM;
|
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const constants = require('./constants.js');
|
|
4
|
-
|
|
1
|
+
const require_constants = require("./constants.js");
|
|
2
|
+
// src/babel-plugin/component-annotation.ts
|
|
5
3
|
const WEB_COMPONENT_NAME = "data-sentry-component";
|
|
6
4
|
const WEB_ELEMENT_NAME = "data-sentry-element";
|
|
7
5
|
const WEB_SOURCE_FILE_NAME = "data-sentry-source-file";
|
|
8
6
|
const NATIVE_COMPONENT_NAME = "dataSentryComponent";
|
|
9
7
|
const NATIVE_ELEMENT_NAME = "dataSentryElement";
|
|
10
8
|
const NATIVE_SOURCE_FILE_NAME = "dataSentrySourceFile";
|
|
11
|
-
const DEFAULT_IGNORED_ELEMENTS_SET = new Set(
|
|
12
|
-
function getComponentAnnotationAttributes({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (isFragment || ignoredComponents.includes(componentName) || ignoredComponents.includes(elementName)) {
|
|
22
|
-
return [];
|
|
23
|
-
}
|
|
24
|
-
const [componentAttributeName, elementAttributeName, sourceFileAttributeName] = attributeNames;
|
|
25
|
-
const isIgnoredElement = DEFAULT_IGNORED_ELEMENTS_SET.has(elementName);
|
|
26
|
-
const attributes = [];
|
|
27
|
-
if (!isIgnoredElement && !existingAttributes.has(elementAttributeName)) {
|
|
28
|
-
attributes.push([elementAttributeName, elementName]);
|
|
29
|
-
}
|
|
30
|
-
if (componentName && !existingAttributes.has(componentAttributeName)) {
|
|
31
|
-
attributes.push([componentAttributeName, componentName]);
|
|
32
|
-
}
|
|
33
|
-
if (sourceFileName && (componentName || !isIgnoredElement) && !existingAttributes.has(sourceFileAttributeName)) {
|
|
34
|
-
attributes.push([sourceFileAttributeName, sourceFileName]);
|
|
35
|
-
}
|
|
36
|
-
return attributes;
|
|
9
|
+
const DEFAULT_IGNORED_ELEMENTS_SET = new Set(require_constants.DEFAULT_IGNORED_ELEMENTS);
|
|
10
|
+
function getComponentAnnotationAttributes({ attributeNames, componentName, elementName, existingAttributes, ignoredComponents, isFragment, sourceFileName }) {
|
|
11
|
+
if (isFragment || ignoredComponents.includes(componentName) || ignoredComponents.includes(elementName)) return [];
|
|
12
|
+
const [componentAttributeName, elementAttributeName, sourceFileAttributeName] = attributeNames;
|
|
13
|
+
const isIgnoredElement = DEFAULT_IGNORED_ELEMENTS_SET.has(elementName);
|
|
14
|
+
const attributes = [];
|
|
15
|
+
if (!isIgnoredElement && !existingAttributes.has(elementAttributeName)) attributes.push([elementAttributeName, elementName]);
|
|
16
|
+
if (componentName && !existingAttributes.has(componentAttributeName)) attributes.push([componentAttributeName, componentName]);
|
|
17
|
+
if (sourceFileName && (componentName || !isIgnoredElement) && !existingAttributes.has(sourceFileAttributeName)) attributes.push([sourceFileAttributeName, sourceFileName]);
|
|
18
|
+
return attributes;
|
|
37
19
|
}
|
|
38
|
-
|
|
39
20
|
exports.NATIVE_COMPONENT_NAME = NATIVE_COMPONENT_NAME;
|
|
40
21
|
exports.NATIVE_ELEMENT_NAME = NATIVE_ELEMENT_NAME;
|
|
41
22
|
exports.NATIVE_SOURCE_FILE_NAME = NATIVE_SOURCE_FILE_NAME;
|
|
@@ -43,4 +24,5 @@ exports.WEB_COMPONENT_NAME = WEB_COMPONENT_NAME;
|
|
|
43
24
|
exports.WEB_ELEMENT_NAME = WEB_ELEMENT_NAME;
|
|
44
25
|
exports.WEB_SOURCE_FILE_NAME = WEB_SOURCE_FILE_NAME;
|
|
45
26
|
exports.getComponentAnnotationAttributes = getComponentAnnotationAttributes;
|
|
46
|
-
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=component-annotation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-annotation.js","sources":["../../../src/babel-plugin/component-annotation.ts"],"sourcesContent":["import { DEFAULT_IGNORED_ELEMENTS } from './constants';\n\nexport const WEB_COMPONENT_NAME = 'data-sentry-component';\nexport const WEB_ELEMENT_NAME = 'data-sentry-element';\nexport const WEB_SOURCE_FILE_NAME = 'data-sentry-source-file';\n\nexport const NATIVE_COMPONENT_NAME = 'dataSentryComponent';\nexport const NATIVE_ELEMENT_NAME = 'dataSentryElement';\nexport const NATIVE_SOURCE_FILE_NAME = 'dataSentrySourceFile';\n\nexport type ComponentAnnotationAttributeNames = readonly [string, string, string];\n\nexport type ComponentAnnotationAttribute = [string, string];\n\ntype ComponentAnnotationAttributesInput = {\n attributeNames: ComponentAnnotationAttributeNames;\n componentName: string;\n elementName: string;\n existingAttributes: ReadonlySet<string>;\n ignoredComponents: readonly string[];\n isFragment: boolean;\n sourceFileName?: string;\n};\n\nconst DEFAULT_IGNORED_ELEMENTS_SET = new Set(DEFAULT_IGNORED_ELEMENTS);\n\nexport function getComponentAnnotationAttributes({\n attributeNames,\n componentName,\n elementName,\n existingAttributes,\n ignoredComponents,\n isFragment,\n sourceFileName,\n}: ComponentAnnotationAttributesInput): ComponentAnnotationAttribute[] {\n if (isFragment || ignoredComponents.includes(componentName) || ignoredComponents.includes(elementName)) {\n return [];\n }\n\n const [componentAttributeName, elementAttributeName, sourceFileAttributeName] = attributeNames;\n const isIgnoredElement = DEFAULT_IGNORED_ELEMENTS_SET.has(elementName);\n const attributes: ComponentAnnotationAttribute[] = [];\n\n if (!isIgnoredElement && !existingAttributes.has(elementAttributeName)) {\n attributes.push([elementAttributeName, elementName]);\n }\n\n if (componentName && !existingAttributes.has(componentAttributeName)) {\n attributes.push([componentAttributeName, componentName]);\n }\n\n if (sourceFileName && (componentName || !isIgnoredElement) && !existingAttributes.has(sourceFileAttributeName)) {\n attributes.push([sourceFileAttributeName, sourceFileName]);\n }\n\n return attributes;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"component-annotation.js","names":["DEFAULT_IGNORED_ELEMENTS"],"sources":["../../../src/babel-plugin/component-annotation.ts"],"sourcesContent":["import { DEFAULT_IGNORED_ELEMENTS } from './constants';\n\nexport const WEB_COMPONENT_NAME = 'data-sentry-component';\nexport const WEB_ELEMENT_NAME = 'data-sentry-element';\nexport const WEB_SOURCE_FILE_NAME = 'data-sentry-source-file';\n\nexport const NATIVE_COMPONENT_NAME = 'dataSentryComponent';\nexport const NATIVE_ELEMENT_NAME = 'dataSentryElement';\nexport const NATIVE_SOURCE_FILE_NAME = 'dataSentrySourceFile';\n\nexport type ComponentAnnotationAttributeNames = readonly [string, string, string];\n\nexport type ComponentAnnotationAttribute = [string, string];\n\ntype ComponentAnnotationAttributesInput = {\n attributeNames: ComponentAnnotationAttributeNames;\n componentName: string;\n elementName: string;\n existingAttributes: ReadonlySet<string>;\n ignoredComponents: readonly string[];\n isFragment: boolean;\n sourceFileName?: string;\n};\n\nconst DEFAULT_IGNORED_ELEMENTS_SET = new Set(DEFAULT_IGNORED_ELEMENTS);\n\nexport function getComponentAnnotationAttributes({\n attributeNames,\n componentName,\n elementName,\n existingAttributes,\n ignoredComponents,\n isFragment,\n sourceFileName,\n}: ComponentAnnotationAttributesInput): ComponentAnnotationAttribute[] {\n if (isFragment || ignoredComponents.includes(componentName) || ignoredComponents.includes(elementName)) {\n return [];\n }\n\n const [componentAttributeName, elementAttributeName, sourceFileAttributeName] = attributeNames;\n const isIgnoredElement = DEFAULT_IGNORED_ELEMENTS_SET.has(elementName);\n const attributes: ComponentAnnotationAttribute[] = [];\n\n if (!isIgnoredElement && !existingAttributes.has(elementAttributeName)) {\n attributes.push([elementAttributeName, elementName]);\n }\n\n if (componentName && !existingAttributes.has(componentAttributeName)) {\n attributes.push([componentAttributeName, componentName]);\n }\n\n if (sourceFileName && (componentName || !isIgnoredElement) && !existingAttributes.has(sourceFileAttributeName)) {\n attributes.push([sourceFileAttributeName, sourceFileName]);\n }\n\n return attributes;\n}\n"],"mappings":";;AAEA,MAAa,qBAAqB;AAClC,MAAa,mBAAmB;AAChC,MAAa,uBAAuB;AAEpC,MAAa,wBAAwB;AACrC,MAAa,sBAAsB;AACnC,MAAa,0BAA0B;AAgBvC,MAAM,+BAA+B,IAAI,IAAIA,kBAAAA,wBAAwB;AAErE,SAAgB,iCAAiC,EAC/C,gBACA,eACA,aACA,oBACA,mBACA,YACA,kBACqE;CACrE,IAAI,cAAc,kBAAkB,SAAS,aAAa,KAAK,kBAAkB,SAAS,WAAW,GACnG,OAAO,CAAC;CAGV,MAAM,CAAC,wBAAwB,sBAAsB,2BAA2B;CAChF,MAAM,mBAAmB,6BAA6B,IAAI,WAAW;CACrE,MAAM,aAA6C,CAAC;CAEpD,IAAI,CAAC,oBAAoB,CAAC,mBAAmB,IAAI,oBAAoB,GACnE,WAAW,KAAK,CAAC,sBAAsB,WAAW,CAAC;CAGrD,IAAI,iBAAiB,CAAC,mBAAmB,IAAI,sBAAsB,GACjE,WAAW,KAAK,CAAC,wBAAwB,aAAa,CAAC;CAGzD,IAAI,mBAAmB,iBAAiB,CAAC,qBAAqB,CAAC,mBAAmB,IAAI,uBAAuB,GAC3G,WAAW,KAAK,CAAC,yBAAyB,cAAc,CAAC;CAG3D,OAAO;AACT"}
|
|
@@ -1,126 +1,144 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
// src/babel-plugin/constants.ts
|
|
2
|
+
/**
|
|
3
|
+
* MIT License
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2020 Engineering at FullStory
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
const KNOWN_INCOMPATIBLE_PLUGINS = ["react-native-testfairy", "@react-navigation"];
|
|
9
27
|
const DEFAULT_IGNORED_ELEMENTS = [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
28
|
+
"a",
|
|
29
|
+
"abbr",
|
|
30
|
+
"address",
|
|
31
|
+
"area",
|
|
32
|
+
"article",
|
|
33
|
+
"aside",
|
|
34
|
+
"audio",
|
|
35
|
+
"b",
|
|
36
|
+
"base",
|
|
37
|
+
"bdi",
|
|
38
|
+
"bdo",
|
|
39
|
+
"blockquote",
|
|
40
|
+
"body",
|
|
41
|
+
"br",
|
|
42
|
+
"button",
|
|
43
|
+
"canvas",
|
|
44
|
+
"caption",
|
|
45
|
+
"cite",
|
|
46
|
+
"code",
|
|
47
|
+
"col",
|
|
48
|
+
"colgroup",
|
|
49
|
+
"data",
|
|
50
|
+
"datalist",
|
|
51
|
+
"dd",
|
|
52
|
+
"del",
|
|
53
|
+
"details",
|
|
54
|
+
"dfn",
|
|
55
|
+
"dialog",
|
|
56
|
+
"div",
|
|
57
|
+
"dl",
|
|
58
|
+
"dt",
|
|
59
|
+
"em",
|
|
60
|
+
"embed",
|
|
61
|
+
"fieldset",
|
|
62
|
+
"figure",
|
|
63
|
+
"footer",
|
|
64
|
+
"form",
|
|
65
|
+
"h1",
|
|
66
|
+
"h2",
|
|
67
|
+
"h3",
|
|
68
|
+
"h4",
|
|
69
|
+
"h5",
|
|
70
|
+
"h6",
|
|
71
|
+
"head",
|
|
72
|
+
"header",
|
|
73
|
+
"hgroup",
|
|
74
|
+
"hr",
|
|
75
|
+
"html",
|
|
76
|
+
"i",
|
|
77
|
+
"iframe",
|
|
78
|
+
"img",
|
|
79
|
+
"input",
|
|
80
|
+
"ins",
|
|
81
|
+
"kbd",
|
|
82
|
+
"keygen",
|
|
83
|
+
"label",
|
|
84
|
+
"legend",
|
|
85
|
+
"li",
|
|
86
|
+
"link",
|
|
87
|
+
"main",
|
|
88
|
+
"map",
|
|
89
|
+
"mark",
|
|
90
|
+
"menu",
|
|
91
|
+
"menuitem",
|
|
92
|
+
"meter",
|
|
93
|
+
"nav",
|
|
94
|
+
"noscript",
|
|
95
|
+
"object",
|
|
96
|
+
"ol",
|
|
97
|
+
"optgroup",
|
|
98
|
+
"option",
|
|
99
|
+
"output",
|
|
100
|
+
"p",
|
|
101
|
+
"param",
|
|
102
|
+
"pre",
|
|
103
|
+
"progress",
|
|
104
|
+
"q",
|
|
105
|
+
"rb",
|
|
106
|
+
"rp",
|
|
107
|
+
"rt",
|
|
108
|
+
"rtc",
|
|
109
|
+
"ruby",
|
|
110
|
+
"s",
|
|
111
|
+
"samp",
|
|
112
|
+
"script",
|
|
113
|
+
"section",
|
|
114
|
+
"select",
|
|
115
|
+
"small",
|
|
116
|
+
"source",
|
|
117
|
+
"span",
|
|
118
|
+
"strong",
|
|
119
|
+
"style",
|
|
120
|
+
"sub",
|
|
121
|
+
"summary",
|
|
122
|
+
"sup",
|
|
123
|
+
"table",
|
|
124
|
+
"tbody",
|
|
125
|
+
"td",
|
|
126
|
+
"template",
|
|
127
|
+
"textarea",
|
|
128
|
+
"tfoot",
|
|
129
|
+
"th",
|
|
130
|
+
"thead",
|
|
131
|
+
"time",
|
|
132
|
+
"title",
|
|
133
|
+
"tr",
|
|
134
|
+
"track",
|
|
135
|
+
"u",
|
|
136
|
+
"ul",
|
|
137
|
+
"var",
|
|
138
|
+
"video",
|
|
139
|
+
"wbr"
|
|
122
140
|
];
|
|
123
|
-
|
|
124
141
|
exports.DEFAULT_IGNORED_ELEMENTS = DEFAULT_IGNORED_ELEMENTS;
|
|
125
142
|
exports.KNOWN_INCOMPATIBLE_PLUGINS = KNOWN_INCOMPATIBLE_PLUGINS;
|
|
126
|
-
|
|
143
|
+
|
|
144
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../src/babel-plugin/constants.ts"],"sourcesContent":["/**\n * MIT License\n *\n * Copyright (c) 2020 Engineering at FullStory\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n */\n\nexport const KNOWN_INCOMPATIBLE_PLUGINS = [\n // This module might be causing an issue preventing clicks. For safety, we won't run on this module.\n 'react-native-testfairy',\n // This module checks for unexpected property keys and throws an exception.\n '@react-navigation',\n];\n\nexport const DEFAULT_IGNORED_ELEMENTS = [\n 'a',\n 'abbr',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'base',\n 'bdi',\n 'bdo',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'data',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'keygen',\n 'label',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'map',\n 'mark',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'param',\n 'pre',\n 'progress',\n 'q',\n 'rb',\n 'rp',\n 'rt',\n 'rtc',\n 'ruby',\n 's',\n 'samp',\n 'script',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'title',\n 'tr',\n 'track',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n];\n"],"
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../../../src/babel-plugin/constants.ts"],"sourcesContent":["/**\n * MIT License\n *\n * Copyright (c) 2020 Engineering at FullStory\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n */\n\nexport const KNOWN_INCOMPATIBLE_PLUGINS = [\n // This module might be causing an issue preventing clicks. For safety, we won't run on this module.\n 'react-native-testfairy',\n // This module checks for unexpected property keys and throws an exception.\n '@react-navigation',\n];\n\nexport const DEFAULT_IGNORED_ELEMENTS = [\n 'a',\n 'abbr',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'base',\n 'bdi',\n 'bdo',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'data',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'keygen',\n 'label',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'map',\n 'mark',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'param',\n 'pre',\n 'progress',\n 'q',\n 'rb',\n 'rp',\n 'rt',\n 'rtc',\n 'ruby',\n 's',\n 'samp',\n 'script',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'title',\n 'tr',\n 'track',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,6BAA6B,CAExC,0BAEA,mBACF;AAEA,MAAa,2BAA2B;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|