@stephansama/auto-readme 0.2.4 → 0.2.6
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 +23 -23
- package/config/schema.cjs +2 -2
- package/config/schema.d.cts +4 -4
- package/config/schema.d.ts +4 -4
- package/config/schema.js +2 -2
- package/config/schema.json +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/stephansama/packages/tree/main/core/auto-readme)
|
|
4
4
|
[](https://packages.stephansama.info/api/@stephansama/auto-readme)
|
|
5
|
-
[](https://www.
|
|
6
|
-
[](https://www.
|
|
5
|
+
[](https://www.npmx.dev/package/@stephansama/auto-readme)
|
|
6
|
+
[](https://www.npmx.dev/package/@stephansama/auto-readme)
|
|
7
7
|
|
|
8
8
|
Generate lists and tables for your README automagically based on your repository
|
|
9
9
|
|
|
@@ -180,27 +180,27 @@ _Enum, one of the following possible values:_
|
|
|
180
180
|
|
|
181
181
|
_Object containing the following properties:_
|
|
182
182
|
|
|
183
|
-
| Property
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
187
|
-
| `defaultLanguage`
|
|
188
|
-
| `disableEmojis`
|
|
189
|
-
| `disableMarkdownHeadings`
|
|
190
|
-
| `enablePrettier`
|
|
191
|
-
| `enableToc`
|
|
192
|
-
| `enableUsage`
|
|
193
|
-
| `headings`
|
|
194
|
-
| `onlyReadmes`
|
|
195
|
-
| `onlyShowPublicPackages`
|
|
196
|
-
| `removeScope`
|
|
197
|
-
| `templates`
|
|
198
|
-
| `tocHeading`
|
|
199
|
-
| `usageFile`
|
|
200
|
-
| `usageHeading`
|
|
201
|
-
| `verbose`
|
|
202
|
-
|
|
203
|
-
|
|
183
|
+
| Property | Description | Type | Default |
|
|
184
|
+
| :-------------------------- | :---------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
185
|
+
| **`affectedRegexes`** (\*) | | `Array<string>` | |
|
|
186
|
+
| **`collapseHeadings`** (\*) | | `Array<string>` | |
|
|
187
|
+
| `defaultLanguage` | Default language to infer projects from | [Language](#language) | |
|
|
188
|
+
| `disableEmojis` | Whether or not to use emojis in markdown table headings | `boolean` | `false` |
|
|
189
|
+
| `disableMarkdownHeadings` | Whether or not to display markdown headings | `boolean` | `false` |
|
|
190
|
+
| `enablePrettier` | Whether or not to use prettier to format the files | `boolean` | `true` |
|
|
191
|
+
| `enableToc` | generate table of contents for readmes | `boolean` | `false` |
|
|
192
|
+
| `enableUsage` | Whether or not to enable usage plugin | `boolean` | `false` |
|
|
193
|
+
| `headings` | List of headings for different table outputs | _Object with dynamic keys of type_ [Actions](#actions) _and values of type_ `Array<'default' \| 'description' \| 'devDependency' \| 'downloads' \| 'name' \| 'private' \| 'required' \| 'version'>` (_optional_) | `{"ACTION":["name","required","default","description"],"PKG":["name","version","devDependency"],"USAGE":[],"WORKSPACE":["name","version","downloads","description"],"ZOD":[]}` |
|
|
194
|
+
| `onlyReadmes` | Whether or not to only traverse readmes | `boolean` | `true` |
|
|
195
|
+
| `onlyShowPublicPackages` | Only show public packages in workspaces | `boolean` | `false` |
|
|
196
|
+
| `removeScope` | Remove common workspace scope | `string` | `''` |
|
|
197
|
+
| `templates` | Handlebars templates used to fuel list and table generation | _Object with properties:_<ul><li>`downloadImage`: `string`</li><li>`emojis`: `Record<'default' \| 'description' \| 'devDependency' \| 'downloads' \| 'name' \| 'private' \| 'required' \| 'version', string>` - Table heading emojis used when enabled</li><li>`registryUrl`: `string`</li><li>`versionImage`: `string`</li></ul> | `{"downloadImage":"https://img.shields.io/npm/dw/{{name}}?labelColor=211F1F","emojis":{"default":"⚙️","description":"📝","devDependency":"💻","downloads":"📥","name":"🏷️","private":"🔒","required":"","version":""},"registryUrl":"https://www.npmjs.com/package/{{name}}","versionImage":"https://img.shields.io/npm/v/{{uri_name}}?logo=npm&logoColor=red&color=211F1F&labelColor=211F1F"}` |
|
|
198
|
+
| `tocHeading` | Markdown heading used to generate table of contents | `string` | `'Table of contents'` |
|
|
199
|
+
| `usageFile` | Workspace level usage file | `string` | `''` |
|
|
200
|
+
| `usageHeading` | Markdown heading used to generate usage example | `string` | `'Usage'` |
|
|
201
|
+
| `verbose` | whether or not to display verbose logging | `boolean` | `false` |
|
|
202
|
+
|
|
203
|
+
_(\*) Required._ (_optional_)
|
|
204
204
|
|
|
205
205
|
## Formats
|
|
206
206
|
|
package/config/schema.cjs
CHANGED
|
@@ -83,8 +83,8 @@ const templatesSchema = zod.object({
|
|
|
83
83
|
const defaultTemplates = templatesSchema.parse({});
|
|
84
84
|
const defaultTableHeadings = tableHeadingsSchema.parse(void 0);
|
|
85
85
|
const _configSchema = zod.object({
|
|
86
|
-
affectedRegexes: zod.
|
|
87
|
-
collapseHeadings: zod.
|
|
86
|
+
affectedRegexes: zod.array(zod.string()),
|
|
87
|
+
collapseHeadings: zod.array(zod.string()),
|
|
88
88
|
defaultLanguage: languageSchema.meta({
|
|
89
89
|
alias: "l",
|
|
90
90
|
description: "Default language to infer projects from"
|
package/config/schema.d.cts
CHANGED
|
@@ -24,8 +24,8 @@ declare const defaultTemplates: {
|
|
|
24
24
|
};
|
|
25
25
|
declare const defaultTableHeadings: Record<"ACTION" | "PKG" | "USAGE" | "WORKSPACE" | "ZOD", ("description" | "default" | "devDependency" | "downloads" | "name" | "private" | "required" | "version")[] | undefined>;
|
|
26
26
|
declare const _configSchema: z.ZodObject<{
|
|
27
|
-
affectedRegexes: z.
|
|
28
|
-
collapseHeadings: z.
|
|
27
|
+
affectedRegexes: z.ZodArray<z.ZodString>;
|
|
28
|
+
collapseHeadings: z.ZodArray<z.ZodString>;
|
|
29
29
|
defaultLanguage: z.ZodDefault<z.ZodEnum<{
|
|
30
30
|
JS: "JS";
|
|
31
31
|
RS: "RS";
|
|
@@ -75,8 +75,8 @@ declare const _configSchema: z.ZodObject<{
|
|
|
75
75
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
76
76
|
}, z.core.$strip>;
|
|
77
77
|
declare const configSchema: z.ZodOptional<z.ZodObject<{
|
|
78
|
-
affectedRegexes: z.
|
|
79
|
-
collapseHeadings: z.
|
|
78
|
+
affectedRegexes: z.ZodArray<z.ZodString>;
|
|
79
|
+
collapseHeadings: z.ZodArray<z.ZodString>;
|
|
80
80
|
defaultLanguage: z.ZodDefault<z.ZodEnum<{
|
|
81
81
|
JS: "JS";
|
|
82
82
|
RS: "RS";
|
package/config/schema.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ declare const defaultTemplates: {
|
|
|
24
24
|
};
|
|
25
25
|
declare const defaultTableHeadings: Record<"ACTION" | "PKG" | "USAGE" | "WORKSPACE" | "ZOD", ("description" | "default" | "devDependency" | "downloads" | "name" | "private" | "required" | "version")[] | undefined>;
|
|
26
26
|
declare const _configSchema: z.ZodObject<{
|
|
27
|
-
affectedRegexes: z.
|
|
28
|
-
collapseHeadings: z.
|
|
27
|
+
affectedRegexes: z.ZodArray<z.ZodString>;
|
|
28
|
+
collapseHeadings: z.ZodArray<z.ZodString>;
|
|
29
29
|
defaultLanguage: z.ZodDefault<z.ZodEnum<{
|
|
30
30
|
JS: "JS";
|
|
31
31
|
RS: "RS";
|
|
@@ -75,8 +75,8 @@ declare const _configSchema: z.ZodObject<{
|
|
|
75
75
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
76
76
|
}, z.core.$strip>;
|
|
77
77
|
declare const configSchema: z.ZodOptional<z.ZodObject<{
|
|
78
|
-
affectedRegexes: z.
|
|
79
|
-
collapseHeadings: z.
|
|
78
|
+
affectedRegexes: z.ZodArray<z.ZodString>;
|
|
79
|
+
collapseHeadings: z.ZodArray<z.ZodString>;
|
|
80
80
|
defaultLanguage: z.ZodDefault<z.ZodEnum<{
|
|
81
81
|
JS: "JS";
|
|
82
82
|
RS: "RS";
|
package/config/schema.js
CHANGED
|
@@ -59,8 +59,8 @@ const templatesSchema = z.object({
|
|
|
59
59
|
const defaultTemplates = templatesSchema.parse({});
|
|
60
60
|
const defaultTableHeadings = tableHeadingsSchema.parse(void 0);
|
|
61
61
|
const _configSchema = z.object({
|
|
62
|
-
affectedRegexes: z.
|
|
63
|
-
collapseHeadings: z.
|
|
62
|
+
affectedRegexes: z.array(z.string()),
|
|
63
|
+
collapseHeadings: z.array(z.string()),
|
|
64
64
|
defaultLanguage: languageSchema.meta({
|
|
65
65
|
alias: "l",
|
|
66
66
|
description: "Default language to infer projects from"
|
package/config/schema.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"affectedRegexes":{"
|
|
1
|
+
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"affectedRegexes":{"type":"array","items":{"type":"string"}},"collapseHeadings":{"type":"array","items":{"type":"string"}},"defaultLanguage":{"alias":"l","description":"Default language to infer projects from","default":"JS","type":"string","enum":["JS","RS"]},"disableEmojis":{"alias":"e","description":"Whether or not to use emojis in markdown table headings","default":false,"type":"boolean"},"disableMarkdownHeadings":{"description":"Whether or not to display markdown headings","default":false,"type":"boolean"},"enablePrettier":{"description":"Whether or not to use prettier to format the files","default":true,"type":"boolean"},"enableToc":{"alias":"t","description":"generate table of contents for readmes","default":false,"type":"boolean"},"enableUsage":{"description":"Whether or not to enable usage plugin","default":false,"type":"boolean"},"headings":{"description":"List of headings for different table outputs","default":{"ACTION":["name","required","default","description"],"PKG":["name","version","devDependency"],"USAGE":[],"WORKSPACE":["name","version","downloads","description"],"ZOD":[]},"type":"object","propertyNames":{"description":"Comment action options","type":"string","enum":["ACTION","PKG","USAGE","WORKSPACE","ZOD"]},"additionalProperties":{"type":"array","items":{"description":"Table heading options","type":"string","enum":["default","description","devDependency","downloads","name","private","required","version"]}}},"onlyReadmes":{"alias":"r","description":"Whether or not to only traverse readmes","default":true,"type":"boolean"},"onlyShowPublicPackages":{"alias":"p","description":"Only show public packages in workspaces","default":false,"type":"boolean"},"removeScope":{"description":"Remove common workspace scope","default":"","type":"string"},"templates":{"description":"Handlebars templates used to fuel list and table generation","default":{"downloadImage":"https://img.shields.io/npm/dw/{{name}}?labelColor=211F1F","emojis":{"default":"⚙️","description":"📝","devDependency":"💻","downloads":"📥","name":"🏷️","private":"🔒","required":"","version":""},"registryUrl":"https://www.npmjs.com/package/{{name}}","versionImage":"https://img.shields.io/npm/v/{{uri_name}}?logo=npm&logoColor=red&color=211F1F&labelColor=211F1F"},"type":"object","properties":{"downloadImage":{"default":"https://img.shields.io/npm/dw/{{name}}?labelColor=211F1F","type":"string"},"emojis":{"description":"Table heading emojis used when enabled","default":{"default":"⚙️","description":"📝","devDependency":"💻","downloads":"📥","name":"🏷️","private":"🔒","required":"","version":""},"type":"object","propertyNames":{"description":"Table heading options","type":"string","enum":["default","description","devDependency","downloads","name","private","required","version"]},"additionalProperties":{"type":"string"}},"registryUrl":{"default":"https://www.npmjs.com/package/{{name}}","type":"string"},"versionImage":{"default":"https://img.shields.io/npm/v/{{uri_name}}?logo=npm&logoColor=red&color=211F1F&labelColor=211F1F","type":"string"}},"required":["downloadImage","emojis","registryUrl","versionImage"],"additionalProperties":false},"tocHeading":{"description":"Markdown heading used to generate table of contents","default":"Table of contents","type":"string"},"usageFile":{"description":"Workspace level usage file","default":"","type":"string"},"usageHeading":{"description":"Markdown heading used to generate usage example","default":"Usage","type":"string"},"verbose":{"alias":"v","description":"whether or not to display verbose logging","default":false,"type":"boolean"}},"required":["affectedRegexes","collapseHeadings","defaultLanguage","disableEmojis","disableMarkdownHeadings","enablePrettier","enableToc","enableUsage","headings","onlyReadmes","onlyShowPublicPackages","removeScope","templates","tocHeading","usageFile","usageHeading","verbose"],"additionalProperties":false}
|
package/dist/index.cjs
CHANGED
|
@@ -137,8 +137,8 @@ const templatesSchema = zod.object({
|
|
|
137
137
|
const defaultTemplates = templatesSchema.parse({});
|
|
138
138
|
const defaultTableHeadings = tableHeadingsSchema.parse(void 0);
|
|
139
139
|
const _configSchema = zod.object({
|
|
140
|
-
affectedRegexes: zod.
|
|
141
|
-
collapseHeadings: zod.
|
|
140
|
+
affectedRegexes: zod.array(zod.string()),
|
|
141
|
+
collapseHeadings: zod.array(zod.string()),
|
|
142
142
|
defaultLanguage: languageSchema.meta({
|
|
143
143
|
alias: "l",
|
|
144
144
|
description: "Default language to infer projects from"
|
package/dist/index.js
CHANGED
|
@@ -87,8 +87,8 @@ const templatesSchema = z.object({
|
|
|
87
87
|
const defaultTemplates = templatesSchema.parse({});
|
|
88
88
|
const defaultTableHeadings = tableHeadingsSchema.parse(void 0);
|
|
89
89
|
const _configSchema = z.object({
|
|
90
|
-
affectedRegexes: z.
|
|
91
|
-
collapseHeadings: z.
|
|
90
|
+
affectedRegexes: z.array(z.string()),
|
|
91
|
+
collapseHeadings: z.array(z.string()),
|
|
92
92
|
defaultLanguage: languageSchema.meta({
|
|
93
93
|
alias: "l",
|
|
94
94
|
description: "Default language to infer projects from"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stephansama/auto-readme",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Generate lists and tables for your README automagically based on your repository and comments",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"auto",
|
|
@@ -60,23 +60,23 @@
|
|
|
60
60
|
"mdast-util-from-markdown": "^2.0.2",
|
|
61
61
|
"mdast-zone": "github:stephansama/mdast-zone#1c5b08cd97240debeed4c9c6afad49df5877a132",
|
|
62
62
|
"ora": "^8.2.0",
|
|
63
|
-
"pkg-types": "^2.
|
|
63
|
+
"pkg-types": "^2.3.0",
|
|
64
64
|
"remark": "15.0.1",
|
|
65
65
|
"remark-code-import": "^1.2.0",
|
|
66
66
|
"remark-collapse": "^0.1.2",
|
|
67
67
|
"remark-toc": "^9.0.0",
|
|
68
68
|
"remark-usage": "^11.0.1",
|
|
69
69
|
"vfile": "^6.0.3",
|
|
70
|
-
"yaml": "^2.8.
|
|
70
|
+
"yaml": "^2.8.2",
|
|
71
71
|
"yargs": "18.0.0",
|
|
72
72
|
"zod": "4.2.1",
|
|
73
|
-
"zod2md": "^0.2.
|
|
73
|
+
"zod2md": "^0.2.5"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/debug": "^4.1.12",
|
|
77
77
|
"@types/mdast": "^4.0.4",
|
|
78
78
|
"@types/vfile": "^4.0.0",
|
|
79
|
-
"@types/yargs": "^17.0.
|
|
79
|
+
"@types/yargs": "^17.0.35",
|
|
80
80
|
"mdast": "^3.0.0",
|
|
81
81
|
"tsdown": "0.15.12",
|
|
82
82
|
"unified": "^11.0.5"
|