@stacksjs/path 0.64.5 → 0.65.0

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.
@@ -0,0 +1,1024 @@
1
+ import { basename, delimiter, dirname, extname, isAbsolute, join, normalize, type ParsedPath, relative, resolve, sep, toNamespacedPath } from "node:path";
2
+ /**
3
+ * Returns the path to the `actions` directory. The `actions` directory
4
+ * contains the core Stacks' actions.
5
+ *
6
+ * @param path - The relative path to the file or directory.
7
+ * @returns The absolute path to the file or directory.
8
+ * @example
9
+ * ```ts
10
+ * import { actionsPath } from '@stacksjs/path'
11
+ *
12
+ * console.log(actionsPath('path/to/action.ts')) // Outputs the absolute path to 'path/to/action.ts' within the `actions` directory
13
+ * ```
14
+ */
15
+ export declare function actionsPath(path?: string): string;
16
+ export declare function relativeActionsPath(path?: string): string;
17
+ export declare function userActionsPath(path?: string, options?: { relative: true }): string;
18
+ export declare function builtUserActionsPath(path?: string, options?: { relative: boolean }): string;
19
+ export declare function userComponentsPath(path?: string): string;
20
+ export declare function userViewsPath(path?: string): string;
21
+ export declare function userFunctionsPath(path?: string): string;
22
+ /**
23
+ * Returns the path to the user-defined `Jobs` directory.
24
+ *
25
+ * @param path - The relative path to the file or directory within the `Jobs` directory.
26
+ * @returns The absolute path to the specified file or directory within the user-defined `Jobs` directory.
27
+ * @example
28
+ * ```ts
29
+ * import { userJobsPath } from '@stacksjs/path'
30
+ *
31
+ * console.log(userJobsPath('MyJob.ts')) // Outputs the absolute path to 'MyJob.ts' within the user-defined `Jobs` directory.
32
+ * ```
33
+ */
34
+ export declare function userJobsPath(path?: string): string;
35
+ /**
36
+ * Returns the path to the user-defined `Listeners` directory.
37
+ *
38
+ * @param path - The relative path to the file or directory within the `Listeners` directory.
39
+ * @returns The absolute path to the specified file or directory within the user-defined `Listeners` directory.
40
+ * @example
41
+ * ```ts
42
+ * import { userListenersPath } from '@stacksjs/path'
43
+ *
44
+ * console.log(userListenersPath('MyListener.ts')) // Outputs the absolute path to 'MyListener.ts' within the user-defined `Listeners` directory.
45
+ * ```
46
+ */
47
+ export declare function userListenersPath(path?: string): string;
48
+ /**
49
+ * Returns the path to the user-defined `Middleware` directory.
50
+ *
51
+ * @param path - The relative path to the file or directory within the Middleware directory.
52
+ * @returns The absolute path to the specified file or directory within the user-defined Middleware directory.
53
+ * @example
54
+ * ```ts
55
+ * import { userMiddlewarePath } from '@stacksjs/path'
56
+ *
57
+ * console.log(userMiddlewarePath('MyMiddleware.ts')) // Outputs the absolute path to 'MyMiddleware.ts' within the user-defined Middleware directory.
58
+ * ```
59
+ */
60
+ export declare function userMiddlewarePath(path?: string): string;
61
+ /**
62
+ * Returns the path to the user-defined `Models` directory.
63
+ *
64
+ * @param path - The relative path to the file or directory within the `Models` directory.
65
+ * @returns The absolute path to the specified file or directory within the user-defined `Models` directory.
66
+ * @example
67
+ * ```ts
68
+ * import { userModelsPath } from '@stacksjs/path'
69
+ *
70
+ * console.log(userModelsPath('MyModel.ts')) // Outputs the absolute path to 'MyModel.ts' within the user-defined `Models` directory.
71
+ * ```
72
+ */
73
+ export declare function userModelsPath(path?: string): string;
74
+ /**
75
+ * Returns the path to the user-defined `Notifications` directory.
76
+ *
77
+ * @param path - The relative path to the file or directory within the `Notifications` directory.
78
+ * @returns The absolute path to the specified file or directory within the user-defined `Notifications` directory.
79
+ * @example
80
+ * ```ts
81
+ * import { userNotificationsPath } from '@stacksjs/path'
82
+ *
83
+ * console.log(userNotificationsPath('MyNotification.ts')) // Outputs the absolute path to 'MyNotification.ts' within the user-defined `Notifications` directory.
84
+ * ```
85
+ */
86
+ export declare function userNotificationsPath(path?: string): string;
87
+ export declare function userDatabasePath(path?: string): string;
88
+ export declare function userMigrationsPath(path?: string): string;
89
+ /**
90
+ * Returns the path to the user-defined `Events.ts` file.
91
+ *
92
+ * @returns The absolute path to the `Events.ts` file within the user-defined directory.
93
+ * @example
94
+ * ```ts
95
+ * import { userEventsPath } from '@stacksjs/path'
96
+ *
97
+ * console.log(userEventsPath()) // Outputs the absolute path to 'Events.ts' within the user-defined directory.
98
+ * ```
99
+ */
100
+ export declare function userEventsPath(): string;
101
+ /**
102
+ * Returns the path to the `ai` directory. The AI directory
103
+ * contains the core Stacks' AI logic which currently
104
+ * is a wrapper of the OpenAI API.
105
+ *
106
+ * @param path - relative path to the file or directory
107
+ * @returns string - absolute path to the file or directory
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * import { aiPath } from '@stacksjs/path'
112
+ *
113
+ * console.log(aiPath('src/drivers/example.ts')) // Outputs the absolute path to 'openai.ts' within the AI directory
114
+ * ```
115
+ */
116
+ export declare function aiPath(path?: string): string;
117
+ /**
118
+ * Returns the path to the `assets` directory within the `resources` directory.
119
+ *
120
+ * @param path - The relative path to the file or directory within the `assets` directory.
121
+ * @returns The absolute path to the specified file or directory within the `assets` directory.
122
+ * @example
123
+ * ```ts
124
+ * import { assetsPath } from '@stacksjs/path'
125
+ *
126
+ * console.log(assetsPath('images/logo.png')) // Outputs the absolute path to 'images/logo.png' within the `assets` directory.
127
+ * ```
128
+ */
129
+ export declare function assetsPath(path?: string): string;
130
+ /**
131
+ * Returns the path to the `alias` directory within the core directory.
132
+ *
133
+ * @returns The absolute path to the `alias` directory.
134
+ * @example
135
+ * ```ts
136
+ * import { aliasPath } from '@stacksjs/path'
137
+ *
138
+ * console.log(aliasPath()) // Outputs the absolute path to the `alias` directory.
139
+ * ```
140
+ */
141
+ export declare function aliasPath(): string;
142
+ /**
143
+ * Returns the path to the `buddy` directory, optionally relative to the current working directory.
144
+ *
145
+ * @param path - The relative path to the file or directory within the buddy directory.
146
+ * @param options - Optional. An object containing configuration settings.
147
+ * @param options.relative - If true, returns the path relative to the current working directory.
148
+ * @returns The absolute or relative path to the specified file or directory within the buddy * @returns The absolute or relative path to the specified file or directory within the buddy directory.
149
+ * @example
150
+ * ```ts
151
+ * import { buddyPath } from '@stacksjs/path'
152
+ *
153
+ * console.log(buddyPath('config/buddy.json')) // Outputs the absolute path to 'config/buddy.json' within the buddy directory.
154
+ * console.log(buddyPath('config/buddy.json', { relative: true })) // Outputs the relative path to 'config/buddy.json' within the buddy directory.
155
+ * ```
156
+ */
157
+ export declare function buddyPath(path?: string, options?: { relative?: boolean }): string;
158
+ /**
159
+ * Returns the path to the `runtime` directory within the framework directory.
160
+ *
161
+ * @param path - The relative path to the file or directory within the runtime directory.
162
+ * @returns The absolute path to the specified file or directory within the runtime directory.
163
+ * @example
164
+ * ```ts
165
+ * import { runtimePath } from '@stacksjs/path'
166
+ *
167
+ * console.log(runtimePath('runtime-config.json')) // Outputs the absolute path to 'runtime-config.json' within the runtime directory.
168
+ * ```
169
+ */
170
+ export declare function runtimePath(path?: string): string;
171
+ /**
172
+ * Returns the path to the `analytics` directory within the core directory.
173
+ *
174
+ * @param path - The relative path to the file or directory within the `analytics` directory.
175
+ * @returns The absolute path to the specified file or directory within the `analytics` directory.
176
+ * @example
177
+ * ```ts
178
+ * import { analyticsPath } from '@stacksjs/path'
179
+ *
180
+ * console.log(analyticsPath('data/report.csv')) // Outputs the absolute path to 'data/report.csv' within the `analytics` directory.
181
+ * ```
182
+ */
183
+ export declare function analyticsPath(path?: string): string;
184
+ /**
185
+ * Returns the path to the `arrays` directory within the core directory.
186
+ *
187
+ * @param path - The relative path to the file or directory within the `arrays` directory.
188
+ * @returns The absolute path to the specified file or directory within the `arrays` directory.
189
+ * @example
190
+ * ```ts
191
+ * import { arraysPath } from '@stacksjs/path'
192
+ *
193
+ * console.log(arraysPath('list.txt')) // Outputs the absolute path to 'list.txt' within the `arrays` directory.
194
+ * ```
195
+ */
196
+ export declare function arraysPath(path?: string): string;
197
+ /**
198
+ * Returns the path to the `app` directory, optionally relative to the project directory.
199
+ *
200
+ * @param path - The relative path to the file or directory within the app directory.
201
+ * @returns The absolute path to the specified file or directory within the app directory.
202
+ * @example
203
+ * ```ts
204
+ * import { appPath } from '@stacksjs/path'
205
+ *
206
+ * console.log(appPath('Actions/DummyAction.ts')) // Outputs the absolute path to 'Actions/DummyAction.ts' within the app directory.
207
+ * ```
208
+ */
209
+ export declare function appPath(path?: string): string;
210
+ /**
211
+ * Returns the path to the `auth` directory within the core directory.
212
+ *
213
+ * @param path - The relative path to the file or directory within the auth directory.
214
+ * @returns The absolute path to the specified file or directory within the auth directory.
215
+ * @example
216
+ * ```ts
217
+ * import { authPath } from '@stacksjs/path'
218
+ *
219
+ * console.log(authPath('login.ts')) // Outputs the absolute path to 'login.ts' within the auth directory.
220
+ * ```
221
+ */
222
+ export declare function authPath(path?: string): string;
223
+ /**
224
+ * Returns the path to the `auth` directory within the core directory.
225
+ *
226
+ * @param path - The relative path to the file or directory within the auth directory.
227
+ * @returns The absolute path to the specified file or directory within the auth directory.
228
+ * @example
229
+ * ```ts
230
+ * import { coreApiPath } from '@stacksjs/path'
231
+ *
232
+ * console.log(coreApiPath('login.ts')) // Outputs the absolute path to 'login.ts' within the auth directory.
233
+ * ```
234
+ */
235
+ export declare function coreApiPath(path?: string): string;
236
+ /**
237
+ * Returns the path to the build directory. The build directory
238
+ * contains Stacks' build engine & its tooling integrations.
239
+ *
240
+ * @param path string - relative path to the file or directory
241
+ * @returns string - absolute path to the file or directory
242
+ * @example
243
+ * ```ts
244
+ * buildPath('functions.stx')
245
+ * buildPath('components.ts')
246
+ * ```
247
+ */
248
+ export declare function buildPath(path?: string): string;
249
+ /**
250
+ * Returns the path to the build engine directory.
251
+ *
252
+ * @param path - The relative path to the file or directory within the build engine directory.
253
+ * @returns The absolute path to the specified file or directory within the build engine directory.
254
+ */
255
+ export declare function buildEnginePath(path?: string): string;
256
+ /**
257
+ * Returns the path to the `libs` directory within the framework directory.
258
+ *
259
+ * @param path - The relative path to the file or directory within the `libs` directory.
260
+ * @returns The absolute path to the specified file or directory within the `libs` directory.
261
+ */
262
+ export declare function libsPath(path?: string): string;
263
+ /**
264
+ * Returns the path to the user `libs` directory within the root project directory.
265
+ *
266
+ * @param path - The relative path to the file or directory within the `libs` directory.
267
+ * @returns The absolute path to the specified file or directory within the `libs` directory.
268
+ */
269
+ export declare function userLibsPath(path?: "components" | "functions" | string): string;
270
+ /**
271
+ * Returns the path to the `entries` directory within the `libs` directory.
272
+ *
273
+ * @param path - The relative path to the file or directory within the `entries` directory.
274
+ * @returns The absolute path to the specified file or directory within the `entries` directory.
275
+ */
276
+ export declare function libsEntriesPath(path?: string): string;
277
+ /**
278
+ * Returns the path to the `cache` directory within the core directory.
279
+ *
280
+ * @param path - The relative path to the file or directory within the cache directory.
281
+ * @returns The absolute path to the specified file or directory within the cache directory.
282
+ */
283
+ export declare function cachePath(path?: string): string;
284
+ /**
285
+ * Returns the path to the `chat` directory within the core directory.
286
+ *
287
+ * @param path - The relative path to the file or directory within the chat directory.
288
+ * @returns The absolute path to the specified file or directory within the chat directory.
289
+ */
290
+ export declare function chatPath(path?: string): string;
291
+ /**
292
+ * Returns the path to the `cli` directory within the core directory.
293
+ *
294
+ * @param path - The relative path to the file or directory within the cli directory.
295
+ * @returns The absolute path to the specified file or directory within the cli directory.
296
+ */
297
+ export declare function cliPath(path?: string): string;
298
+ /**
299
+ * Returns the path to the `cloud` directory within the core directory.
300
+ *
301
+ * @param path - The relative path to the file or directory within the cloud directory.
302
+ * @returns The absolute path to the specified file or directory within the cloud directory.
303
+ */
304
+ export declare function cloudPath(path?: string): string;
305
+ /**
306
+ * Returns the path to the `cloud` directory within the framework directory.
307
+ *
308
+ * @param path - The relative path to the file or directory within the framework cloud directory.
309
+ * @returns The absolute path to the specified file or directory within the framework cloud directory.
310
+ */
311
+ export declare function frameworkCloudPath(path?: string): string;
312
+ /**
313
+ * Returns the path to the `collections` directory within the core directory.
314
+ *
315
+ * @param path - The relative path to the file or directory within the `collections` directory.
316
+ * @returns The absolute path to the specified file or directory within the `collections` directory.
317
+ */
318
+ export declare function collectionsPath(path?: string): string;
319
+ /**
320
+ * Returns the path to the `Commands` directory within the app directory.
321
+ *
322
+ * @param path - The relative path to the file or directory within the `Commands` directory.
323
+ * @returns The absolute path to the specified file or directory within the `Commands` directory.
324
+ */
325
+ export declare function commandsPath(path?: string): string;
326
+ /**
327
+ * Returns the path to the `components` directory within the `resources` directory.
328
+ *
329
+ * @param path - The relative path to the file or directory within the `components` directory.
330
+ * @returns The absolute path to the specified file or directory within the `components` directory.
331
+ */
332
+ export declare function componentsPath(path?: string): string;
333
+ /**
334
+ * Returns the path to the `config` directory within the core directory.
335
+ *
336
+ * @param path - The relative path to the file or directory within the config directory.
337
+ * @returns The absolute path to the specified file or directory within the config directory.
338
+ */
339
+ export declare function configPath(path?: string): string;
340
+ /**
341
+ * Returns the path to the `core` directory within the framework directory.
342
+ *
343
+ * @param path - The relative path to the file or directory within the core directory.
344
+ * @returns The absolute path to the specified file or directory within the core directory.
345
+ */
346
+ export declare function corePath(path?: string): string;
347
+ /**
348
+ * Returns the absolute path to the `custom-elements.json` file within the core directory.
349
+ *
350
+ * @returns The absolute path to the `custom-elements.json` file.
351
+ */
352
+ export declare function customElementsDataPath(): string;
353
+ /**
354
+ * Returns the path to the `database` directory within the core directory.
355
+ *
356
+ * @param path - The relative path to the file or directory within the database directory.
357
+ * @returns The absolute path to the specified file or directory within the database directory.
358
+ */
359
+ export declare function databasePath(path?: string): string;
360
+ /**
361
+ * Returns the path to the `datetime` directory within the core directory.
362
+ *
363
+ * @param path - The relative path to the file or directory within the datetime directory.
364
+ * @returns The absolute path to the specified file or directory within the datetime directory.
365
+ */
366
+ export declare function datetimePath(path?: string): string;
367
+ /**
368
+ * Returns the path to the `development` directory within the core directory.
369
+ *
370
+ * @param path - The relative path to the file or directory within the development directory.
371
+ * @returns The absolute path to the specified file or directory within the development directory.
372
+ */
373
+ export declare function developmentPath(path?: string): string;
374
+ /**
375
+ * Returns the path to the `desktop` directory within the core directory.
376
+ *
377
+ * @param path - The relative path to the file or directory within the desktop directory.
378
+ * @returns The absolute path to the specified file or directory within the desktop directory.
379
+ */
380
+ export declare function desktopPath(path?: string): string;
381
+ /**
382
+ * Returns the path to the `docs` directory within the core directory.
383
+ *
384
+ * @param path - The relative path to the file or directory within the `docs` directory.
385
+ * @returns The absolute path to the specified file or directory within the `docs` directory.
386
+ */
387
+ export declare function docsPath(path?: string): string;
388
+ /**
389
+ * Returns the path to the `domains` directory within the core directory.
390
+ *
391
+ * @param path - The relative path to the file or directory within the `domains` directory.
392
+ * @returns The absolute path to the specified file or directory within the `domains` directory.
393
+ */
394
+ export declare function dnsPath(path?: string): string;
395
+ /**
396
+ * Returns the path to the `email` directory within the `notifications` directory.
397
+ *
398
+ * @param path - The relative path to the file or directory within the email directory.
399
+ * @returns The absolute path to the specified file or directory within the email directory.
400
+ */
401
+ export declare function emailPath(path?: string): string;
402
+ /**
403
+ * Returns the path to the `enums` directory within the core directory.
404
+ *
405
+ * @param path - The relative path to the file or directory within the `enums` directory.
406
+ * @returns The absolute path to the specified file or directory within the `enums` directory.
407
+ */
408
+ export declare function enumsPath(path?: string): string;
409
+ /**
410
+ * Returns the path to the `eslint-plugin` directory within the core directory.
411
+ *
412
+ * @param path - The relative path to the file or directory within the eslint-plugin directory.
413
+ * @returns The absolute path to the specified file or directory within the eslint-plugin directory.
414
+ */
415
+ export declare function eslintPluginPath(path?: string): string;
416
+ /**
417
+ * Returns the path to the `error-handling` directory within the core directory.
418
+ *
419
+ * @param path - The relative path to the file or directory within the error-handling directory.
420
+ * @returns The absolute path to the specified file or directory within the error-handling directory.
421
+ */
422
+ export declare function errorHandlingPath(path?: string): string;
423
+ /**
424
+ * Returns the path to the `events` directory within the core directory.
425
+ *
426
+ * @param path - The relative path to the file or directory within the `events` directory.
427
+ * @returns The absolute path to the specified file or directory within the `events` directory.
428
+ */
429
+ export declare function eventsPath(path?: string): string;
430
+ /**
431
+ * Returns the path to the `env` directory within the core directory.
432
+ *
433
+ * @param path - The relative path to the file or directory within the env directory.
434
+ * @returns The absolute path to the specified file or directory within the env directory.
435
+ */
436
+ export declare function coreEnvPath(path?: string): string;
437
+ /**
438
+ * Returns the path to the `examples` directory within the framework directory, filtered by type.
439
+ *
440
+ * @param type - The type of examples to filter by ('vue-components' or 'web-components').
441
+ * @returns The absolute path to the specified type of examples within the `examples` directory.
442
+ */
443
+ export declare function examplesPath(type?: "vue-components" | "web-components"): string;
444
+ /**
445
+ * Returns the path to the `faker` directory within the core directory.
446
+ *
447
+ * @param path - The relative path to the file or directory within the faker directory.
448
+ * @returns The absolute path to the specified file or directory within the faker directory.
449
+ */
450
+ export declare function fakerPath(path?: string): string;
451
+ /**
452
+ * Returns the path to the framework directory, optionally relative to the current working directory.
453
+ *
454
+ * @param path - The relative path to the file or directory within the framework directory.
455
+ * @param options - Optional. An object containing configuration settings.
456
+ * @param options.relative - If true, returns the path relative to the current working directory.
457
+ * @param options.cwd - Specifies a custom working directory.
458
+ * @returns The absolute or relative path to the specified file or directory within the framework directory.
459
+ */
460
+ export declare function frameworkPath(path?: string, options?: {
461
+ relative?: boolean;
462
+ cwd?: string;
463
+ }): string;
464
+ /**
465
+ * Returns the path to the `frontend` directory within the core directory.
466
+ *
467
+ * @param path - The relative path to the file or directory within the health directory.
468
+ * @returns The absolute path to the specified file or directory within the health directory.
469
+ */
470
+ export declare function browserPath(path?: string): string;
471
+ /**
472
+ * Returns the path to the `health` directory within the core directory.
473
+ *
474
+ * @param path - The relative path to the file or directory within the health directory.
475
+ * @returns The absolute path to the specified file or directory within the health directory.
476
+ */
477
+ export declare function healthPath(path?: string): string;
478
+ /**
479
+ * Returns the path to the `functions` directory within the `resources` directory.
480
+ *
481
+ * @param path - The relative path to the file or directory within the `functions` directory.
482
+ * @returns The absolute path to the specified file or directory within the `functions` directory.
483
+ */
484
+ export declare function functionsPath(path?: string): string;
485
+ /**
486
+ * Returns the path to the `git` directory within the core directory.
487
+ *
488
+ * @param path - The relative path to the file or directory within the git directory.
489
+ * @returns The absolute path to the specified file or directory within the git directory.
490
+ */
491
+ export declare function gitPath(path?: string): string;
492
+ /**
493
+ * Returns the path to the `lang` directory, optionally relative to the project directory.
494
+ *
495
+ * @param path - The relative path to the file or directory within the lang directory.
496
+ * @returns The absolute path to the specified file or directory within the lang directory.
497
+ */
498
+ export declare function langPath(path?: string): string;
499
+ /**
500
+ * Returns the path to the `layouts` directory within the `resources` directory, optionally relative to the current working directory.
501
+ *
502
+ * @param path - The relative path to the file or directory within the `layouts` directory.
503
+ * @param options - Optional. An object containing configuration settings.
504
+ * @param options.relative - If true, returns the path relative to the current working directory.
505
+ * @returns The absolute or relative path to the specified file or directory within the `layouts` directory.
506
+ */
507
+ export declare function layoutsPath(path?: string, options?: { relative?: boolean }): string;
508
+ /**
509
+ * Returns the path to the library entry file, filtered by library type.
510
+ *
511
+ * @param type - The type of library ('vue-components', 'web-components', or 'functions').
512
+ * @returns The absolute path to the specified library entry file.
513
+ */
514
+ export type LibraryType = "vue-components" | "web-components" | "functions";
515
+ export declare function libraryEntryPath(type: LibraryType): string;
516
+ /**
517
+ * Returns the path to the `lint` directory within the core directory.
518
+ *
519
+ * @param path - The relative path to the file or directory within the lint directory.
520
+ * @returns The absolute path to the specified file or directory within the lint directory.
521
+ */
522
+ export declare function lintPath(path?: string): string;
523
+ /**
524
+ * Returns the path to the `listeners` directory within the app directory.
525
+ *
526
+ * @param path - The relative path to the file or directory within the `listeners` directory.
527
+ * @returns The absolute path to the specified file or directory within the `listeners` directory.
528
+ */
529
+ export declare function listenersPath(path?: string): string;
530
+ /**
531
+ * Returns the path to the `jobs` directory within the app directory.
532
+ *
533
+ * @param path - The relative path to the file or directory within the `jobs` directory.
534
+ * @returns The absolute path to the specified file or directory within the `jobs` directory.
535
+ */
536
+ export declare function jobsPath(path?: string): string;
537
+ /**
538
+ * Returns the path to the `logging` directory within the core directory.
539
+ *
540
+ * @param path - The relative path to the file or directory within the logging directory.
541
+ * @returns The absolute path to the specified file or directory within the logging directory.
542
+ */
543
+ export declare function loggingPath(path?: string): string;
544
+ /**
545
+ * Returns the path to the `logs` directory within the project storage directory.
546
+ *
547
+ * @param path - The relative path to the file or directory within the `logs` directory.
548
+ * @returns The absolute path to the specified file or directory within the `logs` directory.
549
+ */
550
+ export declare function logsPath(path?: string): string;
551
+ /**
552
+ * Returns the path to the `models` directory within the app directory.
553
+ *
554
+ * @param path - The relative path to the file or directory within the `models` directory.
555
+ * @returns The absolute path to the specified file or directory within the `models` directory.
556
+ */
557
+ export declare function modelsPath(path?: string): string;
558
+ /**
559
+ * Returns the path to the `modules` directory within the `resources` directory.
560
+ *
561
+ * @param path - The relative path to the file or directory within the `modules` directory.
562
+ * @returns The absolute path to the specified file or directory within the `modules` directory.
563
+ */
564
+ export declare function modulesPath(path?: string): string;
565
+ /**
566
+ * Returns the path to the `notifications` directory within the core directory.
567
+ *
568
+ * @param path - The relative path to the file or directory within the `notifications` directory.
569
+ * @returns The absolute path to the specified file or directory within the `notifications` directory.
570
+ */
571
+ export declare function notificationsPath(path?: string): string;
572
+ /**
573
+ * Returns the path to the `orm` directory within the core directory.
574
+ *
575
+ * @param path - The relative path to the file or directory within the orm directory.
576
+ * @returns The absolute path to the specified file or directory within the orm directory.
577
+ */
578
+ export declare function ormPath(path?: string): string;
579
+ /**
580
+ * Returns the path to the `objects` directory within the core directory.
581
+ *
582
+ * @param path - The relative path to the file or directory within the `objects` directory.
583
+ * @returns The absolute path to the specified file or directory within the `objects` directory.
584
+ */
585
+ export declare function objectsPath(path?: string): string;
586
+ /**
587
+ * Returns the default path to the onboarding views within the project directory, or a specified path.
588
+ *
589
+ * @param path - The relative path to the file or directory within the project directory. Defaults to 'views/dashboard/onboarding'.
590
+ * @returns The absolute path to the specified file or directory within the project directory.
591
+ */
592
+ export declare function onboardingPath(path?: string): string;
593
+ /**
594
+ * Returns the path to the `package.json` file of a specified library type within the framework directory.
595
+ *
596
+ * @param type - The type of the library ('vue-components', 'web-components', or 'functions') for which to return the package.json path.
597
+ * @returns The absolute path to the specified package.json file within the framework directory.
598
+ */
599
+ export declare function packageJsonPath(type: LibraryType): string;
600
+ /**
601
+ * Returns the path to the `views` directory within the `resources` directory.
602
+ *
603
+ * @param path - The relative path to the file or directory within the `views` directory.
604
+ * @returns The absolute path to the specified file or directory within the `views` directory.
605
+ */
606
+ export declare function viewsPath(path?: string): string;
607
+ /**
608
+ * Returns the path to the `path` directory within the core directory.
609
+ *
610
+ * @param path - The relative path to the file or directory within the path directory.
611
+ * @returns The absolute path to the specified file or directory within the path directory.
612
+ */
613
+ export declare function pathPath(path?: string): string;
614
+ /**
615
+ * Returns the path to the `payments` directory within the core directory.
616
+ *
617
+ * @param path - The relative path to the file or directory within the `payments` directory.
618
+ * @returns The absolute path to the specified file or directory within the `payments` directory.
619
+ */
620
+ export declare function paymentsPath(path?: string): string;
621
+ /**
622
+ * Returns the project path, resolving from the current working directory and moving up until the storage directory is no longer part of the path.
623
+ *
624
+ * @param filePath - The relative path to append to the project path. Defaults to an empty string.
625
+ * @returns The absolute path to the specified file or directory within the project directory.
626
+ */
627
+ export declare function projectPath(filePath?: string, options?: { relative: boolean }): string;
628
+ /**
629
+ * Finds and returns the absolute path of a specified project by name.
630
+ *
631
+ * @param project - The name of the project to find.
632
+ * @returns The absolute path to the specified project.
633
+ * @throws Error if the project with the specified name cannot be found.
634
+ */
635
+ export declare function findProjectPath(project: string): Promise<string>;
636
+ /**
637
+ * Returns the path to the `config` directory within the project directory.
638
+ *
639
+ * @param path - The relative path to the file or directory within the config directory.
640
+ * @returns The absolute path to the specified file or directory within the config directory.
641
+ */
642
+ export declare function projectConfigPath(path?: string): string;
643
+ /**
644
+ * Returns the path to the `storage` directory within the project directory.
645
+ *
646
+ * @param path - The relative path to the file or directory within the storage directory.
647
+ * @returns The absolute path to the specified file or directory within the storage directory.
648
+ */
649
+ export declare function storagePath(path?: string): string;
650
+ /**
651
+ * Returns the path to the `public` directory within the project directory.
652
+ *
653
+ * @param path - The relative path to the file or directory within the public directory.
654
+ * @returns The absolute path to the specified file or directory within the public directory.
655
+ */
656
+ export declare function publicPath(path?: string): string;
657
+ /**
658
+ * Returns the path to the `push` directory within the `notifications` directory.
659
+ *
660
+ * @param path - The relative path to the file or directory within the push directory.
661
+ * @returns The absolute path to the specified file or directory within the push directory.
662
+ */
663
+ export declare function pushPath(path?: string): string;
664
+ /**
665
+ * Returns the path to the `query-builder` directory within the core directory.
666
+ *
667
+ * @param path - The relative path to the file or directory within the query-builder directory.
668
+ * @returns The absolute path to the specified file or directory within the query-builder directory.
669
+ */
670
+ export declare function queryBuilderPath(path?: string): string;
671
+ /**
672
+ * Returns the path to the `queue` directory within the core directory.
673
+ *
674
+ * @param path - The relative path to the file or directory within the queue directory.
675
+ * @returns The absolute path to the specified file or directory within the queue directory.
676
+ */
677
+ export declare function queuePath(path?: string): string;
678
+ /**
679
+ * Returns the path to the `realtime` directory within the core directory.
680
+ *
681
+ * @param path - The relative path to the file or directory within the realtime directory.
682
+ * @returns The absolute path to the specified file or directory within the realtime directory.
683
+ */
684
+ export declare function realtimePath(path?: string): string;
685
+ /**
686
+ * Returns the path to the `resources` directory within the project storage directory, with an option for relative paths.
687
+ *
688
+ * @param path - The relative path to the file or directory within the `resources` directory.
689
+ * @param options - Optional. An object containing configuration settings.
690
+ * @param options.relative - If true, returns the path relative to the current working directory.
691
+ * @returns The absolute or relative path to the specified file or directory within the `resources` directory.
692
+ */
693
+ export declare function resourcesPath(path?: string, options?: { relative?: boolean }): string;
694
+ /**
695
+ * Returns the path to the `repl` directory within the core directory.
696
+ *
697
+ * @param path - The relative path to the file or directory within the repl directory.
698
+ * @returns The absolute path to the specified file or directory within the repl directory.
699
+ */
700
+ export declare function replPath(path?: string): string;
701
+ /**
702
+ * Returns the path to the `router` directory within the core directory.
703
+ *
704
+ * @param path - The relative path to the file or directory within the router directory.
705
+ * @returns The absolute path to the specified file or directory within the router directory.
706
+ */
707
+ export declare function routerPath(path?: string): string;
708
+ /**
709
+ * Returns the path to the `routes` directory within the `resources` directory, with an option for relative paths.
710
+ *
711
+ * @param path - The relative path to the file or directory within the `routes` directory.
712
+ * @param options - Optional. An object containing configuration settings.
713
+ * @param options.relative - If true, returns the path relative to the current working directory.
714
+ * @returns The absolute or relative path to the specified file or directory within the `routes` directory.
715
+ */
716
+ export declare function routesPath(path?: string, options?: { relative?: boolean }): string;
717
+ /**
718
+ * Returns the path to the `search-engine` directory within the core directory.
719
+ *
720
+ * @param path - The relative path to the file or directory within the search-engine directory.
721
+ * @returns The absolute path to the specified file or directory within the search-engine directory.
722
+ */
723
+ export declare function searchEnginePath(path?: string): string;
724
+ /**
725
+ * Returns the path to the `settings` directory within the project directory, defaulting to the views/dashboard/settings directory.
726
+ *
727
+ * @param path - The relative path to the file or directory within the `settings` directory.
728
+ * @returns The absolute path to the specified file or directory within the `settings` directory.
729
+ */
730
+ export declare function settingsPath(path?: string): string;
731
+ /**
732
+ * Returns the path to the `scripts` directory within the framework directory.
733
+ *
734
+ * @param path - The relative path to the file or directory within the `scripts` directory.
735
+ * @returns The absolute path to the specified file or directory within the `scripts` directory.
736
+ */
737
+ export declare function scriptsPath(path?: string): string;
738
+ /**
739
+ * Returns the path to the `scheduler` directory within the core directory.
740
+ *
741
+ * @param path - The relative path to the file or directory within the scheduler directory.
742
+ * @returns The absolute path to the specified file or directory within the scheduler directory.
743
+ */
744
+ export declare function schedulerPath(path?: string): string;
745
+ /**
746
+ * Returns the path to the `slug` directory within the core directory.
747
+ *
748
+ * @param path - The relative path to the file or directory within the slug directory.
749
+ * @returns The absolute path to the specified file or directory within the slug directory.
750
+ */
751
+ export declare function slugPath(path?: string): string;
752
+ /**
753
+ * Returns the path to the `sms` directory within the `notifications` directory.
754
+ *
755
+ * @param path - The relative path to the file or directory within the `sms` directory.
756
+ * @returns The absolute path to the specified file or directory within the `sms` directory.
757
+ */
758
+ export declare function smsPath(path?: string): string;
759
+ /**
760
+ * Returns the path to the `storage` directory within the core directory.
761
+ *
762
+ * @param path - The relative path to the file or directory within the storage directory.
763
+ * @returns The absolute path to the specified file or directory within the storage directory.
764
+ */
765
+ export declare function coreStoragePath(path?: string): string;
766
+ /**
767
+ * Returns the path to the `stores` directory within the `resources` directory.
768
+ *
769
+ * @param path - The relative path to the file or directory within the `stores` directory.
770
+ * @returns The absolute path to the specified file or directory within the `stores` directory.
771
+ */
772
+ export declare function storesPath(path?: string): string;
773
+ /**
774
+ * Returns the path to the `security` directory within the core directory.
775
+ *
776
+ * @param path - The relative path to the file or directory within the security directory.
777
+ * @returns The absolute path to the specified file or directory within the security directory.
778
+ */
779
+ export declare function securityPath(path?: string): string;
780
+ /**
781
+ * Returns the path to the `server` directory within the core directory.
782
+ *
783
+ * @param path - The relative path to the file or directory within the server directory.
784
+ * @returns The absolute path to the specified file or directory within the server directory.
785
+ */
786
+ export declare function serverPath(path?: string): string;
787
+ export declare function userServerPath(path?: string): string;
788
+ /**
789
+ * Returns the path to the `serverless` directory within the core directory.
790
+ *
791
+ * @param path - The relative path to the file or directory within the `serverless` directory.
792
+ * @returns The absolute path to the specified file or directory within the `serverless` directory.
793
+ */
794
+ export declare function serverlessPath(path?: string): string;
795
+ /**
796
+ * Returns the path to the specified directory or file within the framework's `src` directory.
797
+ *
798
+ * @param path - The relative path to the file or directory within the framework's `src` directory.
799
+ * @returns The absolute path to the specified file or directory within the framework's `src` directory.
800
+ */
801
+ export declare function stacksPath(path?: string): string;
802
+ /**
803
+ * Returns the path to the `shell` directory within the core directory.
804
+ *
805
+ * @param path - The relative path to the file or directory within the shell directory.
806
+ * @returns The absolute path to the specified file or directory within the shell directory.
807
+ */
808
+ export declare function shellPath(path?: string): string;
809
+ /**
810
+ * Returns the path to the `strings` directory within the core directory.
811
+ *
812
+ * @param path - The relative path to the file or directory within the `strings` directory.
813
+ * @returns The absolute path to the specified file or directory within the `strings` directory.
814
+ */
815
+ export declare function stringsPath(path?: string): string;
816
+ /**
817
+ * Returns the path to the `testing` directory within the core directory.
818
+ *
819
+ * @param path - The relative path to the file or directory within the testing directory.
820
+ * @returns The absolute path to the specified file or directory within the testing directory.
821
+ */
822
+ export declare function testingPath(path?: string): string;
823
+ /**
824
+ * Returns the path to the `tinker` directory within the core directory.
825
+ *
826
+ * @param path - The relative path to the file or directory within the tinker directory.
827
+ * @returns The absolute path to the specified file or directory within the tinker directory.
828
+ */
829
+ export declare function tinkerPath(path?: string): string;
830
+ /**
831
+ * Returns the path to the `tests` directory within the framework directory.
832
+ *
833
+ * @param path - The relative path to the file or directory within the `tests` directory.
834
+ * @returns The absolute path to the specified file or directory within the `tests` directory.
835
+ */
836
+ export declare function testsPath(path?: string): string;
837
+ /**
838
+ * Returns the path to the `types` directory within the core directory.
839
+ *
840
+ * @param path - The relative path to the file or directory within the `types` directory.
841
+ * @returns The absolute path to the specified file or directory within the `types` directory.
842
+ */
843
+ export declare function typesPath(path?: string): string;
844
+ /**
845
+ * Returns the path to the `ui` directory within the core directory.
846
+ *
847
+ * @param path - The relative path to the file or directory within the ui directory.
848
+ * @returns The absolute path to the specified file or directory within the ui directory.
849
+ */
850
+ export declare function uiPath(path?: string, options?: { relative?: boolean }): string;
851
+ /**
852
+ * Returns the path to the `utils` directory within the core directory.
853
+ *
854
+ * @param path - The relative path to the file or directory within the `utils` directory.
855
+ * @returns The absolute path to the specified file or directory within the `utils` directory.
856
+ */
857
+ export declare function utilsPath(path?: string): string;
858
+ /**
859
+ * Returns the path to the `validation` directory within the core directory.
860
+ *
861
+ * @param path - The relative path to the file or directory within the validation directory.
862
+ * @returns The absolute path to the specified file or directory within the validation directory.
863
+ */
864
+ export declare function validationPath(path?: string): string;
865
+ /**
866
+ * Returns the path to the `vite-config` directory within the core directory.
867
+ *
868
+ * @param path - The relative path to the file or directory within the vite-config directory.
869
+ * @returns The absolute path to the specified file or directory within the vite-config directory.
870
+ */
871
+ export declare function viteConfigPath(path?: string): string;
872
+ /**
873
+ * Returns the path to the `vite-plugin` directory within the core directory.
874
+ *
875
+ * @param path - The relative path to the file or directory within the vite directory.
876
+ * @returns The absolute path to the specified file or directory within the vite directory.
877
+ */
878
+ export declare function vitePluginPath(path?: string): string;
879
+ /**
880
+ * Returns the path to the `x-ray` directory within the `stacks` directory of the framework.
881
+ *
882
+ * @param path - The relative path to the file or directory within the x-ray directory.
883
+ * @returns The absolute path to the specified file or directory within the x-ray directory.
884
+ */
885
+ export declare function xRayPath(path?: string): string;
886
+ /**
887
+ * Returns the path to the home directory, optionally appending a given path.
888
+ *
889
+ * @param path - The relative path to append to the home directory path.
890
+ * @returns The absolute path to the specified file or directory within the home directory.
891
+ */
892
+ export declare function homeDir(path?: string): string;
893
+ export interface Path {
894
+ actionsPath: (path?: string) => string;
895
+ userActionsPath: (path?: string) => string;
896
+ builtUserActionsPath: (path?: string, option?: { relative: boolean }) => string;
897
+ userComponentsPath: (path?: string) => string;
898
+ userViewsPath: (path?: string) => string;
899
+ userFunctionsPath: (path?: string) => string;
900
+ aiPath: (path?: string) => string;
901
+ assetsPath: (path?: string) => string;
902
+ relativeActionsPath: (path?: string) => string;
903
+ aliasPath: (path?: string) => string;
904
+ analyticsPath: (path?: string) => string;
905
+ arraysPath: (path?: string) => string;
906
+ appPath: (path?: string) => string;
907
+ authPath: (path?: string) => string;
908
+ coreApiPath: (path?: string) => string;
909
+ buddyPath: (path?: string) => string;
910
+ buildEnginePath: (path?: string) => string;
911
+ libsEntriesPath: (path?: string) => string;
912
+ buildPath: (path?: string) => string;
913
+ cachePath: (path?: string) => string;
914
+ chatPath: (path?: string) => string;
915
+ cliPath: (path?: string) => string;
916
+ cloudPath: (path?: string) => string;
917
+ frameworkCloudPath: (path?: string) => string;
918
+ collectionsPath: (path?: string) => string;
919
+ commandsPath: (path?: string) => string;
920
+ componentsPath: (path?: string) => string;
921
+ configPath: (path?: string) => string;
922
+ projectConfigPath: (path?: string) => string;
923
+ corePath: (path?: string) => string;
924
+ customElementsDataPath: (path?: string) => string;
925
+ databasePath: (path?: string) => string;
926
+ datetimePath: (path?: string) => string;
927
+ developmentPath: (path?: string) => string;
928
+ desktopPath: (path?: string) => string;
929
+ docsPath: (path?: string) => string;
930
+ dnsPath: (path?: string) => string;
931
+ emailPath: (path?: string) => string;
932
+ enumsPath: (path?: string) => string;
933
+ eslintPluginPath: (path?: string) => string;
934
+ errorHandlingPath: (path?: string) => string;
935
+ eventsPath: (path?: string) => string;
936
+ coreEnvPath: (path?: string) => string;
937
+ healthPath: (path?: string) => string;
938
+ examplesPath: (type?: "vue-components" | "web-components") => string;
939
+ fakerPath: (path?: string) => string;
940
+ frameworkPath: (path?: string) => string;
941
+ browserPath: (path?: string) => string;
942
+ storagePath: (path?: string) => string;
943
+ functionsPath: (path?: string) => string;
944
+ gitPath: (path?: string) => string;
945
+ langPath: (path?: string) => string;
946
+ layoutsPath: (path?: string, options?: { relative?: boolean }) => string;
947
+ libsPath: (path?: string) => string;
948
+ userLibsPath: (path?: string) => string;
949
+ libraryEntryPath: (type: LibraryType) => string;
950
+ lintPath: (path?: string) => string;
951
+ listenersPath: (path?: string) => string;
952
+ loggingPath: (path?: string) => string;
953
+ logsPath: (path?: string) => string;
954
+ jobsPath: (path?: string) => string;
955
+ modulesPath: (path?: string) => string;
956
+ ormPath: (path?: string) => string;
957
+ objectsPath: (path?: string) => string;
958
+ onboardingPath: (path?: string) => string;
959
+ notificationsPath: (path?: string) => string;
960
+ packageJsonPath: (type: LibraryType) => string;
961
+ viewsPath: (path?: string) => string;
962
+ pathPath: (path?: string) => string;
963
+ paymentsPath: (path?: string) => string;
964
+ projectPath: (path?: string) => string;
965
+ findProjectPath: (project: string) => Promise<string>;
966
+ coreStoragePath: (path?: string) => string;
967
+ publicPath: (path?: string) => string;
968
+ pushPath: (path?: string) => string;
969
+ queryBuilderPath: (path?: string) => string;
970
+ queuePath: (path?: string) => string;
971
+ realtimePath: (path?: string) => string;
972
+ resourcesPath: (path?: string) => string;
973
+ replPath: (path?: string) => string;
974
+ routerPath: (path?: string) => string;
975
+ routesPath: (path?: string) => string;
976
+ runtimePath: (path?: string) => string;
977
+ searchEnginePath: (path?: string) => string;
978
+ schedulerPath: (path?: string) => string;
979
+ settingsPath: (path?: string) => string;
980
+ smsPath: (path?: string) => string;
981
+ slugPath: (path?: string) => string;
982
+ scriptsPath: (path?: string) => string;
983
+ securityPath: (path?: string) => string;
984
+ serverPath: (path?: string) => string;
985
+ userServerPath: (path?: string) => string;
986
+ serverlessPath: (path?: string) => string;
987
+ stacksPath: (path?: string) => string;
988
+ stringsPath: (path?: string) => string;
989
+ shellPath: (path?: string) => string;
990
+ storesPath: (path?: string) => string;
991
+ testingPath: (path?: string) => string;
992
+ testsPath: (path?: string) => string;
993
+ tinkerPath: (path?: string) => string;
994
+ typesPath: (path?: string) => string;
995
+ uiPath: (path?: string, options?: { relative?: boolean }) => string;
996
+ userDatabasePath: (path?: string) => string;
997
+ userMigrationsPath: (path?: string) => string;
998
+ userEventsPath: (path?: string) => string;
999
+ userJobsPath: (path?: string) => string;
1000
+ userListenersPath: (path?: string) => string;
1001
+ userMiddlewarePath: (path?: string) => string;
1002
+ userModelsPath: (path?: string) => string;
1003
+ userNotificationsPath: (path?: string) => string;
1004
+ utilsPath: (path?: string) => string;
1005
+ validationPath: (path?: string) => string;
1006
+ viteConfigPath: (path?: string) => string;
1007
+ vitePluginPath: (path?: string) => string;
1008
+ xRayPath: (path?: string) => string;
1009
+ homeDir: (path?: string) => string;
1010
+ basename: (path: string) => string;
1011
+ delimiter: () => ";" | ":";
1012
+ dirname: (path: string) => string;
1013
+ extname: (path: string) => string;
1014
+ isAbsolute: (path: string) => boolean;
1015
+ join: (...paths: string[]) => string;
1016
+ normalize: (path: string) => string;
1017
+ relative: (from: string, to: string) => string;
1018
+ resolve: (...paths: string[]) => string;
1019
+ parse: (path: string) => ParsedPath;
1020
+ sep: () => "/" | "\\";
1021
+ toNamespacedPath: (path: string) => string;
1022
+ }
1023
+ export declare const path: Path;
1024
+ export { basename, delimiter, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep, toNamespacedPath };