envilder 0.13.2 → 0.14.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/README.md +10 -5
- package/docs/changelogs/cli.md +63 -0
- package/docs/changelogs/gha.md +34 -1
- package/docs/changelogs/sdk-dotnet.md +10 -0
- package/docs/changelogs/sdk-nodejs.md +10 -0
- package/docs/changelogs/sdk-python.md +10 -0
- package/lib/envilder/apps/cli/entry/Cli.d.ts.map +1 -1
- package/lib/envilder/apps/cli/entry/Cli.js +78 -15
- package/lib/envilder/apps/cli/entry/Cli.js.map +1 -1
- package/lib/envilder/core/application/dispatch/DispatchActionCommand.d.ts +1 -1
- package/lib/envilder/core/application/dispatch/DispatchActionCommand.d.ts.map +1 -1
- package/lib/envilder/core/application/dispatch/DispatchActionCommand.js.map +1 -1
- package/lib/envilder/core/domain/EnvironmentVariable.d.ts.map +1 -1
- package/lib/envilder/core/domain/EnvironmentVariable.js +4 -2
- package/lib/envilder/core/domain/EnvironmentVariable.js.map +1 -1
- package/lib/envilder/core/domain/EnvironmentVariableName.d.ts +9 -0
- package/lib/envilder/core/domain/EnvironmentVariableName.d.ts.map +1 -0
- package/lib/envilder/core/domain/EnvironmentVariableName.js +70 -0
- package/lib/envilder/core/domain/EnvironmentVariableName.js.map +1 -0
- package/lib/envilder/core/infrastructure/variableStore/FileVariableStore.d.ts +69 -2
- package/lib/envilder/core/infrastructure/variableStore/FileVariableStore.d.ts.map +1 -1
- package/lib/envilder/core/infrastructure/variableStore/FileVariableStore.js +294 -55
- package/lib/envilder/core/infrastructure/variableStore/FileVariableStore.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<b>One secret mapping for local dev, CI/CD, and runtime.</b><br>
|
|
9
9
|
<span>Define secrets once in <code>envilder.json</code>. Resolve them consistently from AWS SSM or Azure Key Vault.</span><br>
|
|
10
|
-
<a href="https://envilder.com"><strong>Website & docs → envilder.com</strong></a>
|
|
10
|
+
<a href="https://envilder.com/?utm_source=npm&utm_medium=readme&utm_campaign=root"><strong>Website & docs → envilder.com</strong></a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
[](https://www.npmjs.com/package/envilder)
|
|
@@ -29,6 +29,10 @@ them from AWS SSM or Azure Key Vault. The same mapping file works in local dev (
|
|
|
29
29
|
CI/CD (GitHub Action), and application startup (runtime SDKs).
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
+
# Zero-config: uses envilder.json and .env by default
|
|
33
|
+
npx envilder
|
|
34
|
+
|
|
35
|
+
# Or with explicit paths
|
|
32
36
|
npx envilder --map=envilder.json --envfile=.env
|
|
33
37
|
```
|
|
34
38
|
|
|
@@ -100,10 +104,11 @@ npm install -g envilder
|
|
|
100
104
|
### 3. Generate your `.env` file
|
|
101
105
|
|
|
102
106
|
```bash
|
|
103
|
-
npx envilder
|
|
107
|
+
npx envilder
|
|
104
108
|
```
|
|
105
109
|
|
|
106
|
-
That's it.
|
|
110
|
+
That's it. With `envilder.json` in your current directory, no flags are needed — `--map` defaults to `envilder.json` and
|
|
111
|
+
`--envfile` defaults to `.env`. Your secrets are pulled from AWS SSM and written to `.env`.
|
|
107
112
|
Add `.env` to `.gitignore`. The mapping file is versioned and reviewable in PRs.
|
|
108
113
|
|
|
109
114
|
> 💡 Using Azure Key Vault? Add a `$config` section to your mapping file.
|
|
@@ -198,7 +203,7 @@ This means you can set a default provider in `$config` and override it per invoc
|
|
|
198
203
|
|
|
199
204
|
```bash
|
|
200
205
|
# Uses $config from the map file
|
|
201
|
-
envilder
|
|
206
|
+
envilder
|
|
202
207
|
|
|
203
208
|
# Overrides provider and vault URL from the map file
|
|
204
209
|
envilder --provider=azure --vault-url=https://other-vault.vault.azure.net --map=envilder.json --envfile=.env
|
|
@@ -342,7 +347,7 @@ prebuilt action, so consumers do not need an Envilder build step.
|
|
|
342
347
|
|
|
343
348
|
### 📚 More resources
|
|
344
349
|
|
|
345
|
-
- [📖 Full Documentation](https://envilder.com): the complete guide at envilder.com
|
|
350
|
+
- [📖 Full Documentation](https://envilder.com/docs/getting-started/?utm_source=npm&utm_medium=readme&utm_campaign=root-docs): the complete guide at envilder.com
|
|
346
351
|
- [Push Command Guide](docs/push-command.md)
|
|
347
352
|
- [Pull Command Guide](docs/pull-command.md)
|
|
348
353
|
|
package/docs/changelogs/cli.md
CHANGED
|
@@ -5,6 +5,69 @@ For SDK-specific changes, see `sdk-dotnet.md`, `sdk-python.md`, or `sdk-nodejs.m
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [0.14.0] - 2026-09-26
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
* **Zero-config defaults for `--map` and `--envfile`**: Running `envilder` with
|
|
13
|
+
no flags now resolves `envilder.json` from the current directory and writes
|
|
14
|
+
to `.env`. Both flags still override the defaults, and an empty `--map` value
|
|
15
|
+
is rejected rather than silently treated as absent
|
|
16
|
+
([#314](https://github.com/macalbert/envilder/pull/314))
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
* **Push-single resolves `$config` from the default map file**: A
|
|
21
|
+
single-variable push (`--key` + `--value` + `--secret-path`) now reads the
|
|
22
|
+
`$config` section (`provider`, `vaultUrl`, `profile`) of `envilder.json` when
|
|
23
|
+
one is present, so it targets the same provider as the rest of the project
|
|
24
|
+
instead of silently defaulting to AWS SSM. A missing `envilder.json` is not
|
|
25
|
+
an error for push-single, `--push` is no longer required, and CLI flags still
|
|
26
|
+
override `$config`. The resolved provider is logged before the push
|
|
27
|
+
([#314](https://github.com/macalbert/envilder/pull/314))
|
|
28
|
+
|
|
29
|
+
* **Reject empty single-secret options**: `--key`, `--value` and
|
|
30
|
+
`--secret-path` must now be non-empty whenever any of them is supplied.
|
|
31
|
+
Previously an explicitly empty value such as `--key ''` passed the
|
|
32
|
+
partial-option guard and fell through to a full `.env` push or pull
|
|
33
|
+
([#314](https://github.com/macalbert/envilder/pull/314))
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
* **Preserve secret values when writing `.env` files**: Values with hashes,
|
|
38
|
+
leading or trailing whitespace, quotes, backslashes or line breaks now
|
|
39
|
+
round-trip exactly, and updating a multi-line value no longer leaves the
|
|
40
|
+
rest of the old secret in the file. Unchanged assignments are kept byte for
|
|
41
|
+
byte, and a write that would not read back correctly aborts, naming only
|
|
42
|
+
the affected keys ([#515](https://github.com/macalbert/envilder/pull/515))
|
|
43
|
+
|
|
44
|
+
### Security
|
|
45
|
+
|
|
46
|
+
* **Reject map-file mapping keys a `.env` file cannot represent**: Variable
|
|
47
|
+
names must now match `^[A-Za-z0-9_.-]+$`, checked when parsing a map file
|
|
48
|
+
and again before writing an environment file. This is exactly the key
|
|
49
|
+
grammar `.env` parsers recognize, so an accepted name reads back as itself.
|
|
50
|
+
Previously a name containing `=`, a carriage return, a newline or the
|
|
51
|
+
`U+2028`/`U+2029` line separators could smuggle an extra `key=value`
|
|
52
|
+
assignment into the generated file, and a name containing a space, `#`, a
|
|
53
|
+
tab or a non-Latin letter was written and then silently lost while the run
|
|
54
|
+
reported success. Dotted and hyphenated names remain valid
|
|
55
|
+
([#511](https://github.com/macalbert/envilder/issues/511))
|
|
56
|
+
|
|
57
|
+
* **Reject the mapping key `__proto__`**: No `.env` parser can read this name
|
|
58
|
+
back, so the CLI previously resolved the secret and wrote a line that
|
|
59
|
+
silently never loaded. It is now rejected at map-file ingestion with an
|
|
60
|
+
explicit message ([#511](https://github.com/macalbert/envilder/issues/511))
|
|
61
|
+
|
|
62
|
+
### Documentation
|
|
63
|
+
|
|
64
|
+
* **Point README links at specific docs pages with UTM tags**: The header link
|
|
65
|
+
and "Full Documentation" link in the README now carry UTM tags and the
|
|
66
|
+
latter lands on `envilder.com/docs/getting-started/`, so visits from GitHub
|
|
67
|
+
and npm to envilder.com can be measured
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
8
71
|
## [0.13.2] - 2026-08-14
|
|
9
72
|
|
|
10
73
|
### Changed
|
package/docs/changelogs/gha.md
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [0.14.0] - 2026-09-26
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
* **Preserve secret values when writing `.env` files**: Values with hashes,
|
|
6
|
+
leading or trailing whitespace, quotes, backslashes or line breaks now
|
|
7
|
+
round-trip exactly, and updating a multi-line value no longer leaves the
|
|
8
|
+
rest of the old secret in the file. Unchanged assignments are kept byte for
|
|
9
|
+
byte, and a write that would not read back correctly aborts, naming only
|
|
10
|
+
the affected keys ([#515](https://github.com/macalbert/envilder/pull/515))
|
|
11
|
+
|
|
12
|
+
### Security
|
|
13
|
+
|
|
14
|
+
* **Reject map-file mapping keys a `.env` file cannot represent**: Variable
|
|
15
|
+
names must now match `^[A-Za-z0-9_.-]+$`, checked when parsing a map file
|
|
16
|
+
and again before writing an environment file. This is exactly the key
|
|
17
|
+
grammar `.env` parsers recognize, so an accepted name reads back as itself.
|
|
18
|
+
Previously a name containing `=`, a carriage return, a newline or the
|
|
19
|
+
`U+2028`/`U+2029` line separators could smuggle an extra `key=value`
|
|
20
|
+
assignment into the generated file, and a name containing a space, `#`, a
|
|
21
|
+
tab or a non-Latin letter was written and then silently lost while the run
|
|
22
|
+
reported success. Dotted and hyphenated names remain valid
|
|
23
|
+
([#511](https://github.com/macalbert/envilder/issues/511))
|
|
24
|
+
|
|
25
|
+
* **Reject the mapping key `__proto__`**: No `.env` parser can read this name
|
|
26
|
+
back, so the Action previously resolved the secret and wrote a line that
|
|
27
|
+
silently never loaded. It is now rejected at map-file ingestion with an
|
|
28
|
+
explicit message ([#511](https://github.com/macalbert/envilder/issues/511))
|
|
29
|
+
|
|
30
|
+
### Documentation
|
|
31
|
+
|
|
32
|
+
* **Point the README "Learn more" link at the Action docs**: It now lands on
|
|
33
|
+
`envilder.com/docs/github-action/` with UTM tags, so visits from the Action
|
|
34
|
+
README to envilder.com can be measured
|
|
2
35
|
|
|
3
36
|
---
|
|
4
37
|
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [0.5.1] - 2026-09-26
|
|
2
|
+
|
|
3
|
+
### Documentation
|
|
4
|
+
|
|
5
|
+
* **Link the NuGet page to the .NET SDK docs**: The README's "Official
|
|
6
|
+
Website" link now points to `envilder.com/docs/sdks/dotnet/` with UTM tags,
|
|
7
|
+
so visits from NuGet to envilder.com can be measured
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
1
11
|
## [0.5.0] - 2026-06-26
|
|
2
12
|
|
|
3
13
|
### Added
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [0.4.1] - 2026-09-26
|
|
2
|
+
|
|
3
|
+
### Documentation
|
|
4
|
+
|
|
5
|
+
* **Add a Links section to the npm README**: The `@envilder/sdk` page on npm
|
|
6
|
+
now links to the changelog and to `envilder.com/docs/sdks/nodejs/` with UTM
|
|
7
|
+
tags, so visits from npm to envilder.com can be measured
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
1
11
|
## [0.4.0] - 2026-06-26
|
|
2
12
|
|
|
3
13
|
### Added
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [0.5.1] - 2026-09-26
|
|
2
|
+
|
|
3
|
+
### Documentation
|
|
4
|
+
|
|
5
|
+
* **Link the PyPI page to the Python SDK docs**: The README's "Official
|
|
6
|
+
Website" link now points to `envilder.com/docs/sdks/python/` with UTM tags,
|
|
7
|
+
so visits from PyPI to envilder.com can be measured
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
1
11
|
## [0.5.0] - 2026-06-26
|
|
2
12
|
|
|
3
13
|
### Added
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAkC1B,wBAAsB,IAAI,kBA+JzB"}
|
|
@@ -19,16 +19,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
21
|
import 'reflect-metadata';
|
|
22
|
+
import { existsSync } from 'node:fs';
|
|
22
23
|
import { dirname, join } from 'node:path';
|
|
23
24
|
import { fileURLToPath } from 'node:url';
|
|
24
25
|
import { Command } from 'commander';
|
|
25
26
|
import pc from 'picocolors';
|
|
26
27
|
import { DispatchActionCommand } from '../../../core/application/dispatch/DispatchActionCommand.js';
|
|
28
|
+
import { InvalidArgumentError } from '../../../core/domain/errors/DomainErrors.js';
|
|
29
|
+
import { OperationMode } from '../../../core/domain/OperationMode.js';
|
|
27
30
|
import { PackageVersionReader } from '../../../core/infrastructure/package/PackageVersionReader.js';
|
|
28
31
|
import { readMapFileConfig } from '../../../core/infrastructure/variableStore/FileVariableStore.js';
|
|
29
32
|
import { TYPES } from '../../../core/types.js';
|
|
30
33
|
import { executeWithSsoRecovery } from '../recovery/SsoLoginRecovery.js';
|
|
31
34
|
import { Startup } from '../Startup.js';
|
|
35
|
+
const DEFAULT_MAP_FILE = 'envilder.json';
|
|
36
|
+
const DEFAULT_ENV_FILE = '.env';
|
|
32
37
|
let serviceProvider;
|
|
33
38
|
function executeCommand(options) {
|
|
34
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -55,44 +60,64 @@ export function main() {
|
|
|
55
60
|
${pc.yellow('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')}
|
|
56
61
|
|
|
57
62
|
${pc.green('>')} ${pc.bold('Generate a .env file')} ${pc.dim('(pull secrets from the cloud)')}
|
|
58
|
-
${pc.cyan('envilder
|
|
63
|
+
${pc.cyan('envilder')} ${pc.dim('# uses envilder.json → .env by default')}
|
|
59
64
|
|
|
60
65
|
${pc.magenta('>')} ${pc.bold('Sync .env back to cloud')} ${pc.dim('(push secrets up)')}
|
|
61
|
-
${pc.cyan('envilder --push
|
|
66
|
+
${pc.cyan('envilder --push')} ${pc.dim('# uses envilder.json + .env by default')}
|
|
62
67
|
|
|
63
68
|
${pc.red('>')} ${pc.bold('Push a single secret')}
|
|
64
|
-
${pc.cyan('envilder --
|
|
69
|
+
${pc.cyan('envilder --key=API_KEY --value=s3cret --secret-path=/my/path')}
|
|
65
70
|
|
|
66
71
|
${pc.blue('>')} ${pc.bold('Use Azure Key Vault')}
|
|
67
|
-
${pc.cyan('envilder --provider=azure --
|
|
72
|
+
${pc.cyan('envilder --provider=azure --vault-url=https://my-vault.vault.azure.net')}
|
|
68
73
|
`;
|
|
69
74
|
program
|
|
70
75
|
.name('envilder')
|
|
71
76
|
.description(banner)
|
|
72
77
|
.version(version)
|
|
73
|
-
.option('--map <path>',
|
|
74
|
-
.option('--envfile <path>',
|
|
78
|
+
.option('--map <path>', `Path to the JSON file with environment variable mapping (default: ${DEFAULT_MAP_FILE})`)
|
|
79
|
+
.option('--envfile <path>', `Path to the .env file to be generated or imported (default: ${DEFAULT_ENV_FILE})`)
|
|
75
80
|
.option('--profile <name>', 'AWS CLI profile to use (optional)')
|
|
76
81
|
.option('--provider <name>', 'Cloud provider to use: aws or azure (default: aws)')
|
|
77
82
|
.option('--vault-url <url>', 'Azure Key Vault URL (overrides $config.vaultUrl in map file)')
|
|
78
|
-
.option('--push', 'Push
|
|
79
|
-
.option('--key <name>', '
|
|
80
|
-
.option('--value <value>', '
|
|
81
|
-
.option('--secret-path <path>', '
|
|
83
|
+
.option('--push', 'Push a map-file-backed .env file to the cloud provider')
|
|
84
|
+
.option('--key <name>', 'Environment variable name; with --value and --secret-path, performs a single-secret push (no --push required)')
|
|
85
|
+
.option('--value <value>', 'Secret value; with --key and --secret-path, performs a single-secret push (no --push required)')
|
|
86
|
+
.option('--secret-path <path>', 'Cloud secret path; with --key and --value, performs a single-secret push (no --push required)')
|
|
82
87
|
.option('--ssm-path <path>', '[DEPRECATED: use --secret-path] Alias for --secret-path')
|
|
83
88
|
.hook('preAction', (thisCommand) => {
|
|
84
89
|
const opts = thisCommand.opts();
|
|
85
|
-
|
|
90
|
+
// Alias on presence, not truthiness: an explicitly empty --ssm-path must
|
|
91
|
+
// reach the single-secret guard below instead of vanishing silently.
|
|
92
|
+
if (opts.ssmPath !== undefined) {
|
|
86
93
|
console.warn(pc.yellow('⚠️ --ssm-path is deprecated and will be removed in a future release. Use --secret-path instead.'));
|
|
87
|
-
if (
|
|
94
|
+
if (opts.secretPath === undefined) {
|
|
88
95
|
thisCommand.setOptionValue('secretPath', opts.ssmPath);
|
|
89
96
|
}
|
|
90
97
|
}
|
|
91
98
|
})
|
|
92
99
|
.action((_a) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
var _b;
|
|
93
101
|
var { provider, vaultUrl } = _a, options = __rest(_a, ["provider", "vaultUrl"]);
|
|
94
|
-
const
|
|
95
|
-
|
|
102
|
+
const singleSecretOptions = [
|
|
103
|
+
options.key,
|
|
104
|
+
options.value,
|
|
105
|
+
options.secretPath,
|
|
106
|
+
];
|
|
107
|
+
const hasPartialSingleSecretOptions = singleSecretOptions.some((option) => option !== undefined) &&
|
|
108
|
+
!singleSecretOptions.every((option) => Boolean(option));
|
|
109
|
+
if (hasPartialSingleSecretOptions) {
|
|
110
|
+
throw new InvalidArgumentError('Single-secret push requires non-empty --key, --value, and --secret-path.');
|
|
111
|
+
}
|
|
112
|
+
const mode = DispatchActionCommand.determineOperationMode(options);
|
|
113
|
+
const isPushSingle = mode === OperationMode.PUSH_SINGLE;
|
|
114
|
+
const resolvedMap = resolveMapFile(options.map, {
|
|
115
|
+
required: !isPushSingle,
|
|
116
|
+
});
|
|
117
|
+
const resolvedEnvfile = resolveEnvfile(options.envfile);
|
|
118
|
+
const resolvedOptions = Object.assign(Object.assign({}, options), { map: resolvedMap, envfile: resolvedEnvfile });
|
|
119
|
+
const fileConfig = resolvedMap
|
|
120
|
+
? yield readMapFileConfig(resolvedMap)
|
|
96
121
|
: {};
|
|
97
122
|
const config = Object.assign(Object.assign(Object.assign(Object.assign({}, fileConfig), (provider && { provider })), (vaultUrl && { vaultUrl })), (options.profile && { profile: options.profile }));
|
|
98
123
|
const infraOptions = {};
|
|
@@ -107,11 +132,49 @@ export function main() {
|
|
|
107
132
|
.configureServices()
|
|
108
133
|
.configureInfrastructure(config, infraOptions)
|
|
109
134
|
.create();
|
|
110
|
-
|
|
135
|
+
if (isPushSingle) {
|
|
136
|
+
const logger = serviceProvider.get(TYPES.ILogger);
|
|
137
|
+
const providerName = ((_b = config.provider) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || 'aws';
|
|
138
|
+
const vaultInfo = providerName === 'azure' && config.vaultUrl
|
|
139
|
+
? `, vault=${new URL(config.vaultUrl).origin}`
|
|
140
|
+
: '';
|
|
141
|
+
const source = resolvedMap
|
|
142
|
+
? `configuration from ${resolvedMap}`
|
|
143
|
+
: 'configuration';
|
|
144
|
+
logger.info(`Using ${source}: provider=${providerName}${vaultInfo}`);
|
|
145
|
+
}
|
|
146
|
+
yield executeWithSsoRecovery(() => executeCommand(resolvedOptions));
|
|
111
147
|
}));
|
|
112
148
|
yield program.parseAsync(process.argv);
|
|
113
149
|
});
|
|
114
150
|
}
|
|
151
|
+
function resolveMapFile(mapOption, options = { required: true }) {
|
|
152
|
+
if (mapOption !== undefined) {
|
|
153
|
+
const trimmed = mapOption.trim();
|
|
154
|
+
if (trimmed.length === 0) {
|
|
155
|
+
throw new InvalidArgumentError('Invalid --map value: path must not be empty.');
|
|
156
|
+
}
|
|
157
|
+
return trimmed;
|
|
158
|
+
}
|
|
159
|
+
const defaultPath = join(process.cwd(), DEFAULT_MAP_FILE);
|
|
160
|
+
if (existsSync(defaultPath)) {
|
|
161
|
+
return DEFAULT_MAP_FILE;
|
|
162
|
+
}
|
|
163
|
+
if (!options.required) {
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
throw new InvalidArgumentError(`No map file found. Provide --map or create ${DEFAULT_MAP_FILE} in the current directory.`);
|
|
167
|
+
}
|
|
168
|
+
function resolveEnvfile(envfileOption) {
|
|
169
|
+
if (envfileOption === undefined) {
|
|
170
|
+
return DEFAULT_ENV_FILE;
|
|
171
|
+
}
|
|
172
|
+
const trimmed = envfileOption.trim();
|
|
173
|
+
if (trimmed.length === 0) {
|
|
174
|
+
throw new InvalidArgumentError('Invalid --envfile value: path must not be empty.');
|
|
175
|
+
}
|
|
176
|
+
return trimmed;
|
|
177
|
+
}
|
|
115
178
|
function readPackageVersion() {
|
|
116
179
|
const __filename = fileURLToPath(import.meta.url);
|
|
117
180
|
const __dirname = dirname(__filename);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cli.js","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;
|
|
1
|
+
{"version":3,"file":"Cli.js","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,O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,CAAC;AAED,SAAS,kBAAkB;IACzB,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC;IAEvE,OAAO,IAAI,oBAAoB,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -10,6 +10,6 @@ export declare class DispatchActionCommand {
|
|
|
10
10
|
readonly mode: OperationMode;
|
|
11
11
|
constructor(map?: string | undefined, envfile?: string | undefined, key?: string | undefined, value?: string | undefined, secretPath?: string | undefined, profile?: string | undefined, mode?: OperationMode);
|
|
12
12
|
static fromCliOptions(options: CliOptions): DispatchActionCommand;
|
|
13
|
-
|
|
13
|
+
static determineOperationMode(options: CliOptions): OperationMode;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=DispatchActionCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DispatchActionCommand.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/core/application/dispatch/DispatchActionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,qBAAa,qBAAqB;aAEd,GAAG,CAAC,EAAE,MAAM;aACZ,OAAO,CAAC,EAAE,MAAM;aAChB,GAAG,CAAC,EAAE,MAAM;aACZ,KAAK,CAAC,EAAE,MAAM;aACd,UAAU,CAAC,EAAE,MAAM;aACnB,OAAO,CAAC,EAAE,MAAM;aAChB,IAAI,EAAE,aAAa;IAPrC,YACkB,GAAG,CAAC,EAAE,MAAM,YAAA,EACZ,OAAO,CAAC,EAAE,MAAM,YAAA,EAChB,GAAG,CAAC,EAAE,MAAM,YAAA,EACZ,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,OAAO,CAAC,EAAE,MAAM,YAAA,EAChB,IAAI,GAAE,aAAiD,EACrE;IAEJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,qBAAqB,CAWhE;IAED,
|
|
1
|
+
{"version":3,"file":"DispatchActionCommand.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/core/application/dispatch/DispatchActionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,qBAAa,qBAAqB;aAEd,GAAG,CAAC,EAAE,MAAM;aACZ,OAAO,CAAC,EAAE,MAAM;aAChB,GAAG,CAAC,EAAE,MAAM;aACZ,KAAK,CAAC,EAAE,MAAM;aACd,UAAU,CAAC,EAAE,MAAM;aACnB,OAAO,CAAC,EAAE,MAAM;aAChB,IAAI,EAAE,aAAa;IAPrC,YACkB,GAAG,CAAC,EAAE,MAAM,YAAA,EACZ,OAAO,CAAC,EAAE,MAAM,YAAA,EAChB,GAAG,CAAC,EAAE,MAAM,YAAA,EACZ,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,UAAU,CAAC,EAAE,MAAM,YAAA,EACnB,OAAO,CAAC,EAAE,MAAM,YAAA,EAChB,IAAI,GAAE,aAAiD,EACrE;IAEJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,qBAAqB,CAWhE;IAED,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,aAAa,CAUhE;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DispatchActionCommand.js","sourceRoot":"","sources":["../../../../../src/envilder/core/application/dispatch/DispatchActionCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,OAAO,qBAAqB;IAChC,YACkB,GAAY,EACZ,OAAgB,EAChB,GAAY,EACZ,KAAc,EACd,UAAmB,EACnB,OAAgB,EAChB,IAAI,GAAkB,aAAa,CAAC,mBAAmB;mBANvD,GAAG;uBACH,OAAO;mBACP,GAAG;qBACH,KAAK;0BACL,UAAU;uBACV,OAAO;oBACP,IAAI;IACnB,CAAC;IAEJ,MAAM,CAAC,cAAc,CAAC,OAAmB;QACvC,MAAM,IAAI,GAAG,qBAAqB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACnE,OAAO,IAAI,qBAAqB,CAC9B,OAAO,CAAC,GAAG,EACX,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,GAAG,EACX,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,OAAO,EACf,IAAI,CACL,CAAC;IACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"DispatchActionCommand.js","sourceRoot":"","sources":["../../../../../src/envilder/core/application/dispatch/DispatchActionCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,OAAO,qBAAqB;IAChC,YACkB,GAAY,EACZ,OAAgB,EAChB,GAAY,EACZ,KAAc,EACd,UAAmB,EACnB,OAAgB,EAChB,IAAI,GAAkB,aAAa,CAAC,mBAAmB;mBANvD,GAAG;uBACH,OAAO;mBACP,GAAG;qBACH,KAAK;0BACL,UAAU;uBACV,OAAO;oBACP,IAAI;IACnB,CAAC;IAEJ,MAAM,CAAC,cAAc,CAAC,OAAmB;QACvC,MAAM,IAAI,GAAG,qBAAqB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACnE,OAAO,IAAI,qBAAqB,CAC9B,OAAO,CAAC,GAAG,EACX,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,GAAG,EACX,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,OAAO,EACf,IAAI,CACL,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,sBAAsB,CAAC,OAAmB;QAC/C,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACvD,OAAO,aAAa,CAAC,WAAW,CAAC;QACnC,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,aAAa,CAAC,mBAAmB,CAAC;QAC3C,CAAC;QAED,OAAO,aAAa,CAAC,mBAAmB,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariable.d.ts","sourceRoot":"","sources":["../../../../src/envilder/core/domain/EnvironmentVariable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvironmentVariable.d.ts","sourceRoot":"","sources":["../../../../src/envilder/core/domain/EnvironmentVariable.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAU;IAEpC;;;;;;OAMG;IACH,YAAY,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAe,EAKjE;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAMxB;IAED;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1C;IAED,OAAO,CAAC,MAAM,CAAC,IAAI;IAMnB;;OAEG;IACH,OAAO,CAAC,QAAQ;CAajB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { invalidEnvironmentVariableNameMessage, isValidEnvironmentVariableName, } from './EnvironmentVariableName.js';
|
|
2
|
+
import { InvalidArgumentError } from './errors/DomainErrors.js';
|
|
1
3
|
/**
|
|
2
4
|
* Represents an environment variable with validation and business rules.
|
|
3
5
|
*/
|
|
@@ -57,8 +59,8 @@ export class EnvironmentVariable {
|
|
|
57
59
|
* Validates the environment variable
|
|
58
60
|
*/
|
|
59
61
|
validate(name, value) {
|
|
60
|
-
if (!name
|
|
61
|
-
throw new
|
|
62
|
+
if (!isValidEnvironmentVariableName(name)) {
|
|
63
|
+
throw new InvalidArgumentError(invalidEnvironmentVariableNameMessage(name));
|
|
62
64
|
}
|
|
63
65
|
if (value === undefined || value === null) {
|
|
64
66
|
throw new Error(`Value for environment variable ${name} cannot be null or undefined`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariable.js","sourceRoot":"","sources":["../../../../src/envilder/core/domain/EnvironmentVariable.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAK9B;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,KAAa,EAAE,QAAQ,GAAY,KAAK;QAChE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACb,IAAI,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,0 +1,9 @@
|
|
|
1
|
+
export declare function isValidEnvironmentVariableName(name: string): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Builds the rejection message, so every caller reports the same wording. The
|
|
4
|
+
* name is quoted rather than interpolated: it is untrusted input, and quoting
|
|
5
|
+
* keeps a name carrying line terminators from breaking the message across
|
|
6
|
+
* lines. Only the name is echoed, never the mapped value.
|
|
7
|
+
*/
|
|
8
|
+
export declare function invalidEnvironmentVariableNameMessage(name: string): string;
|
|
9
|
+
//# sourceMappingURL=EnvironmentVariableName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariableName.d.ts","sourceRoot":"","sources":["../../../../src/envilder/core/domain/EnvironmentVariableName.ts"],"names":[],"mappings":"AAwCA,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMpE;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkB1E"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure domain rule describing which strings are usable as environment variable
|
|
3
|
+
* names. Centralized here so every layer that accepts a name coming from a map
|
|
4
|
+
* file or caller input (entity construction, mapping parsing, `.env` writing)
|
|
5
|
+
* shares a single source of truth instead of duplicating the same regex and
|
|
6
|
+
* message.
|
|
7
|
+
*
|
|
8
|
+
* The rule enforces one invariant: **an accepted name must survive a `.env`
|
|
9
|
+
* round-trip as itself and nothing else.**
|
|
10
|
+
*
|
|
11
|
+
* That is expressed as an allowlist rather than a list of banned characters,
|
|
12
|
+
* because a blocklist cannot hold the invariant. `.env` readers recognize a
|
|
13
|
+
* key as `[A-Za-z0-9_.-]+`; anything outside that either makes the line
|
|
14
|
+
* unparseable, so the variable is written and then silently lost (a space,
|
|
15
|
+
* `#`, a tab, an accented or non-Latin letter, NUL, vertical tab), or is read
|
|
16
|
+
* back as a *different* assignment, which is the injection in issue #511:
|
|
17
|
+
*
|
|
18
|
+
* - `=` opens a second assignment on the same line.
|
|
19
|
+
* - CR and LF open a second line.
|
|
20
|
+
* - U+2028 and U+2029 are JavaScript line terminators. The `.env` writer does
|
|
21
|
+
* not split on them, but `dotenv` parses lines with a multiline regex whose
|
|
22
|
+
* `^` matches after them, so a name embedding one is read back as a
|
|
23
|
+
* separate assignment.
|
|
24
|
+
*
|
|
25
|
+
* Dotted and hyphenated names (historically accepted, non-POSIX) stay valid:
|
|
26
|
+
* they are inside the allowlist and do round-trip.
|
|
27
|
+
*/
|
|
28
|
+
const READABLE_NAME = /^[A-Za-z0-9_.-]+$/;
|
|
29
|
+
/**
|
|
30
|
+
* `__proto__` is the one name inside the allowlist that still breaks the
|
|
31
|
+
* round-trip. Writing it is fine, but every reader builds a plain object and
|
|
32
|
+
* assigns into it, which routes the key through the `Object.prototype`
|
|
33
|
+
* accessor instead of creating an own property -- `dotenv.parse` included, so
|
|
34
|
+
* `dotenv.parse('__proto__=v')` returns `{}`. Accepting the name would mean
|
|
35
|
+
* resolving the secret and writing a line that neither envilder nor any
|
|
36
|
+
* dotenv-based consumer can read back, while reporting success.
|
|
37
|
+
*/
|
|
38
|
+
const UNSUPPORTED_NAMES = new Set(['__proto__']);
|
|
39
|
+
export function isValidEnvironmentVariableName(name) {
|
|
40
|
+
return (typeof name === 'string' &&
|
|
41
|
+
READABLE_NAME.test(name) &&
|
|
42
|
+
!UNSUPPORTED_NAMES.has(name));
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Builds the rejection message, so every caller reports the same wording. The
|
|
46
|
+
* name is quoted rather than interpolated: it is untrusted input, and quoting
|
|
47
|
+
* keeps a name carrying line terminators from breaking the message across
|
|
48
|
+
* lines. Only the name is echoed, never the mapped value.
|
|
49
|
+
*/
|
|
50
|
+
export function invalidEnvironmentVariableNameMessage(name) {
|
|
51
|
+
if (typeof name !== 'string' || name.trim() === '') {
|
|
52
|
+
return 'Environment variable name cannot be empty';
|
|
53
|
+
}
|
|
54
|
+
if (UNSUPPORTED_NAMES.has(name)) {
|
|
55
|
+
return (`Unsupported environment variable name ${quoteName(name)}: ` +
|
|
56
|
+
'a .env parser cannot read this name back, so it would be written ' +
|
|
57
|
+
'but never resolved');
|
|
58
|
+
}
|
|
59
|
+
return (`Invalid environment variable name ${quoteName(name)}: names may only ` +
|
|
60
|
+
'contain letters, digits, underscore, dot and hyphen, so that they can ' +
|
|
61
|
+
'be read back from a .env file');
|
|
62
|
+
}
|
|
63
|
+
function quoteName(name) {
|
|
64
|
+
// JSON.stringify escapes CR, LF and the other control characters, but leaves
|
|
65
|
+
// U+2028/U+2029 literal even though they terminate a line in JavaScript.
|
|
66
|
+
return JSON.stringify(name)
|
|
67
|
+
.replace(/\u{2028}/gu, '\\u2028')
|
|
68
|
+
.replace(/\u{2029}/gu, '\\u2029');
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=EnvironmentVariableName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariableName.js","sourceRoot":"","sources":["../../../../src/envilder/core/domain/EnvironmentVariableName.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAEjD,MAAM,UAAU,8BAA8B,CAAC,IAAY;IACzD,OAAO,CACL,OAAO,IAAI,KAAK,QAAQ;QACxB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;QACxB,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAC7B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qCAAqC,CAAC,IAAY;IAChE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACnD,OAAO,2CAA2C,CAAC;IACrD,CAAC;IAED,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,OAAO,CACL,yCAAyC,SAAS,CAAC,IAAI,CAAC,IAAI;YAC5D,mEAAmE;YACnE,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAED,OAAO,CACL,qCAAqC,SAAS,CAAC,IAAI,CAAC,mBAAmB;QACvE,wEAAwE;QACxE,+BAA+B,CAChC,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,6EAA6E;IAC7E,yEAAyE;IACzE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SACxB,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC;SAChC,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -6,13 +6,80 @@ export declare class FileVariableStore implements IVariableStore {
|
|
|
6
6
|
constructor(logger: ILogger);
|
|
7
7
|
getMapping(source: string): Promise<Record<string, string>>;
|
|
8
8
|
getParsedMapping(source: string): Promise<ParsedMapFile>;
|
|
9
|
+
private assertValidVariableName;
|
|
9
10
|
private readJsonFile;
|
|
10
11
|
getEnvironment(source: string): Promise<Record<string, string>>;
|
|
11
12
|
saveEnvironment(destination: string, envVariables: Record<string, string>): Promise<void>;
|
|
12
13
|
private readExistingEnvContent;
|
|
13
14
|
private buildEnvContent;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The break that separates two assignments, which is the only kind that is
|
|
17
|
+
* structural. Blanking the claimed spans leaves exactly those: a break
|
|
18
|
+
* carried inside a value is part of a span and disappears with it, while a
|
|
19
|
+
* break that precedes a span is kept, because the prefix reaches back over
|
|
20
|
+
* blank lines and over the break that ended the line before. The terminator
|
|
21
|
+
* that closes the file is structural by the same argument and wins when the
|
|
22
|
+
* file has one; scanning the raw text for any CRLF is the last resort, and
|
|
23
|
+
* only a guess.
|
|
24
|
+
*/
|
|
25
|
+
private detectStructuralNewline;
|
|
26
|
+
/**
|
|
27
|
+
* That the pattern and dotenv agree on where an assignment ends is an
|
|
28
|
+
* invariant, so assert it rather than assume it. Whatever the merge pass did
|
|
29
|
+
* not claim is read the way dotenv reads it, and a managed key still in there
|
|
30
|
+
* is an assignment dotenv can see and we missed. Appending the new value
|
|
31
|
+
* would satisfy a reader, because dotenv keeps the last duplicate, while the
|
|
32
|
+
* previous secret stayed on disk and `assertValuesArePreserved` saw nothing
|
|
33
|
+
* wrong, so refuse the write instead.
|
|
34
|
+
*
|
|
35
|
+
* No supported syntax reaches this today: the grammar is shared with dotenv
|
|
36
|
+
* precisely so that none can, and every form that once did — duplicates, a
|
|
37
|
+
* colon separator, a value starting on the next physical line — is claimed
|
|
38
|
+
* and replaced. This is the net for the day the two drift apart, which
|
|
39
|
+
* declaring `dotenv` as `^17.4.2` leaves open.
|
|
40
|
+
*/
|
|
41
|
+
private assertNoManagedAssignmentSurvives;
|
|
42
|
+
private renderAssignments;
|
|
43
|
+
/**
|
|
44
|
+
* Serializes a value for a single `.env` assignment. Candidate
|
|
45
|
+
* representations are tried in order of preference and accepted only once
|
|
46
|
+
* `dotenv.parse` confirms the assignment yields exactly the intended
|
|
47
|
+
* key/value, never by inspection alone. An existing delimiter (from
|
|
48
|
+
* `originalValue`, when updating an existing assignment) is preferred but
|
|
49
|
+
* only kept when it still round-trips for the new value.
|
|
50
|
+
*/
|
|
51
|
+
private serializeAssignmentValue;
|
|
52
|
+
private buildValueCandidates;
|
|
53
|
+
private buildQuotedCandidates;
|
|
54
|
+
/**
|
|
55
|
+
* dotenv consumes `\<delimiter>` as a single unit inside a quoted value, so
|
|
56
|
+
* an escaped-looking delimiter stays literal while a bare one would close
|
|
57
|
+
* the value early.
|
|
58
|
+
*/
|
|
59
|
+
private isDelimiterSafe;
|
|
60
|
+
private encodeLineBreaks;
|
|
61
|
+
private detectExistingQuote;
|
|
62
|
+
private parsesBackTo;
|
|
63
|
+
/** Keys the file no longer reads back as the value they are meant to hold. */
|
|
64
|
+
private keysThatLostTheirValue;
|
|
65
|
+
/**
|
|
66
|
+
* Keys the file gained. Nobody asked for them, so they can only come from our
|
|
67
|
+
* grammar and dotenv's disagreeing about where some value ended.
|
|
68
|
+
*/
|
|
69
|
+
private keysThatAppeared;
|
|
70
|
+
/**
|
|
71
|
+
* The values the file already held for keys this run is not writing. Read
|
|
72
|
+
* through `dotenv.parse` so duplicate keys collapse the same way a consumer
|
|
73
|
+
* would see them.
|
|
74
|
+
*/
|
|
75
|
+
private collectUnmanagedValues;
|
|
76
|
+
/**
|
|
77
|
+
* Reads the result back with dotenv before it reaches disk: every managed key
|
|
78
|
+
* must yield the value we were asked to store, every key we did not manage
|
|
79
|
+
* must yield the value the file already had, and no third key may appear
|
|
80
|
+
* because our grammar and dotenv's disagreed on where a value ended.
|
|
81
|
+
*/
|
|
82
|
+
private assertValuesArePreserved;
|
|
16
83
|
}
|
|
17
84
|
export declare function readMapFileConfig(mapPath: string): Promise<MapFileConfig>;
|
|
18
85
|
//# sourceMappingURL=FileVariableStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileVariableStore.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/variableStore/FileVariableStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileVariableStore.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/variableStore/FileVariableStore.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AA+C3E,qBACa,iBAAkB,YAAW,cAAc;IACtD,OAAO,CAAC,MAAM,CAAU;IAExB,YAAmC,MAAM,EAAE,OAAO,EAKjD;IAEK,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAGhE;IAEK,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAwB7D;IAED,OAAO,CAAC,uBAAuB;YAQjB,YAAY;IAmBpB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAepE;IAEK,eAAe,CACnB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CAuBf;YAEa,sBAAsB;IAoBpC,OAAO,CAAC,eAAe;IA2EvB;;;;;;;;;OASG;IACH,OAAO,CAAC,uBAAuB;IAsB/B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,iCAAiC;IAqBzC,OAAO,CAAC,iBAAiB;IAMzB;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,qBAAqB;IAc7B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,YAAY;IAcpB,8EAA8E;IAC9E,OAAO,CAAC,sBAAsB;IAO9B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IASxB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAgB9B;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;CAoBjC;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,aAAa,CAAC,CAkBxB"}
|
|
@@ -33,8 +33,48 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
33
33
|
import * as fs from 'node:fs/promises';
|
|
34
34
|
import * as dotenv from 'dotenv';
|
|
35
35
|
import { inject, injectable } from 'inversify';
|
|
36
|
-
import {
|
|
36
|
+
import { invalidEnvironmentVariableNameMessage, isValidEnvironmentVariableName, } from '../../domain/EnvironmentVariableName.js';
|
|
37
|
+
import { DependencyMissingError, EnvironmentFileError, InvalidArgumentError, } from '../../domain/errors/DomainErrors.js';
|
|
37
38
|
import { TYPES } from '../../types.js';
|
|
39
|
+
/** The delimiters dotenv recognizes for quoting a `.env` value. */
|
|
40
|
+
const ENV_QUOTES = ["'", '"', '`'];
|
|
41
|
+
/**
|
|
42
|
+
* Follows dotenv's own `LINE` grammar rather than re-deriving it, split into
|
|
43
|
+
* capture groups, with the two deliberate narrowings noted at the end:
|
|
44
|
+
*
|
|
45
|
+
* /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'
|
|
46
|
+
* |\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg
|
|
47
|
+
*
|
|
48
|
+
* Approximating that grammar instead of copying it is what repeatedly left old
|
|
49
|
+
* secrets on disk: every form dotenv spans and we do not degrades into the
|
|
50
|
+
* single-line branch, which rewrites the first physical line of an assignment
|
|
51
|
+
* and abandons the rest of the previous value in the file. Cases that cost us a
|
|
52
|
+
* round each — a closing delimiter followed by blanks, a colon separator, a
|
|
53
|
+
* value that only starts on the next physical line — are all consequences of
|
|
54
|
+
* the same divergence, so the grammar is now shared rather than re-derived.
|
|
55
|
+
*
|
|
56
|
+
* Everything except the value is captured and re-emitted verbatim, so groups
|
|
57
|
+
* whose `\s` reaches across line breaks cannot lose structure: whatever they
|
|
58
|
+
* consume, they put back.
|
|
59
|
+
*
|
|
60
|
+
* `(?<!\r)$` is the one place the raw text needs more than dotenv's grammar
|
|
61
|
+
* says. dotenv rewrites every CRLF to LF before it matches, so it never sees
|
|
62
|
+
* the position between a CR and its LF; we match the file as it is, where `$`
|
|
63
|
+
* does match there and would let a separator whose `\s` had just taken the CR
|
|
64
|
+
* end the assignment early, leaving the rest of the value behind a bare
|
|
65
|
+
* carriage return.
|
|
66
|
+
*
|
|
67
|
+
* Two places stay deliberately narrower than dotenv, because dotenv only has to
|
|
68
|
+
* find where a value ends while we also have to put the surroundings back. The
|
|
69
|
+
* trailing padding is horizontal, so a comment on the next line stays outside
|
|
70
|
+
* the span and the break before it is still visible as structure; and the
|
|
71
|
+
* unquoted run is lazy, so the blanks before an inline comment land in the
|
|
72
|
+
* padding we re-emit instead of inside the value we replace. Neither narrows
|
|
73
|
+
* the value span itself, which is the part that has to agree with dotenv.
|
|
74
|
+
*/
|
|
75
|
+
const ASSIGNMENT_PATTERN = /^(\s*(?:export\s+)?)([\w.-]+)(\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]*?)([^\S\r\n]*)((?:#.*)?)(?<!\r)$/gm;
|
|
76
|
+
/** The line break that closes a file, kept verbatim instead of normalized. */
|
|
77
|
+
const TRAILING_NEWLINE_PATTERN = /(?:\r\n|[\r\n])$/;
|
|
38
78
|
let FileVariableStore = class FileVariableStore {
|
|
39
79
|
constructor(logger) {
|
|
40
80
|
if (!logger) {
|
|
@@ -53,15 +93,32 @@ let FileVariableStore = class FileVariableStore {
|
|
|
53
93
|
const raw = yield this.readJsonFile(source);
|
|
54
94
|
const { $config } = raw, rest = __rest(raw, ["$config"]);
|
|
55
95
|
const config = $config && typeof $config === 'object' ? $config : {};
|
|
56
|
-
|
|
96
|
+
// Null-prototype: map-file keys are untrusted, and a plain object literal
|
|
97
|
+
// would route `__proto__` through the Object.prototype setter, silently
|
|
98
|
+
// dropping that mapping instead of storing it as data.
|
|
99
|
+
const mappings = Object.create(null);
|
|
57
100
|
for (const [key, value] of Object.entries(rest)) {
|
|
58
|
-
if (
|
|
59
|
-
|
|
101
|
+
if (key.startsWith('$')) {
|
|
102
|
+
continue;
|
|
60
103
|
}
|
|
104
|
+
// Before the non-string filter, so the name rule covers every mapping
|
|
105
|
+
// key the file declares. Validating after would accept a name the
|
|
106
|
+
// published schema rejects whenever its value happened to be a number
|
|
107
|
+
// or an object. Non-string values are still skipped, not an error.
|
|
108
|
+
this.assertValidVariableName(key);
|
|
109
|
+
if (typeof value !== 'string') {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
mappings[key] = value;
|
|
61
113
|
}
|
|
62
114
|
return { config, mappings };
|
|
63
115
|
});
|
|
64
116
|
}
|
|
117
|
+
assertValidVariableName(name) {
|
|
118
|
+
if (!isValidEnvironmentVariableName(name)) {
|
|
119
|
+
throw new InvalidArgumentError(invalidEnvironmentVariableNameMessage(name));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
65
122
|
readJsonFile(source) {
|
|
66
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
124
|
try {
|
|
@@ -84,7 +141,10 @@ let FileVariableStore = class FileVariableStore {
|
|
|
84
141
|
}
|
|
85
142
|
getEnvironment(source) {
|
|
86
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
|
|
144
|
+
// Null-prototype for the same reason as the parsed mappings: callers
|
|
145
|
+
// assign resolved secrets straight into this map, and a plain object
|
|
146
|
+
// would route a prototype-shadowing key through an inherited setter.
|
|
147
|
+
const envVariables = Object.create(null);
|
|
88
148
|
try {
|
|
89
149
|
yield fs.access(source);
|
|
90
150
|
}
|
|
@@ -99,8 +159,13 @@ let FileVariableStore = class FileVariableStore {
|
|
|
99
159
|
}
|
|
100
160
|
saveEnvironment(destination, envVariables) {
|
|
101
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
for (const key of Object.keys(envVariables)) {
|
|
163
|
+
this.assertValidVariableName(key);
|
|
164
|
+
}
|
|
102
165
|
const existingContent = yield this.readExistingEnvContent(destination);
|
|
166
|
+
const unmanagedValues = this.collectUnmanagedValues(existingContent, envVariables);
|
|
103
167
|
const envContent = this.buildEnvContent(existingContent, envVariables);
|
|
168
|
+
this.assertValuesArePreserved(envContent, envVariables, unmanagedValues);
|
|
104
169
|
try {
|
|
105
170
|
yield fs.writeFile(destination, envContent);
|
|
106
171
|
}
|
|
@@ -128,67 +193,241 @@ let FileVariableStore = class FileVariableStore {
|
|
|
128
193
|
});
|
|
129
194
|
}
|
|
130
195
|
buildEnvContent(existingContent, envVariables) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
196
|
+
var _a;
|
|
197
|
+
var _b;
|
|
198
|
+
const entries = Object.entries(envVariables);
|
|
199
|
+
// A file we create ends with a line break, as a POSIX text file should:
|
|
200
|
+
// without one, git reports "" and any editor
|
|
201
|
+
// configured to add one rewrites the file behind us. An existing file that
|
|
202
|
+
// is empty counts as one we create, since there is no shape to preserve;
|
|
203
|
+
// one with content keeps the ending it has, missing ending included, because
|
|
204
|
+
// that shape belongs to whoever wrote it.
|
|
205
|
+
if (existingContent === null || existingContent === '') {
|
|
206
|
+
const created = this.renderAssignments(entries).join('\n');
|
|
207
|
+
return created === '' ? created : `${created}\n`;
|
|
136
208
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
const assignmentRegex = /^(\s*(?:export\s+)?)([\w.-]+)(\s*=\s*)(.*)$/;
|
|
209
|
+
// The body keeps its own line breaks: rewriting them would also rewrite the
|
|
210
|
+
// line breaks a multiline value carries as payload.
|
|
211
|
+
const trailingNewline = (_b = (_a = TRAILING_NEWLINE_PATTERN.exec(existingContent)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '';
|
|
212
|
+
const body = existingContent.slice(0, existingContent.length - trailingNewline.length);
|
|
213
|
+
const newline = this.detectStructuralNewline(body, trailingNewline);
|
|
144
214
|
const updatedKeys = new Set();
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
const [, prefix, key, separator, originalValue] = match;
|
|
151
|
-
if (!Object.hasOwn(pending, key)) {
|
|
152
|
-
return line;
|
|
215
|
+
const merged = body.replace(ASSIGNMENT_PATTERN, (assignment, prefix, key, separator, rawValue, padding, comment) => {
|
|
216
|
+
var _a;
|
|
217
|
+
var _b;
|
|
218
|
+
if (!Object.hasOwn(envVariables, key)) {
|
|
219
|
+
return assignment;
|
|
153
220
|
}
|
|
154
221
|
updatedKeys.add(key);
|
|
155
|
-
|
|
156
|
-
|
|
222
|
+
// An assignment that already says the right thing is left exactly as
|
|
223
|
+
// it is. The CLI hands us every key it read, not just the mapped ones,
|
|
224
|
+
// so rewriting on sight would reserialize untouched entries and churn
|
|
225
|
+
// bytes no reader can see: a CRLF carried inside a value, a span that
|
|
226
|
+
// spreads over two physical lines. Leaving them also makes a run with
|
|
227
|
+
// nothing to change produce a byte-identical file.
|
|
228
|
+
if (this.parsesBackTo(key, rawValue !== null && rawValue !== void 0 ? rawValue : '', envVariables[key])) {
|
|
229
|
+
return assignment;
|
|
230
|
+
}
|
|
231
|
+
// dotenv's `=\s*?` is lazy, so the blanks after it belong to the value
|
|
232
|
+
// group. Put back the ones that stayed on the line, which is the
|
|
233
|
+
// spacing the file chose; a value that only began on a later physical
|
|
234
|
+
// line collapses onto the key's line instead, because that is how the
|
|
235
|
+
// old one leaves.
|
|
236
|
+
const leading = (_b = (_a = /^\s*/.exec(rawValue !== null && rawValue !== void 0 ? rawValue : '')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '';
|
|
237
|
+
const spacing = /[\r\n]/.test(leading) ? '' : leading;
|
|
238
|
+
const value = this.serializeAssignmentValue(key, envVariables[key], rawValue !== null && rawValue !== void 0 ? rawValue : '');
|
|
239
|
+
return `${prefix}${key}${separator}${spacing}${value}${padding}${comment}`;
|
|
157
240
|
});
|
|
158
|
-
|
|
159
|
-
|
|
241
|
+
this.assertNoManagedAssignmentSurvives(merged, envVariables);
|
|
242
|
+
const appended = this.renderAssignments(entries.filter(([key]) => !updatedKeys.has(key)));
|
|
243
|
+
const content = [merged, ...appended].join(newline);
|
|
244
|
+
return trailingNewline === '' ? content : content + trailingNewline;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* The break that separates two assignments, which is the only kind that is
|
|
248
|
+
* structural. Blanking the claimed spans leaves exactly those: a break
|
|
249
|
+
* carried inside a value is part of a span and disappears with it, while a
|
|
250
|
+
* break that precedes a span is kept, because the prefix reaches back over
|
|
251
|
+
* blank lines and over the break that ended the line before. The terminator
|
|
252
|
+
* that closes the file is structural by the same argument and wins when the
|
|
253
|
+
* file has one; scanning the raw text for any CRLF is the last resort, and
|
|
254
|
+
* only a guess.
|
|
255
|
+
*/
|
|
256
|
+
detectStructuralNewline(body, trailingNewline) {
|
|
257
|
+
var _a;
|
|
258
|
+
var _b;
|
|
259
|
+
if (trailingNewline !== '') {
|
|
260
|
+
return trailingNewline;
|
|
261
|
+
}
|
|
262
|
+
const betweenSpans = body.replace(ASSIGNMENT_PATTERN, (assignment, prefix) =>
|
|
263
|
+
// The breaks a span holds in its prefix are the ones that separate it
|
|
264
|
+
// from what came before, so they survive the blanking; everything else
|
|
265
|
+
// it holds, line breaks included, is payload and goes.
|
|
266
|
+
prefix.replace(/[^\r\n]/g, ' ') +
|
|
267
|
+
' '.repeat(assignment.length - prefix.length));
|
|
268
|
+
return ((_b = (_a = /\r\n|[\r\n]/.exec(betweenSpans)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : (body.includes('\r\n') ? '\r\n' : '\n'));
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* That the pattern and dotenv agree on where an assignment ends is an
|
|
272
|
+
* invariant, so assert it rather than assume it. Whatever the merge pass did
|
|
273
|
+
* not claim is read the way dotenv reads it, and a managed key still in there
|
|
274
|
+
* is an assignment dotenv can see and we missed. Appending the new value
|
|
275
|
+
* would satisfy a reader, because dotenv keeps the last duplicate, while the
|
|
276
|
+
* previous secret stayed on disk and `assertValuesArePreserved` saw nothing
|
|
277
|
+
* wrong, so refuse the write instead.
|
|
278
|
+
*
|
|
279
|
+
* No supported syntax reaches this today: the grammar is shared with dotenv
|
|
280
|
+
* precisely so that none can, and every form that once did — duplicates, a
|
|
281
|
+
* colon separator, a value starting on the next physical line — is claimed
|
|
282
|
+
* and replaced. This is the net for the day the two drift apart, which
|
|
283
|
+
* declaring `dotenv` as `^17.4.2` leaves open.
|
|
284
|
+
*/
|
|
285
|
+
assertNoManagedAssignmentSurvives(merged, envVariables) {
|
|
286
|
+
// Blank the claimed spans in place: dropping them would join the text
|
|
287
|
+
// around them and invent assignments that were never there.
|
|
288
|
+
const remainder = merged.replace(ASSIGNMENT_PATTERN, (assignment) => assignment.replace(/[^\r\n]/g, ' '));
|
|
289
|
+
const stale = Object.keys(dotenv.parse(remainder))
|
|
290
|
+
.filter((key) => Object.hasOwn(envVariables, key))
|
|
291
|
+
.map((key) => `"${key}"`);
|
|
292
|
+
if (stale.length === 0) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
// Names only: the values at stake are the secrets this guard protects.
|
|
296
|
+
throw new EnvironmentFileError(`Cannot locate every existing assignment for ${stale.join(', ')}; the previous value would stay in the file, so nothing was written`);
|
|
297
|
+
}
|
|
298
|
+
renderAssignments(entries) {
|
|
299
|
+
return entries.map(([key, value]) => `${key}=${this.serializeAssignmentValue(key, value)}`);
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Serializes a value for a single `.env` assignment. Candidate
|
|
303
|
+
* representations are tried in order of preference and accepted only once
|
|
304
|
+
* `dotenv.parse` confirms the assignment yields exactly the intended
|
|
305
|
+
* key/value, never by inspection alone. An existing delimiter (from
|
|
306
|
+
* `originalValue`, when updating an existing assignment) is preferred but
|
|
307
|
+
* only kept when it still round-trips for the new value.
|
|
308
|
+
*/
|
|
309
|
+
serializeAssignmentValue(key, value, originalValue) {
|
|
310
|
+
const preferredQuote = this.detectExistingQuote(originalValue);
|
|
311
|
+
for (const candidate of this.buildValueCandidates(value, preferredQuote)) {
|
|
312
|
+
if (this.parsesBackTo(key, candidate, value)) {
|
|
313
|
+
return candidate;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
throw new EnvironmentFileError(`Cannot represent the value for "${key}" in a dotenv-compatible format without data loss`);
|
|
317
|
+
}
|
|
318
|
+
buildValueCandidates(value, preferredQuote) {
|
|
319
|
+
const hasLineBreak = /[\r\n]/.test(value);
|
|
320
|
+
// Double quotes come first for multiline values because they are the only
|
|
321
|
+
// delimiter whose escapes keep the assignment on one physical line.
|
|
322
|
+
const quotes = hasLineBreak
|
|
323
|
+
? ['"', "'", '`']
|
|
324
|
+
: ENV_QUOTES;
|
|
325
|
+
const candidates = [];
|
|
326
|
+
if (preferredQuote !== undefined) {
|
|
327
|
+
candidates.push(...this.buildQuotedCandidates(value, preferredQuote));
|
|
328
|
+
}
|
|
329
|
+
if (!hasLineBreak) {
|
|
330
|
+
candidates.push(value);
|
|
331
|
+
}
|
|
332
|
+
for (const quote of quotes) {
|
|
333
|
+
candidates.push(...this.buildQuotedCandidates(value, quote));
|
|
160
334
|
}
|
|
161
|
-
|
|
162
|
-
const allLines = appended.length > 0 ? [...mergedLines, ...appended] : mergedLines;
|
|
163
|
-
const result = allLines.join(newline);
|
|
164
|
-
return hasTrailingNewline ? result + newline : result;
|
|
335
|
+
return candidates;
|
|
165
336
|
}
|
|
166
|
-
|
|
337
|
+
buildQuotedCandidates(value, quote) {
|
|
338
|
+
if (!this.isDelimiterSafe(value, quote)) {
|
|
339
|
+
return [];
|
|
340
|
+
}
|
|
341
|
+
const raw = `${quote}${value}${quote}`;
|
|
342
|
+
if (quote !== '"') {
|
|
343
|
+
return [raw];
|
|
344
|
+
}
|
|
345
|
+
// dotenv expands `\n`/`\r` only inside double quotes, so the encoded form
|
|
346
|
+
// is the one that survives real line breaks and the raw form is the one
|
|
347
|
+
// that survives values holding those sequences literally.
|
|
348
|
+
return [`"${this.encodeLineBreaks(value)}"`, raw];
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* dotenv consumes `\<delimiter>` as a single unit inside a quoted value, so
|
|
352
|
+
* an escaped-looking delimiter stays literal while a bare one would close
|
|
353
|
+
* the value early.
|
|
354
|
+
*/
|
|
355
|
+
isDelimiterSafe(value, quote) {
|
|
356
|
+
for (let index = value.indexOf(quote); index !== -1; index = value.indexOf(quote, index + 1)) {
|
|
357
|
+
if (value[index - 1] !== '\\') {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
encodeLineBreaks(value) {
|
|
364
|
+
return value.replace(/[\r\n]/g, (match) => match === '\n' ? '\\n' : '\\r');
|
|
365
|
+
}
|
|
366
|
+
detectExistingQuote(originalValue) {
|
|
367
|
+
if (originalValue === undefined) {
|
|
368
|
+
return undefined;
|
|
369
|
+
}
|
|
167
370
|
const trimmed = originalValue.trim();
|
|
168
371
|
const quote = trimmed[0];
|
|
169
372
|
const isQuoted = trimmed.length >= 2 &&
|
|
170
|
-
(quote
|
|
373
|
+
ENV_QUOTES.includes(quote) &&
|
|
171
374
|
trimmed[trimmed.length - 1] === quote;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
375
|
+
return isQuoted ? quote : undefined;
|
|
376
|
+
}
|
|
377
|
+
parsesBackTo(key, candidate, expected) {
|
|
378
|
+
const parsed = dotenv.parse(`${key}=${candidate}\n`);
|
|
379
|
+
const parsedKeys = Object.keys(parsed);
|
|
380
|
+
return (parsedKeys.length === 1 &&
|
|
381
|
+
parsedKeys[0] === key &&
|
|
382
|
+
parsed[key] === expected);
|
|
383
|
+
}
|
|
384
|
+
/** Keys the file no longer reads back as the value they are meant to hold. */
|
|
385
|
+
keysThatLostTheirValue(parsed, expected) {
|
|
386
|
+
return Object.keys(expected).filter((key) => parsed[key] !== expected[key]);
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Keys the file gained. Nobody asked for them, so they can only come from our
|
|
390
|
+
* grammar and dotenv's disagreeing about where some value ended.
|
|
391
|
+
*/
|
|
392
|
+
keysThatAppeared(parsed, ...accounted) {
|
|
393
|
+
return Object.keys(parsed).filter((key) => !accounted.some((group) => Object.hasOwn(group, key)));
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* The values the file already held for keys this run is not writing. Read
|
|
397
|
+
* through `dotenv.parse` so duplicate keys collapse the same way a consumer
|
|
398
|
+
* would see them.
|
|
399
|
+
*/
|
|
400
|
+
collectUnmanagedValues(existingContent, envVariables) {
|
|
401
|
+
if (existingContent === null) {
|
|
402
|
+
return {};
|
|
403
|
+
}
|
|
404
|
+
const unmanaged = {};
|
|
405
|
+
for (const [key, value] of Object.entries(dotenv.parse(existingContent))) {
|
|
406
|
+
if (!Object.hasOwn(envVariables, key)) {
|
|
407
|
+
unmanaged[key] = value;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return unmanaged;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Reads the result back with dotenv before it reaches disk: every managed key
|
|
414
|
+
* must yield the value we were asked to store, every key we did not manage
|
|
415
|
+
* must yield the value the file already had, and no third key may appear
|
|
416
|
+
* because our grammar and dotenv's disagreed on where a value ended.
|
|
417
|
+
*/
|
|
418
|
+
assertValuesArePreserved(content, envVariables, unmanagedValues) {
|
|
419
|
+
const parsed = dotenv.parse(content);
|
|
420
|
+
const affectedKeys = new Set([
|
|
421
|
+
...this.keysThatLostTheirValue(parsed, envVariables),
|
|
422
|
+
...this.keysThatLostTheirValue(parsed, unmanagedValues),
|
|
423
|
+
...this.keysThatAppeared(parsed, envVariables, unmanagedValues),
|
|
424
|
+
]);
|
|
425
|
+
if (affectedKeys.size === 0) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
// Names only: the values at stake are the secrets this guard protects.
|
|
429
|
+
const keys = [...affectedKeys].map((key) => `"${key}"`).join(', ');
|
|
430
|
+
throw new EnvironmentFileError(`Cannot write the environment file without losing or altering ${keys}; nothing was written`);
|
|
192
431
|
}
|
|
193
432
|
};
|
|
194
433
|
FileVariableStore = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileVariableStore.js","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/variableStore/FileVariableStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,qCAAqC,CAAC;AAO7C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGhC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG5B,YAAmC,MAAe;QAChD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEK,UAAU,CAAC,MAAc;;YAC7B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;YACzD,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;IAEK,gBAAgB,CAAC,MAAc;;YACnC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YAC5C,MAAM,EAAE,OAAO,KA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AAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACpD,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAChC,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;gBAC3B,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5D,CAAC;uBAAO,CAAC;gBACP,MAAM,IAAI,oBAAoB,CAC5B,uCAAuC,OAAO,EAAE,CACjD,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,oBAAoB,EAAE,CAAC;gBAC1C,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,oBAAoB,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CAAA"}
|
|
1
|
+
{"version":3,"file":"FileVariableStore.js","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/variableStore/FileVariableStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,qCAAqC,EACrC,8BAA8B,GAC/B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qCAAqC,CAAC;AAO7C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,mEAAmE;AACnE,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;A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M,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5D,CAAC;uBAAO,CAAC;gBACP,MAAM,IAAI,oBAAoB,CAC5B,uCAAuC,OAAO,EAAE,CACjD,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,oBAAoB,EAAE,CAAC;gBAC1C,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,oBAAoB,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envilder",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"packageManager": "pnpm@
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"packageManager": "pnpm@12.3.4+sha512.961aa41fb077da3a04a441d9f8e15ebc0c96da8ef710b2eb67bf9ee7cb0610eabd48f1fd85f51cffe73846785fa0f87c56a3a872a1d893f8446741b5cce45457",
|
|
5
5
|
"description": "Open-source TypeScript CLI, GitHub Action, and runtime SDKs for loading secrets from AWS SSM Parameter Store and Azure Key Vault.",
|
|
6
6
|
"homepage": "https://envilder.com",
|
|
7
7
|
"author": {
|