bun-plugin-stx 0.2.724 → 0.2.727

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/dist/serve.d.ts CHANGED
@@ -356,6 +356,7 @@ export declare interface ServeOptions {
356
356
  layoutsDir?: string
357
357
  fallbackLayoutsDir?: string
358
358
  fallbackComponentsDir?: string
359
+ additionalComponentsDirs?: string[]
359
360
  partialsDir?: string
360
361
  watchDirs?: string[]
361
362
  renderCache?: boolean
package/dist/serve.js CHANGED
@@ -8877,6 +8877,8 @@ async function servedTemplatesUseImageBuiltins(root, scope) {
8877
8877
  if (options[key])
8878
8878
  options[key] = absolute(options[key]);
8879
8879
  }
8880
+ if (options.additionalComponentsDirs)
8881
+ options.additionalComponentsDirs = options.additionalComponentsDirs.map(absolute);
8880
8882
  const directories = new Map;
8881
8883
  const sources = new Map;
8882
8884
  async function firstFile(candidates) {
@@ -8925,6 +8927,7 @@ async function servedTemplatesUseImageBuiltins(root, scope) {
8925
8927
  path.join(path.dirname(page), "components"),
8926
8928
  options.componentsDir,
8927
8929
  path.join(path.dirname(file), "components"),
8930
+ ...options.additionalComponentsDirs ?? [],
8928
8931
  path.join(root, "resources/views/components"),
8929
8932
  path.join(root, "resources/components"),
8930
8933
  path.join(root, "src/components"),
@@ -9633,6 +9636,7 @@ async function serve(options) {
9633
9636
  const layoutsDir = options.layoutsDir ?? stxConfig.layoutsDir ?? defaultStxConfig.layoutsDir;
9634
9637
  const fallbackLayoutsDir = options.fallbackLayoutsDir ?? stxConfig.fallbackLayoutsDir;
9635
9638
  const fallbackComponentsDir = options.fallbackComponentsDir ?? stxConfig.fallbackComponentsDir;
9639
+ const additionalComponentsDirs = options.additionalComponentsDirs ?? stxConfig.additionalComponentsDirs;
9636
9640
  const partialsDir = options.partialsDir ?? stxConfig.partialsDir ?? defaultStxConfig.partialsDir;
9637
9641
  const publicDir = options.publicDir ?? stxConfig.publicDir ?? "public";
9638
9642
  const domainRoutes = compileDomainRoutes(options.domains ?? stxConfig.server?.domains, (message) => console.warn(message));
@@ -10409,6 +10413,7 @@ function __stxOverlay(errs){
10409
10413
  ...layoutsDir && { layoutsDir },
10410
10414
  ...fallbackLayoutsDir && { fallbackLayoutsDir },
10411
10415
  ...fallbackComponentsDir && { fallbackComponentsDir },
10416
+ ...additionalComponentsDirs && { additionalComponentsDirs },
10412
10417
  ...partialsDir && { partialsDir },
10413
10418
  autoShell: true,
10414
10419
  buildMode: "serve",
@@ -10623,6 +10628,7 @@ function __stxOverlay(errs){
10623
10628
  ...layoutsDir && { layoutsDir },
10624
10629
  ...fallbackLayoutsDir && { fallbackLayoutsDir },
10625
10630
  ...fallbackComponentsDir && { fallbackComponentsDir },
10631
+ ...additionalComponentsDirs && { additionalComponentsDirs },
10626
10632
  ...partialsDir && { partialsDir },
10627
10633
  autoShell: true,
10628
10634
  buildMode: "serve",
@@ -10824,7 +10830,7 @@ ${block}`;
10824
10830
  });
10825
10831
  imageWarmupEnabled = await projectUsesImageBuiltins(process20.cwd(), {
10826
10832
  pages,
10827
- options: { componentsDir, layoutsDir, fallbackLayoutsDir, fallbackComponentsDir, partialsDir },
10833
+ options: { componentsDir, additionalComponentsDirs, layoutsDir, fallbackLayoutsDir, fallbackComponentsDir, partialsDir },
10828
10834
  pluginComponentDirs: stxConfig._pluginComponentDirs
10829
10835
  });
10830
10836
  }
@@ -11181,6 +11187,7 @@ ${block}`;
11181
11187
  ...layoutsDir && { layoutsDir },
11182
11188
  ...fallbackLayoutsDir && { fallbackLayoutsDir },
11183
11189
  ...fallbackComponentsDir && { fallbackComponentsDir },
11190
+ ...additionalComponentsDirs && { additionalComponentsDirs },
11184
11191
  ...partialsDir && { partialsDir },
11185
11192
  autoShell: false
11186
11193
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bun-plugin-stx",
3
3
  "type": "module",
4
- "version": "0.2.724",
4
+ "version": "0.2.727",
5
5
  "description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -74,7 +74,7 @@
74
74
  "typecheck": "bun tsc --noEmit"
75
75
  },
76
76
  "dependencies": {
77
- "@stacksjs/stx": "0.2.724",
78
- "stx-router": "0.2.724"
77
+ "@stacksjs/stx": "0.2.727",
78
+ "stx-router": "0.2.727"
79
79
  }
80
80
  }