@stryke/prisma-better-auth-generator 0.12.2 → 0.12.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.
package/README.md CHANGED
@@ -22,7 +22,7 @@ This package is part of Storm Software's **đŸŒŠī¸ Stryke** monorepo. Stryke pac
22
22
 
23
23
  <h3 align="center">đŸ’ģ Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
24
24
 
25
- [![Version](https://img.shields.io/badge/version-0.12.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
+ [![Version](https://img.shields.io/badge/version-0.12.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
26
26
 
27
27
  > [!IMPORTANT] This repository, and the apps, libraries, and tools contained
28
28
  > within, is still in it's initial development phase. As a result, bugs and
@@ -50,6 +50,7 @@ A package containing a Prisma v6 generator for Better-Auth authentication
50
50
 
51
51
  <!-- START doctoc -->
52
52
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
53
+
53
54
  ## Table of Contents
54
55
 
55
56
  - [Installing](#installing)
@@ -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+_3224746ec47d1b8fe4ee6bf9861e331d/node_modules/tsup/assets/cjs_shims.js
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
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+_3224746ec47d1b8fe4ee6bf9861e331d/node_modules/tsup/assets/cjs_shims.js"() {
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"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -4519,46 +4519,200 @@ init_cjs_shims();
4519
4519
  // ../string-format/src/acronyms.ts
4520
4520
  init_cjs_shims();
4521
4521
  var ACRONYMS = [
4522
+ "3D",
4523
+ "4D",
4524
+ "5G",
4525
+ "6G",
4526
+ "7G",
4527
+ "8G",
4528
+ "ACID",
4529
+ "AES",
4530
+ "AI",
4531
+ "AJAX",
4522
4532
  "API",
4533
+ "AR",
4534
+ "ASCII",
4535
+ "B2B",
4536
+ "B2C",
4537
+ "BFF",
4538
+ "BI",
4539
+ "BIOS",
4540
+ "BGP",
4541
+ "BOM",
4542
+ "BYOD",
4543
+ "C2C",
4544
+ "CAGR",
4545
+ "CAPTCHA",
4546
+ "CD",
4547
+ "CDN",
4548
+ "CDP",
4549
+ "CI",
4550
+ "CI/CD",
4551
+ "CIAM",
4552
+ "CICD",
4553
+ "CLI",
4554
+ "CMDB",
4555
+ "CORS",
4523
4556
  "CPU",
4557
+ "CRUD",
4558
+ "CSR",
4524
4559
  "CSS",
4560
+ "CX",
4561
+ "DAG",
4562
+ "DBMS",
4563
+ "DDoS",
4525
4564
  "DNS",
4565
+ "DNSSEC",
4566
+ "DOM",
4567
+ "DR",
4568
+ "DRM",
4569
+ "DWH",
4570
+ "E2E",
4571
+ "EAI",
4572
+ "EKS",
4526
4573
  "EOF",
4574
+ "EOD",
4575
+ "ETC",
4576
+ "ETL",
4577
+ "EULA",
4578
+ "FIDO",
4579
+ "FQDN",
4580
+ "FTP",
4581
+ "FaaS",
4582
+ "GDPR",
4583
+ "GCP",
4584
+ "GPU",
4527
4585
  "GUID",
4586
+ "GUI",
4587
+ "GZIP",
4588
+ "HCI",
4589
+ "HDD",
4590
+ "HDFS",
4591
+ "HIPAA",
4592
+ "HMAC",
4593
+ "HOTP",
4594
+ "HSM",
4528
4595
  "HTML",
4529
4596
  "HTTP",
4597
+ "HTTP/2",
4598
+ "HTTP/2.0",
4599
+ "HTTP/3",
4600
+ "HTTP/3.0",
4601
+ "HTTP2",
4530
4602
  "HTTPS",
4603
+ "HTTPS/2",
4604
+ "HTTPS/3",
4605
+ "HTTPS3",
4606
+ "IAM",
4607
+ "IAMM",
4608
+ "IAMT",
4609
+ "IaaS",
4531
4610
  "ID",
4611
+ "IMAP",
4532
4612
  "IP",
4613
+ "IPFS",
4614
+ "IoT",
4533
4615
  "JSON",
4616
+ "JSONP",
4617
+ "JWT",
4618
+ "K8s",
4619
+ "KMS",
4620
+ "KPI",
4621
+ "LAN",
4534
4622
  "LHS",
4623
+ "LXC",
4624
+ "MFA",
4625
+ "ML",
4626
+ "MLOps",
4627
+ "MVC",
4628
+ "MVP",
4629
+ "NAS",
4630
+ "NAT",
4631
+ "NDA",
4632
+ "NFS",
4633
+ "NIST",
4634
+ "NLP",
4635
+ "NPS",
4636
+ "OCR",
4535
4637
  "OEM",
4638
+ "OKR",
4639
+ "OLAP",
4640
+ "OLTP",
4641
+ "OOP",
4642
+ "ORM",
4643
+ "OS",
4644
+ "OTP",
4645
+ "P2P",
4646
+ "PDP",
4647
+ "PaaS",
4648
+ "PCI",
4649
+ "PKI",
4536
4650
  "PP",
4651
+ "PWA",
4652
+ "PX",
4537
4653
  "QA",
4654
+ "RAID",
4538
4655
  "RAM",
4656
+ "RDS",
4657
+ "REST",
4539
4658
  "RHS",
4540
4659
  "RPC",
4660
+ "RPA",
4661
+ "RUM",
4541
4662
  "RSS",
4663
+ "SAN",
4664
+ "SASE",
4665
+ "SDLC",
4666
+ "SDK",
4667
+ "SEO",
4668
+ "SFTP",
4669
+ "SIEM",
4542
4670
  "SLA",
4671
+ "SMB",
4543
4672
  "SMTP",
4673
+ "SOAP",
4674
+ "SOC",
4675
+ "SOA",
4676
+ "SPDY",
4677
+ "SPF",
4544
4678
  "SQL",
4679
+ "SRV",
4680
+ "SRE",
4545
4681
  "SSH",
4682
+ "SSDL",
4683
+ "SSO",
4546
4684
  "SSL",
4547
- "TCP",
4685
+ "SSR",
4686
+ "TDD",
4687
+ "TLD",
4548
4688
  "TLS",
4689
+ "TLS1.3",
4690
+ "TOTP",
4549
4691
  "TRPC",
4550
4692
  "TTL",
4551
4693
  "UDP",
4552
4694
  "UI",
4553
4695
  "UID",
4554
- "UUID",
4555
4696
  "URI",
4556
4697
  "URL",
4557
4698
  "UTF",
4699
+ "UUID",
4700
+ "UX",
4558
4701
  "VM",
4702
+ "VLAN",
4703
+ "VPN",
4704
+ "VR",
4705
+ "WAF",
4706
+ "WAN",
4707
+ "WLAN",
4708
+ "WPA",
4709
+ "XACML",
4559
4710
  "XML",
4711
+ "XSRF",
4560
4712
  "XSS",
4561
- "XSRF"
4713
+ "XR",
4714
+ "YAML",
4715
+ "ZTA"
4562
4716
  ];
4563
4717
 
4564
4718
  // ../string-format/src/upper-case-first.ts
@@ -4573,7 +4727,7 @@ function titleCase(input) {
4573
4727
  if (!input) {
4574
4728
  return input;
4575
4729
  }
4576
- return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.includes(s) ? s.toUpperCase() : upperCaseFirst(s.toLowerCase())).join(" ");
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(" ");
4577
4731
  }
4578
4732
  __name(titleCase, "titleCase");
4579
4733
 
@@ -4623,7 +4777,8 @@ var linux = /* @__PURE__ */ __name((orgId) => {
4623
4777
  cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
4624
4778
  // https://wiki.debian.org/XDGBaseDirectorySpecification#state
4625
4779
  log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
4626
- temp: joinPaths(tmpdir, username, orgId)
4780
+ // https://devenv.sh/files-and-variables/#devenv_root
4781
+ temp: process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR ? joinPaths(process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR, orgId) : joinPaths(tmpdir, username, orgId)
4627
4782
  };
4628
4783
  }, "linux");
4629
4784
  function getEnvPaths(options = {}) {
@@ -4642,16 +4797,16 @@ function getEnvPaths(options = {}) {
4642
4797
  } else {
4643
4798
  result = linux(orgId);
4644
4799
  }
4645
- if (process.env.STORM_DATA_DIRECTORY) {
4646
- result.data = process.env.STORM_DATA_DIRECTORY;
4647
- } else if (process.env.STORM_CONFIG_DIRECTORY) {
4648
- result.config = process.env.STORM_CONFIG_DIRECTORY;
4649
- } else if (process.env.STORM_CACHE_DIRECTORY) {
4650
- result.cache = process.env.STORM_CACHE_DIRECTORY;
4651
- } else if (process.env.STORM_LOG_DIRECTORY) {
4652
- result.log = process.env.STORM_LOG_DIRECTORY;
4653
- } else if (process.env.STORM_TEMP_DIRECTORY) {
4654
- result.temp = process.env.STORM_TEMP_DIRECTORY;
4800
+ if (process.env.STORM_DATA_DIR) {
4801
+ result.data = process.env.STORM_DATA_DIR;
4802
+ } else if (process.env.STORM_CONFIG_DIR) {
4803
+ result.config = process.env.STORM_CONFIG_DIR;
4804
+ } else if (process.env.STORM_CACHE_DIR) {
4805
+ result.cache = process.env.STORM_CACHE_DIR;
4806
+ } else if (process.env.STORM_LOG_DIR) {
4807
+ result.log = process.env.STORM_LOG_DIR;
4808
+ } else if (process.env.STORM_TEMP_DIR) {
4809
+ result.temp = process.env.STORM_TEMP_DIR;
4655
4810
  }
4656
4811
  if (options.workspaceRoot) {
4657
4812
  result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
@@ -4675,46 +4830,10 @@ __name(getEnvPaths, "getEnvPaths");
4675
4830
  // ../path/src/get-workspace-root.ts
4676
4831
  init_cjs_shims();
4677
4832
 
4678
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/index.js
4679
- init_cjs_shims();
4680
-
4681
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-K6PUXRK3.js
4833
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
4682
4834
  init_cjs_shims();
4683
4835
 
4684
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
4685
- init_cjs_shims();
4686
-
4687
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-SHUYVCID.js
4688
- init_cjs_shims();
4689
- var __defProp2 = Object.defineProperty;
4690
- var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
4691
- value,
4692
- configurable: true
4693
- }), "__name");
4694
-
4695
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
4696
- var import_node_fs2 = require("node:fs");
4697
- var import_node_path2 = require("node:path");
4698
- var MAX_PATH_SEARCH_DEPTH = 30;
4699
- var depth = 0;
4700
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4701
- const _startPath = startPath ?? process.cwd();
4702
- if (endDirectoryNames.some((endDirName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endDirName)))) {
4703
- return _startPath;
4704
- }
4705
- if (endFileNames.some((endFileName) => (0, import_node_fs2.existsSync)((0, import_node_path2.join)(_startPath, endFileName)))) {
4706
- return _startPath;
4707
- }
4708
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4709
- const parent = (0, import_node_path2.join)(_startPath, "..");
4710
- return findFolderUp(parent, endFileNames, endDirectoryNames);
4711
- }
4712
- return void 0;
4713
- }
4714
- __name(findFolderUp, "findFolderUp");
4715
- __name2(findFolderUp, "findFolderUp");
4716
-
4717
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-D6E6GZD2.js
4836
+ // ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
4718
4837
  init_cjs_shims();
4719
4838
  var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
4720
4839
  function normalizeWindowsPath2(input = "") {
@@ -4724,11 +4843,10 @@ function normalizeWindowsPath2(input = "") {
4724
4843
  return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
4725
4844
  }
4726
4845
  __name(normalizeWindowsPath2, "normalizeWindowsPath");
4727
- __name2(normalizeWindowsPath2, "normalizeWindowsPath");
4728
4846
  var _UNC_REGEX2 = /^[/\\]{2}/;
4729
4847
  var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
4730
4848
  var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
4731
- var correctPaths2 = /* @__PURE__ */ __name2(function(path2) {
4849
+ var correctPaths2 = /* @__PURE__ */ __name(function(path2) {
4732
4850
  if (!path2 || path2.length === 0) {
4733
4851
  return ".";
4734
4852
  }
@@ -4757,14 +4875,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path2) {
4757
4875
  }
4758
4876
  return isPathAbsolute && !isAbsolute2(path2) ? `/${path2}` : path2;
4759
4877
  }, "correctPaths");
4760
- function cwd() {
4761
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
4762
- return process.cwd().replace(/\\/g, "/");
4763
- }
4764
- return "/";
4765
- }
4766
- __name(cwd, "cwd");
4767
- __name2(cwd, "cwd");
4768
4878
  function normalizeString2(path2, allowAboveRoot) {
4769
4879
  let res = "";
4770
4880
  let lastSegmentLength = 0;
@@ -4826,12 +4936,36 @@ function normalizeString2(path2, allowAboveRoot) {
4826
4936
  return res;
4827
4937
  }
4828
4938
  __name(normalizeString2, "normalizeString");
4829
- __name2(normalizeString2, "normalizeString");
4830
- var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
4939
+ var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
4831
4940
  return _IS_ABSOLUTE_RE2.test(p);
4832
4941
  }, "isAbsolute");
4833
4942
 
4834
- // ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-K6PUXRK3.js
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
4835
4969
  var rootFiles = [
4836
4970
  "storm-workspace.json",
4837
4971
  "storm-workspace.json",
@@ -4881,18 +5015,6 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
4881
5015
  return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
4882
5016
  }
4883
5017
  __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
4884
- __name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
4885
- function findWorkspaceRoot(pathInsideMonorepo) {
4886
- const result = findWorkspaceRootSafe(pathInsideMonorepo);
4887
- if (!result) {
4888
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
4889
- ${rootFiles.join("\n")}
4890
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
4891
- }
4892
- return result;
4893
- }
4894
- __name(findWorkspaceRoot, "findWorkspaceRoot");
4895
- __name2(findWorkspaceRoot, "findWorkspaceRoot");
4896
5018
 
4897
5019
  // ../path/src/get-parent-path.ts
4898
5020
  init_cjs_shims();
@@ -4910,6 +5032,20 @@ init_cjs_shims();
4910
5032
  // ../path/src/is-file.ts
4911
5033
  init_cjs_shims();
4912
5034
  var import_node_fs3 = require("node:fs");
5035
+
5036
+ // ../path/src/regex.ts
5037
+ init_cjs_shims();
5038
+ var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
5039
+ var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
5040
+
5041
+ // ../path/src/slash.ts
5042
+ init_cjs_shims();
5043
+ function slash(str) {
5044
+ return str.replace(/\\/g, "/");
5045
+ }
5046
+ __name(slash, "slash");
5047
+
5048
+ // ../path/src/is-file.ts
4913
5049
  function isFile(path2, additionalPath) {
4914
5050
  return Boolean((0, import_node_fs3.statSync)(additionalPath ? joinPaths(additionalPath, path2) : path2, {
4915
5051
  throwIfNoEntry: false
@@ -4923,17 +5059,16 @@ function isDirectory(path2, additionalPath) {
4923
5059
  }
4924
5060
  __name(isDirectory, "isDirectory");
4925
5061
  function isAbsolutePath(path2) {
4926
- return !/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i.test(path2);
5062
+ return ABSOLUTE_PATH_REGEX.test(slash(path2));
4927
5063
  }
4928
5064
  __name(isAbsolutePath, "isAbsolutePath");
4929
5065
 
4930
5066
  // ../path/src/correct-path.ts
4931
- var _DRIVE_LETTER_START_RE3 = /^[A-Z]:\//i;
4932
5067
  function normalizeWindowsPath3(input = "") {
4933
5068
  if (!input) {
4934
5069
  return input;
4935
5070
  }
4936
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE3, (r) => r.toUpperCase());
5071
+ return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
4937
5072
  }
4938
5073
  __name(normalizeWindowsPath3, "normalizeWindowsPath");
4939
5074
  function normalizeString3(path2, allowAboveRoot) {
@@ -4999,12 +5134,12 @@ function normalizeString3(path2, allowAboveRoot) {
4999
5134
  __name(normalizeString3, "normalizeString");
5000
5135
 
5001
5136
  // ../path/src/file-path-fns.ts
5002
- function resolvePath(path2, cwd2 = getWorkspaceRoot()) {
5137
+ function resolvePath(path2, cwd = getWorkspaceRoot()) {
5003
5138
  const paths = normalizeWindowsPath3(path2).split("/");
5004
5139
  let resolvedPath = "";
5005
5140
  let resolvedAbsolute = false;
5006
5141
  for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
5007
- const path3 = index >= 0 ? paths[index] : cwd2;
5142
+ const path3 = index >= 0 ? paths[index] : cwd;
5008
5143
  if (!path3 || path3.length === 0) {
5009
5144
  continue;
5010
5145
  }
@@ -5027,13 +5162,13 @@ __name(resolvePaths, "resolvePaths");
5027
5162
  var resolveParentPath = /* @__PURE__ */ __name((path2) => {
5028
5163
  return resolvePaths(path2, "..");
5029
5164
  }, "resolveParentPath");
5030
- var getParentPath = /* @__PURE__ */ __name((name, cwd2, options) => {
5165
+ var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
5031
5166
  const ignoreCase = options?.ignoreCase ?? true;
5032
5167
  const skipCwd = options?.skipCwd ?? false;
5033
5168
  const targetType = options?.targetType ?? "both";
5034
- let dir = cwd2;
5169
+ let dir = cwd;
5035
5170
  if (skipCwd) {
5036
- dir = resolveParentPath(cwd2);
5171
+ dir = resolveParentPath(cwd);
5037
5172
  }
5038
5173
  let names = Array.isArray(name) ? name : [
5039
5174
  name