@stacksjs/path 0.58.70 → 0.58.72

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.js CHANGED
@@ -258,7 +258,10 @@ function replPath(path) {
258
258
  function routerPath(path) {
259
259
  return corePath(`router/${path || ""}`);
260
260
  }
261
- function routesPath(path) {
261
+ function routesPath(path, options) {
262
+ const absolutePath = resourcesPath(`routes/${path || ""}`);
263
+ if (options?.relative)
264
+ return relative(process.cwd(), absolutePath);
262
265
  return projectPath(`routes/${path || ""}`);
263
266
  }
264
267
  function searchEnginePath(path) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/path",
3
3
  "type": "module",
4
- "version": "0.58.70",
4
+ "version": "0.58.72",
5
5
  "description": "The Stacks path.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
package/src/index.ts CHANGED
@@ -391,7 +391,12 @@ export function routerPath(path?: string) {
391
391
  return corePath(`router/${path || ''}`)
392
392
  }
393
393
 
394
- export function routesPath(path?: string) {
394
+ export function routesPath(path?: string, options?: { relative?: boolean }) {
395
+ const absolutePath = resourcesPath(`routes/${path || ''}`)
396
+
397
+ if (options?.relative)
398
+ return relative(process.cwd(), absolutePath)
399
+
395
400
  return projectPath(`routes/${path || ''}`)
396
401
  }
397
402