@stacksjs/path 0.57.4 โ 0.58.20
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/README.md +5 -5
- package/dist/index.js +495 -0
- package/package.json +19 -20
- package/LICENSE.md +0 -21
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -225
- package/dist/index.mjs +0 -360
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Easily work with file paths.
|
|
|
12
12
|
## ๐ค Usage
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
|
|
15
|
+
bun install -d @stacksjs/path
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Now, you can easily access it in your project:
|
|
@@ -23,12 +23,12 @@ import { filename, normalizeAliases, resolve, resolveAlias } from '@stacksjs/pat
|
|
|
23
23
|
// and more...
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
To view the full documentation, please visit [https://stacksjs.
|
|
26
|
+
To view the full documentation, please visit [https://stacksjs.org/path](https://stacksjs.org/path).
|
|
27
27
|
|
|
28
28
|
## ๐งช Testing
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
|
|
31
|
+
bun test
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## ๐ Changelog
|
|
@@ -47,7 +47,7 @@ For help, discussion about best practices, or any other conversation that would
|
|
|
47
47
|
|
|
48
48
|
For casual chit-chat with others using this package:
|
|
49
49
|
|
|
50
|
-
[Join the Stacks Discord Server](https://discord.
|
|
50
|
+
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
|
|
51
51
|
|
|
52
52
|
## ๐๐ผ Credits
|
|
53
53
|
|
|
@@ -61,4 +61,4 @@ Many thanks to the following core technologies & people who have contributed to
|
|
|
61
61
|
|
|
62
62
|
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
|
|
63
63
|
|
|
64
|
-
Made with
|
|
64
|
+
Made with ๐
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/index.ts
|
|
3
|
+
import process from "process";
|
|
4
|
+
import {basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath} from "pathe";
|
|
5
|
+
function actionsPath(path) {
|
|
6
|
+
return corePath(`actions/src/${path || ""}`);
|
|
7
|
+
}
|
|
8
|
+
function relativeActionsPath(path) {
|
|
9
|
+
return relative(projectPath(), actionsPath(path));
|
|
10
|
+
}
|
|
11
|
+
function aiPath(path) {
|
|
12
|
+
return corePath(`ai/${path || ""}`);
|
|
13
|
+
}
|
|
14
|
+
function assetsPath(path) {
|
|
15
|
+
return resourcesPath(`assets/${path || ""}`);
|
|
16
|
+
}
|
|
17
|
+
function aliasPath() {
|
|
18
|
+
return corePath("alias/src/index.ts");
|
|
19
|
+
}
|
|
20
|
+
function runtimePath(path) {
|
|
21
|
+
return frameworkPath(`buddy/${path || ""}`);
|
|
22
|
+
}
|
|
23
|
+
function analyticsPath(path) {
|
|
24
|
+
return corePath(`analytics/${path || ""}`);
|
|
25
|
+
}
|
|
26
|
+
function arraysPath(path) {
|
|
27
|
+
return corePath(`arrays/${path || ""}`);
|
|
28
|
+
}
|
|
29
|
+
function appPath(path) {
|
|
30
|
+
return projectPath(`app/${path || ""}`);
|
|
31
|
+
}
|
|
32
|
+
function authPath(path) {
|
|
33
|
+
return corePath(`auth/${path || ""}`);
|
|
34
|
+
}
|
|
35
|
+
function buildPath(path) {
|
|
36
|
+
return corePath(`build/${path || ""}`);
|
|
37
|
+
}
|
|
38
|
+
function buildEnginePath(path) {
|
|
39
|
+
return buildPath(`${path || ""}`);
|
|
40
|
+
}
|
|
41
|
+
function libsPath(path) {
|
|
42
|
+
return frameworkPath(`libs/${path || ""}`);
|
|
43
|
+
}
|
|
44
|
+
function libsEntriesPath(path) {
|
|
45
|
+
return libsPath(`entries/${path || ""}`);
|
|
46
|
+
}
|
|
47
|
+
function cachePath(path) {
|
|
48
|
+
return corePath(`cache/${path || ""}`);
|
|
49
|
+
}
|
|
50
|
+
function chatPath(path) {
|
|
51
|
+
return corePath(`chat/${path || ""}`);
|
|
52
|
+
}
|
|
53
|
+
function cliPath(path) {
|
|
54
|
+
return corePath(`cli/${path || ""}`);
|
|
55
|
+
}
|
|
56
|
+
function cloudPath(path) {
|
|
57
|
+
return corePath(`cloud/${path || ""}`);
|
|
58
|
+
}
|
|
59
|
+
function collectionsPath(path) {
|
|
60
|
+
return corePath(`collections/${path || ""}`);
|
|
61
|
+
}
|
|
62
|
+
function componentsPath(path) {
|
|
63
|
+
return resourcesPath(`components/${path || ""}`);
|
|
64
|
+
}
|
|
65
|
+
function configPath(path) {
|
|
66
|
+
return corePath(`config/${path || ""}`);
|
|
67
|
+
}
|
|
68
|
+
function corePath(path) {
|
|
69
|
+
return frameworkPath(`core/src/${path || ""}`);
|
|
70
|
+
}
|
|
71
|
+
function customElementsDataPath() {
|
|
72
|
+
return corePath("custom-elements.json");
|
|
73
|
+
}
|
|
74
|
+
function databasePath(path) {
|
|
75
|
+
return corePath(`database/${path || ""}`);
|
|
76
|
+
}
|
|
77
|
+
function datetimePath(path) {
|
|
78
|
+
return corePath(`datetime/${path || ""}`);
|
|
79
|
+
}
|
|
80
|
+
function developmentPath(path) {
|
|
81
|
+
return corePath(`development/${path || ""}`);
|
|
82
|
+
}
|
|
83
|
+
function desktopPath(path) {
|
|
84
|
+
return corePath(`desktop/${path || ""}`);
|
|
85
|
+
}
|
|
86
|
+
function docsPath(path) {
|
|
87
|
+
return corePath(`docs/${path || ""}`);
|
|
88
|
+
}
|
|
89
|
+
function dnsPath(path) {
|
|
90
|
+
return corePath(`domains/${path || ""}`);
|
|
91
|
+
}
|
|
92
|
+
function emailPath(path) {
|
|
93
|
+
return notificationsPath(`email/${path || ""}`);
|
|
94
|
+
}
|
|
95
|
+
function enumsPath(path) {
|
|
96
|
+
return corePath(`enums/${path || ""}`);
|
|
97
|
+
}
|
|
98
|
+
function errorHandlingPath(path) {
|
|
99
|
+
return corePath(`error-handling/${path || ""}`);
|
|
100
|
+
}
|
|
101
|
+
function eventsPath(path) {
|
|
102
|
+
return corePath(`events/${path || ""}`);
|
|
103
|
+
}
|
|
104
|
+
function coreEnvPath(path) {
|
|
105
|
+
return corePath(`env/${path || ""}`);
|
|
106
|
+
}
|
|
107
|
+
function examplesPath(type) {
|
|
108
|
+
return frameworkPath(`examples/${type || ""}`);
|
|
109
|
+
}
|
|
110
|
+
function fakerPath(path) {
|
|
111
|
+
return corePath(`faker/${path || ""}`);
|
|
112
|
+
}
|
|
113
|
+
function frameworkPath(path) {
|
|
114
|
+
return projectStoragePath(`framework/${path || ""}`);
|
|
115
|
+
}
|
|
116
|
+
function healthPath(path) {
|
|
117
|
+
return corePath(`health/${path || ""}`);
|
|
118
|
+
}
|
|
119
|
+
function functionsPath(path) {
|
|
120
|
+
return resourcesPath(`functions/${path || ""}`);
|
|
121
|
+
}
|
|
122
|
+
function gitPath(path) {
|
|
123
|
+
return corePath(`git/${path || ""}`);
|
|
124
|
+
}
|
|
125
|
+
function langPath(path) {
|
|
126
|
+
return projectPath(`lang/${path || ""}`);
|
|
127
|
+
}
|
|
128
|
+
function libraryEntryPath(type) {
|
|
129
|
+
return libsEntriesPath(`${type}.ts`);
|
|
130
|
+
}
|
|
131
|
+
function lintPath(path) {
|
|
132
|
+
return corePath(`lint/${path || ""}`);
|
|
133
|
+
}
|
|
134
|
+
function eslintPath(path) {
|
|
135
|
+
return lintPath(`eslint/${path || ""}`);
|
|
136
|
+
}
|
|
137
|
+
function loggingPath(path) {
|
|
138
|
+
return corePath(`logging/${path || ""}`);
|
|
139
|
+
}
|
|
140
|
+
function logsPath(path) {
|
|
141
|
+
return projectStoragePath(`logs/${path || ""}`);
|
|
142
|
+
}
|
|
143
|
+
function modelsPath(path) {
|
|
144
|
+
return appPath(`models/${path || ""}`);
|
|
145
|
+
}
|
|
146
|
+
function modulesPath(path) {
|
|
147
|
+
return resourcesPath(`modules/${path || ""}`);
|
|
148
|
+
}
|
|
149
|
+
function notificationsPath(path) {
|
|
150
|
+
return corePath(`notifications/${path || ""}`);
|
|
151
|
+
}
|
|
152
|
+
function ormPath(path) {
|
|
153
|
+
return corePath(`orm/${path || ""}`);
|
|
154
|
+
}
|
|
155
|
+
function objectsPath(path) {
|
|
156
|
+
return corePath(`objects/${path || ""}`);
|
|
157
|
+
}
|
|
158
|
+
function onboardingPath(path) {
|
|
159
|
+
return projectPath(`${path || "views/dashboard/onboarding"}`);
|
|
160
|
+
}
|
|
161
|
+
function packageJsonPath(type) {
|
|
162
|
+
if (type === "vue-components")
|
|
163
|
+
return frameworkPath("libs/components/vue/package.json");
|
|
164
|
+
if (type === "web-components")
|
|
165
|
+
return frameworkPath("libs/components/web/package.json");
|
|
166
|
+
return frameworkPath(`libs/${type}/package.json`);
|
|
167
|
+
}
|
|
168
|
+
function viewsPath(path) {
|
|
169
|
+
return resourcesPath(`views/${path || ""}`);
|
|
170
|
+
}
|
|
171
|
+
function pathPath(path) {
|
|
172
|
+
return corePath(`path/${path || ""}`);
|
|
173
|
+
}
|
|
174
|
+
function paymentsPath(path) {
|
|
175
|
+
return corePath(`payments/${path || ""}`);
|
|
176
|
+
}
|
|
177
|
+
function projectPath(filePath = "") {
|
|
178
|
+
let path = process.cwd();
|
|
179
|
+
while (path.includes("storage"))
|
|
180
|
+
path = resolve(path, "..");
|
|
181
|
+
return resolve(path, filePath);
|
|
182
|
+
}
|
|
183
|
+
function projectConfigPath(path) {
|
|
184
|
+
return projectPath(`config/${path || ""}`);
|
|
185
|
+
}
|
|
186
|
+
function projectStoragePath(path) {
|
|
187
|
+
return projectPath(`storage/${path || ""}`);
|
|
188
|
+
}
|
|
189
|
+
function publicPath(path) {
|
|
190
|
+
return projectPath(`public/${path || ""}`);
|
|
191
|
+
}
|
|
192
|
+
function pushPath(path) {
|
|
193
|
+
return notificationsPath(`push/${path || ""}`);
|
|
194
|
+
}
|
|
195
|
+
function queryBuilderPath(path) {
|
|
196
|
+
return corePath(`query-builder/${path || ""}`);
|
|
197
|
+
}
|
|
198
|
+
function queuePath(path) {
|
|
199
|
+
return corePath(`queue/${path || ""}`);
|
|
200
|
+
}
|
|
201
|
+
function realtimePath(path) {
|
|
202
|
+
return corePath(`realtime/${path || ""}`);
|
|
203
|
+
}
|
|
204
|
+
function resourcesPath(path) {
|
|
205
|
+
return projectPath(`resources/${path || ""}`);
|
|
206
|
+
}
|
|
207
|
+
function replPath(path) {
|
|
208
|
+
return corePath(`repl/${path || ""}`);
|
|
209
|
+
}
|
|
210
|
+
function routerPath(path) {
|
|
211
|
+
return corePath(`router/${path || ""}`);
|
|
212
|
+
}
|
|
213
|
+
function routesPath(path) {
|
|
214
|
+
return projectPath(`routes/${path || ""}`);
|
|
215
|
+
}
|
|
216
|
+
function searchEnginePath(path) {
|
|
217
|
+
return corePath(`search-engine/${path || ""}`);
|
|
218
|
+
}
|
|
219
|
+
function settingsPath(path) {
|
|
220
|
+
return projectPath(`${path || "views/dashboard/settings"}`);
|
|
221
|
+
}
|
|
222
|
+
function scriptsPath(path) {
|
|
223
|
+
return frameworkPath(`core/scripts/${path || ""}`);
|
|
224
|
+
}
|
|
225
|
+
function schedulerPath(path) {
|
|
226
|
+
return corePath(`scheduler/${path || ""}`);
|
|
227
|
+
}
|
|
228
|
+
function signalsPath(path) {
|
|
229
|
+
return corePath(`signals/${path || ""}`);
|
|
230
|
+
}
|
|
231
|
+
function slugPath(path) {
|
|
232
|
+
return corePath(`slug/${path || ""}`);
|
|
233
|
+
}
|
|
234
|
+
function smsPath(path) {
|
|
235
|
+
return notificationsPath(`sms/${path || ""}`);
|
|
236
|
+
}
|
|
237
|
+
function storagePath(path) {
|
|
238
|
+
return corePath(`storage/${path || ""}`);
|
|
239
|
+
}
|
|
240
|
+
function storesPath(path) {
|
|
241
|
+
return resourcesPath(`stores/${path || ""}`);
|
|
242
|
+
}
|
|
243
|
+
function securityPath(path) {
|
|
244
|
+
return corePath(`security/${path || ""}`);
|
|
245
|
+
}
|
|
246
|
+
function serverPath(path) {
|
|
247
|
+
return corePath(`server/${path || ""}`);
|
|
248
|
+
}
|
|
249
|
+
function serverlessPath(path) {
|
|
250
|
+
return corePath(`serverless/${path || ""}`);
|
|
251
|
+
}
|
|
252
|
+
function stacksPath(path) {
|
|
253
|
+
return frameworkPath(`src/${path || ""}`);
|
|
254
|
+
}
|
|
255
|
+
function stringsPath(path) {
|
|
256
|
+
return corePath(`strings/${path || ""}`);
|
|
257
|
+
}
|
|
258
|
+
function testingPath(path) {
|
|
259
|
+
return corePath(`testing/${path || ""}`);
|
|
260
|
+
}
|
|
261
|
+
function tinkerPath(path) {
|
|
262
|
+
return corePath(`tinker/${path || ""}`);
|
|
263
|
+
}
|
|
264
|
+
function testsPath(path) {
|
|
265
|
+
return frameworkPath(`tests/${path || ""}`);
|
|
266
|
+
}
|
|
267
|
+
function typesPath(path) {
|
|
268
|
+
return corePath(`types/${path || ""}`);
|
|
269
|
+
}
|
|
270
|
+
function uiPath(path) {
|
|
271
|
+
return corePath(`ui/${path || ""}`);
|
|
272
|
+
}
|
|
273
|
+
function utilsPath(path) {
|
|
274
|
+
return corePath(`utils/${path || ""}`);
|
|
275
|
+
}
|
|
276
|
+
function validationPath(path) {
|
|
277
|
+
return corePath(`validation/${path || ""}`);
|
|
278
|
+
}
|
|
279
|
+
function vitePath(path) {
|
|
280
|
+
return corePath(`vite/${path || ""}`);
|
|
281
|
+
}
|
|
282
|
+
function xRayPath(path) {
|
|
283
|
+
return frameworkPath(`stacks/x-ray/${path || ""}`);
|
|
284
|
+
}
|
|
285
|
+
var path = {
|
|
286
|
+
actionsPath,
|
|
287
|
+
aiPath,
|
|
288
|
+
assetsPath,
|
|
289
|
+
relativeActionsPath,
|
|
290
|
+
aliasPath,
|
|
291
|
+
analyticsPath,
|
|
292
|
+
arraysPath,
|
|
293
|
+
appPath,
|
|
294
|
+
authPath,
|
|
295
|
+
buildEnginePath,
|
|
296
|
+
libsEntriesPath,
|
|
297
|
+
buildPath,
|
|
298
|
+
cachePath,
|
|
299
|
+
chatPath,
|
|
300
|
+
cliPath,
|
|
301
|
+
cloudPath,
|
|
302
|
+
collectionsPath,
|
|
303
|
+
componentsPath,
|
|
304
|
+
configPath,
|
|
305
|
+
projectConfigPath,
|
|
306
|
+
corePath,
|
|
307
|
+
customElementsDataPath,
|
|
308
|
+
databasePath,
|
|
309
|
+
datetimePath,
|
|
310
|
+
developmentPath,
|
|
311
|
+
desktopPath,
|
|
312
|
+
docsPath,
|
|
313
|
+
dnsPath,
|
|
314
|
+
emailPath,
|
|
315
|
+
enumsPath,
|
|
316
|
+
errorHandlingPath,
|
|
317
|
+
eventsPath,
|
|
318
|
+
coreEnvPath,
|
|
319
|
+
healthPath,
|
|
320
|
+
examplesPath,
|
|
321
|
+
fakerPath,
|
|
322
|
+
frameworkPath,
|
|
323
|
+
storagePath,
|
|
324
|
+
functionsPath,
|
|
325
|
+
gitPath,
|
|
326
|
+
langPath,
|
|
327
|
+
libsPath,
|
|
328
|
+
libraryEntryPath,
|
|
329
|
+
lintPath,
|
|
330
|
+
loggingPath,
|
|
331
|
+
modulesPath,
|
|
332
|
+
ormPath,
|
|
333
|
+
objectsPath,
|
|
334
|
+
onboardingPath,
|
|
335
|
+
notificationsPath,
|
|
336
|
+
packageJsonPath,
|
|
337
|
+
viewsPath,
|
|
338
|
+
pathPath,
|
|
339
|
+
paymentsPath,
|
|
340
|
+
projectPath,
|
|
341
|
+
projectStoragePath,
|
|
342
|
+
publicPath,
|
|
343
|
+
pushPath,
|
|
344
|
+
queryBuilderPath,
|
|
345
|
+
queuePath,
|
|
346
|
+
realtimePath,
|
|
347
|
+
resourcesPath,
|
|
348
|
+
replPath,
|
|
349
|
+
routerPath,
|
|
350
|
+
routesPath,
|
|
351
|
+
searchEnginePath,
|
|
352
|
+
schedulerPath,
|
|
353
|
+
settingsPath,
|
|
354
|
+
smsPath,
|
|
355
|
+
signalsPath,
|
|
356
|
+
slugPath,
|
|
357
|
+
scriptsPath,
|
|
358
|
+
securityPath,
|
|
359
|
+
serverPath,
|
|
360
|
+
serverlessPath,
|
|
361
|
+
stacksPath,
|
|
362
|
+
stringsPath,
|
|
363
|
+
storesPath,
|
|
364
|
+
testingPath,
|
|
365
|
+
testsPath,
|
|
366
|
+
tinkerPath,
|
|
367
|
+
typesPath,
|
|
368
|
+
uiPath,
|
|
369
|
+
utilsPath,
|
|
370
|
+
validationPath,
|
|
371
|
+
vitePath,
|
|
372
|
+
xRayPath,
|
|
373
|
+
basename,
|
|
374
|
+
delimiter,
|
|
375
|
+
dirname,
|
|
376
|
+
extname,
|
|
377
|
+
format,
|
|
378
|
+
isAbsolute,
|
|
379
|
+
join,
|
|
380
|
+
normalize,
|
|
381
|
+
normalizeString,
|
|
382
|
+
parse,
|
|
383
|
+
relative,
|
|
384
|
+
resolve,
|
|
385
|
+
sep,
|
|
386
|
+
toNamespacedPath
|
|
387
|
+
};
|
|
388
|
+
export {
|
|
389
|
+
xRayPath,
|
|
390
|
+
vitePath,
|
|
391
|
+
viewsPath,
|
|
392
|
+
validationPath,
|
|
393
|
+
utilsPath,
|
|
394
|
+
uiPath,
|
|
395
|
+
typesPath,
|
|
396
|
+
toNamespacedPath,
|
|
397
|
+
tinkerPath,
|
|
398
|
+
testsPath,
|
|
399
|
+
testingPath,
|
|
400
|
+
stringsPath,
|
|
401
|
+
storesPath,
|
|
402
|
+
storagePath,
|
|
403
|
+
stacksPath,
|
|
404
|
+
smsPath,
|
|
405
|
+
slugPath,
|
|
406
|
+
signalsPath,
|
|
407
|
+
settingsPath,
|
|
408
|
+
serverlessPath,
|
|
409
|
+
serverPath,
|
|
410
|
+
sep,
|
|
411
|
+
securityPath,
|
|
412
|
+
searchEnginePath,
|
|
413
|
+
scriptsPath,
|
|
414
|
+
schedulerPath,
|
|
415
|
+
runtimePath,
|
|
416
|
+
routesPath,
|
|
417
|
+
routerPath,
|
|
418
|
+
resourcesPath,
|
|
419
|
+
resolve,
|
|
420
|
+
replPath,
|
|
421
|
+
relativeActionsPath,
|
|
422
|
+
relative,
|
|
423
|
+
realtimePath,
|
|
424
|
+
queuePath,
|
|
425
|
+
queryBuilderPath,
|
|
426
|
+
pushPath,
|
|
427
|
+
publicPath,
|
|
428
|
+
projectStoragePath,
|
|
429
|
+
projectPath,
|
|
430
|
+
projectConfigPath,
|
|
431
|
+
paymentsPath,
|
|
432
|
+
pathPath,
|
|
433
|
+
path,
|
|
434
|
+
parse,
|
|
435
|
+
packageJsonPath,
|
|
436
|
+
ormPath,
|
|
437
|
+
onboardingPath,
|
|
438
|
+
objectsPath,
|
|
439
|
+
notificationsPath,
|
|
440
|
+
normalizeString,
|
|
441
|
+
normalize,
|
|
442
|
+
modulesPath,
|
|
443
|
+
modelsPath,
|
|
444
|
+
logsPath,
|
|
445
|
+
loggingPath,
|
|
446
|
+
lintPath,
|
|
447
|
+
libsPath,
|
|
448
|
+
libsEntriesPath,
|
|
449
|
+
libraryEntryPath,
|
|
450
|
+
langPath,
|
|
451
|
+
join,
|
|
452
|
+
isAbsolute,
|
|
453
|
+
healthPath,
|
|
454
|
+
gitPath,
|
|
455
|
+
functionsPath,
|
|
456
|
+
frameworkPath,
|
|
457
|
+
format,
|
|
458
|
+
fakerPath,
|
|
459
|
+
extname,
|
|
460
|
+
examplesPath,
|
|
461
|
+
eventsPath,
|
|
462
|
+
eslintPath,
|
|
463
|
+
errorHandlingPath,
|
|
464
|
+
enumsPath,
|
|
465
|
+
emailPath,
|
|
466
|
+
docsPath,
|
|
467
|
+
dnsPath,
|
|
468
|
+
dirname,
|
|
469
|
+
developmentPath,
|
|
470
|
+
desktopPath,
|
|
471
|
+
delimiter,
|
|
472
|
+
datetimePath,
|
|
473
|
+
databasePath,
|
|
474
|
+
customElementsDataPath,
|
|
475
|
+
corePath,
|
|
476
|
+
coreEnvPath,
|
|
477
|
+
configPath,
|
|
478
|
+
componentsPath,
|
|
479
|
+
collectionsPath,
|
|
480
|
+
cloudPath,
|
|
481
|
+
cliPath,
|
|
482
|
+
chatPath,
|
|
483
|
+
cachePath,
|
|
484
|
+
buildPath,
|
|
485
|
+
buildEnginePath,
|
|
486
|
+
basename,
|
|
487
|
+
authPath,
|
|
488
|
+
assetsPath,
|
|
489
|
+
arraysPath,
|
|
490
|
+
appPath,
|
|
491
|
+
analyticsPath,
|
|
492
|
+
aliasPath,
|
|
493
|
+
aiPath,
|
|
494
|
+
actionsPath
|
|
495
|
+
};
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/path",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@8.6.6",
|
|
4
|
+
"version": "0.58.20",
|
|
6
5
|
"description": "The Stacks path.",
|
|
7
6
|
"author": "Chris Breuer",
|
|
8
7
|
"license": "MIT",
|
|
9
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
10
|
-
"homepage": "https://github.com/stacksjs/stacks/tree/main
|
|
9
|
+
"homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/src/path#readme",
|
|
11
10
|
"repository": {
|
|
12
11
|
"type": "git",
|
|
13
12
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
14
|
-
"directory": "
|
|
13
|
+
"directory": "./storage/framework/core/src/path"
|
|
15
14
|
},
|
|
16
15
|
"bugs": {
|
|
17
16
|
"url": "https://github.com/stacksjs/stacks/issues"
|
|
@@ -22,34 +21,34 @@
|
|
|
22
21
|
"paths",
|
|
23
22
|
"utilities",
|
|
24
23
|
"functions",
|
|
24
|
+
"bun",
|
|
25
25
|
"stacks"
|
|
26
26
|
],
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"import": "./dist/index.mjs"
|
|
29
|
+
"bun": "./src/index.ts",
|
|
30
|
+
"import": "./dist/index.js"
|
|
32
31
|
}
|
|
33
32
|
},
|
|
34
|
-
"module": "dist/index.
|
|
33
|
+
"module": "dist/index.js",
|
|
35
34
|
"types": "dist/index.d.ts",
|
|
36
35
|
"contributors": [
|
|
37
|
-
"Chris Breuer <chris@
|
|
36
|
+
"Chris Breuer <chris@stacksjs.org>"
|
|
38
37
|
],
|
|
39
38
|
"files": [
|
|
40
|
-
"
|
|
41
|
-
"
|
|
39
|
+
"README.md",
|
|
40
|
+
"dist"
|
|
42
41
|
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "bun --bun build.ts",
|
|
44
|
+
"typecheck": "bun --bun tsc --noEmit",
|
|
45
|
+
"prepublishOnly": "bun --bun run build"
|
|
46
|
+
},
|
|
43
47
|
"dependencies": {
|
|
44
|
-
"
|
|
48
|
+
"@stacksjs/validation": "workspace:*",
|
|
49
|
+
"pathe": "^1.1.2"
|
|
45
50
|
},
|
|
46
51
|
"devDependencies": {
|
|
47
|
-
"
|
|
48
|
-
"unbuild": "^1.2.1"
|
|
49
|
-
},
|
|
50
|
-
"scripts": {
|
|
51
|
-
"build": "unbuild",
|
|
52
|
-
"dev": "unbuild --stub",
|
|
53
|
-
"typecheck": "tsc --noEmit"
|
|
52
|
+
"@stacksjs/development": "workspace:*"
|
|
54
53
|
}
|
|
55
|
-
}
|
|
54
|
+
}
|
package/LICENSE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Open Web Foundation
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("/home/runner/work/stacks/stacks/node_modules/.pnpm/jiti@1.18.2/node_modules/jiti/lib/index.js")(null, { interopDefault: true, esmResolve: true })("/home/runner/work/stacks/stacks/.stacks/core/path/src/index.ts")
|
package/dist/index.d.ts
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath } from 'pathe';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the path to the `actions` directory. The actions directory
|
|
4
|
-
* contains the core Stacks' actions. An action
|
|
5
|
-
*
|
|
6
|
-
* @param path - relative path to the file or directory
|
|
7
|
-
* @returns string - absolute path to the file or directory
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* import { buildPath } from '@stacks/paths'
|
|
11
|
-
*
|
|
12
|
-
* buildPath('functions.vue')
|
|
13
|
-
* buildPath('any-path.ts')
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare function actionsPath(path?: string): any;
|
|
17
|
-
/**
|
|
18
|
-
* Returns the path to the `ai` directory. The AI directory
|
|
19
|
-
* contains the core Stacks' AI logic which currently
|
|
20
|
-
* is a wrapper of the OpenAI API.
|
|
21
|
-
*
|
|
22
|
-
* @param path - relative path to the file or directory
|
|
23
|
-
* @returns string - absolute path to the file or directory
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* import { aiPath } from '@stacks/paths'
|
|
28
|
-
*
|
|
29
|
-
* console.log('path is', aiPath())
|
|
30
|
-
* // path is /Users/chrisbreuer/Code/stacks/.stacks/core/ai
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare function aiPath(path?: string): any;
|
|
34
|
-
export declare function aliasPath(): any;
|
|
35
|
-
export declare function runtimePath(path?: string): any;
|
|
36
|
-
export declare function arraysPath(path?: string): any;
|
|
37
|
-
export declare function authPath(path?: string): any;
|
|
38
|
-
export declare function appPath(path?: string): any;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the path to the build directory. The build directory
|
|
41
|
-
* contains Stacks' build engine & its tooling integrations.
|
|
42
|
-
*
|
|
43
|
-
* @param path string - relative path to the file or directory
|
|
44
|
-
* @returns string - absolute path to the file or directory
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* buildPath('functions.vue')
|
|
48
|
-
* buildPath('vue-components.ts')
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export declare function buildPath(path?: string): any;
|
|
52
|
-
export declare function buildEnginePath(path?: string): any;
|
|
53
|
-
export declare function libsPath(path?: string): any;
|
|
54
|
-
export declare function libsEntriesPath(path?: string): any;
|
|
55
|
-
export declare function cachePath(path?: string): any;
|
|
56
|
-
export declare function chatPath(path?: string): any;
|
|
57
|
-
export declare function cliPath(path?: string): any;
|
|
58
|
-
export declare function cloudPath(path?: string): any;
|
|
59
|
-
export declare function collectionsPath(path?: string): any;
|
|
60
|
-
export declare function componentsPath(path?: string): any;
|
|
61
|
-
export declare function configPath(path?: string): any;
|
|
62
|
-
export declare function corePath(path?: string): any;
|
|
63
|
-
export declare function customElementsDataPath(): any;
|
|
64
|
-
export declare function dashboardPath(path?: string): any;
|
|
65
|
-
export declare function databasePath(path?: string): any;
|
|
66
|
-
export declare function datetimePath(path?: string): any;
|
|
67
|
-
export declare function developmentPath(path?: string): any;
|
|
68
|
-
export declare function desktopPath(path?: string): any;
|
|
69
|
-
export declare function docsPath(path?: string): any;
|
|
70
|
-
export declare function dnsPath(path?: string): any;
|
|
71
|
-
export declare function emailPath(path?: string): any;
|
|
72
|
-
export declare function errorHandlingPath(path?: string): any;
|
|
73
|
-
export declare function eventsPath(path?: string): any;
|
|
74
|
-
export declare function examplesPath(type: 'vue-components' | 'web-components'): any;
|
|
75
|
-
export declare function fakerPath(path?: string): any;
|
|
76
|
-
export declare function frameworkPath(path?: string): any;
|
|
77
|
-
export declare function healthPath(path?: string): any;
|
|
78
|
-
export declare function functionsPath(path?: string): any;
|
|
79
|
-
export declare function gitPath(path?: string): any;
|
|
80
|
-
export declare function langPath(path?: string): any;
|
|
81
|
-
export type LibraryType = 'vue-components' | 'web-components' | 'functions';
|
|
82
|
-
export declare function libraryEntryPath(type: LibraryType): any;
|
|
83
|
-
export declare function lintPath(path?: string): any;
|
|
84
|
-
export declare function loggingPath(path?: string): any;
|
|
85
|
-
export declare function logsPath(path?: string): any;
|
|
86
|
-
export declare function modelsPath(path?: string): any;
|
|
87
|
-
export declare function modulesPath(path?: string): any;
|
|
88
|
-
export declare function notificationsPath(path?: string): any;
|
|
89
|
-
export declare function ormPath(path?: string): any;
|
|
90
|
-
export declare function objectsPath(path?: string): any;
|
|
91
|
-
export declare function onboardingPath(path?: string): any;
|
|
92
|
-
export declare function packageJsonPath(type: 'vue-components' | 'web-components' | 'functions'): any;
|
|
93
|
-
export declare function pagesPath(path?: string): any;
|
|
94
|
-
export declare function pathPath(path?: string): any;
|
|
95
|
-
export declare function paymentsPath(path?: string): any;
|
|
96
|
-
export declare function projectPath(filePath?: string): any;
|
|
97
|
-
export declare function projectConfigPath(path?: string): any;
|
|
98
|
-
export declare function projectStoragePath(path?: string): any;
|
|
99
|
-
export declare function pushPath(path?: string): any;
|
|
100
|
-
export declare function queryBuilderPath(path?: string): any;
|
|
101
|
-
export declare function queuePath(path?: string): any;
|
|
102
|
-
export declare function realtimePath(path?: string): any;
|
|
103
|
-
export declare function resourcesPath(path?: string): any;
|
|
104
|
-
export declare function replPath(path?: string): any;
|
|
105
|
-
export declare function routerPath(path?: string): any;
|
|
106
|
-
export declare function routesPath(path?: string): any;
|
|
107
|
-
export declare function searchEnginePath(path?: string): any;
|
|
108
|
-
export declare function settingsPath(path?: string): any;
|
|
109
|
-
export declare function scriptsPath(path?: string): any;
|
|
110
|
-
export declare function schedulerPath(path?: string): any;
|
|
111
|
-
export declare function signalsPath(path?: string): any;
|
|
112
|
-
export declare function slugPath(path?: string): any;
|
|
113
|
-
export declare function smsPath(path?: string): any;
|
|
114
|
-
export declare function storagePath(path?: string): any;
|
|
115
|
-
export declare function storesPath(path?: string): any;
|
|
116
|
-
export declare function securityPath(path?: string): any;
|
|
117
|
-
export declare function serverPath(path?: string): any;
|
|
118
|
-
export declare function serverlessPath(path?: string): any;
|
|
119
|
-
export declare function stacksPath(path?: string): any;
|
|
120
|
-
export declare function stringsPath(path?: string): any;
|
|
121
|
-
export declare function testingPath(path?: string): any;
|
|
122
|
-
export declare function tinkerPath(path?: string): any;
|
|
123
|
-
export declare function testsPath(path?: string): any;
|
|
124
|
-
export declare function typesPath(path?: string): any;
|
|
125
|
-
export declare function uiPath(path?: string): any;
|
|
126
|
-
export declare function utilsPath(path?: string): any;
|
|
127
|
-
export declare function validationPath(path?: string): any;
|
|
128
|
-
export declare function xRayPath(path?: string): any;
|
|
129
|
-
export declare const path: {
|
|
130
|
-
aiPath: typeof aiPath;
|
|
131
|
-
actionsPath: typeof actionsPath;
|
|
132
|
-
aliasPath: typeof aliasPath;
|
|
133
|
-
arraysPath: typeof arraysPath;
|
|
134
|
-
appPath: typeof appPath;
|
|
135
|
-
authPath: typeof authPath;
|
|
136
|
-
buildEnginePath: typeof buildEnginePath;
|
|
137
|
-
libsEntriesPath: typeof libsEntriesPath;
|
|
138
|
-
buildPath: typeof buildPath;
|
|
139
|
-
cachePath: typeof cachePath;
|
|
140
|
-
chatPath: typeof chatPath;
|
|
141
|
-
cliPath: typeof cliPath;
|
|
142
|
-
cloudPath: typeof cloudPath;
|
|
143
|
-
collectionsPath: typeof collectionsPath;
|
|
144
|
-
componentsPath: typeof componentsPath;
|
|
145
|
-
configPath: typeof configPath;
|
|
146
|
-
projectConfigPath: typeof projectConfigPath;
|
|
147
|
-
corePath: typeof corePath;
|
|
148
|
-
customElementsDataPath: typeof customElementsDataPath;
|
|
149
|
-
databasePath: typeof databasePath;
|
|
150
|
-
datetimePath: typeof datetimePath;
|
|
151
|
-
developmentPath: typeof developmentPath;
|
|
152
|
-
dashboardPath: typeof dashboardPath;
|
|
153
|
-
desktopPath: typeof desktopPath;
|
|
154
|
-
docsPath: typeof docsPath;
|
|
155
|
-
dnsPath: typeof dnsPath;
|
|
156
|
-
emailPath: typeof emailPath;
|
|
157
|
-
errorHandlingPath: typeof errorHandlingPath;
|
|
158
|
-
eventsPath: typeof eventsPath;
|
|
159
|
-
healthPath: typeof healthPath;
|
|
160
|
-
examplesPath: typeof examplesPath;
|
|
161
|
-
fakerPath: typeof fakerPath;
|
|
162
|
-
frameworkPath: typeof frameworkPath;
|
|
163
|
-
storagePath: typeof storagePath;
|
|
164
|
-
functionsPath: typeof functionsPath;
|
|
165
|
-
gitPath: typeof gitPath;
|
|
166
|
-
langPath: typeof langPath;
|
|
167
|
-
libsPath: typeof libsPath;
|
|
168
|
-
libraryEntryPath: typeof libraryEntryPath;
|
|
169
|
-
lintPath: typeof lintPath;
|
|
170
|
-
loggingPath: typeof loggingPath;
|
|
171
|
-
modulesPath: typeof modulesPath;
|
|
172
|
-
ormPath: typeof ormPath;
|
|
173
|
-
objectsPath: typeof objectsPath;
|
|
174
|
-
onboardingPath: typeof onboardingPath;
|
|
175
|
-
notificationsPath: typeof notificationsPath;
|
|
176
|
-
packageJsonPath: typeof packageJsonPath;
|
|
177
|
-
pagesPath: typeof pagesPath;
|
|
178
|
-
pathPath: typeof pathPath;
|
|
179
|
-
paymentsPath: typeof paymentsPath;
|
|
180
|
-
projectPath: typeof projectPath;
|
|
181
|
-
pushPath: typeof pushPath;
|
|
182
|
-
queryBuilderPath: typeof queryBuilderPath;
|
|
183
|
-
queuePath: typeof queuePath;
|
|
184
|
-
realtimePath: typeof realtimePath;
|
|
185
|
-
resourcesPath: typeof resourcesPath;
|
|
186
|
-
replPath: typeof replPath;
|
|
187
|
-
routerPath: typeof routerPath;
|
|
188
|
-
routesPath: typeof routesPath;
|
|
189
|
-
searchEnginePath: typeof searchEnginePath;
|
|
190
|
-
schedulerPath: typeof schedulerPath;
|
|
191
|
-
settingsPath: typeof settingsPath;
|
|
192
|
-
smsPath: typeof smsPath;
|
|
193
|
-
signalsPath: typeof signalsPath;
|
|
194
|
-
slugPath: typeof slugPath;
|
|
195
|
-
scriptsPath: typeof scriptsPath;
|
|
196
|
-
securityPath: typeof securityPath;
|
|
197
|
-
serverPath: typeof serverPath;
|
|
198
|
-
serverlessPath: typeof serverlessPath;
|
|
199
|
-
stacksPath: typeof stacksPath;
|
|
200
|
-
stringsPath: typeof stringsPath;
|
|
201
|
-
storesPath: typeof storesPath;
|
|
202
|
-
testingPath: typeof testingPath;
|
|
203
|
-
testsPath: typeof testsPath;
|
|
204
|
-
tinkerPath: typeof tinkerPath;
|
|
205
|
-
typesPath: typeof typesPath;
|
|
206
|
-
uiPath: typeof uiPath;
|
|
207
|
-
utilsPath: typeof utilsPath;
|
|
208
|
-
validationPath: typeof validationPath;
|
|
209
|
-
xRayPath: typeof xRayPath;
|
|
210
|
-
basename: any;
|
|
211
|
-
delimiter: string;
|
|
212
|
-
dirname: any;
|
|
213
|
-
extname: any;
|
|
214
|
-
format: any;
|
|
215
|
-
isAbsolute: any;
|
|
216
|
-
join: any;
|
|
217
|
-
normalize: any;
|
|
218
|
-
normalizeString: typeof normalizeString;
|
|
219
|
-
parse: any;
|
|
220
|
-
relative: any;
|
|
221
|
-
resolve: any;
|
|
222
|
-
sep: string;
|
|
223
|
-
toNamespacedPath: any;
|
|
224
|
-
};
|
|
225
|
-
export { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath };
|
package/dist/index.mjs
DELETED
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
import { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath } from "pathe";
|
|
2
|
-
export function actionsPath(path2) {
|
|
3
|
-
return corePath(`actions/src/${path2 || ""}`);
|
|
4
|
-
}
|
|
5
|
-
export function aiPath(path2) {
|
|
6
|
-
return corePath(`ai/${path2 || ""}`);
|
|
7
|
-
}
|
|
8
|
-
export function aliasPath() {
|
|
9
|
-
return corePath("alias/src/index.ts");
|
|
10
|
-
}
|
|
11
|
-
export function runtimePath(path2) {
|
|
12
|
-
return frameworkPath(`buddy/${path2 || ""}`);
|
|
13
|
-
}
|
|
14
|
-
export function arraysPath(path2) {
|
|
15
|
-
return corePath(`arrays/${path2 || ""}`);
|
|
16
|
-
}
|
|
17
|
-
export function authPath(path2) {
|
|
18
|
-
return corePath(`auth/${path2 || ""}`);
|
|
19
|
-
}
|
|
20
|
-
export function appPath(path2) {
|
|
21
|
-
return projectPath(`app/${path2 || ""}`);
|
|
22
|
-
}
|
|
23
|
-
export function buildPath(path2) {
|
|
24
|
-
return corePath(`build/${path2 || ""}`);
|
|
25
|
-
}
|
|
26
|
-
export function buildEnginePath(path2) {
|
|
27
|
-
return buildPath(`${path2 || ""}`);
|
|
28
|
-
}
|
|
29
|
-
export function libsPath(path2) {
|
|
30
|
-
return frameworkPath(`libs/${path2 || ""}`);
|
|
31
|
-
}
|
|
32
|
-
export function libsEntriesPath(path2) {
|
|
33
|
-
return libsPath(`entries/${path2 || ""}`);
|
|
34
|
-
}
|
|
35
|
-
export function cachePath(path2) {
|
|
36
|
-
return corePath(`cache/${path2 || ""}`);
|
|
37
|
-
}
|
|
38
|
-
export function chatPath(path2) {
|
|
39
|
-
return corePath(`chat/${path2 || ""}`);
|
|
40
|
-
}
|
|
41
|
-
export function cliPath(path2) {
|
|
42
|
-
return corePath(`cli/${path2 || ""}`);
|
|
43
|
-
}
|
|
44
|
-
export function cloudPath(path2) {
|
|
45
|
-
return corePath(`cloud/${path2 || ""}`);
|
|
46
|
-
}
|
|
47
|
-
export function collectionsPath(path2) {
|
|
48
|
-
return corePath(`collections/${path2 || ""}`);
|
|
49
|
-
}
|
|
50
|
-
export function componentsPath(path2) {
|
|
51
|
-
return resourcesPath(`components/${path2 || ""}`);
|
|
52
|
-
}
|
|
53
|
-
export function configPath(path2) {
|
|
54
|
-
return corePath(`config/${path2 || ""}`);
|
|
55
|
-
}
|
|
56
|
-
export function corePath(path2) {
|
|
57
|
-
return frameworkPath(`core/${path2 || ""}`);
|
|
58
|
-
}
|
|
59
|
-
export function customElementsDataPath() {
|
|
60
|
-
return frameworkPath("custom-elements.json");
|
|
61
|
-
}
|
|
62
|
-
export function dashboardPath(path2) {
|
|
63
|
-
return corePath(`dashboard/${path2 || ""}`);
|
|
64
|
-
}
|
|
65
|
-
export function databasePath(path2) {
|
|
66
|
-
return corePath(`database/${path2 || ""}`);
|
|
67
|
-
}
|
|
68
|
-
export function datetimePath(path2) {
|
|
69
|
-
return corePath(`datetime/${path2 || ""}`);
|
|
70
|
-
}
|
|
71
|
-
export function developmentPath(path2) {
|
|
72
|
-
return corePath(`development/${path2 || ""}`);
|
|
73
|
-
}
|
|
74
|
-
export function desktopPath(path2) {
|
|
75
|
-
return corePath(`desktop/${path2 || ""}`);
|
|
76
|
-
}
|
|
77
|
-
export function docsPath(path2) {
|
|
78
|
-
return corePath(`docs/${path2 || ""}`);
|
|
79
|
-
}
|
|
80
|
-
export function dnsPath(path2) {
|
|
81
|
-
return corePath(`domains/${path2 || ""}`);
|
|
82
|
-
}
|
|
83
|
-
export function emailPath(path2) {
|
|
84
|
-
return corePath(`email/${path2 || ""}`);
|
|
85
|
-
}
|
|
86
|
-
export function errorHandlingPath(path2) {
|
|
87
|
-
return corePath(`error-handling/${path2 || ""}`);
|
|
88
|
-
}
|
|
89
|
-
export function eventsPath(path2) {
|
|
90
|
-
return corePath(`events/${path2 || ""}`);
|
|
91
|
-
}
|
|
92
|
-
export function examplesPath(type) {
|
|
93
|
-
return frameworkPath(`examples/${type || ""}`);
|
|
94
|
-
}
|
|
95
|
-
export function fakerPath(path2) {
|
|
96
|
-
return corePath(`faker/${path2 || ""}`);
|
|
97
|
-
}
|
|
98
|
-
export function frameworkPath(path2) {
|
|
99
|
-
return projectPath(`.stacks/${path2 || ""}`);
|
|
100
|
-
}
|
|
101
|
-
export function healthPath(path2) {
|
|
102
|
-
return corePath(`health/${path2 || ""}`);
|
|
103
|
-
}
|
|
104
|
-
export function functionsPath(path2) {
|
|
105
|
-
return resourcesPath(`functions/${path2 || ""}`);
|
|
106
|
-
}
|
|
107
|
-
export function gitPath(path2) {
|
|
108
|
-
return corePath(`git/${path2 || ""}`);
|
|
109
|
-
}
|
|
110
|
-
export function langPath(path2) {
|
|
111
|
-
return resourcesPath(`lang/${path2 || ""}`);
|
|
112
|
-
}
|
|
113
|
-
export function libraryEntryPath(type) {
|
|
114
|
-
return libsEntriesPath(`${type}.ts`);
|
|
115
|
-
}
|
|
116
|
-
export function lintPath(path2) {
|
|
117
|
-
return corePath(`lint/${path2 || ""}`);
|
|
118
|
-
}
|
|
119
|
-
export function loggingPath(path2) {
|
|
120
|
-
return corePath(`logging/${path2 || ""}`);
|
|
121
|
-
}
|
|
122
|
-
export function logsPath(path2) {
|
|
123
|
-
return projectStoragePath(`logs/${path2 || ""}`);
|
|
124
|
-
}
|
|
125
|
-
export function modelsPath(path2) {
|
|
126
|
-
return appPath(`models/${path2 || ""}`);
|
|
127
|
-
}
|
|
128
|
-
export function modulesPath(path2) {
|
|
129
|
-
return corePath(`modules/${path2 || ""}`);
|
|
130
|
-
}
|
|
131
|
-
export function notificationsPath(path2) {
|
|
132
|
-
return corePath(`notifications/${path2 || ""}`);
|
|
133
|
-
}
|
|
134
|
-
export function ormPath(path2) {
|
|
135
|
-
return corePath(`orm/${path2 || ""}`);
|
|
136
|
-
}
|
|
137
|
-
export function objectsPath(path2) {
|
|
138
|
-
return corePath(`objects/${path2 || ""}`);
|
|
139
|
-
}
|
|
140
|
-
export function onboardingPath(path2) {
|
|
141
|
-
return projectPath(`${path2 || "views/dashboard/onboarding"}`);
|
|
142
|
-
}
|
|
143
|
-
export function packageJsonPath(type) {
|
|
144
|
-
if (type === "vue-components")
|
|
145
|
-
return frameworkPath("components/vue/package.json");
|
|
146
|
-
if (type === "web-components")
|
|
147
|
-
return frameworkPath("components/web/package.json");
|
|
148
|
-
if (type === "functions")
|
|
149
|
-
return frameworkPath("functions/package.json");
|
|
150
|
-
return frameworkPath(`${type}/package.json`);
|
|
151
|
-
}
|
|
152
|
-
export function pagesPath(path2) {
|
|
153
|
-
return resourcesPath(`pages/${path2 || ""}`);
|
|
154
|
-
}
|
|
155
|
-
export function pathPath(path2) {
|
|
156
|
-
return corePath(`path/${path2 || ""}`);
|
|
157
|
-
}
|
|
158
|
-
export function paymentsPath(path2) {
|
|
159
|
-
return corePath(`payments/${path2 || ""}`);
|
|
160
|
-
}
|
|
161
|
-
export function projectPath(filePath = "") {
|
|
162
|
-
let path2 = process.cwd();
|
|
163
|
-
while (path2.includes(".stacks"))
|
|
164
|
-
path2 = resolve(path2, "..");
|
|
165
|
-
return resolve(path2, filePath);
|
|
166
|
-
}
|
|
167
|
-
export function projectConfigPath(path2) {
|
|
168
|
-
return projectPath(`config/${path2 || ""}`);
|
|
169
|
-
}
|
|
170
|
-
export function projectStoragePath(path2) {
|
|
171
|
-
return projectPath(`storage/${path2 || ""}`);
|
|
172
|
-
}
|
|
173
|
-
export function pushPath(path2) {
|
|
174
|
-
return corePath(`push/${path2 || ""}`);
|
|
175
|
-
}
|
|
176
|
-
export function queryBuilderPath(path2) {
|
|
177
|
-
return corePath(`query-builder/${path2 || ""}`);
|
|
178
|
-
}
|
|
179
|
-
export function queuePath(path2) {
|
|
180
|
-
return corePath(`queue/${path2 || ""}`);
|
|
181
|
-
}
|
|
182
|
-
export function realtimePath(path2) {
|
|
183
|
-
return corePath(`realtime/${path2 || ""}`);
|
|
184
|
-
}
|
|
185
|
-
export function resourcesPath(path2) {
|
|
186
|
-
return projectPath(`resources/${path2 || ""}`);
|
|
187
|
-
}
|
|
188
|
-
export function replPath(path2) {
|
|
189
|
-
return corePath(`repl/${path2 || ""}`);
|
|
190
|
-
}
|
|
191
|
-
export function routerPath(path2) {
|
|
192
|
-
return corePath(`router/${path2 || ""}`);
|
|
193
|
-
}
|
|
194
|
-
export function routesPath(path2) {
|
|
195
|
-
return projectPath(`routes/${path2 || ""}`);
|
|
196
|
-
}
|
|
197
|
-
export function searchEnginePath(path2) {
|
|
198
|
-
return corePath(`search-engine/${path2 || ""}`);
|
|
199
|
-
}
|
|
200
|
-
export function settingsPath(path2) {
|
|
201
|
-
return projectPath(`${path2 || "views/dashboard/settings"}`);
|
|
202
|
-
}
|
|
203
|
-
export function scriptsPath(path2) {
|
|
204
|
-
return frameworkPath(`scripts/${path2 || ""}`);
|
|
205
|
-
}
|
|
206
|
-
export function schedulerPath(path2) {
|
|
207
|
-
return corePath(`scheduler/${path2 || ""}`);
|
|
208
|
-
}
|
|
209
|
-
export function signalsPath(path2) {
|
|
210
|
-
return corePath(`signals/${path2 || ""}`);
|
|
211
|
-
}
|
|
212
|
-
export function slugPath(path2) {
|
|
213
|
-
return corePath(`slug/${path2 || ""}`);
|
|
214
|
-
}
|
|
215
|
-
export function smsPath(path2) {
|
|
216
|
-
return corePath(`sms/${path2 || ""}`);
|
|
217
|
-
}
|
|
218
|
-
export function storagePath(path2) {
|
|
219
|
-
return corePath(`storage/${path2 || ""}`);
|
|
220
|
-
}
|
|
221
|
-
export function storesPath(path2) {
|
|
222
|
-
return resourcesPath(`stores/${path2 || ""}`);
|
|
223
|
-
}
|
|
224
|
-
export function securityPath(path2) {
|
|
225
|
-
return corePath(`security/${path2 || ""}`);
|
|
226
|
-
}
|
|
227
|
-
export function serverPath(path2) {
|
|
228
|
-
return corePath(`server/${path2 || ""}`);
|
|
229
|
-
}
|
|
230
|
-
export function serverlessPath(path2) {
|
|
231
|
-
return corePath(`serverless/${path2 || ""}`);
|
|
232
|
-
}
|
|
233
|
-
export function stacksPath(path2) {
|
|
234
|
-
return frameworkPath(`src/${path2 || ""}`);
|
|
235
|
-
}
|
|
236
|
-
export function stringsPath(path2) {
|
|
237
|
-
return corePath(`strings/${path2 || ""}`);
|
|
238
|
-
}
|
|
239
|
-
export function testingPath(path2) {
|
|
240
|
-
return corePath(`testing/${path2 || ""}`);
|
|
241
|
-
}
|
|
242
|
-
export function tinkerPath(path2) {
|
|
243
|
-
return corePath(`tinker/${path2 || ""}`);
|
|
244
|
-
}
|
|
245
|
-
export function testsPath(path2) {
|
|
246
|
-
return frameworkPath(`tests/${path2 || ""}`);
|
|
247
|
-
}
|
|
248
|
-
export function typesPath(path2) {
|
|
249
|
-
return corePath(`types/${path2 || ""}`);
|
|
250
|
-
}
|
|
251
|
-
export function uiPath(path2) {
|
|
252
|
-
return corePath(`ui/${path2 || ""}`);
|
|
253
|
-
}
|
|
254
|
-
export function utilsPath(path2) {
|
|
255
|
-
return corePath(`utils/${path2 || ""}`);
|
|
256
|
-
}
|
|
257
|
-
export function validationPath(path2) {
|
|
258
|
-
return corePath(`validation/${path2 || ""}`);
|
|
259
|
-
}
|
|
260
|
-
export function xRayPath(path2) {
|
|
261
|
-
return corePath(`x-ray/${path2 || ""}`);
|
|
262
|
-
}
|
|
263
|
-
export const path = {
|
|
264
|
-
aiPath,
|
|
265
|
-
actionsPath,
|
|
266
|
-
aliasPath,
|
|
267
|
-
arraysPath,
|
|
268
|
-
appPath,
|
|
269
|
-
authPath,
|
|
270
|
-
buildEnginePath,
|
|
271
|
-
libsEntriesPath,
|
|
272
|
-
buildPath,
|
|
273
|
-
cachePath,
|
|
274
|
-
chatPath,
|
|
275
|
-
cliPath,
|
|
276
|
-
cloudPath,
|
|
277
|
-
collectionsPath,
|
|
278
|
-
componentsPath,
|
|
279
|
-
configPath,
|
|
280
|
-
projectConfigPath,
|
|
281
|
-
corePath,
|
|
282
|
-
customElementsDataPath,
|
|
283
|
-
databasePath,
|
|
284
|
-
datetimePath,
|
|
285
|
-
developmentPath,
|
|
286
|
-
dashboardPath,
|
|
287
|
-
desktopPath,
|
|
288
|
-
docsPath,
|
|
289
|
-
dnsPath,
|
|
290
|
-
emailPath,
|
|
291
|
-
errorHandlingPath,
|
|
292
|
-
eventsPath,
|
|
293
|
-
healthPath,
|
|
294
|
-
examplesPath,
|
|
295
|
-
fakerPath,
|
|
296
|
-
frameworkPath,
|
|
297
|
-
storagePath,
|
|
298
|
-
functionsPath,
|
|
299
|
-
gitPath,
|
|
300
|
-
langPath,
|
|
301
|
-
libsPath,
|
|
302
|
-
libraryEntryPath,
|
|
303
|
-
lintPath,
|
|
304
|
-
loggingPath,
|
|
305
|
-
modulesPath,
|
|
306
|
-
ormPath,
|
|
307
|
-
objectsPath,
|
|
308
|
-
onboardingPath,
|
|
309
|
-
notificationsPath,
|
|
310
|
-
packageJsonPath,
|
|
311
|
-
pagesPath,
|
|
312
|
-
pathPath,
|
|
313
|
-
paymentsPath,
|
|
314
|
-
projectPath,
|
|
315
|
-
pushPath,
|
|
316
|
-
queryBuilderPath,
|
|
317
|
-
queuePath,
|
|
318
|
-
realtimePath,
|
|
319
|
-
resourcesPath,
|
|
320
|
-
replPath,
|
|
321
|
-
routerPath,
|
|
322
|
-
routesPath,
|
|
323
|
-
searchEnginePath,
|
|
324
|
-
schedulerPath,
|
|
325
|
-
settingsPath,
|
|
326
|
-
smsPath,
|
|
327
|
-
signalsPath,
|
|
328
|
-
slugPath,
|
|
329
|
-
scriptsPath,
|
|
330
|
-
securityPath,
|
|
331
|
-
serverPath,
|
|
332
|
-
serverlessPath,
|
|
333
|
-
stacksPath,
|
|
334
|
-
stringsPath,
|
|
335
|
-
storesPath,
|
|
336
|
-
testingPath,
|
|
337
|
-
testsPath,
|
|
338
|
-
tinkerPath,
|
|
339
|
-
typesPath,
|
|
340
|
-
uiPath,
|
|
341
|
-
utilsPath,
|
|
342
|
-
validationPath,
|
|
343
|
-
xRayPath,
|
|
344
|
-
// path utils
|
|
345
|
-
basename,
|
|
346
|
-
delimiter,
|
|
347
|
-
dirname,
|
|
348
|
-
extname,
|
|
349
|
-
format,
|
|
350
|
-
isAbsolute,
|
|
351
|
-
join,
|
|
352
|
-
normalize,
|
|
353
|
-
normalizeString,
|
|
354
|
-
parse,
|
|
355
|
-
relative,
|
|
356
|
-
resolve,
|
|
357
|
-
sep,
|
|
358
|
-
toNamespacedPath
|
|
359
|
-
};
|
|
360
|
-
export { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath };
|