@repdf/preview 0.0.12 → 0.0.14
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/README.md +11 -1
- package/dist/index.cjs +15 -13
- package/dist/index.js +15 -13
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/build-manifest.json +7 -7
- 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/client-production/index.pack.old +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/cache/webpack/server-production/index.pack.old +0 -0
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +1 -1
- package/dist/preview/.next/routes-manifest.json +1 -1
- package/dist/preview/.next/server/chunks/316.js +1 -0
- package/dist/preview/.next/server/chunks/{587.js → 842.js} +2 -2
- package/dist/preview/.next/server/functions-config-manifest.json +1 -1
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/pages/_app.js +1 -1
- package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_document.js +1 -1
- package/dist/preview/.next/server/pages/_error.js +1 -1
- package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/component.js +2 -2
- package/dist/preview/.next/server/pages/api/component.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/pdf.js +1 -1
- package/dist/preview/.next/server/pages/api/pdf.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js +1 -1
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js.nft.json +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/hello.html +1 -1
- package/dist/preview/.next/server/pages/hello.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/index.js +1 -0
- package/dist/preview/.next/server/pages/index.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js.nft.json +1 -1
- package/dist/preview/.next/server/pages-manifest.json +1 -1
- package/dist/preview/.next/static/chunks/587-e1c001181b4cec11.js +1 -0
- package/dist/preview/.next/static/chunks/pages/_app-7347594c8802fbe6.js +8 -0
- package/dist/preview/.next/static/chunks/pages/index-599233e1212fd4c8.js +1 -0
- package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-b754b626fb853e1b.js +1 -0
- package/dist/preview/.next/static/css/{f94a2eea64dc55ea.css → 4775703643ebce7c.css} +1 -1
- package/dist/preview/.next/static/unWRLxcyb0kpzlwdDMgbW/_buildManifest.js +1 -0
- package/dist/preview/.next/trace +14 -14
- package/package.json +10 -10
- package/dist/preview/.next/server/chunks/559.js +0 -1
- package/dist/preview/.next/server/pages/en.html +0 -1
- package/dist/preview/.next/static/ODM3NbAHy2U0LG-NEPdk_/_buildManifest.js +0 -1
- package/dist/preview/.next/static/chunks/606-7aa77f75c6740252.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_app-d770e97b1da9a6b5.js +0 -8
- package/dist/preview/.next/static/chunks/pages/index-74f4892551876c76.js +0 -1
- package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-64226fbfe886d0c3.js +0 -1
- /package/dist/preview/.next/static/{ODM3NbAHy2U0LG-NEPdk_ → unWRLxcyb0kpzlwdDMgbW}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
STILL IN DEVELOPMENT
|
|
2
2
|
|
|
3
|
-
repdf preview app
|
|
3
|
+
repdf preview app
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
TODO:
|
|
7
|
+
- [ ] return rather than throw error if the provided pdf folder does not exist so the user gets a better error message
|
|
8
|
+
- [ ] add a way to test the email renderer
|
|
9
|
+
- [ ] add a way to test the pdf renderer
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Gotchas For Development:
|
|
13
|
+
- for some reason "static" pages dont work if you have a static page force it to be dynamic with a getServerSideProp for it to work
|
package/dist/index.cjs
CHANGED
|
@@ -29,7 +29,7 @@ var import_commander = require("commander");
|
|
|
29
29
|
// package.json
|
|
30
30
|
var package_default = {
|
|
31
31
|
name: "@repdf/preview",
|
|
32
|
-
version: "0.0.
|
|
32
|
+
version: "0.0.14",
|
|
33
33
|
type: "module",
|
|
34
34
|
main: "dist/index.js",
|
|
35
35
|
bin: {
|
|
@@ -42,7 +42,7 @@ var package_default = {
|
|
|
42
42
|
default: "./dist/index.cjs"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
description: "preview app for
|
|
45
|
+
description: "preview app for rePDF. Not ready for production use.",
|
|
46
46
|
keywords: ["pdf", "typescript", "react"],
|
|
47
47
|
homepage: "https://repdf.dev",
|
|
48
48
|
author: "repdf labs",
|
|
@@ -51,7 +51,9 @@ var package_default = {
|
|
|
51
51
|
scripts: {
|
|
52
52
|
tsup: "tsup --tsconfig tsconfig.build.json && node build-preview-server.js",
|
|
53
53
|
build: "next build",
|
|
54
|
-
dev: "next dev",
|
|
54
|
+
dev: "next dev -p 3005",
|
|
55
|
+
"dev:live": "tsx src/cli/index.ts dev",
|
|
56
|
+
"dev:live:notused": "tsup --tsconfig tsconfig.build.json --watch",
|
|
55
57
|
lint: "next lint",
|
|
56
58
|
start: "next start",
|
|
57
59
|
"check-exports": "attw --pack .",
|
|
@@ -61,8 +63,8 @@ var package_default = {
|
|
|
61
63
|
dependencies: {
|
|
62
64
|
"@react-email/render": "1.0.1",
|
|
63
65
|
"@react-email/tailwind": "0.1.0",
|
|
64
|
-
"@tanstack/react-query": "^5.59.
|
|
65
|
-
"@tanstack/react-query-devtools": "^5.59.
|
|
66
|
+
"@tanstack/react-query": "^5.59.15",
|
|
67
|
+
"@tanstack/react-query-devtools": "^5.59.15",
|
|
66
68
|
"@trpc/client": "^11.0.0-rc.553",
|
|
67
69
|
"@trpc/next": "^11.0.0-rc.553",
|
|
68
70
|
"@trpc/react-query": "^11.0.0-rc.553",
|
|
@@ -72,13 +74,12 @@ var package_default = {
|
|
|
72
74
|
commander: "^12.1.0",
|
|
73
75
|
"dependency-tree": "^11.0.1",
|
|
74
76
|
esbuild: "0.24.0",
|
|
75
|
-
express: "^4.21.
|
|
77
|
+
express: "^4.21.1",
|
|
76
78
|
glob: "^11.0.0",
|
|
77
79
|
"js-beautify": "^1.15.1",
|
|
78
80
|
"js-dependency-extractor": "^1.0.3",
|
|
79
|
-
"lucide-react": "^0.
|
|
81
|
+
"lucide-react": "^0.453.0",
|
|
80
82
|
next: "^14.2.15",
|
|
81
|
-
nuqs: "^1.20.0",
|
|
82
83
|
ora: "^8.1.0",
|
|
83
84
|
pino: "^9.4.0",
|
|
84
85
|
"pino-pretty": "^11.2.2",
|
|
@@ -89,15 +90,14 @@ var package_default = {
|
|
|
89
90
|
"react-use-websocket": "^4.9.0",
|
|
90
91
|
"source-map-js": "^1.2.1",
|
|
91
92
|
"stacktrace-parser": "^0.1.10",
|
|
92
|
-
"string-ts": "^2.2.0",
|
|
93
93
|
superjson: "^2.2.1",
|
|
94
94
|
"tailwind-merge": "^2.5.2",
|
|
95
|
-
tsx: "^4.19.1",
|
|
96
95
|
webpack: "^5.95.0",
|
|
97
96
|
ws: "^8.18.0",
|
|
98
97
|
zod: "^3.23.8"
|
|
99
98
|
},
|
|
100
99
|
devDependencies: {
|
|
100
|
+
tsx: "^4.19.1",
|
|
101
101
|
tsup: "8.3.0",
|
|
102
102
|
"@changesets/cli": "2.27.9",
|
|
103
103
|
"@arethetypeswrong/cli": "0.16.4",
|
|
@@ -213,7 +213,6 @@ function getPdfTemplates() {
|
|
|
213
213
|
`${RELATIVE_PATH_TO_PDF_FOLDER()}/**/*.{tsx,jsx,js}`,
|
|
214
214
|
{ nodir: true }
|
|
215
215
|
);
|
|
216
|
-
logger_default.debug({ potentialTemplateFilePaths });
|
|
217
216
|
const filteredTemplateFilePaths = potentialTemplateFilePaths.filter(
|
|
218
217
|
isPotentialPdfTemplate
|
|
219
218
|
);
|
|
@@ -276,8 +275,9 @@ var import_meta = {};
|
|
|
276
275
|
var __filename = (0, import_url.fileURLToPath)(import_meta.url);
|
|
277
276
|
var __dirname = import_path.default.dirname(__filename);
|
|
278
277
|
var isDev = !__filename.endsWith("index.js");
|
|
278
|
+
console.log("cli script is in dev mode", isDev);
|
|
279
279
|
var cliPackageLocation = isDev ? import_path.default.resolve(__dirname, "../..") : import_path.default.resolve(__dirname, "../..");
|
|
280
|
-
var previewServerLocation = isDev ? import_path.default.resolve(__dirname, "
|
|
280
|
+
var previewServerLocation = isDev ? import_path.default.resolve(__dirname, "../../..") : import_path.default.resolve(__dirname, "./preview");
|
|
281
281
|
var getEnvVariablesForPreviewApp = (relativePathToPdfsDirectory, cwd) => {
|
|
282
282
|
return {
|
|
283
283
|
RELATIVE_PATH_TO_PDF_FOLDER: relativePathToPdfsDirectory,
|
|
@@ -295,7 +295,9 @@ var startPreviewServer = async (pdfsDirRelativePath, port) => {
|
|
|
295
295
|
const wss = new import_ws2.WebSocketServer({ noServer: true });
|
|
296
296
|
process.env = {
|
|
297
297
|
...process.env,
|
|
298
|
-
NODE_ENV: "development",
|
|
298
|
+
NODE_ENV: isDev ? "development" : "production",
|
|
299
|
+
// TODO: why is this set to devlopment and is that right?
|
|
300
|
+
PORT: port.toString(),
|
|
299
301
|
...getEnvVariablesForPreviewApp(
|
|
300
302
|
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
|
|
301
303
|
import_path.default.normalize(pdfsDirRelativePath),
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { program } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@repdf/preview",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.14",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -19,7 +19,7 @@ var package_default = {
|
|
|
19
19
|
default: "./dist/index.cjs"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
description: "preview app for
|
|
22
|
+
description: "preview app for rePDF. Not ready for production use.",
|
|
23
23
|
keywords: ["pdf", "typescript", "react"],
|
|
24
24
|
homepage: "https://repdf.dev",
|
|
25
25
|
author: "repdf labs",
|
|
@@ -28,7 +28,9 @@ var package_default = {
|
|
|
28
28
|
scripts: {
|
|
29
29
|
tsup: "tsup --tsconfig tsconfig.build.json && node build-preview-server.js",
|
|
30
30
|
build: "next build",
|
|
31
|
-
dev: "next dev",
|
|
31
|
+
dev: "next dev -p 3005",
|
|
32
|
+
"dev:live": "tsx src/cli/index.ts dev",
|
|
33
|
+
"dev:live:notused": "tsup --tsconfig tsconfig.build.json --watch",
|
|
32
34
|
lint: "next lint",
|
|
33
35
|
start: "next start",
|
|
34
36
|
"check-exports": "attw --pack .",
|
|
@@ -38,8 +40,8 @@ var package_default = {
|
|
|
38
40
|
dependencies: {
|
|
39
41
|
"@react-email/render": "1.0.1",
|
|
40
42
|
"@react-email/tailwind": "0.1.0",
|
|
41
|
-
"@tanstack/react-query": "^5.59.
|
|
42
|
-
"@tanstack/react-query-devtools": "^5.59.
|
|
43
|
+
"@tanstack/react-query": "^5.59.15",
|
|
44
|
+
"@tanstack/react-query-devtools": "^5.59.15",
|
|
43
45
|
"@trpc/client": "^11.0.0-rc.553",
|
|
44
46
|
"@trpc/next": "^11.0.0-rc.553",
|
|
45
47
|
"@trpc/react-query": "^11.0.0-rc.553",
|
|
@@ -49,13 +51,12 @@ var package_default = {
|
|
|
49
51
|
commander: "^12.1.0",
|
|
50
52
|
"dependency-tree": "^11.0.1",
|
|
51
53
|
esbuild: "0.24.0",
|
|
52
|
-
express: "^4.21.
|
|
54
|
+
express: "^4.21.1",
|
|
53
55
|
glob: "^11.0.0",
|
|
54
56
|
"js-beautify": "^1.15.1",
|
|
55
57
|
"js-dependency-extractor": "^1.0.3",
|
|
56
|
-
"lucide-react": "^0.
|
|
58
|
+
"lucide-react": "^0.453.0",
|
|
57
59
|
next: "^14.2.15",
|
|
58
|
-
nuqs: "^1.20.0",
|
|
59
60
|
ora: "^8.1.0",
|
|
60
61
|
pino: "^9.4.0",
|
|
61
62
|
"pino-pretty": "^11.2.2",
|
|
@@ -66,15 +67,14 @@ var package_default = {
|
|
|
66
67
|
"react-use-websocket": "^4.9.0",
|
|
67
68
|
"source-map-js": "^1.2.1",
|
|
68
69
|
"stacktrace-parser": "^0.1.10",
|
|
69
|
-
"string-ts": "^2.2.0",
|
|
70
70
|
superjson: "^2.2.1",
|
|
71
71
|
"tailwind-merge": "^2.5.2",
|
|
72
|
-
tsx: "^4.19.1",
|
|
73
72
|
webpack: "^5.95.0",
|
|
74
73
|
ws: "^8.18.0",
|
|
75
74
|
zod: "^3.23.8"
|
|
76
75
|
},
|
|
77
76
|
devDependencies: {
|
|
77
|
+
tsx: "^4.19.1",
|
|
78
78
|
tsup: "8.3.0",
|
|
79
79
|
"@changesets/cli": "2.27.9",
|
|
80
80
|
"@arethetypeswrong/cli": "0.16.4",
|
|
@@ -190,7 +190,6 @@ function getPdfTemplates() {
|
|
|
190
190
|
`${RELATIVE_PATH_TO_PDF_FOLDER()}/**/*.{tsx,jsx,js}`,
|
|
191
191
|
{ nodir: true }
|
|
192
192
|
);
|
|
193
|
-
logger_default.debug({ potentialTemplateFilePaths });
|
|
194
193
|
const filteredTemplateFilePaths = potentialTemplateFilePaths.filter(
|
|
195
194
|
isPotentialPdfTemplate
|
|
196
195
|
);
|
|
@@ -252,8 +251,9 @@ function pdfTemplateWatcher() {
|
|
|
252
251
|
var __filename = fileURLToPath(import.meta.url);
|
|
253
252
|
var __dirname = path2.dirname(__filename);
|
|
254
253
|
var isDev = !__filename.endsWith("index.js");
|
|
254
|
+
console.log("cli script is in dev mode", isDev);
|
|
255
255
|
var cliPackageLocation = isDev ? path2.resolve(__dirname, "../..") : path2.resolve(__dirname, "../..");
|
|
256
|
-
var previewServerLocation = isDev ? path2.resolve(__dirname, "
|
|
256
|
+
var previewServerLocation = isDev ? path2.resolve(__dirname, "../../..") : path2.resolve(__dirname, "./preview");
|
|
257
257
|
var getEnvVariablesForPreviewApp = (relativePathToPdfsDirectory, cwd) => {
|
|
258
258
|
return {
|
|
259
259
|
RELATIVE_PATH_TO_PDF_FOLDER: relativePathToPdfsDirectory,
|
|
@@ -271,7 +271,9 @@ var startPreviewServer = async (pdfsDirRelativePath, port) => {
|
|
|
271
271
|
const wss = new WebSocketServer({ noServer: true });
|
|
272
272
|
process.env = {
|
|
273
273
|
...process.env,
|
|
274
|
-
NODE_ENV: "development",
|
|
274
|
+
NODE_ENV: isDev ? "development" : "production",
|
|
275
|
+
// TODO: why is this set to devlopment and is that right?
|
|
276
|
+
PORT: port.toString(),
|
|
275
277
|
...getEnvVariablesForPreviewApp(
|
|
276
278
|
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
|
|
277
279
|
path2.normalize(pdfsDirRelativePath),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
unWRLxcyb0kpzlwdDMgbW
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"ampDevFiles": [],
|
|
7
7
|
"lowPriorityFiles": [
|
|
8
|
-
"static/
|
|
9
|
-
"static/
|
|
8
|
+
"static/unWRLxcyb0kpzlwdDMgbW/_buildManifest.js",
|
|
9
|
+
"static/unWRLxcyb0kpzlwdDMgbW/_ssgManifest.js"
|
|
10
10
|
],
|
|
11
11
|
"rootMainFiles": [],
|
|
12
12
|
"pages": {
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"static/chunks/webpack-b8f8d6679aaa5f42.js",
|
|
15
15
|
"static/chunks/framework-0cbe3b56a5f66701.js",
|
|
16
16
|
"static/chunks/main-b2d89a266d271543.js",
|
|
17
|
-
"static/chunks/pages/index-
|
|
17
|
+
"static/chunks/pages/index-599233e1212fd4c8.js"
|
|
18
18
|
],
|
|
19
19
|
"/_app": [
|
|
20
20
|
"static/chunks/webpack-b8f8d6679aaa5f42.js",
|
|
21
21
|
"static/chunks/framework-0cbe3b56a5f66701.js",
|
|
22
22
|
"static/chunks/main-b2d89a266d271543.js",
|
|
23
|
-
"static/css/
|
|
24
|
-
"static/chunks/pages/_app-
|
|
23
|
+
"static/css/4775703643ebce7c.css",
|
|
24
|
+
"static/chunks/pages/_app-7347594c8802fbe6.js"
|
|
25
25
|
],
|
|
26
26
|
"/_error": [
|
|
27
27
|
"static/chunks/webpack-b8f8d6679aaa5f42.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"static/chunks/webpack-b8f8d6679aaa5f42.js",
|
|
40
40
|
"static/chunks/framework-0cbe3b56a5f66701.js",
|
|
41
41
|
"static/chunks/main-b2d89a266d271543.js",
|
|
42
|
-
"static/chunks/
|
|
43
|
-
"static/chunks/pages/preview/[...relTemplatePath]-
|
|
42
|
+
"static/chunks/587-e1c001181b4cec11.js",
|
|
43
|
+
"static/chunks/pages/preview/[...relTemplatePath]-b754b626fb853e1b.js"
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
46
|
"ampFirstPages": []
|