@stephansama/auto-readme 0.2.9 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stephansama/auto-readme",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Generate lists and tables for your README automagically based on your repository and comments",
5
5
  "keywords": [
6
6
  "auto",
@@ -27,44 +27,45 @@
27
27
  "sideEffects": false,
28
28
  "type": "module",
29
29
  "exports": {
30
- ".": {
31
- "import": "./config/schema.mjs",
32
- "require": "./config/schema.cjs"
33
- },
34
- "./package.json": "./package.json"
30
+ ".": "./dist/index.mjs",
31
+ "./cli": "./dist/cli.mjs",
32
+ "./package.json": "./package.json",
33
+ "./schema": "./dist/schema.mjs",
34
+ "./schema.json": "./dist/schema.json"
35
+ },
36
+ "main": "./dist/index.mjs",
37
+ "module": "./dist/index.mjs",
38
+ "types": "./dist/index.d.mts",
39
+ "bin": {
40
+ "auto-readme": "./dist/cli.mjs"
35
41
  },
36
- "main": "./config/schema.cjs",
37
- "module": "./config/schema.mjs",
38
- "types": "./config/schema.d.cts",
39
- "bin": "./cli.mjs",
40
42
  "files": [
41
- "./dist",
42
- "./config"
43
+ "./dist"
43
44
  ],
44
45
  "dependencies": {
45
46
  "@manypkg/get-packages": "3.1.0",
46
47
  "cosmiconfig": "9.0.0",
47
48
  "deepmerge": "4.3.1",
48
49
  "handlebars": "4.7.9",
49
- "markdown-table": "^3.0.4",
50
+ "markdown-table": "3.0.4",
50
51
  "mdast": "3.0.0",
51
- "mdast-comment-marker": "^3.0.0",
52
- "mdast-util-from-markdown": "^2.0.2",
52
+ "mdast-comment-marker": "3.0.0",
53
+ "mdast-util-from-markdown": "2.0.2",
53
54
  "mdast-zone": "github:stephansama/mdast-zone#1c5b08cd97240debeed4c9c6afad49df5877a132",
54
55
  "obug": "2.1.1",
55
- "pkg-types": "^2.3.0",
56
+ "pkg-types": "2.3.0",
56
57
  "remark": "15.0.1",
57
- "remark-code-import": "^1.2.0",
58
- "remark-collapse": "^0.1.2",
59
- "remark-toc": "^9.0.0",
60
- "remark-usage": "^11.0.1",
58
+ "remark-code-import": "1.2.0",
59
+ "remark-collapse": "0.1.2",
60
+ "remark-toc": "9.0.0",
61
+ "remark-usage": "11.0.1",
61
62
  "smol-toml": "1.6.1",
62
63
  "tinyglobby": "0.2.16",
63
- "vfile": "^6.0.3",
64
- "yaml": "^2.8.2",
64
+ "vfile": "6.0.3",
65
+ "yaml": "2.8.2",
65
66
  "yargs": "18.0.0",
66
67
  "zod": "4.2.1",
67
- "zod2md": "^0.2.5"
68
+ "zod2md": "0.2.5"
68
69
  },
69
70
  "devDependencies": {
70
71
  "@types/mdast": "4.0.4",
@@ -82,9 +83,9 @@
82
83
  "provenance": true
83
84
  },
84
85
  "scripts": {
85
- "build": "node build.mjs",
86
+ "build": "tsdown",
86
87
  "postbuild": "publint",
87
- "dev": "node --watch-path=./src build.mjs",
88
+ "dev": "tsdown --watch",
88
89
  "lint": "eslint ./src/ --pass-on-no-patterns --no-error-on-unmatched-pattern",
89
90
  "lint:fix": "eslint ./src/ --pass-on-no-patterns --no-error-on-unmatched-pattern --fix"
90
91
  }
package/cli.mjs DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const cli = await import("./dist/index.mjs");
4
- await cli.run();
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;
@@ -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
@@ -1,4 +0,0 @@
1
- //#region src/index.d.ts
2
- declare function run(): Promise<void>;
3
- //#endregion
4
- export { run };
File without changes
File without changes