@repdf/preview 0.5.2 → 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.
Files changed (37) hide show
  1. package/dist/index.mjs +16 -1
  2. package/dist/preview/.next/BUILD_ID +1 -1
  3. package/dist/preview/.next/build-manifest.json +5 -5
  4. package/dist/preview/.next/cache/.previewinfo +1 -1
  5. package/dist/preview/.next/cache/.rscinfo +1 -1
  6. package/dist/preview/.next/cache/.tsbuildinfo +1 -1
  7. package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
  10. package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
  11. package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
  12. package/dist/preview/.next/prerender-manifest.json +3 -3
  13. package/dist/preview/.next/routes-manifest.json +3 -3
  14. package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
  15. package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
  16. package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
  17. package/dist/preview/.next/server/pages/api/component.js.nft.json +1 -1
  18. package/dist/preview/.next/server/pages/api/pdf.js.nft.json +1 -1
  19. package/dist/preview/.next/server/pages/api/trpc/[trpc].js +1 -1
  20. package/dist/preview/.next/server/pages/api/trpc/[trpc].js.nft.json +1 -1
  21. package/dist/preview/.next/server/pages/en/404.html +1 -1
  22. package/dist/preview/.next/server/pages/en/500.html +1 -1
  23. package/dist/preview/.next/server/pages/en/test.html +1 -1
  24. package/dist/preview/.next/server/pages/index.js.nft.json +1 -1
  25. package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js +1 -1
  26. package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js.nft.json +1 -1
  27. package/dist/preview/.next/server/pages-manifest.json +1 -1
  28. package/dist/preview/.next/static/chunks/pages/_app-ae07ed78fca634b6.js +182 -0
  29. package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-8e77f612d64b68fd.js +1 -0
  30. package/dist/preview/.next/static/css/{a1c9c82f00c72350.css → 1fbb4b304a915354.css} +1 -1
  31. package/dist/preview/.next/static/{FZ6aXlqGO-aLj-TH9yD3I → hVJ1ePljV1q-AX9Vf4kv-}/_buildManifest.js +1 -1
  32. package/dist/preview/.next/trace +9 -9
  33. package/dist/preview/.next/trace-build +1 -1
  34. package/package.json +46 -46
  35. package/dist/preview/.next/static/chunks/pages/_app-6411e6a26996cdef.js +0 -182
  36. package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-9bf0ebcb9e9f9c65.js +0 -1
  37. /package/dist/preview/.next/static/{FZ6aXlqGO-aLj-TH9yD3I → 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.5.1";
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
- FZ6aXlqGO-aLj-TH9yD3I
1
+ hVJ1ePljV1q-AX9Vf4kv-
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "devFiles": [],
6
6
  "lowPriorityFiles": [
7
- "static/FZ6aXlqGO-aLj-TH9yD3I/_buildManifest.js",
8
- "static/FZ6aXlqGO-aLj-TH9yD3I/_ssgManifest.js"
7
+ "static/hVJ1ePljV1q-AX9Vf4kv-/_buildManifest.js",
8
+ "static/hVJ1ePljV1q-AX9Vf4kv-/_ssgManifest.js"
9
9
  ],
10
10
  "rootMainFiles": [],
11
11
  "rootMainFilesTree": {},
@@ -21,8 +21,8 @@
21
21
  "static/chunks/webpack-6f363cd1990801ba.js",
22
22
  "static/chunks/framework-c1a985c867714b4b.js",
23
23
  "static/chunks/main-3c8a75f1bd6d0687.js",
24
- "static/css/a1c9c82f00c72350.css",
25
- "static/chunks/pages/_app-6411e6a26996cdef.js"
24
+ "static/css/1fbb4b304a915354.css",
25
+ "static/chunks/pages/_app-ae07ed78fca634b6.js"
26
26
  ],
27
27
  "/_error": [
28
28
  "static/chunks/webpack-6f363cd1990801ba.js",
@@ -35,7 +35,7 @@
35
35
  "static/chunks/framework-c1a985c867714b4b.js",
36
36
  "static/chunks/main-3c8a75f1bd6d0687.js",
37
37
  "static/chunks/440-7f86160d543d19eb.js",
38
- "static/chunks/pages/preview/[...relTemplatePath]-9bf0ebcb9e9f9c65.js"
38
+ "static/chunks/pages/preview/[...relTemplatePath]-8e77f612d64b68fd.js"
39
39
  ],
40
40
  "/test": [
41
41
  "static/chunks/webpack-6f363cd1990801ba.js",
@@ -1 +1 @@
1
- {"previewModeId":"d40fbb4329b168784ada0b1c1125cf04","previewModeSigningKey":"1e1cd48697872824c45c6464b49bc34748c039459df1cef5c4c1d00c8a6dc4a2","previewModeEncryptionKey":"9483644439aa7b04a3f4bf6cd6ba0f4c32bee40d1ae63923eca381e3d11d31dc","expireAt":1774391804415}
1
+ {"previewModeId":"e065a1dbdfce31b062cf1e9e2bd1bad0","previewModeSigningKey":"43c733c1ef11993cf432b25e233f008f0cd5b1eb0b35cd4c51146bef4438fc88","previewModeEncryptionKey":"02f5649fec19c0855b53aedfa3f99a1dc639b88da37a18ec417577c370a011a0","expireAt":1775145298741}
@@ -1 +1 @@
1
- {"encryption.key":"aqaHf46LGw8Qjd/GOveOjiYrkQfNjF4RY1HJKPB6r2Y=","encryption.expire_at":1774391804411}
1
+ {"encryption.key":"R50P5u6KuBecO8APVX+2DxDq5aLVHnecSsfld14063I=","encryption.expire_at":1775145298732}