@stacksjs/path 0.58.27 → 0.58.43
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 +20 -5
- 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
|
-
|
|
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
|
-
|
|
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(`
|
|
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,
|