envilder 0.18.0 → 0.20.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.
Files changed (62) hide show
  1. package/README.md +1 -1
  2. package/ROADMAP.md +1 -1
  3. package/docs/changelogs/cli.md +48 -0
  4. package/docs/changelogs/gha.md +30 -0
  5. package/docs/validate-command.md +112 -25
  6. package/lib/envilder/apps/cli/Startup.d.ts +13 -7
  7. package/lib/envilder/apps/cli/Startup.d.ts.map +1 -1
  8. package/lib/envilder/apps/cli/Startup.js +21 -12
  9. package/lib/envilder/apps/cli/Startup.js.map +1 -1
  10. package/lib/envilder/apps/cli/entry/Cli.d.ts.map +1 -1
  11. package/lib/envilder/apps/cli/entry/Cli.js +121 -35
  12. package/lib/envilder/apps/cli/entry/Cli.js.map +1 -1
  13. package/lib/envilder/apps/gha/Startup.d.ts +1 -2
  14. package/lib/envilder/apps/gha/Startup.d.ts.map +1 -1
  15. package/lib/envilder/apps/gha/Startup.js +9 -2
  16. package/lib/envilder/apps/gha/Startup.js.map +1 -1
  17. package/lib/envilder/apps/gha/entry/Gha.d.ts.map +1 -1
  18. package/lib/envilder/apps/gha/entry/Gha.js +2 -1
  19. package/lib/envilder/apps/gha/entry/Gha.js.map +1 -1
  20. package/lib/envilder/apps/shared/ContainerConfiguration.d.ts +1 -3
  21. package/lib/envilder/apps/shared/ContainerConfiguration.d.ts.map +1 -1
  22. package/lib/envilder/apps/shared/ContainerConfiguration.js +5 -5
  23. package/lib/envilder/apps/shared/ContainerConfiguration.js.map +1 -1
  24. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommand.d.ts +6 -0
  25. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommand.d.ts.map +1 -0
  26. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommand.js +9 -0
  27. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommand.js.map +1 -0
  28. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommandHandler.d.ts +17 -0
  29. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommandHandler.d.ts.map +1 -0
  30. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommandHandler.js +59 -0
  31. package/lib/envilder/core/application/validateRemoteKeys/ValidateRemoteKeysCommandHandler.js.map +1 -0
  32. package/lib/envilder/core/domain/SecretExistence.d.ts +34 -0
  33. package/lib/envilder/core/domain/SecretExistence.d.ts.map +1 -0
  34. package/lib/envilder/core/domain/SecretExistence.js +25 -0
  35. package/lib/envilder/core/domain/SecretExistence.js.map +1 -0
  36. package/lib/envilder/core/domain/ports/ISecretProvider.d.ts +9 -0
  37. package/lib/envilder/core/domain/ports/ISecretProvider.d.ts.map +1 -1
  38. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.d.ts +9 -0
  39. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.d.ts.map +1 -1
  40. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.js +81 -1
  41. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.js.map +1 -1
  42. package/lib/envilder/core/infrastructure/azure/AzureKeyVaultSecretProvider.d.ts +11 -0
  43. package/lib/envilder/core/infrastructure/azure/AzureKeyVaultSecretProvider.d.ts.map +1 -1
  44. package/lib/envilder/core/infrastructure/azure/AzureKeyVaultSecretProvider.js +98 -0
  45. package/lib/envilder/core/infrastructure/azure/AzureKeyVaultSecretProvider.js.map +1 -1
  46. package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.d.ts +1 -6
  47. package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.d.ts.map +1 -1
  48. package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.js +2 -10
  49. package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.js.map +1 -1
  50. package/lib/envilder/core/infrastructure/github/GitHubActionsLogger.d.ts +16 -0
  51. package/lib/envilder/core/infrastructure/github/GitHubActionsLogger.d.ts.map +1 -0
  52. package/lib/envilder/core/infrastructure/github/GitHubActionsLogger.js +32 -0
  53. package/lib/envilder/core/infrastructure/github/GitHubActionsLogger.js.map +1 -0
  54. package/lib/envilder/core/types.d.ts +2 -0
  55. package/lib/envilder/core/types.d.ts.map +1 -1
  56. package/lib/envilder/core/types.js +1 -0
  57. package/lib/envilder/core/types.js.map +1 -1
  58. package/package.json +1 -1
  59. package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.d.ts +0 -3
  60. package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.d.ts.map +0 -1
  61. package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.js +0 -28
  62. package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.js.map +0 -1
package/README.md CHANGED
@@ -84,7 +84,7 @@ No SaaS middleman. One versioned mapping contract. Secrets stay in your cloud.
84
84
  | 📋 **Declarative Mapping** | One JSON file defines how application variables map to cloud secrets. Git-versioned, PR-reviewable, and diff-able |
85
85
  | ☁️ **Cloud-native Providers** | AWS SSM and Azure Key Vault today |
86
86
  | ⚡ **Exec Mode** | `envilder exec -- <command>` runs any command with the secrets in its environment. Nothing written to disk, fail-closed, exit codes propagated. [Guide](docs/exec-command.md) |
87
- | ✅ **Validate** | `envilder validate --offline` checks the map file against the schema and the provider rules, without credentials and without printing values. [Guide](docs/validate-command.md) |
87
+ | ✅ **Validate** | `envilder validate` checks the map file against the schema and the provider rules, then checks that every declared secret exists, without reading or printing values. `--offline` checks the map file only, without credentials. [Guide](docs/validate-command.md) |
88
88
  | 🔌 **Runtime SDKs** | Load secrets into memory at app startup: [.NET](./src/sdks/dotnet/README.md), [Python](./src/sdks/python/README.md), [Node.js](./src/sdks/nodejs/README.md). No `.env` on disk |
89
89
  | ⚙️ **GitHub Action** | Pull secrets in CI/CD. Same mapping, zero manual config |
90
90
  | 🔄 **Pull & Controlled Push** | Pull secrets to `.env`, or intentionally push local values to your cloud provider when bootstrapping or rotating |
package/ROADMAP.md CHANGED
@@ -52,7 +52,7 @@ Versions refer to each component's own changelog: [CLI](./docs/changelogs/cli.md
52
52
  | **Go SDK** (`envilder`) | 🔴 High | Runtime library for Go: cloud-native apps, Kubernetes tooling. Published as Go module ([#561](https://github.com/macalbert/envilder/issues/561) → [#562](https://github.com/macalbert/envilder/issues/562) → [#563](https://github.com/macalbert/envilder/issues/563)) |
53
53
  | **Java SDK** (`envilder`) | 🔴 High | Runtime library for Java/Kotlin: Spring Boot, Android backends. Published to Maven Central ([#569](https://github.com/macalbert/envilder/issues/569)) |
54
54
  | **SDK conformance tests** | 🔴 High | Language-agnostic test fixtures (JSON input → expected output) that all SDKs must pass |
55
- | **Validate command** (`envilder validate`) | 🟡 Medium | Preflight check: map file, remote key existence and optional `.env` comparison, without printing values. CLI first, then the SDKs ([#532](https://github.com/macalbert/envilder/issues/532)). The offline map file check (`--offline`) is available since CLI v0.18.0. [Guide](./docs/validate-command.md) |
55
+ | **Validate command** (`envilder validate`) | 🟡 Medium | Preflight check: map file, remote key existence and optional `.env` comparison, without printing values. CLI first, then the SDKs ([#532](https://github.com/macalbert/envilder/issues/532)). The offline map file check (`--offline`) is available since CLI v0.18.0, and the remote key existence check since v0.20.0. [Guide](./docs/validate-command.md) |
56
56
  | **GCP Secret Manager** | 🟡 Medium | Third cloud provider: similar DX to AWS SSM. Completes the multi-cloud trident (AWS + Azure + GCP) ([#573](https://github.com/macalbert/envilder/issues/573)) |
57
57
  | **AWS Secrets Manager** | 🟡 Medium | Support AWS Secrets Manager alongside SSM Parameter Store for teams using JSON-structured secrets |
58
58
 
@@ -5,6 +5,54 @@ For SDK-specific changes, see `sdk-dotnet.md`, `sdk-python.md`, or `sdk-nodejs.m
5
5
 
6
6
  ---
7
7
 
8
+ ## [0.20.0] - 2026-11-01
9
+
10
+ ### Added
11
+
12
+ * **`envilder validate` checks that every declared secret exists**: without
13
+ `--offline`, `validate` now asks the provider whether each secret path in
14
+ the map file exists, without reading any value, and lists every variable
15
+ with its path and status: `exists`, `missing`, `access denied` (never
16
+ reported as `missing`), `authentication failed` or `provider error`. A path
17
+ shared by several variables is checked once. It ends with
18
+ `✓ All N secrets exist` and exit code `0`, or with a summary such as
19
+ `✗ Validation failed: 2 missing, 1 access denied` and exit code `1`. An
20
+ invalid map file fails with the offline result and no provider is called.
21
+ Expired credentials and SSO sessions show the same message as a pull,
22
+ including the `aws sso login` recovery on a terminal. AWS SSM is checked
23
+ with `GetParameters` in batches of ten and `WithDecryption: false`, which
24
+ needs `ssm:GetParameters`; Azure Key Vault lists the vault's secret
25
+ metadata once, which needs the `List` secret permission (access policies)
26
+ or `secrets/readMetadata` (Azure RBAC, included in Key Vault Secrets User)
27
+ ([#558](https://github.com/macalbert/envilder/issues/558)).
28
+ [Guide](../validate-command.md)
29
+
30
+ ---
31
+
32
+ ## [0.19.0] - 2026-10-30
33
+
34
+ ### Changed
35
+
36
+ * **Azure Key Vault URLs are no longer checked by host**: The CLI rejected a
37
+ `vaultUrl` that did not use `https://` or whose host did not end in an
38
+ Azure Key Vault domain, and read `ENVILDER_ALLOWED_VAULT_HOSTS` to widen
39
+ that list. The check and the variable are gone: the URL goes to the Azure
40
+ Key Vault client as written, with the client's default challenge resource
41
+ verification, as in the Node.js, Python and .NET SDKs. A malformed or
42
+ `http://` URL now fails with the Azure client's own error
43
+
44
+ ### Security
45
+
46
+ * **Accepted risk: credentials follow the vault URL in the map file**:
47
+ `DefaultAzureCredential` requests a Key Vault token for whatever host
48
+ `vaultUrl` names, so a map file that points at another host sends that
49
+ token there. The map file is versioned with the code it configures, and
50
+ whoever can change it can already change the application, so a host
51
+ allowlist adds configuration without a matching security gain. Review
52
+ changes to `$config.vaultUrl` and `--vault-url` like any other code change
53
+
54
+ ---
55
+
8
56
  ## [0.18.0] - 2026-10-29
9
57
 
10
58
  ### Added
@@ -1,3 +1,33 @@
1
+ ## [0.20.0] - 2026-11-01
2
+
3
+ ### Changed
4
+
5
+ * **Secret existence check in the provider adapters**: The AWS SSM and Azure
6
+ Key Vault adapters bundled with the Action can now check whether secrets
7
+ exist without reading them, for the CLI's `envilder validate`. The Action
8
+ does not use it, and its behavior is unchanged
9
+ ([#558](https://github.com/macalbert/envilder/issues/558))
10
+
11
+ ---
12
+
13
+ ## [0.19.0] - 2026-10-30
14
+
15
+ ### Changed
16
+
17
+ * **Azure Key Vault URLs are no longer checked by host**: The Action shares
18
+ the CLI's change: `vaultUrl` goes to the Azure Key Vault client as written,
19
+ without the `https://` and Azure-domain checks, as in the SDKs
20
+
21
+ ### Security
22
+
23
+ * **Accepted risk: credentials follow the vault URL**: The Azure credential
24
+ the workflow provides is sent to whatever host the `vault-url` input or
25
+ `$config.vaultUrl` names, and the input overrides the map file. Both live
26
+ in the same repository as the workflow, so review changes to the map file
27
+ and to workflow files like any other code change
28
+
29
+ ---
30
+
1
31
  ## [0.18.0] - 2026-10-29
2
32
 
3
33
  ### Changed
@@ -2,34 +2,31 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- `envilder validate` is a preflight check for the map file. It answers *"is
6
- this map file valid?"* before a pull, a push or `envilder exec` runs, locally
7
- or as a CI step, and it never prints a secret value.
5
+ `envilder validate` is a preflight check. It answers *"is this map file
6
+ valid, and can every declared secret be resolved with the current
7
+ credentials?"* before a pull, a push or `envilder exec` runs, locally or as a
8
+ CI step. It never reads or prints a secret value.
8
9
 
9
10
  ```bash
11
+ envilder validate
12
+ envilder validate --map=config/envilder.json --profile=dev
13
+ envilder validate --provider=azure --vault-url=https://my-vault.vault.azure.net
10
14
  envilder validate --offline
11
- envilder validate --offline --map=config/envilder.json
12
- envilder validate --offline --provider=azure --vault-url=https://my-vault.vault.azure.net
13
15
  ```
14
16
 
15
- With `--offline`, only the map file is read: no provider is called and no
16
- cloud credentials are needed.
17
-
18
- > **Status:** `--offline` is the only mode available today. Checking that each
19
- > declared secret exists in the provider with the current credentials is
20
- > planned ([#558](https://github.com/macalbert/envilder/issues/558)). Until
21
- > then, `envilder validate` without `--offline` fails with a message that
22
- > points to `--offline`.
17
+ By default, `validate` checks the map file and then asks the provider whether
18
+ each declared secret exists. With `--offline`, only the map file is read: no
19
+ provider is called and no cloud credentials are needed.
23
20
 
24
21
  ## Usage
25
22
 
26
23
  ```text
27
- envilder validate --offline [--map <path>] [--provider <name>] [--profile <name>] [--vault-url <url>]
24
+ envilder validate [--offline] [--map <path>] [--provider <name>] [--profile <name>] [--vault-url <url>]
28
25
  ```
29
26
 
30
27
  | Option | Description |
31
28
  |--------|-------------|
32
- | `--offline` | Validate the map file locally without calling the provider. Required for now |
29
+ | `--offline` | Validate the map file locally without calling the provider |
33
30
  | `--map <path>` | Map file to check. Defaults to `envilder.json` in the current directory, as for pull and `exec` |
34
31
  | `--provider <name>` | Provider to check against: `aws` or `azure`. Overrides `$config.provider` |
35
32
  | `--profile <name>` | AWS CLI profile. Overrides `$config.profile` |
@@ -41,6 +38,8 @@ after `validate`; options written before it are rejected.
41
38
 
42
39
  ## What is checked
43
40
 
41
+ ### The map file (always)
42
+
44
43
  1. **The file parses as JSON.** A parse error is reported with the file path
45
44
  and, when the parser gives one, the line and column. The text around the
46
45
  error is never quoted, because it can be a secret pasted into the file.
@@ -62,22 +61,106 @@ after `validate`; options written before it are rejected.
62
61
  - `azure` has a `vaultUrl`.
63
62
 
64
63
  These are the same messages that pull, push and `exec` use for the same
65
- problems.
64
+ problems. Every problem found is reported, not only the first one, each with
65
+ the key that causes it (`$config.profile`, `--vault-url`, `DB_URL`, ...).
66
+ Messages name keys and types only, never mapped values.
67
+
68
+ When the map file is invalid, `validate` stops there: no provider is called,
69
+ with or without `--offline`.
70
+
71
+ ### The remote keys (without `--offline`)
72
+
73
+ Every secret path declared in the map file is checked in the provider, without
74
+ reading its value. A path that several variables map to is checked once. Each
75
+ variable gets one of these statuses:
76
+
77
+ | Status | Meaning |
78
+ |--------|---------|
79
+ | `exists` | The secret exists and the identity can see it |
80
+ | `missing` | The provider answered that there is no such secret |
81
+ | `access denied` | The identity is not allowed to check the secret, so whether it exists is unknown. Never reported as `missing` |
82
+ | `authentication failed` | The provider rejected the credentials, or none could be found |
83
+ | `provider error` | Anything else, for example an unreachable provider or an invalid secret name |
84
+
85
+ Expired AWS credentials and expired AWS SSO sessions are reported with the
86
+ same message as pull and `exec`. On an interactive terminal, an expired SSO
87
+ session offers to run `aws sso login` and then retries, as pull does.
88
+
89
+ #### AWS SSM Parameter Store
90
+
91
+ The paths are checked with
92
+ [`GetParameters`](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_GetParameters.html),
93
+ ten per call, with `WithDecryption: false`: SecureString parameters are never
94
+ decrypted, and the values returned are ignored. Names that do not exist come
95
+ back in `InvalidParameters` and are reported as `missing`. When a call is
96
+ denied, each path in it is checked on its own, so `access denied` is reported
97
+ only for the paths the identity cannot read.
98
+
99
+ The identity needs `ssm:GetParameters` on the parameters. This is a separate
100
+ IAM action from the `ssm:GetParameter` that pull uses, so add it to the
101
+ policy, scoped to the same paths:
102
+
103
+ ```json
104
+ {
105
+ "Effect": "Allow",
106
+ "Action": ["ssm:GetParameter", "ssm:GetParameters"],
107
+ "Resource": "arn:aws:ssm:*:*:parameter/myapp/*"
108
+ }
109
+ ```
110
+
111
+ No `kms:Decrypt` permission is needed for `validate`.
112
+
113
+ #### Azure Key Vault
66
114
 
67
- Every problem found is reported, not only the first one, each with the key
68
- that causes it (`$config.profile`, `--vault-url`, `DB_URL`, ...). Messages
69
- name keys and types only, never mapped values.
115
+ The vault's secret names are listed once with
116
+ [`Get Secrets`](https://learn.microsoft.com/rest/api/keyvault/secrets/get-secrets/get-secrets),
117
+ which returns metadata only, and each declared name (after the usual `/` to `-`
118
+ translation) is matched against it, ignoring case as Key Vault does. A
119
+ disabled secret cannot be read by pull, so it is reported as `missing`.
120
+
121
+ Listing needs a permission that pull does not:
122
+
123
+ - **Azure RBAC:** `Microsoft.KeyVault/vaults/secrets/readMetadata/action`,
124
+ which the built-in **Key Vault Secrets User** and **Key Vault Reader** roles
125
+ include, assigned on the vault.
126
+ - **Access policies:** the `List` secret permission, besides `Get`.
127
+
128
+ Because the list covers the whole vault, an identity without it gets
129
+ `access denied` for every key, with the reason Key Vault returns.
70
130
 
71
131
  ## Output
72
132
 
73
- A valid map file:
133
+ Every secret exists (exit code `0`):
134
+
135
+ ```text
136
+ ✓ Map file valid: envilder.json
137
+ Checking 3 secrets in aws, profile=dev
138
+ ✓ DB_URL /myapp/db-url exists
139
+ ✓ DATABASE_URL /myapp/db-url exists
140
+ ✓ API_KEY /myapp/api-key exists
141
+ ✓ All 3 secrets exist
142
+ ```
143
+
144
+ Some secrets are missing or cannot be checked (exit code `1`; the summary goes
145
+ to stderr):
146
+
147
+ ```text
148
+ ✓ Map file valid: envilder.json
149
+ Checking 3 secrets in aws, profile=dev
150
+ ✓ DB_URL /myapp/db-url exists
151
+ ✗ API_KEY /myapp/api-key missing
152
+ ✗ TOKEN /myapp/token access denied (User: arn:aws:sts::123456789012:assumed-role/dev/ci is not authorized to perform: ssm:GetParameters ...)
153
+ ✗ Validation failed: 1 missing, 1 access denied
154
+ ```
155
+
156
+ With `--offline`:
74
157
 
75
158
  ```text
76
159
  ✓ Map file valid: envilder.json
77
160
  Remote validation skipped (--offline): no provider was called, so the secrets were not checked.
78
161
  ```
79
162
 
80
- An invalid one, on stderr:
163
+ An invalid map file, on stderr:
81
164
 
82
165
  ```text
83
166
  ✗ Map file invalid: envilder.json (3 problems)
@@ -90,18 +173,22 @@ An invalid one, on stderr:
90
173
 
91
174
  | Code | Meaning |
92
175
  |------|---------|
93
- | `0` | The map file is valid |
94
- | `1` | The map file is missing, is not valid JSON, breaks the schema or the provider rules, or the options are invalid |
176
+ | `0` | The map file is valid and, without `--offline`, every declared secret exists |
177
+ | `1` | Anything else: the map file is missing, is not valid JSON, breaks the schema or the provider rules, the options are invalid, a secret is missing or cannot be checked, or the credentials are missing or expired |
95
178
 
96
179
  ## In CI
97
180
 
98
181
  ```yaml
99
182
  - name: Check the map file
100
183
  run: npx envilder validate --offline --map=envilder.json
184
+
185
+ - name: Check that every secret exists
186
+ run: npx envilder validate --map=envilder.json
101
187
  ```
102
188
 
103
- The step needs no cloud credentials, so it can run on every pull request,
104
- including from forks.
189
+ The offline step needs no cloud credentials, so it can run on every pull
190
+ request, including from forks. The second step needs the same credentials as
191
+ a pull, plus the permissions listed above.
105
192
 
106
193
  ## What validate does not do
107
194
 
@@ -1,26 +1,32 @@
1
1
  import { Container } from 'inversify';
2
2
  import type { MapFileConfig } from '../../core/domain/MapFileConfig.js';
3
+ import type { ILogger } from '../../core/domain/ports/ILogger.js';
3
4
  import type { ISecretMasker } from '../../core/domain/ports/ISecretMasker.js';
4
- import { type InfrastructureOptions } from '../shared/ContainerConfiguration.js';
5
5
  export declare class Startup {
6
6
  private readonly container;
7
7
  constructor();
8
8
  static build(): Startup;
9
9
  configureServices(): this;
10
10
  /**
11
- * Wires the services specific to `envilder exec`: its handler, a logger that keeps
12
- * stdout free for the child, the process runner, and the given secret
13
- * masker. Call it before `configureInfrastructure`, which only binds the
14
- * defaults left unbound.
11
+ * Wires the services specific to `envilder exec`: its handler, the process
12
+ * runner, and the given logger and secret masker. The logger must keep
13
+ * stdout free for the child. Call it before `configureInfrastructure`,
14
+ * which only binds the defaults left unbound.
15
15
  */
16
- configureExec(secretMasker: ISecretMasker): this;
16
+ configureExec(secretMasker: ISecretMasker, logger: ILogger): this;
17
17
  /**
18
18
  * Wires `envilder validate --offline`: the map file is read and checked
19
19
  * locally, so no secret provider is bound. Use it instead of
20
20
  * `configureServices` and `configureInfrastructure`.
21
21
  */
22
22
  configureOfflineValidation(): this;
23
- configureInfrastructure(config?: MapFileConfig, options?: InfrastructureOptions): this;
23
+ /**
24
+ * Wires the remote part of `envilder validate`, which checks that each
25
+ * declared secret exists. Call `configureInfrastructure` afterwards to bind
26
+ * the secret provider, the logger and the variable store.
27
+ */
28
+ configureRemoteValidation(): this;
29
+ configureInfrastructure(config?: MapFileConfig): this;
24
30
  create(): Container;
25
31
  getServiceProvider(): Container;
26
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Startup.d.ts","sourceRoot":"","sources":["../../../../src/envilder/apps/cli/Startup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAIxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAQ9E,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,qCAAqC,CAAC;AAE7C,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IAEtC,cAEC;IAED,MAAM,CAAC,KAAK,IAAI,OAAO,CAEtB;IAED,iBAAiB,IAAI,IAAI,CAGxB;IAED;;;;;OAKG;IACH,aAAa,CAAC,YAAY,EAAE,aAAa,GAAG,IAAI,CAqB/C;IAED;;;;OAIG;IACH,0BAA0B,IAAI,IAAI,CAcjC;IAED,uBAAuB,CACrB,MAAM,CAAC,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,IAAI,CAGN;IAED,MAAM,IAAI,SAAS,CAElB;IAED,kBAAkB,IAAI,SAAS,CAE9B;CACF"}
1
+ {"version":3,"file":"Startup.d.ts","sourceRoot":"","sources":["../../../../src/envilder/apps/cli/Startup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAY9E,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IAEtC,cAEC;IAED,MAAM,CAAC,KAAK,IAAI,OAAO,CAEtB;IAED,iBAAiB,IAAI,IAAI,CAGxB;IAED;;;;;OAKG;IACH,aAAa,CAAC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAkBhE;IAED;;;;OAIG;IACH,0BAA0B,IAAI,IAAI,CAcjC;IAED;;;;OAIG;IACH,yBAAyB,IAAI,IAAI,CAQhC;IAED,uBAAuB,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,IAAI,CAGpD;IAED,MAAM,IAAI,SAAS,CAElB;IAED,kBAAkB,IAAI,SAAS,CAE9B;CACF"}
@@ -1,8 +1,8 @@
1
1
  import { Container } from 'inversify';
2
2
  import { ExecWithSecretsCommandHandler } from '../../core/application/execWithSecrets/ExecWithSecretsCommandHandler.js';
3
3
  import { ValidateMapFileCommandHandler } from '../../core/application/validateMapFile/ValidateMapFileCommandHandler.js';
4
+ import { ValidateRemoteKeysCommandHandler } from '../../core/application/validateRemoteKeys/ValidateRemoteKeysCommandHandler.js';
4
5
  import { ConsoleLogger } from '../../core/infrastructure/logger/ConsoleLogger.js';
5
- import { StderrConsoleLogger } from '../../core/infrastructure/logger/StderrConsoleLogger.js';
6
6
  import { CrossSpawnProcessRunner } from '../../core/infrastructure/process/CrossSpawnProcessRunner.js';
7
7
  import { NodeProcessContext } from '../../core/infrastructure/process/NodeProcessContext.js';
8
8
  import { FileVariableStore } from '../../core/infrastructure/variableStore/FileVariableStore.js';
@@ -20,16 +20,13 @@ export class Startup {
20
20
  return this;
21
21
  }
22
22
  /**
23
- * Wires the services specific to `envilder exec`: its handler, a logger that keeps
24
- * stdout free for the child, the process runner, and the given secret
25
- * masker. Call it before `configureInfrastructure`, which only binds the
26
- * defaults left unbound.
23
+ * Wires the services specific to `envilder exec`: its handler, the process
24
+ * runner, and the given logger and secret masker. The logger must keep
25
+ * stdout free for the child. Call it before `configureInfrastructure`,
26
+ * which only binds the defaults left unbound.
27
27
  */
28
- configureExec(secretMasker) {
29
- this.container
30
- .bind(TYPES.ILogger)
31
- .to(StderrConsoleLogger)
32
- .inSingletonScope();
28
+ configureExec(secretMasker, logger) {
29
+ this.container.bind(TYPES.ILogger).toConstantValue(logger);
33
30
  this.container
34
31
  .bind(TYPES.ISecretMasker)
35
32
  .toConstantValue(secretMasker);
@@ -67,8 +64,20 @@ export class Startup {
67
64
  .inTransientScope();
68
65
  return this;
69
66
  }
70
- configureInfrastructure(config, options) {
71
- configureInfrastructureServices(this.container, config, options);
67
+ /**
68
+ * Wires the remote part of `envilder validate`, which checks that each
69
+ * declared secret exists. Call `configureInfrastructure` afterwards to bind
70
+ * the secret provider, the logger and the variable store.
71
+ */
72
+ configureRemoteValidation() {
73
+ this.container
74
+ .bind(TYPES.ValidateRemoteKeysCommandHandler)
75
+ .to(ValidateRemoteKeysCommandHandler)
76
+ .inTransientScope();
77
+ return this;
78
+ }
79
+ configureInfrastructure(config) {
80
+ configureInfrastructureServices(this.container, config);
72
81
  return this;
73
82
  }
74
83
  create() {
@@ -1 +1 @@
1
- {"version":3,"file":"Startup.js","sourceRoot":"","sources":["../../../../src/envilder/apps/cli/Startup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,yEAAyE,CAAC;AACxH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yEAAyE,CAAC;AAOxH,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,GAEhC,MAAM,qCAAqC,CAAC;AAE7C,MAAM,OAAO,OAAO;IAGlB;QACE,IAAI,CA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,gCAAgC,CACvC;aACA,EAAE,CAAC,gCAAgC,CAAC;aACpC,gBAAgB,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uBAAuB,CAAC,MAAsB;QAC5C,+BAA+B,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAuF1B,wBAAsB,IAAI,kBAgNzB"}
1
+ {"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAgG1B,wBAAsB,IAAI,kBA6MzB"}