@gitpagedocs/cli 1.1.45 → 1.1.48

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/index.mjs +13 -1
  2. package/package.json +60 -60
package/index.mjs CHANGED
@@ -8,9 +8,21 @@ const scriptPath = fileURLToPath(import.meta.url);
8
8
  const scriptDir = path.dirname(scriptPath);
9
9
  const tsEntry = path.join(scriptDir, "presentation", "index.ts");
10
10
 
11
+ // Resolve tsx from THIS package's location, not the user's cwd. `node --import
12
+ // tsx` would otherwise resolve the bare "tsx" specifier relative to the current
13
+ // working directory, which fails when the CLI is installed globally and run
14
+ // from a project that doesn't depend on tsx (ERR_MODULE_NOT_FOUND 'tsx').
15
+ let tsxLoader = "tsx";
16
+ try {
17
+ tsxLoader = import.meta.resolve("tsx");
18
+ } catch {
19
+ // Older Node without a stable import.meta.resolve — fall back to the bare
20
+ // specifier (works when tsx is resolvable from the cwd or globally).
21
+ }
22
+
11
23
  const result = spawnSync(
12
24
  process.execPath,
13
- ["--import", "tsx", tsEntry, ...process.argv.slice(2)],
25
+ ["--import", tsxLoader, tsEntry, ...process.argv.slice(2)],
14
26
  {
15
27
  stdio: "inherit",
16
28
  cwd: process.cwd(),
package/package.json CHANGED
@@ -1,60 +1,60 @@
1
- {
2
- "name": "@gitpagedocs/cli",
3
- "version": "1.1.45",
4
- "description": "CLI that scaffolds and maintains gitpagedocs documentation, generates docs with AI, configures GitHub Pages, and runs the MCP server.",
5
- "bin": {
6
- "gitpagedocs": "index.mjs"
7
- },
8
- "main": "index.mjs",
9
- "files": [
10
- "index.mjs",
11
- "start.mjs",
12
- "ai",
13
- "application",
14
- "builders",
15
- "content",
16
- "contracts",
17
- "data",
18
- "domain",
19
- "home",
20
- "infrastructure",
21
- "presentation",
22
- "runtime",
23
- "ui",
24
- "prebuilt",
25
- "README.md"
26
- ],
27
- "engines": {
28
- "node": ">=20"
29
- },
30
- "dependencies": {
31
- "@clack/prompts": "^1.5.1",
32
- "@gitpagedocs/mcp": "workspace:*",
33
- "@gitpagedocs/tools": "workspace:*",
34
- "tsx": "^4.21.0"
35
- },
36
- "repository": {
37
- "type": "git",
38
- "url": "git+https://github.com/Vidigal-code/git-page-docs.git",
39
- "directory": "cli"
40
- },
41
- "keywords": [
42
- "gitpagedocs",
43
- "documentation",
44
- "markdown",
45
- "spa",
46
- "cli",
47
- "github-pages",
48
- "create-gitpagedocs"
49
- ],
50
- "author": "Vidigal-code",
51
- "license": "ISC",
52
- "bugs": {
53
- "url": "https://github.com/Vidigal-code/git-page-docs/issues"
54
- },
55
- "homepage": "https://vidigal-code.github.io/git-page-docs/",
56
- "publishConfig": {
57
- "registry": "https://registry.npmjs.org/",
58
- "access": "public"
59
- }
60
- }
1
+ {
2
+ "name": "@gitpagedocs/cli",
3
+ "version": "1.1.48",
4
+ "description": "CLI that scaffolds and maintains gitpagedocs documentation, generates docs with AI, configures GitHub Pages, and runs the MCP server.",
5
+ "bin": {
6
+ "gitpagedocs": "index.mjs"
7
+ },
8
+ "main": "index.mjs",
9
+ "files": [
10
+ "index.mjs",
11
+ "start.mjs",
12
+ "ai",
13
+ "application",
14
+ "builders",
15
+ "content",
16
+ "contracts",
17
+ "data",
18
+ "domain",
19
+ "home",
20
+ "infrastructure",
21
+ "presentation",
22
+ "runtime",
23
+ "ui",
24
+ "prebuilt",
25
+ "README.md"
26
+ ],
27
+ "engines": {
28
+ "node": ">=20"
29
+ },
30
+ "dependencies": {
31
+ "@clack/prompts": "^1.5.1",
32
+ "@gitpagedocs/mcp": "^1.1.48",
33
+ "@gitpagedocs/tools": "^1.1.48",
34
+ "tsx": "^4.21.0"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/Vidigal-code/git-page-docs.git",
39
+ "directory": "cli"
40
+ },
41
+ "keywords": [
42
+ "gitpagedocs",
43
+ "documentation",
44
+ "markdown",
45
+ "spa",
46
+ "cli",
47
+ "github-pages",
48
+ "create-gitpagedocs"
49
+ ],
50
+ "author": "Vidigal-code",
51
+ "license": "ISC",
52
+ "bugs": {
53
+ "url": "https://github.com/Vidigal-code/git-page-docs/issues"
54
+ },
55
+ "homepage": "https://vidigal-code.github.io/git-page-docs/",
56
+ "publishConfig": {
57
+ "registry": "https://registry.npmjs.org/",
58
+ "access": "public"
59
+ }
60
+ }