@stacksjs/path 0.72.102 → 0.73.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/dist/index.d.ts +13 -17
- package/dist/index.js +4 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -577,7 +577,18 @@ export declare function langPath(path?: string): string;
|
|
|
577
577
|
* @returns The absolute or relative path to the specified file or directory within the `layouts` directory.
|
|
578
578
|
*/
|
|
579
579
|
export declare function layoutsPath(path?: string, options?: { relative?: boolean, defaults?: boolean }): string;
|
|
580
|
-
|
|
580
|
+
/**
|
|
581
|
+
* Returns the directory a generated library package builds in.
|
|
582
|
+
*
|
|
583
|
+
* A project releases any number of packages out of `resources/`, so there is
|
|
584
|
+
* no single "the functions library" path any more: each package is addressed
|
|
585
|
+
* by its own directory name, which `config/library.ts` derives from the npm
|
|
586
|
+
* name (or states outright via `dir`).
|
|
587
|
+
*
|
|
588
|
+
* @param slug - The package directory name, e.g. `ui` for `@acme/ui`.
|
|
589
|
+
* @param path - A path within that package.
|
|
590
|
+
*/
|
|
591
|
+
export declare function libraryPackagePath(slug: string, path?: string): string;
|
|
581
592
|
/**
|
|
582
593
|
* Returns the path to the `lint` directory within the core directory.
|
|
583
594
|
*
|
|
@@ -662,13 +673,6 @@ export declare function objectsPath(path?: string): string;
|
|
|
662
673
|
* @returns The absolute path to the specified file or directory within the project directory.
|
|
663
674
|
*/
|
|
664
675
|
export declare function onboardingPath(path?: string): string;
|
|
665
|
-
/**
|
|
666
|
-
* Returns the path to the `package.json` file of a specified library type within the framework directory.
|
|
667
|
-
*
|
|
668
|
-
* @param type - The type of the library ('web-components', or 'functions') for which to return the package.json path.
|
|
669
|
-
* @returns The absolute path to the specified package.json file within the framework directory.
|
|
670
|
-
*/
|
|
671
|
-
export declare function packageJsonPath(type: LibraryType): string;
|
|
672
676
|
/**
|
|
673
677
|
* Returns the path to the `views` directory within the `resources` directory.
|
|
674
678
|
*
|
|
@@ -1174,7 +1178,7 @@ export declare interface Path {
|
|
|
1174
1178
|
layoutsPath: (path?: string, options?: { relative?: boolean }) => string
|
|
1175
1179
|
libsPath: (path?: string) => string
|
|
1176
1180
|
userLibsPath: (path?: string) => string
|
|
1177
|
-
|
|
1181
|
+
libraryPackagePath: (slug: string, path?: string) => string
|
|
1178
1182
|
lintPath: (path?: string) => string
|
|
1179
1183
|
listenersPath: (path?: string) => string
|
|
1180
1184
|
loggingPath: (path?: string) => string
|
|
@@ -1186,7 +1190,6 @@ export declare interface Path {
|
|
|
1186
1190
|
onboardingPath: (path?: string) => string
|
|
1187
1191
|
notificationsPath: (path?: string) => string
|
|
1188
1192
|
newsletterPath: (path?: string) => string
|
|
1189
|
-
packageJsonPath: (type: LibraryType) => string
|
|
1190
1193
|
viewsPath: (path?: string) => string
|
|
1191
1194
|
pathPath: (path?: string) => string
|
|
1192
1195
|
paymentsPath: (path?: string) => string
|
|
@@ -1256,13 +1259,6 @@ export declare interface Path {
|
|
|
1256
1259
|
sep: () => '/' | '\\'
|
|
1257
1260
|
toNamespacedPath: (path: string) => string
|
|
1258
1261
|
}
|
|
1259
|
-
/**
|
|
1260
|
-
* Returns the path to the library entry file, filtered by library type.
|
|
1261
|
-
*
|
|
1262
|
-
* @param type - The type of library ('web-components', or 'functions').
|
|
1263
|
-
* @returns The absolute path to the specified library entry file.
|
|
1264
|
-
*/
|
|
1265
|
-
export type LibraryType = 'web-components' | 'functions';
|
|
1266
1262
|
/**
|
|
1267
1263
|
* - `not-applicable` — nothing to compare: no vendored tree, no installed
|
|
1268
1264
|
* package, or a framework checkout where the tree is the source rather than a
|
package/dist/index.js
CHANGED
|
@@ -273,8 +273,8 @@ function layoutsPath(path, options) {
|
|
|
273
273
|
return relative(process.cwd(), absolutePath);
|
|
274
274
|
return absolutePath;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
return
|
|
276
|
+
function libraryPackagePath(slug, path) {
|
|
277
|
+
return libsPath(`packages/${slug}${path ? `/${path}` : ""}`);
|
|
278
278
|
}
|
|
279
279
|
function lintPath(path) {
|
|
280
280
|
return corePath(`lint/${path || ""}`);
|
|
@@ -312,11 +312,6 @@ function objectsPath(path) {
|
|
|
312
312
|
function onboardingPath(path) {
|
|
313
313
|
return projectPath(`${path || "views/dashboard/onboarding"}`);
|
|
314
314
|
}
|
|
315
|
-
function packageJsonPath(type) {
|
|
316
|
-
if (type === "web-components")
|
|
317
|
-
return frameworkPath("libs/components/web/package.json");
|
|
318
|
-
return frameworkPath(`libs/${type}/package.json`);
|
|
319
|
-
}
|
|
320
315
|
function viewsPath(path) {
|
|
321
316
|
return resourcesPath(`views/${path || ""}`);
|
|
322
317
|
}
|
|
@@ -669,7 +664,7 @@ var path = {
|
|
|
669
664
|
layoutsPath,
|
|
670
665
|
libsPath,
|
|
671
666
|
userLibsPath,
|
|
672
|
-
|
|
667
|
+
libraryPackagePath,
|
|
673
668
|
lintPath,
|
|
674
669
|
listenersPath,
|
|
675
670
|
loggingPath,
|
|
@@ -681,7 +676,6 @@ var path = {
|
|
|
681
676
|
onboardingPath,
|
|
682
677
|
notificationsPath,
|
|
683
678
|
newsletterPath,
|
|
684
|
-
packageJsonPath,
|
|
685
679
|
viewsPath,
|
|
686
680
|
pathPath,
|
|
687
681
|
paymentsPath,
|
|
@@ -819,7 +813,7 @@ export {
|
|
|
819
813
|
join,
|
|
820
814
|
langPath,
|
|
821
815
|
layoutsPath,
|
|
822
|
-
|
|
816
|
+
libraryPackagePath,
|
|
823
817
|
libsEntriesPath,
|
|
824
818
|
libsPath,
|
|
825
819
|
lintPath,
|
|
@@ -835,7 +829,6 @@ export {
|
|
|
835
829
|
objectsPath,
|
|
836
830
|
onboardingPath,
|
|
837
831
|
ormPath,
|
|
838
|
-
packageJsonPath,
|
|
839
832
|
path,
|
|
840
833
|
pathPath,
|
|
841
834
|
paymentsPath,
|