cronus-ui 0.6.6 → 0.6.7
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/README.md +2 -2
- package/dist/compose/gold-path.js +19 -4
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/package.json +2 -2
- package/templates/apps/admin.json +12 -0
- package/templates/apps/saas.json +6 -0
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ Notes that match the commander surface:
|
|
|
49
49
|
`packages/cli/scripts/build-registry.ts` — each item carries its source, its npm
|
|
50
50
|
`dependencies`, and its `registryDependencies` (other components it imports),
|
|
51
51
|
derived by parsing imports.
|
|
52
|
-
- The default registry is pinned to the CLI package version (`v0.6.
|
|
52
|
+
- The default registry is pinned to the CLI package version (`v0.6.7` here), not
|
|
53
53
|
mutable `main`, so a published CLI reads the registry snapshot it was released
|
|
54
54
|
with. Use `-r, --registry ./registry` when testing local registry changes before
|
|
55
55
|
a release tag exists.
|
|
@@ -80,7 +80,7 @@ Notes that match the commander surface:
|
|
|
80
80
|
"lib": "lib",
|
|
81
81
|
"blocks": "components/blocks"
|
|
82
82
|
},
|
|
83
|
-
"registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.
|
|
83
|
+
"registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.7/registry"
|
|
84
84
|
}
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -262,8 +262,8 @@ export const auth = betterAuth({
|
|
|
262
262
|
database: drizzleAdapter(db, { provider: "sqlite", schema }),
|
|
263
263
|
emailAndPassword: {
|
|
264
264
|
enabled: true,
|
|
265
|
-
sendResetPassword: async ({ url }) => {
|
|
266
|
-
console.info(url);
|
|
265
|
+
sendResetPassword: async ({ user, url }) => {
|
|
266
|
+
console.info(\`Reset \${user.email}: \${url}\`);
|
|
267
267
|
},
|
|
268
268
|
},
|
|
269
269
|
databaseHooks: {
|
|
@@ -390,8 +390,23 @@ export async function signUpEmail({
|
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
export async function requestPasswordReset({ email }: { email: string }) {
|
|
393
|
-
const { error } = await authClient.requestPasswordReset({
|
|
393
|
+
const { error } = await authClient.requestPasswordReset({
|
|
394
|
+
email,
|
|
395
|
+
redirectTo: "/reset-password",
|
|
396
|
+
});
|
|
397
|
+
if (error) throw new Error(error.message || "Reset failed");
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export async function resetPassword({
|
|
401
|
+
token,
|
|
402
|
+
newPassword,
|
|
403
|
+
}: {
|
|
404
|
+
token: string;
|
|
405
|
+
newPassword: string;
|
|
406
|
+
}) {
|
|
407
|
+
const { error } = await authClient.resetPassword({ token, newPassword });
|
|
394
408
|
if (error) throw new Error(error.message || "Reset failed");
|
|
409
|
+
window.location.assign("/login");
|
|
395
410
|
}
|
|
396
411
|
`;
|
|
397
412
|
}
|
|
@@ -407,7 +422,7 @@ function middlewareSource() {
|
|
|
407
422
|
import { NextResponse } from "next/server";
|
|
408
423
|
import { getSessionCookie } from "better-auth/cookies";
|
|
409
424
|
|
|
410
|
-
const AUTH_PAGES = ["/login", "/signup", "/forgot-password"];
|
|
425
|
+
const AUTH_PAGES = ["/login", "/signup", "/forgot-password", "/reset-password"];
|
|
411
426
|
|
|
412
427
|
function invitationOf(request: NextRequest): string | null {
|
|
413
428
|
const { pathname, searchParams } = request.nextUrl;
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const CONFIG_FILE = "cronus-ui.json";
|
|
2
|
-
export declare const CLI_VERSION = "0.6.
|
|
3
|
-
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.
|
|
2
|
+
export declare const CLI_VERSION = "0.6.7";
|
|
3
|
+
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.6.7/registry";
|
|
4
4
|
/** Manifest entry `add`/`upgrade` record per installed registry item. */
|
|
5
5
|
export interface InstalledRecord {
|
|
6
6
|
/** Registry release the files came from (git tag without the leading "v"). */
|
package/dist/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
export const CONFIG_FILE = "cronus-ui.json";
|
|
5
|
-
export const CLI_VERSION = "0.6.
|
|
5
|
+
export const CLI_VERSION = "0.6.7";
|
|
6
6
|
export const DEFAULT_REGISTRY = `https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v${CLI_VERSION}/registry`;
|
|
7
7
|
export const DEFAULT_CONFIG = {
|
|
8
8
|
aliases: { ui: "@/components/ui", lib: "@/lib", blocks: "@/components/blocks" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cronus-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "cronus-ui — add Cronus UI components to your project, shadcn-style (copy-paste registry).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"registry:check": "bun run scripts/check-registry.ts"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@cronus-ui/ai-kit": "0.6.
|
|
57
|
+
"@cronus-ui/ai-kit": "0.6.7",
|
|
58
58
|
"commander": "^15.0.0",
|
|
59
59
|
"picocolors": "^1.1.1"
|
|
60
60
|
},
|
|
@@ -16,6 +16,18 @@
|
|
|
16
16
|
"chrome": "bare",
|
|
17
17
|
"blocks": [{ "block": "login", "variant": "split" }]
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
"route": "/forgot-password",
|
|
21
|
+
"title": "Reset password",
|
|
22
|
+
"chrome": "bare",
|
|
23
|
+
"blocks": ["forgot-password"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"route": "/reset-password",
|
|
27
|
+
"title": "Set new password",
|
|
28
|
+
"chrome": "bare",
|
|
29
|
+
"blocks": [{ "block": "forgot-password", "variant": "reset" }]
|
|
30
|
+
},
|
|
19
31
|
{
|
|
20
32
|
"route": "/",
|
|
21
33
|
"title": "Overview",
|
package/templates/apps/saas.json
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
"chrome": "bare",
|
|
29
29
|
"blocks": ["forgot-password"]
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
"route": "/reset-password",
|
|
33
|
+
"title": "Set new password",
|
|
34
|
+
"chrome": "bare",
|
|
35
|
+
"blocks": [{ "block": "forgot-password", "variant": "reset" }]
|
|
36
|
+
},
|
|
31
37
|
{
|
|
32
38
|
"route": "/",
|
|
33
39
|
"title": "Dashboard",
|