@camox/cli 0.33.0 → 0.34.0
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/index.mjs +1 -1
- package/package.json +2 -2
- package/templates/default/package.json +0 -4
- package/templates/default/src/{camox/blocks → blocks}/footer.tsx +1 -1
- package/templates/default/src/{camox/blocks → blocks}/hero.tsx +1 -1
- package/templates/default/src/{camox/blocks → blocks}/navbar.tsx +1 -1
- package/templates/default/src/document.ts +7 -0
- package/templates/default/vite.config.ts +0 -2
- package/templates/default/src/client.tsx +0 -12
- package/templates/default/src/router.tsx +0 -33
- package/templates/default/src/routes/__root.tsx +0 -44
- package/templates/default/src/routes/sitemap[.]xml.ts +0 -29
- /package/templates/default/src/{camox/blocks → blocks}/faq.tsx +0 -0
- /package/templates/default/src/{camox/blocks → blocks}/statistics.tsx +0 -0
- /package/templates/default/src/{camox/blocks → blocks}/testimonial.tsx +0 -0
- /package/templates/default/src/{camox/blocks → blocks}/youtube-video.tsx +0 -0
- /package/templates/default/src/{camox/layouts → layouts}/default.tsx +0 -0
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import { ZodError, z } from "zod";
|
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
19
19
|
import slugify from "slugify";
|
|
20
20
|
//#region src/lib/auth.ts
|
|
21
|
-
const CAMOX_URL = process.env.CAMOX_URL || "https://camox.ai";
|
|
21
|
+
const CAMOX_URL = process.env.CAMOX_URL || "https://app.camox.ai";
|
|
22
22
|
const CAMOX_API_URL = process.env.CAMOX_API_URL || "https://api.camox.ai";
|
|
23
23
|
const AUTH_TIMEOUT_MS = 300 * 1e3;
|
|
24
24
|
const AUTH_DIR = path.join(os.homedir(), ".camox");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camox/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"camox": "./dist/index.mjs"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/node": "^24.12.4",
|
|
28
28
|
"@typescript/native-preview": "7.0.0-dev.20260412.1",
|
|
29
29
|
"vite-plus": "^0.1.21",
|
|
30
|
-
"@camox/api-contract": "0.
|
|
30
|
+
"@camox/api-contract": "0.34.0"
|
|
31
31
|
},
|
|
32
32
|
"nx": {
|
|
33
33
|
"tags": [
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
"@fontsource-variable/noto-serif": "^5.2.9",
|
|
19
19
|
"@tailwindcss/vite": "^4.3.0",
|
|
20
20
|
"@tanstack/react-query": "^5.100.11",
|
|
21
|
-
"@tanstack/react-router": "^1.170.4",
|
|
22
|
-
"@tanstack/react-router-ssr-query": "^1.167.0",
|
|
23
|
-
"@tanstack/react-start": "^1.168.6",
|
|
24
|
-
"@tanstack/router-plugin": "^1.168.6",
|
|
25
21
|
"camox": "workspace:*",
|
|
26
22
|
"class-variance-authority": "^0.7.1",
|
|
27
23
|
"clsx": "^2.1.1",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import babelPlugin from "@rolldown/plugin-babel";
|
|
2
2
|
import tailwindcss from "@tailwindcss/vite";
|
|
3
|
-
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
4
3
|
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
|
|
5
4
|
import { camox } from "camox/vite";
|
|
6
5
|
import { nitro } from "nitro/vite";
|
|
@@ -23,7 +22,6 @@ export default defineConfig({
|
|
|
23
22
|
},
|
|
24
23
|
// camox-cli:dev-only-end
|
|
25
24
|
}),
|
|
26
|
-
tanstackStart(),
|
|
27
25
|
react(),
|
|
28
26
|
babelPlugin({ presets: [reactCompilerPreset()] }),
|
|
29
27
|
],
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StartClient } from "@tanstack/react-start/client";
|
|
2
|
-
import { StrictMode, startTransition } from "react";
|
|
3
|
-
import { hydrateRoot } from "react-dom/client";
|
|
4
|
-
|
|
5
|
-
startTransition(() => {
|
|
6
|
-
hydrateRoot(
|
|
7
|
-
document,
|
|
8
|
-
<StrictMode>
|
|
9
|
-
<StartClient />
|
|
10
|
-
</StrictMode>,
|
|
11
|
-
);
|
|
12
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { QueryClient } from "@tanstack/react-query";
|
|
2
|
-
import { createRouter as createTanstackRouter } from "@tanstack/react-router";
|
|
3
|
-
import { setupRouterSsrQueryIntegration } from "@tanstack/react-router-ssr-query";
|
|
4
|
-
|
|
5
|
-
import { routeTree } from "./routeTree.gen";
|
|
6
|
-
|
|
7
|
-
export function getRouter() {
|
|
8
|
-
const queryClient = new QueryClient();
|
|
9
|
-
|
|
10
|
-
const router = createTanstackRouter({
|
|
11
|
-
routeTree,
|
|
12
|
-
defaultPreload: "intent",
|
|
13
|
-
// Providing queryClient to the router context is required by Camox.
|
|
14
|
-
// All Camox queries start with a "camox" prefix in the query key array,
|
|
15
|
-
// so you can share the same client without risking conflicting keys.
|
|
16
|
-
context: { queryClient },
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
setupRouterSsrQueryIntegration({
|
|
20
|
-
router,
|
|
21
|
-
queryClient,
|
|
22
|
-
wrapQueryClient: true,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return router;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Register the router instance for type safety
|
|
29
|
-
declare module "@tanstack/react-router" {
|
|
30
|
-
interface Register {
|
|
31
|
-
router: ReturnType<typeof getRouter>;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { HeadContent, Scripts, createRootRoute } from "@tanstack/react-router";
|
|
2
|
-
|
|
3
|
-
import siteCss from "../styles.css?url";
|
|
4
|
-
|
|
5
|
-
export const Route = createRootRoute({
|
|
6
|
-
head: () => {
|
|
7
|
-
return {
|
|
8
|
-
meta: [
|
|
9
|
-
{
|
|
10
|
-
charSet: "utf-8",
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: "viewport",
|
|
14
|
-
content: "width=device-width, initial-scale=1",
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
title: "{{projectName}}",
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
links: [
|
|
21
|
-
{
|
|
22
|
-
rel: "stylesheet",
|
|
23
|
-
href: siteCss,
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
shellComponent: RootDocument,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
function RootDocument({ children }: { children: React.ReactNode }) {
|
|
33
|
-
return (
|
|
34
|
-
<html lang="en">
|
|
35
|
-
<head>
|
|
36
|
-
<HeadContent />
|
|
37
|
-
</head>
|
|
38
|
-
<body>
|
|
39
|
-
{children}
|
|
40
|
-
<Scripts />
|
|
41
|
-
</body>
|
|
42
|
-
</html>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
-
import { generateSitemap } from "camox/metadata";
|
|
3
|
-
|
|
4
|
-
export const Route = createFileRoute("/sitemap.xml")({
|
|
5
|
-
server: {
|
|
6
|
-
handlers: {
|
|
7
|
-
GET: async ({ request }) => {
|
|
8
|
-
const origin = new URL(request.url).origin;
|
|
9
|
-
const entries = await generateSitemap(origin);
|
|
10
|
-
|
|
11
|
-
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
|
|
12
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
13
|
-
${entries
|
|
14
|
-
.map(
|
|
15
|
-
(entry) => ` <url>
|
|
16
|
-
<loc>${entry.loc}</loc>
|
|
17
|
-
<lastmod>${entry.lastmod}</lastmod>
|
|
18
|
-
</url>`,
|
|
19
|
-
)
|
|
20
|
-
.join("\n")}
|
|
21
|
-
</urlset>`;
|
|
22
|
-
|
|
23
|
-
return new Response(sitemap, {
|
|
24
|
-
headers: { "Content-Type": "application/xml" },
|
|
25
|
-
});
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|