@stacksjs/path 0.68.2 → 0.69.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.d.ts CHANGED
@@ -1,16 +1,7 @@
1
- import { actionsPath, aiPath, aliasPath, analyticsPath, appPath, arraysPath, assetsPath, authPath, buddyPath, coreApiPath, runtimePath, userEventsPath, userJobsPath, userListenersPath, userMiddlewarePath, userModelsPath, userNotificationsPath } from '@stacksjs/path';
2
-
3
- export { basename, delimiter, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep, toNamespacedPath }
4
- declare type ParsedPath,
5
- relative,
6
- resolve,
7
- sep,
8
- toNamespacedPath,
9
- } from 'node:path'
10
1
  export declare function actionsPath(path?: string): string;
11
2
  export declare function relativeActionsPath(path?: string): string;
12
- export declare function userActionsPath(path?: string, options?: { relative: true }): string;
13
- export declare function builtUserActionsPath(path?: string, options?: { relative: boolean }): string;
3
+ export declare function userActionsPath(path?: string, options?: { relative: , true }): string;
4
+ export declare function builtUserActionsPath(path?: string, options?: { relative: , boolean }): string;
14
5
  export declare function userComponentsPath(path?: string): string;
15
6
  export declare function userViewsPath(path?: string): string;
16
7
  export declare function userFunctionsPath(path?: string): string;
@@ -25,11 +16,11 @@ export declare function userEventsPath(): string;
25
16
  export declare function aiPath(path?: string): string;
26
17
  export declare function assetsPath(path?: string): string;
27
18
  export declare function aliasPath(): string;
28
- export declare function buddyPath(path?: string, options?: { relative?: boolean }): string;
19
+ export declare function buddyPath(path?: string, options?: { relative?: , boolean }): string;
29
20
  export declare function runtimePath(path?: string): string;
30
21
  export declare function analyticsPath(path?: string): string;
31
22
  export declare function arraysPath(path?: string): string;
32
- export declare function appPath(path?: string): string;
23
+ export declare function appPath(path?: string, options?: { relative?: , boolean, cwd?: , string }): string;
33
24
  export declare function authPath(path?: string): string;
34
25
  export declare function coreApiPath(path?: string): string;
35
26
  export declare function buildPath(path?: string): string;
@@ -62,17 +53,15 @@ export declare function eventsPath(path?: string): string;
62
53
  export declare function coreEnvPath(path?: string): string;
63
54
  export declare function examplesPath(type?: 'vue-components' | 'web-components'): string;
64
55
  export declare function fakerPath(path?: string): string;
65
- export declare function frameworkPath(path?: string, options?: { relative?: boolean, cwd?: string }): string;
56
+ export declare function frameworkPath(path?: string, options?: { relative?: , boolean, cwd?: , string }): string;
66
57
  export declare function browserPath(path?: string): string;
67
58
  export declare function healthPath(path?: string): string;
68
59
  export declare function functionsPath(path?: string): string;
69
60
  export declare function gitPath(path?: string): string;
70
61
  export declare function langPath(path?: string): string;
71
- export declare function layoutsPath(path?: string, options?: { relative?: boolean }): string;
62
+ export declare function layoutsPath(path?: string, options?: { relative?: , boolean, defaults?: , boolean }): string;
72
63
  export declare type LibraryType = 'vue-components' | 'web-components' | 'functions'
73
- export function libraryEntryPath(type: LibraryType): string {
74
- return libsEntriesPath(`${type}.ts`)
75
- }
64
+ export declare function libraryEntryPath(type: LibraryType): string;
76
65
  export declare function lintPath(path?: string): string;
77
66
  export declare function listenersPath(path?: string): string;
78
67
  export declare function jobsPath(path?: string): string;
@@ -88,8 +77,7 @@ export declare function packageJsonPath(type: LibraryType): string;
88
77
  export declare function viewsPath(path?: string): string;
89
78
  export declare function pathPath(path?: string): string;
90
79
  export declare function paymentsPath(path?: string): string;
91
- export declare function projectPath(filePath = '', options?: { relative: boolean }): string;
92
- export declare function findProjectPath(project: string): Promise<string>;
80
+ export declare function projectPath(filePath, options?: { relative: , boolean }): string;
93
81
  export declare function projectConfigPath(path?: string): string;
94
82
  export declare function storagePath(path?: string): string;
95
83
  export declare function publicPath(path?: string): string;
@@ -97,10 +85,10 @@ export declare function pushPath(path?: string): string;
97
85
  export declare function queryBuilderPath(path?: string): string;
98
86
  export declare function queuePath(path?: string): string;
99
87
  export declare function realtimePath(path?: string): string;
100
- export declare function resourcesPath(path?: string, options?: { relative?: boolean }): string;
88
+ export declare function resourcesPath(path?: string, options?: { relative?: , boolean }): string;
101
89
  export declare function replPath(path?: string): string;
102
90
  export declare function routerPath(path?: string): string;
103
- export declare function routesPath(path?: string, options?: { relative?: boolean }): string;
91
+ export declare function routesPath(path?: string, options?: { relative?: , boolean }): string;
104
92
  export declare function searchEnginePath(path?: string): string;
105
93
  export declare function settingsPath(path?: string): string;
106
94
  export declare function scriptsPath(path?: string): string;
@@ -120,141 +108,12 @@ export declare function testingPath(path?: string): string;
120
108
  export declare function tinkerPath(path?: string): string;
121
109
  export declare function testsPath(path?: string): string;
122
110
  export declare function typesPath(path?: string): string;
123
- export declare function uiPath(path?: string, options?: { relative?: boolean }): string;
111
+ export declare function uiPath(path?: string, options?: { relative?: , boolean }): string;
124
112
  export declare function utilsPath(path?: string): string;
125
113
  export declare function validationPath(path?: string): string;
126
114
  export declare function viteConfigPath(path?: string): string;
127
115
  export declare function vitePluginPath(path?: string): string;
128
116
  export declare function xRayPath(path?: string): string;
129
117
  export declare function homeDir(path?: string): string;
130
- export declare interface Path {
131
- actionsPath: (path?: string) => string
132
- userActionsPath: (path?: string) => string
133
- builtUserActionsPath: (path?: string, option?: { relative: boolean }) => string
134
- userComponentsPath: (path?: string) => string
135
- userViewsPath: (path?: string) => string
136
- userFunctionsPath: (path?: string) => string
137
- aiPath: (path?: string) => string
138
- assetsPath: (path?: string) => string
139
- relativeActionsPath: (path?: string) => string
140
- aliasPath: (path?: string) => string
141
- analyticsPath: (path?: string) => string
142
- arraysPath: (path?: string) => string
143
- appPath: (path?: string) => string
144
- authPath: (path?: string) => string
145
- coreApiPath: (path?: string) => string
146
- buddyPath: (path?: string) => string
147
- buildEnginePath: (path?: string) => string
148
- libsEntriesPath: (path?: string) => string
149
- buildPath: (path?: string) => string
150
- cachePath: (path?: string) => string
151
- chatPath: (path?: string) => string
152
- cliPath: (path?: string) => string
153
- cloudPath: (path?: string) => string
154
- frameworkCloudPath: (path?: string) => string
155
- collectionsPath: (path?: string) => string
156
- commandsPath: (path?: string) => string
157
- componentsPath: (path?: string) => string
158
- configPath: (path?: string) => string
159
- projectConfigPath: (path?: string) => string
160
- corePath: (path?: string) => string
161
- customElementsDataPath: (path?: string) => string
162
- databasePath: (path?: string) => string
163
- datetimePath: (path?: string) => string
164
- developmentPath: (path?: string) => string
165
- desktopPath: (path?: string) => string
166
- docsPath: (path?: string) => string
167
- dnsPath: (path?: string) => string
168
- emailPath: (path?: string) => string
169
- enumsPath: (path?: string) => string
170
- eslintPluginPath: (path?: string) => string
171
- errorHandlingPath: (path?: string) => string
172
- eventsPath: (path?: string) => string
173
- coreEnvPath: (path?: string) => string
174
- healthPath: (path?: string) => string
175
- examplesPath: (type?: 'vue-components' | 'web-components') => string
176
- fakerPath: (path?: string) => string
177
- frameworkPath: (path?: string) => string
178
- browserPath: (path?: string) => string
179
- storagePath: (path?: string) => string
180
- functionsPath: (path?: string) => string
181
- gitPath: (path?: string) => string
182
- langPath: (path?: string) => string
183
- layoutsPath: (path?: string, options?: { relative?: boolean }) => string
184
- libsPath: (path?: string) => string
185
- userLibsPath: (path?: string) => string
186
- libraryEntryPath: (type: LibraryType) => string
187
- lintPath: (path?: string) => string
188
- listenersPath: (path?: string) => string
189
- loggingPath: (path?: string) => string
190
- logsPath: (path?: string) => string
191
- jobsPath: (path?: string) => string
192
- modulesPath: (path?: string) => string
193
- ormPath: (path?: string) => string
194
- objectsPath: (path?: string) => string
195
- onboardingPath: (path?: string) => string
196
- notificationsPath: (path?: string) => string
197
- packageJsonPath: (type: LibraryType) => string
198
- viewsPath: (path?: string) => string
199
- pathPath: (path?: string) => string
200
- paymentsPath: (path?: string) => string
201
- projectPath: (path?: string) => string
202
- findProjectPath: (project: string) => Promise<string>
203
- coreStoragePath: (path?: string) => string
204
- publicPath: (path?: string) => string
205
- pushPath: (path?: string) => string
206
- queryBuilderPath: (path?: string) => string
207
- queuePath: (path?: string) => string
208
- realtimePath: (path?: string) => string
209
- resourcesPath: (path?: string) => string
210
- replPath: (path?: string) => string
211
- routerPath: (path?: string) => string
212
- routesPath: (path?: string) => string
213
- runtimePath: (path?: string) => string
214
- searchEnginePath: (path?: string) => string
215
- schedulerPath: (path?: string) => string
216
- settingsPath: (path?: string) => string
217
- smsPath: (path?: string) => string
218
- slugPath: (path?: string) => string
219
- scriptsPath: (path?: string) => string
220
- securityPath: (path?: string) => string
221
- serverPath: (path?: string) => string
222
- userServerPath: (path?: string) => string
223
- serverlessPath: (path?: string) => string
224
- stacksPath: (path?: string) => string
225
- stringsPath: (path?: string) => string
226
- shellPath: (path?: string) => string
227
- storesPath: (path?: string) => string
228
- testingPath: (path?: string) => string
229
- testsPath: (path?: string) => string
230
- tinkerPath: (path?: string) => string
231
- typesPath: (path?: string) => string
232
- uiPath: (path?: string, options?: { relative?: boolean }) => string
233
- userDatabasePath: (path?: string) => string
234
- userMigrationsPath: (path?: string) => string
235
- userEventsPath: (path?: string) => string
236
- userJobsPath: (path?: string) => string
237
- userListenersPath: (path?: string) => string
238
- userMiddlewarePath: (path?: string) => string
239
- userModelsPath: (path?: string) => string
240
- userNotificationsPath: (path?: string) => string
241
- utilsPath: (path?: string) => string
242
- validationPath: (path?: string) => string
243
- viteConfigPath: (path?: string) => string
244
- vitePluginPath: (path?: string) => string
245
- xRayPath: (path?: string) => string
246
- homeDir: (path?: string) => string
247
- basename: (path: string) => string
248
- delimiter: () => ';' | ':'
249
- dirname: (path: string) => string
250
- extname: (path: string) => string
251
- isAbsolute: (path: string) => boolean
252
- join: (...paths: string[]) => string
253
- normalize: (path: string) => string
254
- relative: (from: string, to: string) => string
255
- resolve: (...paths: string[]) => string
256
- parse: (path: string) => ParsedPath
257
- sep: () => '/' | '\\'
258
- toNamespacedPath: (path: string) => string
259
- }
260
- export declare const path: Path;
118
+
119
+ export { basename, delimiter, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep, toNamespacedPath }
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  // @bun
2
- import N from"os";import{basename as S,delimiter as x,dirname as D,extname as C,isAbsolute as A,join as L,normalize as E,parse as w,relative as Y,resolve as H,sep as k,toNamespacedPath as y}from"path";import _ from"process";import{runCommandSync as v}from"@stacksjs/cli";import{log as z}from"@stacksjs/logging";function J(G){return I(`actions/${G||""}`)}function g(G){return Y(W(),J(G))}function f(G,O){let K=X(`Actions/${G||""}`);if(O?.relative)return Y(_.cwd(),K);return K}function j(G,O){let K=Q(`actions/${G||""}`);if(O?.relative)return Y(_.cwd(),K);return K}function d(G){return U(`components/${G||""}`)}function b(G){return Z(`views/${G||""}`)}function m(G){return Z(`functions/${G||""}`)}function u(G){return X(`Jobs/${G||""}`)}function l(G){return X(`Listeners/${G||""}`)}function n(G){return X(`Middleware/${G||""}`)}function i(G){return X(`Models/${G||""}`)}function c(G){return X(`Notifications/${G||""}`)}function R(G){return W(`database/${G||""}`)}function s(G){return R(`migrations/${G||""}`)}function r(){return X("Events.ts")}function P(G){return I(`ai/${G||""}`)}function o(G){return Z(`assets/${G||""}`)}function e(){return I("alias/src/index.ts")}function p(G,O){let K=I(`buddy/${G||""}`);if(O?.relative)return Y(_.cwd(),K);return K}function h(G){return Q(`buddy/${G||""}`)}function a(G){return I(`analytics/${G||""}`)}function t(G){return I(`arrays/${G||""}`)}function X(G){return W(`app/${G||""}`)}function GG(G){return I(`auth/${G||""}`)}function IG(G){return I(`api/${G||""}`)}function T(G){return I(`build/${G||""}`)}function KG(G){return T(`${G||""}`)}function U(G){return Q(`libs/${G||""}`)}function V(G){return Z(`${G||""}`)}function M(G){return U(`entries/${G||""}`)}function OG(G){return I(`cache/${G||""}`)}function QG(G){return I(`chat/${G||""}`)}function WG(G){return I(`cli/${G||""}`)}function XG(G){return I(`cloud/${G||""}`)}function YG(G){return Q(`cloud/${G||""}`)}function ZG(G){return I(`collections/${G||""}`)}function _G(G){return X(`Commands/${G||""}`)}function $G(G){return V(`components/${G||""}`)}function BG(G){return I(`config/${G||""}`)}function I(G){return Q(`core/${G||""}`)}function FG(){return Q("core/custom-elements.json")}function HG(G){return I(`database/${G||""}`)}function UG(G){return I(`datetime/${G||""}`)}function VG(G){return I(`development/${G||""}`)}function qG(G){return I(`desktop/${G||""}`)}function zG(G){return I(`docs/${G||""}`)}function JG(G){return I(`domains/${G||""}`)}function RG(G){return F(`email/${G||""}`)}function TG(G){return I(`enums/${G||""}`)}function MG(G){return I(`eslint-plugin/${G||""}`)}function NG(G){return I(`error-handling/${G||""}`)}function SG(G){return I(`events/${G||""}`)}function xG(G){return I(`env/${G||""}`)}function DG(G){return Q(`examples/${G||""}`)}function CG(G){return I(`faker/${G||""}`)}function Q(G,O){let K=q(`framework/${G||""}`);if(O?.relative)return Y(O.cwd||_.cwd(),K);return K}function AG(G){return I(`browser/${G||""}`)}function LG(G){return I(`health/${G||""}`)}function EG(G){return V(`functions/${G||""}`)}function wG(G){return I(`git/${G||""}`)}function kG(G){return Z(`lang/${G||""}`)}function yG(G,O){let K=Z(`layouts/${G||""}`);if(O?.relative)return Y(_.cwd(),K);return K}function vG(G){return M(`${G}.ts`)}function gG(G){return I(`lint/${G||""}`)}function fG(G){return X(`Listeners/${G||""}`)}function jG(G){return X(`Jobs/${G||""}`)}function dG(G){return I(`logging/${G||""}`)}function bG(G){return q(`logs/${G||""}`)}function gI(G){return X(`models/${G||""}`)}function mG(G){return Z(`modules/${G||""}`)}function F(G){return I(`notifications/${G||""}`)}function uG(G){return I(`orm/${G||""}`)}function lG(G){return I(`objects/${G||""}`)}function nG(G){return W(`${G||"views/dashboard/onboarding"}`)}function iG(G){if(G==="vue-components")return Q("libs/components/vue/package.json");if(G==="web-components")return Q("libs/components/web/package.json");return Q(`libs/${G}/package.json`)}function cG(G){return Z(`views/${G||""}`)}function sG(G){return I(`path/${G||""}`)}function rG(G){return I(`payments/${G||""}`)}function W(G="",O){let K=_.cwd();while(K.includes("storage"))K=H(K,"..");let $=H(K,G);if(O?.relative)return Y(_.cwd(),$);return $}async function PG(G){let O=await v("buddy projects:list --quiet");z.debug(`ProjectList in findProjectPath ${O}`);let K=O.split("\n").filter((B)=>B.startsWith(" - ")).map((B)=>B.trim().substring(4));z.debug(`Projects in findProjectPath ${K}`);let $=K.find((B)=>B.includes(G));if(!$)throw new Error(`Could not find project with name: ${G}`);return $.startsWith("/")?$:`/${$}`}function oG(G){return W(`config/${G||""}`)}function q(G){return W(`storage/${G||""}`)}function eG(G){return W(`public/${G||""}`)}function pG(G){return F(`push/${G||""}`)}function hG(G){return I(`query-builder/${G||""}`)}function aG(G){return I(`queue/${G||""}`)}function tG(G){return I(`realtime/${G||""}`)}function Z(G,O){if(O?.relative){let K=W(`resources/${G||""}`);return Y(_.cwd(),K)}return W(`resources/${G||""}`)}function GI(G){return I(`repl/${G||""}`)}function II(G){return I(`router/${G||""}`)}function KI(G,O){let K=Z(`routes/${G||""}`);if(O?.relative)return Y(_.cwd(),K);return W(`routes/${G||""}`)}function OI(G){return I(`search-engine/${G||""}`)}function QI(G){return W(`${G||"views/dashboard/settings"}`)}function WI(G){return Q(`scripts/${G||""}`)}function XI(G){return I(`scheduler/${G||""}`)}function YI(G){return I(`slug/${G||""}`)}function ZI(G){return F(`sms/${G||""}`)}function _I(G){return I(`storage/${G||""}`)}function $I(G){return Z(`stores/${G||""}`)}function BI(G){return I(`security/${G||""}`)}function FI(G){return I(`server/${G||""}`)}function HI(G){return Q(`server/${G||""}`)}function UI(G){return I(`serverless/${G||""}`)}function VI(G){return Q(`src/${G||""}`)}function qI(G){return I(`shell/${G||""}`)}function zI(G){return I(`strings/${G||""}`)}function JI(G){return I(`testing/${G||""}`)}function RI(G){return I(`tinker/${G||""}`)}function TI(G){return Q(`tests/${G||""}`)}function MI(G){return I(`types/${G||""}`)}function NI(G,O){let K=I(`ui/${G||""}`);if(O?.relative)return Y(_.cwd(),K);return K}function SI(G){return I(`utils/${G||""}`)}function xI(G){return I(`validation/${G||""}`)}function DI(G){return I(`vite-config/${G||""}`)}function CI(G){return I(`vite-plugin/${G||""}`)}function AI(G){return Q(`stacks/x-ray/${G||""}`)}function LI(G){return N.homedir()+(G?(G.startsWith("/")?"":"/")+G:"~")}var fI={actionsPath:J,userActionsPath:f,builtUserActionsPath:j,userComponentsPath:d,userViewsPath:b,userFunctionsPath:m,aiPath:P,assetsPath:o,relativeActionsPath:g,aliasPath:e,analyticsPath:a,arraysPath:t,appPath:X,authPath:GG,coreApiPath:IG,buddyPath:p,buildEnginePath:KG,libsEntriesPath:M,buildPath:T,cachePath:OG,chatPath:QG,cliPath:WG,cloudPath:XG,frameworkCloudPath:YG,collectionsPath:ZG,commandsPath:_G,componentsPath:$G,configPath:BG,projectConfigPath:oG,corePath:I,customElementsDataPath:FG,databasePath:HG,datetimePath:UG,developmentPath:VG,desktopPath:qG,docsPath:zG,dnsPath:JG,emailPath:RG,enumsPath:TG,eslintPluginPath:MG,errorHandlingPath:NG,eventsPath:SG,coreEnvPath:xG,healthPath:LG,examplesPath:DG,fakerPath:CG,frameworkPath:Q,browserPath:AG,storagePath:q,functionsPath:EG,gitPath:wG,langPath:kG,layoutsPath:yG,libsPath:U,userLibsPath:V,libraryEntryPath:vG,lintPath:gG,listenersPath:fG,loggingPath:dG,logsPath:bG,jobsPath:jG,modulesPath:mG,ormPath:uG,objectsPath:lG,onboardingPath:nG,notificationsPath:F,packageJsonPath:iG,viewsPath:cG,pathPath:sG,paymentsPath:rG,projectPath:W,findProjectPath:PG,coreStoragePath:_I,publicPath:eG,pushPath:pG,queryBuilderPath:hG,queuePath:aG,realtimePath:tG,resourcesPath:Z,replPath:GI,routerPath:II,routesPath:KI,runtimePath:h,searchEnginePath:OI,schedulerPath:XI,settingsPath:QI,smsPath:ZI,slugPath:YI,scriptsPath:WI,securityPath:BI,serverPath:FI,userServerPath:HI,serverlessPath:UI,stacksPath:VI,stringsPath:zI,shellPath:qI,storesPath:$I,testingPath:JI,testsPath:TI,tinkerPath:RI,typesPath:MI,uiPath:NI,userDatabasePath:R,userMigrationsPath:s,userEventsPath:r,userJobsPath:u,userListenersPath:l,userMiddlewarePath:n,userModelsPath:i,userNotificationsPath:c,utilsPath:SI,validationPath:xI,viteConfigPath:DI,vitePluginPath:CI,xRayPath:AI,homeDir:LI,basename:S,delimiter:()=>x,dirname:D,extname:C,isAbsolute:A,join:L,normalize:E,relative:Y,resolve:H,parse:w,sep:()=>k,toNamespacedPath:y};export{AI as xRayPath,CI as vitePluginPath,DI as viteConfigPath,cG as viewsPath,xI as validationPath,SI as utilsPath,b as userViewsPath,HI as userServerPath,c as userNotificationsPath,i as userModelsPath,s as userMigrationsPath,n as userMiddlewarePath,l as userListenersPath,V as userLibsPath,u as userJobsPath,m as userFunctionsPath,r as userEventsPath,R as userDatabasePath,d as userComponentsPath,f as userActionsPath,NI as uiPath,MI as typesPath,y as toNamespacedPath,RI as tinkerPath,TI as testsPath,JI as testingPath,zI as stringsPath,$I as storesPath,q as storagePath,VI as stacksPath,ZI as smsPath,YI as slugPath,qI as shellPath,QI as settingsPath,UI as serverlessPath,FI as serverPath,k as sep,BI as securityPath,OI as searchEnginePath,WI as scriptsPath,XI as schedulerPath,h as runtimePath,KI as routesPath,II as routerPath,Z as resourcesPath,H as resolve,GI as replPath,g as relativeActionsPath,Y as relative,tG as realtimePath,aG as queuePath,hG as queryBuilderPath,pG as pushPath,eG as publicPath,W as projectPath,oG as projectConfigPath,rG as paymentsPath,sG as pathPath,fI as path,iG as packageJsonPath,uG as ormPath,nG as onboardingPath,lG as objectsPath,F as notificationsPath,E as normalize,mG as modulesPath,gI as modelsPath,bG as logsPath,dG as loggingPath,fG as listenersPath,gG as lintPath,U as libsPath,M as libsEntriesPath,vG as libraryEntryPath,yG as layoutsPath,kG as langPath,L as join,jG as jobsPath,A as isAbsolute,LI as homeDir,LG as healthPath,wG as gitPath,EG as functionsPath,Q as frameworkPath,YG as frameworkCloudPath,PG as findProjectPath,CG as fakerPath,C as extname,DG as examplesPath,SG as eventsPath,MG as eslintPluginPath,NG as errorHandlingPath,TG as enumsPath,RG as emailPath,zG as docsPath,JG as dnsPath,D as dirname,VG as developmentPath,qG as desktopPath,x as delimiter,UG as datetimePath,HG as databasePath,FG as customElementsDataPath,_I as coreStoragePath,I as corePath,xG as coreEnvPath,IG as coreApiPath,BG as configPath,$G as componentsPath,_G as commandsPath,ZG as collectionsPath,XG as cloudPath,WG as cliPath,QG as chatPath,OG as cachePath,j as builtUserActionsPath,T as buildPath,KG as buildEnginePath,p as buddyPath,AG as browserPath,S as basename,GG as authPath,o as assetsPath,t as arraysPath,X as appPath,a as analyticsPath,e as aliasPath,P as aiPath,J as actionsPath};
2
+ import N from"os";import{basename as S,delimiter as x,dirname as D,extname as C,isAbsolute as A,join as L,normalize as E,parse as w,relative as X,resolve as H,sep as k,toNamespacedPath as y}from"path";import Z from"process";import{runCommandSync as v}from"@stacksjs/cli";import{log as z}from"@stacksjs/logging";function J(G){return I(`actions/${G||""}`)}function g(G){return X(W(),J(G))}function j(G,O){let K=Y(`Actions/${G||""}`);if(O?.relative)return X(Z.cwd(),K);return K}function f(G,O){let K=Q(`actions/${G||""}`);if(O?.relative)return X(Z.cwd(),K);return K}function d(G){return U(`components/${G||""}`)}function b(G){return _(`views/${G||""}`)}function m(G){return _(`functions/${G||""}`)}function u(G){return Y(`Jobs/${G||""}`)}function l(G){return Y(`Listeners/${G||""}`)}function n(G){return Y(`Middleware/${G||""}`)}function c(G){return Y(`Models/${G||""}`)}function i(G){return Y(`Notifications/${G||""}`)}function R(G){return W(`database/${G||""}`)}function s(G){return R(`migrations/${G||""}`)}function r(){return Y("Events.ts")}function P(G){return I(`ai/${G||""}`)}function o(G){return _(`assets/${G||""}`)}function e(){return I("alias/src/index.ts")}function p(G,O){let K=I(`buddy/${G||""}`);if(O?.relative)return X(Z.cwd(),K);return K}function h(G){return Q(`buddy/${G||""}`)}function a(G){return I(`analytics/${G||""}`)}function t(G){return I(`arrays/${G||""}`)}function Y(G,O){let K=W(`app/${G||""}`);if(O?.relative)return X(O.cwd||Z.cwd(),K);return K}function GG(G){return I(`auth/${G||""}`)}function IG(G){return I(`api/${G||""}`)}function T(G){return I(`build/${G||""}`)}function KG(G){return T(`${G||""}`)}function U(G){return Q(`libs/${G||""}`)}function V(G){return _(`${G||""}`)}function M(G){return U(`entries/${G||""}`)}function OG(G){return I(`cache/${G||""}`)}function QG(G){return I(`chat/${G||""}`)}function WG(G){return I(`cli/${G||""}`)}function XG(G){return I(`cloud/${G||""}`)}function YG(G){return Q(`cloud/${G||""}`)}function ZG(G){return I(`collections/${G||""}`)}function _G(G){return Y(`Commands/${G||""}`)}function $G(G){return V(`components/${G||""}`)}function BG(G){return I(`config/${G||""}`)}function I(G){return Q(`core/${G||""}`)}function FG(){return Q("core/custom-elements.json")}function HG(G){return I(`database/${G||""}`)}function UG(G){return I(`datetime/${G||""}`)}function VG(G){return I(`development/${G||""}`)}function qG(G){return I(`desktop/${G||""}`)}function zG(G){return I(`docs/${G||""}`)}function JG(G){return I(`domains/${G||""}`)}function RG(G){return F(`email/${G||""}`)}function TG(G){return I(`enums/${G||""}`)}function MG(G){return I(`eslint-plugin/${G||""}`)}function NG(G){return I(`error-handling/${G||""}`)}function SG(G){return I(`events/${G||""}`)}function xG(G){return I(`env/${G||""}`)}function DG(G){return Q(`examples/${G||""}`)}function CG(G){return I(`faker/${G||""}`)}function Q(G,O){let K=q(`framework/${G||""}`);if(O?.relative)return X(O.cwd||Z.cwd(),K);return K}function AG(G){return I(`browser/${G||""}`)}function LG(G){return I(`health/${G||""}`)}function EG(G){return V(`functions/${G||""}`)}function wG(G){return I(`git/${G||""}`)}function kG(G){return _(`lang/${G||""}`)}function yG(G,O){let K;if(O?.defaults)K=Q(`defaults/layouts/${G||""}`);else K=_(`layouts/${G||""}`);if(O?.relative)return X(Z.cwd(),K);return K}function vG(G){return M(`${G}.ts`)}function gG(G){return I(`lint/${G||""}`)}function jG(G){return Y(`Listeners/${G||""}`)}function fG(G){return Y(`Jobs/${G||""}`)}function dG(G){return I(`logging/${G||""}`)}function bG(G){return q(`logs/${G||""}`)}function gI(G){return Y(`models/${G||""}`)}function mG(G){return _(`modules/${G||""}`)}function F(G){return I(`notifications/${G||""}`)}function uG(G){return I(`orm/${G||""}`)}function lG(G){return I(`objects/${G||""}`)}function nG(G){return W(`${G||"views/dashboard/onboarding"}`)}function cG(G){if(G==="vue-components")return Q("libs/components/vue/package.json");if(G==="web-components")return Q("libs/components/web/package.json");return Q(`libs/${G}/package.json`)}function iG(G){return _(`views/${G||""}`)}function sG(G){return I(`path/${G||""}`)}function rG(G){return I(`payments/${G||""}`)}function W(G="",O){let K=Z.cwd();while(K.includes("storage"))K=H(K,"..");let $=H(K,G);if(O?.relative)return X(Z.cwd(),$);return $}async function PG(G){let O=await v("buddy projects:list --quiet");z.debug(`ProjectList in findProjectPath ${O}`);let K=O.split(`
3
+ `).filter((B)=>B.startsWith(" - ")).map((B)=>B.trim().substring(4));z.debug(`Projects in findProjectPath ${K}`);let $=K.find((B)=>B.includes(G));if(!$)throw new Error(`Could not find project with name: ${G}`);return $.startsWith("/")?$:`/${$}`}function oG(G){return W(`config/${G||""}`)}function q(G){return W(`storage/${G||""}`)}function eG(G){return W(`public/${G||""}`)}function pG(G){return F(`push/${G||""}`)}function hG(G){return I(`query-builder/${G||""}`)}function aG(G){return I(`queue/${G||""}`)}function tG(G){return I(`realtime/${G||""}`)}function _(G,O){if(O?.relative){let K=W(`resources/${G||""}`);return X(Z.cwd(),K)}return W(`resources/${G||""}`)}function GI(G){return I(`repl/${G||""}`)}function II(G){return I(`router/${G||""}`)}function KI(G,O){let K=_(`routes/${G||""}`);if(O?.relative)return X(Z.cwd(),K);return W(`routes/${G||""}`)}function OI(G){return I(`search-engine/${G||""}`)}function QI(G){return W(`${G||"views/dashboard/settings"}`)}function WI(G){return Q(`scripts/${G||""}`)}function XI(G){return I(`scheduler/${G||""}`)}function YI(G){return I(`slug/${G||""}`)}function ZI(G){return F(`sms/${G||""}`)}function _I(G){return I(`storage/${G||""}`)}function $I(G){return _(`stores/${G||""}`)}function BI(G){return I(`security/${G||""}`)}function FI(G){return I(`server/${G||""}`)}function HI(G){return Q(`server/${G||""}`)}function UI(G){return I(`serverless/${G||""}`)}function VI(G){return Q(`src/${G||""}`)}function qI(G){return I(`shell/${G||""}`)}function zI(G){return I(`strings/${G||""}`)}function JI(G){return I(`testing/${G||""}`)}function RI(G){return I(`tinker/${G||""}`)}function TI(G){return Q(`tests/${G||""}`)}function MI(G){return I(`types/${G||""}`)}function NI(G,O){let K=I(`ui/${G||""}`);if(O?.relative)return X(Z.cwd(),K);return K}function SI(G){return I(`utils/${G||""}`)}function xI(G){return I(`validation/${G||""}`)}function DI(G){return I(`vite-config/${G||""}`)}function CI(G){return I(`vite-plugin/${G||""}`)}function AI(G){return Q(`stacks/x-ray/${G||""}`)}function LI(G){return N.homedir()+(G?(G.startsWith("/")?"":"/")+G:"~")}var jI={actionsPath:J,userActionsPath:j,builtUserActionsPath:f,userComponentsPath:d,userViewsPath:b,userFunctionsPath:m,aiPath:P,assetsPath:o,relativeActionsPath:g,aliasPath:e,analyticsPath:a,arraysPath:t,appPath:Y,authPath:GG,coreApiPath:IG,buddyPath:p,buildEnginePath:KG,libsEntriesPath:M,buildPath:T,cachePath:OG,chatPath:QG,cliPath:WG,cloudPath:XG,frameworkCloudPath:YG,collectionsPath:ZG,commandsPath:_G,componentsPath:$G,configPath:BG,projectConfigPath:oG,corePath:I,customElementsDataPath:FG,databasePath:HG,datetimePath:UG,developmentPath:VG,desktopPath:qG,docsPath:zG,dnsPath:JG,emailPath:RG,enumsPath:TG,eslintPluginPath:MG,errorHandlingPath:NG,eventsPath:SG,coreEnvPath:xG,healthPath:LG,examplesPath:DG,fakerPath:CG,frameworkPath:Q,browserPath:AG,storagePath:q,functionsPath:EG,gitPath:wG,langPath:kG,layoutsPath:yG,libsPath:U,userLibsPath:V,libraryEntryPath:vG,lintPath:gG,listenersPath:jG,loggingPath:dG,logsPath:bG,jobsPath:fG,modulesPath:mG,ormPath:uG,objectsPath:lG,onboardingPath:nG,notificationsPath:F,packageJsonPath:cG,viewsPath:iG,pathPath:sG,paymentsPath:rG,projectPath:W,findProjectPath:PG,coreStoragePath:_I,publicPath:eG,pushPath:pG,queryBuilderPath:hG,queuePath:aG,realtimePath:tG,resourcesPath:_,replPath:GI,routerPath:II,routesPath:KI,runtimePath:h,searchEnginePath:OI,schedulerPath:XI,settingsPath:QI,smsPath:ZI,slugPath:YI,scriptsPath:WI,securityPath:BI,serverPath:FI,userServerPath:HI,serverlessPath:UI,stacksPath:VI,stringsPath:zI,shellPath:qI,storesPath:$I,testingPath:JI,testsPath:TI,tinkerPath:RI,typesPath:MI,uiPath:NI,userDatabasePath:R,userMigrationsPath:s,userEventsPath:r,userJobsPath:u,userListenersPath:l,userMiddlewarePath:n,userModelsPath:c,userNotificationsPath:i,utilsPath:SI,validationPath:xI,viteConfigPath:DI,vitePluginPath:CI,xRayPath:AI,homeDir:LI,basename:S,delimiter:()=>x,dirname:D,extname:C,isAbsolute:A,join:L,normalize:E,relative:X,resolve:H,parse:w,sep:()=>k,toNamespacedPath:y};export{AI as xRayPath,CI as vitePluginPath,DI as viteConfigPath,iG as viewsPath,xI as validationPath,SI as utilsPath,b as userViewsPath,HI as userServerPath,i as userNotificationsPath,c as userModelsPath,s as userMigrationsPath,n as userMiddlewarePath,l as userListenersPath,V as userLibsPath,u as userJobsPath,m as userFunctionsPath,r as userEventsPath,R as userDatabasePath,d as userComponentsPath,j as userActionsPath,NI as uiPath,MI as typesPath,y as toNamespacedPath,RI as tinkerPath,TI as testsPath,JI as testingPath,zI as stringsPath,$I as storesPath,q as storagePath,VI as stacksPath,ZI as smsPath,YI as slugPath,qI as shellPath,QI as settingsPath,UI as serverlessPath,FI as serverPath,k as sep,BI as securityPath,OI as searchEnginePath,WI as scriptsPath,XI as schedulerPath,h as runtimePath,KI as routesPath,II as routerPath,_ as resourcesPath,H as resolve,GI as replPath,g as relativeActionsPath,X as relative,tG as realtimePath,aG as queuePath,hG as queryBuilderPath,pG as pushPath,eG as publicPath,W as projectPath,oG as projectConfigPath,rG as paymentsPath,sG as pathPath,jI as path,cG as packageJsonPath,uG as ormPath,nG as onboardingPath,lG as objectsPath,F as notificationsPath,E as normalize,mG as modulesPath,gI as modelsPath,bG as logsPath,dG as loggingPath,jG as listenersPath,gG as lintPath,U as libsPath,M as libsEntriesPath,vG as libraryEntryPath,yG as layoutsPath,kG as langPath,L as join,fG as jobsPath,A as isAbsolute,LI as homeDir,LG as healthPath,wG as gitPath,EG as functionsPath,Q as frameworkPath,YG as frameworkCloudPath,PG as findProjectPath,CG as fakerPath,C as extname,DG as examplesPath,SG as eventsPath,MG as eslintPluginPath,NG as errorHandlingPath,TG as enumsPath,RG as emailPath,zG as docsPath,JG as dnsPath,D as dirname,VG as developmentPath,qG as desktopPath,x as delimiter,UG as datetimePath,HG as databasePath,FG as customElementsDataPath,_I as coreStoragePath,I as corePath,xG as coreEnvPath,IG as coreApiPath,BG as configPath,$G as componentsPath,_G as commandsPath,ZG as collectionsPath,XG as cloudPath,WG as cliPath,QG as chatPath,OG as cachePath,f as builtUserActionsPath,T as buildPath,KG as buildEnginePath,p as buddyPath,AG as browserPath,S as basename,GG as authPath,o as assetsPath,t as arraysPath,Y as appPath,a as analyticsPath,e as aliasPath,P as aiPath,J as actionsPath};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/path",
3
3
  "type": "module",
4
- "version": "0.68.2",
4
+ "version": "0.69.1",
5
5
  "description": "The Stacks path.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": ["Chris Breuer <chris@stacksjs.org>"],
@@ -30,11 +30,9 @@
30
30
  "typecheck": "bun tsc --noEmit",
31
31
  "prepublishOnly": "bun run build"
32
32
  },
33
- "dependencies": {
34
- "@stacksjs/logging": "0.68.1",
35
- "@stacksjs/validation": "0.68.1"
36
- },
37
33
  "devDependencies": {
38
- "@stacksjs/development": "0.68.1"
34
+ "@stacksjs/development": "0.68.2",
35
+ "@stacksjs/logging": "0.68.2",
36
+ "@stacksjs/validation": "0.68.2"
39
37
  }
40
38
  }