@sentry/junior 0.9.2 → 0.9.4
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/{chunk-OPT4JB73.js → chunk-FLP5I4NM.js} +253 -289
- package/dist/{chunk-7DAWPSTI.js → chunk-FS5Y4CF2.js} +19 -34
- package/dist/{chunk-ZBWWHP6Q.js → chunk-MY7JNCS2.js} +862 -5
- package/dist/{chunk-D4ULS2MW.js → chunk-SO4ORZJR.js} +5 -6
- package/dist/{chunk-VM3CPAZF.js → chunk-WM66QDLA.js} +4 -6
- package/dist/{chunk-KZWHD5KH.js → chunk-YGERYE7Y.js} +15 -8
- package/dist/cli/check.js +2 -3
- package/dist/cli/env.d.ts +7 -0
- package/dist/cli/env.js +54 -0
- package/dist/cli/snapshot-warmup.js +2 -3
- package/dist/handlers/queue-callback.js +5 -6
- package/dist/handlers/router.js +12 -14
- package/dist/handlers/webhooks.js +6 -2
- package/package.json +1 -1
- package/dist/chunk-ZW4OVKF5.js +0 -864
- package/dist/production-H3THODDE.js +0 -15
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPluginRuntimeDependencies,
|
|
3
|
-
getPluginRuntimePostinstall
|
|
4
|
-
} from "./chunk-ZBWWHP6Q.js";
|
|
5
|
-
import {
|
|
3
|
+
getPluginRuntimePostinstall,
|
|
6
4
|
withSpan
|
|
7
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MY7JNCS2.js";
|
|
6
|
+
|
|
7
|
+
// src/chat/state/adapter.ts
|
|
8
|
+
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
9
|
+
import { createRedisState } from "@chat-adapter/state-redis";
|
|
10
|
+
|
|
11
|
+
// src/chat/optional-string.ts
|
|
12
|
+
function toOptionalTrimmed(value) {
|
|
13
|
+
if (!value) {
|
|
14
|
+
return void 0;
|
|
15
|
+
}
|
|
16
|
+
const trimmed = value.trim();
|
|
17
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
18
|
+
}
|
|
8
19
|
|
|
9
20
|
// src/chat/config.ts
|
|
10
21
|
var MIN_AGENT_TURN_TIMEOUT_MS = 10 * 1e3;
|
|
@@ -35,13 +46,6 @@ function resolveMaxTurnTimeoutMs(queueCallbackMaxDurationSeconds) {
|
|
|
35
46
|
const budgetSeconds = queueCallbackMaxDurationSeconds - TURN_TIMEOUT_BUFFER_SECONDS;
|
|
36
47
|
return Math.max(MIN_AGENT_TURN_TIMEOUT_MS, budgetSeconds * 1e3);
|
|
37
48
|
}
|
|
38
|
-
function toOptionalTrimmed(value) {
|
|
39
|
-
if (!value) {
|
|
40
|
-
return void 0;
|
|
41
|
-
}
|
|
42
|
-
const trimmed = value.trim();
|
|
43
|
-
return trimmed.length > 0 ? trimmed : void 0;
|
|
44
|
-
}
|
|
45
49
|
function readBotConfig(env) {
|
|
46
50
|
const queueCallbackMaxDurationSeconds = resolveQueueCallbackMaxDurationSeconds(env);
|
|
47
51
|
const maxTurnTimeoutMs = resolveMaxTurnTimeoutMs(
|
|
@@ -99,8 +103,6 @@ function getRuntimeMetadata() {
|
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
// src/chat/state/adapter.ts
|
|
102
|
-
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
103
|
-
import { createRedisState } from "@chat-adapter/state-redis";
|
|
104
106
|
var MIN_LOCK_TTL_MS = 1e3 * 60 * 5;
|
|
105
107
|
var stateAdapter;
|
|
106
108
|
var redisStateAdapter;
|
|
@@ -236,31 +238,13 @@ async function runNonInteractiveCommand(runner, input) {
|
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
// src/chat/sandbox/credentials.ts
|
|
239
|
-
function toOptionalTrimmed2(value) {
|
|
240
|
-
if (!value) {
|
|
241
|
-
return void 0;
|
|
242
|
-
}
|
|
243
|
-
const trimmed = value.trim();
|
|
244
|
-
return trimmed.length > 0 ? trimmed : void 0;
|
|
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
|
-
}
|
|
249
241
|
function getVercelSandboxCredentials() {
|
|
250
|
-
const token =
|
|
251
|
-
const teamId =
|
|
252
|
-
const projectId =
|
|
242
|
+
const token = toOptionalTrimmed(process.env.VERCEL_TOKEN);
|
|
243
|
+
const teamId = toOptionalTrimmed(process.env.VERCEL_TEAM_ID);
|
|
244
|
+
const projectId = toOptionalTrimmed(process.env.VERCEL_PROJECT_ID);
|
|
253
245
|
if (token && teamId && projectId) {
|
|
254
246
|
return { token, teamId, projectId };
|
|
255
247
|
}
|
|
256
|
-
if (toOptionalTrimmed2(process.env.VERCEL_OIDC_TOKEN) || isVercelRuntime()) {
|
|
257
|
-
return void 0;
|
|
258
|
-
}
|
|
259
|
-
if (token || teamId || projectId) {
|
|
260
|
-
throw new Error(
|
|
261
|
-
"Missing Vercel Sandbox credentials: set VERCEL_TOKEN, VERCEL_TEAM_ID, and VERCEL_PROJECT_ID together, or provide VERCEL_OIDC_TOKEN."
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
248
|
return void 0;
|
|
265
249
|
}
|
|
266
250
|
|
|
@@ -821,6 +805,7 @@ function isSnapshotMissingError(error) {
|
|
|
821
805
|
}
|
|
822
806
|
|
|
823
807
|
export {
|
|
808
|
+
toOptionalTrimmed,
|
|
824
809
|
botConfig,
|
|
825
810
|
getSlackBotToken,
|
|
826
811
|
getSlackSigningSecret,
|