@forgezero/vault 0.1.20 → 0.1.22
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 +18 -17
- 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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
and commit the generator and rendered files together.
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Vault SDK
|
|
9
9
|
|
|
10
10
|
One scoped contract over platform-direct, managed-agent and external API-key trust paths.
|
|
11
11
|
|
|
@@ -195,14 +195,14 @@ import {
|
|
|
195
195
|
|
|
196
196
|
## @forgezero/vault/providers — Attach a versioned Git forge to Git Connect
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
One GitHub App provider is projected into separate OAuth Server and Git Connect method sets. Its shared credential source remains Vault-scoped and installation tokens are minted only when needed.
|
|
199
199
|
|
|
200
200
|
```text
|
|
201
201
|
import {
|
|
202
202
|
createService,
|
|
203
203
|
} from '@forgezero/providers';
|
|
204
204
|
import {
|
|
205
|
-
|
|
205
|
+
defineGitHubProvider,
|
|
206
206
|
gitConnectService,
|
|
207
207
|
} from '@forgezero/providers/git';
|
|
208
208
|
import {
|
|
@@ -212,22 +212,23 @@ import {
|
|
|
212
212
|
vaultCredentials,
|
|
213
213
|
} from '@forgezero/vault/providers';
|
|
214
214
|
|
|
215
|
-
declare const githubAdapter: Parameters<typeof
|
|
215
|
+
declare const githubAdapter: Parameters<typeof defineGitHubProvider>[0]['adapter'];
|
|
216
216
|
const vault = createVault({ project: 'control-plane', environment: 'production' });
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
adapter: githubAdapter // Your HTTP boundary implements the five typed methods.
|
|
220
|
-
});
|
|
217
|
+
const credentials = vaultCredentials(vault, 'github');
|
|
218
|
+
const github = defineGitHubProvider({ version: 'github-app:2026-03-10', adapter: githubAdapter });
|
|
221
219
|
const git = createService(gitConnectService, {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
220
|
+
beginInstallation: [],
|
|
221
|
+
completeInstallation: [],
|
|
222
|
+
listInstallations: [],
|
|
223
|
+
listRepositories: [{ provider: github, method: 'listRepositories', version: 'github-app:2026-03-10', credentials, priority: 1 }],
|
|
224
|
+
listBranches: [],
|
|
225
|
+
mintCloneCredential: [],
|
|
226
|
+
verifyWebhook: [],
|
|
227
|
+
disconnectInstallation: []
|
|
227
228
|
});
|
|
228
229
|
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
230
|
+
const repositories = await git.call('listRepositories', { installationId: '42' });
|
|
231
|
+
if (!repositories.ok) throw repositories.error;
|
|
231
232
|
```
|
|
232
233
|
|
|
233
234
|
## Three paths, and why they stay explicit
|
|
@@ -261,9 +262,9 @@ import {
|
|
|
261
262
|
ForgeZero,
|
|
262
263
|
} from '@forgezero/vault';
|
|
263
264
|
|
|
264
|
-
const fz = new ForgeZero({ project: '
|
|
265
|
+
const fz = new ForgeZero({ project: 'payments-api', environment: 'production' });
|
|
265
266
|
|
|
266
|
-
const
|
|
267
|
+
const value = await fz.get('PAYMENT_PROVIDER');
|
|
267
268
|
const names = await fz.list(); // names; HTTPS reads also carry metadata
|
|
268
269
|
```
|
|
269
270
|
|
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.22";
|
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.22",
|
|
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.17"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@noble/curves": "^2.2.0",
|