@stephansama/auto-readme 0.2.1 → 0.2.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
@@ -180,25 +180,25 @@ _Enum, one of the following possible values:_
180
180
 
181
181
  _Object containing the following properties:_
182
182
 
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 of [Headings](#headings) items_ (_optional_) | `{"ACTION":["name","required","default","description"],"PKG":["name","version","devDependency"],"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`: _Object with dynamic keys of type_ [Headings](#headings) _and values of type_ `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` |
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
202
 
203
203
  _All properties are optional._ (_optional_)
204
204
 
@@ -212,21 +212,6 @@ _Enum, one of the following possible values:_
212
212
 
213
213
  _Default value:_ `'TABLE'`
214
214
 
215
- ## Headings
216
-
217
- Table heading options
218
-
219
- _Enum, one of the following possible values:_
220
-
221
- - `'default'`
222
- - `'description'`
223
- - `'devDependency'`
224
- - `'downloads'`
225
- - `'name'`
226
- - `'private'`
227
- - `'required'`
228
- - `'version'`
229
-
230
215
  ## Language
231
216
 
232
217
  _Enum, one of the following possible values:_
@@ -237,29 +222,4 @@ _Enum, one of the following possible values:_
237
222
 
238
223
  _Default value:_ `'JS'`
239
224
 
240
- ## TableHeadings
241
-
242
- Table heading action configuration
243
-
244
- _Object record with dynamic keys:_
245
-
246
- - _keys of type_ [Actions](#actions)
247
- - _values of type_ _Array of [Headings](#headings) items_ (_optional_)
248
- (_optional_)
249
-
250
- _Default value:_ `{"ACTION":["name","required","default","description"],"PKG":["name","version","devDependency"],"WORKSPACE":["name","version","downloads","description"],"ZOD":[]}`
251
-
252
- ## Templates
253
-
254
- _Object containing the following properties:_
255
-
256
- | Property | Description | Type | Default |
257
- | :-------------- | :------------------------------------- | :------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- |
258
- | `downloadImage` | | `string` | `'https://img.shields.io/npm/dw/{{name}}?labelColor=211F1F'` |
259
- | `emojis` | Table heading emojis used when enabled | _Object with dynamic keys of type_ [Headings](#headings) _and values of type_ `string` | `{"default":"⚙️","description":"📝","devDependency":"💻","downloads":"📥","name":"🏷️","private":"🔒","required":"","version":""}` |
260
- | `registryUrl` | | `string` | `'https://www.npmjs.com/package/{{name}}'` |
261
- | `versionImage` | | `string` | `'https://img.shields.io/npm/v/{{uri_name}}?logo=npm&logoColor=red&color=211F1F&labelColor=211F1F'` |
262
-
263
- _All properties are optional._
264
-
265
225
  <!-- ZOD end -->
package/config/schema.cjs CHANGED
@@ -1,139 +1,130 @@
1
- "use strict";
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
8
  var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
17
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
19
22
 
20
- // src/schema.js
21
- var schema_exports = {};
22
- __export(schema_exports, {
23
- actionsSchema: () => actionsSchema,
24
- configSchema: () => configSchema,
25
- defaultTableHeadings: () => defaultTableHeadings,
26
- defaultTemplates: () => defaultTemplates,
27
- formatsSchema: () => formatsSchema,
28
- headingsSchema: () => headingsSchema,
29
- languageSchema: () => languageSchema,
30
- tableHeadingsSchema: () => tableHeadingsSchema,
31
- templatesSchema: () => templatesSchema
32
- });
33
- module.exports = __toCommonJS(schema_exports);
34
- var import_zod = require("zod");
35
- var actionsSchema = import_zod.z.enum(["ACTION", "PKG", "USAGE", "WORKSPACE", "ZOD"]).describe("Comment action options");
36
- var formatsSchema = import_zod.z.enum(["LIST", "TABLE"]).default("TABLE").optional();
37
- var languageSchema = import_zod.z.enum(["JS", "RS"]).optional().default("JS");
38
- var headingsSchema = import_zod.z.enum([
39
- "default",
40
- "description",
41
- "devDependency",
42
- "downloads",
43
- "name",
44
- "private",
45
- "required",
46
- "version"
23
+ //#endregion
24
+ let zod = require("zod");
25
+ zod = __toESM(zod);
26
+
27
+ //#region src/schema.ts
28
+ const actionsSchema = zod.z.enum([
29
+ "ACTION",
30
+ "PKG",
31
+ "USAGE",
32
+ "WORKSPACE",
33
+ "ZOD"
34
+ ]).describe("Comment action options");
35
+ const formatsSchema = zod.z.enum(["LIST", "TABLE"]).default("TABLE").optional();
36
+ const languageSchema = zod.z.enum(["JS", "RS"]).optional().default("JS");
37
+ const headingsSchema = zod.z.enum([
38
+ "default",
39
+ "description",
40
+ "devDependency",
41
+ "downloads",
42
+ "name",
43
+ "private",
44
+ "required",
45
+ "version"
47
46
  ]).describe("Table heading options");
48
- var tableHeadingsSchema = import_zod.z.record(actionsSchema, headingsSchema.array().optional()).optional().describe("Table heading action configuration").default({
49
- ACTION: ["name", "required", "default", "description"],
50
- PKG: ["name", "version", "devDependency"],
51
- WORKSPACE: ["name", "version", "downloads", "description"],
52
- ZOD: []
47
+ const tableHeadingsSchema = zod.z.record(actionsSchema, headingsSchema.array().optional()).optional().describe("Table heading action configuration").default({
48
+ ACTION: [
49
+ "name",
50
+ "required",
51
+ "default",
52
+ "description"
53
+ ],
54
+ PKG: [
55
+ "name",
56
+ "version",
57
+ "devDependency"
58
+ ],
59
+ USAGE: [],
60
+ WORKSPACE: [
61
+ "name",
62
+ "version",
63
+ "downloads",
64
+ "description"
65
+ ],
66
+ ZOD: []
53
67
  });
54
- var templatesSchema = import_zod.z.object({
55
- downloadImage: import_zod.z.string().optional().default("https://img.shields.io/npm/dw/{{name}}?labelColor=211F1F"),
56
- emojis: import_zod.z.record(headingsSchema, import_zod.z.string()).optional().describe("Table heading emojis used when enabled").default({
57
- default: "\u2699\uFE0F",
58
- description: "\u{1F4DD}",
59
- devDependency: "\u{1F4BB}",
60
- downloads: "\u{1F4E5}",
61
- name: "\u{1F3F7}\uFE0F",
62
- private: "\u{1F512}",
63
- required: "",
64
- version: ""
65
- }),
66
- registryUrl: import_zod.z.string().optional().default("https://www.npmjs.com/package/{{name}}"),
67
- versionImage: import_zod.z.string().optional().default(
68
- "https://img.shields.io/npm/v/{{uri_name}}?logo=npm&logoColor=red&color=211F1F&labelColor=211F1F"
69
- )
68
+ const templatesSchema = zod.z.object({
69
+ downloadImage: zod.z.string().optional().default("https://img.shields.io/npm/dw/{{name}}?labelColor=211F1F"),
70
+ emojis: zod.z.record(headingsSchema, zod.z.string()).optional().describe("Table heading emojis used when enabled").default({
71
+ default: "⚙️",
72
+ description: "📝",
73
+ devDependency: "💻",
74
+ downloads: "📥",
75
+ name: "🏷️",
76
+ private: "🔒",
77
+ required: "",
78
+ version: ""
79
+ }),
80
+ registryUrl: zod.z.string().optional().default("https://www.npmjs.com/package/{{name}}"),
81
+ versionImage: zod.z.string().optional().default("https://img.shields.io/npm/v/{{uri_name}}?logo=npm&logoColor=red&color=211F1F&labelColor=211F1F")
70
82
  });
71
- var defaultTemplates = templatesSchema.parse({});
72
- var defaultTableHeadings = tableHeadingsSchema.parse(void 0);
73
- var _configSchema = import_zod.z.object({
74
- affectedRegexes: import_zod.z.string().array().optional().default([]),
75
- collapseHeadings: import_zod.z.string().array().optional().default([]),
76
- defaultLanguage: languageSchema.meta({
77
- alias: "l",
78
- description: "Default language to infer projects from"
79
- }),
80
- disableEmojis: import_zod.z.boolean().default(false).meta({
81
- alias: "e",
82
- description: "Whether or not to use emojis in markdown table headings"
83
- }),
84
- disableMarkdownHeadings: import_zod.z.boolean().default(false).meta({
85
- description: "Whether or not to display markdown headings"
86
- }),
87
- enablePrettier: import_zod.z.boolean().default(true).meta({
88
- description: "Whether or not to use prettier to format the files"
89
- }),
90
- enableToc: import_zod.z.boolean().default(false).meta({
91
- alias: "t",
92
- description: "generate table of contents for readmes"
93
- }),
94
- enableUsage: import_zod.z.boolean().optional().default(false).meta({
95
- description: "Whether or not to enable usage plugin"
96
- }),
97
- headings: tableHeadingsSchema.optional().default(defaultTableHeadings).describe("List of headings for different table outputs"),
98
- onlyReadmes: import_zod.z.boolean().default(true).meta({
99
- alias: "r",
100
- description: "Whether or not to only traverse readmes"
101
- }),
102
- onlyShowPublicPackages: import_zod.z.boolean().default(false).meta({
103
- alias: "p",
104
- description: "Only show public packages in workspaces"
105
- }),
106
- removeScope: import_zod.z.string().optional().default("").meta({
107
- description: "Remove common workspace scope"
108
- }),
109
- templates: templatesSchema.optional().default(defaultTemplates).describe(
110
- "Handlebars templates used to fuel list and table generation"
111
- ),
112
- tocHeading: import_zod.z.string().optional().default("Table of contents").meta({
113
- description: "Markdown heading used to generate table of contents"
114
- }),
115
- usageFile: import_zod.z.string().optional().default("").meta({
116
- description: "Workspace level usage file"
117
- }),
118
- usageHeading: import_zod.z.string().optional().default("Usage").meta({
119
- description: "Markdown heading used to generate usage example"
120
- }),
121
- verbose: import_zod.z.boolean().default(false).meta({
122
- alias: "v",
123
- description: "whether or not to display verbose logging"
124
- })
83
+ const defaultTemplates = templatesSchema.parse({});
84
+ const defaultTableHeadings = tableHeadingsSchema.parse(void 0);
85
+ const _configSchema = zod.z.object({
86
+ affectedRegexes: zod.z.string().array().optional().default([]),
87
+ collapseHeadings: zod.z.string().array().optional().default([]),
88
+ defaultLanguage: languageSchema.meta({
89
+ alias: "l",
90
+ description: "Default language to infer projects from"
91
+ }),
92
+ disableEmojis: zod.z.boolean().default(false).meta({
93
+ alias: "e",
94
+ description: "Whether or not to use emojis in markdown table headings"
95
+ }),
96
+ disableMarkdownHeadings: zod.z.boolean().default(false).meta({ description: "Whether or not to display markdown headings" }),
97
+ enablePrettier: zod.z.boolean().default(true).meta({ description: "Whether or not to use prettier to format the files" }),
98
+ enableToc: zod.z.boolean().default(false).meta({
99
+ alias: "t",
100
+ description: "generate table of contents for readmes"
101
+ }),
102
+ enableUsage: zod.z.boolean().optional().default(false).meta({ description: "Whether or not to enable usage plugin" }),
103
+ headings: tableHeadingsSchema.optional().default(defaultTableHeadings).describe("List of headings for different table outputs"),
104
+ onlyReadmes: zod.z.boolean().default(true).meta({
105
+ alias: "r",
106
+ description: "Whether or not to only traverse readmes"
107
+ }),
108
+ onlyShowPublicPackages: zod.z.boolean().default(false).meta({
109
+ alias: "p",
110
+ description: "Only show public packages in workspaces"
111
+ }),
112
+ removeScope: zod.z.string().optional().default("").meta({ description: "Remove common workspace scope" }),
113
+ templates: templatesSchema.optional().default(defaultTemplates).describe("Handlebars templates used to fuel list and table generation"),
114
+ tocHeading: zod.z.string().optional().default("Table of contents").meta({ description: "Markdown heading used to generate table of contents" }),
115
+ usageFile: zod.z.string().optional().default("").meta({ description: "Workspace level usage file" }),
116
+ usageHeading: zod.z.string().optional().default("Usage").meta({ description: "Markdown heading used to generate usage example" }),
117
+ verbose: zod.z.boolean().default(false).meta({
118
+ alias: "v",
119
+ description: "whether or not to display verbose logging"
120
+ })
125
121
  });
126
- var configSchema = _configSchema.optional();
127
- // Annotate the CommonJS export names for ESM import in node:
128
- 0 && (module.exports = {
129
- actionsSchema,
130
- configSchema,
131
- defaultTableHeadings,
132
- defaultTemplates,
133
- formatsSchema,
134
- headingsSchema,
135
- languageSchema,
136
- tableHeadingsSchema,
137
- templatesSchema
138
- });
139
- //# sourceMappingURL=schema.cjs.map
122
+ const configSchema = _configSchema.optional();
123
+
124
+ //#endregion
125
+ exports.actionsSchema = actionsSchema;
126
+ exports.configSchema = configSchema;
127
+ exports.defaultTableHeadings = defaultTableHeadings;
128
+ exports.defaultTemplates = defaultTemplates;
129
+ exports.formatsSchema = formatsSchema;
130
+ exports.languageSchema = languageSchema;