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

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/main.py CHANGED
@@ -248,6 +248,7 @@ class RPCMiddleware:
248
248
  # Route Registration
249
249
  # ====
250
250
 
251
+
251
252
  _route_module_cache = {}
252
253
  _route_signature_cache = {}
253
254
 
@@ -1 +1,13 @@
1
- import"/js/pp-reactive-v2.js";
1
+ import "/js/pp-reactive-v2.js";
2
+
3
+ const pp = (globalThis).pp;
4
+
5
+ if (document.readyState !== "loading") {
6
+ pp?.mount?.();
7
+ } else {
8
+ document.addEventListener(
9
+ "DOMContentLoaded",
10
+ () => pp?.mount?.(),
11
+ { once: true },
12
+ );
13
+ }
@@ -21,7 +21,6 @@ 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);
25
24
  const PUBLIC_IGNORE_DIRS = ["uploads"];
26
25
  let previousRouteFiles: string[] = [];
27
26
  let lastChangedFile: string | null = null;
@@ -229,7 +228,7 @@ function updateRouteFilesCache() {
229
228
  }
230
229
 
231
230
  function isIgnoredPublicPath(absPath: string): boolean {
232
- const normalizedPath = relative(PUBLIC_ROOT, absPath).replace(/\\/g, "/");
231
+ const normalizedPath = relative(WORKSPACE_ROOT, absPath).replace(/\\/g, "/");
233
232
 
234
233
  return PUBLIC_IGNORE_DIRS.some(
235
234
  (dir) => normalizedPath === dir || normalizedPath.startsWith(`${dir}/`),
@@ -267,7 +266,7 @@ const publicPipeline = new DebouncedWorker(
267
266
 
268
267
  createSrcWatcher(join(PUBLIC_DIR, "**", "*"), {
269
268
  onEvent: (_ev, abs, _) => {
270
- const relFromPublic = relative(PUBLIC_ROOT, abs).replace(/\\/g, "/");
269
+ const relFromPublic = relative(PUBLIC_DIR, abs);
271
270
  if (isIgnoredPublicPath(abs)) return;
272
271
  publicPipeline.schedule(relFromPublic);
273
272
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-caspian-app",
3
- "version": "0.2.0-beta.52",
3
+ "version": "0.2.0-beta.53",
4
4
  "description": "Scaffold a new Caspian project (FastAPI-powered reactive Python framework).",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",