@repdf/preview 0.6.0 → 0.7.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/dist/index.mjs +16 -1
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/build-manifest.json +2 -2
- package/dist/preview/.next/cache/.previewinfo +1 -1
- package/dist/preview/.next/cache/.rscinfo +1 -1
- package/dist/preview/.next/cache/.tsbuildinfo +1 -1
- package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/preview/.next/prerender-manifest.json +3 -3
- package/dist/preview/.next/routes-manifest.json +3 -3
- package/dist/preview/.next/server/pages/en/404.html +1 -1
- package/dist/preview/.next/server/pages/en/500.html +1 -1
- package/dist/preview/.next/server/pages/en/test.html +1 -1
- package/dist/preview/.next/server/pages-manifest.json +1 -1
- package/dist/preview/.next/trace +9 -9
- package/dist/preview/.next/trace-build +1 -1
- package/package.json +4 -4
- /package/dist/preview/.next/static/{XoLHPbSRoUQZ298vvm1si → hVJ1ePljV1q-AX9Vf4kv-}/_buildManifest.js +0 -0
- /package/dist/preview/.next/static/{XoLHPbSRoUQZ298vvm1si → hVJ1ePljV1q-AX9Vf4kv-}/_ssgManifest.js +0 -0
package/dist/index.mjs
CHANGED
|
@@ -15,8 +15,9 @@ import { glob } from "glob";
|
|
|
15
15
|
import "esbuild";
|
|
16
16
|
import "source-map-js";
|
|
17
17
|
import "stacktrace-parser";
|
|
18
|
+
import "puppeteer-core";
|
|
18
19
|
//#region package.json
|
|
19
|
-
var version = "0.
|
|
20
|
+
var version = "0.7.0";
|
|
20
21
|
//#endregion
|
|
21
22
|
//#region src/logger.ts
|
|
22
23
|
const logger = pino({
|
|
@@ -171,6 +172,19 @@ const clearPdfComponentCache = () => {
|
|
|
171
172
|
inflightBuilds.clear();
|
|
172
173
|
};
|
|
173
174
|
//#endregion
|
|
175
|
+
//#region src/browser.ts
|
|
176
|
+
let browser = null;
|
|
177
|
+
`${process.env.LOCALAPPDATA ?? ""}`;
|
|
178
|
+
/**
|
|
179
|
+
* Close the singleton browser instance if it exists.
|
|
180
|
+
*/
|
|
181
|
+
async function closeBrowser() {
|
|
182
|
+
if (browser) {
|
|
183
|
+
await browser.close();
|
|
184
|
+
browser = null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
//#endregion
|
|
174
188
|
//#region src/cli/commands/server.ts
|
|
175
189
|
const __filename = fileURLToPath(import.meta.url);
|
|
176
190
|
const __dirname = path.dirname(__filename);
|
|
@@ -314,6 +328,7 @@ const startPreviewServer = async (pdfsDirRelativePath, port) => {
|
|
|
314
328
|
};
|
|
315
329
|
const stopPreviewServer = async () => {
|
|
316
330
|
if (!previewServer) return;
|
|
331
|
+
await closeBrowser();
|
|
317
332
|
for (const socket of activeSockets) socket.destroy();
|
|
318
333
|
activeSockets.clear();
|
|
319
334
|
await new Promise((resolve, reject) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
hVJ1ePljV1q-AX9Vf4kv-
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
],
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"lowPriorityFiles": [
|
|
7
|
-
"static/
|
|
8
|
-
"static/
|
|
7
|
+
"static/hVJ1ePljV1q-AX9Vf4kv-/_buildManifest.js",
|
|
8
|
+
"static/hVJ1ePljV1q-AX9Vf4kv-/_ssgManifest.js"
|
|
9
9
|
],
|
|
10
10
|
"rootMainFiles": [],
|
|
11
11
|
"rootMainFilesTree": {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"previewModeId":"
|
|
1
|
+
{"previewModeId":"e065a1dbdfce31b062cf1e9e2bd1bad0","previewModeSigningKey":"43c733c1ef11993cf432b25e233f008f0cd5b1eb0b35cd4c51146bef4438fc88","previewModeEncryptionKey":"02f5649fec19c0855b53aedfa3f99a1dc639b88da37a18ec417577c370a011a0","expireAt":1775145298741}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"encryption.key":"
|
|
1
|
+
{"encryption.key":"R50P5u6KuBecO8APVX+2DxDq5aLVHnecSsfld14063I=","encryption.expire_at":1775145298732}
|