@pecot/visual-mcp 1.1.0 → 1.3.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.
- package/.claude-plugin/plugin.json +1 -1
- package/assets/slidev/deck-lint.config.js +2 -2
- package/assets/slidev/deck-lint.env.config.js +2 -2
- package/assets/slidev/package.json +7 -7
- package/assets/slidev/runtime/package.json +11 -11
- package/assets/slidev/scripts/eslint/_shared/dist/lib/drawio-geometry.js +10 -10
- package/assets/slidev/scripts/eslint/_shared/dist/lib/text-measurer.d.ts +2 -2
- package/assets/slidev/scripts/eslint/_shared/dist/lib/text-measurer.js +4 -4
- package/assets/slidev/scripts/eslint/_shared/dist/tsconfig.tsbuildinfo +1 -1
- package/assets/slidev/scripts/eslint/_shared/lib/drawio-geometry.ts +10 -10
- package/assets/slidev/scripts/eslint/_shared/lib/text-measurer.ts +4 -4
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-content-before-frontmatter.js +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-missing-marker-cell.js +4 -4
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-missing-page.js +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-numeric-asset-prefix.js +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-numeric-filename-prefix.js +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-scaled-drawio.js +3 -3
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-triple-hyphen-in-frontmatter.js +3 -3
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/no-unknown-props.js +3 -3
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/one-slide-per-file.js +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/require-matching-length.js +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/require-slides-entry.js +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/lib/rules/validate-clicks.js +7 -7
- package/assets/slidev/scripts/eslint/slidev-pages-lint/dist/tsconfig.tsbuildinfo +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-content-before-frontmatter.ts +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-missing-marker-cell.ts +4 -4
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-missing-page.ts +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-numeric-asset-prefix.ts +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-numeric-filename-prefix.ts +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-scaled-drawio.ts +3 -3
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-triple-hyphen-in-frontmatter.ts +3 -3
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/no-unknown-props.ts +3 -3
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/one-slide-per-file.ts +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/require-matching-length.ts +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/require-slides-entry.ts +1 -1
- package/assets/slidev/scripts/eslint/slidev-pages-lint/lib/rules/validate-clicks.ts +7 -7
- package/assets/slidev/scripts/eslint/slidev-pages-lint/package.json +1 -1
- package/assets/slidev/scripts/eslint/text-constraints/dist/lib/rules/max-chars.js +6 -6
- package/assets/slidev/scripts/eslint/text-constraints/dist/lib/rules/textlint-body.js +3 -3
- package/assets/slidev/scripts/eslint/text-constraints/dist/lib/rules/textlint.js +2 -2
- package/assets/slidev/scripts/eslint/text-constraints/dist/tsconfig.tsbuildinfo +1 -1
- package/assets/slidev/scripts/eslint/text-constraints/lib/rules/max-chars.ts +6 -6
- package/assets/slidev/scripts/eslint/text-constraints/lib/rules/textlint-body.ts +3 -3
- package/assets/slidev/scripts/eslint/text-constraints/lib/rules/textlint.ts +2 -2
- package/assets/slidev/scripts/eslint/text-constraints/package.json +1 -1
- package/assets/slidev/scripts/eslint/validate-references/dist/index.js +1 -1
- package/assets/slidev/scripts/eslint/validate-references/dist/lib/schema-validator.js +1 -1
- package/assets/slidev/scripts/eslint/validate-references/dist/lib/semantic-validator.js +12 -12
- package/assets/slidev/scripts/eslint/validate-references/dist/tsconfig.tsbuildinfo +1 -1
- package/assets/slidev/scripts/eslint/validate-references/index.ts +1 -1
- package/assets/slidev/scripts/eslint/validate-references/lib/schema-validator.ts +2 -2
- package/assets/slidev/scripts/eslint/validate-references/lib/semantic-validator.ts +12 -12
- package/assets/slidev/scripts/eslint/validate-references/package.json +1 -1
- package/cli/dist/cli.js +11 -10
- package/cli/dist/commands/chromium/host-dependencies.js +14 -7
- package/cli/dist/commands/drawio/export.js +27 -24
- package/cli/dist/commands/drawio/theme.js +8 -8
- package/cli/dist/commands/drawio/url.js +40 -32
- package/cli/dist/commands/evidence-xlsx/create.js +19 -18
- package/cli/dist/commands/pptx-ooxml/preview.js +26 -30
- package/cli/dist/commands/slidev-project/create.js +27 -26
- package/cli/dist/commands/slidev-project/linked-theme.js +5 -5
- package/cli/dist/commands/slidev-project/lint.js +29 -27
- package/cli/dist/commands/slidev-project/sync.js +35 -34
- package/cli/dist/commands/slidev-project/theme.js +19 -18
- package/cli/dist/commands/slidev-to-pptx/convert.d.ts +4 -0
- package/cli/dist/commands/slidev-to-pptx/convert.js +88 -75
- package/cli/dist/diagnostics.d.ts +38 -0
- package/cli/dist/diagnostics.js +46 -0
- package/cli/dist/domain/_shared/ports.d.ts +0 -1
- package/cli/dist/domain/_shared/text-check.js +2 -2
- package/cli/dist/domain/drawio/export.js +4 -4
- package/cli/dist/domain/drawio/label-text.js +1 -1
- package/cli/dist/domain/drawio/url.d.ts +11 -7
- package/cli/dist/domain/drawio/url.js +67 -45
- package/cli/dist/domain/evidence-xlsx/image-dimensions.js +14 -14
- package/cli/dist/domain/evidence-xlsx/spec-schema.js +26 -26
- package/cli/dist/domain/pptx-ooxml/merge.js +3 -3
- package/cli/dist/domain/pptx-ooxml/prerender-replace.d.ts +1 -0
- package/cli/dist/domain/pptx-ooxml/prerender-replace.js +3 -3
- package/cli/dist/domain/slidev-project/generated-files.d.ts +1 -1
- package/cli/dist/domain/slidev-project/generated-files.js +36 -36
- package/cli/dist/domain/slidev-project/initial-pages.js +4 -4
- package/cli/dist/domain/slidev-project/lint.js +11 -11
- package/cli/dist/domain/slidev-project/sync.js +13 -13
- package/cli/dist/domain/slidev-project/warnings.js +4 -4
- package/cli/dist/domain/slidev-theme/declaration.js +9 -9
- package/cli/dist/domain/slidev-theme/references.js +10 -10
- package/cli/dist/domain/slidev-theme/store-layout.js +6 -6
- package/cli/dist/domain/slidev-theme/talk-theme.js +13 -13
- package/cli/dist/domain/slidev-theme/theme-spec.js +5 -5
- package/cli/dist/domain/slidev-to-pptx/errors.js +3 -3
- package/cli/dist/infra/_shared/dependency-root.js +4 -4
- package/cli/dist/infra/_shared/patch-apply.js +6 -5
- package/cli/dist/infra/_shared/runtime-install.d.ts +12 -84
- package/cli/dist/infra/_shared/runtime-install.js +74 -108
- package/cli/dist/infra/_shared/slidev-bin.js +1 -1
- package/cli/dist/infra/drawio/icons.js +3 -3
- package/cli/dist/infra/drawio/pdf.js +1 -1
- package/cli/dist/infra/drawio/screenshot.js +10 -9
- package/cli/dist/infra/evidence-xlsx/workbook-writer.js +2 -2
- package/cli/dist/infra/playwright/chromium.js +4 -3
- package/cli/dist/infra/playwright/host-dependencies.js +8 -8
- package/cli/dist/infra/playwright/launch.js +5 -5
- package/cli/dist/infra/pptx-ooxml/soffice.js +2 -2
- package/cli/dist/infra/slidev-project/eslint-runner.js +10 -9
- package/cli/dist/infra/slidev-project/fs.js +6 -6
- package/cli/dist/infra/slidev-theme/store.js +18 -15
- package/cli/dist/infra/slidev-to-pptx/cache-store.js +6 -6
- package/cli/dist/infra/slidev-to-pptx/console-logger.d.ts +5 -5
- package/cli/dist/infra/slidev-to-pptx/console-logger.js +19 -20
- package/cli/dist/infra/slidev-to-pptx/dom-converter.d.ts +1 -1
- package/cli/dist/infra/slidev-to-pptx/dom-converter.js +12 -12
- package/cli/dist/infra/slidev-to-pptx/index.js +1 -9
- package/cli/dist/infra/slidev-to-pptx/pipeline.d.ts +2 -2
- package/cli/dist/infra/slidev-to-pptx/pipeline.js +56 -56
- package/cli/dist/infra/slidev-to-pptx/prerender-capture.js +14 -14
- package/cli/dist/infra/slidev-to-pptx/prerender.js +10 -10
- package/cli/dist/infra/slidev-to-pptx/runner.js +1 -0
- package/cli/dist/infra/slidev-to-pptx/scanner.js +10 -10
- package/cli/dist/infra/slidev-to-pptx/server.d.ts +2 -1
- package/cli/dist/infra/slidev-to-pptx/server.js +3 -3
- package/cli/dist/infra/slidev-to-pptx/single-pass-worker.js +39 -39
- package/cli/dist/infra/slidev-to-pptx/slide-worker.js +3 -3
- package/cli/dist/infra/slidev-to-pptx/visibility-helpers.js +8 -8
- package/cli/dist/mcp/dev-server-registry.js +10 -9
- package/cli/dist/mcp/queue.js +1 -1
- package/cli/dist/mcp/result.js +4 -4
- package/cli/dist/mcp/serve.js +5 -3
- package/cli/dist/mcp/server.js +2 -2
- package/cli/dist/mcp/tools/_shared.d.ts +1 -1
- package/cli/dist/mcp/tools/_shared.js +47 -38
- package/cli/dist/mcp/tools/drawio.js +23 -22
- package/cli/dist/mcp/tools/evidence.js +8 -8
- package/cli/dist/mcp/tools/setup.js +26 -26
- package/cli/dist/mcp/tools/slide-dev.js +20 -20
- package/cli/dist/mcp/tools/slide-page.js +39 -37
- package/cli/dist/mcp/tools/slide-theme.js +6 -6
- package/cli/dist/mcp/tools/slide.js +52 -50
- package/cli/dist/mcp/windows-path.js +8 -7
- package/cli/dist/node-runtime.d.ts +6 -1
- package/cli/dist/node-runtime.js +16 -8
- package/npm-shrinkwrap.json +46 -52
- package/package.json +6 -6
- package/vendor/text-rules/dist/source-hash +1 -1
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { readFile } from 'node:fs/promises';
|
|
13
13
|
import path from 'node:path';
|
|
14
14
|
import { Command } from 'commander';
|
|
15
|
+
import { createDiagnostics, passthrough, writeData } from '../../diagnostics.js';
|
|
15
16
|
import { collectTextViolations, formatTextViolations } from '../../domain/_shared/text-check.js';
|
|
16
17
|
import { parseEvidenceSpec } from '../../domain/evidence-xlsx/spec-schema.js';
|
|
17
18
|
import { specTexts } from '../../domain/evidence-xlsx/spec-text.js';
|
|
@@ -52,18 +53,18 @@ dependencies) {
|
|
|
52
53
|
text = await dependencies.readFile(inputPath);
|
|
53
54
|
}
|
|
54
55
|
catch (error) {
|
|
55
|
-
throw new EvidenceCreateError(`spec JSON
|
|
56
|
+
throw new EvidenceCreateError(`cannot read spec JSON: ${inputPath}: ${formatError(error)}`, 'input-not-found');
|
|
56
57
|
}
|
|
57
58
|
let raw;
|
|
58
59
|
try {
|
|
59
60
|
raw = JSON.parse(text);
|
|
60
61
|
}
|
|
61
62
|
catch (error) {
|
|
62
|
-
throw new EvidenceCreateError(`spec JSON
|
|
63
|
+
throw new EvidenceCreateError(`cannot parse spec JSON: ${inputPath}: ${formatError(error)}`, 'invalid-json');
|
|
63
64
|
}
|
|
64
65
|
const parsed = parseEvidenceSpec(raw);
|
|
65
66
|
if (!parsed.ok) {
|
|
66
|
-
throw new EvidenceCreateError(`spec
|
|
67
|
+
throw new EvidenceCreateError(`spec validation failed (${parsed.errors.length.toString()} errors)\n${formatSpecErrors(parsed.errors)}`, 'invalid-spec');
|
|
67
68
|
}
|
|
68
69
|
// 文面は、caption を補う前の spec から取る。xlsx を書く前に全件を確認する
|
|
69
70
|
await assertTextsClean(parsed.written, dependencies.lintText);
|
|
@@ -79,7 +80,7 @@ async function assertTextsClean(spec, lintText) {
|
|
|
79
80
|
violations = await collectTextViolations(specTexts(spec), lintText);
|
|
80
81
|
}
|
|
81
82
|
catch (error) {
|
|
82
|
-
throw new EvidenceCreateError(
|
|
83
|
+
throw new EvidenceCreateError(`text rules check failed: ${formatError(error)}`, 'text-lint-failed');
|
|
83
84
|
}
|
|
84
85
|
if (violations.length > 0) {
|
|
85
86
|
throw new EvidenceCreateError(formatTextViolations(violations), 'text-violation', violations);
|
|
@@ -103,23 +104,23 @@ dependencies) {
|
|
|
103
104
|
}
|
|
104
105
|
export function createEvidenceCreateCommand(buildDependencies) {
|
|
105
106
|
return new Command('create')
|
|
106
|
-
.description('
|
|
107
|
-
.requiredOption('--input <path>', 'EvidenceSpec JSON
|
|
108
|
-
.option('--out <path>', '
|
|
109
|
-
.option('--json', 'machine-readable
|
|
107
|
+
.description('generate a work-evidence xlsx from an EvidenceSpec JSON')
|
|
108
|
+
.requiredOption('--input <path>', 'EvidenceSpec JSON path')
|
|
109
|
+
.option('--out <path>', 'output xlsx path (an existing file is overwritten)', DEFAULT_OUT)
|
|
110
|
+
.option('--json', 'print machine-readable JSON to stdout', false)
|
|
110
111
|
.exitOverride()
|
|
111
112
|
.configureOutput({
|
|
112
113
|
writeErr: (string_) => {
|
|
113
114
|
const dependencies = buildDependencies();
|
|
114
115
|
if (doesArgvWantJson(process.argv)) {
|
|
115
|
-
dependencies.stdout
|
|
116
|
+
writeData(dependencies.stdout, JSON.stringify({
|
|
116
117
|
event: ERROR_EVENT,
|
|
117
118
|
reason: 'invalid-option',
|
|
118
119
|
detail: string_.replace(/^error:[ \t]*/i, '').trim(),
|
|
119
|
-
})
|
|
120
|
+
}));
|
|
120
121
|
}
|
|
121
122
|
else {
|
|
122
|
-
dependencies.stderr
|
|
123
|
+
passthrough(dependencies.stderr, string_);
|
|
123
124
|
}
|
|
124
125
|
},
|
|
125
126
|
})
|
|
@@ -132,7 +133,7 @@ export function createEvidenceCreateCommand(buildDependencies) {
|
|
|
132
133
|
out: optionString(raw['out'], DEFAULT_OUT),
|
|
133
134
|
}, dependencies);
|
|
134
135
|
if (isJson) {
|
|
135
|
-
dependencies.stdout
|
|
136
|
+
writeData(dependencies.stdout, JSON.stringify(data));
|
|
136
137
|
}
|
|
137
138
|
else {
|
|
138
139
|
writeHumanSummary(dependencies.stdout, data);
|
|
@@ -140,10 +141,10 @@ export function createEvidenceCreateCommand(buildDependencies) {
|
|
|
140
141
|
}
|
|
141
142
|
catch (error) {
|
|
142
143
|
if (isJson) {
|
|
143
|
-
dependencies.stdout
|
|
144
|
+
writeData(dependencies.stdout, JSON.stringify(errorData(error)));
|
|
144
145
|
}
|
|
145
146
|
else {
|
|
146
|
-
dependencies.stderr.
|
|
147
|
+
createDiagnostics(dependencies.stderr).error(`evidence create: ${formatError(error)}`);
|
|
147
148
|
}
|
|
148
149
|
process.exitCode = EVIDENCE_CREATE_FAILURE_EXIT_CODE;
|
|
149
150
|
}
|
|
@@ -164,14 +165,14 @@ export function evidenceCreateDefaultDependencies() {
|
|
|
164
165
|
function writeHumanSummary(
|
|
165
166
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types -- write は mutate メソッド
|
|
166
167
|
stdout, data) {
|
|
167
|
-
stdout
|
|
168
|
-
stdout
|
|
168
|
+
writeData(stdout, `created: ${data.outPath}`);
|
|
169
|
+
writeData(stdout, `items: ${data.items.toString()} / annotations: ${data.annotations.toString()}`);
|
|
169
170
|
if (data.skipped.length === 0) {
|
|
170
171
|
return;
|
|
171
172
|
}
|
|
172
|
-
stdout
|
|
173
|
+
writeData(stdout, `skipped: ${data.skipped.length.toString()}`);
|
|
173
174
|
for (const entry of data.skipped) {
|
|
174
|
-
stdout
|
|
175
|
+
writeData(stdout, ` - ${entry.path} (${entry.reason})`);
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
/**
|
|
@@ -17,6 +17,7 @@ import path from 'node:path';
|
|
|
17
17
|
import { Readable } from 'node:stream';
|
|
18
18
|
import { Command } from 'commander';
|
|
19
19
|
import { applyPreviewNormalization, detectPreviewDivergence, } from '../../domain/pptx-ooxml/preview-normalize.js';
|
|
20
|
+
import { createDiagnostics, passthrough, writeData } from '../../diagnostics.js';
|
|
20
21
|
import { XmldomXmlEngine } from '../../infra/pptx-ooxml/xml-engine.js';
|
|
21
22
|
import { YauzlYazlPptxArchive } from '../../infra/pptx-ooxml/archive.js';
|
|
22
23
|
import { SofficePdfConverter, SofficeSpawnError, SofficeTimeoutError, } from '../../infra/pptx-ooxml/soffice.js';
|
|
@@ -125,7 +126,7 @@ async function sha256Of(filePath) {
|
|
|
125
126
|
return createHash('sha256').update(buffer).digest('hex');
|
|
126
127
|
}
|
|
127
128
|
function inputOpenFailure(inputAbs, error) {
|
|
128
|
-
return new PreviewRuntimeError(`input PPTX
|
|
129
|
+
return new PreviewRuntimeError(`cannot open input PPTX: ${inputAbs}: ${formatError(error)}`, 'input-open-failed');
|
|
129
130
|
}
|
|
130
131
|
/**
|
|
131
132
|
入力 PPTX の sha256。入力が無い・読めない場合は input-open-failed に倒す。
|
|
@@ -167,7 +168,7 @@ dependencies) {
|
|
|
167
168
|
const detectAfterSha = await sha256Of(inputAbs);
|
|
168
169
|
/* c8 ignore next 6 -- detect-only は read-only 設計のため sha 変化ルートは到達不能。Acceptance 3 の防御網 */
|
|
169
170
|
if (detectAfterSha !== detectInputSha) {
|
|
170
|
-
throw new PreviewRuntimeError(
|
|
171
|
+
throw new PreviewRuntimeError(`input PPTX changed (sha256 mismatch): ${inputAbs}`, 'input-mutated');
|
|
171
172
|
}
|
|
172
173
|
const summary = {
|
|
173
174
|
inputAbs,
|
|
@@ -200,7 +201,7 @@ dependencies) {
|
|
|
200
201
|
const afterSha = await sha256Of(inputAbs);
|
|
201
202
|
/* c8 ignore next 6 -- 入力は read-only 設計のため sha 変化ルートは到達不能。Acceptance 3 の防御網 */
|
|
202
203
|
if (afterSha !== inputSha) {
|
|
203
|
-
throw new PreviewRuntimeError(
|
|
204
|
+
throw new PreviewRuntimeError(`input PPTX changed (sha256 mismatch): ${inputAbs}`, 'input-mutated');
|
|
204
205
|
}
|
|
205
206
|
const summary = {
|
|
206
207
|
inputAbs,
|
|
@@ -230,14 +231,14 @@ dependencies) {
|
|
|
230
231
|
}
|
|
231
232
|
catch (error) {
|
|
232
233
|
if (error instanceof SofficeTimeoutError) {
|
|
233
|
-
throw new PreviewRuntimeError(`soffice
|
|
234
|
+
throw new PreviewRuntimeError(`soffice PDF conversion timed out after ${String(error.timeoutMs)}ms`, 'soffice-timeout');
|
|
234
235
|
}
|
|
235
236
|
if (error instanceof SofficeSpawnError) {
|
|
236
|
-
throw new PreviewRuntimeError(`soffice (LibreOffice)
|
|
237
|
-
+
|
|
237
|
+
throw new PreviewRuntimeError(`soffice (LibreOffice) is not installed; run 'sudo apt-get install -y libreoffice-impress'`
|
|
238
|
+
+ `: ${error.stderr}`, 'soffice-not-found');
|
|
238
239
|
}
|
|
239
240
|
/* c8 ignore next 5 -- PdfConverter は SofficeSpawnError / SofficeTimeoutError 以外を投げない契約。防御網 */
|
|
240
|
-
throw new PreviewRuntimeError(`PDF
|
|
241
|
+
throw new PreviewRuntimeError(`PDF conversion failed: ${formatError(error)}`, 'soffice-conversion-failed');
|
|
241
242
|
}
|
|
242
243
|
// soffice は変換失敗でも exit 0 を返すため、PDF の実在・非空を必須条件とする。
|
|
243
244
|
// soffice 本体 (libreoffice-core) だけが入った環境では PPTX を load できず、
|
|
@@ -245,8 +246,8 @@ dependencies) {
|
|
|
245
246
|
// ここに置かないと利用者に届かない。
|
|
246
247
|
const pdfSize = await pdfFileSize(result.pdfPath);
|
|
247
248
|
if (pdfSize === 0) {
|
|
248
|
-
throw new PreviewRuntimeError(`soffice
|
|
249
|
-
+
|
|
249
|
+
throw new PreviewRuntimeError(`soffice did not produce a PDF (output PDF missing or empty): ${result.pdfPath}`
|
|
250
|
+
+ `; PPTX conversion requires libreoffice-impress`
|
|
250
251
|
+ ` ('sudo apt-get install -y libreoffice-impress')`, 'soffice-conversion-failed');
|
|
251
252
|
}
|
|
252
253
|
return result.pdfPath;
|
|
@@ -314,32 +315,32 @@ export function errorToReason(error) {
|
|
|
314
315
|
function formatFindingLine(finding) {
|
|
315
316
|
const shape = finding.shapeName === undefined ? '(unnamed)' : `"${finding.shapeName}"`;
|
|
316
317
|
return `slide ${String(finding.slide)}: shape ${shape}`
|
|
317
|
-
+ ` — spAutoFit + wrap=none (LibreOffice
|
|
318
|
+
+ ` — spAutoFit + wrap=none (known LibreOffice centered-rendering difference)`;
|
|
318
319
|
}
|
|
319
320
|
function doesArgvWantJson(argv) {
|
|
320
321
|
return argv.includes('--json');
|
|
321
322
|
}
|
|
322
323
|
export function createPptxPreviewCommand(buildDependencies) {
|
|
323
324
|
const command = new Command('preview')
|
|
324
|
-
.description('
|
|
325
|
+
.description('generate a preview PDF of a PPTX, correcting LibreOffice rendering differences; the original PPTX is not modified')
|
|
325
326
|
.argument('<input>', 'input .pptx path')
|
|
326
|
-
.option('--out <path>', 'output .pdf path (
|
|
327
|
+
.option('--out <path>', 'output .pdf path (default: <input-dir>/<input-stem>.preview.pdf)')
|
|
327
328
|
.option('--json', 'emit machine-readable result on stdout', false)
|
|
328
329
|
.option('--report <path>', 'write findings JSON to <path>')
|
|
329
|
-
.option('--detect-only', 'soffice
|
|
330
|
+
.option('--detect-only', 'print only the detection report without calling soffice', false)
|
|
330
331
|
.exitOverride()
|
|
331
332
|
.configureOutput({
|
|
332
333
|
writeErr: (string_) => {
|
|
333
334
|
const dependencies = buildDependencies();
|
|
334
335
|
if (doesArgvWantJson(process.argv)) {
|
|
335
|
-
dependencies.stdout
|
|
336
|
+
writeData(dependencies.stdout, JSON.stringify({
|
|
336
337
|
event: 'pptx.preview.error',
|
|
337
338
|
reason: 'invalid-option',
|
|
338
339
|
detail: string_.replace(/^error:\s*/i, '').trim(),
|
|
339
|
-
})
|
|
340
|
+
}));
|
|
340
341
|
}
|
|
341
342
|
else {
|
|
342
|
-
dependencies.stderr
|
|
343
|
+
passthrough(dependencies.stderr, string_);
|
|
343
344
|
}
|
|
344
345
|
},
|
|
345
346
|
})
|
|
@@ -358,14 +359,14 @@ export function createPptxPreviewCommand(buildDependencies) {
|
|
|
358
359
|
catch (error) {
|
|
359
360
|
const detail = formatError(error);
|
|
360
361
|
if (isJson) {
|
|
361
|
-
dependencies.stdout
|
|
362
|
+
writeData(dependencies.stdout, JSON.stringify({
|
|
362
363
|
event: 'pptx.preview.error',
|
|
363
364
|
reason: errorToReason(error),
|
|
364
365
|
detail,
|
|
365
|
-
})
|
|
366
|
+
}));
|
|
366
367
|
}
|
|
367
368
|
else {
|
|
368
|
-
dependencies.stderr.
|
|
369
|
+
createDiagnostics(dependencies.stderr).error(`pptx preview: ${detail}`);
|
|
369
370
|
}
|
|
370
371
|
process.exitCode = PPTX_PREVIEW_FAILURE_EXIT_CODE;
|
|
371
372
|
}
|
|
@@ -377,21 +378,16 @@ function emitSuccess(
|
|
|
377
378
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
378
379
|
dependencies, isJson, data) {
|
|
379
380
|
if (isJson) {
|
|
380
|
-
dependencies.stdout
|
|
381
|
+
writeData(dependencies.stdout, JSON.stringify(data));
|
|
381
382
|
return;
|
|
382
383
|
}
|
|
383
384
|
for (const finding of data.findings) {
|
|
384
|
-
dependencies.stdout
|
|
385
|
-
}
|
|
386
|
-
if (data.detectOnly) {
|
|
387
|
-
dependencies.stdout.write(`pptx preview (detect-only): ${data.input}`
|
|
388
|
-
+ ` (${String(data.findings.length)} findings)\n`);
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
dependencies.stdout.write(`pptx preview: ${data.input} -> ${data.output ?? ''}`
|
|
392
|
-
+ ` (${String(data.findings.length)} findings,`
|
|
393
|
-
+ ` ${String(data.normalized)} normalized)\n`);
|
|
385
|
+
writeData(dependencies.stdout, formatFindingLine(finding));
|
|
394
386
|
}
|
|
387
|
+
writeData(dependencies.stdout, data.detectOnly
|
|
388
|
+
? `pptx preview (detect-only): ${data.input} (${String(data.findings.length)} findings)`
|
|
389
|
+
: `pptx preview: ${data.input} -> ${data.output ?? ''}`
|
|
390
|
+
+ ` (${String(data.findings.length)} findings, ${String(data.normalized)} normalized)`);
|
|
395
391
|
}
|
|
396
392
|
export function pptxPreviewDefaultDependencies() {
|
|
397
393
|
return {
|
|
@@ -10,6 +10,7 @@ import { performance } from 'node:perf_hooks';
|
|
|
10
10
|
import { mkdir, rename, rm, writeFile } from 'node:fs/promises';
|
|
11
11
|
import path from 'node:path';
|
|
12
12
|
import { Command } from 'commander';
|
|
13
|
+
import { createDiagnostics, passthrough, writeData } from '../../diagnostics.js';
|
|
13
14
|
import { SlideCreateRuntimeError, SlideCreateUsageError } from '../../domain/slidev-project/errors.js';
|
|
14
15
|
import { buildInitialPages, nameToTitle } from '../../domain/slidev-project/initial-pages.js';
|
|
15
16
|
import { talkPackageJsonSource } from '../../domain/slidev-project/package-json.js';
|
|
@@ -44,7 +45,7 @@ dependencies) {
|
|
|
44
45
|
catch (error) {
|
|
45
46
|
// 成功したときの警告は executeSlideCreate が流す。失敗したときは、ここで流さないと捨てられる。
|
|
46
47
|
for (const warning of warnings)
|
|
47
|
-
dependencies.stderr.
|
|
48
|
+
createDiagnostics(dependencies.stderr).warning(warning);
|
|
48
49
|
throw error;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -63,13 +64,13 @@ warnings) {
|
|
|
63
64
|
// 生成先には、取得の後まで触れない。生成先の存在と依存ルートの実体は、取得の前に確かめる。
|
|
64
65
|
const destination = await talkDirectoryExists(projectAbsolute);
|
|
65
66
|
if (!options.force && destination.exists) {
|
|
66
|
-
throw new SlideCreateUsageError(`
|
|
67
|
+
throw new SlideCreateUsageError(`destination already exists (use --force to overwrite): ${projectAbsolute}`, 'dest-exists');
|
|
67
68
|
}
|
|
68
69
|
const dependencyRoot = dependencies.dependencyRoot ?? dependencies.pluginRoot;
|
|
69
70
|
assertDependencyRootAvailable(dependencyRoot);
|
|
70
71
|
const storeRoot = (dependencies.themeStoreRoot ?? themeStoreRoot)();
|
|
71
72
|
if (storeRoot === undefined) {
|
|
72
|
-
throw new SlideCreateRuntimeError('
|
|
73
|
+
throw new SlideCreateRuntimeError('cannot determine the theme location (fix: check the data directory CLAUDE_PLUGIN_DATA)', 'theme-unknown');
|
|
73
74
|
}
|
|
74
75
|
const fetched = await (dependencies.fetchTheme ?? fetchTheme)(spec, {
|
|
75
76
|
storeRoot,
|
|
@@ -136,7 +137,7 @@ export async function executeSlideCreate(projectDirectory, options,
|
|
|
136
137
|
dependencies, onCreated) {
|
|
137
138
|
const { catalog, warnings, ...summary } = await runSlideCreate(projectDirectory, options, dependencies);
|
|
138
139
|
for (const warning of warnings)
|
|
139
|
-
dependencies.stderr.
|
|
140
|
+
createDiagnostics(dependencies.stderr).warning(warning);
|
|
140
141
|
if (options.emitCatalog)
|
|
141
142
|
emitLayoutCatalog(catalog, dependencies.stdout);
|
|
142
143
|
onCreated?.(summary);
|
|
@@ -166,20 +167,20 @@ export function emitLayoutCatalog(catalog,
|
|
|
166
167
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
167
168
|
stdout) {
|
|
168
169
|
const { categories, layouts } = catalog;
|
|
169
|
-
stdout
|
|
170
|
-
stdout
|
|
171
|
-
stdout
|
|
170
|
+
writeData(stdout, '='.repeat(60));
|
|
171
|
+
writeData(stdout, 'Layout Catalog (read it fully before plan mode in Step 2)');
|
|
172
|
+
writeData(stdout, `${'='.repeat(60)}\n\n`);
|
|
172
173
|
for (const category of categories) {
|
|
173
|
-
stdout
|
|
174
|
+
writeData(stdout, `--- ${category.label}: ${category.question} ---\n\n`);
|
|
174
175
|
const members = layouts.filter(entry => entry.category === category.id);
|
|
175
176
|
if (members.length === 0) {
|
|
176
|
-
stdout
|
|
177
|
+
writeData(stdout, '(no matching layouts)\n\n');
|
|
177
178
|
continue;
|
|
178
179
|
}
|
|
179
180
|
for (const { layout, description, deprecated } of members) {
|
|
180
|
-
stdout
|
|
181
|
+
writeData(stdout, `- ${deprecated ? '[deprecated] ' : ''}${layout}: ${description}`);
|
|
181
182
|
}
|
|
182
|
-
stdout
|
|
183
|
+
writeData(stdout, '');
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
186
|
/* c8 ignore start -- 非 Error 例外 (string throw 等) は本実装範囲では未発生、防御網のみ */
|
|
@@ -208,24 +209,24 @@ function doesArgvWantJson(argv) {
|
|
|
208
209
|
}
|
|
209
210
|
export function createSlideCreateCommand(buildDependencies) {
|
|
210
211
|
const command = new Command('create')
|
|
211
|
-
.description('
|
|
212
|
-
.argument('<project-dir>', '
|
|
213
|
-
.requiredOption('--theme <spec>', '
|
|
214
|
-
.option('--force', '
|
|
215
|
-
.option('--json', 'machine-readable
|
|
212
|
+
.description('create a Slidev presentation that references a theme')
|
|
213
|
+
.argument('<project-dir>', 'destination directory')
|
|
214
|
+
.requiredOption('--theme <spec>', 'theme spec (git+https://<host>/<owner>/<repo>.git#<tag> or file:<path>)')
|
|
215
|
+
.option('--force', 'overwrite an existing directory', false)
|
|
216
|
+
.option('--json', 'print machine-readable JSON to stdout', false)
|
|
216
217
|
.exitOverride()
|
|
217
218
|
.configureOutput({
|
|
218
219
|
writeErr: (string_) => {
|
|
219
220
|
const dependencies = buildDependencies();
|
|
220
221
|
if (doesArgvWantJson(process.argv)) {
|
|
221
|
-
dependencies.stdout
|
|
222
|
+
writeData(dependencies.stdout, JSON.stringify({
|
|
222
223
|
event: 'slide.create.error',
|
|
223
224
|
reason: 'invalid-option',
|
|
224
225
|
detail: string_.replace(/^error:[ \t]*/i, '').trim(),
|
|
225
|
-
})
|
|
226
|
+
}));
|
|
226
227
|
}
|
|
227
228
|
else {
|
|
228
|
-
dependencies.stderr
|
|
229
|
+
passthrough(dependencies.stderr, string_);
|
|
229
230
|
}
|
|
230
231
|
},
|
|
231
232
|
})
|
|
@@ -241,11 +242,11 @@ export function createSlideCreateCommand(buildDependencies) {
|
|
|
241
242
|
const execution = await executeSlideCreate(projectDirectory, options, dependencies, (summary) => {
|
|
242
243
|
if (isWantsJson)
|
|
243
244
|
return;
|
|
244
|
-
dependencies.stdout
|
|
245
|
-
dependencies.stdout
|
|
245
|
+
writeData(dependencies.stdout, `slide create: success (${summary.projectDirectory})`);
|
|
246
|
+
writeData(dependencies.stdout, ` theme=${summary.theme.name}, ${String(Math.round(summary.durationMs))}ms`);
|
|
246
247
|
});
|
|
247
248
|
if (isWantsJson) {
|
|
248
|
-
dependencies.stdout
|
|
249
|
+
writeData(dependencies.stdout, JSON.stringify(execution.data));
|
|
249
250
|
}
|
|
250
251
|
else {
|
|
251
252
|
writeAutoDeckLintReport(execution.lint, execution.summary.projectDirectory, dependencies);
|
|
@@ -255,14 +256,14 @@ export function createSlideCreateCommand(buildDependencies) {
|
|
|
255
256
|
const reason = errorToReason(error);
|
|
256
257
|
const detail = formatError(error);
|
|
257
258
|
if (isWantsJson) {
|
|
258
|
-
dependencies.stdout
|
|
259
|
+
writeData(dependencies.stdout, JSON.stringify({
|
|
259
260
|
event: 'slide.create.error',
|
|
260
261
|
reason,
|
|
261
262
|
detail,
|
|
262
|
-
})
|
|
263
|
+
}));
|
|
263
264
|
}
|
|
264
265
|
else {
|
|
265
|
-
dependencies.stderr.
|
|
266
|
+
createDiagnostics(dependencies.stderr).error(`slide create failed: ${detail}`);
|
|
266
267
|
}
|
|
267
268
|
process.exitCode = toExitCode(error);
|
|
268
269
|
}
|
|
@@ -282,7 +283,7 @@ export function slideCreateDefaultDependencies() {
|
|
|
282
283
|
const pluginRoot = process.env['CLAUDE_PLUGIN_ROOT'];
|
|
283
284
|
/* c8 ignore next 3 -- bin/pecotv が CLAUDE_PLUGIN_ROOT を必ず export するため未設定ルートは実運用で発生しない */
|
|
284
285
|
if (pluginRoot === undefined || pluginRoot === '') {
|
|
285
|
-
throw new SlideCreateRuntimeError('CLAUDE_PLUGIN_ROOT
|
|
286
|
+
throw new SlideCreateRuntimeError('CLAUDE_PLUGIN_ROOT is not set', 'unknown');
|
|
286
287
|
}
|
|
287
288
|
const dependencyRoot = pluginDependencyRoot();
|
|
288
289
|
return {
|
|
@@ -75,7 +75,7 @@ dependencies, options = {}) {
|
|
|
75
75
|
return await unmanagedTheme(talkDirectory, dependencies.files, options);
|
|
76
76
|
const storeRoot = dependencies.storeRoot();
|
|
77
77
|
if (storeRoot === undefined) {
|
|
78
|
-
throw new ThemeFetchError('
|
|
78
|
+
throw new ThemeFetchError('cannot determine the theme location (fix: check the data directory CLAUDE_PLUGIN_DATA)', 'unknown');
|
|
79
79
|
}
|
|
80
80
|
const fetched = await dependencies.fetchTheme(spec, {
|
|
81
81
|
storeRoot,
|
|
@@ -85,15 +85,15 @@ dependencies, options = {}) {
|
|
|
85
85
|
signal: dependencies.signal,
|
|
86
86
|
});
|
|
87
87
|
if (fetched.name !== reference.name) {
|
|
88
|
-
throw new SlideCreateRuntimeError(`package.json
|
|
89
|
-
+ 'dependencies
|
|
88
|
+
throw new SlideCreateRuntimeError(`package.json dependencies lists ${reference.name} but the fetched theme name is ${fetched.name} `
|
|
89
|
+
+ '(fix: set the dependencies key to the theme name)', 'theme-name-mismatch');
|
|
90
90
|
}
|
|
91
91
|
// 張り直しが要らない普段の起動でも、生成ファイルは本体の今の内容にそろえる。
|
|
92
92
|
const regeneratedFiles = await dependencies.syncGeneratedFiles(talkDirectory, { themeName: fetched.name });
|
|
93
93
|
const isRegenerated = regeneratedFiles.length > 0;
|
|
94
94
|
if (isRegenerated) {
|
|
95
|
-
dependencies.warn?.(
|
|
96
|
-
+ '
|
|
95
|
+
dependencies.warn?.(`rewrote ${regeneratedFiles.join(', ')} to match the current plugin output; `
|
|
96
|
+
+ 'these files are generated, so manual edits are not kept (fix: put extra Vite settings in setup/vite-plugins.ts)');
|
|
97
97
|
}
|
|
98
98
|
const link = { name: fetched.name, directory: fetched.directory };
|
|
99
99
|
const theme = { ...link, spec: reference.spec };
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// 対象は `runAutoDeckLint` と `writeAutoDeckLintReport`。
|
|
11
11
|
import path from 'node:path';
|
|
12
12
|
import { Command } from 'commander';
|
|
13
|
+
import { createDiagnostics, passthrough, writeData } from '../../diagnostics.js';
|
|
13
14
|
import { SlideLintRuntimeError, SlideLintUsageError, runSlideLint, } from '../../domain/slidev-project/lint.js';
|
|
14
15
|
import { SlideCreateRuntimeError, SlideCreateUsageError, } from '../../domain/slidev-project/errors.js';
|
|
15
16
|
import { themeErrorReason } from '../../domain/slidev-theme/error-reason.js';
|
|
@@ -31,22 +32,22 @@ eslint 自身の exit 2(設定エラー)は domain で `SlideLintRuntimeErro
|
|
|
31
32
|
*/
|
|
32
33
|
export function createSlideLintCommand(buildDependencies) {
|
|
33
34
|
const command = new Command('lint')
|
|
34
|
-
.description('talk-dir
|
|
35
|
-
.requiredOption('--dir <path>', '
|
|
36
|
-
.option('--json', 'machine-readable
|
|
35
|
+
.description('lint the whole talk-dir (pages/**/*.md and slides.md)')
|
|
36
|
+
.requiredOption('--dir <path>', 'absolute path of the talk-dir to lint')
|
|
37
|
+
.option('--json', 'print machine-readable JSON to stdout', false)
|
|
37
38
|
.exitOverride()
|
|
38
39
|
.configureOutput({
|
|
39
40
|
writeErr: (string_) => {
|
|
40
41
|
const dependencies = buildDependencies();
|
|
41
42
|
if (doesArgvWantJson(process.argv)) {
|
|
42
|
-
dependencies.stdout
|
|
43
|
+
writeData(dependencies.stdout, JSON.stringify({
|
|
43
44
|
event: 'slide.lint.error',
|
|
44
45
|
reason: 'invalid-option',
|
|
45
46
|
detail: string_.replace(/^error:[ \t]*/i, '').trim(),
|
|
46
|
-
})
|
|
47
|
+
}));
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
49
|
-
dependencies.stderr
|
|
50
|
+
passthrough(dependencies.stderr, string_);
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
})
|
|
@@ -57,13 +58,13 @@ export function createSlideLintCommand(buildDependencies) {
|
|
|
57
58
|
try {
|
|
58
59
|
const { summary, data } = await executeSlideLint(options, dependencies);
|
|
59
60
|
if (isWantsJson) {
|
|
60
|
-
dependencies.stdout
|
|
61
|
+
writeData(dependencies.stdout, JSON.stringify(data));
|
|
61
62
|
}
|
|
62
63
|
else {
|
|
63
64
|
// 件数行を読まずに成否が分かるよう見出し行に結果を載せる(no-target は exit 0 側)。
|
|
64
|
-
const outcomeLabel = summary.outcome === 'violations' ? '
|
|
65
|
-
dependencies.stdout
|
|
66
|
-
writeSummaryLines(summary, dependencies
|
|
65
|
+
const outcomeLabel = summary.outcome === 'violations' ? 'violations' : 'success';
|
|
66
|
+
writeData(dependencies.stdout, `slide lint: ${outcomeLabel} (${summary.directory})`);
|
|
67
|
+
writeSummaryLines(summary, dependencies);
|
|
67
68
|
}
|
|
68
69
|
if (summary.outcome === 'violations') {
|
|
69
70
|
process.exitCode = 1;
|
|
@@ -73,14 +74,14 @@ export function createSlideLintCommand(buildDependencies) {
|
|
|
73
74
|
const reason = errorToReason(error);
|
|
74
75
|
const detail = formatError(error);
|
|
75
76
|
if (isWantsJson) {
|
|
76
|
-
dependencies.stdout
|
|
77
|
+
writeData(dependencies.stdout, JSON.stringify({
|
|
77
78
|
event: 'slide.lint.error',
|
|
78
79
|
reason,
|
|
79
80
|
detail,
|
|
80
|
-
})
|
|
81
|
+
}));
|
|
81
82
|
}
|
|
82
83
|
else {
|
|
83
|
-
dependencies.stderr.
|
|
84
|
+
createDiagnostics(dependencies.stderr).error(`slide lint failed: ${detail}`);
|
|
84
85
|
}
|
|
85
86
|
process.exitCode = toExitCode(error);
|
|
86
87
|
}
|
|
@@ -131,23 +132,24 @@ dependencies) {
|
|
|
131
132
|
同じ体裁にするため共有する。
|
|
132
133
|
*/
|
|
133
134
|
function writeSummaryLines(summary,
|
|
134
|
-
//
|
|
135
|
+
// DI 経由の write は mutate メソッド。
|
|
135
136
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
136
|
-
|
|
137
|
+
dependencies) {
|
|
137
138
|
// 走査抜けの警告は lint 対象 0 件でも出す必要があるため no-target の早期 return より前に置く。
|
|
139
|
+
const diagnostics = createDiagnostics(dependencies.stderr);
|
|
138
140
|
for (const skipped of summary.skippedSymlinkDirectories) {
|
|
139
|
-
|
|
140
|
-
+ '
|
|
141
|
+
diagnostics.warning(`${skipped} is a symlink and is not scanned by eslint`
|
|
142
|
+
+ ' (files under it may not be linted)');
|
|
141
143
|
}
|
|
142
144
|
if (summary.outcome === 'no-target') {
|
|
143
|
-
stdout
|
|
145
|
+
writeData(dependencies.stdout, ` linted 0 files (no pages/**/*.md or slides.md found)`);
|
|
144
146
|
return;
|
|
145
147
|
}
|
|
146
|
-
stdout
|
|
147
|
-
+ ` /
|
|
148
|
+
writeData(dependencies.stdout, ` linted ${String(summary.lintedFileCount)} files / ${String(summary.errorCount)} errors`
|
|
149
|
+
+ ` / ${String(summary.warningCount)} warnings`);
|
|
148
150
|
for (const violation of summary.violations) {
|
|
149
|
-
stdout
|
|
150
|
-
+ ` ${violation.rule} ${violation.message}
|
|
151
|
+
writeData(dependencies.stdout, ` ${violation.file}:${String(violation.line)}:${String(violation.column)}`
|
|
152
|
+
+ ` ${violation.rule} ${violation.message}`);
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
155
|
/**
|
|
@@ -177,13 +179,13 @@ export function writeAutoDeckLintReport(report, talkDirectory,
|
|
|
177
179
|
dependencies) {
|
|
178
180
|
const { summary } = report;
|
|
179
181
|
if (summary === undefined) {
|
|
180
|
-
dependencies.stderr.
|
|
182
|
+
createDiagnostics(dependencies.stderr).warning(`deck lint skipped: ${report.failure ?? ''}`);
|
|
181
183
|
return;
|
|
182
184
|
}
|
|
183
|
-
dependencies.stdout
|
|
184
|
-
writeSummaryLines(summary, dependencies
|
|
185
|
+
writeData(dependencies.stdout, 'deck lint:');
|
|
186
|
+
writeSummaryLines(summary, dependencies);
|
|
185
187
|
if (summary.outcome === 'violations') {
|
|
186
|
-
dependencies.stdout
|
|
188
|
+
writeData(dependencies.stdout, ` the violations above do not affect this command's result; after fixing, run pecotv slide lint --dir ${talkDirectory} to recheck`);
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
/**
|
|
@@ -256,7 +258,7 @@ export function slideLintDefaultDependencies() {
|
|
|
256
258
|
const pluginRoot = process.env['CLAUDE_PLUGIN_ROOT'];
|
|
257
259
|
/* c8 ignore next 3 -- bin/pecotv が CLAUDE_PLUGIN_ROOT を必ず export するため未設定ルートは実運用で発生しない */
|
|
258
260
|
if (pluginRoot === undefined || pluginRoot === '') {
|
|
259
|
-
throw new SlideLintRuntimeError('CLAUDE_PLUGIN_ROOT
|
|
261
|
+
throw new SlideLintRuntimeError('CLAUDE_PLUGIN_ROOT is not set', 'unknown');
|
|
260
262
|
}
|
|
261
263
|
const runtimeDirectory = runningMirrorDirectory();
|
|
262
264
|
return {
|