@stacksjs/path 0.72.84 → 0.72.86

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/index.d.ts CHANGED
@@ -402,6 +402,13 @@ export declare function componentsPath(path?: string): string;
402
402
  * @returns The absolute path to the specified file or directory within the config directory.
403
403
  */
404
404
  export declare function configPath(path?: string): string;
405
+ /**
406
+ * Resolve the application site configuration.
407
+ *
408
+ * Modern Stacks applications keep every application config under `config/`.
409
+ * The root-level fallback preserves compatibility with older projects.
410
+ */
411
+ export declare function siteConfigPath(root?: unknown): string;
405
412
  /**
406
413
  * Returns the path to the `core` directory within the framework directory.
407
414
  *
@@ -1138,6 +1145,7 @@ export declare interface Path {
1138
1145
  commandsPath: (path?: string) => string
1139
1146
  componentsPath: (path?: string) => string
1140
1147
  configPath: (path?: string) => string
1148
+ siteConfigPath: (root?: string) => string
1141
1149
  projectConfigPath: (path?: string) => string
1142
1150
  corePath: (path?: string) => string
1143
1151
  customElementsDataPath: (path?: string) => string
package/dist/index.js CHANGED
@@ -187,6 +187,10 @@ function componentsPath(path) {
187
187
  function configPath(path) {
188
188
  return corePath(`config/${path || ""}`);
189
189
  }
190
+ function siteConfigPath(root = projectPath()) {
191
+ const configured = join(root, "config/site.ts");
192
+ return existsSync(configured) ? configured : join(root, "site.config.ts");
193
+ }
190
194
  function corePath(path) {
191
195
  return frameworkPath(`core/${path || ""}`);
192
196
  }
@@ -636,6 +640,7 @@ var path = {
636
640
  commandsPath,
637
641
  componentsPath,
638
642
  configPath,
643
+ siteConfigPath,
639
644
  projectConfigPath,
640
645
  corePath,
641
646
  customElementsDataPath,
@@ -860,6 +865,7 @@ export {
860
865
  serverlessPath,
861
866
  settingsPath,
862
867
  shellPath,
868
+ siteConfigPath,
863
869
  skillsPath,
864
870
  slugPath,
865
871
  smsPath,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/path",
3
3
  "type": "module",
4
- "version": "0.72.84",
4
+ "version": "0.72.86",
5
5
  "description": "The Stacks path.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [