create-thally-docs 0.7.2 → 0.7.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.
package/README.md CHANGED
@@ -9,10 +9,12 @@ AI agents as structured JSON, JSON-LD, and Markdown from the same URL.
9
9
  ```bash
10
10
  npx create-thally-docs my-docs
11
11
  cd my-docs
12
+ npm install
12
13
  npm run dev
13
14
  ```
14
15
 
15
- Then open [http://localhost:3040](http://localhost:3040). A freshly scaffolded
16
+ The dev server starts at [http://localhost:3040](http://localhost:3040) and
17
+ automatically uses the next available port when needed. A freshly scaffolded
16
18
  site is agent-ready out of the box and scores 100/A on the built-in
17
19
  [Agent Readiness Score](https://github.com/thallylabs/thally).
18
20
 
@@ -22,6 +24,10 @@ Run non-interactively with smart defaults:
22
24
  npx create-thally-docs my-docs --yes
23
25
  ```
24
26
 
27
+ Dependency installation is deliberately opt-in so the scaffold finishes in
28
+ seconds. Pass `--install` to run it immediately, or `--no-install` to skip the
29
+ interactive question explicitly.
30
+
25
31
  ## What you get
26
32
 
27
33
  - **MDX content** in `src/content/`, navigation in `docs.json`
@@ -3,7 +3,7 @@ import {
3
3
  initGit,
4
4
  installDeps,
5
5
  scaffold
6
- } from "./chunk-KN6QUPKR.js";
6
+ } from "./chunk-WMVWYKAB.js";
7
7
 
8
8
  // src/migrate/index.ts
9
9
  import { mkdirSync as mkdirSync2, copyFileSync as copyFileSync2, readFileSync as readFileSync3, writeFileSync, existsSync as existsSync3, mkdtempSync, rmSync } from "fs";
@@ -494,7 +494,8 @@ npm install
494
494
  npm run dev
495
495
  \`\`\`
496
496
 
497
- Open [http://localhost:3040](http://localhost:3040).
497
+ The server starts at [http://localhost:3040](http://localhost:3040), or the next
498
+ available port when 3040 is already in use.
498
499
 
499
500
  ## Write your docs
500
501
 
@@ -687,7 +688,7 @@ function installDeps(targetDir) {
687
688
  console.log("");
688
689
  console.log(" \u{1F4E6} Installing dependencies...");
689
690
  console.log("");
690
- run("npm install", targetDir);
691
+ run("npm install --prefer-offline --no-audit --no-fund --progress=false", targetDir);
691
692
  }
692
693
  function logo() {
693
694
  console.log("");
@@ -700,12 +701,12 @@ function logo() {
700
701
  console.log(" \u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2551");
701
702
  console.log(" \u2551 \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u2551");
702
703
  console.log(" \u2551 \u2551");
703
- console.log(" \u2551 Beautiful docs, zero lock-in. \u2551");
704
+ console.log(" \u2551Give your product and docs first-class agent visibility.\u2551");
704
705
  console.log(" \u2551 \u2551");
705
706
  console.log(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D");
706
707
  console.log("");
707
708
  }
708
- function success(projectDir, projectName) {
709
+ function success(projectDir, projectName, dependenciesInstalled) {
709
710
  console.log("");
710
711
  console.log(" \u2705 Your Thally project is ready!");
711
712
  console.log("");
@@ -714,9 +715,12 @@ function success(projectDir, projectName) {
714
715
  console.log(" Next steps:");
715
716
  console.log("");
716
717
  console.log(` cd ${basename(projectDir)}`);
718
+ if (!dependenciesInstalled) {
719
+ console.log(" npm install");
720
+ }
717
721
  console.log(" npm run dev");
718
722
  console.log("");
719
- console.log(` Then open http://localhost:3040 to see your ${projectName} docs.`);
723
+ console.log(` Your terminal will print the local URL for your ${projectName} docs.`);
720
724
  console.log("");
721
725
  console.log(" \u{1F4DD} Key files to edit:");
722
726
  console.log(" \u2022 src/data/site.ts \u2014 name, links, branding");
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  migrateDocs,
4
4
  parseGitHubUrl
5
- } from "./chunk-QGRDDS5V.js";
5
+ } from "./chunk-PGTE4X3G.js";
6
6
  import {
7
7
  logo,
8
8
  readDocsJson,
@@ -10,7 +10,7 @@ import {
10
10
  slugify,
11
11
  success,
12
12
  writeDocsJson
13
- } from "./chunk-KN6QUPKR.js";
13
+ } from "./chunk-WMVWYKAB.js";
14
14
 
15
15
  // src/index.ts
16
16
  import { existsSync as existsSync3, readdirSync as readdirSync2 } from "fs";
@@ -20,7 +20,7 @@ import { resolve as resolve2 } from "path";
20
20
  import { input, select } from "@inquirer/prompts";
21
21
  import { basename } from "path";
22
22
  import { resolve } from "path";
23
- async function gatherAnswers(dirArg, useDefaults) {
23
+ async function gatherAnswers(dirArg, useDefaults, installPreference) {
24
24
  let projectDir;
25
25
  if (dirArg) {
26
26
  projectDir = resolve(dirArg);
@@ -71,13 +71,13 @@ async function gatherAnswers(dirArg, useDefaults) {
71
71
  else console.log(" \u26A0 No valid owner/repo entries \u2014 skipping Track (add it later with `thally track add`).");
72
72
  }
73
73
  }
74
- let doInstall = true;
75
- if (!useDefaults) {
74
+ let doInstall = installPreference ?? false;
75
+ if (!useDefaults && installPreference === void 0) {
76
76
  const shouldInstall = await input({
77
- message: " Install dependencies? (Y/n):",
78
- default: "Y"
77
+ message: " Install dependencies now? (y/N):",
78
+ default: "N"
79
79
  });
80
- doInstall = shouldInstall.toLowerCase() !== "n";
80
+ doInstall = shouldInstall.trim().toLowerCase().startsWith("y");
81
81
  }
82
82
  let i18nLocales;
83
83
  if (!useDefaults) {
@@ -682,10 +682,19 @@ async function runTranslateCommand(locale, pages, force, apiKey, model, yes, pro
682
682
  // src/index.ts
683
683
  var args = process.argv.slice(2);
684
684
  var flags = args.filter((a) => a.startsWith("-"));
685
+ var valueFlags = /* @__PURE__ */ new Set([
686
+ "--api-key",
687
+ "--branch",
688
+ "--docs-dir",
689
+ "--into",
690
+ "--locale",
691
+ "--model",
692
+ "--pages"
693
+ ]);
685
694
  var positional = [];
686
695
  for (let i = 0; i < args.length; i++) {
687
696
  if (args[i].startsWith("-")) {
688
- if (i + 1 < args.length && !args[i + 1].startsWith("-")) {
697
+ if (valueFlags.has(args[i]) && i + 1 < args.length && !args[i + 1].startsWith("-")) {
689
698
  i++;
690
699
  }
691
700
  } else {
@@ -754,6 +763,7 @@ async function runMigrateCommand() {
754
763
  }
755
764
  async function runScaffoldCommand() {
756
765
  const useDefaults = flags.includes("--yes") || flags.includes("-y");
766
+ const installPreference = flags.includes("--install") ? true : flags.includes("--no-install") ? false : void 0;
757
767
  const dirArg = positional[0];
758
768
  if (dirArg) {
759
769
  const resolved = resolve2(dirArg);
@@ -763,7 +773,7 @@ async function runScaffoldCommand() {
763
773
  process.exit(1);
764
774
  }
765
775
  }
766
- const answers = await gatherAnswers(dirArg, useDefaults);
776
+ const answers = await gatherAnswers(dirArg, useDefaults, installPreference);
767
777
  const result = await scaffold({
768
778
  projectDir: answers.projectDir,
769
779
  projectName: answers.projectName,
@@ -774,7 +784,7 @@ async function runScaffoldCommand() {
774
784
  i18nLocales: answers.i18nLocales,
775
785
  trackRepos: answers.trackRepos
776
786
  });
777
- success(result.projectDir, answers.projectName);
787
+ success(result.projectDir, answers.projectName, answers.doInstall);
778
788
  }
779
789
  async function runCheckCommand() {
780
790
  const projectDir = resolve2(positional[1] ?? ".");
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  migrateDocs
4
- } from "../chunk-QGRDDS5V.js";
5
- import "../chunk-KN6QUPKR.js";
4
+ } from "../chunk-PGTE4X3G.js";
5
+ import "../chunk-WMVWYKAB.js";
6
6
  export {
7
7
  migrateDocs
8
8
  };
package/dist/scaffold.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  scaffold
4
- } from "./chunk-KN6QUPKR.js";
4
+ } from "./chunk-WMVWYKAB.js";
5
5
  export {
6
6
  scaffold
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-thally-docs",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Scaffold a new Thally documentation project",
5
5
  "type": "module",
6
6
  "engines": {