create-meridian-app 1.26.0 → 1.28.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.
@@ -321,6 +321,16 @@ ${vars.dashboard ? `
321
321
  Add custom React components to \`src/admin/widgets/index.tsx\` to inject them into the dashboard UI. They are compiled automatically when you run \`npm run dev\` and loaded by the dashboard at runtime.
322
322
 
323
323
  Available zones: \`issue.details.before/after/sidebar\`, \`project.board.before/after\`, \`project.issues.before/after\`, \`project.timeline.before/after\`, \`project.sprints.before/after\`, \`workspace.settings.before/after\`.
324
+
325
+ ## Favicon
326
+
327
+ To replace the default Meridian favicon, place your own \`favicon.ico\` at:
328
+
329
+ \`\`\`
330
+ public/favicon.ico
331
+ \`\`\`
332
+
333
+ The dashboard server automatically serves your file in place of the default.
324
334
  ` : ""}
325
335
  ## Extending Meridian
326
336
 
@@ -1304,6 +1314,7 @@ async function runNew(projectName) {
1304
1314
  await mkdirWithKeep(path2.join(targetDir, "src", "subscribers"));
1305
1315
  await mkdirWithKeep(path2.join(targetDir, "src", "jobs"));
1306
1316
  await mkdirWithKeep(path2.join(targetDir, "src", "links"));
1317
+ await mkdirWithKeep(path2.join(targetDir, "public"));
1307
1318
  if (vars.dashboard) {
1308
1319
  await writeFile(
1309
1320
  path2.join(targetDir, "src", "admin", "widgets", "index.tsx"),
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  toKebabCase,
15
15
  toPascalCase,
16
16
  writeFile
17
- } from "./chunk-P3IRKZQN.js";
17
+ } from "./chunk-SO3S6MDJ.js";
18
18
 
19
19
  // src/cli.ts
20
20
  import { Command } from "commander";
@@ -108,7 +108,7 @@ async function buildAdminExtensions(rootDir) {
108
108
  throw err;
109
109
  }
110
110
  }
111
- function startDashboardServer(distDir, port, apiPort, apiHost = "localhost", adminExtensionsBuf = null, apiUrlOverride, branding) {
111
+ function startDashboardServer(distDir, port, apiPort, apiHost = "localhost", adminExtensionsBuf = null, apiUrlOverride, branding, projectDir) {
112
112
  const resolvedApiUrl = apiUrlOverride ?? `http://${apiHost}:${apiPort}`;
113
113
  const configObj = { apiUrl: resolvedApiUrl };
114
114
  if (branding?.appName) configObj.appName = branding.appName;
@@ -137,6 +137,21 @@ function startDashboardServer(distDir, port, apiPort, apiHost = "localhost", adm
137
137
  res.end(adminExtensionsBuf ?? Buffer.from("export default [];\n"));
138
138
  return;
139
139
  }
140
+ if (urlPath === "/favicon.ico" && projectDir) {
141
+ const userFavicon = path.join(projectDir, "public", "favicon.ico");
142
+ if (existsSync(userFavicon)) {
143
+ fs.readFile(userFavicon, (err, data) => {
144
+ if (err) {
145
+ res.writeHead(404);
146
+ res.end("Not found");
147
+ return;
148
+ }
149
+ res.writeHead(200, { "Content-Type": "image/x-icon" });
150
+ res.end(data);
151
+ });
152
+ return;
153
+ }
154
+ }
140
155
  let filePath = path.join(distDir, urlPath === "/" ? "index.html" : urlPath);
141
156
  const resolvedFile = path.resolve(filePath);
142
157
  const resolvedDist = path.resolve(distDir);
@@ -211,7 +226,7 @@ async function runServeDashboard(portOverride) {
211
226
  }
212
227
  }
213
228
  const branding = { appName: projectConfig.appName, logoUrl: projectConfig.logoUrl };
214
- const server = await startDashboardServer(distDir, port, apiPort, "localhost", adminExtensionsBuf, apiUrl, branding);
229
+ const server = await startDashboardServer(distDir, port, apiPort, "localhost", adminExtensionsBuf, apiUrl, branding, rootDir);
215
230
  console.log(chalk.green(" \u2714 Admin dashboard: ") + chalk.cyan(`http://localhost:${port}`));
216
231
  console.log(chalk.dim(` \u2192 API: ${apiUrl}`));
217
232
  if (adminExtensionsBuf) {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runNew
4
- } from "./chunk-P3IRKZQN.js";
4
+ } from "./chunk-SO3S6MDJ.js";
5
5
 
6
6
  // src/index.ts
7
7
  var projectName = process.argv[2];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-meridian-app",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "Create a new Meridian project or manage an existing one",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",