typed-settings 0.1.4 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +14 -7
  2. package/bin/typed-settings.mjs +5 -0
  3. package/dist/adapters/joi.cjs +1 -26
  4. package/dist/adapters/joi.d.cts +2 -1
  5. package/dist/adapters/joi.d.ts +2 -1
  6. package/dist/adapters/joi.js +1 -1
  7. package/dist/adapters/superstruct.cjs +1 -26
  8. package/dist/adapters/superstruct.js +1 -1
  9. package/dist/adapters/yup.cjs +1 -25
  10. package/dist/adapters/yup.js +1 -1
  11. package/dist/adapters/zod.cjs +3 -36
  12. package/dist/adapters/zod.js +1 -33
  13. package/dist/check-XVFZEVNV.js +1 -0
  14. package/dist/chunk-4EAMKDNK.js +3 -0
  15. package/dist/chunk-5D2AQWDG.js +1 -0
  16. package/dist/chunk-C6CG2D4B.js +2 -0
  17. package/dist/chunk-FQYD5ZKE.js +1 -0
  18. package/dist/chunk-NQDE3WLR.js +3 -0
  19. package/dist/chunk-RURPDXIJ.js +1 -0
  20. package/dist/cli/main.cjs +36 -2225
  21. package/dist/cli/main.js +32 -806
  22. package/dist/errors-JkkOM0u-.d.cts +25 -0
  23. package/dist/errors-JkkOM0u-.d.ts +25 -0
  24. package/dist/framework/next.cjs +5 -1158
  25. package/dist/framework/next.d.cts +3 -3
  26. package/dist/framework/next.d.ts +3 -3
  27. package/dist/framework/next.js +1 -15
  28. package/dist/framework/vite.cjs +5 -1156
  29. package/dist/framework/vite.d.cts +8 -3
  30. package/dist/framework/vite.d.ts +8 -3
  31. package/dist/framework/vite.js +1 -14
  32. package/dist/index.cjs +5 -1181
  33. package/dist/index.d.cts +38 -7
  34. package/dist/index.d.ts +38 -7
  35. package/dist/index.js +1 -6
  36. package/dist/node.cjs +6 -1241
  37. package/dist/node.d.cts +23 -9
  38. package/dist/node.d.ts +23 -9
  39. package/dist/node.js +1 -7
  40. package/dist/{types-B_Dc2L4T.d.cts → types-CcsYDAdO.d.cts} +23 -1
  41. package/dist/{types-B_Dc2L4T.d.ts → types-CcsYDAdO.d.ts} +23 -1
  42. package/dist/vault/aws.cjs +4 -217
  43. package/dist/vault/aws.d.cts +1 -1
  44. package/dist/vault/aws.d.ts +1 -1
  45. package/dist/vault/aws.js +2 -167
  46. package/dist/vault/hashicorp.cjs +4 -183
  47. package/dist/vault/hashicorp.d.cts +1 -1
  48. package/dist/vault/hashicorp.d.ts +1 -1
  49. package/dist/vault/hashicorp.js +2 -77
  50. package/dist/vault/http.cjs +4 -185
  51. package/dist/vault/http.d.cts +1 -1
  52. package/dist/vault/http.d.ts +1 -1
  53. package/dist/vault/http.js +2 -79
  54. package/package.json +2 -3
  55. package/dist/chunk-33M5GIKQ.js +0 -13
  56. package/dist/chunk-A5TCQJ7L.js +0 -65
  57. package/dist/chunk-DEP5SD4J.js +0 -233
  58. package/dist/chunk-EE6LXNJV.js +0 -34
  59. package/dist/chunk-F6DX3HXZ.js +0 -101
  60. package/dist/chunk-OVFMKC2O.js +0 -15
  61. package/dist/chunk-RQC6OMVV.js +0 -86
  62. package/dist/chunk-UFUHHR2J.js +0 -38
  63. package/dist/chunk-YVJEZPPZ.js +0 -989
  64. package/dist/errors-itGaU4Q8.d.cts +0 -17
  65. package/dist/errors-itGaU4Q8.d.ts +0 -17
  66. package/dist/formats/env.cjs +0 -103
  67. package/dist/formats/env.d.cts +0 -8
  68. package/dist/formats/env.d.ts +0 -8
  69. package/dist/formats/env.js +0 -1
  70. package/dist/formats/json.cjs +0 -15
  71. package/dist/formats/json.d.cts +0 -7
  72. package/dist/formats/json.d.ts +0 -7
  73. package/dist/formats/json.js +0 -1
  74. package/dist/formats/toml.cjs +0 -17
  75. package/dist/formats/toml.d.cts +0 -7
  76. package/dist/formats/toml.d.ts +0 -7
  77. package/dist/formats/toml.js +0 -1
  78. package/dist/formats/yaml.cjs +0 -40
  79. package/dist/formats/yaml.d.cts +0 -8
  80. package/dist/formats/yaml.d.ts +0 -8
  81. package/dist/formats/yaml.js +0 -1
@@ -0,0 +1,25 @@
1
+ /** One validation failure: the key path, the winning source, and what went wrong. */
2
+ interface ConfigIssue {
3
+ path: string;
4
+ from: string;
5
+ message: string;
6
+ }
7
+ /** Tests a key path against the default secret pattern plus custom matchers. */
8
+ declare function isSecretKey(key: string, extra?: (string | RegExp)[]): boolean;
9
+ /**
10
+ * Every settings failure. Carries machine-readable `issues` plus a `code`
11
+ * (`E_INVALID_CONFIG` by default, e.g. `E_UNKNOWN_KEY`, `E_TIMEOUT`).
12
+ */
13
+ declare class ConfigError extends Error {
14
+ code: string;
15
+ issues: ConfigIssue[];
16
+ /**
17
+ * Structural check so `e instanceof ConfigError` holds across dual-package
18
+ * copies (ESM `dist/index.js` + CJS `dist/index.cjs` loaded together have
19
+ * distinct classes; plain instanceof would miss and misroute error codes).
20
+ */
21
+ static [Symbol.hasInstance](inst: unknown): boolean;
22
+ constructor(issues?: ConfigIssue[], code?: string);
23
+ }
24
+
25
+ export { ConfigError as C, isSecretKey as i };
@@ -0,0 +1,25 @@
1
+ /** One validation failure: the key path, the winning source, and what went wrong. */
2
+ interface ConfigIssue {
3
+ path: string;
4
+ from: string;
5
+ message: string;
6
+ }
7
+ /** Tests a key path against the default secret pattern plus custom matchers. */
8
+ declare function isSecretKey(key: string, extra?: (string | RegExp)[]): boolean;
9
+ /**
10
+ * Every settings failure. Carries machine-readable `issues` plus a `code`
11
+ * (`E_INVALID_CONFIG` by default, e.g. `E_UNKNOWN_KEY`, `E_TIMEOUT`).
12
+ */
13
+ declare class ConfigError extends Error {
14
+ code: string;
15
+ issues: ConfigIssue[];
16
+ /**
17
+ * Structural check so `e instanceof ConfigError` holds across dual-package
18
+ * copies (ESM `dist/index.js` + CJS `dist/index.cjs` loaded together have
19
+ * distinct classes; plain instanceof would miss and misroute error codes).
20
+ */
21
+ static [Symbol.hasInstance](inst: unknown): boolean;
22
+ constructor(issues?: ConfigIssue[], code?: string);
23
+ }
24
+
25
+ export { ConfigError as C, isSecretKey as i };