@ahmedrowaihi/pdf-forge-cli 1.0.0-canary.0 → 1.0.0-canary.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @ahmedrowaihi/pdf-forge-cli@1.0.0-canary.0 build /__w/react-pdf-forge-monorepo/react-pdf-forge-monorepo/packages/react-pdf
2
+ > @ahmedrowaihi/pdf-forge-cli@1.0.0-canary.1 build /__w/react-pdf-forge-monorepo/react-pdf-forge-monorepo/packages/react-pdf
3
3
  > tsdown
4
4
 
5
5
  ℹ tsdown v0.15.12 powered by rolldown v1.0.0-beta.45
@@ -9,6 +9,6 @@
9
9
  ℹ tsconfig: tsconfig.json
10
10
  ℹ Build start
11
11
  ℹ Granting execute permission to dist/index.js
12
- ℹ dist/index.js 43.23 kB │ gzip: 11.63 kB
13
- ℹ 1 files, total: 43.23 kB
14
- ✔ Build complete in 41ms
12
+ ℹ dist/index.js 43.43 kB │ gzip: 11.69 kB
13
+ ℹ 1 files, total: 43.43 kB
14
+ ✔ Build complete in 36ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ahmedrowaihi/pdf-forge-cli
2
2
 
3
+ ## 1.0.0-canary.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1065ca3: sharp, esbuild, offline assets and watarfall
8
+
3
9
  ## 1.0.0-canary.0
4
10
 
5
11
  ### Major Changes
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import { spawn } from "node:child_process";
27
27
  //#region package.json
28
28
  var package_default = {
29
29
  name: "@ahmedrowaihi/pdf-forge-cli",
30
- version: "1.0.0-canary.0",
30
+ version: "1.0.0-canary.1",
31
31
  description: "A live preview of your PDF templates right in your browser.",
32
32
  bin: { "pdf-dev": "./dist/index.js" },
33
33
  type: "module",
@@ -718,7 +718,10 @@ const startDevServer = async (templatesDirRelativePath, staticBaseDirRelativePat
718
718
  res.setHeader("Pragma", "no-cache");
719
719
  res.setHeader("Expires", "-1");
720
720
  try {
721
- if (parsedUrl.path && !parsedUrl.path.startsWith("/preview/") && !parsedUrl.path.startsWith("/api/") && !parsedUrl.path.includes("_next/")) serveStaticFile(res, parsedUrl, staticBaseDirRelativePath, templatesDirRelativePath, req);
721
+ const pathname = parsedUrl.pathname || "";
722
+ const hasFileExtension = /\.[^/]+$/.test(pathname);
723
+ const isStaticFileRequest = pathname.startsWith("/static") || hasFileExtension;
724
+ if (parsedUrl.path && isStaticFileRequest && !parsedUrl.path.startsWith("/preview/") && !parsedUrl.path.startsWith("/api/") && !parsedUrl.path.includes("_next/")) serveStaticFile(res, parsedUrl, staticBaseDirRelativePath, templatesDirRelativePath, req);
722
725
  else if (!isNextReady) nextReadyPromise.then(() => nextHandleRequest?.(req, res, parsedUrl));
723
726
  else nextHandleRequest?.(req, res, parsedUrl);
724
727
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahmedrowaihi/pdf-forge-cli",
3
- "version": "1.0.0-canary.0",
3
+ "version": "1.0.0-canary.1",
4
4
  "description": "A live preview of your PDF templates right in your browser.",
5
5
  "bin": {
6
6
  "pdf-dev": "./dist/index.js"
@@ -47,8 +47,8 @@
47
47
  "react": "^19",
48
48
  "react-dom": "^19",
49
49
  "typescript": "5.8.3",
50
- "@ahmedrowaihi/pdf-forge-components": "1.0.0-canary.0",
51
- "@ahmedrowaihi/pdf-forge-core": "1.0.0-canary.0"
50
+ "@ahmedrowaihi/pdf-forge-components": "1.0.0-canary.1",
51
+ "@ahmedrowaihi/pdf-forge-core": "1.0.0-canary.1"
52
52
  },
53
53
  "scripts": {
54
54
  "build": "tsdown",
@@ -60,8 +60,14 @@ export const startDevServer = async (
60
60
  res.setHeader('Expires', '-1');
61
61
 
62
62
  try {
63
+ const pathname = parsedUrl.pathname || '';
64
+ const hasFileExtension = /\.[^/]+$/.test(pathname);
65
+ const isStaticFileRequest =
66
+ pathname.startsWith('/static') || hasFileExtension;
67
+
63
68
  if (
64
69
  parsedUrl.path &&
70
+ isStaticFileRequest &&
65
71
  !parsedUrl.path.startsWith('/preview/') &&
66
72
  !parsedUrl.path.startsWith('/api/') &&
67
73
  !parsedUrl.path.includes('_next/')