baraqex 1.0.70 → 1.0.72

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.
Files changed (26) hide show
  1. package/dist/index.js +5 -1
  2. package/dist/index.js.map +3 -3
  3. package/dist/server/index.d.ts.map +1 -1
  4. package/dist/server/index.js +5 -1
  5. package/dist/server/index.js.map +3 -3
  6. package/package.json +1 -1
  7. package/templates/fullstack-template/package-lock.json +338 -5
  8. package/templates/fullstack-template/package.json +3 -2
  9. package/templates/fullstack-template/server.js +15 -1
  10. package/templates/fullstack-template/src/server.ts +5 -5
  11. package/templates/fullstack-template/vite.config.ts +56 -0
  12. package/templates/ssr-template/src/App.tsx +29 -20
  13. package/templates/fullstack-template/src/App.tsx +0 -271
  14. package/templates/fullstack-template/src/api/auth/login.ts +0 -75
  15. package/templates/fullstack-template/src/api/auth/me.ts +0 -66
  16. package/templates/fullstack-template/src/api/auth/register.ts +0 -59
  17. package/templates/fullstack-template/src/api/hello.js +0 -19
  18. package/templates/fullstack-template/src/api/todos/[id].ts +0 -108
  19. package/templates/fullstack-template/src/api/todos/index.ts +0 -79
  20. package/templates/fullstack-template/src/api/users.js +0 -39
  21. package/templates/fullstack-template/src/components/Dashboard.tsx +0 -129
  22. package/templates/fullstack-template/src/components/Header.tsx +0 -76
  23. package/templates/fullstack-template/src/contexts/ApiContext.tsx +0 -69
  24. package/templates/fullstack-template/src/contexts/AuthContext.tsx +0 -155
  25. package/templates/fullstack-template/src/pages/index.tsx +0 -200
  26. package/templates/fullstack-template/src/styles/App.css +0 -446
package/dist/index.js CHANGED
@@ -1305,6 +1305,7 @@ __export(server_exports, {
1305
1305
  });
1306
1306
  import path4 from "path";
1307
1307
  import fs4 from "fs";
1308
+ import { pathToFileURL as pathToFileURL3 } from "url";
1308
1309
  function getComponentName(filePath, pagesDir) {
1309
1310
  try {
1310
1311
  const relativePath = path4.relative(pagesDir, filePath);
@@ -1542,7 +1543,10 @@ var init_server = __esm({
1542
1543
  };
1543
1544
  }
1544
1545
  try {
1545
- const pageModule = await import(pagePath);
1546
+ const absolutePath = path4.isAbsolute(pagePath) ? pagePath : path4.resolve(pagePath);
1547
+ const fileUrl = pathToFileURL3(absolutePath).href;
1548
+ const urlWithTimestamp = `${fileUrl}?t=${Date.now()}`;
1549
+ const pageModule = await import(urlWithTimestamp);
1546
1550
  if (!pageModule || !pageModule.default) {
1547
1551
  throw new Error(`No default export found in ${pagePath}`);
1548
1552
  }