@settlemint/sdk-utils 2.3.2 → 2.3.3

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.
Files changed (98) hide show
  1. package/README.md +121 -77
  2. package/dist/environment.cjs +17708 -383
  3. package/dist/environment.cjs.map +1 -1
  4. package/dist/environment.d.cts +263 -98
  5. package/dist/environment.d.ts +263 -98
  6. package/dist/environment.js +17746 -0
  7. package/dist/environment.js.map +1 -0
  8. package/dist/filesystem.cjs +6746 -113
  9. package/dist/filesystem.cjs.map +1 -1
  10. package/dist/filesystem.d.cts +22 -1
  11. package/dist/filesystem.d.ts +22 -1
  12. package/dist/filesystem.js +6766 -0
  13. package/dist/filesystem.js.map +1 -0
  14. package/dist/http.cjs +217 -79
  15. package/dist/http.cjs.map +1 -1
  16. package/dist/http.d.cts +14 -1
  17. package/dist/http.d.ts +14 -1
  18. package/dist/http.js +226 -0
  19. package/dist/http.js.map +1 -0
  20. package/dist/index.cjs +295 -104
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +26 -1
  23. package/dist/index.d.ts +26 -1
  24. package/dist/index.js +306 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/json.cjs +83 -0
  27. package/dist/json.cjs.map +1 -0
  28. package/dist/json.d.cts +56 -0
  29. package/dist/json.d.ts +56 -0
  30. package/dist/json.js +80 -0
  31. package/dist/json.js.map +1 -0
  32. package/dist/logging.cjs +209 -137
  33. package/dist/logging.cjs.map +1 -1
  34. package/dist/logging.d.cts +23 -14
  35. package/dist/logging.d.ts +23 -14
  36. package/dist/logging.js +221 -0
  37. package/dist/logging.js.map +1 -0
  38. package/dist/package-manager.cjs +7353 -173
  39. package/dist/package-manager.cjs.map +1 -1
  40. package/dist/package-manager.d.cts +26 -3
  41. package/dist/package-manager.d.ts +26 -3
  42. package/dist/package-manager.js +7385 -0
  43. package/dist/package-manager.js.map +1 -0
  44. package/dist/retry.cjs +137 -0
  45. package/dist/retry.cjs.map +1 -0
  46. package/dist/retry.d.cts +19 -0
  47. package/dist/retry.d.ts +19 -0
  48. package/dist/retry.js +136 -0
  49. package/dist/retry.js.map +1 -0
  50. package/dist/runtime.cjs +58 -40
  51. package/dist/runtime.cjs.map +1 -1
  52. package/dist/runtime.d.cts +3 -0
  53. package/dist/runtime.d.ts +3 -0
  54. package/dist/runtime.js +45 -0
  55. package/dist/runtime.js.map +1 -0
  56. package/dist/string.cjs +76 -0
  57. package/dist/string.cjs.map +1 -0
  58. package/dist/string.d.cts +58 -0
  59. package/dist/string.d.ts +58 -0
  60. package/dist/string.js +72 -0
  61. package/dist/string.js.map +1 -0
  62. package/dist/terminal.cjs +426 -229
  63. package/dist/terminal.cjs.map +1 -1
  64. package/dist/terminal.d.cts +54 -24
  65. package/dist/terminal.d.ts +54 -24
  66. package/dist/terminal.js +441 -0
  67. package/dist/terminal.js.map +1 -0
  68. package/dist/url.cjs +25 -0
  69. package/dist/url.cjs.map +1 -0
  70. package/dist/url.d.cts +20 -0
  71. package/dist/url.d.ts +20 -0
  72. package/dist/url.js +24 -0
  73. package/dist/url.js.map +1 -0
  74. package/dist/validation.cjs +10486 -190
  75. package/dist/validation.cjs.map +1 -1
  76. package/dist/validation.d.cts +128 -94
  77. package/dist/validation.d.ts +128 -94
  78. package/dist/validation.js +10482 -0
  79. package/dist/validation.js.map +1 -0
  80. package/package.json +6 -6
  81. package/dist/environment.mjs +0 -383
  82. package/dist/environment.mjs.map +0 -1
  83. package/dist/filesystem.mjs +0 -105
  84. package/dist/filesystem.mjs.map +0 -1
  85. package/dist/http.mjs +0 -63
  86. package/dist/http.mjs.map +0 -1
  87. package/dist/index.mjs +0 -90
  88. package/dist/index.mjs.map +0 -1
  89. package/dist/logging.mjs +0 -123
  90. package/dist/logging.mjs.map +0 -1
  91. package/dist/package-manager.mjs +0 -167
  92. package/dist/package-manager.mjs.map +0 -1
  93. package/dist/runtime.mjs +0 -23
  94. package/dist/runtime.mjs.map +0 -1
  95. package/dist/terminal.mjs +0 -230
  96. package/dist/terminal.mjs.map +0 -1
  97. package/dist/validation.mjs +0 -159
  98. package/dist/validation.mjs.map +0 -1
@@ -1,5 +1,20 @@
1
- import { PathLike } from 'node:fs';
1
+ import { PathLike } from "node:fs";
2
2
 
3
+ //#region src/filesystem/project-root.d.ts
4
+ /**
5
+ * Finds the root directory of the current project by locating the nearest package.json file
6
+ *
7
+ * @param fallbackToCwd - If true, will return the current working directory if no package.json is found
8
+ * @param cwd - The directory to start searching for the package.json file from (defaults to process.cwd())
9
+ * @returns Promise that resolves to the absolute path of the project root directory
10
+ * @throws Will throw an error if no package.json is found in the directory tree
11
+ * @example
12
+ * import { projectRoot } from "@settlemint/sdk-utils/filesystem";
13
+ *
14
+ * // Get project root path
15
+ * const rootDir = await projectRoot();
16
+ * console.log(`Project root is at: ${rootDir}`);
17
+ */
3
18
  /**
4
19
  * Finds the root directory of the current project by locating the nearest package.json file
5
20
  *
@@ -16,6 +31,8 @@ import { PathLike } from 'node:fs';
16
31
  */
17
32
  declare function projectRoot(fallbackToCwd?: boolean, cwd?: string): Promise<string>;
18
33
 
34
+ //#endregion
35
+ //#region src/filesystem/exists.d.ts
19
36
  /**
20
37
  * Checks if a file or directory exists at the given path
21
38
  *
@@ -31,6 +48,8 @@ declare function projectRoot(fallbackToCwd?: boolean, cwd?: string): Promise<str
31
48
  */
32
49
  declare function exists(path: PathLike): Promise<boolean>;
33
50
 
51
+ //#endregion
52
+ //#region src/filesystem/mono-repo.d.ts
34
53
  /**
35
54
  * Finds the root directory of a monorepo
36
55
  *
@@ -56,4 +75,6 @@ declare function findMonoRepoRoot(startDir: string): Promise<string | null>;
56
75
  */
57
76
  declare function findMonoRepoPackages(projectDir: string): Promise<string[]>;
58
77
 
78
+ //#endregion
59
79
  export { exists, findMonoRepoPackages, findMonoRepoRoot, projectRoot };
80
+ //# sourceMappingURL=filesystem.d.cts.map
@@ -1,5 +1,20 @@
1
- import { PathLike } from 'node:fs';
1
+ import { PathLike } from "node:fs";
2
2
 
3
+ //#region src/filesystem/project-root.d.ts
4
+ /**
5
+ * Finds the root directory of the current project by locating the nearest package.json file
6
+ *
7
+ * @param fallbackToCwd - If true, will return the current working directory if no package.json is found
8
+ * @param cwd - The directory to start searching for the package.json file from (defaults to process.cwd())
9
+ * @returns Promise that resolves to the absolute path of the project root directory
10
+ * @throws Will throw an error if no package.json is found in the directory tree
11
+ * @example
12
+ * import { projectRoot } from "@settlemint/sdk-utils/filesystem";
13
+ *
14
+ * // Get project root path
15
+ * const rootDir = await projectRoot();
16
+ * console.log(`Project root is at: ${rootDir}`);
17
+ */
3
18
  /**
4
19
  * Finds the root directory of the current project by locating the nearest package.json file
5
20
  *
@@ -16,6 +31,8 @@ import { PathLike } from 'node:fs';
16
31
  */
17
32
  declare function projectRoot(fallbackToCwd?: boolean, cwd?: string): Promise<string>;
18
33
 
34
+ //#endregion
35
+ //#region src/filesystem/exists.d.ts
19
36
  /**
20
37
  * Checks if a file or directory exists at the given path
21
38
  *
@@ -31,6 +48,8 @@ declare function projectRoot(fallbackToCwd?: boolean, cwd?: string): Promise<str
31
48
  */
32
49
  declare function exists(path: PathLike): Promise<boolean>;
33
50
 
51
+ //#endregion
52
+ //#region src/filesystem/mono-repo.d.ts
34
53
  /**
35
54
  * Finds the root directory of a monorepo
36
55
  *
@@ -56,4 +75,6 @@ declare function findMonoRepoRoot(startDir: string): Promise<string | null>;
56
75
  */
57
76
  declare function findMonoRepoPackages(projectDir: string): Promise<string[]>;
58
77
 
78
+ //#endregion
59
79
  export { exists, findMonoRepoPackages, findMonoRepoRoot, projectRoot };
80
+ //# sourceMappingURL=filesystem.d.ts.map