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.
- package/README.md +14 -7
- package/bin/typed-settings.mjs +5 -0
- package/dist/adapters/joi.cjs +1 -26
- package/dist/adapters/joi.d.cts +2 -1
- package/dist/adapters/joi.d.ts +2 -1
- package/dist/adapters/joi.js +1 -1
- package/dist/adapters/superstruct.cjs +1 -26
- package/dist/adapters/superstruct.js +1 -1
- package/dist/adapters/yup.cjs +1 -25
- package/dist/adapters/yup.js +1 -1
- package/dist/adapters/zod.cjs +3 -36
- package/dist/adapters/zod.js +1 -33
- package/dist/check-XVFZEVNV.js +1 -0
- package/dist/chunk-4EAMKDNK.js +3 -0
- package/dist/chunk-5D2AQWDG.js +1 -0
- package/dist/chunk-C6CG2D4B.js +2 -0
- package/dist/chunk-FQYD5ZKE.js +1 -0
- package/dist/chunk-NQDE3WLR.js +3 -0
- package/dist/chunk-RURPDXIJ.js +1 -0
- package/dist/cli/main.cjs +36 -2225
- package/dist/cli/main.js +32 -806
- package/dist/errors-JkkOM0u-.d.cts +25 -0
- package/dist/errors-JkkOM0u-.d.ts +25 -0
- package/dist/framework/next.cjs +5 -1158
- package/dist/framework/next.d.cts +3 -3
- package/dist/framework/next.d.ts +3 -3
- package/dist/framework/next.js +1 -15
- package/dist/framework/vite.cjs +5 -1156
- package/dist/framework/vite.d.cts +8 -3
- package/dist/framework/vite.d.ts +8 -3
- package/dist/framework/vite.js +1 -14
- package/dist/index.cjs +5 -1181
- package/dist/index.d.cts +38 -7
- package/dist/index.d.ts +38 -7
- package/dist/index.js +1 -6
- package/dist/node.cjs +6 -1241
- package/dist/node.d.cts +23 -9
- package/dist/node.d.ts +23 -9
- package/dist/node.js +1 -7
- package/dist/{types-B_Dc2L4T.d.cts → types-CcsYDAdO.d.cts} +23 -1
- package/dist/{types-B_Dc2L4T.d.ts → types-CcsYDAdO.d.ts} +23 -1
- package/dist/vault/aws.cjs +4 -217
- package/dist/vault/aws.d.cts +1 -1
- package/dist/vault/aws.d.ts +1 -1
- package/dist/vault/aws.js +2 -167
- package/dist/vault/hashicorp.cjs +4 -183
- package/dist/vault/hashicorp.d.cts +1 -1
- package/dist/vault/hashicorp.d.ts +1 -1
- package/dist/vault/hashicorp.js +2 -77
- package/dist/vault/http.cjs +4 -185
- package/dist/vault/http.d.cts +1 -1
- package/dist/vault/http.d.ts +1 -1
- package/dist/vault/http.js +2 -79
- package/package.json +2 -3
- package/dist/chunk-33M5GIKQ.js +0 -13
- package/dist/chunk-A5TCQJ7L.js +0 -65
- package/dist/chunk-DEP5SD4J.js +0 -233
- package/dist/chunk-EE6LXNJV.js +0 -34
- package/dist/chunk-F6DX3HXZ.js +0 -101
- package/dist/chunk-OVFMKC2O.js +0 -15
- package/dist/chunk-RQC6OMVV.js +0 -86
- package/dist/chunk-UFUHHR2J.js +0 -38
- package/dist/chunk-YVJEZPPZ.js +0 -989
- package/dist/errors-itGaU4Q8.d.cts +0 -17
- package/dist/errors-itGaU4Q8.d.ts +0 -17
- package/dist/formats/env.cjs +0 -103
- package/dist/formats/env.d.cts +0 -8
- package/dist/formats/env.d.ts +0 -8
- package/dist/formats/env.js +0 -1
- package/dist/formats/json.cjs +0 -15
- package/dist/formats/json.d.cts +0 -7
- package/dist/formats/json.d.ts +0 -7
- package/dist/formats/json.js +0 -1
- package/dist/formats/toml.cjs +0 -17
- package/dist/formats/toml.d.cts +0 -7
- package/dist/formats/toml.d.ts +0 -7
- package/dist/formats/toml.js +0 -1
- package/dist/formats/yaml.cjs +0 -40
- package/dist/formats/yaml.d.cts +0 -8
- package/dist/formats/yaml.d.ts +0 -8
- package/dist/formats/yaml.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
2
|
export { StandardSchemaV1 } from '@standard-schema/spec';
|
|
3
3
|
export { pickPublic, settings, settingsAsync } from '../index.cjs';
|
|
4
|
-
import { S as SettingsOptions, F as Flat } from '../types-
|
|
5
|
-
export { C as ConfigError } from '../errors-
|
|
4
|
+
import { S as SettingsOptions, F as Flat } from '../types-CcsYDAdO.cjs';
|
|
5
|
+
export { C as ConfigError } from '../errors-JkkOM0u-.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Vite binding (Edge-safe, no `fs`). Validates `import.meta.env` against a schema.
|
|
@@ -19,5 +19,10 @@ export { C as ConfigError } from '../errors-itGaU4Q8.cjs';
|
|
|
19
19
|
* Sources and ambient env are fixed: the map is the only input.
|
|
20
20
|
*/
|
|
21
21
|
declare function viteSettings<S extends StandardSchemaV1>(opts: Omit<SettingsOptions<S>, 'sources' | 'env'>, metaEnv: Flat): StandardSchemaV1.InferOutput<S>;
|
|
22
|
+
/**
|
|
23
|
+
* Async twin of {@link viteSettings} for async schemas: same map-only inputs,
|
|
24
|
+
* awaited through `settingsAsync()`.
|
|
25
|
+
*/
|
|
26
|
+
declare function viteSettingsAsync<S extends StandardSchemaV1>(opts: Omit<SettingsOptions<S>, 'sources' | 'env'>, metaEnv: Flat): Promise<StandardSchemaV1.InferOutput<S>>;
|
|
22
27
|
|
|
23
|
-
export { Flat, SettingsOptions, viteSettings };
|
|
28
|
+
export { Flat, SettingsOptions, viteSettings, viteSettingsAsync };
|
package/dist/framework/vite.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
2
|
export { StandardSchemaV1 } from '@standard-schema/spec';
|
|
3
3
|
export { pickPublic, settings, settingsAsync } from '../index.js';
|
|
4
|
-
import { S as SettingsOptions, F as Flat } from '../types-
|
|
5
|
-
export { C as ConfigError } from '../errors-
|
|
4
|
+
import { S as SettingsOptions, F as Flat } from '../types-CcsYDAdO.js';
|
|
5
|
+
export { C as ConfigError } from '../errors-JkkOM0u-.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Vite binding (Edge-safe, no `fs`). Validates `import.meta.env` against a schema.
|
|
@@ -19,5 +19,10 @@ export { C as ConfigError } from '../errors-itGaU4Q8.js';
|
|
|
19
19
|
* Sources and ambient env are fixed: the map is the only input.
|
|
20
20
|
*/
|
|
21
21
|
declare function viteSettings<S extends StandardSchemaV1>(opts: Omit<SettingsOptions<S>, 'sources' | 'env'>, metaEnv: Flat): StandardSchemaV1.InferOutput<S>;
|
|
22
|
+
/**
|
|
23
|
+
* Async twin of {@link viteSettings} for async schemas: same map-only inputs,
|
|
24
|
+
* awaited through `settingsAsync()`.
|
|
25
|
+
*/
|
|
26
|
+
declare function viteSettingsAsync<S extends StandardSchemaV1>(opts: Omit<SettingsOptions<S>, 'sources' | 'env'>, metaEnv: Flat): Promise<StandardSchemaV1.InferOutput<S>>;
|
|
22
27
|
|
|
23
|
-
export { Flat, SettingsOptions, viteSettings };
|
|
28
|
+
export { Flat, SettingsOptions, viteSettings, viteSettingsAsync };
|
package/dist/framework/vite.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
import { settings } from
|
|
2
|
-
export { pickPublic, settings, settingsAsync } from '../chunk-YVJEZPPZ.js';
|
|
3
|
-
import '../chunk-33M5GIKQ.js';
|
|
4
|
-
import '../chunk-OVFMKC2O.js';
|
|
5
|
-
import '../chunk-UFUHHR2J.js';
|
|
6
|
-
export { ConfigError } from '../chunk-EE6LXNJV.js';
|
|
7
|
-
import '../chunk-F6DX3HXZ.js';
|
|
8
|
-
|
|
9
|
-
// src/framework/vite.ts
|
|
10
|
-
function viteSettings(opts, metaEnv) {
|
|
11
|
-
return settings({ ...opts, sources: [{ map: metaEnv }], env: {} });
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { viteSettings };
|
|
1
|
+
import {f,g}from'../chunk-4EAMKDNK.js';export{d as pickPublic,f as settings,g as settingsAsync}from'../chunk-4EAMKDNK.js';export{d as ConfigError}from'../chunk-NQDE3WLR.js';function S(t,e){return f({...t,sources:[{map:e}],env:{}})}function o(t,e){return g({...t,sources:[{map:e}],env:{}})}export{S as viteSettings,o as viteSettingsAsync};
|