@dansyuqri/spark-joy 0.1.4 → 0.1.5

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.
@@ -5,8 +5,8 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>spark-joy review</title>
7
7
  <link rel="icon" href="./favicon.svg" type="image/svg+xml" />
8
- <script type="module" crossorigin src="/assets/index-1qEXDj-s.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DyYm7_iM.css">
8
+ <script type="module" crossorigin src="/assets/index-XTDapI2X.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-BRFjS_MK.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/dist/cli.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // cli/index.ts
2
- import { copyFile, mkdir as mkdir3, readFile as readFile3, writeFile as writeFile3 } from "node:fs/promises";
3
- import { homedir } from "node:os";
4
- import { join as join3 } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
- import { parseArgs } from "node:util";
2
+ import { copyFile, mkdir as mkdir3, readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
3
+ import { homedir } from "os";
4
+ import { join as join3 } from "path";
5
+ import { fileURLToPath } from "url";
6
+ import { parseArgs } from "util";
7
7
 
8
8
  // shared/schema.ts
9
9
  import { z } from "zod";
@@ -298,8 +298,8 @@ function validatePlan(raw, hunks, budget = CHUNK_LINE_BUDGET) {
298
298
  }
299
299
 
300
300
  // cli/lib/extract.ts
301
- import { createHash } from "node:crypto";
302
- import { mkdir as mkdir2 } from "node:fs/promises";
301
+ import { createHash } from "crypto";
302
+ import { mkdir as mkdir2 } from "fs/promises";
303
303
 
304
304
  // cli/lib/diff.ts
305
305
  var HUNK_RE = /^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;
@@ -417,7 +417,7 @@ function parseDiff(text) {
417
417
  }
418
418
 
419
419
  // cli/lib/classify.ts
420
- import { basename } from "node:path";
420
+ import { basename } from "path";
421
421
  var LOCKFILES = /* @__PURE__ */ new Set([
422
422
  "package-lock.json",
423
423
  "npm-shrinkwrap.json",
@@ -556,7 +556,7 @@ function splitHunk(h, threshold = SPLIT_THRESHOLD) {
556
556
  }
557
557
 
558
558
  // cli/lib/symbols.ts
559
- import { basename as basename2, dirname, extname } from "node:path";
559
+ import { basename as basename2, dirname, extname } from "path";
560
560
  var DECLS = [
561
561
  /\b(?:function\*?|class|interface|type|enum|def|fn|struct|trait|func|module|object|record)\s+([A-Za-z_$][\w$]*)/g,
562
562
  /\bfunc\s+\([^)]*\)\s*([A-Za-z_]\w*)/g
@@ -643,8 +643,8 @@ function computeLinks(hunks) {
643
643
  }
644
644
 
645
645
  // cli/lib/git.ts
646
- import { execFile } from "node:child_process";
647
- import { promisify } from "node:util";
646
+ import { execFile } from "child_process";
647
+ import { promisify } from "util";
648
648
  var exec = promisify(execFile);
649
649
  async function git(cwd, args, input) {
650
650
  const child = exec("git", ["-c", "core.quotePath=false", ...args], {
@@ -711,8 +711,8 @@ async function generatedByAttr(cwd, files) {
711
711
  }
712
712
 
713
713
  // cli/lib/runs.ts
714
- import { mkdir, readFile, readdir, rename, stat, writeFile } from "node:fs/promises";
715
- import { join } from "node:path";
714
+ import { mkdir, readFile, readdir, rename, stat, writeFile } from "fs/promises";
715
+ import { join } from "path";
716
716
  import { z as z2 } from "zod";
717
717
  var RUNS_DIR = ".spark-joy";
718
718
  var slug = (s) => s.replace(/[^A-Za-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "run";
@@ -1010,9 +1010,9 @@ function formatLinks(hunks, links) {
1010
1010
  }
1011
1011
 
1012
1012
  // cli/lib/server.ts
1013
- import { createServer } from "node:http";
1014
- import { readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
1015
- import { extname as extname2, join as join2, normalize, sep } from "node:path";
1013
+ import { createServer } from "http";
1014
+ import { readFile as readFile2, writeFile as writeFile2 } from "fs/promises";
1015
+ import { extname as extname2, join as join2, normalize, sep } from "path";
1016
1016
  var TYPES = {
1017
1017
  ".html": "text/html; charset=utf-8",
1018
1018
  ".js": "text/javascript; charset=utf-8",
@@ -1254,7 +1254,7 @@ async function main(argv, cwd = process.cwd()) {
1254
1254
  case "install-skill": {
1255
1255
  const dir = values.project ? join3(await repoRoot(cwd), ".claude", "skills", "spark-joy") : join3(homedir(), ".claude", "skills", "spark-joy");
1256
1256
  await mkdir3(dir, { recursive: true });
1257
- await copyFile(join3(PKG_ROOT, "skill", "SKILL.md"), join3(dir, "SKILL.md"));
1257
+ await copyFile(join3(PKG_ROOT, "plugin", "skills", "spark-joy", "SKILL.md"), join3(dir, "SKILL.md"));
1258
1258
  console.log(`installed skill to ${dir}; use /spark-joy in Claude Code`);
1259
1259
  return 0;
1260
1260
  }