@stacksjs/path 0.50.0 → 0.52.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.
package/README.md CHANGED
@@ -35,7 +35,7 @@ pnpm test
35
35
 
36
36
  Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
37
37
 
38
- ## 💪🏼 Contributing
38
+ ## 🚜 Contributing
39
39
 
40
40
  Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
41
41
 
package/dist/index.cjs ADDED
@@ -0,0 +1,430 @@
1
+ 'use strict';
2
+
3
+ const pathe = require('pathe');
4
+
5
+ function aiPath(path2) {
6
+ return corePath(`ai/${path2 || ""}`);
7
+ }
8
+ function actionsPath(path2) {
9
+ return corePath(`actions/src/${path2 || ""}`);
10
+ }
11
+ function aliasPath() {
12
+ return corePath("alias/src/index.ts");
13
+ }
14
+ function runtimePath(path2) {
15
+ return frameworkPath(`buddy/${path2 || ""}`);
16
+ }
17
+ function arraysPath(path2) {
18
+ return corePath(`arrays/${path2 || ""}`);
19
+ }
20
+ function authPath(path2) {
21
+ return corePath(`auth/${path2 || ""}`);
22
+ }
23
+ function appPath(path2) {
24
+ return projectPath(`app/${path2 || ""}`);
25
+ }
26
+ function buildPath(path2) {
27
+ return corePath(`build/${path2 || ""}`);
28
+ }
29
+ function buildEnginePath(path2) {
30
+ return buildPath(`${path2 || ""}`);
31
+ }
32
+ function buildEntriesPath(path2) {
33
+ return buildPath(`entries/${path2 || ""}`);
34
+ }
35
+ function cachePath(path2) {
36
+ return corePath(`cache/${path2 || ""}`);
37
+ }
38
+ function chatPath(path2) {
39
+ return corePath(`chat/${path2 || ""}`);
40
+ }
41
+ function cliPath(path2) {
42
+ return corePath(`cli/${path2 || ""}`);
43
+ }
44
+ function cloudPath(path2) {
45
+ return corePath(`cloud/${path2 || ""}`);
46
+ }
47
+ function collectionsPath(path2) {
48
+ return corePath(`collections/${path2 || ""}`);
49
+ }
50
+ function componentsPath(path2) {
51
+ return projectPath(`components/${path2 || ""}`);
52
+ }
53
+ function configPath(path2) {
54
+ return corePath(`config/${path2 || ""}`);
55
+ }
56
+ function userConfigPath(path2) {
57
+ return projectPath(`config/${path2 || ""}`);
58
+ }
59
+ function corePath(path2) {
60
+ return frameworkPath(`core/${path2 || ""}`);
61
+ }
62
+ function dashboardPath(path2) {
63
+ return corePath(`dashboard/${path2 || ""}`);
64
+ }
65
+ function databasePath(path2) {
66
+ return corePath(`database/${path2 || ""}`);
67
+ }
68
+ function developmentPath(path2) {
69
+ return corePath(`development/${path2 || ""}`);
70
+ }
71
+ function desktopPath(path2) {
72
+ return corePath(`desktop/${path2 || ""}`);
73
+ }
74
+ function docsPath(path2) {
75
+ return corePath(`docs/${path2 || ""}`);
76
+ }
77
+ function domainsPath(path2) {
78
+ return corePath(`domains/${path2 || ""}`);
79
+ }
80
+ function customElementsDataPath() {
81
+ return frameworkPath("custom-elements.json");
82
+ }
83
+ function emailPath(path2) {
84
+ return corePath(`email/${path2 || ""}`);
85
+ }
86
+ function errorHandlingPath(path2) {
87
+ return corePath(`error-handling/${path2 || ""}`);
88
+ }
89
+ function eventsPath(path2) {
90
+ return corePath(`events/${path2 || ""}`);
91
+ }
92
+ function fakerPath(path2) {
93
+ return corePath(`faker/${path2 || ""}`);
94
+ }
95
+ function healthPath(path2) {
96
+ return corePath(`health/${path2 || ""}`);
97
+ }
98
+ function examplesPath(type) {
99
+ return frameworkPath(`examples/${type || ""}`);
100
+ }
101
+ function frameworkPath(path2) {
102
+ return projectPath(`.stacks/${path2 || ""}`);
103
+ }
104
+ function storagePath(path2) {
105
+ return corePath(`storage/${path2 || ""}`);
106
+ }
107
+ function functionsPath(path2) {
108
+ return projectPath(`functions/${path2 || ""}`);
109
+ }
110
+ function gitPath(path2) {
111
+ return corePath(`git/${path2 || ""}`);
112
+ }
113
+ function langPath(path2) {
114
+ return projectPath(`lang/${path2 || ""}`);
115
+ }
116
+ function libraryEntryPath(type) {
117
+ return buildEntriesPath(`${type}.ts`);
118
+ }
119
+ function lintPath(path2) {
120
+ return corePath(`lint/${path2 || ""}`);
121
+ }
122
+ function loggingPath(path2) {
123
+ return corePath(`logging/${path2 || ""}`);
124
+ }
125
+ function xRayPath(path2) {
126
+ return corePath(`x-ray/${path2 || ""}`);
127
+ }
128
+ function modelsPath(path2) {
129
+ return appPath(`models/${path2 || ""}`);
130
+ }
131
+ function modulesPath(path2) {
132
+ return corePath(`modules/${path2 || ""}`);
133
+ }
134
+ function notificationsPath(path2) {
135
+ return corePath(`notifications/${path2 || ""}`);
136
+ }
137
+ function ormPath(path2) {
138
+ return corePath(`orm/${path2 || ""}`);
139
+ }
140
+ function objectsPath(path2) {
141
+ return corePath(`objects/${path2 || ""}`);
142
+ }
143
+ function onboardingPath(path2) {
144
+ return projectPath(`${path2 || "pages/dashboard/onboarding"}`);
145
+ }
146
+ function packageJsonPath(type) {
147
+ if (type === "vue-components")
148
+ return frameworkPath("components/vue/package.json");
149
+ if (type === "web-components")
150
+ return frameworkPath("components/web/package.json");
151
+ if (type === "functions")
152
+ return frameworkPath("functions/package.json");
153
+ return frameworkPath(`${type}/package.json`);
154
+ }
155
+ function pagesPath(path2) {
156
+ return appPath(`pages/${path2 || ""}`);
157
+ }
158
+ function pathPath(path2) {
159
+ return corePath(`path/${path2 || ""}`);
160
+ }
161
+ function paymentsPath(path2) {
162
+ return corePath(`payments/${path2 || ""}`);
163
+ }
164
+ function projectPath(filePath = "") {
165
+ let path2 = process.cwd();
166
+ if (path2.includes(".stacks"))
167
+ path2 = pathe.resolve(path2, "..");
168
+ if (path2.includes(".stacks"))
169
+ path2 = pathe.resolve(path2, "..");
170
+ if (path2.includes(".stacks"))
171
+ path2 = pathe.resolve(path2, "..");
172
+ if (!path2.includes(".stacks"))
173
+ path2 = pathe.resolve(path2, ".");
174
+ return pathe.resolve(path2, filePath);
175
+ }
176
+ function pushPath(path2) {
177
+ return corePath(`push/${path2 || ""}`);
178
+ }
179
+ function queryBuilderPath(path2) {
180
+ return corePath(`query-builder/${path2 || ""}`);
181
+ }
182
+ function queuePath(path2) {
183
+ return corePath(`queue/${path2 || ""}`);
184
+ }
185
+ function realtimePath(path2) {
186
+ return corePath(`realtime/${path2 || ""}`);
187
+ }
188
+ function routerPath(path2) {
189
+ return corePath(`router/${path2 || ""}`);
190
+ }
191
+ function searchEnginePath(path2) {
192
+ return corePath(`search-engine/${path2 || ""}`);
193
+ }
194
+ function settingsPath(path2) {
195
+ return projectPath(`${path2 || "pages/dashboard/settings"}`);
196
+ }
197
+ function smsPath(path2) {
198
+ return corePath(`sms/${path2 || ""}`);
199
+ }
200
+ function schedulerPath(path2) {
201
+ return corePath(`scheduler/${path2 || ""}`);
202
+ }
203
+ function signalsPath(path2) {
204
+ return corePath(`signals/${path2 || ""}`);
205
+ }
206
+ function routesPath(path2) {
207
+ return projectPath(`routes/${path2 || ""}`);
208
+ }
209
+ function securityPath(path2) {
210
+ return corePath(`security/${path2 || ""}`);
211
+ }
212
+ function serverPath(path2) {
213
+ return corePath(`server/${path2 || ""}`);
214
+ }
215
+ function serverlessPath(path2) {
216
+ return corePath(`serverless/${path2 || ""}`);
217
+ }
218
+ function stacksPath(path2) {
219
+ return frameworkPath(`src/${path2 || ""}`);
220
+ }
221
+ function tablesPath(path2) {
222
+ return corePath(`tables/${path2 || ""}`);
223
+ }
224
+ function testingPath(path2) {
225
+ return corePath(`testing/${path2 || ""}`);
226
+ }
227
+ function testsPath(path2) {
228
+ return frameworkPath(`tests/${path2 || ""}`);
229
+ }
230
+ function typesPath(path2) {
231
+ return corePath(`types/${path2 || ""}`);
232
+ }
233
+ function stringsPath(path2) {
234
+ return corePath(`strings/${path2 || ""}`);
235
+ }
236
+ function scriptsPath(path2) {
237
+ return frameworkPath(`scripts/${path2 || ""}`);
238
+ }
239
+ function uiPath(path2) {
240
+ return corePath(`ui/${path2 || ""}`);
241
+ }
242
+ function utilsPath(path2) {
243
+ return corePath(`utils/${path2 || ""}`);
244
+ }
245
+ function validationPath(path2) {
246
+ return corePath(`validation/${path2 || ""}`);
247
+ }
248
+ const path = {
249
+ aiPath,
250
+ actionsPath,
251
+ aliasPath,
252
+ arraysPath,
253
+ appPath,
254
+ authPath,
255
+ buildEnginePath,
256
+ buildEntriesPath,
257
+ buildPath,
258
+ cachePath,
259
+ chatPath,
260
+ cliPath,
261
+ cloudPath,
262
+ collectionsPath,
263
+ componentsPath,
264
+ configPath,
265
+ userConfigPath,
266
+ corePath,
267
+ customElementsDataPath,
268
+ databasePath,
269
+ developmentPath,
270
+ dashboardPath,
271
+ desktopPath,
272
+ docsPath,
273
+ domainsPath,
274
+ emailPath,
275
+ errorHandlingPath,
276
+ eventsPath,
277
+ healthPath,
278
+ examplesPath,
279
+ fakerPath,
280
+ frameworkPath,
281
+ storagePath,
282
+ functionsPath,
283
+ gitPath,
284
+ langPath,
285
+ libraryEntryPath,
286
+ lintPath,
287
+ loggingPath,
288
+ modulesPath,
289
+ ormPath,
290
+ objectsPath,
291
+ onboardingPath,
292
+ notificationsPath,
293
+ packageJsonPath,
294
+ pagesPath,
295
+ pathPath,
296
+ paymentsPath,
297
+ projectPath,
298
+ pushPath,
299
+ queryBuilderPath,
300
+ queuePath,
301
+ realtimePath,
302
+ routerPath,
303
+ routesPath,
304
+ searchEnginePath,
305
+ schedulerPath,
306
+ settingsPath,
307
+ smsPath,
308
+ signalsPath,
309
+ scriptsPath,
310
+ securityPath,
311
+ serverPath,
312
+ serverlessPath,
313
+ stacksPath,
314
+ stringsPath,
315
+ tablesPath,
316
+ testingPath,
317
+ testsPath,
318
+ typesPath,
319
+ uiPath,
320
+ utilsPath,
321
+ validationPath,
322
+ xRayPath,
323
+ // path utils
324
+ basename: pathe.basename,
325
+ delimiter: pathe.delimiter,
326
+ dirname: pathe.dirname,
327
+ extname: pathe.extname,
328
+ format: pathe.format,
329
+ isAbsolute: pathe.isAbsolute,
330
+ join: pathe.join,
331
+ normalize: pathe.normalize,
332
+ normalizeString: pathe.normalizeString,
333
+ parse: pathe.parse,
334
+ relative: pathe.relative,
335
+ resolve: pathe.resolve,
336
+ sep: pathe.sep,
337
+ toNamespacedPath: pathe.toNamespacedPath
338
+ };
339
+
340
+ exports.basename = pathe.basename;
341
+ exports.delimiter = pathe.delimiter;
342
+ exports.dirname = pathe.dirname;
343
+ exports.extname = pathe.extname;
344
+ exports.format = pathe.format;
345
+ exports.isAbsolute = pathe.isAbsolute;
346
+ exports.join = pathe.join;
347
+ exports.normalize = pathe.normalize;
348
+ exports.normalizeString = pathe.normalizeString;
349
+ exports.parse = pathe.parse;
350
+ exports.relative = pathe.relative;
351
+ exports.resolve = pathe.resolve;
352
+ exports.sep = pathe.sep;
353
+ exports.toNamespacedPath = pathe.toNamespacedPath;
354
+ exports.actionsPath = actionsPath;
355
+ exports.aiPath = aiPath;
356
+ exports.aliasPath = aliasPath;
357
+ exports.appPath = appPath;
358
+ exports.arraysPath = arraysPath;
359
+ exports.authPath = authPath;
360
+ exports.buildEnginePath = buildEnginePath;
361
+ exports.buildEntriesPath = buildEntriesPath;
362
+ exports.buildPath = buildPath;
363
+ exports.cachePath = cachePath;
364
+ exports.chatPath = chatPath;
365
+ exports.cliPath = cliPath;
366
+ exports.cloudPath = cloudPath;
367
+ exports.collectionsPath = collectionsPath;
368
+ exports.componentsPath = componentsPath;
369
+ exports.configPath = configPath;
370
+ exports.corePath = corePath;
371
+ exports.customElementsDataPath = customElementsDataPath;
372
+ exports.dashboardPath = dashboardPath;
373
+ exports.databasePath = databasePath;
374
+ exports.desktopPath = desktopPath;
375
+ exports.developmentPath = developmentPath;
376
+ exports.docsPath = docsPath;
377
+ exports.domainsPath = domainsPath;
378
+ exports.emailPath = emailPath;
379
+ exports.errorHandlingPath = errorHandlingPath;
380
+ exports.eventsPath = eventsPath;
381
+ exports.examplesPath = examplesPath;
382
+ exports.fakerPath = fakerPath;
383
+ exports.frameworkPath = frameworkPath;
384
+ exports.functionsPath = functionsPath;
385
+ exports.gitPath = gitPath;
386
+ exports.healthPath = healthPath;
387
+ exports.langPath = langPath;
388
+ exports.libraryEntryPath = libraryEntryPath;
389
+ exports.lintPath = lintPath;
390
+ exports.loggingPath = loggingPath;
391
+ exports.modelsPath = modelsPath;
392
+ exports.modulesPath = modulesPath;
393
+ exports.notificationsPath = notificationsPath;
394
+ exports.objectsPath = objectsPath;
395
+ exports.onboardingPath = onboardingPath;
396
+ exports.ormPath = ormPath;
397
+ exports.packageJsonPath = packageJsonPath;
398
+ exports.pagesPath = pagesPath;
399
+ exports.path = path;
400
+ exports.pathPath = pathPath;
401
+ exports.paymentsPath = paymentsPath;
402
+ exports.projectPath = projectPath;
403
+ exports.pushPath = pushPath;
404
+ exports.queryBuilderPath = queryBuilderPath;
405
+ exports.queuePath = queuePath;
406
+ exports.realtimePath = realtimePath;
407
+ exports.routerPath = routerPath;
408
+ exports.routesPath = routesPath;
409
+ exports.runtimePath = runtimePath;
410
+ exports.schedulerPath = schedulerPath;
411
+ exports.scriptsPath = scriptsPath;
412
+ exports.searchEnginePath = searchEnginePath;
413
+ exports.securityPath = securityPath;
414
+ exports.serverPath = serverPath;
415
+ exports.serverlessPath = serverlessPath;
416
+ exports.settingsPath = settingsPath;
417
+ exports.signalsPath = signalsPath;
418
+ exports.smsPath = smsPath;
419
+ exports.stacksPath = stacksPath;
420
+ exports.storagePath = storagePath;
421
+ exports.stringsPath = stringsPath;
422
+ exports.tablesPath = tablesPath;
423
+ exports.testingPath = testingPath;
424
+ exports.testsPath = testsPath;
425
+ exports.typesPath = typesPath;
426
+ exports.uiPath = uiPath;
427
+ exports.userConfigPath = userConfigPath;
428
+ exports.utilsPath = utilsPath;
429
+ exports.validationPath = validationPath;
430
+ exports.xRayPath = xRayPath;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- import { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath } from 'pathe';
1
+ import * as _path from 'path';
2
+ import { normalizeString } from 'pathe';
3
+ export { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath } from 'pathe';
4
+
2
5
  /**
3
6
  * Returns the path to the `ai` directory. The AI directory
4
7
  * contains the core Stacks' AI logic which currently
@@ -15,7 +18,7 @@ import { basename, delimiter, dirname, extname, format, isAbsolute, join, normal
15
18
  * // path is /Users/chrisbreuer/Code/stacks/.stacks/core/ai
16
19
  * ```
17
20
  */
18
- export declare function aiPath(path?: string): any;
21
+ declare function aiPath(path?: string): string;
19
22
  /**
20
23
  * Returns the path to the `actions` directory. The actions directory
21
24
  * contains the core Stacks' actions. An action
@@ -30,11 +33,12 @@ export declare function aiPath(path?: string): any;
30
33
  * buildPath('any-path.ts')
31
34
  * ```
32
35
  */
33
- export declare function actionsPath(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;
36
+ declare function actionsPath(path?: string): string;
37
+ declare function aliasPath(): string;
38
+ declare function runtimePath(path?: string): string;
39
+ declare function arraysPath(path?: string): string;
40
+ declare function authPath(path?: string): string;
41
+ declare function appPath(path?: string): string;
38
42
  /**
39
43
  * Returns the path to the build directory. The build directory
40
44
  * contains Stacks' build engine & its tooling integrations.
@@ -47,63 +51,81 @@ export declare function authPath(path?: string): any;
47
51
  * buildPath('vue-components.ts')
48
52
  * ```
49
53
  */
50
- export declare function buildPath(path?: string): any;
51
- export declare function buildEnginePath(path?: string): any;
52
- export declare function buildEntriesPath(path?: string): any;
53
- export declare function cachePath(path?: string): any;
54
- export declare function chatPath(path?: string): any;
55
- export declare function cliPath(path?: string): any;
56
- export declare function collectionsPath(path?: string): any;
57
- export declare function componentsPath(path?: string): any;
58
- export declare function configPath(path?: string): any;
59
- export declare function corePath(path?: string): any;
60
- export declare function dashboardPath(path?: string): any;
61
- export declare function desktopPath(path?: string): any;
62
- export declare function docsPath(path?: string): any;
63
- export declare function domainsPath(path?: string): any;
64
- export declare function driversPath(path?: string): any;
65
- export declare function customElementsDataPath(): any;
66
- export declare function emailPath(path?: string): any;
67
- export declare function errorHandlingPath(path?: string): any;
68
- export declare function examplesPath(type: 'vue-components' | 'web-components'): any;
69
- export declare function frameworkPath(path?: string): any;
70
- export declare function fsPath(path?: string): any;
71
- export declare function functionsPath(path?: string): any;
72
- export declare function gitPath(path?: string): any;
73
- export declare function langPath(path?: string): any;
74
- export declare function libraryEntryPath(type: 'vue-components' | 'web-components' | 'functions'): any;
75
- export declare function lintPath(path?: string): any;
76
- export declare function loggingPath(path?: string): any;
77
- export declare function xRayPath(path?: string): any;
78
- export declare function modulesPath(path?: string): any;
79
- export declare function notificationsPath(path?: string): any;
80
- export declare function objectsPath(path?: string): any;
81
- export declare function packageJsonPath(type: 'vue-components' | 'web-components' | 'functions'): any;
82
- export declare function pagesPath(path?: string): any;
83
- export declare function pathPath(path?: string): any;
84
- export declare function projectPath(filePath?: string): any;
85
- export declare function pushPath(path?: string): any;
86
- export declare function routerPath(path?: string): any;
87
- export declare function searchEnginePath(path?: string): any;
88
- export declare function smsPath(path?: string): any;
89
- export declare function routesPath(path?: string): any;
90
- export declare function securityPath(path?: string): any;
91
- export declare function serverPath(path?: string): any;
92
- export declare function serverlessPath(path?: string): any;
93
- export declare function stacksPath(path?: string): any;
94
- export declare function tablesPath(path?: string): any;
95
- export declare function testingPath(path?: string): any;
96
- export declare function testsPath(path?: string): any;
97
- export declare function typesPath(path?: string): any;
98
- export declare function stringsPath(path?: string): any;
99
- export declare function scriptsPath(path?: string): any;
100
- export declare function uiPath(path?: string): any;
101
- export declare function utilsPath(path?: string): any;
102
- export declare const path: {
54
+ declare function buildPath(path?: string): string;
55
+ declare function buildEnginePath(path?: string): string;
56
+ declare function buildEntriesPath(path?: string): string;
57
+ declare function cachePath(path?: string): string;
58
+ declare function chatPath(path?: string): string;
59
+ declare function cliPath(path?: string): string;
60
+ declare function cloudPath(path?: string): string;
61
+ declare function collectionsPath(path?: string): string;
62
+ declare function componentsPath(path?: string): string;
63
+ declare function configPath(path?: string): string;
64
+ declare function userConfigPath(path?: string): string;
65
+ declare function corePath(path?: string): string;
66
+ declare function dashboardPath(path?: string): string;
67
+ declare function databasePath(path?: string): string;
68
+ declare function developmentPath(path?: string): string;
69
+ declare function desktopPath(path?: string): string;
70
+ declare function docsPath(path?: string): string;
71
+ declare function domainsPath(path?: string): string;
72
+ declare function customElementsDataPath(): string;
73
+ declare function emailPath(path?: string): string;
74
+ declare function errorHandlingPath(path?: string): string;
75
+ declare function eventsPath(path?: string): string;
76
+ declare function fakerPath(path?: string): string;
77
+ declare function healthPath(path?: string): string;
78
+ declare function examplesPath(type: 'vue-components' | 'web-components'): string;
79
+ declare function frameworkPath(path?: string): string;
80
+ declare function storagePath(path?: string): string;
81
+ declare function functionsPath(path?: string): string;
82
+ declare function gitPath(path?: string): string;
83
+ declare function langPath(path?: string): string;
84
+ declare function libraryEntryPath(type: 'vue-components' | 'web-components' | 'functions'): string;
85
+ declare function lintPath(path?: string): string;
86
+ declare function loggingPath(path?: string): string;
87
+ declare function xRayPath(path?: string): string;
88
+ declare function modelsPath(path?: string): string;
89
+ declare function modulesPath(path?: string): string;
90
+ declare function notificationsPath(path?: string): string;
91
+ declare function ormPath(path?: string): string;
92
+ declare function objectsPath(path?: string): string;
93
+ declare function onboardingPath(path?: string): string;
94
+ declare function packageJsonPath(type: 'vue-components' | 'web-components' | 'functions'): string;
95
+ declare function pagesPath(path?: string): string;
96
+ declare function pathPath(path?: string): string;
97
+ declare function paymentsPath(path?: string): string;
98
+ declare function projectPath(filePath?: string): string;
99
+ declare function pushPath(path?: string): string;
100
+ declare function queryBuilderPath(path?: string): string;
101
+ declare function queuePath(path?: string): string;
102
+ declare function realtimePath(path?: string): string;
103
+ declare function routerPath(path?: string): string;
104
+ declare function searchEnginePath(path?: string): string;
105
+ declare function settingsPath(path?: string): string;
106
+ declare function smsPath(path?: string): string;
107
+ declare function schedulerPath(path?: string): string;
108
+ declare function signalsPath(path?: string): string;
109
+ declare function routesPath(path?: string): string;
110
+ declare function securityPath(path?: string): string;
111
+ declare function serverPath(path?: string): string;
112
+ declare function serverlessPath(path?: string): string;
113
+ declare function stacksPath(path?: string): string;
114
+ declare function tablesPath(path?: string): string;
115
+ declare function testingPath(path?: string): string;
116
+ declare function testsPath(path?: string): string;
117
+ declare function typesPath(path?: string): string;
118
+ declare function stringsPath(path?: string): string;
119
+ declare function scriptsPath(path?: string): string;
120
+ declare function uiPath(path?: string): string;
121
+ declare function utilsPath(path?: string): string;
122
+ declare function validationPath(path?: string): string;
123
+ declare const path: {
103
124
  aiPath: typeof aiPath;
104
125
  actionsPath: typeof actionsPath;
105
126
  aliasPath: typeof aliasPath;
106
127
  arraysPath: typeof arraysPath;
128
+ appPath: typeof appPath;
107
129
  authPath: typeof authPath;
108
130
  buildEnginePath: typeof buildEnginePath;
109
131
  buildEntriesPath: typeof buildEntriesPath;
@@ -111,40 +133,54 @@ export declare const path: {
111
133
  cachePath: typeof cachePath;
112
134
  chatPath: typeof chatPath;
113
135
  cliPath: typeof cliPath;
136
+ cloudPath: typeof cloudPath;
114
137
  collectionsPath: typeof collectionsPath;
115
138
  componentsPath: typeof componentsPath;
116
139
  configPath: typeof configPath;
140
+ userConfigPath: typeof userConfigPath;
117
141
  corePath: typeof corePath;
118
142
  customElementsDataPath: typeof customElementsDataPath;
143
+ databasePath: typeof databasePath;
144
+ developmentPath: typeof developmentPath;
119
145
  dashboardPath: typeof dashboardPath;
120
146
  desktopPath: typeof desktopPath;
121
147
  docsPath: typeof docsPath;
122
148
  domainsPath: typeof domainsPath;
123
- driversPath: typeof driversPath;
124
149
  emailPath: typeof emailPath;
125
150
  errorHandlingPath: typeof errorHandlingPath;
151
+ eventsPath: typeof eventsPath;
152
+ healthPath: typeof healthPath;
126
153
  examplesPath: typeof examplesPath;
154
+ fakerPath: typeof fakerPath;
127
155
  frameworkPath: typeof frameworkPath;
128
- fsPath: typeof fsPath;
156
+ storagePath: typeof storagePath;
129
157
  functionsPath: typeof functionsPath;
130
158
  gitPath: typeof gitPath;
131
159
  langPath: typeof langPath;
132
160
  libraryEntryPath: typeof libraryEntryPath;
133
161
  lintPath: typeof lintPath;
134
162
  loggingPath: typeof loggingPath;
135
- xRayPath: typeof xRayPath;
136
163
  modulesPath: typeof modulesPath;
164
+ ormPath: typeof ormPath;
137
165
  objectsPath: typeof objectsPath;
166
+ onboardingPath: typeof onboardingPath;
138
167
  notificationsPath: typeof notificationsPath;
139
168
  packageJsonPath: typeof packageJsonPath;
140
169
  pagesPath: typeof pagesPath;
141
170
  pathPath: typeof pathPath;
171
+ paymentsPath: typeof paymentsPath;
142
172
  projectPath: typeof projectPath;
143
173
  pushPath: typeof pushPath;
174
+ queryBuilderPath: typeof queryBuilderPath;
175
+ queuePath: typeof queuePath;
176
+ realtimePath: typeof realtimePath;
144
177
  routerPath: typeof routerPath;
178
+ routesPath: typeof routesPath;
145
179
  searchEnginePath: typeof searchEnginePath;
180
+ schedulerPath: typeof schedulerPath;
181
+ settingsPath: typeof settingsPath;
146
182
  smsPath: typeof smsPath;
147
- routesPath: typeof routesPath;
183
+ signalsPath: typeof signalsPath;
148
184
  scriptsPath: typeof scriptsPath;
149
185
  securityPath: typeof securityPath;
150
186
  serverPath: typeof serverPath;
@@ -157,20 +193,22 @@ export declare const path: {
157
193
  typesPath: typeof typesPath;
158
194
  uiPath: typeof uiPath;
159
195
  utilsPath: typeof utilsPath;
160
- basename: any;
196
+ validationPath: typeof validationPath;
197
+ xRayPath: typeof xRayPath;
198
+ basename: (path: string, suffix?: string | undefined) => string;
161
199
  delimiter: string;
162
- dirname: any;
163
- extname: any;
164
- format: any;
165
- isAbsolute: any;
166
- join: any;
167
- normalize: any;
200
+ dirname: (path: string) => string;
201
+ extname: (path: string) => string;
202
+ format: (pathObject: _path.FormatInputPathObject) => string;
203
+ isAbsolute: (path: string) => boolean;
204
+ join: (...paths: string[]) => string;
205
+ normalize: (path: string) => string;
168
206
  normalizeString: typeof normalizeString;
169
- parse: any;
170
- relative: any;
171
- resolve: any;
207
+ parse: (path: string) => _path.ParsedPath;
208
+ relative: (from: string, to: string) => string;
209
+ resolve: (...paths: string[]) => string;
172
210
  sep: string;
173
- toNamespacedPath: any;
211
+ toNamespacedPath: (path: string) => string;
174
212
  };
175
- export { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath };
176
- export default path;
213
+
214
+ export { actionsPath, aiPath, aliasPath, appPath, arraysPath, authPath, buildEnginePath, buildEntriesPath, buildPath, cachePath, chatPath, cliPath, cloudPath, collectionsPath, componentsPath, configPath, corePath, customElementsDataPath, dashboardPath, databasePath, desktopPath, developmentPath, docsPath, domainsPath, emailPath, errorHandlingPath, eventsPath, examplesPath, fakerPath, frameworkPath, functionsPath, gitPath, healthPath, langPath, libraryEntryPath, lintPath, loggingPath, modelsPath, modulesPath, notificationsPath, objectsPath, onboardingPath, ormPath, packageJsonPath, pagesPath, path, pathPath, paymentsPath, projectPath, pushPath, queryBuilderPath, queuePath, realtimePath, routerPath, routesPath, runtimePath, schedulerPath, scriptsPath, searchEnginePath, securityPath, serverPath, serverlessPath, settingsPath, signalsPath, smsPath, stacksPath, storagePath, stringsPath, tablesPath, testingPath, testsPath, typesPath, uiPath, userConfigPath, utilsPath, validationPath, xRayPath };
package/dist/index.mjs CHANGED
@@ -1,116 +1,148 @@
1
- import { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath } from "pathe";
2
- export function aiPath(path2) {
1
+ import { resolve, basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, sep, toNamespacedPath } from 'pathe';
2
+ export { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath } from 'pathe';
3
+
4
+ function aiPath(path2) {
3
5
  return corePath(`ai/${path2 || ""}`);
4
6
  }
5
- export function actionsPath(path2) {
7
+ function actionsPath(path2) {
6
8
  return corePath(`actions/src/${path2 || ""}`);
7
9
  }
8
- export function aliasPath() {
10
+ function aliasPath() {
9
11
  return corePath("alias/src/index.ts");
10
12
  }
11
- export function runtimePath(path2) {
13
+ function runtimePath(path2) {
12
14
  return frameworkPath(`buddy/${path2 || ""}`);
13
15
  }
14
- export function arraysPath(path2) {
16
+ function arraysPath(path2) {
15
17
  return corePath(`arrays/${path2 || ""}`);
16
18
  }
17
- export function authPath(path2) {
19
+ function authPath(path2) {
18
20
  return corePath(`auth/${path2 || ""}`);
19
21
  }
20
- export function buildPath(path2) {
22
+ function appPath(path2) {
23
+ return projectPath(`app/${path2 || ""}`);
24
+ }
25
+ function buildPath(path2) {
21
26
  return corePath(`build/${path2 || ""}`);
22
27
  }
23
- export function buildEnginePath(path2) {
28
+ function buildEnginePath(path2) {
24
29
  return buildPath(`${path2 || ""}`);
25
30
  }
26
- export function buildEntriesPath(path2) {
31
+ function buildEntriesPath(path2) {
27
32
  return buildPath(`entries/${path2 || ""}`);
28
33
  }
29
- export function cachePath(path2) {
34
+ function cachePath(path2) {
30
35
  return corePath(`cache/${path2 || ""}`);
31
36
  }
32
- export function chatPath(path2) {
37
+ function chatPath(path2) {
33
38
  return corePath(`chat/${path2 || ""}`);
34
39
  }
35
- export function cliPath(path2) {
40
+ function cliPath(path2) {
36
41
  return corePath(`cli/${path2 || ""}`);
37
42
  }
38
- export function collectionsPath(path2) {
43
+ function cloudPath(path2) {
44
+ return corePath(`cloud/${path2 || ""}`);
45
+ }
46
+ function collectionsPath(path2) {
39
47
  return corePath(`collections/${path2 || ""}`);
40
48
  }
41
- export function componentsPath(path2) {
49
+ function componentsPath(path2) {
42
50
  return projectPath(`components/${path2 || ""}`);
43
51
  }
44
- export function configPath(path2) {
52
+ function configPath(path2) {
45
53
  return corePath(`config/${path2 || ""}`);
46
54
  }
47
- export function corePath(path2) {
55
+ function userConfigPath(path2) {
56
+ return projectPath(`config/${path2 || ""}`);
57
+ }
58
+ function corePath(path2) {
48
59
  return frameworkPath(`core/${path2 || ""}`);
49
60
  }
50
- export function dashboardPath(path2) {
61
+ function dashboardPath(path2) {
51
62
  return corePath(`dashboard/${path2 || ""}`);
52
63
  }
53
- export function desktopPath(path2) {
64
+ function databasePath(path2) {
65
+ return corePath(`database/${path2 || ""}`);
66
+ }
67
+ function developmentPath(path2) {
68
+ return corePath(`development/${path2 || ""}`);
69
+ }
70
+ function desktopPath(path2) {
54
71
  return corePath(`desktop/${path2 || ""}`);
55
72
  }
56
- export function docsPath(path2) {
73
+ function docsPath(path2) {
57
74
  return corePath(`docs/${path2 || ""}`);
58
75
  }
59
- export function domainsPath(path2) {
76
+ function domainsPath(path2) {
60
77
  return corePath(`domains/${path2 || ""}`);
61
78
  }
62
- export function driversPath(path2) {
63
- return corePath(`drivers/${path2 || ""}`);
64
- }
65
- export function customElementsDataPath() {
79
+ function customElementsDataPath() {
66
80
  return frameworkPath("custom-elements.json");
67
81
  }
68
- export function emailPath(path2) {
82
+ function emailPath(path2) {
69
83
  return corePath(`email/${path2 || ""}`);
70
84
  }
71
- export function errorHandlingPath(path2) {
85
+ function errorHandlingPath(path2) {
72
86
  return corePath(`error-handling/${path2 || ""}`);
73
87
  }
74
- export function examplesPath(type) {
88
+ function eventsPath(path2) {
89
+ return corePath(`events/${path2 || ""}`);
90
+ }
91
+ function fakerPath(path2) {
92
+ return corePath(`faker/${path2 || ""}`);
93
+ }
94
+ function healthPath(path2) {
95
+ return corePath(`health/${path2 || ""}`);
96
+ }
97
+ function examplesPath(type) {
75
98
  return frameworkPath(`examples/${type || ""}`);
76
99
  }
77
- export function frameworkPath(path2) {
100
+ function frameworkPath(path2) {
78
101
  return projectPath(`.stacks/${path2 || ""}`);
79
102
  }
80
- export function fsPath(path2) {
103
+ function storagePath(path2) {
81
104
  return corePath(`storage/${path2 || ""}`);
82
105
  }
83
- export function functionsPath(path2) {
106
+ function functionsPath(path2) {
84
107
  return projectPath(`functions/${path2 || ""}`);
85
108
  }
86
- export function gitPath(path2) {
109
+ function gitPath(path2) {
87
110
  return corePath(`git/${path2 || ""}`);
88
111
  }
89
- export function langPath(path2) {
112
+ function langPath(path2) {
90
113
  return projectPath(`lang/${path2 || ""}`);
91
114
  }
92
- export function libraryEntryPath(type) {
115
+ function libraryEntryPath(type) {
93
116
  return buildEntriesPath(`${type}.ts`);
94
117
  }
95
- export function lintPath(path2) {
118
+ function lintPath(path2) {
96
119
  return corePath(`lint/${path2 || ""}`);
97
120
  }
98
- export function loggingPath(path2) {
121
+ function loggingPath(path2) {
99
122
  return corePath(`logging/${path2 || ""}`);
100
123
  }
101
- export function xRayPath(path2) {
124
+ function xRayPath(path2) {
102
125
  return corePath(`x-ray/${path2 || ""}`);
103
126
  }
104
- export function modulesPath(path2) {
127
+ function modelsPath(path2) {
128
+ return appPath(`models/${path2 || ""}`);
129
+ }
130
+ function modulesPath(path2) {
105
131
  return corePath(`modules/${path2 || ""}`);
106
132
  }
107
- export function notificationsPath(path2) {
133
+ function notificationsPath(path2) {
108
134
  return corePath(`notifications/${path2 || ""}`);
109
135
  }
110
- export function objectsPath(path2) {
136
+ function ormPath(path2) {
137
+ return corePath(`orm/${path2 || ""}`);
138
+ }
139
+ function objectsPath(path2) {
111
140
  return corePath(`objects/${path2 || ""}`);
112
141
  }
113
- export function packageJsonPath(type) {
142
+ function onboardingPath(path2) {
143
+ return projectPath(`${path2 || "pages/dashboard/onboarding"}`);
144
+ }
145
+ function packageJsonPath(type) {
114
146
  if (type === "vue-components")
115
147
  return frameworkPath("components/vue/package.json");
116
148
  if (type === "web-components")
@@ -119,13 +151,16 @@ export function packageJsonPath(type) {
119
151
  return frameworkPath("functions/package.json");
120
152
  return frameworkPath(`${type}/package.json`);
121
153
  }
122
- export function pagesPath(path2) {
123
- return projectPath(`pages/${path2 || ""}`);
154
+ function pagesPath(path2) {
155
+ return appPath(`pages/${path2 || ""}`);
124
156
  }
125
- export function pathPath(path2) {
157
+ function pathPath(path2) {
126
158
  return corePath(`path/${path2 || ""}`);
127
159
  }
128
- export function projectPath(filePath = "") {
160
+ function paymentsPath(path2) {
161
+ return corePath(`payments/${path2 || ""}`);
162
+ }
163
+ function projectPath(filePath = "") {
129
164
  let path2 = process.cwd();
130
165
  if (path2.includes(".stacks"))
131
166
  path2 = resolve(path2, "..");
@@ -137,62 +172,84 @@ export function projectPath(filePath = "") {
137
172
  path2 = resolve(path2, ".");
138
173
  return resolve(path2, filePath);
139
174
  }
140
- export function pushPath(path2) {
175
+ function pushPath(path2) {
141
176
  return corePath(`push/${path2 || ""}`);
142
177
  }
143
- export function routerPath(path2) {
178
+ function queryBuilderPath(path2) {
179
+ return corePath(`query-builder/${path2 || ""}`);
180
+ }
181
+ function queuePath(path2) {
182
+ return corePath(`queue/${path2 || ""}`);
183
+ }
184
+ function realtimePath(path2) {
185
+ return corePath(`realtime/${path2 || ""}`);
186
+ }
187
+ function routerPath(path2) {
144
188
  return corePath(`router/${path2 || ""}`);
145
189
  }
146
- export function searchEnginePath(path2) {
190
+ function searchEnginePath(path2) {
147
191
  return corePath(`search-engine/${path2 || ""}`);
148
192
  }
149
- export function smsPath(path2) {
193
+ function settingsPath(path2) {
194
+ return projectPath(`${path2 || "pages/dashboard/settings"}`);
195
+ }
196
+ function smsPath(path2) {
150
197
  return corePath(`sms/${path2 || ""}`);
151
198
  }
152
- export function routesPath(path2) {
199
+ function schedulerPath(path2) {
200
+ return corePath(`scheduler/${path2 || ""}`);
201
+ }
202
+ function signalsPath(path2) {
203
+ return corePath(`signals/${path2 || ""}`);
204
+ }
205
+ function routesPath(path2) {
153
206
  return projectPath(`routes/${path2 || ""}`);
154
207
  }
155
- export function securityPath(path2) {
208
+ function securityPath(path2) {
156
209
  return corePath(`security/${path2 || ""}`);
157
210
  }
158
- export function serverPath(path2) {
211
+ function serverPath(path2) {
159
212
  return corePath(`server/${path2 || ""}`);
160
213
  }
161
- export function serverlessPath(path2) {
214
+ function serverlessPath(path2) {
162
215
  return corePath(`serverless/${path2 || ""}`);
163
216
  }
164
- export function stacksPath(path2) {
217
+ function stacksPath(path2) {
165
218
  return frameworkPath(`src/${path2 || ""}`);
166
219
  }
167
- export function tablesPath(path2) {
220
+ function tablesPath(path2) {
168
221
  return corePath(`tables/${path2 || ""}`);
169
222
  }
170
- export function testingPath(path2) {
223
+ function testingPath(path2) {
171
224
  return corePath(`testing/${path2 || ""}`);
172
225
  }
173
- export function testsPath(path2) {
226
+ function testsPath(path2) {
174
227
  return frameworkPath(`tests/${path2 || ""}`);
175
228
  }
176
- export function typesPath(path2) {
229
+ function typesPath(path2) {
177
230
  return corePath(`types/${path2 || ""}`);
178
231
  }
179
- export function stringsPath(path2) {
232
+ function stringsPath(path2) {
180
233
  return corePath(`strings/${path2 || ""}`);
181
234
  }
182
- export function scriptsPath(path2) {
235
+ function scriptsPath(path2) {
183
236
  return frameworkPath(`scripts/${path2 || ""}`);
184
237
  }
185
- export function uiPath(path2) {
238
+ function uiPath(path2) {
186
239
  return corePath(`ui/${path2 || ""}`);
187
240
  }
188
- export function utilsPath(path2) {
241
+ function utilsPath(path2) {
189
242
  return corePath(`utils/${path2 || ""}`);
190
243
  }
191
- export const path = {
244
+ function validationPath(path2) {
245
+ return corePath(`validation/${path2 || ""}`);
246
+ }
247
+ const path = {
192
248
  aiPath,
193
249
  actionsPath,
194
250
  aliasPath,
195
251
  arraysPath,
252
+ appPath,
196
253
  authPath,
197
254
  buildEnginePath,
198
255
  buildEntriesPath,
@@ -200,40 +257,54 @@ export const path = {
200
257
  cachePath,
201
258
  chatPath,
202
259
  cliPath,
260
+ cloudPath,
203
261
  collectionsPath,
204
262
  componentsPath,
205
263
  configPath,
264
+ userConfigPath,
206
265
  corePath,
207
266
  customElementsDataPath,
267
+ databasePath,
268
+ developmentPath,
208
269
  dashboardPath,
209
270
  desktopPath,
210
271
  docsPath,
211
272
  domainsPath,
212
- driversPath,
213
273
  emailPath,
214
274
  errorHandlingPath,
275
+ eventsPath,
276
+ healthPath,
215
277
  examplesPath,
278
+ fakerPath,
216
279
  frameworkPath,
217
- fsPath,
280
+ storagePath,
218
281
  functionsPath,
219
282
  gitPath,
220
283
  langPath,
221
284
  libraryEntryPath,
222
285
  lintPath,
223
286
  loggingPath,
224
- xRayPath,
225
287
  modulesPath,
288
+ ormPath,
226
289
  objectsPath,
290
+ onboardingPath,
227
291
  notificationsPath,
228
292
  packageJsonPath,
229
293
  pagesPath,
230
294
  pathPath,
295
+ paymentsPath,
231
296
  projectPath,
232
297
  pushPath,
298
+ queryBuilderPath,
299
+ queuePath,
300
+ realtimePath,
233
301
  routerPath,
302
+ routesPath,
234
303
  searchEnginePath,
304
+ schedulerPath,
305
+ settingsPath,
235
306
  smsPath,
236
- routesPath,
307
+ signalsPath,
237
308
  scriptsPath,
238
309
  securityPath,
239
310
  serverPath,
@@ -246,6 +317,8 @@ export const path = {
246
317
  typesPath,
247
318
  uiPath,
248
319
  utilsPath,
320
+ validationPath,
321
+ xRayPath,
249
322
  // path utils
250
323
  basename,
251
324
  delimiter,
@@ -262,5 +335,5 @@ export const path = {
262
335
  sep,
263
336
  toNamespacedPath
264
337
  };
265
- export { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse, relative, resolve, sep, toNamespacedPath };
266
- export default path;
338
+
339
+ export { actionsPath, aiPath, aliasPath, appPath, arraysPath, authPath, buildEnginePath, buildEntriesPath, buildPath, cachePath, chatPath, cliPath, cloudPath, collectionsPath, componentsPath, configPath, corePath, customElementsDataPath, dashboardPath, databasePath, desktopPath, developmentPath, docsPath, domainsPath, emailPath, errorHandlingPath, eventsPath, examplesPath, fakerPath, frameworkPath, functionsPath, gitPath, healthPath, langPath, libraryEntryPath, lintPath, loggingPath, modelsPath, modulesPath, notificationsPath, objectsPath, onboardingPath, ormPath, packageJsonPath, pagesPath, path, pathPath, paymentsPath, projectPath, pushPath, queryBuilderPath, queuePath, realtimePath, routerPath, routesPath, runtimePath, schedulerPath, scriptsPath, searchEnginePath, securityPath, serverPath, serverlessPath, settingsPath, signalsPath, smsPath, stacksPath, storagePath, stringsPath, tablesPath, testingPath, testsPath, typesPath, uiPath, userConfigPath, utilsPath, validationPath, xRayPath };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/path",
3
3
  "type": "module",
4
- "version": "0.50.0",
5
- "packageManager": "pnpm@7.25.1",
4
+ "version": "0.52.0",
5
+ "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks path.",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -24,6 +24,13 @@
24
24
  "functions",
25
25
  "stacks"
26
26
  ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "require": "./dist/index.cjs",
31
+ "import": "./dist/index.mjs"
32
+ }
33
+ },
27
34
  "main": "dist/index.mjs",
28
35
  "module": "dist/index.mjs",
29
36
  "types": "dist/index.d.ts",
@@ -34,21 +41,16 @@
34
41
  "dist",
35
42
  "README.md"
36
43
  ],
37
- "engines": {
38
- "node": ">=v18.13.0",
39
- "pnpm": ">=7.25.1"
40
- },
41
44
  "dependencies": {
42
45
  "pathe": "^1.1.0"
43
46
  },
44
47
  "devDependencies": {
45
- "mkdist": "^1.1.0",
46
- "typescript": "^4.9.4",
47
- "@stacksjs/testing": "0.50.0"
48
+ "@stacksjs/alias": "0.52.0",
49
+ "@stacksjs/development": "0.52.0"
48
50
  },
49
51
  "scripts": {
50
- "build": "mkdist -d",
51
- "dev": "mkdist -d",
52
+ "build": "unbuild",
53
+ "dev": "unbuild --stub",
52
54
  "typecheck": "tsc --noEmit"
53
55
  }
54
56
  }