@sentry/junior 0.3.0 → 0.4.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.
@@ -2,7 +2,7 @@ import {
2
2
  discoverInstalledPluginPackageContent,
3
3
  discoverNodeModulesDirs,
4
4
  isDirectory
5
- } from "./chunk-SP6LV35L.js";
5
+ } from "./chunk-Z5E25LRN.js";
6
6
 
7
7
  // src/next-config.ts
8
8
  import { createRequire } from "module";
@@ -21,12 +21,15 @@ function isPackageInstalled(cwd, packageName) {
21
21
  );
22
22
  }
23
23
  function applyJuniorConfig(nextConfig, options) {
24
- const existingServerRuntimeConfig = nextConfig?.serverRuntimeConfig ?? {};
24
+ const existingEnv = nextConfig?.env ?? {};
25
25
  const dataDir = options?.dataDir ?? "./app/data";
26
26
  const skillsDir = options?.skillsDir ?? "./app/skills";
27
27
  const pluginsDir = options?.pluginsDir ?? "./app/plugins";
28
28
  const configuredPluginPackages = unique(options?.pluginPackages ?? []);
29
- const discoveredPlugins = discoverInstalledPluginPackageContent(process.cwd(), { packageNames: configuredPluginPackages });
29
+ const discoveredPlugins = discoverInstalledPluginPackageContent(
30
+ process.cwd(),
31
+ { packageNames: configuredPluginPackages }
32
+ );
30
33
  const unresolvedConfiguredPackages = configuredPluginPackages.filter(
31
34
  (packageName) => !discoveredPlugins.packageNames.includes(packageName)
32
35
  );
@@ -48,37 +51,40 @@ function applyJuniorConfig(nextConfig, options) {
48
51
  }
49
52
  const defaultDataTracingIncludes = options?.dataDir ? [`${dataDir}/**/*`] : ["./app/SOUL.md", "./app/ABOUT.md"];
50
53
  const pluginPackageTracingIncludes = discoveredPlugins.tracingIncludes;
51
- const tracingIncludes = Array.from(/* @__PURE__ */ new Set([
52
- ...defaultDataTracingIncludes,
53
- `${skillsDir}/**/*`,
54
- `${pluginsDir}/**/*`,
55
- ...pluginPackageTracingIncludes
56
- ]));
54
+ const tracingIncludes = Array.from(
55
+ /* @__PURE__ */ new Set([
56
+ ...defaultDataTracingIncludes,
57
+ `${skillsDir}/**/*`,
58
+ `${pluginsDir}/**/*`,
59
+ ...pluginPackageTracingIncludes
60
+ ])
61
+ );
57
62
  const existingGlobalTracingIncludes = nextConfig?.outputFileTracingIncludes?.["/*"] ?? [];
58
- const mergedGlobalTracingIncludes = Array.from(/* @__PURE__ */ new Set([
59
- ...existingGlobalTracingIncludes,
60
- ...tracingIncludes
61
- ]));
63
+ const mergedGlobalTracingIncludes = Array.from(
64
+ /* @__PURE__ */ new Set([...existingGlobalTracingIncludes, ...tracingIncludes])
65
+ );
62
66
  const config = {
63
67
  ...nextConfig,
64
- serverExternalPackages: Array.from(/* @__PURE__ */ new Set([
65
- ...nextConfig?.serverExternalPackages ?? [],
66
- "@vercel/queue",
67
- "@vercel/sandbox",
68
- "bash-tool",
69
- "just-bash",
70
- "@mariozechner/pi-agent-core",
71
- "@mariozechner/pi-ai",
72
- "@chat-adapter/slack",
73
- "@slack/web-api"
74
- ])),
68
+ serverExternalPackages: Array.from(
69
+ /* @__PURE__ */ new Set([
70
+ ...nextConfig?.serverExternalPackages ?? [],
71
+ "@vercel/queue",
72
+ "@vercel/sandbox",
73
+ "bash-tool",
74
+ "just-bash",
75
+ "@mariozechner/pi-agent-core",
76
+ "@mariozechner/pi-ai",
77
+ "@chat-adapter/slack",
78
+ "@slack/web-api"
79
+ ])
80
+ ),
75
81
  outputFileTracingIncludes: {
76
82
  ...nextConfig?.outputFileTracingIncludes,
77
83
  "/*": mergedGlobalTracingIncludes
78
84
  },
79
- serverRuntimeConfig: {
80
- ...existingServerRuntimeConfig,
81
- juniorPluginPackages: configuredPluginPackages
85
+ env: {
86
+ ...existingEnv,
87
+ JUNIOR_PLUGIN_PACKAGES: JSON.stringify(configuredPluginPackages)
82
88
  }
83
89
  };
84
90
  if (!sentryConfigured()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"