@repdf/preview 0.5.0 → 0.5.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.
- package/dist/index.mjs +13 -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/chunks/539.js +1 -1
- 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/trace +9 -9
- package/dist/preview/.next/trace-build +1 -1
- package/package.json +3 -3
- /package/dist/preview/.next/static/{uQjdkl4yTW6Zpf-3uNg2P → FpcN7f3WcKAegtkQ_R6bq}/_buildManifest.js +0 -0
- /package/dist/preview/.next/static/{uQjdkl4yTW6Zpf-3uNg2P → FpcN7f3WcKAegtkQ_R6bq}/_ssgManifest.js +0 -0
package/dist/index.mjs
CHANGED
|
@@ -12,8 +12,11 @@ import * as chokidar from "chokidar";
|
|
|
12
12
|
import path$1 from "node:path";
|
|
13
13
|
import dependencyTree from "dependency-tree";
|
|
14
14
|
import { glob } from "glob";
|
|
15
|
+
import "esbuild";
|
|
16
|
+
import "source-map-js";
|
|
17
|
+
import "stacktrace-parser";
|
|
15
18
|
//#region package.json
|
|
16
|
-
var version = "0.
|
|
19
|
+
var version = "0.5.0";
|
|
17
20
|
//#endregion
|
|
18
21
|
//#region src/logger.ts
|
|
19
22
|
const logger = pino({
|
|
@@ -152,6 +155,14 @@ function pdfTemplateWatcher() {
|
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
//#endregion
|
|
158
|
+
//#region src/template-loader/get-pdf-component.ts
|
|
159
|
+
const componentCache = /* @__PURE__ */ new Map();
|
|
160
|
+
const inflightBuilds = /* @__PURE__ */ new Map();
|
|
161
|
+
const clearPdfComponentCache = () => {
|
|
162
|
+
componentCache.clear();
|
|
163
|
+
inflightBuilds.clear();
|
|
164
|
+
};
|
|
165
|
+
//#endregion
|
|
155
166
|
//#region src/cli/commands/server.ts
|
|
156
167
|
const __filename = fileURLToPath(import.meta.url);
|
|
157
168
|
const __dirname = path.dirname(__filename);
|
|
@@ -260,6 +271,7 @@ const startPreviewServer = async (pdfsDirRelativePath, port) => {
|
|
|
260
271
|
};
|
|
261
272
|
templateWatcher = pdfTemplateWatcher();
|
|
262
273
|
templateWatcher.on("all", (event, filePath) => {
|
|
274
|
+
clearPdfComponentCache();
|
|
263
275
|
const absolutePath = path.isAbsolute(filePath) ? filePath : path.resolve(absolutePathToPdfsDir, filePath);
|
|
264
276
|
const relPath = path.relative(absolutePathToPdfsDir, absolutePath);
|
|
265
277
|
pendingChanges.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
FpcN7f3WcKAegtkQ_R6bq
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
],
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"lowPriorityFiles": [
|
|
7
|
-
"static/
|
|
8
|
-
"static/
|
|
7
|
+
"static/FpcN7f3WcKAegtkQ_R6bq/_buildManifest.js",
|
|
8
|
+
"static/FpcN7f3WcKAegtkQ_R6bq/_ssgManifest.js"
|
|
9
9
|
],
|
|
10
10
|
"rootMainFiles": [],
|
|
11
11
|
"rootMainFilesTree": {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"previewModeId":"
|
|
1
|
+
{"previewModeId":"977d7ef8220f24dcb3b8c1b2374e6e1f","previewModeSigningKey":"78cfa27a4ecebdca175bb5fc0c123ff9db79dc21c0c6d044068ab0c5a785745b","previewModeEncryptionKey":"337640af08b52984be6ceaed0cae53006ba2736a7ec287962573d7606c01fe49","expireAt":1774391020545}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"encryption.key":"
|
|
1
|
+
{"encryption.key":"TpaNGh0ywVdf3u1xqIyUAcvDNy43b3eLYghnqB3C8YA=","encryption.expire_at":1774391020541}
|