cronus-ui 0.7.1 → 0.7.2
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/commands/upgrade.js +3 -1
- package/dist/compose/gold-path.d.ts +7 -0
- package/dist/compose/gold-path.js +27 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/package.json +2 -2
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.7.
|
|
52
|
+
- The default registry is pinned to the CLI package version (`v0.7.2` 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.7.
|
|
83
|
+
"registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.7.2/registry"
|
|
84
84
|
}
|
|
85
85
|
```
|
|
86
86
|
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";
|
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { createInterface } from "node:readline/promises";
|
|
7
7
|
import pc from "picocolors";
|
|
8
|
-
import { GOLD_PATH_AUTH_SPLIT_FILES, goldPatchAppShellChrome, goldPatchHomePage, goldPatchShellLayout, goldPatchTeamPage, isGoldPathTemplate, patchGoldPathAuthSplit, reemitGoldPathOwned, } from "../compose/gold-path.js";
|
|
8
|
+
import { GOLD_PATH_AUTH_SPLIT_FILES, goldPatchAppShellChrome, goldPatchHomePage, goldPatchShellLayout, goldPatchTeamPage, goldPathLayout, isGoldPathTemplate, patchGoldPathAccountIssuer, patchGoldPathAuthSplit, reemitGoldPathOwned, } from "../compose/gold-path.js";
|
|
9
9
|
import { buildComposePlan } from "../compose/plan.js";
|
|
10
10
|
import { baseSnapshotDest, filterManifestToComposedPages, listBaseSnapshotRels, readBaseSnapshot, reloadManifest, } from "../compose/reload.js";
|
|
11
11
|
import { renderPlan } from "../compose/render.js";
|
|
@@ -484,6 +484,8 @@ async function repatchGoldPathSurfaces(cwd, config, composed) {
|
|
|
484
484
|
if (!Object.keys(composed).some((key) => isGoldPathTemplate(key)))
|
|
485
485
|
return;
|
|
486
486
|
const authImport = `${config.aliases.lib}/auth`;
|
|
487
|
+
const layout = goldPathLayout(config);
|
|
488
|
+
await repatchGoldPathFile(cwd, `${layout.dbDir}/schema.ts`, patchGoldPathAccountIssuer, "account.issuer nullable");
|
|
487
489
|
await repatchGoldPathFile(cwd, join(config.paths.blocks, "app-shell-chrome.tsx"), goldPatchAppShellChrome, "WorkspaceMenu / InviteMember / SessionUser / nav / notifications");
|
|
488
490
|
for (const file of GOLD_PATH_AUTH_SPLIT_FILES) {
|
|
489
491
|
await repatchGoldPathFile(cwd, join(config.paths.blocks, file), patchGoldPathAuthSplit, "auth split without Dana Reyes");
|
|
@@ -58,6 +58,13 @@ export declare function goldPathLayout(config: CronusUIConfig): GoldPathLayout;
|
|
|
58
58
|
* is not an already-stripped gold-path split.
|
|
59
59
|
*/
|
|
60
60
|
export declare function patchGoldPathAuthSplit(source: string): string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Drop `.notNull()` on `account.issuer`. Better Auth 1.7.3 never writes the
|
|
63
|
+
* column and refuses a required one (`SCHEMA_MISMATCH`). Idempotent. Does not
|
|
64
|
+
* rewrite the rest of a user-owned schema — used by compose and `upgrade --all`
|
|
65
|
+
* so 0.7.1 apps pick up the fix without losing hand edits.
|
|
66
|
+
*/
|
|
67
|
+
export declare function patchGoldPathAccountIssuer(source: string): string | undefined;
|
|
61
68
|
/** Remove the no-op Notifications Bell from gold-path chrome. Idempotent. */
|
|
62
69
|
export declare function patchGoldPathChromeNotifications(source: string): string | undefined;
|
|
63
70
|
/**
|
|
@@ -187,7 +187,7 @@ export const session = sqliteTable("session", {
|
|
|
187
187
|
|
|
188
188
|
export const account = sqliteTable("account", {
|
|
189
189
|
id: text("id").primaryKey(),
|
|
190
|
-
issuer: text("issuer")
|
|
190
|
+
issuer: text("issuer"),
|
|
191
191
|
accountId: text("account_id").notNull(),
|
|
192
192
|
providerId: text("provider_id").notNull(),
|
|
193
193
|
userId: text("user_id")
|
|
@@ -1161,6 +1161,18 @@ export function patchGoldPathAuthSplit(source) {
|
|
|
1161
1161
|
out = dropUnusedFromImport(out, "@cronus-ui/ui");
|
|
1162
1162
|
return out;
|
|
1163
1163
|
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Drop `.notNull()` on `account.issuer`. Better Auth 1.7.3 never writes the
|
|
1166
|
+
* column and refuses a required one (`SCHEMA_MISMATCH`). Idempotent. Does not
|
|
1167
|
+
* rewrite the rest of a user-owned schema — used by compose and `upgrade --all`
|
|
1168
|
+
* so 0.7.1 apps pick up the fix without losing hand edits.
|
|
1169
|
+
*/
|
|
1170
|
+
export function patchGoldPathAccountIssuer(source) {
|
|
1171
|
+
const next = source.replace(/(issuer:\s*(?:text|varchar)\([^)]*\))\s*\.notNull\(\)/g, "$1");
|
|
1172
|
+
if (next === source)
|
|
1173
|
+
return undefined;
|
|
1174
|
+
return next;
|
|
1175
|
+
}
|
|
1164
1176
|
/** Remove the no-op Notifications Bell from gold-path chrome. Idempotent. */
|
|
1165
1177
|
export function patchGoldPathChromeNotifications(source) {
|
|
1166
1178
|
if (!source.includes('aria-label="Notifications"'))
|
|
@@ -1553,6 +1565,20 @@ export async function applyGoldPath(options) {
|
|
|
1553
1565
|
for (const file of files) {
|
|
1554
1566
|
await writeRel(targetDir, file.rel, file.content, overwrite, file.always === true, written, skipped);
|
|
1555
1567
|
}
|
|
1568
|
+
const schemaRel = `${layout.dbDir}/schema.ts`;
|
|
1569
|
+
const schemaDest = resolveSafeDest(targetDir, ".", schemaRel);
|
|
1570
|
+
if (existsSync(schemaDest)) {
|
|
1571
|
+
const current = await readFile(schemaDest, "utf8");
|
|
1572
|
+
const patched = patchGoldPathAccountIssuer(current);
|
|
1573
|
+
if (patched !== undefined && patched !== current) {
|
|
1574
|
+
await writeFileEnsured(schemaDest, patched);
|
|
1575
|
+
if (!written.includes(schemaRel))
|
|
1576
|
+
written.push(schemaRel);
|
|
1577
|
+
const skipAt = skipped.indexOf(schemaRel);
|
|
1578
|
+
if (skipAt >= 0)
|
|
1579
|
+
skipped.splice(skipAt, 1);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1556
1582
|
const chromeDest = resolveSafeDest(targetDir, ".", chromeRel);
|
|
1557
1583
|
if (existsSync(chromeDest)) {
|
|
1558
1584
|
const current = await readFile(chromeDest, "utf8");
|
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.7.
|
|
3
|
-
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.7.
|
|
2
|
+
export declare const CLI_VERSION = "0.7.2";
|
|
3
|
+
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.7.2/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.7.
|
|
5
|
+
export const CLI_VERSION = "0.7.2";
|
|
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.7.
|
|
3
|
+
"version": "0.7.2",
|
|
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.7.
|
|
57
|
+
"@cronus-ui/ai-kit": "0.7.2",
|
|
58
58
|
"commander": "^15.0.0",
|
|
59
59
|
"picocolors": "^1.1.1"
|
|
60
60
|
},
|