create-portfoliable 1.2.16 → 1.2.17

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.
@@ -456,6 +456,37 @@ function runThumbnailOptions(flags) {
456
456
  return 0;
457
457
  }
458
458
 
459
+ // Emits case media files so authored src/content URLs survive production builds.
460
+ function createCaseContentAssetPlugin() {
461
+ return {
462
+ name: 'portfoliable-case-content-assets',
463
+ generateBundle() {
464
+ const casesRoot = path.resolve(process.cwd(), 'src', 'content', 'cases');
465
+ if (!fs.existsSync(casesRoot)) return;
466
+
467
+ const emitDirectory = (directory) => {
468
+ for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
469
+ const entryPath = path.join(directory, entry.name);
470
+ if (entry.isDirectory()) {
471
+ emitDirectory(entryPath);
472
+ continue;
473
+ }
474
+ if (entry.name.toLowerCase().endsWith('.md')) continue;
475
+
476
+ const relativePath = path.relative(process.cwd(), entryPath).replace(/\\/g, '/');
477
+ this.emitFile({
478
+ type: 'asset',
479
+ fileName: relativePath,
480
+ source: fs.readFileSync(entryPath)
481
+ });
482
+ }
483
+ };
484
+
485
+ emitDirectory(casesRoot);
486
+ }
487
+ };
488
+ }
489
+
459
490
  // Prints startup summary box for dev server sessions.
460
491
  function printStartupBox({ localUrl, networkUrl, localVersion, latestVersion }) {
461
492
  const lines = [
@@ -649,9 +680,10 @@ async function runBuild() {
649
680
  printRailSegment({ dot: true, label: `${cyan}${bold}Starting build...${reset}` });
650
681
  console.log(`${cyan}${bold}Building Portfoliable...${reset}`);
651
682
  const runtimeAliases = resolveConsumerRuntimeAliases(process.cwd());
652
- await viteBuild(runtimeAliases.length > 0
653
- ? { resolve: { alias: runtimeAliases } }
654
- : undefined);
683
+ await viteBuild({
684
+ ...(runtimeAliases.length > 0 ? { resolve: { alias: runtimeAliases } } : {}),
685
+ plugins: [createCaseContentAssetPlugin()]
686
+ });
655
687
  console.log(`${green}Build complete.${reset}`);
656
688
  printRailSegment({ dot: true, label: `${green}${bold}Build complete.${reset}` });
657
689
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-portfoliable",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "Unified Portfoliable package with initializer and runtime CLI",
5
5
  "private": false,
6
6
  "type": "module",
package/src/App.js CHANGED
@@ -35,6 +35,7 @@ import {
35
35
  A11Y_THEME_TOKEN_KEYS,
36
36
  Header,
37
37
  HomeView,
38
+ MermaidDiagram,
38
39
  Summary,
39
40
  Thumbnail,
40
41
  Toast,
@@ -49,6 +50,7 @@ void Summary;
49
50
  void Thumbnail;
50
51
  void Toast;
51
52
  void VideoPlayer;
53
+ void MermaidDiagram;
52
54
 
53
55
  // MARK: HEADER DEFAULTS
54
56
  // Resolves runtime defaults and persistence keys used across navigation and resume flows.