@evandu/super-pi 0.1.286 → 0.1.287

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.
@@ -8,9 +8,9 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" />
9
9
  <link rel="apple-touch-icon" href="/favicon.svg" />
10
10
  <title>Super Pi</title>
11
- <script type="module" crossorigin src="/assets/index-DeiYOY_X.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-CKY1fvxA.js"></script>
12
12
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
13
- <link rel="stylesheet" crossorigin href="/assets/index-BDvXKGtD.css">
13
+ <link rel="stylesheet" crossorigin href="/assets/index-BP7k53q-.css">
14
14
  </head>
15
15
  <body>
16
16
  <div id="root"></div>
@@ -36,7 +36,7 @@ export async function gitStatus(root, cwd = "") {
36
36
  const repoRoot = await worktreeRoot(root);
37
37
  const scope = relative(repoRoot, resolve(root, cwd)).split(sep).join("/");
38
38
  const [status, branch, hasHead, counts] = await Promise.all([
39
- git(root, ["status", "--porcelain=v1", "-z", ...(scope ? ["--", cwd || "."] : [])]),
39
+ git(root, ["status", "--porcelain=v1", "--untracked-files=all", "-z", ...(scope ? ["--", cwd || "."] : [])], { maxBuffer: 32 * 1024 * 1024 }),
40
40
  git(root, ["symbolic-ref", "--short", "-q", "HEAD"]).then(result => result.stdout.trim() || null).catch(() => null),
41
41
  git(root, ["rev-parse", "--verify", "HEAD"]).then(() => true).catch(() => false),
42
42
  git(root, ["rev-list", "--left-right", "--count", "HEAD...@{upstream}"])
@@ -1,4 +1,4 @@
1
- export declare const SOURCE_LINK_GUIDANCE = "When referencing code locations, use Markdown links with paths relative to your working directory and a line fragment, such as [`function_name`](./src/example.cpp#L397). Do not prefix them with a localhost URL.";
1
+ export declare const SOURCE_LINK_GUIDANCE = "When referencing code locations, use Markdown links with paths relative to your working directory and a line fragment, such as [`function_name`](./src/example.cpp#L397). For documents and artifacts, use a relative file link without requiring a line number, such as [report](./artifacts/report.md). Do not prefix local file links with a localhost URL.";
2
2
  type Position = {
3
3
  path: string;
4
4
  line: number;
@@ -1,12 +1,14 @@
1
- export const SOURCE_LINK_GUIDANCE = "When referencing code locations, use Markdown links with paths relative to your working directory and a line fragment, such as [`function_name`](./src/example.cpp#L397). Do not prefix them with a localhost URL.";
1
+ export const SOURCE_LINK_GUIDANCE = "When referencing code locations, use Markdown links with paths relative to your working directory and a line fragment, such as [`function_name`](./src/example.cpp#L397). For documents and artifacts, use a relative file link without requiring a line number, such as [report](./artifacts/report.md). Do not prefix local file links with a localhost URL.";
2
2
  function position(value) {
3
3
  // Managed presentations are artifacts, not code locations, but use the same scoped opener.
4
- const artifact = sourcePath(value);
5
- if (artifact && /\.pptx$/i.test(artifact))
4
+ const filePath = sourcePath(value);
5
+ if (filePath && /\.pptx$/i.test(filePath))
6
6
  return { path: value, line: 1, artifact: true };
7
7
  const marker = /#L([1-9]\d*)(?:C([1-9]\d*))?(?:-L?[1-9]\d*)?$/i.exec(value)
8
8
  ?? /:([1-9]\d*)(?::([1-9]\d*))?$/.exec(value);
9
- if (!marker || marker.index === 0)
9
+ if (!marker)
10
+ return filePath ? { path: value, line: 1 } : undefined;
11
+ if (marker.index === 0)
10
12
  return;
11
13
  const line = Number(marker[1]), column = marker[2] ? Number(marker[2]) : undefined;
12
14
  if (!Number.isSafeInteger(line) || (column !== undefined && !Number.isSafeInteger(column)))
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "superPi": {
4
4
  "managedDirectListener": true
5
5
  },
6
- "version": "0.1.286",
6
+ "version": "0.1.287",
7
7
  "description": "Web control plane and companion for Pi",
8
8
  "license": "MIT",
9
9
  "type": "module",