@stryke/prisma-better-auth-generator 0.12.3 → 0.13.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.
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/cjs_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/cjs_shims.js
31
31
  var init_cjs_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/cjs_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/cjs_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -4727,20 +4727,16 @@ function titleCase(input) {
4727
4727
  if (!input) {
4728
4728
  return input;
4729
4729
  }
4730
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.find((a) => a.toUpperCase() === s.toUpperCase()) || upperCaseFirst(s.toLowerCase())).join(" ");
4730
+ const formatSegment = /* @__PURE__ */ __name((segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word) => {
4731
+ if (ACRONYMS.includes(word.toUpperCase())) {
4732
+ return word.toUpperCase();
4733
+ }
4734
+ return `${upperCaseFirst(word.toLowerCase())}`;
4735
+ }).join(" "), "formatSegment");
4736
+ return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
4731
4737
  }
4732
4738
  __name(titleCase, "titleCase");
4733
4739
 
4734
- // ../type-checks/src/is-string.ts
4735
- init_cjs_shims();
4736
- var isString = /* @__PURE__ */ __name((value) => {
4737
- try {
4738
- return typeof value === "string";
4739
- } catch {
4740
- return false;
4741
- }
4742
- }, "isString");
4743
-
4744
4740
  // ../env/src/get-env-paths.ts
4745
4741
  var import_node_os = __toESM(require("node:os"), 1);
4746
4742
  var import_node_path = __toESM(require("node:path"), 1);
@@ -4787,7 +4783,7 @@ function getEnvPaths(options = {}) {
4787
4783
  throw new Error("You need to provide an orgId to the `getEnvPaths` function");
4788
4784
  }
4789
4785
  if (options.suffix) {
4790
- orgId += `-${isString(options.suffix) ? options.suffix : "nodejs"}`;
4786
+ orgId += `-${typeof options.suffix === "string" ? options.suffix : "nodejs"}`;
4791
4787
  }
4792
4788
  let result = {};
4793
4789
  if (process.platform === "darwin") {
@@ -4830,10 +4826,35 @@ __name(getEnvPaths, "getEnvPaths");
4830
4826
  // ../path/src/get-workspace-root.ts
4831
4827
  init_cjs_shims();
4832
4828
 
4833
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
4829
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/index.js
4830
+ init_cjs_shims();
4831
+
4832
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4834
4833
  init_cjs_shims();
4835
4834
 
4836
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4835
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4836
+ init_cjs_shims();
4837
+ var import_node_fs2 = require("node:fs");
4838
+ var import_node_path2 = require("node:path");
4839
+ var MAX_PATH_SEARCH_DEPTH = 30;
4840
+ var depth = 0;
4841
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4842
+ const _startPath = startPath ?? process.cwd();
4843
+ if (endDirectoryNames.some((endDirName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endDirName)))) {
4844
+ return _startPath;
4845
+ }
4846
+ if (endFileNames.some((endFileName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
4847
+ return _startPath;
4848
+ }
4849
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4850
+ const parent = (0, import_node_path2.join)(_startPath, "..");
4851
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
4852
+ }
4853
+ return void 0;
4854
+ }
4855
+ __name(findFolderUp, "findFolderUp");
4856
+
4857
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4837
4858
  init_cjs_shims();
4838
4859
  var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
4839
4860
  function normalizeWindowsPath2(input = "") {
@@ -4940,32 +4961,7 @@ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
4940
4961
  return _IS_ABSOLUTE_RE2.test(p);
4941
4962
  }, "isAbsolute");
4942
4963
 
4943
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4944
- init_cjs_shims();
4945
-
4946
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4947
- init_cjs_shims();
4948
- var import_node_fs2 = require("node:fs");
4949
- var import_node_path2 = require("node:path");
4950
- var MAX_PATH_SEARCH_DEPTH = 30;
4951
- var depth = 0;
4952
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4953
- const _startPath = startPath ?? process.cwd();
4954
- if (endDirectoryNames.some((endDirName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endDirName)))) {
4955
- return _startPath;
4956
- }
4957
- if (endFileNames.some((endFileName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
4958
- return _startPath;
4959
- }
4960
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4961
- const parent = (0, import_node_path2.join)(_startPath, "..");
4962
- return findFolderUp(parent, endFileNames, endDirectoryNames);
4963
- }
4964
- return void 0;
4965
- }
4966
- __name(findFolderUp, "findFolderUp");
4967
-
4968
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4964
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4969
4965
  var rootFiles = [
4970
4966
  "storm-workspace.json",
4971
4967
  "storm-workspace.json",
@@ -5019,31 +5015,15 @@ __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
5019
5015
  // ../path/src/get-parent-path.ts
5020
5016
  init_cjs_shims();
5021
5017
 
5022
- // ../path/src/file-path-fns.ts
5023
- init_cjs_shims();
5024
-
5025
- // ../types/src/base.ts
5026
- init_cjs_shims();
5027
- var $NestedValue = Symbol("NestedValue");
5028
-
5029
- // ../path/src/correct-path.ts
5030
- init_cjs_shims();
5031
-
5032
5018
  // ../path/src/is-file.ts
5033
5019
  init_cjs_shims();
5034
5020
  var import_node_fs3 = require("node:fs");
5035
5021
 
5036
5022
  // ../path/src/regex.ts
5037
5023
  init_cjs_shims();
5038
- var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
5039
- var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
5040
5024
 
5041
5025
  // ../path/src/slash.ts
5042
5026
  init_cjs_shims();
5043
- function slash(str) {
5044
- return str.replace(/\\/g, "/");
5045
- }
5046
- __name(slash, "slash");
5047
5027
 
5048
5028
  // ../path/src/is-file.ts
5049
5029
  function isFile(path2, additionalPath) {
@@ -5058,109 +5038,14 @@ function isDirectory(path2, additionalPath) {
5058
5038
  })?.isDirectory());
5059
5039
  }
5060
5040
  __name(isDirectory, "isDirectory");
5061
- function isAbsolutePath(path2) {
5062
- return ABSOLUTE_PATH_REGEX.test(slash(path2));
5063
- }
5064
- __name(isAbsolutePath, "isAbsolutePath");
5065
-
5066
- // ../path/src/correct-path.ts
5067
- function normalizeWindowsPath3(input = "") {
5068
- if (!input) {
5069
- return input;
5070
- }
5071
- return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
5072
- }
5073
- __name(normalizeWindowsPath3, "normalizeWindowsPath");
5074
- function normalizeString3(path2, allowAboveRoot) {
5075
- let res = "";
5076
- let lastSegmentLength = 0;
5077
- let lastSlash = -1;
5078
- let dots = 0;
5079
- let char = null;
5080
- for (let index = 0; index <= path2.length; ++index) {
5081
- if (index < path2.length) {
5082
- char = path2[index];
5083
- } else if (char === "/") {
5084
- break;
5085
- } else {
5086
- char = "/";
5087
- }
5088
- if (char === "/") {
5089
- if (lastSlash === index - 1 || dots === 1) {
5090
- } else if (dots === 2) {
5091
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
5092
- if (res.length > 2) {
5093
- const lastSlashIndex = res.lastIndexOf("/");
5094
- if (lastSlashIndex === -1) {
5095
- res = "";
5096
- lastSegmentLength = 0;
5097
- } else {
5098
- res = res.slice(0, lastSlashIndex);
5099
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
5100
- }
5101
- lastSlash = index;
5102
- dots = 0;
5103
- continue;
5104
- } else if (res.length > 0) {
5105
- res = "";
5106
- lastSegmentLength = 0;
5107
- lastSlash = index;
5108
- dots = 0;
5109
- continue;
5110
- }
5111
- }
5112
- if (allowAboveRoot) {
5113
- res += res.length > 0 ? "/.." : "..";
5114
- lastSegmentLength = 2;
5115
- }
5116
- } else {
5117
- if (res.length > 0) {
5118
- res += `/${path2.slice(lastSlash + 1, index)}`;
5119
- } else {
5120
- res = path2.slice(lastSlash + 1, index);
5121
- }
5122
- lastSegmentLength = index - lastSlash - 1;
5123
- }
5124
- lastSlash = index;
5125
- dots = 0;
5126
- } else if (char === "." && dots !== -1) {
5127
- ++dots;
5128
- } else {
5129
- dots = -1;
5130
- }
5131
- }
5132
- return res;
5133
- }
5134
- __name(normalizeString3, "normalizeString");
5135
-
5136
- // ../path/src/file-path-fns.ts
5137
- function resolvePath(path2, cwd = getWorkspaceRoot()) {
5138
- const paths = normalizeWindowsPath3(path2).split("/");
5139
- let resolvedPath = "";
5140
- let resolvedAbsolute = false;
5141
- for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
5142
- const path3 = index >= 0 ? paths[index] : cwd;
5143
- if (!path3 || path3.length === 0) {
5144
- continue;
5145
- }
5146
- resolvedPath = joinPaths(path3, resolvedPath);
5147
- resolvedAbsolute = isAbsolutePath(path3);
5148
- }
5149
- resolvedPath = normalizeString3(resolvedPath, !resolvedAbsolute);
5150
- if (resolvedAbsolute && !isAbsolutePath(resolvedPath)) {
5151
- return `/${resolvedPath}`;
5152
- }
5153
- return resolvedPath.length > 0 ? resolvedPath : ".";
5154
- }
5155
- __name(resolvePath, "resolvePath");
5156
- function resolvePaths(...paths) {
5157
- return resolvePath(joinPaths(...paths.map((path2) => normalizeWindowsPath3(path2))));
5158
- }
5159
- __name(resolvePaths, "resolvePaths");
5160
5041
 
5161
5042
  // ../path/src/get-parent-path.ts
5162
- var resolveParentPath = /* @__PURE__ */ __name((path2) => {
5163
- return resolvePaths(path2, "..");
5043
+ var resolveParentPath = /* @__PURE__ */ __name((path2, count = 1) => {
5044
+ let parentPath = path2.replaceAll(/\/+$/g, "");
5045
+ for (let i = 0; i < count; i++) {
5046
+ parentPath = joinPaths(parentPath, "..");
5047
+ }
5048
+ return parentPath;
5164
5049
  }, "resolveParentPath");
5165
5050
  var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
5166
5051
  const ignoreCase = options?.ignoreCase ?? true;
package/dist/generator.js CHANGED
@@ -6,9 +6,9 @@ var __esm = (fn, res) => function __init() {
6
6
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
7
7
  };
8
8
 
9
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/esm_shims.js
9
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js
10
10
  var init_esm_shims = __esm({
11
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/esm_shims.js"() {
11
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js"() {
12
12
  "use strict";
13
13
  }
14
14
  });
@@ -4706,20 +4706,16 @@ function titleCase(input) {
4706
4706
  if (!input) {
4707
4707
  return input;
4708
4708
  }
4709
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.find((a) => a.toUpperCase() === s.toUpperCase()) || upperCaseFirst(s.toLowerCase())).join(" ");
4709
+ const formatSegment = /* @__PURE__ */ __name((segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word) => {
4710
+ if (ACRONYMS.includes(word.toUpperCase())) {
4711
+ return word.toUpperCase();
4712
+ }
4713
+ return `${upperCaseFirst(word.toLowerCase())}`;
4714
+ }).join(" "), "formatSegment");
4715
+ return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
4710
4716
  }
4711
4717
  __name(titleCase, "titleCase");
4712
4718
 
4713
- // ../type-checks/src/is-string.ts
4714
- init_esm_shims();
4715
- var isString = /* @__PURE__ */ __name((value) => {
4716
- try {
4717
- return typeof value === "string";
4718
- } catch {
4719
- return false;
4720
- }
4721
- }, "isString");
4722
-
4723
4719
  // ../env/src/get-env-paths.ts
4724
4720
  import os from "node:os";
4725
4721
  import path from "node:path";
@@ -4766,7 +4762,7 @@ function getEnvPaths(options = {}) {
4766
4762
  throw new Error("You need to provide an orgId to the `getEnvPaths` function");
4767
4763
  }
4768
4764
  if (options.suffix) {
4769
- orgId += `-${isString(options.suffix) ? options.suffix : "nodejs"}`;
4765
+ orgId += `-${typeof options.suffix === "string" ? options.suffix : "nodejs"}`;
4770
4766
  }
4771
4767
  let result = {};
4772
4768
  if (process.platform === "darwin") {
@@ -4809,10 +4805,35 @@ __name(getEnvPaths, "getEnvPaths");
4809
4805
  // ../path/src/get-workspace-root.ts
4810
4806
  init_esm_shims();
4811
4807
 
4812
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
4808
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/index.js
4809
+ init_esm_shims();
4810
+
4811
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4813
4812
  init_esm_shims();
4814
4813
 
4815
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4814
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4815
+ init_esm_shims();
4816
+ import { existsSync as existsSync2 } from "node:fs";
4817
+ import { join } from "node:path";
4818
+ var MAX_PATH_SEARCH_DEPTH = 30;
4819
+ var depth = 0;
4820
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4821
+ const _startPath = startPath ?? process.cwd();
4822
+ if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
4823
+ return _startPath;
4824
+ }
4825
+ if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
4826
+ return _startPath;
4827
+ }
4828
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4829
+ const parent = join(_startPath, "..");
4830
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
4831
+ }
4832
+ return void 0;
4833
+ }
4834
+ __name(findFolderUp, "findFolderUp");
4835
+
4836
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4816
4837
  init_esm_shims();
4817
4838
  var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
4818
4839
  function normalizeWindowsPath2(input = "") {
@@ -4919,32 +4940,7 @@ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
4919
4940
  return _IS_ABSOLUTE_RE2.test(p);
4920
4941
  }, "isAbsolute");
4921
4942
 
4922
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4923
- init_esm_shims();
4924
-
4925
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4926
- init_esm_shims();
4927
- import { existsSync as existsSync2 } from "node:fs";
4928
- import { join } from "node:path";
4929
- var MAX_PATH_SEARCH_DEPTH = 30;
4930
- var depth = 0;
4931
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4932
- const _startPath = startPath ?? process.cwd();
4933
- if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
4934
- return _startPath;
4935
- }
4936
- if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
4937
- return _startPath;
4938
- }
4939
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4940
- const parent = join(_startPath, "..");
4941
- return findFolderUp(parent, endFileNames, endDirectoryNames);
4942
- }
4943
- return void 0;
4944
- }
4945
- __name(findFolderUp, "findFolderUp");
4946
-
4947
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4943
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4948
4944
  var rootFiles = [
4949
4945
  "storm-workspace.json",
4950
4946
  "storm-workspace.json",
@@ -4998,31 +4994,15 @@ __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
4998
4994
  // ../path/src/get-parent-path.ts
4999
4995
  init_esm_shims();
5000
4996
 
5001
- // ../path/src/file-path-fns.ts
5002
- init_esm_shims();
5003
-
5004
- // ../types/src/base.ts
5005
- init_esm_shims();
5006
- var $NestedValue = Symbol("NestedValue");
5007
-
5008
- // ../path/src/correct-path.ts
5009
- init_esm_shims();
5010
-
5011
4997
  // ../path/src/is-file.ts
5012
4998
  init_esm_shims();
5013
4999
  import { lstatSync, statSync } from "node:fs";
5014
5000
 
5015
5001
  // ../path/src/regex.ts
5016
5002
  init_esm_shims();
5017
- var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
5018
- var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
5019
5003
 
5020
5004
  // ../path/src/slash.ts
5021
5005
  init_esm_shims();
5022
- function slash(str) {
5023
- return str.replace(/\\/g, "/");
5024
- }
5025
- __name(slash, "slash");
5026
5006
 
5027
5007
  // ../path/src/is-file.ts
5028
5008
  function isFile(path2, additionalPath) {
@@ -5037,109 +5017,14 @@ function isDirectory(path2, additionalPath) {
5037
5017
  })?.isDirectory());
5038
5018
  }
5039
5019
  __name(isDirectory, "isDirectory");
5040
- function isAbsolutePath(path2) {
5041
- return ABSOLUTE_PATH_REGEX.test(slash(path2));
5042
- }
5043
- __name(isAbsolutePath, "isAbsolutePath");
5044
-
5045
- // ../path/src/correct-path.ts
5046
- function normalizeWindowsPath3(input = "") {
5047
- if (!input) {
5048
- return input;
5049
- }
5050
- return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
5051
- }
5052
- __name(normalizeWindowsPath3, "normalizeWindowsPath");
5053
- function normalizeString3(path2, allowAboveRoot) {
5054
- let res = "";
5055
- let lastSegmentLength = 0;
5056
- let lastSlash = -1;
5057
- let dots = 0;
5058
- let char = null;
5059
- for (let index = 0; index <= path2.length; ++index) {
5060
- if (index < path2.length) {
5061
- char = path2[index];
5062
- } else if (char === "/") {
5063
- break;
5064
- } else {
5065
- char = "/";
5066
- }
5067
- if (char === "/") {
5068
- if (lastSlash === index - 1 || dots === 1) {
5069
- } else if (dots === 2) {
5070
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
5071
- if (res.length > 2) {
5072
- const lastSlashIndex = res.lastIndexOf("/");
5073
- if (lastSlashIndex === -1) {
5074
- res = "";
5075
- lastSegmentLength = 0;
5076
- } else {
5077
- res = res.slice(0, lastSlashIndex);
5078
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
5079
- }
5080
- lastSlash = index;
5081
- dots = 0;
5082
- continue;
5083
- } else if (res.length > 0) {
5084
- res = "";
5085
- lastSegmentLength = 0;
5086
- lastSlash = index;
5087
- dots = 0;
5088
- continue;
5089
- }
5090
- }
5091
- if (allowAboveRoot) {
5092
- res += res.length > 0 ? "/.." : "..";
5093
- lastSegmentLength = 2;
5094
- }
5095
- } else {
5096
- if (res.length > 0) {
5097
- res += `/${path2.slice(lastSlash + 1, index)}`;
5098
- } else {
5099
- res = path2.slice(lastSlash + 1, index);
5100
- }
5101
- lastSegmentLength = index - lastSlash - 1;
5102
- }
5103
- lastSlash = index;
5104
- dots = 0;
5105
- } else if (char === "." && dots !== -1) {
5106
- ++dots;
5107
- } else {
5108
- dots = -1;
5109
- }
5110
- }
5111
- return res;
5112
- }
5113
- __name(normalizeString3, "normalizeString");
5114
-
5115
- // ../path/src/file-path-fns.ts
5116
- function resolvePath(path2, cwd = getWorkspaceRoot()) {
5117
- const paths = normalizeWindowsPath3(path2).split("/");
5118
- let resolvedPath = "";
5119
- let resolvedAbsolute = false;
5120
- for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
5121
- const path3 = index >= 0 ? paths[index] : cwd;
5122
- if (!path3 || path3.length === 0) {
5123
- continue;
5124
- }
5125
- resolvedPath = joinPaths(path3, resolvedPath);
5126
- resolvedAbsolute = isAbsolutePath(path3);
5127
- }
5128
- resolvedPath = normalizeString3(resolvedPath, !resolvedAbsolute);
5129
- if (resolvedAbsolute && !isAbsolutePath(resolvedPath)) {
5130
- return `/${resolvedPath}`;
5131
- }
5132
- return resolvedPath.length > 0 ? resolvedPath : ".";
5133
- }
5134
- __name(resolvePath, "resolvePath");
5135
- function resolvePaths(...paths) {
5136
- return resolvePath(joinPaths(...paths.map((path2) => normalizeWindowsPath3(path2))));
5137
- }
5138
- __name(resolvePaths, "resolvePaths");
5139
5020
 
5140
5021
  // ../path/src/get-parent-path.ts
5141
- var resolveParentPath = /* @__PURE__ */ __name((path2) => {
5142
- return resolvePaths(path2, "..");
5022
+ var resolveParentPath = /* @__PURE__ */ __name((path2, count = 1) => {
5023
+ let parentPath = path2.replaceAll(/\/+$/g, "");
5024
+ for (let i = 0; i < count; i++) {
5025
+ parentPath = joinPaths(parentPath, "..");
5026
+ }
5027
+ return parentPath;
5143
5028
  }, "resolveParentPath");
5144
5029
  var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
5145
5030
  const ignoreCase = options?.ignoreCase ?? true;
package/dist/index.cjs CHANGED
@@ -26,9 +26,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
 
29
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/cjs_shims.js
29
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/cjs_shims.js
30
30
  var init_cjs_shims = __esm({
31
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/cjs_shims.js"() {
31
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/cjs_shims.js"() {
32
32
  "use strict";
33
33
  }
34
34
  });
@@ -4723,20 +4723,16 @@ function titleCase(input) {
4723
4723
  if (!input) {
4724
4724
  return input;
4725
4725
  }
4726
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.find((a) => a.toUpperCase() === s.toUpperCase()) || upperCaseFirst(s.toLowerCase())).join(" ");
4726
+ const formatSegment = /* @__PURE__ */ __name((segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word) => {
4727
+ if (ACRONYMS.includes(word.toUpperCase())) {
4728
+ return word.toUpperCase();
4729
+ }
4730
+ return `${upperCaseFirst(word.toLowerCase())}`;
4731
+ }).join(" "), "formatSegment");
4732
+ return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
4727
4733
  }
4728
4734
  __name(titleCase, "titleCase");
4729
4735
 
4730
- // ../type-checks/src/is-string.ts
4731
- init_cjs_shims();
4732
- var isString = /* @__PURE__ */ __name((value) => {
4733
- try {
4734
- return typeof value === "string";
4735
- } catch {
4736
- return false;
4737
- }
4738
- }, "isString");
4739
-
4740
4736
  // ../env/src/get-env-paths.ts
4741
4737
  var import_node_os = __toESM(require("node:os"), 1);
4742
4738
  var import_node_path = __toESM(require("node:path"), 1);
@@ -4783,7 +4779,7 @@ function getEnvPaths(options = {}) {
4783
4779
  throw new Error("You need to provide an orgId to the `getEnvPaths` function");
4784
4780
  }
4785
4781
  if (options.suffix) {
4786
- orgId += `-${isString(options.suffix) ? options.suffix : "nodejs"}`;
4782
+ orgId += `-${typeof options.suffix === "string" ? options.suffix : "nodejs"}`;
4787
4783
  }
4788
4784
  let result = {};
4789
4785
  if (process.platform === "darwin") {
@@ -4826,10 +4822,35 @@ __name(getEnvPaths, "getEnvPaths");
4826
4822
  // ../path/src/get-workspace-root.ts
4827
4823
  init_cjs_shims();
4828
4824
 
4829
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
4825
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/index.js
4826
+ init_cjs_shims();
4827
+
4828
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4830
4829
  init_cjs_shims();
4831
4830
 
4832
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4831
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4832
+ init_cjs_shims();
4833
+ var import_node_fs2 = require("node:fs");
4834
+ var import_node_path2 = require("node:path");
4835
+ var MAX_PATH_SEARCH_DEPTH = 30;
4836
+ var depth = 0;
4837
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4838
+ const _startPath = startPath ?? process.cwd();
4839
+ if (endDirectoryNames.some((endDirName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endDirName)))) {
4840
+ return _startPath;
4841
+ }
4842
+ if (endFileNames.some((endFileName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
4843
+ return _startPath;
4844
+ }
4845
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4846
+ const parent = (0, import_node_path2.join)(_startPath, "..");
4847
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
4848
+ }
4849
+ return void 0;
4850
+ }
4851
+ __name(findFolderUp, "findFolderUp");
4852
+
4853
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4833
4854
  init_cjs_shims();
4834
4855
  var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
4835
4856
  function normalizeWindowsPath2(input = "") {
@@ -4936,32 +4957,7 @@ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
4936
4957
  return _IS_ABSOLUTE_RE2.test(p);
4937
4958
  }, "isAbsolute");
4938
4959
 
4939
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4940
- init_cjs_shims();
4941
-
4942
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4943
- init_cjs_shims();
4944
- var import_node_fs2 = require("node:fs");
4945
- var import_node_path2 = require("node:path");
4946
- var MAX_PATH_SEARCH_DEPTH = 30;
4947
- var depth = 0;
4948
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4949
- const _startPath = startPath ?? process.cwd();
4950
- if (endDirectoryNames.some((endDirName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endDirName)))) {
4951
- return _startPath;
4952
- }
4953
- if (endFileNames.some((endFileName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
4954
- return _startPath;
4955
- }
4956
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4957
- const parent = (0, import_node_path2.join)(_startPath, "..");
4958
- return findFolderUp(parent, endFileNames, endDirectoryNames);
4959
- }
4960
- return void 0;
4961
- }
4962
- __name(findFolderUp, "findFolderUp");
4963
-
4964
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4960
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4965
4961
  var rootFiles = [
4966
4962
  "storm-workspace.json",
4967
4963
  "storm-workspace.json",
@@ -5015,31 +5011,15 @@ __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
5015
5011
  // ../path/src/get-parent-path.ts
5016
5012
  init_cjs_shims();
5017
5013
 
5018
- // ../path/src/file-path-fns.ts
5019
- init_cjs_shims();
5020
-
5021
- // ../types/src/base.ts
5022
- init_cjs_shims();
5023
- var $NestedValue = Symbol("NestedValue");
5024
-
5025
- // ../path/src/correct-path.ts
5026
- init_cjs_shims();
5027
-
5028
5014
  // ../path/src/is-file.ts
5029
5015
  init_cjs_shims();
5030
5016
  var import_node_fs3 = require("node:fs");
5031
5017
 
5032
5018
  // ../path/src/regex.ts
5033
5019
  init_cjs_shims();
5034
- var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
5035
- var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
5036
5020
 
5037
5021
  // ../path/src/slash.ts
5038
5022
  init_cjs_shims();
5039
- function slash(str) {
5040
- return str.replace(/\\/g, "/");
5041
- }
5042
- __name(slash, "slash");
5043
5023
 
5044
5024
  // ../path/src/is-file.ts
5045
5025
  function isFile(path2, additionalPath) {
@@ -5054,109 +5034,14 @@ function isDirectory(path2, additionalPath) {
5054
5034
  })?.isDirectory());
5055
5035
  }
5056
5036
  __name(isDirectory, "isDirectory");
5057
- function isAbsolutePath(path2) {
5058
- return ABSOLUTE_PATH_REGEX.test(slash(path2));
5059
- }
5060
- __name(isAbsolutePath, "isAbsolutePath");
5061
-
5062
- // ../path/src/correct-path.ts
5063
- function normalizeWindowsPath3(input = "") {
5064
- if (!input) {
5065
- return input;
5066
- }
5067
- return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
5068
- }
5069
- __name(normalizeWindowsPath3, "normalizeWindowsPath");
5070
- function normalizeString3(path2, allowAboveRoot) {
5071
- let res = "";
5072
- let lastSegmentLength = 0;
5073
- let lastSlash = -1;
5074
- let dots = 0;
5075
- let char = null;
5076
- for (let index = 0; index <= path2.length; ++index) {
5077
- if (index < path2.length) {
5078
- char = path2[index];
5079
- } else if (char === "/") {
5080
- break;
5081
- } else {
5082
- char = "/";
5083
- }
5084
- if (char === "/") {
5085
- if (lastSlash === index - 1 || dots === 1) {
5086
- } else if (dots === 2) {
5087
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
5088
- if (res.length > 2) {
5089
- const lastSlashIndex = res.lastIndexOf("/");
5090
- if (lastSlashIndex === -1) {
5091
- res = "";
5092
- lastSegmentLength = 0;
5093
- } else {
5094
- res = res.slice(0, lastSlashIndex);
5095
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
5096
- }
5097
- lastSlash = index;
5098
- dots = 0;
5099
- continue;
5100
- } else if (res.length > 0) {
5101
- res = "";
5102
- lastSegmentLength = 0;
5103
- lastSlash = index;
5104
- dots = 0;
5105
- continue;
5106
- }
5107
- }
5108
- if (allowAboveRoot) {
5109
- res += res.length > 0 ? "/.." : "..";
5110
- lastSegmentLength = 2;
5111
- }
5112
- } else {
5113
- if (res.length > 0) {
5114
- res += `/${path2.slice(lastSlash + 1, index)}`;
5115
- } else {
5116
- res = path2.slice(lastSlash + 1, index);
5117
- }
5118
- lastSegmentLength = index - lastSlash - 1;
5119
- }
5120
- lastSlash = index;
5121
- dots = 0;
5122
- } else if (char === "." && dots !== -1) {
5123
- ++dots;
5124
- } else {
5125
- dots = -1;
5126
- }
5127
- }
5128
- return res;
5129
- }
5130
- __name(normalizeString3, "normalizeString");
5131
-
5132
- // ../path/src/file-path-fns.ts
5133
- function resolvePath(path2, cwd = getWorkspaceRoot()) {
5134
- const paths = normalizeWindowsPath3(path2).split("/");
5135
- let resolvedPath = "";
5136
- let resolvedAbsolute = false;
5137
- for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
5138
- const path3 = index >= 0 ? paths[index] : cwd;
5139
- if (!path3 || path3.length === 0) {
5140
- continue;
5141
- }
5142
- resolvedPath = joinPaths(path3, resolvedPath);
5143
- resolvedAbsolute = isAbsolutePath(path3);
5144
- }
5145
- resolvedPath = normalizeString3(resolvedPath, !resolvedAbsolute);
5146
- if (resolvedAbsolute && !isAbsolutePath(resolvedPath)) {
5147
- return `/${resolvedPath}`;
5148
- }
5149
- return resolvedPath.length > 0 ? resolvedPath : ".";
5150
- }
5151
- __name(resolvePath, "resolvePath");
5152
- function resolvePaths(...paths) {
5153
- return resolvePath(joinPaths(...paths.map((path2) => normalizeWindowsPath3(path2))));
5154
- }
5155
- __name(resolvePaths, "resolvePaths");
5156
5037
 
5157
5038
  // ../path/src/get-parent-path.ts
5158
- var resolveParentPath = /* @__PURE__ */ __name((path2) => {
5159
- return resolvePaths(path2, "..");
5039
+ var resolveParentPath = /* @__PURE__ */ __name((path2, count = 1) => {
5040
+ let parentPath = path2.replaceAll(/\/+$/g, "");
5041
+ for (let i = 0; i < count; i++) {
5042
+ parentPath = joinPaths(parentPath, "..");
5043
+ }
5044
+ return parentPath;
5160
5045
  }, "resolveParentPath");
5161
5046
  var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
5162
5047
  const ignoreCase = options?.ignoreCase ?? true;
package/dist/index.js CHANGED
@@ -5,9 +5,9 @@ var __esm = (fn, res) => function __init() {
5
5
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
6
6
  };
7
7
 
8
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/esm_shims.js
8
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js
9
9
  var init_esm_shims = __esm({
10
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.1_@types+node@22.13.10__@swc+core@1.11.9_@swc+_59b77ee1c3f80f02138262a51f241204/node_modules/tsup/assets/esm_shims.js"() {
10
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js"() {
11
11
  "use strict";
12
12
  }
13
13
  });
@@ -4702,20 +4702,16 @@ function titleCase(input) {
4702
4702
  if (!input) {
4703
4703
  return input;
4704
4704
  }
4705
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.find((a) => a.toUpperCase() === s.toUpperCase()) || upperCaseFirst(s.toLowerCase())).join(" ");
4705
+ const formatSegment = /* @__PURE__ */ __name((segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word) => {
4706
+ if (ACRONYMS.includes(word.toUpperCase())) {
4707
+ return word.toUpperCase();
4708
+ }
4709
+ return `${upperCaseFirst(word.toLowerCase())}`;
4710
+ }).join(" "), "formatSegment");
4711
+ return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
4706
4712
  }
4707
4713
  __name(titleCase, "titleCase");
4708
4714
 
4709
- // ../type-checks/src/is-string.ts
4710
- init_esm_shims();
4711
- var isString = /* @__PURE__ */ __name((value) => {
4712
- try {
4713
- return typeof value === "string";
4714
- } catch {
4715
- return false;
4716
- }
4717
- }, "isString");
4718
-
4719
4715
  // ../env/src/get-env-paths.ts
4720
4716
  import os from "node:os";
4721
4717
  import path from "node:path";
@@ -4762,7 +4758,7 @@ function getEnvPaths(options = {}) {
4762
4758
  throw new Error("You need to provide an orgId to the `getEnvPaths` function");
4763
4759
  }
4764
4760
  if (options.suffix) {
4765
- orgId += `-${isString(options.suffix) ? options.suffix : "nodejs"}`;
4761
+ orgId += `-${typeof options.suffix === "string" ? options.suffix : "nodejs"}`;
4766
4762
  }
4767
4763
  let result = {};
4768
4764
  if (process.platform === "darwin") {
@@ -4805,10 +4801,35 @@ __name(getEnvPaths, "getEnvPaths");
4805
4801
  // ../path/src/get-workspace-root.ts
4806
4802
  init_esm_shims();
4807
4803
 
4808
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
4804
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/index.js
4805
+ init_esm_shims();
4806
+
4807
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4809
4808
  init_esm_shims();
4810
4809
 
4811
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4810
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4811
+ init_esm_shims();
4812
+ import { existsSync as existsSync2 } from "node:fs";
4813
+ import { join } from "node:path";
4814
+ var MAX_PATH_SEARCH_DEPTH = 30;
4815
+ var depth = 0;
4816
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4817
+ const _startPath = startPath ?? process.cwd();
4818
+ if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
4819
+ return _startPath;
4820
+ }
4821
+ if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
4822
+ return _startPath;
4823
+ }
4824
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4825
+ const parent = join(_startPath, "..");
4826
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
4827
+ }
4828
+ return void 0;
4829
+ }
4830
+ __name(findFolderUp, "findFolderUp");
4831
+
4832
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4812
4833
  init_esm_shims();
4813
4834
  var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
4814
4835
  function normalizeWindowsPath2(input = "") {
@@ -4915,32 +4936,7 @@ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
4915
4936
  return _IS_ABSOLUTE_RE2.test(p);
4916
4937
  }, "isAbsolute");
4917
4938
 
4918
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4919
- init_esm_shims();
4920
-
4921
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
4922
- init_esm_shims();
4923
- import { existsSync as existsSync2 } from "node:fs";
4924
- import { join } from "node:path";
4925
- var MAX_PATH_SEARCH_DEPTH = 30;
4926
- var depth = 0;
4927
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4928
- const _startPath = startPath ?? process.cwd();
4929
- if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
4930
- return _startPath;
4931
- }
4932
- if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
4933
- return _startPath;
4934
- }
4935
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4936
- const parent = join(_startPath, "..");
4937
- return findFolderUp(parent, endFileNames, endDirectoryNames);
4938
- }
4939
- return void 0;
4940
- }
4941
- __name(findFolderUp, "findFolderUp");
4942
-
4943
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4939
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
4944
4940
  var rootFiles = [
4945
4941
  "storm-workspace.json",
4946
4942
  "storm-workspace.json",
@@ -4994,31 +4990,15 @@ __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
4994
4990
  // ../path/src/get-parent-path.ts
4995
4991
  init_esm_shims();
4996
4992
 
4997
- // ../path/src/file-path-fns.ts
4998
- init_esm_shims();
4999
-
5000
- // ../types/src/base.ts
5001
- init_esm_shims();
5002
- var $NestedValue = Symbol("NestedValue");
5003
-
5004
- // ../path/src/correct-path.ts
5005
- init_esm_shims();
5006
-
5007
4993
  // ../path/src/is-file.ts
5008
4994
  init_esm_shims();
5009
4995
  import { lstatSync, statSync } from "node:fs";
5010
4996
 
5011
4997
  // ../path/src/regex.ts
5012
4998
  init_esm_shims();
5013
- var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
5014
- var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
5015
4999
 
5016
5000
  // ../path/src/slash.ts
5017
5001
  init_esm_shims();
5018
- function slash(str) {
5019
- return str.replace(/\\/g, "/");
5020
- }
5021
- __name(slash, "slash");
5022
5002
 
5023
5003
  // ../path/src/is-file.ts
5024
5004
  function isFile(path2, additionalPath) {
@@ -5033,109 +5013,14 @@ function isDirectory(path2, additionalPath) {
5033
5013
  })?.isDirectory());
5034
5014
  }
5035
5015
  __name(isDirectory, "isDirectory");
5036
- function isAbsolutePath(path2) {
5037
- return ABSOLUTE_PATH_REGEX.test(slash(path2));
5038
- }
5039
- __name(isAbsolutePath, "isAbsolutePath");
5040
-
5041
- // ../path/src/correct-path.ts
5042
- function normalizeWindowsPath3(input = "") {
5043
- if (!input) {
5044
- return input;
5045
- }
5046
- return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
5047
- }
5048
- __name(normalizeWindowsPath3, "normalizeWindowsPath");
5049
- function normalizeString3(path2, allowAboveRoot) {
5050
- let res = "";
5051
- let lastSegmentLength = 0;
5052
- let lastSlash = -1;
5053
- let dots = 0;
5054
- let char = null;
5055
- for (let index = 0; index <= path2.length; ++index) {
5056
- if (index < path2.length) {
5057
- char = path2[index];
5058
- } else if (char === "/") {
5059
- break;
5060
- } else {
5061
- char = "/";
5062
- }
5063
- if (char === "/") {
5064
- if (lastSlash === index - 1 || dots === 1) {
5065
- } else if (dots === 2) {
5066
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
5067
- if (res.length > 2) {
5068
- const lastSlashIndex = res.lastIndexOf("/");
5069
- if (lastSlashIndex === -1) {
5070
- res = "";
5071
- lastSegmentLength = 0;
5072
- } else {
5073
- res = res.slice(0, lastSlashIndex);
5074
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
5075
- }
5076
- lastSlash = index;
5077
- dots = 0;
5078
- continue;
5079
- } else if (res.length > 0) {
5080
- res = "";
5081
- lastSegmentLength = 0;
5082
- lastSlash = index;
5083
- dots = 0;
5084
- continue;
5085
- }
5086
- }
5087
- if (allowAboveRoot) {
5088
- res += res.length > 0 ? "/.." : "..";
5089
- lastSegmentLength = 2;
5090
- }
5091
- } else {
5092
- if (res.length > 0) {
5093
- res += `/${path2.slice(lastSlash + 1, index)}`;
5094
- } else {
5095
- res = path2.slice(lastSlash + 1, index);
5096
- }
5097
- lastSegmentLength = index - lastSlash - 1;
5098
- }
5099
- lastSlash = index;
5100
- dots = 0;
5101
- } else if (char === "." && dots !== -1) {
5102
- ++dots;
5103
- } else {
5104
- dots = -1;
5105
- }
5106
- }
5107
- return res;
5108
- }
5109
- __name(normalizeString3, "normalizeString");
5110
-
5111
- // ../path/src/file-path-fns.ts
5112
- function resolvePath(path2, cwd = getWorkspaceRoot()) {
5113
- const paths = normalizeWindowsPath3(path2).split("/");
5114
- let resolvedPath = "";
5115
- let resolvedAbsolute = false;
5116
- for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
5117
- const path3 = index >= 0 ? paths[index] : cwd;
5118
- if (!path3 || path3.length === 0) {
5119
- continue;
5120
- }
5121
- resolvedPath = joinPaths(path3, resolvedPath);
5122
- resolvedAbsolute = isAbsolutePath(path3);
5123
- }
5124
- resolvedPath = normalizeString3(resolvedPath, !resolvedAbsolute);
5125
- if (resolvedAbsolute && !isAbsolutePath(resolvedPath)) {
5126
- return `/${resolvedPath}`;
5127
- }
5128
- return resolvedPath.length > 0 ? resolvedPath : ".";
5129
- }
5130
- __name(resolvePath, "resolvePath");
5131
- function resolvePaths(...paths) {
5132
- return resolvePath(joinPaths(...paths.map((path2) => normalizeWindowsPath3(path2))));
5133
- }
5134
- __name(resolvePaths, "resolvePaths");
5135
5016
 
5136
5017
  // ../path/src/get-parent-path.ts
5137
- var resolveParentPath = /* @__PURE__ */ __name((path2) => {
5138
- return resolvePaths(path2, "..");
5018
+ var resolveParentPath = /* @__PURE__ */ __name((path2, count = 1) => {
5019
+ let parentPath = path2.replaceAll(/\/+$/g, "");
5020
+ for (let i = 0; i < count; i++) {
5021
+ parentPath = joinPaths(parentPath, "..");
5022
+ }
5023
+ return parentPath;
5139
5024
  }, "resolveParentPath");
5140
5025
  var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
5141
5026
  const ignoreCase = options?.ignoreCase ?? true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/prisma-better-auth-generator",
3
- "version": "0.12.3",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "description": "A package containing a Prisma v6 generator for Better-Auth authentication.",
6
6
  "repository": {