@stacksjs/path 0.74.41 → 0.74.43

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
@@ -458,14 +458,21 @@ export declare function desktopPath(path?: string): string;
458
458
  */
459
459
  export declare function docsPath(path?: string): string;
460
460
  /**
461
- * Returns the path to the `domains` directory within the core directory.
461
+ * Returns the path to the `dns` directory within the core directory.
462
462
  *
463
- * @param path - The relative path to the file or directory within the `domains` directory.
464
- * @returns The absolute path to the specified file or directory within the `domains` directory.
463
+ * The package is `core/dns`. This said `core/domains` - a directory that has
464
+ * not existed for as long as the package has been called `@stacksjs/dns`.
465
+ *
466
+ * @param path - The relative path to the file or directory within the `dns` directory.
467
+ * @returns The absolute path to the specified file or directory within the `dns` directory.
465
468
  */
466
469
  export declare function dnsPath(path?: string): string;
467
470
  /**
468
- * Returns the path to the `email` directory within the `notifications` directory.
471
+ * Returns the path to the `email` directory within the core directory.
472
+ *
473
+ * `core/email`, not `core/notifications/email`. Email, push and sms were all
474
+ * nested under `notifications` once and were promoted to top-level packages;
475
+ * these three helpers kept pointing at where they used to be.
469
476
  *
470
477
  * @param path - The relative path to the file or directory within the email directory.
471
478
  * @returns The absolute path to the specified file or directory within the email directory.
@@ -560,10 +567,14 @@ export declare function functionsPath(path?: string): string;
560
567
  */
561
568
  export declare function gitPath(path?: string): string;
562
569
  /**
563
- * Returns the path to the `lang` directory, optionally relative to the project directory.
570
+ * Returns the path to the translations directory, optionally relative to the project directory.
564
571
  *
565
- * @param path - The relative path to the file or directory within the lang directory.
566
- * @returns The absolute path to the specified file or directory within the lang directory.
572
+ * That directory is `locales/` at the project root - `en.yml`, `de.yml`. This
573
+ * returned `resources/lang/`, which is Laravel's convention and has never been
574
+ * where Stacks keeps translations.
575
+ *
576
+ * @param path - The relative path to the file or directory within the translations directory.
577
+ * @returns The absolute path to the specified file or directory within the translations directory.
567
578
  */
568
579
  export declare function langPath(path?: string): string;
569
580
  /**
@@ -624,10 +635,18 @@ export declare function loggingPath(path?: string): string;
624
635
  */
625
636
  export declare function logsPath(path?: string): string;
626
637
  /**
627
- * Returns the path to the `models` directory within the app directory.
638
+ * Returns the path to the `Models` directory within the app directory.
639
+ *
640
+ * Capital `M`. This built `app/models`, the only one of the twelve
641
+ * `appPath`-relative helpers that did not match the directory it names -
642
+ * which resolves anyway on a case-insensitive filesystem, so it worked on
643
+ * macOS and Windows and found nothing on Linux.
628
644
  *
629
- * @param path - The relative path to the file or directory within the `models` directory.
630
- * @returns The absolute path to the specified file or directory within the `models` directory.
645
+ * Delegates to {@link userModelsPath} rather than repeating the segment, so
646
+ * the two cannot disagree again.
647
+ *
648
+ * @param path - The relative path to the file or directory within the `Models` directory.
649
+ * @returns The absolute path to the specified file or directory within the `Models` directory.
631
650
  */
632
651
  export declare function modelsPath(path?: string): string;
633
652
  /**
@@ -744,7 +763,9 @@ export declare function installedDefaultsVersion(projectRoot?: string): string |
744
763
  */
745
764
  export declare function inspectDefaultsProvenance(projectRoot?: string): DefaultsSkew;
746
765
  /**
747
- * Returns the path to the `push` directory within the `notifications` directory.
766
+ * Returns the path to the `push` directory within the core directory.
767
+ *
768
+ * `core/push`, not `core/notifications/push` - see {@link emailPath}.
748
769
  *
749
770
  * @param path - The relative path to the file or directory within the push directory.
750
771
  * @returns The absolute path to the specified file or directory within the push directory.
@@ -877,7 +898,9 @@ export declare function actionRunnerPath(path?: string): string;
877
898
  */
878
899
  export declare function slugPath(path?: string): string;
879
900
  /**
880
- * Returns the path to the `sms` directory within the `notifications` directory.
901
+ * Returns the path to the `sms` directory within the core directory.
902
+ *
903
+ * `core/sms`, not `core/notifications/sms` - see {@link emailPath}.
881
904
  *
882
905
  * @param path - The relative path to the file or directory within the `sms` directory.
883
906
  * @returns The absolute path to the specified file or directory within the `sms` directory.
package/dist/index.js CHANGED
@@ -251,10 +251,10 @@ function docsPath(path) {
251
251
  return corePath(`docs/${path || ""}`);
252
252
  }
253
253
  function dnsPath(path) {
254
- return corePath(`domains/${path || ""}`);
254
+ return corePath(`dns/${path || ""}`);
255
255
  }
256
256
  function emailPath(path) {
257
- return notificationsPath(`email/${path || ""}`);
257
+ return corePath(`email/${path || ""}`);
258
258
  }
259
259
  function enumsPath(path) {
260
260
  return corePath(`enums/${path || ""}`);
@@ -293,7 +293,7 @@ function gitPath(path) {
293
293
  return corePath(`git/${path || ""}`);
294
294
  }
295
295
  function langPath(path) {
296
- return resourcesPath(`lang/${path || ""}`);
296
+ return projectPath(`locales/${path || ""}`);
297
297
  }
298
298
  function layoutsPath(path, options) {
299
299
  let absolutePath;
@@ -324,7 +324,7 @@ function logsPath(path) {
324
324
  return storagePath(`logs/${path || ""}`);
325
325
  }
326
326
  function modelsPath(path) {
327
- return appPath(`models/${path || ""}`);
327
+ return userModelsPath(path);
328
328
  }
329
329
  function modulesPath(path) {
330
330
  return resourcesPath(`modules/${path || ""}`);
@@ -424,7 +424,7 @@ function inspectDefaultsProvenance(projectRoot = projectPath()) {
424
424
  };
425
425
  }
426
426
  function pushPath(path) {
427
- return notificationsPath(`push/${path || ""}`);
427
+ return corePath(`push/${path || ""}`);
428
428
  }
429
429
  function queryBuilderPath(path) {
430
430
  return corePath(`query-builder/${path || ""}`);
@@ -485,7 +485,7 @@ function slugPath(path) {
485
485
  return corePath(`slug/${path || ""}`);
486
486
  }
487
487
  function smsPath(path) {
488
- return notificationsPath(`sms/${path || ""}`);
488
+ return corePath(`sms/${path || ""}`);
489
489
  }
490
490
  function coreStoragePath(path) {
491
491
  return corePath(`storage/${path || ""}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/path",
3
3
  "type": "module",
4
- "version": "0.74.41",
4
+ "version": "0.74.43",
5
5
  "description": "The Stacks path.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [