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