create-caspian-app 0.2.0-beta.53 → 0.2.0-beta.54

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.
@@ -21,6 +21,7 @@ const { __dirname } = getFileMeta();
21
21
  const bs: BrowserSyncInstance = browserSync.create();
22
22
 
23
23
  const WORKSPACE_ROOT = join(__dirname, "..");
24
+ const PUBLIC_ROOT = join(WORKSPACE_ROOT, PUBLIC_DIR);
24
25
  const PUBLIC_IGNORE_DIRS = ["uploads"];
25
26
  let previousRouteFiles: string[] = [];
26
27
  let lastChangedFile: string | null = null;
@@ -228,7 +229,7 @@ function updateRouteFilesCache() {
228
229
  }
229
230
 
230
231
  function isIgnoredPublicPath(absPath: string): boolean {
231
- const normalizedPath = relative(WORKSPACE_ROOT, absPath).replace(/\\/g, "/");
232
+ const normalizedPath = relative(PUBLIC_ROOT, absPath).replace(/\\/g, "/");
232
233
 
233
234
  return PUBLIC_IGNORE_DIRS.some(
234
235
  (dir) => normalizedPath === dir || normalizedPath.startsWith(`${dir}/`),
@@ -266,7 +267,7 @@ const publicPipeline = new DebouncedWorker(
266
267
 
267
268
  createSrcWatcher(join(PUBLIC_DIR, "**", "*"), {
268
269
  onEvent: (_ev, abs, _) => {
269
- const relFromPublic = relative(PUBLIC_DIR, abs);
270
+ const relFromPublic = relative(PUBLIC_ROOT, abs).replace(/\\/g, "/");
270
271
  if (isIgnoredPublicPath(abs)) return;
271
272
  publicPipeline.schedule(relFromPublic);
272
273
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-caspian-app",
3
- "version": "0.2.0-beta.53",
3
+ "version": "0.2.0-beta.54",
4
4
  "description": "Scaffold a new Caspian project (FastAPI-powered reactive Python framework).",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",