@forgezero/vault 0.1.12 → 0.1.14
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 +166 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/providers.js +1 -1
- package/dist/schema.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -35,12 +35,12 @@ Every row links to the detailed explanation and named-import/example area below.
|
|
|
35
35
|
|
|
36
36
|
| public entry | short description | runtime | details |
|
|
37
37
|
|---|---|---|---|
|
|
38
|
-
| @forgezero/vault | One scoped contract over an explicitly injected platform backend, a managed tenant socket or an automatically derived external API-key signer. | portable | [
|
|
39
|
-
| @forgezero/vault/schema | Where an entry’s shape comes from: pulled from the platform when ForgeZero has to render it, declared locally when only the tenant needs it. | portable | [
|
|
40
|
-
| @forgezero/vault/config | Read `.fz/config.json` — which project, which environment, which secrets, and what to call them. | portable | [
|
|
41
|
-
| @forgezero/vault/env | Envless: fill `process.env` from the vault at boot, refusing to run during a build. | portable | [
|
|
42
|
-
| @forgezero/vault/frameworks | SvelteKit and Next.js wiring, attached at the one place that runs once, on the server, before any request. | portable | [
|
|
43
|
-
| @forgezero/vault/providers | Adapters that make Vault a provider-configuration and credential source without coupling the providers package to ForgeZero. | portable | [
|
|
38
|
+
| @forgezero/vault | One scoped contract over an explicitly injected platform backend, a managed tenant socket or an automatically derived external API-key signer. | portable | [Reference + usage](#forgezero-vault) |
|
|
39
|
+
| @forgezero/vault/schema | Where an entry’s shape comes from: pulled from the platform when ForgeZero has to render it, declared locally when only the tenant needs it. | portable | [Reference + usage](#forgezero-vault-schema) |
|
|
40
|
+
| @forgezero/vault/config | Read `.fz/config.json` — which project, which environment, which secrets, and what to call them. | portable | [Reference + usage](#forgezero-vault-config) |
|
|
41
|
+
| @forgezero/vault/env | Envless: fill `process.env` from the vault at boot, refusing to run during a build. | portable | [Reference + usage](#forgezero-vault-env) |
|
|
42
|
+
| @forgezero/vault/frameworks | SvelteKit and Next.js wiring, attached at the one place that runs once, on the server, before any request. | portable | [Reference + usage](#forgezero-vault-frameworks) |
|
|
43
|
+
| @forgezero/vault/providers | Adapters that make Vault a provider-configuration and credential source without coupling the providers package to ForgeZero. | portable | [Reference + usage](#forgezero-vault-providers) |
|
|
44
44
|
|
|
45
45
|
## Commands
|
|
46
46
|
|
|
@@ -53,14 +53,39 @@ bun add @forgezero/vault
|
|
|
53
53
|
<a id="forgezero-vault"></a>
|
|
54
54
|
## @forgezero/vault
|
|
55
55
|
|
|
56
|
-
One scoped contract over an explicitly injected platform backend, a managed tenant socket or an automatically derived external API-key signer.
|
|
56
|
+
One scoped contract over an explicitly injected platform backend, a managed tenant socket or an automatically derived external API-key signer. This entry exposes 13 named value exports and 12 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
57
57
|
|
|
58
58
|
```text
|
|
59
|
-
import {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
import {
|
|
60
|
+
DEFAULT_API_URL,
|
|
61
|
+
DEFAULT_REQUEST_TIMEOUT_MS,
|
|
62
|
+
DEFAULT_SOCKET,
|
|
63
|
+
ForgeZero,
|
|
64
|
+
VERSION,
|
|
65
|
+
VaultError,
|
|
66
|
+
createVault,
|
|
67
|
+
directCredentials,
|
|
68
|
+
discover,
|
|
69
|
+
managedAgentTransport,
|
|
70
|
+
signerFromApiKey,
|
|
71
|
+
systemdCredentials,
|
|
72
|
+
vaultCredentials,
|
|
73
|
+
} from '@forgezero/vault';
|
|
74
|
+
|
|
75
|
+
import type {
|
|
76
|
+
AgentRequest,
|
|
77
|
+
AgentResponse,
|
|
78
|
+
AgentTransport,
|
|
79
|
+
Change,
|
|
80
|
+
Credential,
|
|
81
|
+
CredentialMode,
|
|
82
|
+
DiscoveryEnvironment,
|
|
83
|
+
EntryMeta,
|
|
84
|
+
SignRequest,
|
|
85
|
+
Signer,
|
|
86
|
+
SystemdCredentialOptions,
|
|
87
|
+
VaultOptions,
|
|
88
|
+
} from '@forgezero/vault';
|
|
64
89
|
```
|
|
65
90
|
|
|
66
91
|
## @forgezero/vault — Read a scoped secret
|
|
@@ -68,7 +93,9 @@ import type { DiscoveryEnvironment, EntryMeta, SignRequest, Signer, SystemdCrede
|
|
|
68
93
|
The same client discovers the managed Agent socket or uses an external API-key signer. Project and environment remain explicit.
|
|
69
94
|
|
|
70
95
|
```text
|
|
71
|
-
import {
|
|
96
|
+
import {
|
|
97
|
+
createVault,
|
|
98
|
+
} from '@forgezero/vault';
|
|
72
99
|
|
|
73
100
|
const vault = createVault({ project: 'payments', environment: 'production' });
|
|
74
101
|
const token = await vault.get('STRIPE_KEY');
|
|
@@ -77,11 +104,19 @@ const token = await vault.get('STRIPE_KEY');
|
|
|
77
104
|
<a id="forgezero-vault-schema"></a>
|
|
78
105
|
## @forgezero/vault/schema
|
|
79
106
|
|
|
80
|
-
Where an entry’s shape comes from: pulled from the platform when ForgeZero has to render it, declared locally when only the tenant needs it.
|
|
107
|
+
Where an entry’s shape comes from: pulled from the platform when ForgeZero has to render it, declared locally when only the tenant needs it. This entry exposes 3 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
81
108
|
|
|
82
109
|
```text
|
|
83
|
-
import {
|
|
84
|
-
|
|
110
|
+
import {
|
|
111
|
+
localSchemas,
|
|
112
|
+
managedSchemas,
|
|
113
|
+
preferManaged,
|
|
114
|
+
} from '@forgezero/vault/schema';
|
|
115
|
+
|
|
116
|
+
import type {
|
|
117
|
+
SchemaRef,
|
|
118
|
+
SchemaSource,
|
|
119
|
+
} from '@forgezero/vault/schema';
|
|
85
120
|
```
|
|
86
121
|
|
|
87
122
|
## @forgezero/vault/schema — Managed schema with a local fallback
|
|
@@ -89,8 +124,14 @@ import type { SchemaRef, SchemaSource } from '@forgezero/vault/schema';
|
|
|
89
124
|
Managed schemas let ForgeZero render and validate a provider form. Local schemas keep tenant-owned extensions independent. Managed wins when both define the same name; the version travels with the shape and no credential value is stored in the schema.
|
|
90
125
|
|
|
91
126
|
```text
|
|
92
|
-
import {
|
|
93
|
-
|
|
127
|
+
import {
|
|
128
|
+
managedSchemas,
|
|
129
|
+
localSchemas,
|
|
130
|
+
preferManaged,
|
|
131
|
+
} from '@forgezero/vault/schema';
|
|
132
|
+
import {
|
|
133
|
+
createVault,
|
|
134
|
+
} from '@forgezero/vault';
|
|
94
135
|
|
|
95
136
|
const vault = createVault({ project: 'payments', environment: 'production' });
|
|
96
137
|
const schemas = preferManaged(
|
|
@@ -109,42 +150,133 @@ const { schema, version } = await schemas.get('postmark');
|
|
|
109
150
|
<a id="forgezero-vault-config"></a>
|
|
110
151
|
## @forgezero/vault/config
|
|
111
152
|
|
|
112
|
-
Read `.fz/config.json` — which project, which environment, which secrets, and what to call them.
|
|
153
|
+
Read `.fz/config.json` — which project, which environment, which secrets, and what to call them. This entry exposes 8 named value exports and 3 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
113
154
|
|
|
114
155
|
```text
|
|
115
|
-
import {
|
|
116
|
-
|
|
117
|
-
|
|
156
|
+
import {
|
|
157
|
+
CONFIG_PATHS,
|
|
158
|
+
ConfigError,
|
|
159
|
+
assertNoSecrets,
|
|
160
|
+
bindingsOf,
|
|
161
|
+
exampleConfig,
|
|
162
|
+
loadConfig,
|
|
163
|
+
parseConfig,
|
|
164
|
+
resolveConfig,
|
|
165
|
+
} from '@forgezero/vault/config';
|
|
166
|
+
|
|
167
|
+
import type {
|
|
168
|
+
FzConfig,
|
|
169
|
+
LoadOptions,
|
|
170
|
+
SecretBinding,
|
|
171
|
+
} from '@forgezero/vault/config';
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## @forgezero/vault/config — Use this entry point
|
|
175
|
+
|
|
176
|
+
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
import {
|
|
180
|
+
CONFIG_PATHS,
|
|
181
|
+
} from '@forgezero/vault/config';
|
|
182
|
+
|
|
183
|
+
export const selectedCapability = CONFIG_PATHS;
|
|
118
184
|
```
|
|
119
185
|
|
|
120
186
|
<a id="forgezero-vault-env"></a>
|
|
121
187
|
## @forgezero/vault/env
|
|
122
188
|
|
|
123
|
-
Envless: fill `process.env` from the vault at boot, refusing to run during a build.
|
|
189
|
+
Envless: fill `process.env` from the vault at boot, refusing to run during a build. This entry exposes 5 named value exports and 3 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
124
190
|
|
|
125
191
|
```text
|
|
126
|
-
import {
|
|
127
|
-
|
|
192
|
+
import {
|
|
193
|
+
EnvError,
|
|
194
|
+
clearEnv,
|
|
195
|
+
describeReport,
|
|
196
|
+
hydrateEnv,
|
|
197
|
+
isBuildTime,
|
|
198
|
+
} from '@forgezero/vault/env';
|
|
199
|
+
|
|
200
|
+
import type {
|
|
201
|
+
HydrateOptions,
|
|
202
|
+
HydrateReport,
|
|
203
|
+
SecretReader,
|
|
204
|
+
} from '@forgezero/vault/env';
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## @forgezero/vault/env — Use this entry point
|
|
208
|
+
|
|
209
|
+
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
import {
|
|
213
|
+
EnvError,
|
|
214
|
+
} from '@forgezero/vault/env';
|
|
215
|
+
|
|
216
|
+
export const selectedCapability = EnvError;
|
|
128
217
|
```
|
|
129
218
|
|
|
130
219
|
<a id="forgezero-vault-frameworks"></a>
|
|
131
220
|
## @forgezero/vault/frameworks
|
|
132
221
|
|
|
133
|
-
SvelteKit and Next.js wiring, attached at the one place that runs once, on the server, before any request.
|
|
222
|
+
SvelteKit and Next.js wiring, attached at the one place that runs once, on the server, before any request. This entry exposes 6 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
134
223
|
|
|
135
224
|
```text
|
|
136
|
-
import {
|
|
137
|
-
|
|
225
|
+
import {
|
|
226
|
+
bootstrapEnv,
|
|
227
|
+
forgeZeroHandle,
|
|
228
|
+
forgeZeroInit,
|
|
229
|
+
forgeZeroRegister,
|
|
230
|
+
resetHydration,
|
|
231
|
+
setupEnv,
|
|
232
|
+
} from '@forgezero/vault/frameworks';
|
|
233
|
+
|
|
234
|
+
import type {
|
|
235
|
+
SetupOptions,
|
|
236
|
+
SvelteKitHandleEvent,
|
|
237
|
+
} from '@forgezero/vault/frameworks';
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## @forgezero/vault/frameworks — Use this entry point
|
|
241
|
+
|
|
242
|
+
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
243
|
+
|
|
244
|
+
```text
|
|
245
|
+
import {
|
|
246
|
+
bootstrapEnv,
|
|
247
|
+
} from '@forgezero/vault/frameworks';
|
|
248
|
+
|
|
249
|
+
export const selectedCapability = bootstrapEnv;
|
|
138
250
|
```
|
|
139
251
|
|
|
140
252
|
<a id="forgezero-vault-providers"></a>
|
|
141
253
|
## @forgezero/vault/providers
|
|
142
254
|
|
|
143
|
-
Adapters that make Vault a provider-configuration and credential source without coupling the providers package to ForgeZero.
|
|
255
|
+
Adapters that make Vault a provider-configuration and credential source without coupling the providers package to ForgeZero. This entry exposes 2 named value exports and 3 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
144
256
|
|
|
145
257
|
```text
|
|
146
|
-
import {
|
|
147
|
-
|
|
258
|
+
import {
|
|
259
|
+
vaultConfig,
|
|
260
|
+
vaultCredentials,
|
|
261
|
+
} from '@forgezero/vault/providers';
|
|
262
|
+
|
|
263
|
+
import type {
|
|
264
|
+
StoredProviderInstance,
|
|
265
|
+
StoredServiceMethodAttachment,
|
|
266
|
+
VaultConfigOptions,
|
|
267
|
+
} from '@forgezero/vault/providers';
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## @forgezero/vault/providers — Use this entry point
|
|
271
|
+
|
|
272
|
+
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
273
|
+
|
|
274
|
+
```text
|
|
275
|
+
import {
|
|
276
|
+
vaultConfig,
|
|
277
|
+
} from '@forgezero/vault/providers';
|
|
278
|
+
|
|
279
|
+
export const selectedCapability = vaultConfig;
|
|
148
280
|
```
|
|
149
281
|
|
|
150
282
|
## Three paths, and why they stay explicit
|
|
@@ -174,7 +306,9 @@ bun add @forgezero/vault
|
|
|
174
306
|
The project and environment are explicit application scope. Managed compute uses the local Agent socket; external runtimes use the stable API origin and their scoped key.
|
|
175
307
|
|
|
176
308
|
```text
|
|
177
|
-
import {
|
|
309
|
+
import {
|
|
310
|
+
ForgeZero,
|
|
311
|
+
} from '@forgezero/vault';
|
|
178
312
|
|
|
179
313
|
const fz = new ForgeZero({ project: 'altpilot', environment: 'production' });
|
|
180
314
|
|
package/dist/index.d.ts
CHANGED
|
@@ -282,4 +282,4 @@ export declare function systemdCredentials(options?: SystemdCredentialOptions):
|
|
|
282
282
|
readonly name: 'systemd';
|
|
283
283
|
get(reference: string, field: string): Promise<string>;
|
|
284
284
|
};
|
|
285
|
-
export declare const VERSION = "0.1.
|
|
285
|
+
export declare const VERSION = "0.1.14";
|
package/dist/index.js
CHANGED
package/dist/providers.js
CHANGED
package/dist/schema.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgezero/vault",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/bun": "latest"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@forgezero/runtime": "^0.1.
|
|
45
|
+
"@forgezero/runtime": "^0.1.10"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@noble/curves": "^2.2.0",
|