pi-export-notool 0.2.0 → 0.2.1
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.
|
@@ -3,8 +3,6 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { basename, dirname, extname, join, resolve } from "node:path";
|
|
4
4
|
import { parseExportArguments } from "./command-args.js";
|
|
5
5
|
import { injectNoToolCss } from "./html-injection.js";
|
|
6
|
-
import { createPublishHtml } from "./publish-export.js";
|
|
7
|
-
import { findSensitiveInfo, formatSensitiveWarning } from "./sensitive-info.js";
|
|
8
6
|
|
|
9
7
|
const EXPORT_TIMEOUT_MS = 60_000;
|
|
10
8
|
|
|
@@ -36,7 +34,17 @@ async function runPiExport(pi, sessionFile, outputPath, cwd) {
|
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
|
|
37
|
+
async function loadPublishModules() {
|
|
38
|
+
// Keep sanitizer + secret-scan off the startup graph; they are publish-only.
|
|
39
|
+
const [{ createPublishHtml }, { findSensitiveInfo, formatSensitiveWarning }] = await Promise.all([
|
|
40
|
+
import("./publish-export.js"),
|
|
41
|
+
import("./sensitive-info.js"),
|
|
42
|
+
]);
|
|
43
|
+
return { createPublishHtml, findSensitiveInfo, formatSensitiveWarning };
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
async function writePublishExport(pi, ctx, sessionFile, outputPath) {
|
|
47
|
+
const { createPublishHtml, findSensitiveInfo, formatSensitiveWarning } = await loadPublishModules();
|
|
40
48
|
const temporaryDirectory = await mkdtemp(join(tmpdir(), "pi-export-notool-"));
|
|
41
49
|
const temporaryOutput = join(temporaryDirectory, "export.html");
|
|
42
50
|
|