@stacksjs/path 0.62.0 → 0.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -641
- package/dist/index.js.map +10 -0
- package/package.json +1 -1
- package/src/index.ts +1399 -3
- package/src/paths.ts +0 -1391
package/dist/index.js
CHANGED
|
@@ -1,643 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// src/paths.ts
|
|
3
|
-
import os from "os";
|
|
4
|
-
import {
|
|
5
|
-
basename,
|
|
6
|
-
delimiter,
|
|
7
|
-
dirname,
|
|
8
|
-
extname,
|
|
9
|
-
isAbsolute,
|
|
10
|
-
join,
|
|
11
|
-
normalize,
|
|
12
|
-
parse,
|
|
13
|
-
relative,
|
|
14
|
-
resolve,
|
|
15
|
-
sep,
|
|
16
|
-
toNamespacedPath
|
|
17
|
-
} from "path";
|
|
18
|
-
import process from "process";
|
|
19
|
-
import {runCommandSync} from "@stacksjs/cli";
|
|
20
|
-
import {log} from "@stacksjs/logging";
|
|
21
|
-
function actionsPath(path) {
|
|
22
|
-
return corePath(`actions/${path || ""}`);
|
|
23
|
-
}
|
|
24
|
-
function relativeActionsPath(path) {
|
|
25
|
-
return relative(projectPath(), actionsPath(path));
|
|
26
|
-
}
|
|
27
|
-
function userActionsPath(path) {
|
|
28
|
-
return appPath(`Actions/${path || ""}`);
|
|
29
|
-
}
|
|
30
|
-
function userComponentsPath(path) {
|
|
31
|
-
return libsPath(`components/${path || ""}`);
|
|
32
|
-
}
|
|
33
|
-
function userViewsPath(path) {
|
|
34
|
-
return resourcesPath(`views/${path || ""}`);
|
|
35
|
-
}
|
|
36
|
-
function userFunctionsPath(path) {
|
|
37
|
-
return resourcesPath(`functions/${path || ""}`);
|
|
38
|
-
}
|
|
39
|
-
function userJobsPath(path) {
|
|
40
|
-
return appPath(`Jobs/${path || ""}`);
|
|
41
|
-
}
|
|
42
|
-
function userListenersPath(path) {
|
|
43
|
-
return appPath(`Listeners/${path || ""}`);
|
|
44
|
-
}
|
|
45
|
-
function userMiddlewarePath(path) {
|
|
46
|
-
return appPath(`Middleware/${path || ""}`);
|
|
47
|
-
}
|
|
48
|
-
function userModelsPath(path) {
|
|
49
|
-
return appPath(`Models/${path || ""}`);
|
|
50
|
-
}
|
|
51
|
-
function userNotificationsPath(path) {
|
|
52
|
-
return appPath(`Notifications/${path || ""}`);
|
|
53
|
-
}
|
|
54
|
-
function userDatabasePath(path) {
|
|
55
|
-
return projectPath(`database/${path || ""}`);
|
|
56
|
-
}
|
|
57
|
-
function userMigrationsPath(path) {
|
|
58
|
-
return userDatabasePath(`migrations/${path || ""}`);
|
|
59
|
-
}
|
|
60
|
-
function userEventsPath() {
|
|
61
|
-
return appPath(`Events.ts`);
|
|
62
|
-
}
|
|
63
|
-
function aiPath(path) {
|
|
64
|
-
return corePath(`ai/${path || ""}`);
|
|
65
|
-
}
|
|
66
|
-
function assetsPath(path) {
|
|
67
|
-
return resourcesPath(`assets/${path || ""}`);
|
|
68
|
-
}
|
|
69
|
-
function aliasPath() {
|
|
70
|
-
return corePath("alias/src/index.ts");
|
|
71
|
-
}
|
|
72
|
-
function buddyPath(path, options) {
|
|
73
|
-
const absolutePath = corePath(`buddy/${path || ""}`);
|
|
74
|
-
if (options?.relative)
|
|
75
|
-
return relative(process.cwd(), absolutePath);
|
|
76
|
-
return absolutePath;
|
|
77
|
-
}
|
|
78
|
-
function runtimePath(path) {
|
|
79
|
-
return frameworkPath(`buddy/${path || ""}`);
|
|
80
|
-
}
|
|
81
|
-
function analyticsPath(path) {
|
|
82
|
-
return corePath(`analytics/${path || ""}`);
|
|
83
|
-
}
|
|
84
|
-
function arraysPath(path) {
|
|
85
|
-
return corePath(`arrays/${path || ""}`);
|
|
86
|
-
}
|
|
87
|
-
function appPath(path) {
|
|
88
|
-
return projectPath(`app/${path || ""}`);
|
|
89
|
-
}
|
|
90
|
-
function authPath(path) {
|
|
91
|
-
return corePath(`auth/${path || ""}`);
|
|
92
|
-
}
|
|
93
|
-
function buildPath(path) {
|
|
94
|
-
return corePath(`build/${path || ""}`);
|
|
95
|
-
}
|
|
96
|
-
function buildEnginePath(path) {
|
|
97
|
-
return buildPath(`${path || ""}`);
|
|
98
|
-
}
|
|
99
|
-
function libsPath(path) {
|
|
100
|
-
return frameworkPath(`libs/${path || ""}`);
|
|
101
|
-
}
|
|
102
|
-
function userLibsPath(path) {
|
|
103
|
-
return resourcesPath(`${path || ""}`);
|
|
104
|
-
}
|
|
105
|
-
function libsEntriesPath(path) {
|
|
106
|
-
return libsPath(`entries/${path || ""}`);
|
|
107
|
-
}
|
|
108
|
-
function cachePath(path) {
|
|
109
|
-
return corePath(`cache/${path || ""}`);
|
|
110
|
-
}
|
|
111
|
-
function chatPath(path) {
|
|
112
|
-
return corePath(`chat/${path || ""}`);
|
|
113
|
-
}
|
|
114
|
-
function cliPath(path) {
|
|
115
|
-
return corePath(`cli/${path || ""}`);
|
|
116
|
-
}
|
|
117
|
-
function cloudPath(path) {
|
|
118
|
-
return corePath(`cloud/${path || ""}`);
|
|
119
|
-
}
|
|
120
|
-
function frameworkCloudPath(path) {
|
|
121
|
-
return frameworkPath(`cloud/${path || ""}`);
|
|
122
|
-
}
|
|
123
|
-
function collectionsPath(path) {
|
|
124
|
-
return corePath(`collections/${path || ""}`);
|
|
125
|
-
}
|
|
126
|
-
function commandsPath(path) {
|
|
127
|
-
return appPath(`Commands/${path || ""}`);
|
|
128
|
-
}
|
|
129
|
-
function componentsPath(path) {
|
|
130
|
-
return userLibsPath(`components/${path || ""}`);
|
|
131
|
-
}
|
|
132
|
-
function configPath(path) {
|
|
133
|
-
return corePath(`config/${path || ""}`);
|
|
134
|
-
}
|
|
135
|
-
function corePath(path) {
|
|
136
|
-
return frameworkPath(`core/${path || ""}`);
|
|
137
|
-
}
|
|
138
|
-
function customElementsDataPath() {
|
|
139
|
-
return frameworkPath("core/custom-elements.json");
|
|
140
|
-
}
|
|
141
|
-
function databasePath(path) {
|
|
142
|
-
return corePath(`database/${path || ""}`);
|
|
143
|
-
}
|
|
144
|
-
function datetimePath(path) {
|
|
145
|
-
return corePath(`datetime/${path || ""}`);
|
|
146
|
-
}
|
|
147
|
-
function developmentPath(path) {
|
|
148
|
-
return corePath(`development/${path || ""}`);
|
|
149
|
-
}
|
|
150
|
-
function desktopPath(path) {
|
|
151
|
-
return corePath(`desktop/${path || ""}`);
|
|
152
|
-
}
|
|
153
|
-
function docsPath(path) {
|
|
154
|
-
return corePath(`docs/${path || ""}`);
|
|
155
|
-
}
|
|
156
|
-
function dnsPath(path) {
|
|
157
|
-
return corePath(`domains/${path || ""}`);
|
|
158
|
-
}
|
|
159
|
-
function emailPath(path) {
|
|
160
|
-
return notificationsPath(`email/${path || ""}`);
|
|
161
|
-
}
|
|
162
|
-
function enumsPath(path) {
|
|
163
|
-
return corePath(`enums/${path || ""}`);
|
|
164
|
-
}
|
|
165
|
-
function errorHandlingPath(path) {
|
|
166
|
-
return corePath(`error-handling/${path || ""}`);
|
|
167
|
-
}
|
|
168
|
-
function eventsPath(path) {
|
|
169
|
-
return corePath(`events/${path || ""}`);
|
|
170
|
-
}
|
|
171
|
-
function coreEnvPath(path) {
|
|
172
|
-
return corePath(`env/${path || ""}`);
|
|
173
|
-
}
|
|
174
|
-
function examplesPath(type) {
|
|
175
|
-
return frameworkPath(`examples/${type || ""}`);
|
|
176
|
-
}
|
|
177
|
-
function fakerPath(path) {
|
|
178
|
-
return corePath(`faker/${path || ""}`);
|
|
179
|
-
}
|
|
180
|
-
function frameworkPath(path, options) {
|
|
181
|
-
const absolutePath = projectStoragePath(`framework/${path || ""}`);
|
|
182
|
-
if (options?.relative)
|
|
183
|
-
return relative(options.cwd || process.cwd(), absolutePath);
|
|
184
|
-
return absolutePath;
|
|
185
|
-
}
|
|
186
|
-
function healthPath(path) {
|
|
187
|
-
return corePath(`health/${path || ""}`);
|
|
188
|
-
}
|
|
189
|
-
function functionsPath(path) {
|
|
190
|
-
return userLibsPath(`functions/${path || ""}`);
|
|
191
|
-
}
|
|
192
|
-
function gitPath(path) {
|
|
193
|
-
return corePath(`git/${path || ""}`);
|
|
194
|
-
}
|
|
195
|
-
function langPath(path) {
|
|
196
|
-
return resourcesPath(`lang/${path || ""}`);
|
|
197
|
-
}
|
|
198
|
-
function layoutsPath(path, options) {
|
|
199
|
-
const absolutePath = resourcesPath(`layouts/${path || ""}`);
|
|
200
|
-
if (options?.relative)
|
|
201
|
-
return relative(process.cwd(), absolutePath);
|
|
202
|
-
return absolutePath;
|
|
203
|
-
}
|
|
204
|
-
function libraryEntryPath(type) {
|
|
205
|
-
return libsEntriesPath(`${type}.ts`);
|
|
206
|
-
}
|
|
207
|
-
function lintPath(path) {
|
|
208
|
-
return corePath(`lint/${path || ""}`);
|
|
209
|
-
}
|
|
210
|
-
function listenersPath(path) {
|
|
211
|
-
return appPath(`Listeners/${path || ""}`);
|
|
212
|
-
}
|
|
213
|
-
function jobsPath(path) {
|
|
214
|
-
return appPath(`Jobs/${path || ""}`);
|
|
215
|
-
}
|
|
216
|
-
function loggingPath(path) {
|
|
217
|
-
return corePath(`logging/${path || ""}`);
|
|
218
|
-
}
|
|
219
|
-
function logsPath(path) {
|
|
220
|
-
return projectStoragePath(`logs/${path || ""}`);
|
|
221
|
-
}
|
|
222
|
-
function modelsPath(path) {
|
|
223
|
-
return appPath(`models/${path || ""}`);
|
|
224
|
-
}
|
|
225
|
-
function modulesPath(path) {
|
|
226
|
-
return resourcesPath(`modules/${path || ""}`);
|
|
227
|
-
}
|
|
228
|
-
function notificationsPath(path) {
|
|
229
|
-
return corePath(`notifications/${path || ""}`);
|
|
230
|
-
}
|
|
231
|
-
function ormPath(path) {
|
|
232
|
-
return corePath(`orm/${path || ""}`);
|
|
233
|
-
}
|
|
234
|
-
function objectsPath(path) {
|
|
235
|
-
return corePath(`objects/${path || ""}`);
|
|
236
|
-
}
|
|
237
|
-
function onboardingPath(path) {
|
|
238
|
-
return projectPath(`${path || "views/dashboard/onboarding"}`);
|
|
239
|
-
}
|
|
240
|
-
function packageJsonPath(type) {
|
|
241
|
-
if (type === "vue-components")
|
|
242
|
-
return frameworkPath("libs/components/vue/package.json");
|
|
243
|
-
if (type === "web-components")
|
|
244
|
-
return frameworkPath("libs/components/web/package.json");
|
|
245
|
-
return frameworkPath(`libs/${type}/package.json`);
|
|
246
|
-
}
|
|
247
|
-
function viewsPath(path) {
|
|
248
|
-
return resourcesPath(`views/${path || ""}`);
|
|
249
|
-
}
|
|
250
|
-
function pathPath(path) {
|
|
251
|
-
return corePath(`path/${path || ""}`);
|
|
252
|
-
}
|
|
253
|
-
function paymentsPath(path) {
|
|
254
|
-
return corePath(`payments/${path || ""}`);
|
|
255
|
-
}
|
|
256
|
-
function projectPath(filePath = "", options) {
|
|
257
|
-
let path = process.cwd();
|
|
258
|
-
while (path.includes("storage"))
|
|
259
|
-
path = resolve(path, "..");
|
|
260
|
-
const finalPath = resolve(path, filePath);
|
|
261
|
-
if (options?.relative)
|
|
262
|
-
return relative(process.cwd(), finalPath);
|
|
263
|
-
return finalPath;
|
|
264
|
-
}
|
|
265
|
-
async function findProjectPath(project) {
|
|
266
|
-
const projectList = await runCommandSync("buddy projects:list --quiet");
|
|
267
|
-
log.debug("ProjectList in findProjectPath", projectList);
|
|
268
|
-
const projects = projectList.split("\n").filter((line) => line.startsWith(" - ")).map((line) => line.trim().substring(4));
|
|
269
|
-
log.debug("Projects in findProjectPath:", projects);
|
|
270
|
-
const projectPath2 = projects.find((proj) => proj.includes(project));
|
|
271
|
-
if (!projectPath2)
|
|
272
|
-
throw new Error(`Could not find project with name: ${project}`);
|
|
273
|
-
return projectPath2.startsWith("/") ? projectPath2 : `/${projectPath2}`;
|
|
274
|
-
}
|
|
275
|
-
function projectConfigPath(path) {
|
|
276
|
-
return projectPath(`config/${path || ""}`);
|
|
277
|
-
}
|
|
278
|
-
function projectStoragePath(path) {
|
|
279
|
-
return projectPath(`storage/${path || ""}`);
|
|
280
|
-
}
|
|
281
|
-
function publicPath(path) {
|
|
282
|
-
return projectPath(`public/${path || ""}`);
|
|
283
|
-
}
|
|
284
|
-
function pushPath(path) {
|
|
285
|
-
return notificationsPath(`push/${path || ""}`);
|
|
286
|
-
}
|
|
287
|
-
function queryBuilderPath(path) {
|
|
288
|
-
return corePath(`query-builder/${path || ""}`);
|
|
289
|
-
}
|
|
290
|
-
function queuePath(path) {
|
|
291
|
-
return corePath(`queue/${path || ""}`);
|
|
292
|
-
}
|
|
293
|
-
function realtimePath(path) {
|
|
294
|
-
return corePath(`realtime/${path || ""}`);
|
|
295
|
-
}
|
|
296
|
-
function resourcesPath(path, options) {
|
|
297
|
-
const absolutePath = projectStoragePath(`resources/${path || ""}`);
|
|
298
|
-
if (options?.relative)
|
|
299
|
-
return relative(process.cwd(), absolutePath);
|
|
300
|
-
return projectPath(`resources/${path || ""}`);
|
|
301
|
-
}
|
|
302
|
-
function replPath(path) {
|
|
303
|
-
return corePath(`repl/${path || ""}`);
|
|
304
|
-
}
|
|
305
|
-
function routerPath(path) {
|
|
306
|
-
return corePath(`router/${path || ""}`);
|
|
307
|
-
}
|
|
308
|
-
function routesPath(path, options) {
|
|
309
|
-
const absolutePath = resourcesPath(`routes/${path || ""}`);
|
|
310
|
-
if (options?.relative)
|
|
311
|
-
return relative(process.cwd(), absolutePath);
|
|
312
|
-
return projectPath(`routes/${path || ""}`);
|
|
313
|
-
}
|
|
314
|
-
function searchEnginePath(path) {
|
|
315
|
-
return corePath(`search-engine/${path || ""}`);
|
|
316
|
-
}
|
|
317
|
-
function settingsPath(path) {
|
|
318
|
-
return projectPath(`${path || "views/dashboard/settings"}`);
|
|
319
|
-
}
|
|
320
|
-
function scriptsPath(path) {
|
|
321
|
-
return frameworkPath(`scripts/${path || ""}`);
|
|
322
|
-
}
|
|
323
|
-
function schedulerPath(path) {
|
|
324
|
-
return corePath(`scheduler/${path || ""}`);
|
|
325
|
-
}
|
|
326
|
-
function slugPath(path) {
|
|
327
|
-
return corePath(`slug/${path || ""}`);
|
|
328
|
-
}
|
|
329
|
-
function smsPath(path) {
|
|
330
|
-
return notificationsPath(`sms/${path || ""}`);
|
|
331
|
-
}
|
|
332
|
-
function storagePath(path) {
|
|
333
|
-
return corePath(`storage/${path || ""}`);
|
|
334
|
-
}
|
|
335
|
-
function storesPath(path) {
|
|
336
|
-
return resourcesPath(`stores/${path || ""}`);
|
|
337
|
-
}
|
|
338
|
-
function securityPath(path) {
|
|
339
|
-
return corePath(`security/${path || ""}`);
|
|
340
|
-
}
|
|
341
|
-
function serverPath(path) {
|
|
342
|
-
return corePath(`server/${path || ""}`);
|
|
343
|
-
}
|
|
344
|
-
function serverlessPath(path) {
|
|
345
|
-
return corePath(`serverless/${path || ""}`);
|
|
346
|
-
}
|
|
347
|
-
function stacksPath(path) {
|
|
348
|
-
return frameworkPath(`src/${path || ""}`);
|
|
349
|
-
}
|
|
350
|
-
function shellPath(path) {
|
|
351
|
-
return corePath(`shell/${path || ""}`);
|
|
352
|
-
}
|
|
353
|
-
function stringsPath(path) {
|
|
354
|
-
return corePath(`strings/${path || ""}`);
|
|
355
|
-
}
|
|
356
|
-
function testingPath(path) {
|
|
357
|
-
return corePath(`testing/${path || ""}`);
|
|
358
|
-
}
|
|
359
|
-
function tinkerPath(path) {
|
|
360
|
-
return corePath(`tinker/${path || ""}`);
|
|
361
|
-
}
|
|
362
|
-
function testsPath(path) {
|
|
363
|
-
return frameworkPath(`tests/${path || ""}`);
|
|
364
|
-
}
|
|
365
|
-
function typesPath(path) {
|
|
366
|
-
return corePath(`types/${path || ""}`);
|
|
367
|
-
}
|
|
368
|
-
function uiPath(path) {
|
|
369
|
-
return corePath(`ui/${path || ""}`);
|
|
370
|
-
}
|
|
371
|
-
function utilsPath(path) {
|
|
372
|
-
return corePath(`utils/${path || ""}`);
|
|
373
|
-
}
|
|
374
|
-
function validationPath(path) {
|
|
375
|
-
return corePath(`validation/${path || ""}`);
|
|
376
|
-
}
|
|
377
|
-
function viteConfigPath(path) {
|
|
378
|
-
return corePath(`vite-config/${path || ""}`);
|
|
379
|
-
}
|
|
380
|
-
function vitePluginPath(path) {
|
|
381
|
-
return corePath(`vite-plugin/${path || ""}`);
|
|
382
|
-
}
|
|
383
|
-
function xRayPath(path) {
|
|
384
|
-
return frameworkPath(`stacks/x-ray/${path || ""}`);
|
|
385
|
-
}
|
|
386
|
-
function homeDir(path) {
|
|
387
|
-
return os.homedir() + (path ? (path.startsWith("/") ? "" : "/") + path : "~");
|
|
388
|
-
}
|
|
389
|
-
var path = {
|
|
390
|
-
actionsPath,
|
|
391
|
-
userActionsPath,
|
|
392
|
-
userComponentsPath,
|
|
393
|
-
userViewsPath,
|
|
394
|
-
userFunctionsPath,
|
|
395
|
-
aiPath,
|
|
396
|
-
assetsPath,
|
|
397
|
-
relativeActionsPath,
|
|
398
|
-
aliasPath,
|
|
399
|
-
analyticsPath,
|
|
400
|
-
arraysPath,
|
|
401
|
-
appPath,
|
|
402
|
-
authPath,
|
|
403
|
-
buddyPath,
|
|
404
|
-
buildEnginePath,
|
|
405
|
-
libsEntriesPath,
|
|
406
|
-
buildPath,
|
|
407
|
-
cachePath,
|
|
408
|
-
chatPath,
|
|
409
|
-
cliPath,
|
|
410
|
-
cloudPath,
|
|
411
|
-
frameworkCloudPath,
|
|
412
|
-
collectionsPath,
|
|
413
|
-
commandsPath,
|
|
414
|
-
componentsPath,
|
|
415
|
-
configPath,
|
|
416
|
-
projectConfigPath,
|
|
417
|
-
corePath,
|
|
418
|
-
customElementsDataPath,
|
|
419
|
-
databasePath,
|
|
420
|
-
datetimePath,
|
|
421
|
-
developmentPath,
|
|
422
|
-
desktopPath,
|
|
423
|
-
docsPath,
|
|
424
|
-
dnsPath,
|
|
425
|
-
emailPath,
|
|
426
|
-
enumsPath,
|
|
427
|
-
errorHandlingPath,
|
|
428
|
-
eventsPath,
|
|
429
|
-
coreEnvPath,
|
|
430
|
-
healthPath,
|
|
431
|
-
examplesPath,
|
|
432
|
-
fakerPath,
|
|
433
|
-
frameworkPath,
|
|
434
|
-
storagePath,
|
|
435
|
-
functionsPath,
|
|
436
|
-
gitPath,
|
|
437
|
-
langPath,
|
|
438
|
-
layoutsPath,
|
|
439
|
-
libsPath,
|
|
440
|
-
userLibsPath,
|
|
441
|
-
libraryEntryPath,
|
|
442
|
-
lintPath,
|
|
443
|
-
listenersPath,
|
|
444
|
-
loggingPath,
|
|
445
|
-
logsPath,
|
|
446
|
-
jobsPath,
|
|
447
|
-
modulesPath,
|
|
448
|
-
ormPath,
|
|
449
|
-
objectsPath,
|
|
450
|
-
onboardingPath,
|
|
451
|
-
notificationsPath,
|
|
452
|
-
packageJsonPath,
|
|
453
|
-
viewsPath,
|
|
454
|
-
pathPath,
|
|
455
|
-
paymentsPath,
|
|
456
|
-
projectPath,
|
|
457
|
-
findProjectPath,
|
|
458
|
-
projectStoragePath,
|
|
459
|
-
publicPath,
|
|
460
|
-
pushPath,
|
|
461
|
-
queryBuilderPath,
|
|
462
|
-
queuePath,
|
|
463
|
-
realtimePath,
|
|
464
|
-
resourcesPath,
|
|
465
|
-
replPath,
|
|
466
|
-
routerPath,
|
|
467
|
-
routesPath,
|
|
468
|
-
runtimePath,
|
|
469
|
-
searchEnginePath,
|
|
470
|
-
schedulerPath,
|
|
471
|
-
settingsPath,
|
|
472
|
-
smsPath,
|
|
473
|
-
slugPath,
|
|
474
|
-
scriptsPath,
|
|
475
|
-
securityPath,
|
|
476
|
-
serverPath,
|
|
477
|
-
serverlessPath,
|
|
478
|
-
stacksPath,
|
|
479
|
-
stringsPath,
|
|
480
|
-
shellPath,
|
|
481
|
-
storesPath,
|
|
482
|
-
testingPath,
|
|
483
|
-
testsPath,
|
|
484
|
-
tinkerPath,
|
|
485
|
-
typesPath,
|
|
486
|
-
uiPath,
|
|
487
|
-
userDatabasePath,
|
|
488
|
-
userMigrationsPath,
|
|
489
|
-
userEventsPath,
|
|
490
|
-
userJobsPath,
|
|
491
|
-
userListenersPath,
|
|
492
|
-
userMiddlewarePath,
|
|
493
|
-
userModelsPath,
|
|
494
|
-
userNotificationsPath,
|
|
495
|
-
utilsPath,
|
|
496
|
-
validationPath,
|
|
497
|
-
viteConfigPath,
|
|
498
|
-
vitePluginPath,
|
|
499
|
-
xRayPath,
|
|
500
|
-
homeDir,
|
|
501
|
-
basename,
|
|
502
|
-
delimiter,
|
|
503
|
-
dirname,
|
|
504
|
-
extname,
|
|
505
|
-
isAbsolute,
|
|
506
|
-
join,
|
|
507
|
-
normalize,
|
|
508
|
-
relative,
|
|
509
|
-
resolve,
|
|
510
|
-
parse,
|
|
511
|
-
sep,
|
|
512
|
-
toNamespacedPath
|
|
513
|
-
};
|
|
2
|
+
import N from"os";import{basename as x,delimiter as D,dirname as A,extname as C,isAbsolute as L,join as S,normalize as E,parse as w,relative as Z,resolve as U,sep as k,toNamespacedPath as v}from"path";import $ from"process";import{runCommandSync as y}from"@stacksjs/cli";import{log as z}from"@stacksjs/logging";function J(G){return I(`actions/${G||""}`)}function g(G){return Z(X(),J(G))}function f(G){return W(`Actions/${G||""}`)}function b(G){return O(`actions/${G||""}`)}function j(G){return V(`components/${G||""}`)}function d(G){return Y(`views/${G||""}`)}function m(G){return Y(`functions/${G||""}`)}function u(G){return W(`Jobs/${G||""}`)}function l(G){return W(`Listeners/${G||""}`)}function n(G){return W(`Middleware/${G||""}`)}function i(G){return W(`Models/${G||""}`)}function c(G){return W(`Notifications/${G||""}`)}function R(G){return X(`database/${G||""}`)}function s(G){return R(`migrations/${G||""}`)}function P(){return W("Events.ts")}function r(G){return I(`ai/${G||""}`)}function o(G){return Y(`assets/${G||""}`)}function e(){return I("alias/src/index.ts")}function p(G,Q){const K=I(`buddy/${G||""}`);if(Q?.relative)return Z($.cwd(),K);return K}function h(G){return O(`buddy/${G||""}`)}function a(G){return I(`analytics/${G||""}`)}function t(G){return I(`arrays/${G||""}`)}function W(G){return X(`app/${G||""}`)}function GG(G){return I(`auth/${G||""}`)}function T(G){return I(`build/${G||""}`)}function IG(G){return T(`${G||""}`)}function V(G){return O(`libs/${G||""}`)}function q(G){return Y(`${G||""}`)}function M(G){return V(`entries/${G||""}`)}function KG(G){return I(`cache/${G||""}`)}function OG(G){return I(`chat/${G||""}`)}function QG(G){return I(`cli/${G||""}`)}function WG(G){return I(`cloud/${G||""}`)}function XG(G){return O(`cloud/${G||""}`)}function YG(G){return I(`collections/${G||""}`)}function ZG(G){return W(`Commands/${G||""}`)}function _G(G){return q(`components/${G||""}`)}function $G(G){return I(`config/${G||""}`)}function I(G){return O(`core/${G||""}`)}function BG(){return O("core/custom-elements.json")}function FG(G){return I(`database/${G||""}`)}function HG(G){return I(`datetime/${G||""}`)}function UG(G){return I(`development/${G||""}`)}function VG(G){return I(`desktop/${G||""}`)}function qG(G){return I(`docs/${G||""}`)}function zG(G){return I(`domains/${G||""}`)}function JG(G){return F(`email/${G||""}`)}function RG(G){return I(`enums/${G||""}`)}function TG(G){return I(`error-handling/${G||""}`)}function MG(G){return I(`events/${G||""}`)}function NG(G){return I(`env/${G||""}`)}function xG(G){return O(`examples/${G||""}`)}function DG(G){return I(`faker/${G||""}`)}function O(G,Q){const K=H(`framework/${G||""}`);if(Q?.relative)return Z(Q.cwd||$.cwd(),K);return K}function AG(G){return I(`health/${G||""}`)}function CG(G){return q(`functions/${G||""}`)}function LG(G){return I(`git/${G||""}`)}function SG(G){return Y(`lang/${G||""}`)}function EG(G,Q){const K=Y(`layouts/${G||""}`);if(Q?.relative)return Z($.cwd(),K);return K}function wG(G){return M(`${G}.ts`)}function kG(G){return I(`lint/${G||""}`)}function vG(G){return W(`Listeners/${G||""}`)}function yG(G){return W(`Jobs/${G||""}`)}function gG(G){return I(`logging/${G||""}`)}function fG(G){return H(`logs/${G||""}`)}function kI(G){return W(`models/${G||""}`)}function bG(G){return Y(`modules/${G||""}`)}function F(G){return I(`notifications/${G||""}`)}function jG(G){return I(`orm/${G||""}`)}function dG(G){return I(`objects/${G||""}`)}function mG(G){return X(`${G||"views/dashboard/onboarding"}`)}function uG(G){if(G==="vue-components")return O("libs/components/vue/package.json");if(G==="web-components")return O("libs/components/web/package.json");return O(`libs/${G}/package.json`)}function lG(G){return Y(`views/${G||""}`)}function nG(G){return I(`path/${G||""}`)}function iG(G){return I(`payments/${G||""}`)}function X(G="",Q){let K=$.cwd();while(K.includes("storage"))K=U(K,"..");const _=U(K,G);if(Q?.relative)return Z($.cwd(),_);return _}async function cG(G){const Q=await y("buddy projects:list --quiet");z.debug("ProjectList in findProjectPath",Q);const K=Q.split("\n").filter((B)=>B.startsWith(" - ")).map((B)=>B.trim().substring(4));z.debug("Projects in findProjectPath:",K);const _=K.find((B)=>B.includes(G));if(!_)throw new Error(`Could not find project with name: ${G}`);return _.startsWith("/")?_:`/${_}`}function sG(G){return X(`config/${G||""}`)}function H(G){return X(`storage/${G||""}`)}function PG(G){return X(`public/${G||""}`)}function rG(G){return F(`push/${G||""}`)}function oG(G){return I(`query-builder/${G||""}`)}function eG(G){return I(`queue/${G||""}`)}function pG(G){return I(`realtime/${G||""}`)}function Y(G,Q){const K=H(`resources/${G||""}`);if(Q?.relative)return Z($.cwd(),K);return X(`resources/${G||""}`)}function hG(G){return I(`repl/${G||""}`)}function aG(G){return I(`router/${G||""}`)}function tG(G,Q){const K=Y(`routes/${G||""}`);if(Q?.relative)return Z($.cwd(),K);return X(`routes/${G||""}`)}function GI(G){return I(`search-engine/${G||""}`)}function II(G){return X(`${G||"views/dashboard/settings"}`)}function KI(G){return O(`scripts/${G||""}`)}function OI(G){return I(`scheduler/${G||""}`)}function QI(G){return I(`slug/${G||""}`)}function WI(G){return F(`sms/${G||""}`)}function XI(G){return I(`storage/${G||""}`)}function YI(G){return Y(`stores/${G||""}`)}function ZI(G){return I(`security/${G||""}`)}function _I(G){return I(`server/${G||""}`)}function $I(G){return O(`server/${G||""}`)}function BI(G){return I(`serverless/${G||""}`)}function FI(G){return O(`src/${G||""}`)}function HI(G){return I(`shell/${G||""}`)}function UI(G){return I(`strings/${G||""}`)}function VI(G){return I(`testing/${G||""}`)}function qI(G){return I(`tinker/${G||""}`)}function zI(G){return O(`tests/${G||""}`)}function JI(G){return I(`types/${G||""}`)}function RI(G){return I(`ui/${G||""}`)}function TI(G){return I(`utils/${G||""}`)}function MI(G){return I(`validation/${G||""}`)}function NI(G){return I(`vite-config/${G||""}`)}function xI(G){return I(`vite-plugin/${G||""}`)}function DI(G){return O(`stacks/x-ray/${G||""}`)}function AI(G){return N.homedir()+(G?(G.startsWith("/")?"":"/")+G:"~")}var vI={actionsPath:J,userActionsPath:f,builtUserActionsPath:b,userComponentsPath:j,userViewsPath:d,userFunctionsPath:m,aiPath:r,assetsPath:o,relativeActionsPath:g,aliasPath:e,analyticsPath:a,arraysPath:t,appPath:W,authPath:GG,buddyPath:p,buildEnginePath:IG,libsEntriesPath:M,buildPath:T,cachePath:KG,chatPath:OG,cliPath:QG,cloudPath:WG,frameworkCloudPath:XG,collectionsPath:YG,commandsPath:ZG,componentsPath:_G,configPath:$G,projectConfigPath:sG,corePath:I,customElementsDataPath:BG,databasePath:FG,datetimePath:HG,developmentPath:UG,desktopPath:VG,docsPath:qG,dnsPath:zG,emailPath:JG,enumsPath:RG,errorHandlingPath:TG,eventsPath:MG,coreEnvPath:NG,healthPath:AG,examplesPath:xG,fakerPath:DG,frameworkPath:O,storagePath:XI,functionsPath:CG,gitPath:LG,langPath:SG,layoutsPath:EG,libsPath:V,userLibsPath:q,libraryEntryPath:wG,lintPath:kG,listenersPath:vG,loggingPath:gG,logsPath:fG,jobsPath:yG,modulesPath:bG,ormPath:jG,objectsPath:dG,onboardingPath:mG,notificationsPath:F,packageJsonPath:uG,viewsPath:lG,pathPath:nG,paymentsPath:iG,projectPath:X,findProjectPath:cG,projectStoragePath:H,publicPath:PG,pushPath:rG,queryBuilderPath:oG,queuePath:eG,realtimePath:pG,resourcesPath:Y,replPath:hG,routerPath:aG,routesPath:tG,runtimePath:h,searchEnginePath:GI,schedulerPath:OI,settingsPath:II,smsPath:WI,slugPath:QI,scriptsPath:KI,securityPath:ZI,serverPath:_I,userServerPath:$I,serverlessPath:BI,stacksPath:FI,stringsPath:UI,shellPath:HI,storesPath:YI,testingPath:VI,testsPath:zI,tinkerPath:qI,typesPath:JI,uiPath:RI,userDatabasePath:R,userMigrationsPath:s,userEventsPath:P,userJobsPath:u,userListenersPath:l,userMiddlewarePath:n,userModelsPath:i,userNotificationsPath:c,utilsPath:TI,validationPath:MI,viteConfigPath:NI,vitePluginPath:xI,xRayPath:DI,homeDir:AI,basename:x,delimiter:D,dirname:A,extname:C,isAbsolute:L,join:S,normalize:E,relative:Z,resolve:U,parse:w,sep:k,toNamespacedPath:v};export{DI as xRayPath,xI as vitePluginPath,NI as viteConfigPath,lG as viewsPath,MI as validationPath,TI as utilsPath,d as userViewsPath,$I as userServerPath,c as userNotificationsPath,i as userModelsPath,s as userMigrationsPath,n as userMiddlewarePath,l as userListenersPath,q as userLibsPath,u as userJobsPath,m as userFunctionsPath,P as userEventsPath,R as userDatabasePath,j as userComponentsPath,f as userActionsPath,RI as uiPath,JI as typesPath,v as toNamespacedPath,qI as tinkerPath,zI as testsPath,VI as testingPath,UI as stringsPath,YI as storesPath,XI as storagePath,FI as stacksPath,WI as smsPath,QI as slugPath,HI as shellPath,II as settingsPath,BI as serverlessPath,_I as serverPath,k as sep,ZI as securityPath,GI as searchEnginePath,KI as scriptsPath,OI as schedulerPath,h as runtimePath,tG as routesPath,aG as routerPath,Y as resourcesPath,U as resolve,hG as replPath,g as relativeActionsPath,Z as relative,pG as realtimePath,eG as queuePath,oG as queryBuilderPath,rG as pushPath,PG as publicPath,H as projectStoragePath,X as projectPath,sG as projectConfigPath,iG as paymentsPath,nG as pathPath,vI as path,uG as packageJsonPath,jG as ormPath,mG as onboardingPath,dG as objectsPath,F as notificationsPath,E as normalize,bG as modulesPath,kI as modelsPath,fG as logsPath,gG as loggingPath,vG as listenersPath,kG as lintPath,V as libsPath,M as libsEntriesPath,wG as libraryEntryPath,EG as layoutsPath,SG as langPath,S as join,yG as jobsPath,L as isAbsolute,AI as homeDir,AG as healthPath,LG as gitPath,CG as functionsPath,O as frameworkPath,XG as frameworkCloudPath,cG as findProjectPath,DG as fakerPath,C as extname,xG as examplesPath,MG as eventsPath,TG as errorHandlingPath,RG as enumsPath,JG as emailPath,qG as docsPath,zG as dnsPath,A as dirname,UG as developmentPath,VG as desktopPath,D as delimiter,HG as datetimePath,FG as databasePath,BG as customElementsDataPath,I as corePath,NG as coreEnvPath,$G as configPath,_G as componentsPath,ZG as commandsPath,YG as collectionsPath,WG as cloudPath,QG as cliPath,OG as chatPath,KG as cachePath,b as builtUserActionsPath,T as buildPath,IG as buildEnginePath,p as buddyPath,x as basename,GG as authPath,o as assetsPath,t as arraysPath,W as appPath,a as analyticsPath,e as aliasPath,r as aiPath,J as actionsPath};
|
|
514
3
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
export {
|
|
518
|
-
xRayPath,
|
|
519
|
-
vitePluginPath,
|
|
520
|
-
viteConfigPath,
|
|
521
|
-
viewsPath,
|
|
522
|
-
validationPath,
|
|
523
|
-
utilsPath,
|
|
524
|
-
userViewsPath,
|
|
525
|
-
userNotificationsPath,
|
|
526
|
-
userModelsPath,
|
|
527
|
-
userMigrationsPath,
|
|
528
|
-
userMiddlewarePath,
|
|
529
|
-
userListenersPath,
|
|
530
|
-
userLibsPath,
|
|
531
|
-
userJobsPath,
|
|
532
|
-
userFunctionsPath,
|
|
533
|
-
userEventsPath,
|
|
534
|
-
userDatabasePath,
|
|
535
|
-
userComponentsPath,
|
|
536
|
-
userActionsPath,
|
|
537
|
-
uiPath,
|
|
538
|
-
typesPath,
|
|
539
|
-
toNamespacedPath,
|
|
540
|
-
tinkerPath,
|
|
541
|
-
testsPath,
|
|
542
|
-
testingPath,
|
|
543
|
-
stringsPath,
|
|
544
|
-
storesPath,
|
|
545
|
-
storagePath,
|
|
546
|
-
stacksPath,
|
|
547
|
-
smsPath,
|
|
548
|
-
slugPath,
|
|
549
|
-
shellPath,
|
|
550
|
-
settingsPath,
|
|
551
|
-
serverlessPath,
|
|
552
|
-
serverPath,
|
|
553
|
-
sep,
|
|
554
|
-
securityPath,
|
|
555
|
-
searchEnginePath,
|
|
556
|
-
scriptsPath,
|
|
557
|
-
schedulerPath,
|
|
558
|
-
runtimePath,
|
|
559
|
-
routesPath,
|
|
560
|
-
routerPath,
|
|
561
|
-
resourcesPath,
|
|
562
|
-
resolve,
|
|
563
|
-
replPath,
|
|
564
|
-
relativeActionsPath,
|
|
565
|
-
relative,
|
|
566
|
-
realtimePath,
|
|
567
|
-
queuePath,
|
|
568
|
-
queryBuilderPath,
|
|
569
|
-
pushPath,
|
|
570
|
-
publicPath,
|
|
571
|
-
projectStoragePath,
|
|
572
|
-
projectPath,
|
|
573
|
-
projectConfigPath,
|
|
574
|
-
paymentsPath,
|
|
575
|
-
pathPath,
|
|
576
|
-
path,
|
|
577
|
-
packageJsonPath,
|
|
578
|
-
ormPath,
|
|
579
|
-
onboardingPath,
|
|
580
|
-
objectsPath,
|
|
581
|
-
notificationsPath,
|
|
582
|
-
normalize,
|
|
583
|
-
modulesPath,
|
|
584
|
-
modelsPath,
|
|
585
|
-
logsPath,
|
|
586
|
-
loggingPath,
|
|
587
|
-
listenersPath,
|
|
588
|
-
lintPath,
|
|
589
|
-
libsPath,
|
|
590
|
-
libsEntriesPath,
|
|
591
|
-
libraryEntryPath,
|
|
592
|
-
layoutsPath,
|
|
593
|
-
langPath,
|
|
594
|
-
join,
|
|
595
|
-
jobsPath,
|
|
596
|
-
isAbsolute,
|
|
597
|
-
homeDir,
|
|
598
|
-
healthPath,
|
|
599
|
-
gitPath,
|
|
600
|
-
functionsPath,
|
|
601
|
-
frameworkPath,
|
|
602
|
-
frameworkCloudPath,
|
|
603
|
-
findProjectPath,
|
|
604
|
-
fakerPath,
|
|
605
|
-
extname,
|
|
606
|
-
examplesPath,
|
|
607
|
-
eventsPath,
|
|
608
|
-
errorHandlingPath,
|
|
609
|
-
enumsPath,
|
|
610
|
-
emailPath,
|
|
611
|
-
docsPath,
|
|
612
|
-
dnsPath,
|
|
613
|
-
dirname,
|
|
614
|
-
developmentPath,
|
|
615
|
-
desktopPath,
|
|
616
|
-
delimiter,
|
|
617
|
-
src_default as default,
|
|
618
|
-
datetimePath,
|
|
619
|
-
databasePath,
|
|
620
|
-
customElementsDataPath,
|
|
621
|
-
corePath,
|
|
622
|
-
coreEnvPath,
|
|
623
|
-
configPath,
|
|
624
|
-
componentsPath,
|
|
625
|
-
commandsPath,
|
|
626
|
-
collectionsPath,
|
|
627
|
-
cloudPath,
|
|
628
|
-
cliPath,
|
|
629
|
-
chatPath,
|
|
630
|
-
cachePath,
|
|
631
|
-
buildPath,
|
|
632
|
-
buildEnginePath,
|
|
633
|
-
buddyPath,
|
|
634
|
-
basename,
|
|
635
|
-
authPath,
|
|
636
|
-
assetsPath,
|
|
637
|
-
arraysPath,
|
|
638
|
-
appPath,
|
|
639
|
-
analyticsPath,
|
|
640
|
-
aliasPath,
|
|
641
|
-
aiPath,
|
|
642
|
-
actionsPath
|
|
643
|
-
};
|
|
4
|
+
//# debugId=7084E7CF9D54154F64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=index.js.map
|