@stephansama/auto-readme 0.2.10 → 0.2.11
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/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +6 -0
- package/dist/index.mjs +1 -611
- package/{config/schema.mjs → dist/schema-CwCoMxkG.mjs} +1 -1
- package/dist/schema.mjs +2 -0
- package/dist/{index.cjs → src-BAFdTzfP.mjs} +98 -230
- package/package.json +11 -15
- package/cli.mjs +0 -4
- package/config/schema.cjs +0 -127
- package/config/schema.d.cts +0 -130
- package/dist/index.d.cts +0 -4
- /package/{config → dist}/schema.d.mts +0 -0
- /package/{config → dist}/schema.json +0 -0
package/config/schema.cjs
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
-
get: ((k) => from[k]).bind(null, key),
|
|
14
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
-
value: mod,
|
|
21
|
-
enumerable: true
|
|
22
|
-
}) : target, mod));
|
|
23
|
-
//#endregion
|
|
24
|
-
let zod = require("zod");
|
|
25
|
-
zod = __toESM(zod, 1);
|
|
26
|
-
//#region src/schema.ts
|
|
27
|
-
const actionsSchema = zod.enum([
|
|
28
|
-
"ACTION",
|
|
29
|
-
"PKG",
|
|
30
|
-
"USAGE",
|
|
31
|
-
"WORKSPACE",
|
|
32
|
-
"ZOD"
|
|
33
|
-
]).meta({ description: "Comment action options" });
|
|
34
|
-
const formatsSchema = zod.enum(["LIST", "TABLE"]).default("TABLE");
|
|
35
|
-
const languageSchema = zod.enum(["JS", "RS"]).default("JS");
|
|
36
|
-
const headingsSchema = zod.enum([
|
|
37
|
-
"default",
|
|
38
|
-
"description",
|
|
39
|
-
"devDependency",
|
|
40
|
-
"downloads",
|
|
41
|
-
"name",
|
|
42
|
-
"private",
|
|
43
|
-
"required",
|
|
44
|
-
"version"
|
|
45
|
-
]).meta({ description: "Table heading options" });
|
|
46
|
-
const tableHeadingsSchema = zod.record(actionsSchema, headingsSchema.array().optional()).default({
|
|
47
|
-
ACTION: [
|
|
48
|
-
"name",
|
|
49
|
-
"required",
|
|
50
|
-
"default",
|
|
51
|
-
"description"
|
|
52
|
-
],
|
|
53
|
-
PKG: [
|
|
54
|
-
"name",
|
|
55
|
-
"version",
|
|
56
|
-
"devDependency"
|
|
57
|
-
],
|
|
58
|
-
USAGE: [],
|
|
59
|
-
WORKSPACE: [
|
|
60
|
-
"name",
|
|
61
|
-
"version",
|
|
62
|
-
"downloads",
|
|
63
|
-
"description"
|
|
64
|
-
],
|
|
65
|
-
ZOD: []
|
|
66
|
-
}).meta({ description: "Table heading action configuration" });
|
|
67
|
-
const templatesSchema = zod.object({
|
|
68
|
-
downloadImage: zod.string().trim().default("https://img.shields.io/npm/dw/{{name}}?labelColor=211F1F"),
|
|
69
|
-
emojis: zod.record(headingsSchema, zod.string().trim()).default({
|
|
70
|
-
default: "⚙️",
|
|
71
|
-
description: "📝",
|
|
72
|
-
devDependency: "💻",
|
|
73
|
-
downloads: "📥",
|
|
74
|
-
name: "🏷️",
|
|
75
|
-
private: "🔒",
|
|
76
|
-
required: "",
|
|
77
|
-
version: ""
|
|
78
|
-
}).meta({ description: "Table heading emojis used when enabled" }),
|
|
79
|
-
registryUrl: zod.string().trim().default("https://www.npmjs.com/package/{{name}}"),
|
|
80
|
-
versionImage: zod.string().trim().default("https://img.shields.io/npm/v/{{uri_name}}?logo=npm&logoColor=red&color=211F1F&labelColor=211F1F")
|
|
81
|
-
});
|
|
82
|
-
const defaultTemplates = templatesSchema.parse({});
|
|
83
|
-
const defaultTableHeadings = tableHeadingsSchema.parse(void 0);
|
|
84
|
-
const configSchema = zod.object({
|
|
85
|
-
affectedRegexes: zod.array(zod.string().trim()),
|
|
86
|
-
collapseHeadings: zod.array(zod.string().trim()),
|
|
87
|
-
defaultLanguage: languageSchema.meta({
|
|
88
|
-
alias: "l",
|
|
89
|
-
description: "Default language to infer projects from"
|
|
90
|
-
}),
|
|
91
|
-
disableEmojis: zod.boolean().default(false).meta({
|
|
92
|
-
alias: "e",
|
|
93
|
-
description: "Whether or not to use emojis in markdown table headings"
|
|
94
|
-
}),
|
|
95
|
-
disableMarkdownHeadings: zod.boolean().default(false).meta({ description: "Whether or not to display markdown headings" }),
|
|
96
|
-
enablePrettier: zod.boolean().default(true).meta({ description: "Whether or not to use prettier to format the files" }),
|
|
97
|
-
enableToc: zod.boolean().default(false).meta({
|
|
98
|
-
alias: "t",
|
|
99
|
-
description: "generate table of contents for readmes"
|
|
100
|
-
}),
|
|
101
|
-
enableUsage: zod.boolean().default(false).meta({ description: "Whether or not to enable usage plugin" }),
|
|
102
|
-
headings: tableHeadingsSchema.optional().default(defaultTableHeadings).describe("List of headings for different table outputs"),
|
|
103
|
-
onlyReadmes: zod.boolean().default(true).meta({
|
|
104
|
-
alias: "r",
|
|
105
|
-
description: "Whether or not to only traverse readmes"
|
|
106
|
-
}),
|
|
107
|
-
onlyShowPublicPackages: zod.boolean().default(false).meta({
|
|
108
|
-
alias: "p",
|
|
109
|
-
description: "Only show public packages in workspaces"
|
|
110
|
-
}),
|
|
111
|
-
removeScope: zod.string().trim().default("").meta({ description: "Remove common workspace scope" }),
|
|
112
|
-
templates: templatesSchema.optional().default(defaultTemplates).describe("Handlebars templates used to fuel list and table generation"),
|
|
113
|
-
tocHeading: zod.string().trim().default("Table of contents").meta({ description: "Markdown heading used to generate table of contents" }),
|
|
114
|
-
usageFile: zod.string().trim().default("").meta({ description: "Workspace level usage file" }),
|
|
115
|
-
usageHeading: zod.string().trim().default("Usage").meta({ description: "Markdown heading used to generate usage example" }),
|
|
116
|
-
verbose: zod.boolean().default(false).meta({
|
|
117
|
-
alias: "v",
|
|
118
|
-
description: "whether or not to display verbose logging"
|
|
119
|
-
})
|
|
120
|
-
}).optional();
|
|
121
|
-
//#endregion
|
|
122
|
-
exports.actionsSchema = actionsSchema;
|
|
123
|
-
exports.configSchema = configSchema;
|
|
124
|
-
exports.defaultTableHeadings = defaultTableHeadings;
|
|
125
|
-
exports.defaultTemplates = defaultTemplates;
|
|
126
|
-
exports.formatsSchema = formatsSchema;
|
|
127
|
-
exports.languageSchema = languageSchema;
|
package/config/schema.d.cts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/schema.d.ts
|
|
4
|
-
declare const actionsSchema: z.ZodEnum<{
|
|
5
|
-
ACTION: "ACTION";
|
|
6
|
-
PKG: "PKG";
|
|
7
|
-
USAGE: "USAGE";
|
|
8
|
-
WORKSPACE: "WORKSPACE";
|
|
9
|
-
ZOD: "ZOD";
|
|
10
|
-
}>;
|
|
11
|
-
declare const formatsSchema: z.ZodDefault<z.ZodEnum<{
|
|
12
|
-
LIST: "LIST";
|
|
13
|
-
TABLE: "TABLE";
|
|
14
|
-
}>>;
|
|
15
|
-
declare const languageSchema: z.ZodDefault<z.ZodEnum<{
|
|
16
|
-
JS: "JS";
|
|
17
|
-
RS: "RS";
|
|
18
|
-
}>>;
|
|
19
|
-
declare const defaultTemplates: {
|
|
20
|
-
downloadImage: string;
|
|
21
|
-
emojis: Record<"description" | "default" | "devDependency" | "downloads" | "name" | "private" | "required" | "version", string>;
|
|
22
|
-
registryUrl: string;
|
|
23
|
-
versionImage: string;
|
|
24
|
-
};
|
|
25
|
-
declare const defaultTableHeadings: Record<"ACTION" | "PKG" | "USAGE" | "WORKSPACE" | "ZOD", ("description" | "default" | "devDependency" | "downloads" | "name" | "private" | "required" | "version")[] | undefined>;
|
|
26
|
-
declare const _configSchema: z.ZodObject<{
|
|
27
|
-
affectedRegexes: z.ZodArray<z.ZodString>;
|
|
28
|
-
collapseHeadings: z.ZodArray<z.ZodString>;
|
|
29
|
-
defaultLanguage: z.ZodDefault<z.ZodEnum<{
|
|
30
|
-
JS: "JS";
|
|
31
|
-
RS: "RS";
|
|
32
|
-
}>>;
|
|
33
|
-
disableEmojis: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
-
disableMarkdownHeadings: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
-
enablePrettier: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
-
enableToc: z.ZodDefault<z.ZodBoolean>;
|
|
37
|
-
enableUsage: z.ZodDefault<z.ZodBoolean>;
|
|
38
|
-
headings: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
39
|
-
ACTION: "ACTION";
|
|
40
|
-
PKG: "PKG";
|
|
41
|
-
USAGE: "USAGE";
|
|
42
|
-
WORKSPACE: "WORKSPACE";
|
|
43
|
-
ZOD: "ZOD";
|
|
44
|
-
}>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
45
|
-
description: "description";
|
|
46
|
-
default: "default";
|
|
47
|
-
devDependency: "devDependency";
|
|
48
|
-
downloads: "downloads";
|
|
49
|
-
name: "name";
|
|
50
|
-
private: "private";
|
|
51
|
-
required: "required";
|
|
52
|
-
version: "version";
|
|
53
|
-
}>>>>>>>;
|
|
54
|
-
onlyReadmes: z.ZodDefault<z.ZodBoolean>;
|
|
55
|
-
onlyShowPublicPackages: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
-
removeScope: z.ZodDefault<z.ZodString>;
|
|
57
|
-
templates: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
58
|
-
downloadImage: z.ZodDefault<z.ZodString>;
|
|
59
|
-
emojis: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
60
|
-
description: "description";
|
|
61
|
-
default: "default";
|
|
62
|
-
devDependency: "devDependency";
|
|
63
|
-
downloads: "downloads";
|
|
64
|
-
name: "name";
|
|
65
|
-
private: "private";
|
|
66
|
-
required: "required";
|
|
67
|
-
version: "version";
|
|
68
|
-
}>, z.ZodString>>;
|
|
69
|
-
registryUrl: z.ZodDefault<z.ZodString>;
|
|
70
|
-
versionImage: z.ZodDefault<z.ZodString>;
|
|
71
|
-
}, z.core.$strip>>>;
|
|
72
|
-
tocHeading: z.ZodDefault<z.ZodString>;
|
|
73
|
-
usageFile: z.ZodDefault<z.ZodString>;
|
|
74
|
-
usageHeading: z.ZodDefault<z.ZodString>;
|
|
75
|
-
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
76
|
-
}, z.core.$strip>;
|
|
77
|
-
declare const configSchema: z.ZodOptional<z.ZodObject<{
|
|
78
|
-
affectedRegexes: z.ZodArray<z.ZodString>;
|
|
79
|
-
collapseHeadings: z.ZodArray<z.ZodString>;
|
|
80
|
-
defaultLanguage: z.ZodDefault<z.ZodEnum<{
|
|
81
|
-
JS: "JS";
|
|
82
|
-
RS: "RS";
|
|
83
|
-
}>>;
|
|
84
|
-
disableEmojis: z.ZodDefault<z.ZodBoolean>;
|
|
85
|
-
disableMarkdownHeadings: z.ZodDefault<z.ZodBoolean>;
|
|
86
|
-
enablePrettier: z.ZodDefault<z.ZodBoolean>;
|
|
87
|
-
enableToc: z.ZodDefault<z.ZodBoolean>;
|
|
88
|
-
enableUsage: z.ZodDefault<z.ZodBoolean>;
|
|
89
|
-
headings: z.ZodDefault<z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
90
|
-
ACTION: "ACTION";
|
|
91
|
-
PKG: "PKG";
|
|
92
|
-
USAGE: "USAGE";
|
|
93
|
-
WORKSPACE: "WORKSPACE";
|
|
94
|
-
ZOD: "ZOD";
|
|
95
|
-
}>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
96
|
-
description: "description";
|
|
97
|
-
default: "default";
|
|
98
|
-
devDependency: "devDependency";
|
|
99
|
-
downloads: "downloads";
|
|
100
|
-
name: "name";
|
|
101
|
-
private: "private";
|
|
102
|
-
required: "required";
|
|
103
|
-
version: "version";
|
|
104
|
-
}>>>>>>>;
|
|
105
|
-
onlyReadmes: z.ZodDefault<z.ZodBoolean>;
|
|
106
|
-
onlyShowPublicPackages: z.ZodDefault<z.ZodBoolean>;
|
|
107
|
-
removeScope: z.ZodDefault<z.ZodString>;
|
|
108
|
-
templates: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
109
|
-
downloadImage: z.ZodDefault<z.ZodString>;
|
|
110
|
-
emojis: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
111
|
-
description: "description";
|
|
112
|
-
default: "default";
|
|
113
|
-
devDependency: "devDependency";
|
|
114
|
-
downloads: "downloads";
|
|
115
|
-
name: "name";
|
|
116
|
-
private: "private";
|
|
117
|
-
required: "required";
|
|
118
|
-
version: "version";
|
|
119
|
-
}>, z.ZodString>>;
|
|
120
|
-
registryUrl: z.ZodDefault<z.ZodString>;
|
|
121
|
-
versionImage: z.ZodDefault<z.ZodString>;
|
|
122
|
-
}, z.core.$strip>>>;
|
|
123
|
-
tocHeading: z.ZodDefault<z.ZodString>;
|
|
124
|
-
usageFile: z.ZodDefault<z.ZodString>;
|
|
125
|
-
usageHeading: z.ZodDefault<z.ZodString>;
|
|
126
|
-
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
127
|
-
}, z.core.$strip>>;
|
|
128
|
-
type Config = Partial<z.infer<typeof _configSchema>>;
|
|
129
|
-
//#endregion
|
|
130
|
-
export { Config, actionsSchema, configSchema, defaultTableHeadings, defaultTemplates, formatsSchema, languageSchema };
|
package/dist/index.d.cts
DELETED
|
File without changes
|
|
File without changes
|