aaex-cli 3.1.2 → 3.1.4

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.
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "my-aaex-app",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "node .aaex/server/server.js",
8
+ "build": "npm build client && npm client-entry && npm build:server",
9
+ "build:client": "vite build",
10
+ "build:server": "vite build --config vite.server.config.ts",
11
+ "client-entry": "node .aaex/Build.js",
12
+ "preview": "cross-env NODE_ENV=production node .aaex/server/server.js"
13
+ },
14
+ "dependencies": {
15
+ "react": "^19.1.1",
16
+ "react-dom": "^19.1.1",
17
+ "react-router": "^7.10.0",
18
+ "react-router-dom": "^7.10.0",
19
+ "express": "^5.1.0",
20
+ "compression": "^1.8.1",
21
+ "sirv": "^3.0.2",
22
+ "aaex-file-router": "^2.5.0",
23
+ "jsonwebtoken": "^9.0.3",
24
+ "mongodb": "^7.0.0",
25
+ "pg": "^8.16.3",
26
+ "bcrypt": "^6.0.0",
27
+ "dotenv": "^17.2.3",
28
+ "aaexjs": "^3.2.1"
29
+ },
30
+ "devDependencies": {
31
+ "typescript": "~5.9.2",
32
+ "@types/react": "^19.1.13",
33
+ "@types/react-dom": "^19.1.9",
34
+ "@types/express": "^5.0.3",
35
+ "@vitejs/plugin-react": "^5.0.2",
36
+ "@types/pg": "^8.16.0",
37
+ "vite": "^7.1.5",
38
+ "cross-env": "^10.0.0",
39
+ "@types/bcrypt": "^6.0.0",
40
+ "@types/jsonwebtoken": "^9.0.10"
41
+ }
42
+ }
@@ -1,32 +1,15 @@
1
1
  import "./App.css";
2
- import { Route, Routes } from "react-router";
3
2
  import serverRoutes from "./server-routes";
4
- import { createElement } from "react";
5
-
6
- function renderRoutes(routesArray: any[], initialData: any) {
7
- return routesArray.map((route) => {
8
- const element = createElement(route.element as any, { ...initialData });
9
-
10
- if (route.children?.length) {
11
- return (
12
- <Route path={route.path} element={element}>
13
- {renderRoutes(route.children, initialData)}
14
- </Route>
15
- );
16
- }
17
-
18
- return <Route path={route.path} element={element} />;
19
- });
20
- }
3
+ import AaExRouter from "aaexjs/router";
21
4
 
22
5
  interface AppProps {
23
6
  initialData?: any;
24
7
  }
25
-
8
+
26
9
  function App({ initialData }: AppProps) {
27
10
  return (
28
11
  <>
29
- <Routes>{renderRoutes(serverRoutes, initialData)}</Routes>
12
+ <AaExRouter routes={serverRoutes} data={initialData} />
30
13
  </>
31
14
  );
32
15
  }
@@ -0,0 +1,5 @@
1
+ import { RouteConfig } from "aaex-file-router/core";
2
+
3
+ const serverRoutes: RouteConfig[] = [];
4
+
5
+ export default serverRoutes;
@@ -15,7 +15,7 @@ export default defineConfig({
15
15
  manifest: true,
16
16
  rollupOptions: {
17
17
  treeshake: false, //makes sure the load function gets build correctly
18
- preserveEntrySignatures: true,
18
+ preserveEntrySignatures: "strict",
19
19
  input: ".aaex/framework/entry-client.tsx",
20
20
  output: {
21
21
  format: "es",