@donotdev/cli 0.3.2 → 0.3.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.
- package/dependencies-matrix.json +10 -10
- package/dist/bin/commands/agent-setup.js +1 -1
- package/dist/bin/commands/build.js +142 -2
- package/dist/bin/commands/bump.js +12 -8
- package/dist/bin/commands/cacheout.js +2 -1
- package/dist/bin/commands/coach.js +1 -1
- package/dist/bin/commands/create-app.js +3 -3
- package/dist/bin/commands/create-project.js +3 -3
- package/dist/bin/commands/db-check.js +1 -1
- package/dist/bin/commands/db.js +1 -1
- package/dist/bin/commands/deploy.js +12 -2
- package/dist/bin/commands/dev.js +1 -1
- package/dist/bin/commands/doctor.js +1 -1
- package/dist/bin/commands/emu.js +1 -1
- package/dist/bin/commands/format.js +1 -1
- package/dist/bin/commands/get-demo.js +3 -3
- package/dist/bin/commands/make-admin.js +12 -2
- package/dist/bin/commands/preview.js +1 -1
- package/dist/bin/commands/seed.js +1 -1
- package/dist/bin/commands/setup-cicd.js +12 -2
- package/dist/bin/commands/setup.js +1 -1
- package/dist/bin/commands/staging.js +12 -2
- package/dist/bin/commands/sync-secrets.js +1 -1
- package/dist/bin/commands/type-check.js +12 -2
- package/dist/bin/commands/wai.js +1 -1
- package/dist/bin/dndev.js +12 -2
- package/dist/index.js +147 -6
- package/package.json +1 -1
- package/templates/app-demo/index.html.example +1 -1
- package/templates/app-demo/src/themes.css.example +4 -4
- package/templates/app-dndev/index.html.example +1 -2
- package/templates/app-dndev/src/themes.css.example +3 -3
- package/templates/app-next/postcss.config.js.example +1 -1
- package/templates/app-next/src/app/AppDocument.tsx.example +4 -8
- package/templates/app-next/src/globals.css.example +4 -4
- package/templates/app-vite/index.html.example +1 -2
- package/templates/app-vite/src/themes.css.example +3 -3
- package/templates/overlay-supabase/env.fragment.example +4 -0
- package/templates/overlay-supabase/env.fragment.nextjs.example +4 -0
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +5 -3
- package/templates/root-consumer/.gitignore.example +2 -0
- package/templates/app-demo/public/fonts/Roboto-400-cyrillic-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-cyrillic.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-greek-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-greek.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-latin-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-latin.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-vietnamese.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-cyrillic-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-cyrillic.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-greek-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-greek.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-latin-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-latin.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-vietnamese.woff2.example +0 -0
- package/templates/app-demo/public/fonts/fonts.css.example +0 -144
|
@@ -8905,7 +8905,7 @@ var init_type_guards = __esm({
|
|
|
8905
8905
|
|
|
8906
8906
|
// packages/tooling/src/bundler/utils.ts
|
|
8907
8907
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
8908
|
-
import {
|
|
8908
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8909
8909
|
import { createRequire as createRequire3 } from "node:module";
|
|
8910
8910
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
8911
8911
|
import process from "node:process";
|
|
@@ -9486,7 +9486,11 @@ var init_command_registry = __esm({
|
|
|
9486
9486
|
flags: "--tar",
|
|
9487
9487
|
description: "Create tarballs + update test repo (no publish)"
|
|
9488
9488
|
},
|
|
9489
|
-
{ flags: "--force", description: "force publish (npm publish --force)" }
|
|
9489
|
+
{ flags: "--force", description: "force publish (npm publish --force)" },
|
|
9490
|
+
{
|
|
9491
|
+
flags: "-y, --yes",
|
|
9492
|
+
description: 'skip the "publish to npm?" confirmation (unattended runs)'
|
|
9493
|
+
}
|
|
9490
9494
|
],
|
|
9491
9495
|
loader: "../bundler/bundle.ts",
|
|
9492
9496
|
exportName: "bundle"
|
|
@@ -9549,6 +9553,12 @@ var init_command_registry = __esm({
|
|
|
9549
9553
|
description: "Update framework packages and peer dependencies to latest compatible versions",
|
|
9550
9554
|
category: "build",
|
|
9551
9555
|
public: true,
|
|
9556
|
+
options: [
|
|
9557
|
+
{
|
|
9558
|
+
flags: "-y, --yes",
|
|
9559
|
+
description: "Accept every default answer: packages and docs, no major updates, then bun install"
|
|
9560
|
+
}
|
|
9561
|
+
],
|
|
9552
9562
|
loader: "../maintenance/bump.ts",
|
|
9553
9563
|
exportName: "bump"
|
|
9554
9564
|
},
|
|
@@ -8542,7 +8542,7 @@ var init_type_guards = __esm({
|
|
|
8542
8542
|
|
|
8543
8543
|
// packages/tooling/src/bundler/utils.ts
|
|
8544
8544
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
8545
|
-
import {
|
|
8545
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8546
8546
|
import { createRequire as createRequire3 } from "node:module";
|
|
8547
8547
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
8548
8548
|
import process from "node:process";
|
|
@@ -8239,7 +8239,7 @@ var init_type_guards = __esm({
|
|
|
8239
8239
|
|
|
8240
8240
|
// packages/tooling/src/bundler/utils.ts
|
|
8241
8241
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
8242
|
-
import {
|
|
8242
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8243
8243
|
import { createRequire as createRequire3 } from "node:module";
|
|
8244
8244
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
8245
8245
|
import process from "node:process";
|
|
@@ -8610,7 +8610,11 @@ var init_command_registry = __esm({
|
|
|
8610
8610
|
flags: "--tar",
|
|
8611
8611
|
description: "Create tarballs + update test repo (no publish)"
|
|
8612
8612
|
},
|
|
8613
|
-
{ flags: "--force", description: "force publish (npm publish --force)" }
|
|
8613
|
+
{ flags: "--force", description: "force publish (npm publish --force)" },
|
|
8614
|
+
{
|
|
8615
|
+
flags: "-y, --yes",
|
|
8616
|
+
description: 'skip the "publish to npm?" confirmation (unattended runs)'
|
|
8617
|
+
}
|
|
8614
8618
|
],
|
|
8615
8619
|
loader: "../bundler/bundle.ts",
|
|
8616
8620
|
exportName: "bundle"
|
|
@@ -8673,6 +8677,12 @@ var init_command_registry = __esm({
|
|
|
8673
8677
|
description: "Update framework packages and peer dependencies to latest compatible versions",
|
|
8674
8678
|
category: "build",
|
|
8675
8679
|
public: true,
|
|
8680
|
+
options: [
|
|
8681
|
+
{
|
|
8682
|
+
flags: "-y, --yes",
|
|
8683
|
+
description: "Accept every default answer: packages and docs, no major updates, then bun install"
|
|
8684
|
+
}
|
|
8685
|
+
],
|
|
8676
8686
|
loader: "../maintenance/bump.ts",
|
|
8677
8687
|
exportName: "bump"
|
|
8678
8688
|
},
|
package/dist/bin/commands/wai.js
CHANGED
|
@@ -7533,7 +7533,7 @@ var init_pathResolver = __esm({
|
|
|
7533
7533
|
|
|
7534
7534
|
// packages/tooling/src/bundler/utils.ts
|
|
7535
7535
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7536
|
-
import {
|
|
7536
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7537
7537
|
import { createRequire as createRequire3 } from "node:module";
|
|
7538
7538
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
7539
7539
|
import process from "node:process";
|
package/dist/bin/dndev.js
CHANGED
|
@@ -872,7 +872,11 @@ var init_command_registry = __esm({
|
|
|
872
872
|
flags: "--tar",
|
|
873
873
|
description: "Create tarballs + update test repo (no publish)"
|
|
874
874
|
},
|
|
875
|
-
{ flags: "--force", description: "force publish (npm publish --force)" }
|
|
875
|
+
{ flags: "--force", description: "force publish (npm publish --force)" },
|
|
876
|
+
{
|
|
877
|
+
flags: "-y, --yes",
|
|
878
|
+
description: 'skip the "publish to npm?" confirmation (unattended runs)'
|
|
879
|
+
}
|
|
876
880
|
],
|
|
877
881
|
loader: "../bundler/bundle.ts",
|
|
878
882
|
exportName: "bundle"
|
|
@@ -935,6 +939,12 @@ var init_command_registry = __esm({
|
|
|
935
939
|
description: "Update framework packages and peer dependencies to latest compatible versions",
|
|
936
940
|
category: "build",
|
|
937
941
|
public: true,
|
|
942
|
+
options: [
|
|
943
|
+
{
|
|
944
|
+
flags: "-y, --yes",
|
|
945
|
+
description: "Accept every default answer: packages and docs, no major updates, then bun install"
|
|
946
|
+
}
|
|
947
|
+
],
|
|
938
948
|
loader: "../maintenance/bump.ts",
|
|
939
949
|
exportName: "bump"
|
|
940
950
|
},
|
|
@@ -1502,7 +1512,7 @@ function registerCommand(program2, def, action) {
|
|
|
1502
1512
|
}
|
|
1503
1513
|
|
|
1504
1514
|
// packages/cli/src/bin/dndev.mjs
|
|
1505
|
-
var CLI_VERSION = true ? "0.3.
|
|
1515
|
+
var CLI_VERSION = true ? "0.3.4" : "0.0.0";
|
|
1506
1516
|
var args = process.argv.slice(2);
|
|
1507
1517
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
|
|
1508
1518
|
console.log(CLI_VERSION);
|
package/dist/index.js
CHANGED
|
@@ -9528,7 +9528,7 @@ var init_type_guards = __esm({
|
|
|
9528
9528
|
|
|
9529
9529
|
// packages/tooling/src/bundler/utils.ts
|
|
9530
9530
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
9531
|
-
import {
|
|
9531
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
9532
9532
|
import { createRequire as createRequire3 } from "node:module";
|
|
9533
9533
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
9534
9534
|
import process from "node:process";
|
|
@@ -10144,7 +10144,11 @@ var init_command_registry = __esm({
|
|
|
10144
10144
|
flags: "--tar",
|
|
10145
10145
|
description: "Create tarballs + update test repo (no publish)"
|
|
10146
10146
|
},
|
|
10147
|
-
{ flags: "--force", description: "force publish (npm publish --force)" }
|
|
10147
|
+
{ flags: "--force", description: "force publish (npm publish --force)" },
|
|
10148
|
+
{
|
|
10149
|
+
flags: "-y, --yes",
|
|
10150
|
+
description: 'skip the "publish to npm?" confirmation (unattended runs)'
|
|
10151
|
+
}
|
|
10148
10152
|
],
|
|
10149
10153
|
loader: "../bundler/bundle.ts",
|
|
10150
10154
|
exportName: "bundle"
|
|
@@ -10207,6 +10211,12 @@ var init_command_registry = __esm({
|
|
|
10207
10211
|
description: "Update framework packages and peer dependencies to latest compatible versions",
|
|
10208
10212
|
category: "build",
|
|
10209
10213
|
public: true,
|
|
10214
|
+
options: [
|
|
10215
|
+
{
|
|
10216
|
+
flags: "-y, --yes",
|
|
10217
|
+
description: "Accept every default answer: packages and docs, no major updates, then bun install"
|
|
10218
|
+
}
|
|
10219
|
+
],
|
|
10210
10220
|
loader: "../maintenance/bump.ts",
|
|
10211
10221
|
exportName: "bump"
|
|
10212
10222
|
},
|
|
@@ -23976,6 +23986,132 @@ init_utils2();
|
|
|
23976
23986
|
init_deploy_utils();
|
|
23977
23987
|
import { execSync as execSync2, spawnSync as spawnSync5 } from "node:child_process";
|
|
23978
23988
|
|
|
23989
|
+
// packages/tooling/src/apps/font-report.ts
|
|
23990
|
+
init_utils2();
|
|
23991
|
+
init_cli_output();
|
|
23992
|
+
init_pathResolver();
|
|
23993
|
+
var OUTPUTS = {
|
|
23994
|
+
nextjs: { html: [".next/server/app"], fonts: "public/fonts", bundled: [".next/static/media"] },
|
|
23995
|
+
vite: { html: ["dist"], fonts: "dist/fonts", bundled: ["dist/assets"] }
|
|
23996
|
+
};
|
|
23997
|
+
var NEXT_EXPORT_DIR = "out";
|
|
23998
|
+
var NEXT_SERVER_FILES = ".next/required-server-files.json";
|
|
23999
|
+
var NOT_FRAMEWORK_DOCUMENTS = /(^|\/)_global-error\.html$/;
|
|
24000
|
+
var FONT_STYLE_RE = /<style\b[^>]*(?:id|data-href)="dndev-fonts"[^>]*>([\s\S]*?)<\/style>/g;
|
|
24001
|
+
var LINK_RE = /<link\b[^>]*>/g;
|
|
24002
|
+
var HASHED_FONT_RE = /\/fonts\/[^/"]+\.[0-9a-f]{8}\.woff2$/;
|
|
24003
|
+
function attributesOf(tag) {
|
|
24004
|
+
const attributes = {};
|
|
24005
|
+
for (const [, name, value] of tag.matchAll(/\s([a-zA-Z-]+)(?:="([^"]*)")?/g)) {
|
|
24006
|
+
attributes[name.toLowerCase()] = value ?? "";
|
|
24007
|
+
}
|
|
24008
|
+
return attributes;
|
|
24009
|
+
}
|
|
24010
|
+
function htmlFiles(dir) {
|
|
24011
|
+
if (!pathExists(dir)) return [];
|
|
24012
|
+
const files = [];
|
|
24013
|
+
for (const entry of readdirSync3(dir, { withFileTypes: true })) {
|
|
24014
|
+
const path = joinPath(dir, entry.name);
|
|
24015
|
+
if (entry.isDirectory()) files.push(...htmlFiles(path));
|
|
24016
|
+
else if (entry.name.endsWith(".html")) files.push(path);
|
|
24017
|
+
}
|
|
24018
|
+
return files;
|
|
24019
|
+
}
|
|
24020
|
+
function woff2Files(dir) {
|
|
24021
|
+
if (!pathExists(dir)) return [];
|
|
24022
|
+
return readdirSync3(dir, { withFileTypes: true }).flatMap((entry) => {
|
|
24023
|
+
const path = joinPath(dir, entry.name);
|
|
24024
|
+
if (entry.isDirectory()) return woff2Files(path);
|
|
24025
|
+
return entry.name.endsWith(".woff2") ? [path] : [];
|
|
24026
|
+
});
|
|
24027
|
+
}
|
|
24028
|
+
function checkFontHtml(html, fontExists) {
|
|
24029
|
+
const problems = [];
|
|
24030
|
+
const headEnd = html.indexOf("</head>");
|
|
24031
|
+
const head = headEnd === -1 ? html : html.slice(0, headEnd);
|
|
24032
|
+
const styles = [...html.matchAll(FONT_STYLE_RE)];
|
|
24033
|
+
if (styles.length !== 1) {
|
|
24034
|
+
problems.push(`${styles.length} inline font styles (dndev-fonts), expected 1`);
|
|
24035
|
+
}
|
|
24036
|
+
const css = styles.map((match) => match[1]).join("\n");
|
|
24037
|
+
if (styles[0] && styles[0].index > headEnd) problems.push("the inline font style is not in <head>");
|
|
24038
|
+
const links = [...head.matchAll(LINK_RE)].map((match) => ({
|
|
24039
|
+
index: match.index,
|
|
24040
|
+
attributes: attributesOf(match[0])
|
|
24041
|
+
}));
|
|
24042
|
+
const firstStylesheet = links.find(({ attributes }) => attributes.rel === "stylesheet");
|
|
24043
|
+
const preloads = links.filter(
|
|
24044
|
+
({ attributes }) => attributes.rel === "preload" && attributes.as === "font"
|
|
24045
|
+
);
|
|
24046
|
+
if (preloads.length === 0) problems.push("no font preload in <head>");
|
|
24047
|
+
for (const { index, attributes } of preloads) {
|
|
24048
|
+
const href = attributes.href ?? "";
|
|
24049
|
+
if (attributes.type !== "font/woff2") problems.push(`${href}: preload without type="font/woff2"`);
|
|
24050
|
+
if (!("crossorigin" in attributes)) problems.push(`${href}: preload without crossorigin`);
|
|
24051
|
+
if (firstStylesheet && index > firstStylesheet.index) {
|
|
24052
|
+
problems.push(`${href}: preload after the first stylesheet`);
|
|
24053
|
+
}
|
|
24054
|
+
if (!HASHED_FONT_RE.test(href)) problems.push(`${href}: not a content-hashed /fonts/ file`);
|
|
24055
|
+
else if (!fontExists(href.slice(href.indexOf("/fonts/") + "/fonts/".length))) {
|
|
24056
|
+
problems.push(`${href}: file missing from the build`);
|
|
24057
|
+
}
|
|
24058
|
+
if (!css.includes(`url(${href})`)) problems.push(`${href}: no @font-face src names it`);
|
|
24059
|
+
}
|
|
24060
|
+
const webFaces = css.match(/@font-face\{[^}]*src:url\([^}]*\}/g) ?? [];
|
|
24061
|
+
for (const face of webFaces) {
|
|
24062
|
+
if (!face.includes("font-display:optional")) {
|
|
24063
|
+
problems.push(`web face without font-display:optional: ${face.slice(0, 80)}`);
|
|
24064
|
+
}
|
|
24065
|
+
}
|
|
24066
|
+
if (!/font-family: '[^']+ Fallback'/.test(css)) problems.push("no '<Family> Fallback' face");
|
|
24067
|
+
if (/href="[^"]*dndev-fonts\.css"/.test(html)) problems.push("links the former /dndev-fonts.css");
|
|
24068
|
+
return problems;
|
|
24069
|
+
}
|
|
24070
|
+
function checkFontOutput(appDir, framework) {
|
|
24071
|
+
const output = OUTPUTS[framework];
|
|
24072
|
+
const fontsDir = joinPath(appDir, output.fonts);
|
|
24073
|
+
const shipped = pathExists(fontsDir) ? readdirSync3(fontsDir) : [];
|
|
24074
|
+
if (shipped.length === 0) return { documents: 0, problems: [] };
|
|
24075
|
+
const fontExists = (name) => shipped.includes(name);
|
|
24076
|
+
const problems = [];
|
|
24077
|
+
const serverFiles = joinPath(appDir, NEXT_SERVER_FILES);
|
|
24078
|
+
const isExport = framework === "nextjs" && pathExists(serverFiles) && readSync(serverFiles, { format: "json" })?.config?.output === "export";
|
|
24079
|
+
const htmlDirs = isExport ? [NEXT_EXPORT_DIR] : output.html;
|
|
24080
|
+
const documents = htmlDirs.flatMap(
|
|
24081
|
+
(dir) => htmlFiles(joinPath(appDir, dir)).filter((file) => {
|
|
24082
|
+
const relative4 = file.slice(joinPath(appDir, dir).length + 1);
|
|
24083
|
+
return !NOT_FRAMEWORK_DOCUMENTS.test(relative4) && !pathExists(joinPath(appDir, "public", relative4));
|
|
24084
|
+
})
|
|
24085
|
+
);
|
|
24086
|
+
for (const file of documents) {
|
|
24087
|
+
const html = readSync(file, { format: "text" });
|
|
24088
|
+
if (typeof html !== "string" || !html.includes("<head")) continue;
|
|
24089
|
+
for (const problem of checkFontHtml(html, fontExists)) {
|
|
24090
|
+
problems.push(`${file.slice(appDir.length + 1)}: ${problem}`);
|
|
24091
|
+
}
|
|
24092
|
+
}
|
|
24093
|
+
for (const dir of output.bundled) {
|
|
24094
|
+
for (const file of woff2Files(joinPath(appDir, dir))) {
|
|
24095
|
+
problems.push(`${file.slice(appDir.length + 1)}: font shipped by the bundler (the font plan ships every font)`);
|
|
24096
|
+
}
|
|
24097
|
+
}
|
|
24098
|
+
return { documents: documents.length, problems };
|
|
24099
|
+
}
|
|
24100
|
+
function reportFonts(appDir, framework) {
|
|
24101
|
+
const { documents, problems } = checkFontOutput(appDir, framework);
|
|
24102
|
+
if (documents === 0 && problems.length === 0) {
|
|
24103
|
+
log2.info("\u{1F524} fonts: system fonts only, nothing to preload");
|
|
24104
|
+
return 0;
|
|
24105
|
+
}
|
|
24106
|
+
if (problems.length === 0) {
|
|
24107
|
+
log2.info(`\u{1F524} fonts: ${documents} documents preload their fonts before the CSS, inline @font-face, font-display: optional`);
|
|
24108
|
+
return 0;
|
|
24109
|
+
}
|
|
24110
|
+
log2.error(`\u{1F524} fonts: ${problems.length} problem(s) in the build output:
|
|
24111
|
+
${problems.join("\n ")}`);
|
|
24112
|
+
return 1;
|
|
24113
|
+
}
|
|
24114
|
+
|
|
23979
24115
|
// packages/tooling/src/apps/sitemap-report.ts
|
|
23980
24116
|
init_utils2();
|
|
23981
24117
|
init_cli_output();
|
|
@@ -24196,6 +24332,10 @@ async function main(options = {}) {
|
|
|
24196
24332
|
return result.status || 1;
|
|
24197
24333
|
}
|
|
24198
24334
|
if (app.framework === "nextjs") reportSitemap(appDir);
|
|
24335
|
+
if (app.framework === "nextjs" || app.framework === "vite") {
|
|
24336
|
+
const fontStatus = reportFonts(appDir, app.framework);
|
|
24337
|
+
if (fontStatus !== 0) return fontStatus;
|
|
24338
|
+
}
|
|
24199
24339
|
}
|
|
24200
24340
|
if (buildType === "functions" || buildType === "both") {
|
|
24201
24341
|
if (!hasFunc) {
|
|
@@ -26308,9 +26448,9 @@ function buildRoutes(appDir) {
|
|
|
26308
26448
|
}
|
|
26309
26449
|
}
|
|
26310
26450
|
var SPA_SHELL_URL = "/_shell";
|
|
26311
|
-
function cleanUrlOverrides(
|
|
26451
|
+
function cleanUrlOverrides(htmlFiles2) {
|
|
26312
26452
|
const overrides = {};
|
|
26313
|
-
for (const file of
|
|
26453
|
+
for (const file of htmlFiles2) {
|
|
26314
26454
|
if (!file.endsWith(".html") || file === "index.html" || file.endsWith("/index.html")) continue;
|
|
26315
26455
|
overrides[file] = { path: file.slice(0, -".html".length) };
|
|
26316
26456
|
}
|
|
@@ -27485,8 +27625,8 @@ function generatePackageJson(templateName, mode, options = {}) {
|
|
|
27485
27625
|
"chrome >= 64",
|
|
27486
27626
|
"edge >= 79",
|
|
27487
27627
|
"firefox >= 67",
|
|
27488
|
-
"safari >=
|
|
27489
|
-
"ios_saf >=
|
|
27628
|
+
"safari >= 15",
|
|
27629
|
+
"ios_saf >= 15",
|
|
27490
27630
|
"opera >= 51",
|
|
27491
27631
|
"not dead"
|
|
27492
27632
|
];
|
|
@@ -29312,6 +29452,7 @@ async function findCacheItems(targetDir, verbose) {
|
|
|
29312
29452
|
check(joinPath(appPath, "public", "llms.txt"));
|
|
29313
29453
|
check(joinPath(appPath, "public", "llms-full.txt"));
|
|
29314
29454
|
check(joinPath(appPath, "public", "dndev-fonts.css"));
|
|
29455
|
+
check(joinPath(appPath, "public", "fonts"));
|
|
29315
29456
|
check(joinPath(appPath, ".dndev-build"));
|
|
29316
29457
|
}
|
|
29317
29458
|
} catch (error2) {
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
9
|
<title>DoNotDev Demo</title>
|
|
10
10
|
|
|
11
|
-
<!-- Fonts: the theme's
|
|
11
|
+
<!-- Fonts: the build adds the theme's font preloads and inline @font-face to <head> (no font link here). -->
|
|
12
12
|
|
|
13
13
|
<!-- ✅ CRITICAL CSS: ECG waveform loader -->
|
|
14
14
|
<style>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
|
|
102
102
|
/* 6. Typography - Monospace for body, Space Grotesk 700 for headings */
|
|
103
103
|
--font-family: var(--font-mono);
|
|
104
|
-
--font-headline: 'Space Grotesk', var(--font-sans);
|
|
104
|
+
--font-headline: 'Space Grotesk', 'Space Grotesk Fallback', var(--font-sans);
|
|
105
105
|
--font-weight-semibold: 700;
|
|
106
106
|
--font-weight-bold: 700;
|
|
107
107
|
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
|
|
205
205
|
/* 6. Typography — lighter weights, serif headlines */
|
|
206
206
|
--font-family: var(--font-sans);
|
|
207
|
-
--font-headline: 'Playfair Display', var(--font-serif);
|
|
207
|
+
--font-headline: 'Playfair Display', 'Playfair Display Fallback', var(--font-serif);
|
|
208
208
|
--font-weight-normal: 300;
|
|
209
209
|
--font-weight-medium: 400;
|
|
210
210
|
--font-weight-semibold: 500;
|
|
@@ -268,8 +268,8 @@
|
|
|
268
268
|
--radius-floating: 0;
|
|
269
269
|
|
|
270
270
|
/* 6. Typography - Press Start 2P (pixel font, 400 only) */
|
|
271
|
-
--font-family: 'Press Start 2P', var(--font-mono);
|
|
272
|
-
--font-headline: 'Press Start 2P', var(--font-mono);
|
|
271
|
+
--font-family: 'Press Start 2P', 'Press Start 2P Fallback', var(--font-mono);
|
|
272
|
+
--font-headline: 'Press Start 2P', 'Press Start 2P Fallback', var(--font-mono);
|
|
273
273
|
--font-weight-normal: 400;
|
|
274
274
|
--font-weight-medium: 400;
|
|
275
275
|
--font-weight-semibold: 400;
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
<!-- ✅ DnDev: Asset manifest injection point -->
|
|
12
12
|
<!-- window.__DNDEV_ASSETS__ and __DNDEV_ASSET_MANIFEST__ injected here -->
|
|
13
13
|
|
|
14
|
-
<!-- Fonts: the theme's
|
|
15
|
-
<!-- DNDEV_FONT_PRELOADS -->
|
|
14
|
+
<!-- Fonts: the build adds the theme's font preloads and inline @font-face to <head> (no font link here). -->
|
|
16
15
|
|
|
17
16
|
<!-- ✅ PERFORMANCE: Preconnect to external domains (OAuth providers) -->
|
|
18
17
|
<!-- GitHub OAuth -->
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
--radius-interactive: 0;
|
|
118
118
|
--radius-surface: 0;
|
|
119
119
|
--radius-floating: 0;
|
|
120
|
-
--font-family: 'Space Grotesk', var(--font-sans);
|
|
121
|
-
--font-headline: 'Space Grotesk', var(--font-sans);
|
|
120
|
+
--font-family: 'Space Grotesk', 'Space Grotesk Fallback', var(--font-sans);
|
|
121
|
+
--font-headline: 'Space Grotesk', 'Space Grotesk Fallback', var(--font-sans);
|
|
122
122
|
--border-width: 2px;
|
|
123
123
|
--border-huge: 4px;
|
|
124
124
|
--shadow-sm: 4px 4px 0px 0px var(--primary);
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
--warning-foreground: #1c1917;
|
|
156
156
|
--destructive-foreground: #ffffff;
|
|
157
157
|
--font-family: var(--font-sans);
|
|
158
|
-
--font-headline: 'Playfair Display', var(--font-serif);
|
|
158
|
+
--font-headline: 'Playfair Display', 'Playfair Display Fallback', var(--font-serif);
|
|
159
159
|
--radius-interactive: 0.375rem;
|
|
160
160
|
--radius-surface: 0.5rem;
|
|
161
161
|
--radius-floating: 0.5rem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PostCSS config for Next.js
|
|
3
|
-
* Uses framework resolver
|
|
3
|
+
* Uses the framework resolver (workspace-aware resolution of @donotdev CSS imports)
|
|
4
4
|
*/
|
|
5
5
|
import { definePostCSSConfig } from '@donotdev/core/next';
|
|
6
6
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
import { FontPreloadLinks } from '@donotdev/ui/next';
|
|
5
|
-
|
|
6
4
|
import '../globals.css';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* Fonts: the framework ships the families src/themes.css names (font preloads and inline
|
|
8
|
+
* @font-face in the server HTML, rendered by the generated root layout). Nothing to add
|
|
9
|
+
* here: no next/font, no @fontsource import, no <link> to a font stylesheet.
|
|
12
10
|
*/
|
|
13
11
|
|
|
14
12
|
/**
|
|
@@ -48,9 +46,7 @@ export function AppDocument({
|
|
|
48
46
|
className="dndev-design-tokens light"
|
|
49
47
|
suppressHydrationWarning
|
|
50
48
|
>
|
|
51
|
-
<head
|
|
52
|
-
<FontPreloadLinks />
|
|
53
|
-
</head>
|
|
49
|
+
<head />
|
|
54
50
|
<body className="light">{children}</body>
|
|
55
51
|
</html>
|
|
56
52
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* Next.js app globals.css */
|
|
2
|
-
@import '@donotdev/ui/dndev
|
|
2
|
+
@import '@donotdev/ui/dndev.css';
|
|
3
3
|
|
|
4
4
|
@import './themes.css';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Font choices (--font-family, --font-sans, etc.) belong in themes.css.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Font choices (--font-family, --font-sans, etc.) belong in themes.css. The framework
|
|
8
|
+
* ships the families they name (preloads + inline @font-face, files in public/fonts/):
|
|
9
|
+
* no @font-face or @fontsource import here.
|
|
10
10
|
*/
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
<!-- ✅ DnDev: Asset manifest injection point -->
|
|
12
12
|
<!-- window.__DNDEV_ASSETS__ and __DNDEV_ASSET_MANIFEST__ injected here -->
|
|
13
13
|
|
|
14
|
-
<!-- Fonts: the theme's
|
|
15
|
-
<!-- DNDEV_FONT_PRELOADS -->
|
|
14
|
+
<!-- Fonts: the build adds the theme's font preloads and inline @font-face to <head> (no font link here). -->
|
|
16
15
|
|
|
17
16
|
<!-- ✅ PERFORMANCE: Preconnect to external domains (OAuth providers) -->
|
|
18
17
|
<!-- GitHub OAuth -->
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
--radius-interactive: 0;
|
|
118
118
|
--radius-surface: 0;
|
|
119
119
|
--radius-floating: 0;
|
|
120
|
-
--font-family: 'Space Grotesk', var(--font-sans);
|
|
121
|
-
--font-headline: 'Space Grotesk', var(--font-sans);
|
|
120
|
+
--font-family: 'Space Grotesk', 'Space Grotesk Fallback', var(--font-sans);
|
|
121
|
+
--font-headline: 'Space Grotesk', 'Space Grotesk Fallback', var(--font-sans);
|
|
122
122
|
--border-width: 2px;
|
|
123
123
|
--border-huge: 4px;
|
|
124
124
|
--shadow-sm: 4px 4px 0px 0px var(--primary);
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
--warning-foreground: #1c1917;
|
|
156
156
|
--destructive-foreground: #ffffff;
|
|
157
157
|
--font-family: var(--font-sans);
|
|
158
|
-
--font-headline: 'Playfair Display', var(--font-serif);
|
|
158
|
+
--font-headline: 'Playfair Display', 'Playfair Display Fallback', var(--font-serif);
|
|
159
159
|
--radius-interactive: 0.375rem;
|
|
160
160
|
--radius-surface: 0.5rem;
|
|
161
161
|
--radius-floating: 0.5rem;
|
|
@@ -10,3 +10,7 @@
|
|
|
10
10
|
# =============================================================================
|
|
11
11
|
VITE_SUPABASE_URL=
|
|
12
12
|
VITE_SUPABASE_PUBLIC_KEY=
|
|
13
|
+
|
|
14
|
+
# CAPTCHA of Supabase Auth (Cloudflare Turnstile, optional). Set the widget's site key
|
|
15
|
+
# here first, then enable CAPTCHA protection in Supabase (see @donotdev/auth AUTH.md).
|
|
16
|
+
# VITE_TURNSTILE_SITE_KEY=
|
|
@@ -10,3 +10,7 @@
|
|
|
10
10
|
# =============================================================================
|
|
11
11
|
NEXT_PUBLIC_SUPABASE_URL=
|
|
12
12
|
NEXT_PUBLIC_SUPABASE_PUBLIC_KEY=
|
|
13
|
+
|
|
14
|
+
# CAPTCHA of Supabase Auth (Cloudflare Turnstile, optional). Set the widget's site key
|
|
15
|
+
# here first, then enable CAPTCHA protection in Supabase (see @donotdev/auth AUTH.md).
|
|
16
|
+
# NEXT_PUBLIC_TURNSTILE_SITE_KEY=
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview User Management - DataTable with search, sort, pagination, export.
|
|
3
3
|
*
|
|
4
|
-
* Replace mock data with
|
|
5
|
-
*
|
|
4
|
+
* Replace mock data with live accounts: `const { users, loading, error } = useAuthUsers()`
|
|
5
|
+
* from '@donotdev/auth' (every auth account: email, confirmation, sign-in dates; needs the
|
|
6
|
+
* admin-only `listAuthUsers` server function deployed). Use useCrudList(userEntity) for
|
|
7
|
+
* your own user table. Column definitions should match the fields you show.
|
|
6
8
|
*/
|
|
7
9
|
|
|
8
10
|
import { Users } from 'lucide-react';
|
|
@@ -27,7 +29,7 @@ export const meta: PageMeta = {
|
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
// ============================================================================
|
|
30
|
-
// MOCK DATA - Replace with useCrudList(userEntity)
|
|
32
|
+
// MOCK DATA - Replace with useAuthUsers() (auth accounts) or useCrudList(userEntity)
|
|
31
33
|
// ============================================================================
|
|
32
34
|
|
|
33
35
|
const users = [
|
|
@@ -62,6 +62,8 @@ Desktop.ini
|
|
|
62
62
|
*.generated.ts
|
|
63
63
|
*.generated.log
|
|
64
64
|
apps/*/public/route-manifest.json
|
|
65
|
+
# The font plan's files (framework-owned, content-hashed, rewritten every dev/build)
|
|
66
|
+
apps/*/public/fonts/
|
|
65
67
|
# Rewritten by `next dev` / `next build` (differs between them): never committed
|
|
66
68
|
next-env.d.ts
|
|
67
69
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|