@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 +2 -1
- package/dist/generator.cjs +223 -88
- package/dist/generator.js +223 -88
- package/dist/index.cjs +223 -88
- package/dist/index.js +223 -88
- package/package.json +1 -1
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+
|
|
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
|
|
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+
|
|
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"() {
|
|
12
12
|
"use strict";
|
|
13
13
|
}
|
|
14
14
|
});
|
|
@@ -4498,46 +4498,200 @@ init_esm_shims();
|
|
|
4498
4498
|
// ../string-format/src/acronyms.ts
|
|
4499
4499
|
init_esm_shims();
|
|
4500
4500
|
var ACRONYMS = [
|
|
4501
|
+
"3D",
|
|
4502
|
+
"4D",
|
|
4503
|
+
"5G",
|
|
4504
|
+
"6G",
|
|
4505
|
+
"7G",
|
|
4506
|
+
"8G",
|
|
4507
|
+
"ACID",
|
|
4508
|
+
"AES",
|
|
4509
|
+
"AI",
|
|
4510
|
+
"AJAX",
|
|
4501
4511
|
"API",
|
|
4512
|
+
"AR",
|
|
4513
|
+
"ASCII",
|
|
4514
|
+
"B2B",
|
|
4515
|
+
"B2C",
|
|
4516
|
+
"BFF",
|
|
4517
|
+
"BI",
|
|
4518
|
+
"BIOS",
|
|
4519
|
+
"BGP",
|
|
4520
|
+
"BOM",
|
|
4521
|
+
"BYOD",
|
|
4522
|
+
"C2C",
|
|
4523
|
+
"CAGR",
|
|
4524
|
+
"CAPTCHA",
|
|
4525
|
+
"CD",
|
|
4526
|
+
"CDN",
|
|
4527
|
+
"CDP",
|
|
4528
|
+
"CI",
|
|
4529
|
+
"CI/CD",
|
|
4530
|
+
"CIAM",
|
|
4531
|
+
"CICD",
|
|
4532
|
+
"CLI",
|
|
4533
|
+
"CMDB",
|
|
4534
|
+
"CORS",
|
|
4502
4535
|
"CPU",
|
|
4536
|
+
"CRUD",
|
|
4537
|
+
"CSR",
|
|
4503
4538
|
"CSS",
|
|
4539
|
+
"CX",
|
|
4540
|
+
"DAG",
|
|
4541
|
+
"DBMS",
|
|
4542
|
+
"DDoS",
|
|
4504
4543
|
"DNS",
|
|
4544
|
+
"DNSSEC",
|
|
4545
|
+
"DOM",
|
|
4546
|
+
"DR",
|
|
4547
|
+
"DRM",
|
|
4548
|
+
"DWH",
|
|
4549
|
+
"E2E",
|
|
4550
|
+
"EAI",
|
|
4551
|
+
"EKS",
|
|
4505
4552
|
"EOF",
|
|
4553
|
+
"EOD",
|
|
4554
|
+
"ETC",
|
|
4555
|
+
"ETL",
|
|
4556
|
+
"EULA",
|
|
4557
|
+
"FIDO",
|
|
4558
|
+
"FQDN",
|
|
4559
|
+
"FTP",
|
|
4560
|
+
"FaaS",
|
|
4561
|
+
"GDPR",
|
|
4562
|
+
"GCP",
|
|
4563
|
+
"GPU",
|
|
4506
4564
|
"GUID",
|
|
4565
|
+
"GUI",
|
|
4566
|
+
"GZIP",
|
|
4567
|
+
"HCI",
|
|
4568
|
+
"HDD",
|
|
4569
|
+
"HDFS",
|
|
4570
|
+
"HIPAA",
|
|
4571
|
+
"HMAC",
|
|
4572
|
+
"HOTP",
|
|
4573
|
+
"HSM",
|
|
4507
4574
|
"HTML",
|
|
4508
4575
|
"HTTP",
|
|
4576
|
+
"HTTP/2",
|
|
4577
|
+
"HTTP/2.0",
|
|
4578
|
+
"HTTP/3",
|
|
4579
|
+
"HTTP/3.0",
|
|
4580
|
+
"HTTP2",
|
|
4509
4581
|
"HTTPS",
|
|
4582
|
+
"HTTPS/2",
|
|
4583
|
+
"HTTPS/3",
|
|
4584
|
+
"HTTPS3",
|
|
4585
|
+
"IAM",
|
|
4586
|
+
"IAMM",
|
|
4587
|
+
"IAMT",
|
|
4588
|
+
"IaaS",
|
|
4510
4589
|
"ID",
|
|
4590
|
+
"IMAP",
|
|
4511
4591
|
"IP",
|
|
4592
|
+
"IPFS",
|
|
4593
|
+
"IoT",
|
|
4512
4594
|
"JSON",
|
|
4595
|
+
"JSONP",
|
|
4596
|
+
"JWT",
|
|
4597
|
+
"K8s",
|
|
4598
|
+
"KMS",
|
|
4599
|
+
"KPI",
|
|
4600
|
+
"LAN",
|
|
4513
4601
|
"LHS",
|
|
4602
|
+
"LXC",
|
|
4603
|
+
"MFA",
|
|
4604
|
+
"ML",
|
|
4605
|
+
"MLOps",
|
|
4606
|
+
"MVC",
|
|
4607
|
+
"MVP",
|
|
4608
|
+
"NAS",
|
|
4609
|
+
"NAT",
|
|
4610
|
+
"NDA",
|
|
4611
|
+
"NFS",
|
|
4612
|
+
"NIST",
|
|
4613
|
+
"NLP",
|
|
4614
|
+
"NPS",
|
|
4615
|
+
"OCR",
|
|
4514
4616
|
"OEM",
|
|
4617
|
+
"OKR",
|
|
4618
|
+
"OLAP",
|
|
4619
|
+
"OLTP",
|
|
4620
|
+
"OOP",
|
|
4621
|
+
"ORM",
|
|
4622
|
+
"OS",
|
|
4623
|
+
"OTP",
|
|
4624
|
+
"P2P",
|
|
4625
|
+
"PDP",
|
|
4626
|
+
"PaaS",
|
|
4627
|
+
"PCI",
|
|
4628
|
+
"PKI",
|
|
4515
4629
|
"PP",
|
|
4630
|
+
"PWA",
|
|
4631
|
+
"PX",
|
|
4516
4632
|
"QA",
|
|
4633
|
+
"RAID",
|
|
4517
4634
|
"RAM",
|
|
4635
|
+
"RDS",
|
|
4636
|
+
"REST",
|
|
4518
4637
|
"RHS",
|
|
4519
4638
|
"RPC",
|
|
4639
|
+
"RPA",
|
|
4640
|
+
"RUM",
|
|
4520
4641
|
"RSS",
|
|
4642
|
+
"SAN",
|
|
4643
|
+
"SASE",
|
|
4644
|
+
"SDLC",
|
|
4645
|
+
"SDK",
|
|
4646
|
+
"SEO",
|
|
4647
|
+
"SFTP",
|
|
4648
|
+
"SIEM",
|
|
4521
4649
|
"SLA",
|
|
4650
|
+
"SMB",
|
|
4522
4651
|
"SMTP",
|
|
4652
|
+
"SOAP",
|
|
4653
|
+
"SOC",
|
|
4654
|
+
"SOA",
|
|
4655
|
+
"SPDY",
|
|
4656
|
+
"SPF",
|
|
4523
4657
|
"SQL",
|
|
4658
|
+
"SRV",
|
|
4659
|
+
"SRE",
|
|
4524
4660
|
"SSH",
|
|
4661
|
+
"SSDL",
|
|
4662
|
+
"SSO",
|
|
4525
4663
|
"SSL",
|
|
4526
|
-
"
|
|
4664
|
+
"SSR",
|
|
4665
|
+
"TDD",
|
|
4666
|
+
"TLD",
|
|
4527
4667
|
"TLS",
|
|
4668
|
+
"TLS1.3",
|
|
4669
|
+
"TOTP",
|
|
4528
4670
|
"TRPC",
|
|
4529
4671
|
"TTL",
|
|
4530
4672
|
"UDP",
|
|
4531
4673
|
"UI",
|
|
4532
4674
|
"UID",
|
|
4533
|
-
"UUID",
|
|
4534
4675
|
"URI",
|
|
4535
4676
|
"URL",
|
|
4536
4677
|
"UTF",
|
|
4678
|
+
"UUID",
|
|
4679
|
+
"UX",
|
|
4537
4680
|
"VM",
|
|
4681
|
+
"VLAN",
|
|
4682
|
+
"VPN",
|
|
4683
|
+
"VR",
|
|
4684
|
+
"WAF",
|
|
4685
|
+
"WAN",
|
|
4686
|
+
"WLAN",
|
|
4687
|
+
"WPA",
|
|
4688
|
+
"XACML",
|
|
4538
4689
|
"XML",
|
|
4690
|
+
"XSRF",
|
|
4539
4691
|
"XSS",
|
|
4540
|
-
"
|
|
4692
|
+
"XR",
|
|
4693
|
+
"YAML",
|
|
4694
|
+
"ZTA"
|
|
4541
4695
|
];
|
|
4542
4696
|
|
|
4543
4697
|
// ../string-format/src/upper-case-first.ts
|
|
@@ -4552,7 +4706,7 @@ function titleCase(input) {
|
|
|
4552
4706
|
if (!input) {
|
|
4553
4707
|
return input;
|
|
4554
4708
|
}
|
|
4555
|
-
return input.split(/(?=[A-Z])|[\s._-]/).map((s) => s.trim()).filter(Boolean).map((s) => ACRONYMS.
|
|
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(" ");
|
|
4556
4710
|
}
|
|
4557
4711
|
__name(titleCase, "titleCase");
|
|
4558
4712
|
|
|
@@ -4602,7 +4756,8 @@ var linux = /* @__PURE__ */ __name((orgId) => {
|
|
|
4602
4756
|
cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
|
|
4603
4757
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
4604
4758
|
log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
|
|
4605
|
-
|
|
4759
|
+
// https://devenv.sh/files-and-variables/#devenv_root
|
|
4760
|
+
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)
|
|
4606
4761
|
};
|
|
4607
4762
|
}, "linux");
|
|
4608
4763
|
function getEnvPaths(options = {}) {
|
|
@@ -4621,16 +4776,16 @@ function getEnvPaths(options = {}) {
|
|
|
4621
4776
|
} else {
|
|
4622
4777
|
result = linux(orgId);
|
|
4623
4778
|
}
|
|
4624
|
-
if (process.env.
|
|
4625
|
-
result.data = process.env.
|
|
4626
|
-
} else if (process.env.
|
|
4627
|
-
result.config = process.env.
|
|
4628
|
-
} else if (process.env.
|
|
4629
|
-
result.cache = process.env.
|
|
4630
|
-
} else if (process.env.
|
|
4631
|
-
result.log = process.env.
|
|
4632
|
-
} else if (process.env.
|
|
4633
|
-
result.temp = process.env.
|
|
4779
|
+
if (process.env.STORM_DATA_DIR) {
|
|
4780
|
+
result.data = process.env.STORM_DATA_DIR;
|
|
4781
|
+
} else if (process.env.STORM_CONFIG_DIR) {
|
|
4782
|
+
result.config = process.env.STORM_CONFIG_DIR;
|
|
4783
|
+
} else if (process.env.STORM_CACHE_DIR) {
|
|
4784
|
+
result.cache = process.env.STORM_CACHE_DIR;
|
|
4785
|
+
} else if (process.env.STORM_LOG_DIR) {
|
|
4786
|
+
result.log = process.env.STORM_LOG_DIR;
|
|
4787
|
+
} else if (process.env.STORM_TEMP_DIR) {
|
|
4788
|
+
result.temp = process.env.STORM_TEMP_DIR;
|
|
4634
4789
|
}
|
|
4635
4790
|
if (options.workspaceRoot) {
|
|
4636
4791
|
result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
@@ -4654,46 +4809,10 @@ __name(getEnvPaths, "getEnvPaths");
|
|
|
4654
4809
|
// ../path/src/get-workspace-root.ts
|
|
4655
4810
|
init_esm_shims();
|
|
4656
4811
|
|
|
4657
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
4658
|
-
init_esm_shims();
|
|
4659
|
-
|
|
4660
|
-
// ../../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
|
|
4812
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/index.js
|
|
4661
4813
|
init_esm_shims();
|
|
4662
4814
|
|
|
4663
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
4664
|
-
init_esm_shims();
|
|
4665
|
-
|
|
4666
|
-
// ../../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
|
|
4667
|
-
init_esm_shims();
|
|
4668
|
-
var __defProp2 = Object.defineProperty;
|
|
4669
|
-
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
|
|
4670
|
-
value,
|
|
4671
|
-
configurable: true
|
|
4672
|
-
}), "__name");
|
|
4673
|
-
|
|
4674
|
-
// ../../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
|
|
4675
|
-
import { existsSync as existsSync2 } from "node:fs";
|
|
4676
|
-
import { join } from "node:path";
|
|
4677
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
4678
|
-
var depth = 0;
|
|
4679
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
4680
|
-
const _startPath = startPath ?? process.cwd();
|
|
4681
|
-
if (endDirectoryNames.some((endDirName) => existsSync2(join(_startPath, endDirName)))) {
|
|
4682
|
-
return _startPath;
|
|
4683
|
-
}
|
|
4684
|
-
if (endFileNames.some((endFileName) => existsSync2(join(_startPath, endFileName)))) {
|
|
4685
|
-
return _startPath;
|
|
4686
|
-
}
|
|
4687
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
4688
|
-
const parent = join(_startPath, "..");
|
|
4689
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
4690
|
-
}
|
|
4691
|
-
return void 0;
|
|
4692
|
-
}
|
|
4693
|
-
__name(findFolderUp, "findFolderUp");
|
|
4694
|
-
__name2(findFolderUp, "findFolderUp");
|
|
4695
|
-
|
|
4696
|
-
// ../../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
|
|
4815
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.169.6/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
|
|
4697
4816
|
init_esm_shims();
|
|
4698
4817
|
var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
|
|
4699
4818
|
function normalizeWindowsPath2(input = "") {
|
|
@@ -4703,11 +4822,10 @@ function normalizeWindowsPath2(input = "") {
|
|
|
4703
4822
|
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
|
|
4704
4823
|
}
|
|
4705
4824
|
__name(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
4706
|
-
__name2(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
4707
4825
|
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
4708
4826
|
var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
4709
4827
|
var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
|
|
4710
|
-
var correctPaths2 = /* @__PURE__ */
|
|
4828
|
+
var correctPaths2 = /* @__PURE__ */ __name(function(path2) {
|
|
4711
4829
|
if (!path2 || path2.length === 0) {
|
|
4712
4830
|
return ".";
|
|
4713
4831
|
}
|
|
@@ -4736,14 +4854,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path2) {
|
|
|
4736
4854
|
}
|
|
4737
4855
|
return isPathAbsolute && !isAbsolute2(path2) ? `/${path2}` : path2;
|
|
4738
4856
|
}, "correctPaths");
|
|
4739
|
-
function cwd() {
|
|
4740
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
4741
|
-
return process.cwd().replace(/\\/g, "/");
|
|
4742
|
-
}
|
|
4743
|
-
return "/";
|
|
4744
|
-
}
|
|
4745
|
-
__name(cwd, "cwd");
|
|
4746
|
-
__name2(cwd, "cwd");
|
|
4747
4857
|
function normalizeString2(path2, allowAboveRoot) {
|
|
4748
4858
|
let res = "";
|
|
4749
4859
|
let lastSegmentLength = 0;
|
|
@@ -4805,12 +4915,36 @@ function normalizeString2(path2, allowAboveRoot) {
|
|
|
4805
4915
|
return res;
|
|
4806
4916
|
}
|
|
4807
4917
|
__name(normalizeString2, "normalizeString");
|
|
4808
|
-
|
|
4809
|
-
var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
|
|
4918
|
+
var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
|
|
4810
4919
|
return _IS_ABSOLUTE_RE2.test(p);
|
|
4811
4920
|
}, "isAbsolute");
|
|
4812
4921
|
|
|
4813
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
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
|
|
4814
4948
|
var rootFiles = [
|
|
4815
4949
|
"storm-workspace.json",
|
|
4816
4950
|
"storm-workspace.json",
|
|
@@ -4860,18 +4994,6 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
|
4860
4994
|
return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
4861
4995
|
}
|
|
4862
4996
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
4863
|
-
__name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
4864
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
4865
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
4866
|
-
if (!result) {
|
|
4867
|
-
throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
4868
|
-
${rootFiles.join("\n")}
|
|
4869
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
4870
|
-
}
|
|
4871
|
-
return result;
|
|
4872
|
-
}
|
|
4873
|
-
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
4874
|
-
__name2(findWorkspaceRoot, "findWorkspaceRoot");
|
|
4875
4997
|
|
|
4876
4998
|
// ../path/src/get-parent-path.ts
|
|
4877
4999
|
init_esm_shims();
|
|
@@ -4889,6 +5011,20 @@ init_esm_shims();
|
|
|
4889
5011
|
// ../path/src/is-file.ts
|
|
4890
5012
|
init_esm_shims();
|
|
4891
5013
|
import { lstatSync, statSync } from "node:fs";
|
|
5014
|
+
|
|
5015
|
+
// ../path/src/regex.ts
|
|
5016
|
+
init_esm_shims();
|
|
5017
|
+
var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
5018
|
+
var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
5019
|
+
|
|
5020
|
+
// ../path/src/slash.ts
|
|
5021
|
+
init_esm_shims();
|
|
5022
|
+
function slash(str) {
|
|
5023
|
+
return str.replace(/\\/g, "/");
|
|
5024
|
+
}
|
|
5025
|
+
__name(slash, "slash");
|
|
5026
|
+
|
|
5027
|
+
// ../path/src/is-file.ts
|
|
4892
5028
|
function isFile(path2, additionalPath) {
|
|
4893
5029
|
return Boolean(statSync(additionalPath ? joinPaths(additionalPath, path2) : path2, {
|
|
4894
5030
|
throwIfNoEntry: false
|
|
@@ -4902,17 +5038,16 @@ function isDirectory(path2, additionalPath) {
|
|
|
4902
5038
|
}
|
|
4903
5039
|
__name(isDirectory, "isDirectory");
|
|
4904
5040
|
function isAbsolutePath(path2) {
|
|
4905
|
-
return
|
|
5041
|
+
return ABSOLUTE_PATH_REGEX.test(slash(path2));
|
|
4906
5042
|
}
|
|
4907
5043
|
__name(isAbsolutePath, "isAbsolutePath");
|
|
4908
5044
|
|
|
4909
5045
|
// ../path/src/correct-path.ts
|
|
4910
|
-
var _DRIVE_LETTER_START_RE3 = /^[A-Z]:\//i;
|
|
4911
5046
|
function normalizeWindowsPath3(input = "") {
|
|
4912
5047
|
if (!input) {
|
|
4913
5048
|
return input;
|
|
4914
5049
|
}
|
|
4915
|
-
return input
|
|
5050
|
+
return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
4916
5051
|
}
|
|
4917
5052
|
__name(normalizeWindowsPath3, "normalizeWindowsPath");
|
|
4918
5053
|
function normalizeString3(path2, allowAboveRoot) {
|
|
@@ -4978,12 +5113,12 @@ function normalizeString3(path2, allowAboveRoot) {
|
|
|
4978
5113
|
__name(normalizeString3, "normalizeString");
|
|
4979
5114
|
|
|
4980
5115
|
// ../path/src/file-path-fns.ts
|
|
4981
|
-
function resolvePath(path2,
|
|
5116
|
+
function resolvePath(path2, cwd = getWorkspaceRoot()) {
|
|
4982
5117
|
const paths = normalizeWindowsPath3(path2).split("/");
|
|
4983
5118
|
let resolvedPath = "";
|
|
4984
5119
|
let resolvedAbsolute = false;
|
|
4985
5120
|
for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
4986
|
-
const path3 = index >= 0 ? paths[index] :
|
|
5121
|
+
const path3 = index >= 0 ? paths[index] : cwd;
|
|
4987
5122
|
if (!path3 || path3.length === 0) {
|
|
4988
5123
|
continue;
|
|
4989
5124
|
}
|
|
@@ -5006,13 +5141,13 @@ __name(resolvePaths, "resolvePaths");
|
|
|
5006
5141
|
var resolveParentPath = /* @__PURE__ */ __name((path2) => {
|
|
5007
5142
|
return resolvePaths(path2, "..");
|
|
5008
5143
|
}, "resolveParentPath");
|
|
5009
|
-
var getParentPath = /* @__PURE__ */ __name((name,
|
|
5144
|
+
var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
|
|
5010
5145
|
const ignoreCase = options?.ignoreCase ?? true;
|
|
5011
5146
|
const skipCwd = options?.skipCwd ?? false;
|
|
5012
5147
|
const targetType = options?.targetType ?? "both";
|
|
5013
|
-
let dir =
|
|
5148
|
+
let dir = cwd;
|
|
5014
5149
|
if (skipCwd) {
|
|
5015
|
-
dir = resolveParentPath(
|
|
5150
|
+
dir = resolveParentPath(cwd);
|
|
5016
5151
|
}
|
|
5017
5152
|
let names = Array.isArray(name) ? name : [
|
|
5018
5153
|
name
|