packmd 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -11
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import ora from "ora";
14
14
  // package.json
15
15
  var name = "packmd";
16
16
  var description = "Convert GitHub repositories and webpages into AI-ready Markdown digests";
17
- var version = "1.0.1";
17
+ var version = "1.0.3";
18
18
 
19
19
  // src/utils/version-check.ts
20
20
  import fs from "fs/promises";
@@ -282,8 +282,17 @@ async function promptGithubOptions(currentOptions) {
282
282
 
283
283
  // src/actions/run.ts
284
284
  async function runAction(target, options) {
285
- console.log("");
286
- console.log(color2.cyan(`${name} \u2014 AI Markdown Packager`));
285
+ const asciiText = `
286
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
287
+ \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
288
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
289
+ \u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
290
+ \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
291
+ \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D
292
+ `;
293
+ console.log(color2.cyanBright(asciiText));
294
+ console.log(color2.dim(` ${name} v${version} \u2014 AI Markdown Packager
295
+ `));
287
296
  const updateCheck = checkForUpdate(version).catch(() => null);
288
297
  let finalOptions = { ...options };
289
298
  try {
@@ -343,6 +352,7 @@ async function runAction(target, options) {
343
352
  }
344
353
  }
345
354
  await fs4.writeFile(finalPath, digest, { encoding: "utf-8", flag: "w" });
355
+ spinner.succeed("Markdown generated successfully!");
346
356
  const gitignorePath = path5.join(process.cwd(), ".gitignore");
347
357
  let gitignoreContent = "";
348
358
  try {
@@ -351,14 +361,22 @@ async function runAction(target, options) {
351
361
  }
352
362
  const isIgnored = gitignoreContent.split("\n").map((line) => line.trim()).includes(finalPath);
353
363
  if (!isIgnored) {
354
- const prefix = gitignoreContent.endsWith("\n") || gitignoreContent === "" ? "" : "\n";
355
- await fs4.appendFile(gitignorePath, `${prefix}${finalPath}
364
+ const { addToGitignore } = await inquirer2.prompt([
365
+ {
366
+ type: "confirm",
367
+ name: "addToGitignore",
368
+ message: `Would you like to add ${color2.cyan(finalPath)} to your .gitignore?`,
369
+ default: true
370
+ }
371
+ ]);
372
+ if (addToGitignore) {
373
+ const prefix = gitignoreContent.endsWith("\n") || gitignoreContent === "" ? "" : "\n";
374
+ await fs4.appendFile(gitignorePath, `${prefix}${finalPath}
356
375
  `, "utf-8");
357
- spinner.succeed(
358
- `Generated successfully! ${color2.cyan(finalPath)} was added to .gitignore.`
359
- );
360
- } else {
361
- spinner.succeed("Markdown generated successfully!");
376
+ console.log(
377
+ color2.green("\u2714 ") + color2.cyan(finalPath) + color2.white(" is now safely hidden in .gitignore \u{1F512}")
378
+ );
379
+ }
362
380
  }
363
381
  }
364
382
  if (finalOptions.copy) {
@@ -367,7 +385,6 @@ async function runAction(target, options) {
367
385
  }
368
386
  const latestVersion = await updateCheck;
369
387
  if (latestVersion) printUpdateNotice(version, latestVersion);
370
- console.log("");
371
388
  } catch (error) {
372
389
  console.error(
373
390
  color2.red(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "packmd",
3
3
  "description": "Convert GitHub repositories and webpages into AI-ready Markdown digests",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "bin": {
@@ -29,6 +29,7 @@
29
29
  "typescript": "^5"
30
30
  },
31
31
  "dependencies": {
32
+ "@packmd/core": "^1.0.0",
32
33
  "chalk": "^5.6.2",
33
34
  "clipboardy": "^5.3.2",
34
35
  "commander": "^15.0.0",
@@ -36,7 +37,6 @@
36
37
  "inquirer": "^14.0.2",
37
38
  "minimatch": "^10.2.5",
38
39
  "ora": "^9.4.1",
39
- "@packmd/core": "^1.0.0",
40
40
  "picocolors": "^1.1.1"
41
41
  },
42
42
  "keywords": [
@@ -63,4 +63,4 @@
63
63
  "url": "https://github.com/thelastofinusa/packmd/issues"
64
64
  },
65
65
  "homepage": "https://packmd.vercel.app/docs"
66
- }
66
+ }