@hot-updater/sentry-plugin 0.28.0 → 0.29.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.
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -19,17 +20,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
19
20
|
value: mod,
|
|
20
21
|
enumerable: true
|
|
21
22
|
}) : target, mod));
|
|
22
|
-
|
|
23
23
|
//#endregion
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
__sentry_cli = __toESM(__sentry_cli);
|
|
24
|
+
let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
25
|
+
let _sentry_cli = require("@sentry/cli");
|
|
26
|
+
_sentry_cli = __toESM(_sentry_cli);
|
|
28
27
|
let fs = require("fs");
|
|
29
28
|
fs = __toESM(fs);
|
|
30
29
|
let path = require("path");
|
|
31
30
|
path = __toESM(path);
|
|
32
|
-
|
|
33
31
|
//#region src/withSentry.ts
|
|
34
32
|
const injectDebugIdToHbcMap = (jsCodePath, jsMapPath, hbcMapPath) => {
|
|
35
33
|
if (!hbcMapPath) return jsMapPath;
|
|
@@ -49,7 +47,7 @@ const injectDebugIdToHbcMap = (jsCodePath, jsMapPath, hbcMapPath) => {
|
|
|
49
47
|
return jsMapPath;
|
|
50
48
|
};
|
|
51
49
|
const ensureFilePath = (files, bsaePath, suffix) => {
|
|
52
|
-
const file = files.find((file
|
|
50
|
+
const file = files.find((file) => file.endsWith(suffix));
|
|
53
51
|
if (!file) return null;
|
|
54
52
|
return path.default.join(bsaePath, file);
|
|
55
53
|
};
|
|
@@ -57,9 +55,9 @@ const withSentry = (buildFn, config) => (args) => {
|
|
|
57
55
|
const context = buildFn(args);
|
|
58
56
|
return {
|
|
59
57
|
...context,
|
|
60
|
-
build: async (args
|
|
61
|
-
const result = await context.build(args
|
|
62
|
-
const sentry = new
|
|
58
|
+
build: async (args) => {
|
|
59
|
+
const result = await context.build(args);
|
|
60
|
+
const sentry = new _sentry_cli.default(null, config);
|
|
63
61
|
const files = await fs.default.promises.readdir(result.buildPath, { recursive: true });
|
|
64
62
|
const bundleMapFile = ensureFilePath(files, result.buildPath, ".bundle.map");
|
|
65
63
|
const hbcMapFile = ensureFilePath(files, result.buildPath, ".hbc.map");
|
|
@@ -71,7 +69,7 @@ const withSentry = (buildFn, config) => (args) => {
|
|
|
71
69
|
"upload",
|
|
72
70
|
"--debug-id-reference",
|
|
73
71
|
"--strip-prefix",
|
|
74
|
-
(0,
|
|
72
|
+
(0, _hot_updater_cli_tools.getCwd)(),
|
|
75
73
|
sourcemapFile,
|
|
76
74
|
bundleFile
|
|
77
75
|
], true);
|
|
@@ -79,6 +77,5 @@ const withSentry = (buildFn, config) => (args) => {
|
|
|
79
77
|
}
|
|
80
78
|
};
|
|
81
79
|
};
|
|
82
|
-
|
|
83
80
|
//#endregion
|
|
84
|
-
exports.withSentry = withSentry;
|
|
81
|
+
exports.withSentry = withSentry;
|
|
@@ -2,7 +2,6 @@ import { getCwd } from "@hot-updater/cli-tools";
|
|
|
2
2
|
import SentryCli from "@sentry/cli";
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import path from "path";
|
|
5
|
-
|
|
6
5
|
//#region src/withSentry.ts
|
|
7
6
|
const injectDebugIdToHbcMap = (jsCodePath, jsMapPath, hbcMapPath) => {
|
|
8
7
|
if (!hbcMapPath) return jsMapPath;
|
|
@@ -22,7 +21,7 @@ const injectDebugIdToHbcMap = (jsCodePath, jsMapPath, hbcMapPath) => {
|
|
|
22
21
|
return jsMapPath;
|
|
23
22
|
};
|
|
24
23
|
const ensureFilePath = (files, bsaePath, suffix) => {
|
|
25
|
-
const file = files.find((file
|
|
24
|
+
const file = files.find((file) => file.endsWith(suffix));
|
|
26
25
|
if (!file) return null;
|
|
27
26
|
return path.join(bsaePath, file);
|
|
28
27
|
};
|
|
@@ -30,8 +29,8 @@ const withSentry = (buildFn, config) => (args) => {
|
|
|
30
29
|
const context = buildFn(args);
|
|
31
30
|
return {
|
|
32
31
|
...context,
|
|
33
|
-
build: async (args
|
|
34
|
-
const result = await context.build(args
|
|
32
|
+
build: async (args) => {
|
|
33
|
+
const result = await context.build(args);
|
|
35
34
|
const sentry = new SentryCli(null, config);
|
|
36
35
|
const files = await fs.promises.readdir(result.buildPath, { recursive: true });
|
|
37
36
|
const bundleMapFile = ensureFilePath(files, result.buildPath, ".bundle.map");
|
|
@@ -52,6 +51,5 @@ const withSentry = (buildFn, config) => (args) => {
|
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
53
|
};
|
|
55
|
-
|
|
56
54
|
//#endregion
|
|
57
|
-
export { withSentry };
|
|
55
|
+
export { withSentry };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/sentry-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
|
-
"module": "./dist/index.
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
9
|
"types": "./dist/index.d.cts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import": "./dist/index.
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./package.json": "./package.json"
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@sentry/cli": "2.46.0",
|
|
43
|
-
"@hot-updater/
|
|
44
|
-
"@hot-updater/core": "0.
|
|
45
|
-
"@hot-updater/
|
|
43
|
+
"@hot-updater/core": "0.29.1",
|
|
44
|
+
"@hot-updater/plugin-core": "0.29.1",
|
|
45
|
+
"@hot-updater/cli-tools": "0.29.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^20"
|
|
File without changes
|