reporeadmerewriter 1.0.0
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 +92 -0
- package/bin/RepoReadmeRewriterOptions.d.ts +12 -0
- package/bin/RepoReadmeRewriterOptions.js +4 -0
- package/bin/cli/AngleSharp.dll +0 -0
- package/bin/cli/DotnetToolSettings.xml +6 -0
- package/bin/cli/Markdig.dll +0 -0
- package/bin/cli/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
- package/bin/cli/Microsoft.Extensions.DependencyInjection.dll +0 -0
- package/bin/cli/ReadmeRewriterCLI.deps.json +180 -0
- package/bin/cli/ReadmeRewriterCLI.dll +0 -0
- package/bin/cli/ReadmeRewriterCLI.pdb +0 -0
- package/bin/cli/ReadmeRewriterCLI.runtimeconfig.json +13 -0
- package/bin/cli/RepoReadmeRewriter.dll +0 -0
- package/bin/cli/RepoReadmeRewriter.pdb +0 -0
- package/bin/cli/Spectre.Console.dll +0 -0
- package/bin/cli/System.CommandLine.dll +0 -0
- package/bin/cli/cs/System.CommandLine.resources.dll +0 -0
- package/bin/cli/de/System.CommandLine.resources.dll +0 -0
- package/bin/cli/es/System.CommandLine.resources.dll +0 -0
- package/bin/cli/fr/System.CommandLine.resources.dll +0 -0
- package/bin/cli/it/System.CommandLine.resources.dll +0 -0
- package/bin/cli/ja/System.CommandLine.resources.dll +0 -0
- package/bin/cli/ko/System.CommandLine.resources.dll +0 -0
- package/bin/cli/pl/System.CommandLine.resources.dll +0 -0
- package/bin/cli/pt-BR/System.CommandLine.resources.dll +0 -0
- package/bin/cli/ru/System.CommandLine.resources.dll +0 -0
- package/bin/cli/tr/System.CommandLine.resources.dll +0 -0
- package/bin/cli/zh-Hans/System.CommandLine.resources.dll +0 -0
- package/bin/cli/zh-Hant/System.CommandLine.resources.dll +0 -0
- package/bin/findPackageJson.d.ts +6 -0
- package/bin/findPackageJson.js +46 -0
- package/bin/findPackageJsonPath.d.ts +1 -0
- package/bin/findPackageJsonPath.js +52 -0
- package/bin/getCLIArgs.d.ts +1 -0
- package/bin/getCLIArgs.js +8 -0
- package/bin/getCLIArgsFromJson.d.ts +2 -0
- package/bin/getCLIArgsFromJson.js +26 -0
- package/bin/getCLIArgsFromPackageOptions.d.ts +7 -0
- package/bin/getCLIArgsFromPackageOptions.js +31 -0
- package/bin/getHelpCLIArgs.d.ts +1 -0
- package/bin/getHelpCLIArgs.js +11 -0
- package/bin/getOptionsFromConfig.d.ts +3 -0
- package/bin/getOptionsFromConfig.js +54 -0
- package/bin/index.d.ts +2 -0
- package/bin/index.js +4 -0
- package/bin/loadAndParseConfigFile.d.ts +1 -0
- package/bin/loadAndParseConfigFile.js +60 -0
- package/bin/repoRepoReadmeRewrite.d.ts +1 -0
- package/bin/repoRepoReadmeRewrite.js +29 -0
- package/bin/resolveRepositoryUrl.d.ts +6 -0
- package/bin/resolveRepositoryUrl.js +27 -0
- package/bin/rewriter.d.ts +2 -0
- package/bin/rewriter.js +11 -0
- package/bin/runProcessArgs.d.ts +1 -0
- package/bin/runProcessArgs.js +15 -0
- package/package.json +58 -0
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# RepoReadmeRewriter (npm)
|
|
2
|
+
|
|
3
|
+
RepoReadmeRewriter packages the existing [.NET ReadmeRewriter CLI](https://www.nuget.org/packages/RepoReadmeRewriter.CLI) as an npm module so it can be driven directly from JavaScript tooling. It rewrites README content by turning repository-relative links and images into absolute URLs and offers several cleanup utilities that the underlying CLI already supports.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Node.js (18 or newer recommended)
|
|
8
|
+
- The .NET runtime available on your PATH (the CLI runs as `dotnet ReadmeRewriterCLI.dll`). You can verify with `dotnet --info`.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install --save-dev reporeadmerewriter
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
After installation you can invoke the binary with npm scripts, `npx`, or the per-project shim under `node_modules/.bin/reporeadmerewriter`.
|
|
17
|
+
|
|
18
|
+
## Configuration and option resolution
|
|
19
|
+
|
|
20
|
+
RepoReadmeRewriter operates relative to the directory you execute it from (the .NET tool defaults to the current working directory). Relative paths for `readme`, `output`, `config` are resolved against that folder.
|
|
21
|
+
|
|
22
|
+
RepoReadmeRewriter resolves CLI arguments for you before spawning the .NET executable. Resolution happens in the following order:
|
|
23
|
+
|
|
24
|
+
1. Look for a `repoReadmeRewriter` block inside the nearest `package.json`.
|
|
25
|
+
2. If that block is missing we try `repoReadmeRewriter.config.json` next to the same `package.json`.
|
|
26
|
+
|
|
27
|
+
If neither source is found the command exits with an error explaining that no configuration was detected.
|
|
28
|
+
|
|
29
|
+
The configuration object maps directly to CLI switches. Each camelCase property becomes a `--kebab-case` flag when passed to the executable (for example `repoUrl` becomes `--repo-url`). Refer to `reporeadmerewriter --help` for the authoritative meaning of each option exposed by the .NET tool.
|
|
30
|
+
|
|
31
|
+
### Minimal examples
|
|
32
|
+
|
|
33
|
+
`package.json`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"name": "example",
|
|
38
|
+
"repoReadmeRewriter": {
|
|
39
|
+
"repoUrl": "https://github.com/owner/repo",
|
|
40
|
+
"ref": "main",
|
|
41
|
+
"output": "OUTPUT.md"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`repoReadmeRewriter.config.json` (same directory as `package.json`):
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"repoUrl": "https://github.com/owner/repo",
|
|
51
|
+
"ref": "main",
|
|
52
|
+
"output": "OUTPUT.md"
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If `repoUrl` is omitted we fall back to the repository URL declared in your `package.json` `repository` field (GitHub or GitLab). Other Boolean or string properties in the configuration object are forwarded verbatim to the CLI.
|
|
57
|
+
|
|
58
|
+
## Usage
|
|
59
|
+
|
|
60
|
+
Once your configuration is in place you can run:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx reporeadmerewriter
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Passing a help flag (`--help`, `-h`, `-?`, `/h`, or `/?`) bypasses configuration and shows the CLI's built-in help text.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx reporeadmerewriter --help
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Programmatic API
|
|
73
|
+
|
|
74
|
+
The default export mirrors the CLI entry point so you can invoke the bundled .NET executable yourself:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import repoRepoReadmeRewrite from "reporeadmerewriter";
|
|
78
|
+
|
|
79
|
+
// Launch the .NET CLI directly when you already have the final argv array
|
|
80
|
+
const exitCode = await repoRepoReadmeRewrite([
|
|
81
|
+
"--repo-url",
|
|
82
|
+
"https://github.com/owner/repo",
|
|
83
|
+
"--output",
|
|
84
|
+
"outputreadme.md",
|
|
85
|
+
]);
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`repoRepoReadmeRewrite` simply executes the embedded .NET binary with whatever arguments you supply.
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
ISC © Tony Hallett
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface RepoReadmeRewriterOptions {
|
|
2
|
+
errorOnHtml?: boolean;
|
|
3
|
+
removeHtml?: boolean;
|
|
4
|
+
extractDetailsSummary?: boolean;
|
|
5
|
+
config?: string;
|
|
6
|
+
ref?: string;
|
|
7
|
+
gh?: string;
|
|
8
|
+
readme?: string;
|
|
9
|
+
output?: string;
|
|
10
|
+
repoUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const packageJsonOptionsConfigKey = "repoReadmeRewriter";
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeTarget": {
|
|
3
|
+
"name": ".NETCoreApp,Version=v8.0",
|
|
4
|
+
"signature": ""
|
|
5
|
+
},
|
|
6
|
+
"compilationOptions": {},
|
|
7
|
+
"targets": {
|
|
8
|
+
".NETCoreApp,Version=v8.0": {
|
|
9
|
+
"ReadmeRewriterCLI/1.0.0": {
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"Microsoft.Extensions.DependencyInjection": "10.0.1",
|
|
12
|
+
"RepoReadmeRewriter": "1.0.0",
|
|
13
|
+
"Spectre.Console": "0.54.0",
|
|
14
|
+
"System.CommandLine": "2.0.1"
|
|
15
|
+
},
|
|
16
|
+
"runtime": {
|
|
17
|
+
"ReadmeRewriterCLI.dll": {}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"AngleSharp/1.3.0": {
|
|
21
|
+
"runtime": {
|
|
22
|
+
"lib/net8.0/AngleSharp.dll": {
|
|
23
|
+
"assemblyVersion": "1.3.0.0",
|
|
24
|
+
"fileVersion": "1.3.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"Markdig/0.42.0": {
|
|
29
|
+
"runtime": {
|
|
30
|
+
"lib/net8.0/Markdig.dll": {
|
|
31
|
+
"assemblyVersion": "0.42.0.0",
|
|
32
|
+
"fileVersion": "0.42.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"Microsoft.Extensions.DependencyInjection/10.0.1": {
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.1"
|
|
39
|
+
},
|
|
40
|
+
"runtime": {
|
|
41
|
+
"lib/net8.0/Microsoft.Extensions.DependencyInjection.dll": {
|
|
42
|
+
"assemblyVersion": "10.0.0.0",
|
|
43
|
+
"fileVersion": "10.0.125.57005"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"Microsoft.Extensions.DependencyInjection.Abstractions/10.0.1": {
|
|
48
|
+
"runtime": {
|
|
49
|
+
"lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
|
|
50
|
+
"assemblyVersion": "10.0.0.0",
|
|
51
|
+
"fileVersion": "10.0.125.57005"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"Spectre.Console/0.54.0": {
|
|
56
|
+
"runtime": {
|
|
57
|
+
"lib/net8.0/Spectre.Console.dll": {
|
|
58
|
+
"assemblyVersion": "0.0.0.0",
|
|
59
|
+
"fileVersion": "0.54.0.0"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"System.CommandLine/2.0.1": {
|
|
64
|
+
"runtime": {
|
|
65
|
+
"lib/net8.0/System.CommandLine.dll": {
|
|
66
|
+
"assemblyVersion": "2.0.1.0",
|
|
67
|
+
"fileVersion": "2.0.125.57005"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"resources": {
|
|
71
|
+
"lib/net8.0/cs/System.CommandLine.resources.dll": {
|
|
72
|
+
"locale": "cs"
|
|
73
|
+
},
|
|
74
|
+
"lib/net8.0/de/System.CommandLine.resources.dll": {
|
|
75
|
+
"locale": "de"
|
|
76
|
+
},
|
|
77
|
+
"lib/net8.0/es/System.CommandLine.resources.dll": {
|
|
78
|
+
"locale": "es"
|
|
79
|
+
},
|
|
80
|
+
"lib/net8.0/fr/System.CommandLine.resources.dll": {
|
|
81
|
+
"locale": "fr"
|
|
82
|
+
},
|
|
83
|
+
"lib/net8.0/it/System.CommandLine.resources.dll": {
|
|
84
|
+
"locale": "it"
|
|
85
|
+
},
|
|
86
|
+
"lib/net8.0/ja/System.CommandLine.resources.dll": {
|
|
87
|
+
"locale": "ja"
|
|
88
|
+
},
|
|
89
|
+
"lib/net8.0/ko/System.CommandLine.resources.dll": {
|
|
90
|
+
"locale": "ko"
|
|
91
|
+
},
|
|
92
|
+
"lib/net8.0/pl/System.CommandLine.resources.dll": {
|
|
93
|
+
"locale": "pl"
|
|
94
|
+
},
|
|
95
|
+
"lib/net8.0/pt-BR/System.CommandLine.resources.dll": {
|
|
96
|
+
"locale": "pt-BR"
|
|
97
|
+
},
|
|
98
|
+
"lib/net8.0/ru/System.CommandLine.resources.dll": {
|
|
99
|
+
"locale": "ru"
|
|
100
|
+
},
|
|
101
|
+
"lib/net8.0/tr/System.CommandLine.resources.dll": {
|
|
102
|
+
"locale": "tr"
|
|
103
|
+
},
|
|
104
|
+
"lib/net8.0/zh-Hans/System.CommandLine.resources.dll": {
|
|
105
|
+
"locale": "zh-Hans"
|
|
106
|
+
},
|
|
107
|
+
"lib/net8.0/zh-Hant/System.CommandLine.resources.dll": {
|
|
108
|
+
"locale": "zh-Hant"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"RepoReadmeRewriter/1.0.0": {
|
|
113
|
+
"dependencies": {
|
|
114
|
+
"AngleSharp": "1.3.0",
|
|
115
|
+
"Markdig": "0.42.0"
|
|
116
|
+
},
|
|
117
|
+
"runtime": {
|
|
118
|
+
"RepoReadmeRewriter.dll": {
|
|
119
|
+
"assemblyVersion": "1.0.0.0",
|
|
120
|
+
"fileVersion": "1.0.0.0"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"libraries": {
|
|
127
|
+
"ReadmeRewriterCLI/1.0.0": {
|
|
128
|
+
"type": "project",
|
|
129
|
+
"serviceable": false,
|
|
130
|
+
"sha512": ""
|
|
131
|
+
},
|
|
132
|
+
"AngleSharp/1.3.0": {
|
|
133
|
+
"type": "package",
|
|
134
|
+
"serviceable": true,
|
|
135
|
+
"sha512": "sha512-iHzfn4cK6CmhuURNdEpmSQCq5/HZFldEpkbnmqT9My8+6l2Sz3F+NxoqRA8z/jTkWB+SAu5boRdp4v/WtyjuIQ==",
|
|
136
|
+
"path": "anglesharp/1.3.0",
|
|
137
|
+
"hashPath": "anglesharp.1.3.0.nupkg.sha512"
|
|
138
|
+
},
|
|
139
|
+
"Markdig/0.42.0": {
|
|
140
|
+
"type": "package",
|
|
141
|
+
"serviceable": true,
|
|
142
|
+
"sha512": "sha512-tINdftVfbTujqfPXrQOSl9/6XCS2Y4Zwz+i7UPBgxRNnDtI1CjyQ5UA/5sKoSOmfECyWkTztY/vbcc/u1DA8nA==",
|
|
143
|
+
"path": "markdig/0.42.0",
|
|
144
|
+
"hashPath": "markdig.0.42.0.nupkg.sha512"
|
|
145
|
+
},
|
|
146
|
+
"Microsoft.Extensions.DependencyInjection/10.0.1": {
|
|
147
|
+
"type": "package",
|
|
148
|
+
"serviceable": true,
|
|
149
|
+
"sha512": "sha512-zerXV0GAR9LCSXoSIApbWn+Dq1/T+6vbXMHGduq1LoVQRHT0BXsGQEau0jeLUBUcsoF/NaUT8ADPu8b+eNcIyg==",
|
|
150
|
+
"path": "microsoft.extensions.dependencyinjection/10.0.1",
|
|
151
|
+
"hashPath": "microsoft.extensions.dependencyinjection.10.0.1.nupkg.sha512"
|
|
152
|
+
},
|
|
153
|
+
"Microsoft.Extensions.DependencyInjection.Abstractions/10.0.1": {
|
|
154
|
+
"type": "package",
|
|
155
|
+
"serviceable": true,
|
|
156
|
+
"sha512": "sha512-oIy8fQxxbUsSrrOvgBqlVgOeCtDmrcynnTG+FQufcUWBrwyPfwlUkCDB2vaiBeYPyT+20u9/HeuHeBf+H4F/8g==",
|
|
157
|
+
"path": "microsoft.extensions.dependencyinjection.abstractions/10.0.1",
|
|
158
|
+
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.10.0.1.nupkg.sha512"
|
|
159
|
+
},
|
|
160
|
+
"Spectre.Console/0.54.0": {
|
|
161
|
+
"type": "package",
|
|
162
|
+
"serviceable": true,
|
|
163
|
+
"sha512": "sha512-StDXCFayfy0yB1xzUHT2tgEpV1/HFTiS4JgsAQS49EYTfMixSwwucaQs/bIOCwXjWwIQTMuxjUIxcB5XsJkFJA==",
|
|
164
|
+
"path": "spectre.console/0.54.0",
|
|
165
|
+
"hashPath": "spectre.console.0.54.0.nupkg.sha512"
|
|
166
|
+
},
|
|
167
|
+
"System.CommandLine/2.0.1": {
|
|
168
|
+
"type": "package",
|
|
169
|
+
"serviceable": true,
|
|
170
|
+
"sha512": "sha512-GLc43eDFq8KbpxIb7UhTwV0vC5CzB0NspJvfFbfhoW4O057xCJXuO18KLpVn9x3JykQn2mRske6+I6JXHwqmDg==",
|
|
171
|
+
"path": "system.commandline/2.0.1",
|
|
172
|
+
"hashPath": "system.commandline.2.0.1.nupkg.sha512"
|
|
173
|
+
},
|
|
174
|
+
"RepoReadmeRewriter/1.0.0": {
|
|
175
|
+
"type": "project",
|
|
176
|
+
"serviceable": false,
|
|
177
|
+
"sha512": ""
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeOptions": {
|
|
3
|
+
"tfm": "net8.0",
|
|
4
|
+
"framework": {
|
|
5
|
+
"name": "Microsoft.NETCore.App",
|
|
6
|
+
"version": "8.0.0"
|
|
7
|
+
},
|
|
8
|
+
"configProperties": {
|
|
9
|
+
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
|
10
|
+
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.findPackageJson = findPackageJson;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const findPackageJsonPath_1 = require("./findPackageJsonPath");
|
|
39
|
+
function findPackageJson() {
|
|
40
|
+
const pkgPath = (0, findPackageJsonPath_1.findPackageJsonPath)();
|
|
41
|
+
const pkgContent = fs.readFileSync(pkgPath, "utf-8");
|
|
42
|
+
return {
|
|
43
|
+
content: JSON.parse(pkgContent),
|
|
44
|
+
path: pkgPath,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findPackageJsonPath(): string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.findPackageJsonPath = findPackageJsonPath;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
function findPackageJsonPath() {
|
|
40
|
+
let dir = process.cwd();
|
|
41
|
+
while (true) {
|
|
42
|
+
const pkgPath = path.join(dir, "package.json");
|
|
43
|
+
if (fs.existsSync(pkgPath)) {
|
|
44
|
+
return pkgPath;
|
|
45
|
+
}
|
|
46
|
+
const parentDir = path.dirname(dir);
|
|
47
|
+
if (parentDir === dir) {
|
|
48
|
+
throw new Error("Could not find package.json");
|
|
49
|
+
}
|
|
50
|
+
dir = parentDir;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCLIArgs(args: string[]): string[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCLIArgs = getCLIArgs;
|
|
4
|
+
const getHelpCLIArgs_1 = require("./getHelpCLIArgs");
|
|
5
|
+
const getCLIArgsFromJson_1 = require("./getCLIArgsFromJson");
|
|
6
|
+
function getCLIArgs(args) {
|
|
7
|
+
return (0, getHelpCLIArgs_1.getHelpCLIArgs)(args) ?? (0, getCLIArgsFromJson_1.getCLIArgsFromJson)();
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoOptionsErrorMessage = void 0;
|
|
4
|
+
exports.getCLIArgsFromJson = getCLIArgsFromJson;
|
|
5
|
+
const findPackageJson_1 = require("./findPackageJson");
|
|
6
|
+
const getCLIArgsFromPackageOptions_1 = require("./getCLIArgsFromPackageOptions");
|
|
7
|
+
const getOptionsFromConfig_1 = require("./getOptionsFromConfig");
|
|
8
|
+
const RepoReadmeRewriterOptions_1 = require("./RepoReadmeRewriterOptions");
|
|
9
|
+
exports.NoOptionsErrorMessage = `No ${RepoReadmeRewriterOptions_1.packageJsonOptionsConfigKey} package.json field or ${getOptionsFromConfig_1.CONFIG_FILE_NAME}`;
|
|
10
|
+
function getCLIArgsFromJson() {
|
|
11
|
+
const { content: packageJson, path: packageJsonPath } = (0, findPackageJson_1.findPackageJson)();
|
|
12
|
+
let options;
|
|
13
|
+
if (packageJson["repoReadmeRewriter"] == undefined) {
|
|
14
|
+
options = (0, getOptionsFromConfig_1.getOptionsFromConfig)(packageJsonPath);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
options = packageJson["repoReadmeRewriter"];
|
|
18
|
+
}
|
|
19
|
+
if (options == undefined) {
|
|
20
|
+
throw new Error(exports.NoOptionsErrorMessage);
|
|
21
|
+
}
|
|
22
|
+
return (0, getCLIArgsFromPackageOptions_1.getCLIArgsFromPackageOptions)({
|
|
23
|
+
repoReadmeRewriter: options,
|
|
24
|
+
repository: packageJson.repository,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RepoReadmeRewriterOptions } from "./RepoReadmeRewriterOptions";
|
|
2
|
+
import { RepositoryField } from "./resolveRepositoryUrl";
|
|
3
|
+
export interface PackageJsonOptions {
|
|
4
|
+
repoReadmeRewriter: RepoReadmeRewriterOptions;
|
|
5
|
+
repository: RepositoryField | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare function getCLIArgsFromPackageOptions(packageOptions: PackageJsonOptions): string[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCLIArgsFromPackageOptions = getCLIArgsFromPackageOptions;
|
|
4
|
+
const resolveRepositoryUrl_1 = require("./resolveRepositoryUrl");
|
|
5
|
+
function getOption(name, value) {
|
|
6
|
+
if (value === undefined) {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
if (typeof value === "boolean") {
|
|
10
|
+
return value ? [`--${name}`] : [];
|
|
11
|
+
}
|
|
12
|
+
return [`--${name}`, value];
|
|
13
|
+
}
|
|
14
|
+
function getCLIArgsFromPackageOptions(packageOptions) {
|
|
15
|
+
const options = packageOptions.repoReadmeRewriter;
|
|
16
|
+
let repoUrl = options.repoUrl;
|
|
17
|
+
if (!repoUrl && packageOptions.repository) {
|
|
18
|
+
repoUrl = (0, resolveRepositoryUrl_1.resolveRepositoryUrl)(packageOptions.repository);
|
|
19
|
+
}
|
|
20
|
+
return [
|
|
21
|
+
...getOption("repo-url", repoUrl),
|
|
22
|
+
...getOption("error-on-html", options.errorOnHtml),
|
|
23
|
+
...getOption("remove-html", options.removeHtml),
|
|
24
|
+
...getOption("extract-details-summary", options.extractDetailsSummary),
|
|
25
|
+
...getOption("config", options.config),
|
|
26
|
+
...getOption("ref", options.ref),
|
|
27
|
+
...getOption("gh", options.gh),
|
|
28
|
+
...getOption("readme", options.readme),
|
|
29
|
+
...getOption("output", options.output),
|
|
30
|
+
];
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getHelpCLIArgs(args: string[]): string[] | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHelpCLIArgs = getHelpCLIArgs;
|
|
4
|
+
function getHelpCLIArgs(args) {
|
|
5
|
+
const helpFlags = new Set(["--help", "-h", "/h", "-?", "/?"]);
|
|
6
|
+
const requestedHelp = args.some((a) => helpFlags.has(a));
|
|
7
|
+
if (requestedHelp) {
|
|
8
|
+
return args;
|
|
9
|
+
}
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CONFIG_FILE_NAME = void 0;
|
|
37
|
+
exports.getOptionsFromConfig = getOptionsFromConfig;
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const loadAndParseConfigFile_1 = require("./loadAndParseConfigFile");
|
|
40
|
+
exports.CONFIG_FILE_NAME = "repoReadmeRewriter.config.json";
|
|
41
|
+
function asRepoReadmeRewriterOptions(value) {
|
|
42
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) {
|
|
43
|
+
throw new Error(`${exports.CONFIG_FILE_NAME} must contain an object of repoReadmeRewriter options`);
|
|
44
|
+
}
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
function getOptionsFromConfig(packageJsonPath) {
|
|
48
|
+
const configPath = path.join(path.dirname(packageJsonPath), exports.CONFIG_FILE_NAME);
|
|
49
|
+
const parsed = (0, loadAndParseConfigFile_1.loadAndParseConfigFile)(configPath);
|
|
50
|
+
if (parsed === undefined) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
return asRepoReadmeRewriterOptions(parsed);
|
|
54
|
+
}
|
package/bin/index.d.ts
ADDED
package/bin/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadAndParseConfigFile(configPath: string): unknown | undefined;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.loadAndParseConfigFile = loadAndParseConfigFile;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const getOptionsFromConfig_1 = require("./getOptionsFromConfig");
|
|
39
|
+
function loadAndParseConfigFile(configPath) {
|
|
40
|
+
if (!fs.existsSync(configPath)) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
let fileContent;
|
|
44
|
+
try {
|
|
45
|
+
fileContent = fs.readFileSync(configPath, "utf-8");
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
49
|
+
throw new Error(`Failed to read ${getOptionsFromConfig_1.CONFIG_FILE_NAME}: ${message}`);
|
|
50
|
+
}
|
|
51
|
+
let parsed;
|
|
52
|
+
try {
|
|
53
|
+
parsed = JSON.parse(fileContent);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
57
|
+
throw new Error(`Failed to parse ${getOptionsFromConfig_1.CONFIG_FILE_NAME}: ${message}`);
|
|
58
|
+
}
|
|
59
|
+
return parsed;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function repoRepoReadmeRewrite(args: string[]): Promise<number>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.repoRepoReadmeRewrite = repoRepoReadmeRewrite;
|
|
7
|
+
const child_process_1 = require("child_process");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
function repoRepoReadmeRewrite(args) {
|
|
10
|
+
return new Promise((resolve) => {
|
|
11
|
+
const dllPath = path_1.default.join(__dirname, "cli", "ReadmeRewriterCLI.dll");
|
|
12
|
+
const child = (0, child_process_1.spawn)("dotnet", [dllPath, ...args], {
|
|
13
|
+
stdio: "inherit",
|
|
14
|
+
});
|
|
15
|
+
child.on("error", (err) => {
|
|
16
|
+
console.error([
|
|
17
|
+
"Failed to launch 'dotnet' (spawn error).",
|
|
18
|
+
"Ensure .NET is installed and available on PATH (try 'dotnet --info').",
|
|
19
|
+
String(err),
|
|
20
|
+
].join("\n"));
|
|
21
|
+
resolve(1);
|
|
22
|
+
});
|
|
23
|
+
child.on("close", (code) => {
|
|
24
|
+
// Non-zero exits are emitted by the CLI itself (e.g., missing args).
|
|
25
|
+
// We inherit stdio so the CLI already printed context; just propagate the code.
|
|
26
|
+
resolve(code ?? 1);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveRepositoryUrl = resolveRepositoryUrl;
|
|
7
|
+
const hosted_git_info_1 = __importDefault(require("hosted-git-info"));
|
|
8
|
+
function resolveRepositoryUrl(repo) {
|
|
9
|
+
const raw = typeof repo === "string" ? repo : repo.url;
|
|
10
|
+
if (!raw) {
|
|
11
|
+
throw new Error("Repository field is empty or invalid.");
|
|
12
|
+
}
|
|
13
|
+
const info = hosted_git_info_1.default.fromUrl(raw);
|
|
14
|
+
if (!info) {
|
|
15
|
+
throw new Error(`Unable to parse repository URL: ${raw}`);
|
|
16
|
+
}
|
|
17
|
+
throwIfNotSupportedHost(info);
|
|
18
|
+
// Clean HTTPS URL without git+ prefix or .git suffix
|
|
19
|
+
return info.browse({ noGitPlus: true });
|
|
20
|
+
}
|
|
21
|
+
function throwIfNotSupportedHost(info) {
|
|
22
|
+
const supportedHosts = ["github", "gitlab"];
|
|
23
|
+
const supportedHost = supportedHosts.includes(info.type);
|
|
24
|
+
if (!supportedHost) {
|
|
25
|
+
throw new Error("Only GitHub and GitLab repositories are supported.");
|
|
26
|
+
}
|
|
27
|
+
}
|
package/bin/rewriter.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const runProcessArgs_1 = require("./runProcessArgs");
|
|
5
|
+
function run() {
|
|
6
|
+
return (0, runProcessArgs_1.runProcessArgs)(process.argv.slice(2));
|
|
7
|
+
}
|
|
8
|
+
// Only execute when run directly as a CLI, not when imported.
|
|
9
|
+
if (require.main === module) {
|
|
10
|
+
run().then((code) => process.exit(code));
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runProcessArgs(args: string[]): Promise<number>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runProcessArgs = runProcessArgs;
|
|
4
|
+
const getCLIArgs_1 = require("./getCLIArgs");
|
|
5
|
+
const repoRepoReadmeRewrite_1 = require("./repoRepoReadmeRewrite");
|
|
6
|
+
async function runProcessArgs(args) {
|
|
7
|
+
try {
|
|
8
|
+
return await (0, repoRepoReadmeRewrite_1.repoRepoReadmeRewrite)((0, getCLIArgs_1.getCLIArgs)(args));
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
12
|
+
console.error(msg);
|
|
13
|
+
return 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reporeadmerewriter",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "tool that rewrites repo relative asset links ( Gitlab / Github ) to absolute. Can also remove / replace ",
|
|
5
|
+
"main": "bin/index.js",
|
|
6
|
+
"types": "bin/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"bin/",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"clean": "node -e \"require('fs').rmSync('bin', { recursive: true, force: true });\"",
|
|
13
|
+
"copy-cli": "tsx ./scripts/copy-cli.ts",
|
|
14
|
+
"build": "npm run clean && tsc -p tsconfig.json",
|
|
15
|
+
"set-bin-exec": "node ./scripts/set-bin-exec.js",
|
|
16
|
+
"prepare": "npm run build && npm run copy-cli && npm run set-bin-exec",
|
|
17
|
+
"pretest:integration": "npm run prepare && npm pack",
|
|
18
|
+
"test": "npm run test:unit && npm run test:integration",
|
|
19
|
+
"test:unit": "jest __tests__/rewriter",
|
|
20
|
+
"test:integration": "jest __tests__/integration.test.ts"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/tonyhallett/RepoReadmeRewriter.git"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"readme",
|
|
28
|
+
"GitHub",
|
|
29
|
+
"GitLab",
|
|
30
|
+
"relative",
|
|
31
|
+
"links",
|
|
32
|
+
"images"
|
|
33
|
+
],
|
|
34
|
+
"author": "Tony Hallett",
|
|
35
|
+
"license": "ISC",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/tonyhallett/RepoReadmeRewriter/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/tonyhallett/RepoReadmeRewriter#readme",
|
|
40
|
+
"bin": {
|
|
41
|
+
"reporeadmerewriter": "bin/rewriter.js"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@types/node": "^25.0.8",
|
|
45
|
+
"adm-zip": "^0.5.16",
|
|
46
|
+
"hosted-git-info": "^9.0.2",
|
|
47
|
+
"ts-node": "^10.9.2",
|
|
48
|
+
"typescript": "^5.9.3"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/adm-zip": "^0.5.7",
|
|
52
|
+
"@types/hosted-git-info": "^3.0.5",
|
|
53
|
+
"@types/jest": "^29.5.14",
|
|
54
|
+
"jest": "^29.7.0",
|
|
55
|
+
"ts-jest": "^29.4.6",
|
|
56
|
+
"tsx": "^4.21.0"
|
|
57
|
+
}
|
|
58
|
+
}
|