@forgezero/vault 0.1.19 → 0.1.20
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 +29 -4
- 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 +1 -1
package/README.md
CHANGED
|
@@ -193,16 +193,41 @@ import {
|
|
|
193
193
|
} from '@forgezero/vault/providers';
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
## @forgezero/vault/providers —
|
|
196
|
+
## @forgezero/vault/providers — Attach a versioned Git forge to Git Connect
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
The service remains stable while each forge owns its API versions. Credentials are scoped Vault lookups and ordered arrays allow an explicitly reviewed legacy branch during migration.
|
|
199
199
|
|
|
200
200
|
```text
|
|
201
201
|
import {
|
|
202
|
-
|
|
202
|
+
createService,
|
|
203
|
+
} from '@forgezero/providers';
|
|
204
|
+
import {
|
|
205
|
+
defineGitConnectProvider,
|
|
206
|
+
gitConnectService,
|
|
207
|
+
} from '@forgezero/providers/git';
|
|
208
|
+
import {
|
|
209
|
+
createVault,
|
|
210
|
+
} from '@forgezero/vault';
|
|
211
|
+
import {
|
|
212
|
+
vaultCredentials,
|
|
203
213
|
} from '@forgezero/vault/providers';
|
|
204
214
|
|
|
205
|
-
|
|
215
|
+
declare const githubAdapter: Parameters<typeof defineGitConnectProvider>[0]['adapter'];
|
|
216
|
+
const vault = createVault({ project: 'control-plane', environment: 'production' });
|
|
217
|
+
const github = defineGitConnectProvider({
|
|
218
|
+
id: 'github-app', label: 'GitHub App', version: '2026-03-10',
|
|
219
|
+
adapter: githubAdapter // Your HTTP boundary implements the five typed methods.
|
|
220
|
+
});
|
|
221
|
+
const git = createService(gitConnectService, {
|
|
222
|
+
listAccounts: [{ provider: github, method: 'listAccounts', version: '2026-03-10', credentials: vaultCredentials(vault, 'github-app'), priority: 1 }],
|
|
223
|
+
listRepositories: [{ provider: github, method: 'listRepositories', version: '2026-03-10', credentials: vaultCredentials(vault, 'github-app'), priority: 1 }],
|
|
224
|
+
listBranches: [{ provider: github, method: 'listBranches', version: '2026-03-10', credentials: vaultCredentials(vault, 'github-app'), priority: 1 }],
|
|
225
|
+
ensureWebhook: [{ provider: github, method: 'ensureWebhook', version: '2026-03-10', credentials: vaultCredentials(vault, 'github-app'), priority: 1 }],
|
|
226
|
+
cloneCredential: [{ provider: github, method: 'cloneCredential', version: '2026-03-10', credentials: vaultCredentials(vault, 'github-app'), priority: 1 }]
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
const accounts = await git.call('listAccounts', {});
|
|
230
|
+
if (!accounts.ok) throw accounts.error;
|
|
206
231
|
```
|
|
207
232
|
|
|
208
233
|
## Three paths, and why they stay explicit
|
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.20";
|
package/dist/index.js
CHANGED
package/dist/providers.js
CHANGED
package/dist/schema.js
CHANGED