meodp 0.0.9 → 0.2.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.
Files changed (61) hide show
  1. package/README.md +230 -21
  2. package/bin/index.mjs +10 -2
  3. package/dist/check/cli.cjs +257 -0
  4. package/dist/check/cli.d.cts +5 -0
  5. package/dist/check/cli.d.mts +5 -0
  6. package/dist/check/cli.d.ts +5 -0
  7. package/dist/check/cli.mjs +249 -0
  8. package/dist/check/index.cjs +29 -0
  9. package/dist/check/index.d.cts +44 -0
  10. package/dist/check/index.d.mts +44 -0
  11. package/dist/check/index.d.ts +44 -0
  12. package/dist/check/index.mjs +13 -0
  13. package/dist/cli/index.cjs +2 -2
  14. package/dist/cli/index.d.cts +1 -1
  15. package/dist/cli/index.d.mts +1 -1
  16. package/dist/cli/index.d.ts +1 -1
  17. package/dist/cli/index.mjs +2 -2
  18. package/dist/cli/main.cjs +272 -0
  19. package/dist/cli/main.d.cts +4 -0
  20. package/dist/cli/main.d.mts +4 -0
  21. package/dist/cli/main.d.ts +4 -0
  22. package/dist/cli/main.mjs +266 -0
  23. package/dist/config/index.cjs +7 -0
  24. package/dist/config/index.d.cts +47 -0
  25. package/dist/config/index.d.mts +47 -0
  26. package/dist/config/index.d.ts +47 -0
  27. package/dist/config/index.mjs +5 -0
  28. package/dist/notify/cli.cjs +107 -0
  29. package/dist/notify/cli.d.cts +3 -0
  30. package/dist/notify/cli.d.mts +3 -0
  31. package/dist/notify/cli.d.ts +3 -0
  32. package/dist/notify/cli.mjs +101 -0
  33. package/dist/notify/email.cjs +38 -0
  34. package/dist/notify/email.d.cts +29 -0
  35. package/dist/notify/email.d.mts +29 -0
  36. package/dist/notify/email.d.ts +29 -0
  37. package/dist/notify/email.mjs +35 -0
  38. package/dist/notify/feishu.cjs +162 -0
  39. package/dist/notify/feishu.d.cts +74 -0
  40. package/dist/notify/feishu.d.mts +74 -0
  41. package/dist/notify/feishu.d.ts +74 -0
  42. package/dist/notify/feishu.mjs +157 -0
  43. package/dist/notify/index.cjs +64 -0
  44. package/dist/notify/index.d.cts +27 -0
  45. package/dist/notify/index.d.mts +27 -0
  46. package/dist/notify/index.d.ts +27 -0
  47. package/dist/notify/index.mjs +62 -0
  48. package/dist/shared/meodp.2b00b0ae.cjs +228 -0
  49. package/dist/shared/meodp.4f1da070.d.cts +41 -0
  50. package/dist/shared/meodp.63483e20.cjs +30 -0
  51. package/dist/shared/meodp.80ff918d.mjs +465 -0
  52. package/dist/shared/meodp.8369c4c1.d.ts +41 -0
  53. package/dist/shared/meodp.93e06e00.d.cts +64 -0
  54. package/dist/shared/meodp.93e06e00.d.mts +64 -0
  55. package/dist/shared/meodp.93e06e00.d.ts +64 -0
  56. package/dist/shared/meodp.9c706389.mjs +220 -0
  57. package/dist/shared/meodp.a704f8db.d.mts +41 -0
  58. package/dist/shared/meodp.c4c70565.cjs +477 -0
  59. package/dist/shared/meodp.f96d0510.mjs +24 -0
  60. package/package.json +104 -31
  61. package/bin/index.ts +0 -6
@@ -0,0 +1,272 @@
1
+ 'use strict';
2
+
3
+ const process = require('node:process');
4
+
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
6
+
7
+ const process__default = /*#__PURE__*/_interopDefaultCompat(process);
8
+
9
+ const name = "meodp";
10
+ const type = "module";
11
+ const version = "0.2.0";
12
+ const description = "Check website and friend-link availability with sitemap discovery, history, and portable reports.";
13
+ const author = {
14
+ name: "YunYouJun",
15
+ url: "https://www.yunyoujun.cn"
16
+ };
17
+ const license = "MIT";
18
+ const homepage = "https://yunyoujun.github.io/meodp/";
19
+ const repository = {
20
+ type: "git",
21
+ url: "git+https://github.com/YunYouJun/meodp.git",
22
+ directory: "packages/meodp"
23
+ };
24
+ const bugs = {
25
+ url: "https://github.com/YunYouJun/meodp/issues"
26
+ };
27
+ const keywords = [
28
+ "meodp",
29
+ "link-checker",
30
+ "broken-links",
31
+ "sitemap",
32
+ "friend-links",
33
+ "cli"
34
+ ];
35
+ const exports$1 = {
36
+ ".": {
37
+ types: "./dist/index.d.ts",
38
+ "import": "./dist/index.mjs",
39
+ require: "./dist/index.cjs"
40
+ },
41
+ "./check": {
42
+ "import": {
43
+ types: "./dist/check/index.d.mts",
44
+ "default": "./dist/check/index.mjs"
45
+ },
46
+ require: {
47
+ types: "./dist/check/index.d.cts",
48
+ "default": "./dist/check/index.cjs"
49
+ }
50
+ },
51
+ "./config": {
52
+ "import": {
53
+ types: "./dist/config/index.d.mts",
54
+ "default": "./dist/config/index.mjs"
55
+ },
56
+ require: {
57
+ types: "./dist/config/index.d.cts",
58
+ "default": "./dist/config/index.cjs"
59
+ }
60
+ },
61
+ "./notify": {
62
+ "import": {
63
+ types: "./dist/notify/index.d.mts",
64
+ "default": "./dist/notify/index.mjs"
65
+ },
66
+ require: {
67
+ types: "./dist/notify/index.d.cts",
68
+ "default": "./dist/notify/index.cjs"
69
+ }
70
+ },
71
+ "./notify/feishu": {
72
+ "import": {
73
+ types: "./dist/notify/feishu.d.mts",
74
+ "default": "./dist/notify/feishu.mjs"
75
+ },
76
+ require: {
77
+ types: "./dist/notify/feishu.d.cts",
78
+ "default": "./dist/notify/feishu.cjs"
79
+ }
80
+ },
81
+ "./notify/email": {
82
+ "import": {
83
+ types: "./dist/notify/email.d.mts",
84
+ "default": "./dist/notify/email.mjs"
85
+ },
86
+ require: {
87
+ types: "./dist/notify/email.d.cts",
88
+ "default": "./dist/notify/email.cjs"
89
+ }
90
+ }
91
+ };
92
+ const main = "./dist/index.mjs";
93
+ const module$1 = "./dist/index.mjs";
94
+ const types = "./dist/index.d.ts";
95
+ const bin = {
96
+ meodp: "bin/index.mjs"
97
+ };
98
+ const files = [
99
+ "bin/index.mjs",
100
+ "dist"
101
+ ];
102
+ const engines = {
103
+ node: ">=22.19.0"
104
+ };
105
+ const scripts = {
106
+ build: "tsx scripts/build-report-viewer.ts && unbuild",
107
+ dev: "tsx scripts/build-report-viewer.ts && unbuild --stub",
108
+ test: "tsx scripts/build-report-viewer.ts && tsx --test test/*.test.ts",
109
+ "test:e2e": "tsx scripts/build-report-viewer.ts && playwright test",
110
+ typecheck: "tsx scripts/build-report-viewer.ts && tsc --noEmit -p tsconfig.json",
111
+ prepack: "npm run build",
112
+ release: "npm version --no-git-tag-version"
113
+ };
114
+ const peerDependencies = {
115
+ nodemailer: "^10.0.3",
116
+ playwright: "^1",
117
+ typescript: "^5.0.0"
118
+ };
119
+ const peerDependenciesMeta = {
120
+ nodemailer: {
121
+ optional: true
122
+ },
123
+ playwright: {
124
+ optional: true
125
+ },
126
+ typescript: {
127
+ optional: true
128
+ }
129
+ };
130
+ const dependencies = {
131
+ c12: "^2.0.1",
132
+ "cli-progress": "^3.12.0",
133
+ consola: "^3.2.3",
134
+ "date-fns": "^4.1.0",
135
+ "fast-xml-parser": "^5.11.1",
136
+ "fs-extra": "^11.2.0",
137
+ "js-yaml": "^4.1.0",
138
+ linkinator: "^8.1.0",
139
+ lowdb: "^7.0.1",
140
+ "markdown-table": "^3.0.4",
141
+ "p-queue": "^8.0.1",
142
+ "strip-ansi": "^7.1.0",
143
+ winston: "^3.17.0",
144
+ yargs: "^17.7.2"
145
+ };
146
+ const devDependencies = {
147
+ "@playwright/test": "^1.48.2",
148
+ "@types/bun": "latest",
149
+ "@types/cli-progress": "^3.11.6",
150
+ "@types/fs-extra": "^11.0.4",
151
+ "@types/js-yaml": "^4.0.9",
152
+ "@types/node": "^22.9.0",
153
+ "@types/nodemailer": "^8.0.1",
154
+ "@types/yargs": "^17.0.33",
155
+ cilicili: "^0.1.1",
156
+ esbuild: "^0.28.2",
157
+ nodemailer: "^10.0.3",
158
+ playwright: "^1.48.2",
159
+ tsx: "^4.19.2",
160
+ unbuild: "^2.0.0",
161
+ "vite-node": "^2.1.4"
162
+ };
163
+ const publishConfig = {
164
+ access: "public",
165
+ registry: "https://registry.npmjs.org/"
166
+ };
167
+ const pkg = {
168
+ name: name,
169
+ type: type,
170
+ version: version,
171
+ description: description,
172
+ author: author,
173
+ license: license,
174
+ homepage: homepage,
175
+ repository: repository,
176
+ bugs: bugs,
177
+ keywords: keywords,
178
+ exports: exports$1,
179
+ main: main,
180
+ module: module$1,
181
+ types: types,
182
+ bin: bin,
183
+ files: files,
184
+ engines: engines,
185
+ scripts: scripts,
186
+ peerDependencies: peerDependencies,
187
+ peerDependenciesMeta: peerDependenciesMeta,
188
+ dependencies: dependencies,
189
+ devDependencies: devDependencies,
190
+ publishConfig: publishConfig
191
+ };
192
+
193
+ const help = `Usage: meodp <command> [options]
194
+
195
+ Commands:
196
+ check <links.json|links.yml> Request listed HTTP(S) URLs and write fresh reports
197
+ sitemap <sitemap-url> Check pages listed in an XML sitemap or nested index
198
+ report [report.json] Render saved data using JSON, Markdown or HTML reporters
199
+ notify Send configured report notifications; supports --dry-run
200
+ scan [root] Run the legacy browser scanner using meodp.config.ts
201
+ export [root] Export a legacy browser-scan report
202
+
203
+ Options:
204
+ -h, --help Show this help
205
+ -v, --version Show the package version
206
+
207
+ Examples:
208
+ meodp check links.yml --output reports/links
209
+ meodp sitemap https://example.com/sitemap.xml --output reports/pages
210
+ meodp report reports/links/report.json --output reports/site
211
+ meodp report reports/links/report.json --reporter json,markdown,html
212
+ meodp check --help
213
+ meodp help report
214
+
215
+ check, sitemap, and scan initiate site checks. scan requires Playwright.
216
+ Running meodp without arguments shows help; no scan starts automatically.
217
+ `;
218
+ async function runCli(args = process__default.argv.slice(2)) {
219
+ try {
220
+ const [command, ...rest] = args;
221
+ if (!command || command === "--help" || command === "-h") {
222
+ if (rest.length)
223
+ throw new Error("Use meodp <command> --help for command-specific help");
224
+ console.log(help);
225
+ return 0;
226
+ }
227
+ if (command === "--version" || command === "-v") {
228
+ if (rest.length)
229
+ throw new Error("--version does not accept additional arguments");
230
+ console.log(pkg.version);
231
+ return 0;
232
+ }
233
+ if (command === "help") {
234
+ if (!rest.length)
235
+ return runCli(["--help"]);
236
+ if (rest.length !== 1 || !["check", "sitemap", "report", "notify", "scan", "export"].includes(rest[0]))
237
+ throw new Error("Use meodp help <check|sitemap|report|notify|scan|export>");
238
+ return runCli([rest[0], "--help"]);
239
+ }
240
+ if (command === "notify") {
241
+ const { runNotifyCli } = await import('../notify/cli.cjs');
242
+ return runNotifyCli(rest);
243
+ }
244
+ if (command === "check") {
245
+ const { runCheckCli } = await import('../check/cli.cjs');
246
+ return runCheckCli(rest);
247
+ }
248
+ if (command === "report") {
249
+ const { runReportCli } = await import('../check/cli.cjs');
250
+ return runReportCli(rest);
251
+ }
252
+ if (command === "sitemap") {
253
+ const { runSitemapCli } = await import('../check/cli.cjs');
254
+ return runSitemapCli(rest);
255
+ }
256
+ if (command === "scan" || command === "export") {
257
+ if (rest.includes("--help") || rest.includes("-h")) {
258
+ console.log(command === "scan" ? "Usage: meodp scan [root]\n\nRun the legacy Playwright scanner with meodp.config.ts in root (default: .).\nThis starts browser/network activity and uses the legacy configuration and reports." : "Usage: meodp export [root] [--type md|html]\n\nExport the legacy browser scanner's stored data.\nFor a schemaVersion: 1 report.json, use meodp report instead.");
259
+ return 0;
260
+ }
261
+ const { run } = await import('./index.cjs');
262
+ await run(command === "scan" ? rest : ["export", ...rest], command === "scan" ? "meodp scan" : "meodp");
263
+ return 0;
264
+ }
265
+ throw new Error(`Unknown command ${JSON.stringify(command)}. Use meodp --help. For the legacy scanner, use meodp scan [root].`);
266
+ } catch (error) {
267
+ console.error(`meodp: ${error instanceof Error ? error.message : String(error)}`);
268
+ return 2;
269
+ }
270
+ }
271
+
272
+ exports.runCli = runCli;
@@ -0,0 +1,4 @@
1
+ /** Keep command discovery independent of optional browser dependencies. */
2
+ declare function runCli(args?: string[]): Promise<number>;
3
+
4
+ export { runCli };
@@ -0,0 +1,4 @@
1
+ /** Keep command discovery independent of optional browser dependencies. */
2
+ declare function runCli(args?: string[]): Promise<number>;
3
+
4
+ export { runCli };
@@ -0,0 +1,4 @@
1
+ /** Keep command discovery independent of optional browser dependencies. */
2
+ declare function runCli(args?: string[]): Promise<number>;
3
+
4
+ export { runCli };
@@ -0,0 +1,266 @@
1
+ import process from 'node:process';
2
+
3
+ const name = "meodp";
4
+ const type = "module";
5
+ const version = "0.2.0";
6
+ const description = "Check website and friend-link availability with sitemap discovery, history, and portable reports.";
7
+ const author = {
8
+ name: "YunYouJun",
9
+ url: "https://www.yunyoujun.cn"
10
+ };
11
+ const license = "MIT";
12
+ const homepage = "https://yunyoujun.github.io/meodp/";
13
+ const repository = {
14
+ type: "git",
15
+ url: "git+https://github.com/YunYouJun/meodp.git",
16
+ directory: "packages/meodp"
17
+ };
18
+ const bugs = {
19
+ url: "https://github.com/YunYouJun/meodp/issues"
20
+ };
21
+ const keywords = [
22
+ "meodp",
23
+ "link-checker",
24
+ "broken-links",
25
+ "sitemap",
26
+ "friend-links",
27
+ "cli"
28
+ ];
29
+ const exports = {
30
+ ".": {
31
+ types: "./dist/index.d.ts",
32
+ "import": "./dist/index.mjs",
33
+ require: "./dist/index.cjs"
34
+ },
35
+ "./check": {
36
+ "import": {
37
+ types: "./dist/check/index.d.mts",
38
+ "default": "./dist/check/index.mjs"
39
+ },
40
+ require: {
41
+ types: "./dist/check/index.d.cts",
42
+ "default": "./dist/check/index.cjs"
43
+ }
44
+ },
45
+ "./config": {
46
+ "import": {
47
+ types: "./dist/config/index.d.mts",
48
+ "default": "./dist/config/index.mjs"
49
+ },
50
+ require: {
51
+ types: "./dist/config/index.d.cts",
52
+ "default": "./dist/config/index.cjs"
53
+ }
54
+ },
55
+ "./notify": {
56
+ "import": {
57
+ types: "./dist/notify/index.d.mts",
58
+ "default": "./dist/notify/index.mjs"
59
+ },
60
+ require: {
61
+ types: "./dist/notify/index.d.cts",
62
+ "default": "./dist/notify/index.cjs"
63
+ }
64
+ },
65
+ "./notify/feishu": {
66
+ "import": {
67
+ types: "./dist/notify/feishu.d.mts",
68
+ "default": "./dist/notify/feishu.mjs"
69
+ },
70
+ require: {
71
+ types: "./dist/notify/feishu.d.cts",
72
+ "default": "./dist/notify/feishu.cjs"
73
+ }
74
+ },
75
+ "./notify/email": {
76
+ "import": {
77
+ types: "./dist/notify/email.d.mts",
78
+ "default": "./dist/notify/email.mjs"
79
+ },
80
+ require: {
81
+ types: "./dist/notify/email.d.cts",
82
+ "default": "./dist/notify/email.cjs"
83
+ }
84
+ }
85
+ };
86
+ const main = "./dist/index.mjs";
87
+ const module = "./dist/index.mjs";
88
+ const types = "./dist/index.d.ts";
89
+ const bin = {
90
+ meodp: "bin/index.mjs"
91
+ };
92
+ const files = [
93
+ "bin/index.mjs",
94
+ "dist"
95
+ ];
96
+ const engines = {
97
+ node: ">=22.19.0"
98
+ };
99
+ const scripts = {
100
+ build: "tsx scripts/build-report-viewer.ts && unbuild",
101
+ dev: "tsx scripts/build-report-viewer.ts && unbuild --stub",
102
+ test: "tsx scripts/build-report-viewer.ts && tsx --test test/*.test.ts",
103
+ "test:e2e": "tsx scripts/build-report-viewer.ts && playwright test",
104
+ typecheck: "tsx scripts/build-report-viewer.ts && tsc --noEmit -p tsconfig.json",
105
+ prepack: "npm run build",
106
+ release: "npm version --no-git-tag-version"
107
+ };
108
+ const peerDependencies = {
109
+ nodemailer: "^10.0.3",
110
+ playwright: "^1",
111
+ typescript: "^5.0.0"
112
+ };
113
+ const peerDependenciesMeta = {
114
+ nodemailer: {
115
+ optional: true
116
+ },
117
+ playwright: {
118
+ optional: true
119
+ },
120
+ typescript: {
121
+ optional: true
122
+ }
123
+ };
124
+ const dependencies = {
125
+ c12: "^2.0.1",
126
+ "cli-progress": "^3.12.0",
127
+ consola: "^3.2.3",
128
+ "date-fns": "^4.1.0",
129
+ "fast-xml-parser": "^5.11.1",
130
+ "fs-extra": "^11.2.0",
131
+ "js-yaml": "^4.1.0",
132
+ linkinator: "^8.1.0",
133
+ lowdb: "^7.0.1",
134
+ "markdown-table": "^3.0.4",
135
+ "p-queue": "^8.0.1",
136
+ "strip-ansi": "^7.1.0",
137
+ winston: "^3.17.0",
138
+ yargs: "^17.7.2"
139
+ };
140
+ const devDependencies = {
141
+ "@playwright/test": "^1.48.2",
142
+ "@types/bun": "latest",
143
+ "@types/cli-progress": "^3.11.6",
144
+ "@types/fs-extra": "^11.0.4",
145
+ "@types/js-yaml": "^4.0.9",
146
+ "@types/node": "^22.9.0",
147
+ "@types/nodemailer": "^8.0.1",
148
+ "@types/yargs": "^17.0.33",
149
+ cilicili: "^0.1.1",
150
+ esbuild: "^0.28.2",
151
+ nodemailer: "^10.0.3",
152
+ playwright: "^1.48.2",
153
+ tsx: "^4.19.2",
154
+ unbuild: "^2.0.0",
155
+ "vite-node": "^2.1.4"
156
+ };
157
+ const publishConfig = {
158
+ access: "public",
159
+ registry: "https://registry.npmjs.org/"
160
+ };
161
+ const pkg = {
162
+ name: name,
163
+ type: type,
164
+ version: version,
165
+ description: description,
166
+ author: author,
167
+ license: license,
168
+ homepage: homepage,
169
+ repository: repository,
170
+ bugs: bugs,
171
+ keywords: keywords,
172
+ exports: exports,
173
+ main: main,
174
+ module: module,
175
+ types: types,
176
+ bin: bin,
177
+ files: files,
178
+ engines: engines,
179
+ scripts: scripts,
180
+ peerDependencies: peerDependencies,
181
+ peerDependenciesMeta: peerDependenciesMeta,
182
+ dependencies: dependencies,
183
+ devDependencies: devDependencies,
184
+ publishConfig: publishConfig
185
+ };
186
+
187
+ const help = `Usage: meodp <command> [options]
188
+
189
+ Commands:
190
+ check <links.json|links.yml> Request listed HTTP(S) URLs and write fresh reports
191
+ sitemap <sitemap-url> Check pages listed in an XML sitemap or nested index
192
+ report [report.json] Render saved data using JSON, Markdown or HTML reporters
193
+ notify Send configured report notifications; supports --dry-run
194
+ scan [root] Run the legacy browser scanner using meodp.config.ts
195
+ export [root] Export a legacy browser-scan report
196
+
197
+ Options:
198
+ -h, --help Show this help
199
+ -v, --version Show the package version
200
+
201
+ Examples:
202
+ meodp check links.yml --output reports/links
203
+ meodp sitemap https://example.com/sitemap.xml --output reports/pages
204
+ meodp report reports/links/report.json --output reports/site
205
+ meodp report reports/links/report.json --reporter json,markdown,html
206
+ meodp check --help
207
+ meodp help report
208
+
209
+ check, sitemap, and scan initiate site checks. scan requires Playwright.
210
+ Running meodp without arguments shows help; no scan starts automatically.
211
+ `;
212
+ async function runCli(args = process.argv.slice(2)) {
213
+ try {
214
+ const [command, ...rest] = args;
215
+ if (!command || command === "--help" || command === "-h") {
216
+ if (rest.length)
217
+ throw new Error("Use meodp <command> --help for command-specific help");
218
+ console.log(help);
219
+ return 0;
220
+ }
221
+ if (command === "--version" || command === "-v") {
222
+ if (rest.length)
223
+ throw new Error("--version does not accept additional arguments");
224
+ console.log(pkg.version);
225
+ return 0;
226
+ }
227
+ if (command === "help") {
228
+ if (!rest.length)
229
+ return runCli(["--help"]);
230
+ if (rest.length !== 1 || !["check", "sitemap", "report", "notify", "scan", "export"].includes(rest[0]))
231
+ throw new Error("Use meodp help <check|sitemap|report|notify|scan|export>");
232
+ return runCli([rest[0], "--help"]);
233
+ }
234
+ if (command === "notify") {
235
+ const { runNotifyCli } = await import('../notify/cli.mjs');
236
+ return runNotifyCli(rest);
237
+ }
238
+ if (command === "check") {
239
+ const { runCheckCli } = await import('../check/cli.mjs');
240
+ return runCheckCli(rest);
241
+ }
242
+ if (command === "report") {
243
+ const { runReportCli } = await import('../check/cli.mjs');
244
+ return runReportCli(rest);
245
+ }
246
+ if (command === "sitemap") {
247
+ const { runSitemapCli } = await import('../check/cli.mjs');
248
+ return runSitemapCli(rest);
249
+ }
250
+ if (command === "scan" || command === "export") {
251
+ if (rest.includes("--help") || rest.includes("-h")) {
252
+ console.log(command === "scan" ? "Usage: meodp scan [root]\n\nRun the legacy Playwright scanner with meodp.config.ts in root (default: .).\nThis starts browser/network activity and uses the legacy configuration and reports." : "Usage: meodp export [root] [--type md|html]\n\nExport the legacy browser scanner's stored data.\nFor a schemaVersion: 1 report.json, use meodp report instead.");
253
+ return 0;
254
+ }
255
+ const { run } = await import('./index.mjs');
256
+ await run(command === "scan" ? rest : ["export", ...rest], command === "scan" ? "meodp scan" : "meodp");
257
+ return 0;
258
+ }
259
+ throw new Error(`Unknown command ${JSON.stringify(command)}. Use meodp --help. For the legacy scanner, use meodp scan [root].`);
260
+ } catch (error) {
261
+ console.error(`meodp: ${error instanceof Error ? error.message : String(error)}`);
262
+ return 2;
263
+ }
264
+ }
265
+
266
+ export { runCli };
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ function defineConfig(config) {
4
+ return config;
5
+ }
6
+
7
+ exports.defineConfig = defineConfig;
@@ -0,0 +1,47 @@
1
+ import { R as ReporterConfig, a as ReportVerificationOptions } from '../shared/meodp.4f1da070.cjs';
2
+ import { S as SitemapOptions } from '../shared/meodp.93e06e00.cjs';
3
+ import { EmailOptions } from '../notify/email.cjs';
4
+ import { FeishuOptions } from '../notify/feishu.cjs';
5
+ import { NotificationOptions } from '../notify/index.cjs';
6
+
7
+ interface ScanConfig extends Omit<SitemapOptions, 'previousReport' | 'onResult'> {
8
+ input?: string;
9
+ reporter?: ReporterConfig;
10
+ output?: string;
11
+ history?: string;
12
+ /** Seed missing history from a committed snapshot. */
13
+ historySeed?: string;
14
+ observerMismatch?: 'error' | 'reset';
15
+ site?: string;
16
+ failOn?: 'unavailable' | 'review' | 'none';
17
+ }
18
+ interface NotificationConfig extends Omit<NotificationOptions, 'previousReport' | 'mode'> {
19
+ input: string;
20
+ previousReport?: string;
21
+ timeZone?: string;
22
+ maxItems?: number;
23
+ feishu?: FeishuOptions & {
24
+ mode?: NotificationOptions['mode'];
25
+ };
26
+ email?: EmailOptions & {
27
+ mode?: NotificationOptions['mode'];
28
+ };
29
+ }
30
+ interface MeodpConfig {
31
+ /** Shared reporters; command sections may override this selection. */
32
+ reporter?: ReporterConfig;
33
+ check?: ScanConfig;
34
+ sitemap?: ScanConfig;
35
+ report?: {
36
+ reporter?: ReporterConfig;
37
+ input?: string;
38
+ output?: string;
39
+ dataUrl?: string;
40
+ verify?: ReportVerificationOptions;
41
+ };
42
+ notify?: NotificationConfig;
43
+ }
44
+ /** Lightweight configuration entry; importing it does not load browser or mail clients. */
45
+ declare function defineConfig<const T extends MeodpConfig>(config: T): T;
46
+
47
+ export { type MeodpConfig, type NotificationConfig, type ScanConfig, defineConfig };
@@ -0,0 +1,47 @@
1
+ import { R as ReporterConfig, a as ReportVerificationOptions } from '../shared/meodp.a704f8db.mjs';
2
+ import { S as SitemapOptions } from '../shared/meodp.93e06e00.mjs';
3
+ import { EmailOptions } from '../notify/email.mjs';
4
+ import { FeishuOptions } from '../notify/feishu.mjs';
5
+ import { NotificationOptions } from '../notify/index.mjs';
6
+
7
+ interface ScanConfig extends Omit<SitemapOptions, 'previousReport' | 'onResult'> {
8
+ input?: string;
9
+ reporter?: ReporterConfig;
10
+ output?: string;
11
+ history?: string;
12
+ /** Seed missing history from a committed snapshot. */
13
+ historySeed?: string;
14
+ observerMismatch?: 'error' | 'reset';
15
+ site?: string;
16
+ failOn?: 'unavailable' | 'review' | 'none';
17
+ }
18
+ interface NotificationConfig extends Omit<NotificationOptions, 'previousReport' | 'mode'> {
19
+ input: string;
20
+ previousReport?: string;
21
+ timeZone?: string;
22
+ maxItems?: number;
23
+ feishu?: FeishuOptions & {
24
+ mode?: NotificationOptions['mode'];
25
+ };
26
+ email?: EmailOptions & {
27
+ mode?: NotificationOptions['mode'];
28
+ };
29
+ }
30
+ interface MeodpConfig {
31
+ /** Shared reporters; command sections may override this selection. */
32
+ reporter?: ReporterConfig;
33
+ check?: ScanConfig;
34
+ sitemap?: ScanConfig;
35
+ report?: {
36
+ reporter?: ReporterConfig;
37
+ input?: string;
38
+ output?: string;
39
+ dataUrl?: string;
40
+ verify?: ReportVerificationOptions;
41
+ };
42
+ notify?: NotificationConfig;
43
+ }
44
+ /** Lightweight configuration entry; importing it does not load browser or mail clients. */
45
+ declare function defineConfig<const T extends MeodpConfig>(config: T): T;
46
+
47
+ export { type MeodpConfig, type NotificationConfig, type ScanConfig, defineConfig };