rulebookguard 0.3.0 → 0.3.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/cli.mjs CHANGED
@@ -80,7 +80,7 @@ function render(path, rules, text) {
80
80
  return parts.join("\n\n");
81
81
  }
82
82
  // package.json
83
- var version = "0.3.0";
83
+ var version = "0.3.1";
84
84
  // src/mcp/server.ts
85
85
  function createRulesServer(projectDir) {
86
86
  const server = new McpServer({
@@ -425,7 +425,7 @@ async function dispatch(argv, io) {
425
425
  return 0;
426
426
  }
427
427
  if (name === "site") {
428
- const { siteCommand } = await import("./site-DYOm-dEC.mjs");
428
+ const { siteCommand } = await import("./site-DDM1Hs0N.mjs");
429
429
  await siteCommand(io, {
430
430
  out: values.out,
431
431
  base: values.base
@@ -466,10 +466,13 @@ async function buildWithAstro(work) {
466
466
  });
467
467
  } catch (error) {
468
468
  const { stderr, stdout } = error;
469
- const detail = `${stderr ?? ""}${stdout ?? ""}`.trim().split("\n").slice(-5).join("\n");
470
- throw new CliError(`The site build failed:\n${detail}`);
469
+ throw new CliError(`The site build failed:\n${astroFailureDetail(`${stderr ?? ""}${stdout ?? ""}`)}`);
471
470
  }
472
471
  }
472
+ /** The first lines of Astro's error output, without its stack trace. */
473
+ function astroFailureDetail(output) {
474
+ return output.split("\n").filter((line) => !/^\s*at /.test(line) && !/^\s*Stack trace:/.test(line)).filter((line) => line.trim() !== "").slice(0, 12).join("\n");
475
+ }
473
476
  function astroConfig(title, language, base, sidebar) {
474
477
  return `import starlight from '@astrojs/starlight';
475
478
  import { defineConfig } from 'astro/config';
@@ -478,6 +481,9 @@ export default defineConfig({
478
481
  base: ${JSON.stringify(base)},
479
482
  outDir: './dist',
480
483
  cacheDir: './.astro-cache',
484
+ // Bundle the prerender dependencies: left external, Node resolves them from this project, where a package manager
485
+ // may have hoisted other versions (pnpm's node_modules/.pnpm/node_modules) ahead of the ones Astro depends on.
486
+ vite: { environments: { prerender: { resolve: { noExternal: true } } } },
481
487
  integrations: [
482
488
  starlight({
483
489
  title: ${JSON.stringify(title)},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulebookguard",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Keep business rules as the single source of truth, bound to code and tests.",
5
5
  "homepage": "https://github.com/JuanCJR/rulebookguard#readme",
6
6
  "bugs": {