@hot-updater/datadog-plugin 0.27.1 → 0.29.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/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,20 +20,17 @@ 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
24
|
let execa = require("execa");
|
|
25
|
-
execa = __toESM(execa);
|
|
26
25
|
let fs = require("fs");
|
|
27
26
|
fs = __toESM(fs);
|
|
28
27
|
let os = require("os");
|
|
29
28
|
os = __toESM(os);
|
|
30
29
|
let path = require("path");
|
|
31
30
|
path = __toESM(path);
|
|
32
|
-
|
|
33
31
|
//#region src/withDatadog.ts
|
|
34
32
|
const ensureFilePath = (files, basePath, filename) => {
|
|
35
|
-
const file = files.find((file
|
|
33
|
+
const file = files.find((file) => file.includes(filename));
|
|
36
34
|
if (!file) return null;
|
|
37
35
|
return path.default.resolve(basePath, file);
|
|
38
36
|
};
|
|
@@ -40,12 +38,12 @@ const withDatadog = (buildFn, config) => (args) => {
|
|
|
40
38
|
const context = buildFn(args);
|
|
41
39
|
return {
|
|
42
40
|
...context,
|
|
43
|
-
build: async (args
|
|
41
|
+
build: async (args) => {
|
|
44
42
|
const tmpDir = await fs.default.promises.mkdtemp(path.default.join(os.default.tmpdir(), "hot-updater-datadog-sourcemap-"));
|
|
45
43
|
try {
|
|
46
|
-
const result = await context.build(args
|
|
44
|
+
const result = await context.build(args);
|
|
47
45
|
const files = await fs.default.promises.readdir(result.buildPath, { recursive: true });
|
|
48
|
-
const javascriptBundleFilename = `index.${args
|
|
46
|
+
const javascriptBundleFilename = `index.${args.platform}.bundle`;
|
|
49
47
|
const javascriptBundleSourcemapFilename = `${javascriptBundleFilename}.map`;
|
|
50
48
|
const hermesBundleFilename = `${javascriptBundleFilename}.hbc`;
|
|
51
49
|
const hermesBundleSourcemapFilename = `${javascriptBundleFilename}.hbc.map`;
|
|
@@ -66,7 +64,7 @@ const withDatadog = (buildFn, config) => (args) => {
|
|
|
66
64
|
"react-native",
|
|
67
65
|
"upload",
|
|
68
66
|
"--platform",
|
|
69
|
-
args
|
|
67
|
+
args.platform,
|
|
70
68
|
"--service",
|
|
71
69
|
config.service,
|
|
72
70
|
"--bundle",
|
|
@@ -89,6 +87,5 @@ const withDatadog = (buildFn, config) => (args) => {
|
|
|
89
87
|
}
|
|
90
88
|
};
|
|
91
89
|
};
|
|
92
|
-
|
|
93
90
|
//#endregion
|
|
94
|
-
exports.withDatadog = withDatadog;
|
|
91
|
+
exports.withDatadog = withDatadog;
|
|
@@ -2,10 +2,9 @@ import { execa } from "execa";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import os from "os";
|
|
4
4
|
import path from "path";
|
|
5
|
-
|
|
6
5
|
//#region src/withDatadog.ts
|
|
7
6
|
const ensureFilePath = (files, basePath, filename) => {
|
|
8
|
-
const file = files.find((file
|
|
7
|
+
const file = files.find((file) => file.includes(filename));
|
|
9
8
|
if (!file) return null;
|
|
10
9
|
return path.resolve(basePath, file);
|
|
11
10
|
};
|
|
@@ -13,12 +12,12 @@ const withDatadog = (buildFn, config) => (args) => {
|
|
|
13
12
|
const context = buildFn(args);
|
|
14
13
|
return {
|
|
15
14
|
...context,
|
|
16
|
-
build: async (args
|
|
15
|
+
build: async (args) => {
|
|
17
16
|
const tmpDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "hot-updater-datadog-sourcemap-"));
|
|
18
17
|
try {
|
|
19
|
-
const result = await context.build(args
|
|
18
|
+
const result = await context.build(args);
|
|
20
19
|
const files = await fs.promises.readdir(result.buildPath, { recursive: true });
|
|
21
|
-
const javascriptBundleFilename = `index.${args
|
|
20
|
+
const javascriptBundleFilename = `index.${args.platform}.bundle`;
|
|
22
21
|
const javascriptBundleSourcemapFilename = `${javascriptBundleFilename}.map`;
|
|
23
22
|
const hermesBundleFilename = `${javascriptBundleFilename}.hbc`;
|
|
24
23
|
const hermesBundleSourcemapFilename = `${javascriptBundleFilename}.hbc.map`;
|
|
@@ -39,7 +38,7 @@ const withDatadog = (buildFn, config) => (args) => {
|
|
|
39
38
|
"react-native",
|
|
40
39
|
"upload",
|
|
41
40
|
"--platform",
|
|
42
|
-
args
|
|
41
|
+
args.platform,
|
|
43
42
|
"--service",
|
|
44
43
|
config.service,
|
|
45
44
|
"--bundle",
|
|
@@ -62,6 +61,5 @@ const withDatadog = (buildFn, config) => (args) => {
|
|
|
62
61
|
}
|
|
63
62
|
};
|
|
64
63
|
};
|
|
65
|
-
|
|
66
64
|
//#endregion
|
|
67
|
-
export { withDatadog };
|
|
65
|
+
export { withDatadog };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/datadog-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
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"
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"execa": "9.5.2",
|
|
44
|
-
"@hot-updater/core": "0.
|
|
45
|
-
"@hot-updater/
|
|
44
|
+
"@hot-updater/plugin-core": "0.29.0",
|
|
45
|
+
"@hot-updater/core": "0.29.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^20"
|
|
File without changes
|