@stacksjs/path 0.58.28 → 0.58.44

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -17,6 +17,12 @@ function assetsPath(path) {
17
17
  function aliasPath() {
18
18
  return corePath("alias/src/index.ts");
19
19
  }
20
+ function buddyPath(path, options) {
21
+ const absolutePath = corePath(`buddy/${path || ""}`);
22
+ if (options?.relative)
23
+ return relative(process.cwd(), absolutePath);
24
+ return absolutePath;
25
+ }
20
26
  function runtimePath(path) {
21
27
  return frameworkPath(`buddy/${path || ""}`);
22
28
  }
@@ -110,8 +116,11 @@ function examplesPath(type) {
110
116
  function fakerPath(path) {
111
117
  return corePath(`faker/${path || ""}`);
112
118
  }
113
- function frameworkPath(path) {
114
- return projectStoragePath(`framework/${path || ""}`);
119
+ function frameworkPath(path, options) {
120
+ const absolutePath = projectStoragePath(`framework/${path || ""}`);
121
+ if (options?.relative)
122
+ return relative(options.cwd || process.cwd(), absolutePath);
123
+ return absolutePath;
115
124
  }
116
125
  function healthPath(path) {
117
126
  return corePath(`health/${path || ""}`);
@@ -125,8 +134,11 @@ function gitPath(path) {
125
134
  function langPath(path) {
126
135
  return projectPath(`lang/${path || ""}`);
127
136
  }
128
- function layoutsPath(path) {
129
- return resourcesPath(`layouts/${path || ""}`);
137
+ function layoutsPath(path, options) {
138
+ const absolutePath = resourcesPath(`layouts/${path || ""}`);
139
+ if (options?.relative)
140
+ return relative(process.cwd(), absolutePath);
141
+ return absolutePath;
130
142
  }
131
143
  function libraryEntryPath(type) {
132
144
  return libsEntriesPath(`${type}.ts`);
@@ -223,7 +235,7 @@ function settingsPath(path) {
223
235
  return projectPath(`${path || "views/dashboard/settings"}`);
224
236
  }
225
237
  function scriptsPath(path) {
226
- return frameworkPath(`core/scripts/${path || ""}`);
238
+ return frameworkPath(`scripts/${path || ""}`);
227
239
  }
228
240
  function schedulerPath(path) {
229
241
  return corePath(`scheduler/${path || ""}`);
@@ -295,6 +307,7 @@ var path = {
295
307
  arraysPath,
296
308
  appPath,
297
309
  authPath,
310
+ buddyPath,
298
311
  buildEnginePath,
299
312
  libsEntriesPath,
300
313
  buildPath,
@@ -352,6 +365,7 @@ var path = {
352
365
  replPath,
353
366
  routerPath,
354
367
  routesPath,
368
+ runtimePath,
355
369
  searchEnginePath,
356
370
  schedulerPath,
357
371
  settingsPath,
@@ -488,6 +502,7 @@ export {
488
502
  cachePath,
489
503
  buildPath,
490
504
  buildEnginePath,
505
+ buddyPath,
491
506
  basename,
492
507
  authPath,
493
508
  assetsPath,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/path",
3
3
  "type": "module",
4
- "version": "0.58.28",
4
+ "version": "0.58.44",
5
5
  "description": "The Stacks path.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",