@sentry/junior 0.9.1 → 0.9.2
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/bin/junior.mjs +27 -7
- package/dist/{chunk-7GLBFSWP.js → chunk-7DAWPSTI.js} +4 -1
- package/dist/{chunk-T7BIFBYH.js → chunk-D4ULS2MW.js} +1 -1
- package/dist/{chunk-UPCIISWE.js → chunk-KZWHD5KH.js} +2 -2
- package/dist/{chunk-JNHYSCAO.js → chunk-OPT4JB73.js} +1 -1
- package/dist/cli/snapshot-warmup.js +1 -1
- package/dist/handlers/queue-callback.js +3 -3
- package/dist/handlers/router.js +4 -4
- package/dist/handlers/webhooks.js +1 -1
- package/dist/{production-PPQEQOPO.js → production-H3THODDE.js} +2 -2
- package/package.json +1 -1
package/bin/junior.mjs
CHANGED
|
@@ -6,14 +6,20 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
6
6
|
|
|
7
7
|
const { positionals } = parseArgs({
|
|
8
8
|
allowPositionals: true,
|
|
9
|
-
strict: false
|
|
9
|
+
strict: false,
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
const command = positionals[0];
|
|
13
13
|
|
|
14
14
|
async function loadCliFunction(moduleName, exportName, unavailableMessage) {
|
|
15
15
|
const currentFile = fileURLToPath(import.meta.url);
|
|
16
|
-
const modulePath = path.join(
|
|
16
|
+
const modulePath = path.join(
|
|
17
|
+
path.dirname(currentFile),
|
|
18
|
+
"..",
|
|
19
|
+
"dist",
|
|
20
|
+
"cli",
|
|
21
|
+
`${moduleName}.js`,
|
|
22
|
+
);
|
|
17
23
|
const moduleUrl = pathToFileURL(modulePath).href;
|
|
18
24
|
const loadedModule = await import(moduleUrl);
|
|
19
25
|
if (typeof loadedModule[exportName] !== "function") {
|
|
@@ -22,17 +28,30 @@ async function loadCliFunction(moduleName, exportName, unavailableMessage) {
|
|
|
22
28
|
return loadedModule[exportName];
|
|
23
29
|
}
|
|
24
30
|
|
|
31
|
+
async function loadCliEnvFiles() {
|
|
32
|
+
const loadCliEnvFilesFn = await loadCliFunction(
|
|
33
|
+
"env",
|
|
34
|
+
"loadCliEnvFiles",
|
|
35
|
+
"CLI env loader is unavailable; reinstall @sentry/junior and retry.",
|
|
36
|
+
);
|
|
37
|
+
loadCliEnvFilesFn(process.cwd());
|
|
38
|
+
}
|
|
39
|
+
|
|
25
40
|
async function runSnapshotCreate() {
|
|
26
41
|
const runSnapshotCreateFn = await loadCliFunction(
|
|
27
42
|
"snapshot-warmup",
|
|
28
43
|
"runSnapshotCreate",
|
|
29
|
-
"Snapshot create module is unavailable; reinstall @sentry/junior and retry."
|
|
44
|
+
"Snapshot create module is unavailable; reinstall @sentry/junior and retry.",
|
|
30
45
|
);
|
|
31
46
|
await runSnapshotCreateFn();
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
async function runInit(dir) {
|
|
35
|
-
const runInitFn = await loadCliFunction(
|
|
50
|
+
const runInitFn = await loadCliFunction(
|
|
51
|
+
"init",
|
|
52
|
+
"runInit",
|
|
53
|
+
"Init module is unavailable; reinstall @sentry/junior and retry.",
|
|
54
|
+
);
|
|
36
55
|
await runInitFn(dir);
|
|
37
56
|
}
|
|
38
57
|
|
|
@@ -40,21 +59,22 @@ async function runCheck(dir) {
|
|
|
40
59
|
const runCheckFn = await loadCliFunction(
|
|
41
60
|
"check",
|
|
42
61
|
"runCheck",
|
|
43
|
-
"Check module is unavailable; reinstall @sentry/junior and retry."
|
|
62
|
+
"Check module is unavailable; reinstall @sentry/junior and retry.",
|
|
44
63
|
);
|
|
45
64
|
await runCheckFn(dir);
|
|
46
65
|
}
|
|
47
66
|
|
|
48
67
|
async function main() {
|
|
68
|
+
await loadCliEnvFiles();
|
|
49
69
|
const runCli = await loadCliFunction(
|
|
50
70
|
"run",
|
|
51
71
|
"runCli",
|
|
52
|
-
"CLI dispatcher module is unavailable; reinstall @sentry/junior and retry."
|
|
72
|
+
"CLI dispatcher module is unavailable; reinstall @sentry/junior and retry.",
|
|
53
73
|
);
|
|
54
74
|
const exitCode = await runCli(positionals, {
|
|
55
75
|
runInit,
|
|
56
76
|
runSnapshotCreate,
|
|
57
|
-
runCheck
|
|
77
|
+
runCheck,
|
|
58
78
|
});
|
|
59
79
|
if (exitCode !== 0) {
|
|
60
80
|
process.exit(exitCode);
|
|
@@ -243,6 +243,9 @@ function toOptionalTrimmed2(value) {
|
|
|
243
243
|
const trimmed = value.trim();
|
|
244
244
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
245
245
|
}
|
|
246
|
+
function isVercelRuntime() {
|
|
247
|
+
return process.env.VERCEL === "1" || Boolean(process.env.VERCEL_ENV) || Boolean(process.env.VERCEL_REGION) || Boolean(process.env.VERCEL_URL);
|
|
248
|
+
}
|
|
246
249
|
function getVercelSandboxCredentials() {
|
|
247
250
|
const token = toOptionalTrimmed2(process.env.VERCEL_TOKEN);
|
|
248
251
|
const teamId = toOptionalTrimmed2(process.env.VERCEL_TEAM_ID);
|
|
@@ -250,7 +253,7 @@ function getVercelSandboxCredentials() {
|
|
|
250
253
|
if (token && teamId && projectId) {
|
|
251
254
|
return { token, teamId, projectId };
|
|
252
255
|
}
|
|
253
|
-
if (toOptionalTrimmed2(process.env.VERCEL_OIDC_TOKEN)) {
|
|
256
|
+
if (toOptionalTrimmed2(process.env.VERCEL_OIDC_TOKEN) || isVercelRuntime()) {
|
|
254
257
|
return void 0;
|
|
255
258
|
}
|
|
256
259
|
if (token || teamId || projectId) {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { after } from "next/server";
|
|
13
13
|
import * as Sentry from "@sentry/nextjs";
|
|
14
14
|
async function loadBot() {
|
|
15
|
-
const { bot } = await import("./production-
|
|
15
|
+
const { bot } = await import("./production-H3THODDE.js");
|
|
16
16
|
return bot;
|
|
17
17
|
}
|
|
18
18
|
async function POST(request, context) {
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getThreadMessageTopic,
|
|
8
8
|
removeReactionFromMessage,
|
|
9
9
|
slackRuntime
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OPT4JB73.js";
|
|
11
11
|
import {
|
|
12
12
|
getConnectedStateContext,
|
|
13
13
|
getStateAdapter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7DAWPSTI.js";
|
|
15
15
|
import {
|
|
16
16
|
createRequestContext,
|
|
17
17
|
logError,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
POST
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-KZWHD5KH.js";
|
|
4
|
+
import "../chunk-OPT4JB73.js";
|
|
5
5
|
import "../chunk-VM3CPAZF.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-7DAWPSTI.js";
|
|
7
7
|
import "../chunk-ZBWWHP6Q.js";
|
|
8
8
|
import "../chunk-KCLEEKYX.js";
|
|
9
9
|
import "../chunk-ZW4OVKF5.js";
|
package/dist/handlers/router.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
POST as POST2
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-D4ULS2MW.js";
|
|
4
4
|
import {
|
|
5
5
|
POST
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-KZWHD5KH.js";
|
|
7
7
|
import {
|
|
8
8
|
buildConversationContext,
|
|
9
9
|
buildSlackOutputMessage,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
updateConversationStats,
|
|
32
32
|
uploadFilesToThread,
|
|
33
33
|
upsertConversationMessage
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-OPT4JB73.js";
|
|
35
35
|
import {
|
|
36
36
|
GET
|
|
37
37
|
} from "../chunk-4RBEYCOG.js";
|
|
@@ -39,7 +39,7 @@ import "../chunk-VM3CPAZF.js";
|
|
|
39
39
|
import {
|
|
40
40
|
botConfig,
|
|
41
41
|
getStateAdapter
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-7DAWPSTI.js";
|
|
43
43
|
import {
|
|
44
44
|
buildOAuthTokenRequest,
|
|
45
45
|
getPluginOAuthConfig,
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
bot,
|
|
3
3
|
createNormalizingStream,
|
|
4
4
|
slackRuntime
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OPT4JB73.js";
|
|
6
6
|
import "./chunk-VM3CPAZF.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-7DAWPSTI.js";
|
|
8
8
|
import "./chunk-ZBWWHP6Q.js";
|
|
9
9
|
import "./chunk-KCLEEKYX.js";
|
|
10
10
|
import "./chunk-ZW4OVKF5.js";
|