@crvouga/mockingbird-service-infisical 1.1.0 → 1.3.0
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/CHANGELOG.md +13 -1
- package/DISCOVERY.md +23 -0
- package/README.md +22 -12
- package/dist/chunk-4FZOPWX2.js +5978 -0
- package/dist/chunk-4FZOPWX2.js.map +7 -0
- package/dist/{chunk-NLZMNB76.js → chunk-M52TZP44.js} +139 -26
- package/dist/chunk-M52TZP44.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +435 -121
- package/dist/index.js +1 -1
- package/dist/server.d.ts +819 -188
- package/dist/server.js +2 -2
- package/package.json +3 -2
- package/dist/chunk-AZPENY5E.js +0 -4095
- package/dist/chunk-AZPENY5E.js.map +0 -7
- package/dist/chunk-NLZMNB76.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-infisical
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.3.0 (2026-10-15)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- unify the emulator control plane ([2068547](https://github.com/crvouga/mockingbird/commit/2068547bedde4e2e2331c1657c1a78120e84428b))
|
|
8
|
+
|
|
9
|
+
## 1.2.0 (2026-10-08)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- match Emulate provider coverage ([16b65ce](https://github.com/crvouga/mockingbird/commit/16b65ce791fa216f28ec1521df636f57771d9c5e))
|
|
14
|
+
|
|
15
|
+
## 1.1.0 (2026-10-08)
|
|
4
16
|
|
|
5
17
|
### Features
|
|
6
18
|
|
package/DISCOVERY.md
CHANGED
|
@@ -35,6 +35,7 @@ repository; live parity is an additional oracle check, not a substitute for the
|
|
|
35
35
|
|
|
36
36
|
- `GET /__admin/health`
|
|
37
37
|
- `GET /__admin`
|
|
38
|
+
- `GET /__admin/controls`
|
|
38
39
|
- `GET /__admin/state`
|
|
39
40
|
- `GET /__admin/requests`
|
|
40
41
|
- `GET /__admin/metrics`
|
|
@@ -45,6 +46,28 @@ For HTTP services, use `x-mockingbird-namespace` (or the documented credential/p
|
|
|
45
46
|
parallel tests do not share state. Admin state, journal, metrics and fault-preset endpoints are
|
|
46
47
|
designed for assertions and diagnosis by consuming test suites.
|
|
47
48
|
|
|
49
|
+
## Admin controls
|
|
50
|
+
|
|
51
|
+
Every HTTP emulator takes the same controls, and each means the same thing at boot
|
|
52
|
+
(`createRuntime({ adminControls })`, `serve --admin-controls`), over `/__admin`, and in a request header:
|
|
53
|
+
|
|
54
|
+
| Control | Admin API | Request header | Interface |
|
|
55
|
+
| --- | --- | --- | --- |
|
|
56
|
+
| Isolate state by key | `GET /__admin/namespaces` | `x-mockingbird-namespace: <key>` | [Namespaces](https://mockingbird.chrisvouga.dev/docs/admin-controls/namespaces) |
|
|
57
|
+
| Reset to boot | `POST /__admin/reset` | `x-mockingbird-reset: true` | [Reset](https://mockingbird.chrisvouga.dev/docs/admin-controls/reset) |
|
|
58
|
+
| Snapshot and restore | `POST /__admin/snapshots`, `POST /__admin/snapshots/<id>/restore` | `x-mockingbird-snapshot: <name>`, `x-mockingbird-restore: <name>` | [Snapshot and restore](https://mockingbird.chrisvouga.dev/docs/admin-controls/snapshot-and-restore) |
|
|
59
|
+
| Move the clock | `POST /__admin/clock` | `x-mockingbird-time: <instant>`, `x-mockingbird-advance: <duration>` | [Clock](https://mockingbird.chrisvouga.dev/docs/admin-controls/clock) |
|
|
60
|
+
| Read or branch from old state | `GET /__admin/timeline` | `x-mockingbird-at: <checkpoint>`, `x-mockingbird-branch: <name>` | [Checkpoints and branches](https://mockingbird.chrisvouga.dev/docs/admin-controls/checkpoints-and-branches) |
|
|
61
|
+
| Inject a fault | `POST /__admin/faults` | `x-mockingbird-fault: <fault>` | [Faults](https://mockingbird.chrisvouga.dev/docs/admin-controls/faults) |
|
|
62
|
+
| Latency and timeouts | `PUT /__admin/latency` | `x-mockingbird-delay: <duration>`, `x-mockingbird-timeout: <duration>` | [Latency and timeouts](https://mockingbird.chrisvouga.dev/docs/admin-controls/latency-and-timeouts) |
|
|
63
|
+
| Replay from a seed | `PUT /__admin/controls` | `x-mockingbird-seed: <seed>` | [Seed and determinism](https://mockingbird.chrisvouga.dev/docs/admin-controls/seed-and-determinism) |
|
|
64
|
+
| See what happened | `GET /__admin/requests`, `GET /__admin/state` | | [Journal, metrics and state](https://mockingbird.chrisvouga.dev/docs/admin-controls/journal-and-state) |
|
|
65
|
+
|
|
66
|
+
`GET /__admin` lists every route and header with a one-line summary, and `GET /__admin/controls`
|
|
67
|
+
is the namespace's current control document. The same seed and the same requests give the same
|
|
68
|
+
bytes. Setting controls as an emulator starts is [Boot](https://mockingbird.chrisvouga.dev/docs/admin-controls/boot); every route and header is in
|
|
69
|
+
the [Reference](https://mockingbird.chrisvouga.dev/docs/admin-controls/reference). The full guide: <https://mockingbird.chrisvouga.dev/docs/admin-controls>.
|
|
70
|
+
|
|
48
71
|
## Report a mismatch or missing capability
|
|
49
72
|
|
|
50
73
|
Follow the [agent reporting contract](https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md). Include package version,
|
package/README.md
CHANGED
|
@@ -16,25 +16,34 @@ bun add @crvouga/mockingbird-service-infisical
|
|
|
16
16
|
## Usage
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
|
|
19
|
+
import { InfisicalSDK } from "@infisical/sdk"
|
|
20
|
+
import { createServer } from "@crvouga/mockingbird-service-infisical/server"
|
|
21
|
+
|
|
22
|
+
const emulator = await createServer()
|
|
23
|
+
|
|
24
|
+
// The application's client. Only siteUrl changes.
|
|
25
|
+
const sdk = new InfisicalSDK({ siteUrl: emulator.url })
|
|
26
|
+
sdk.auth().accessToken("fixture-service-token")
|
|
27
|
+
const result = await sdk.secrets().listSecrets({
|
|
28
|
+
projectId: "fixture-project",
|
|
29
|
+
environment: "dev",
|
|
30
|
+
secretPath: "/app",
|
|
31
|
+
})
|
|
27
32
|
console.log(result.secrets.map((secret) => ({ key: secret.secretKey, version: secret.version })))
|
|
33
|
+
|
|
34
|
+
await emulator.close()
|
|
28
35
|
```
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
The examples need `@infisical/sdk@3.0.91`. The SDK is an optional consumer dependency; the
|
|
38
|
+
emulator's runtime does not depend on it. A machine identity logs in with Universal Auth, and a
|
|
39
|
+
`/__admin/ns/<name>` prefix on `siteUrl` gives a suite its own namespace:
|
|
32
40
|
|
|
33
|
-
```
|
|
34
|
-
import { createServer } from "@crvouga/mockingbird-service-infisical/server"
|
|
41
|
+
```ts
|
|
35
42
|
import { InfisicalSDK } from "@infisical/sdk"
|
|
43
|
+
import { createServer } from "@crvouga/mockingbird-service-infisical/server"
|
|
36
44
|
|
|
37
45
|
const emulator = await createServer({ adminKey: "fixture-infisical-admin" })
|
|
46
|
+
|
|
38
47
|
const sdk = new InfisicalSDK({ siteUrl: `${emulator.url}/__admin/ns/test-suite` })
|
|
39
48
|
await sdk.auth().universalAuth.login({
|
|
40
49
|
clientId: "fixture-machine",
|
|
@@ -46,6 +55,7 @@ const result = await sdk.secrets().listSecrets({
|
|
|
46
55
|
secretPath: "/app",
|
|
47
56
|
})
|
|
48
57
|
console.log(result.secrets.map((secret) => ({ key: secret.secretKey, version: secret.version })))
|
|
58
|
+
|
|
49
59
|
await emulator.close()
|
|
50
60
|
```
|
|
51
61
|
|