envilder 0.17.2 → 0.19.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 +2 -0
- package/ROADMAP.md +1 -1
- package/docs/changelogs/cli.md +44 -0
- package/docs/changelogs/gha.md +30 -0
- package/docs/validate-command.md +111 -0
- package/lib/envilder/apps/cli/Startup.d.ts +7 -2
- package/lib/envilder/apps/cli/Startup.d.ts.map +1 -1
- package/lib/envilder/apps/cli/Startup.js +25 -2
- package/lib/envilder/apps/cli/Startup.js.map +1 -1
- package/lib/envilder/apps/cli/entry/Cli.d.ts.map +1 -1
- package/lib/envilder/apps/cli/entry/Cli.js +110 -14
- package/lib/envilder/apps/cli/entry/Cli.js.map +1 -1
- package/lib/envilder/apps/gha/Startup.d.ts +1 -2
- package/lib/envilder/apps/gha/Startup.d.ts.map +1 -1
- package/lib/envilder/apps/gha/Startup.js +2 -2
- package/lib/envilder/apps/gha/Startup.js.map +1 -1
- package/lib/envilder/apps/shared/ContainerConfiguration.d.ts +3 -3
- package/lib/envilder/apps/shared/ContainerConfiguration.d.ts.map +1 -1
- package/lib/envilder/apps/shared/ContainerConfiguration.js +10 -9
- package/lib/envilder/apps/shared/ContainerConfiguration.js.map +1 -1
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommand.d.ts +15 -0
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommand.d.ts.map +1 -0
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommand.js +17 -0
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommand.js.map +1 -0
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommandHandler.d.ts +16 -0
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommandHandler.d.ts.map +1 -0
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommandHandler.js +86 -0
- package/lib/envilder/core/application/validateMapFile/ValidateMapFileCommandHandler.js.map +1 -0
- package/lib/envilder/core/domain/EnvironmentVariableName.d.ts +5 -0
- package/lib/envilder/core/domain/EnvironmentVariableName.d.ts.map +1 -1
- package/lib/envilder/core/domain/EnvironmentVariableName.js +5 -1
- package/lib/envilder/core/domain/EnvironmentVariableName.js.map +1 -1
- package/lib/envilder/core/domain/MapFileValidator.d.ts +28 -0
- package/lib/envilder/core/domain/MapFileValidator.d.ts.map +1 -0
- package/lib/envilder/core/domain/MapFileValidator.js +195 -0
- package/lib/envilder/core/domain/MapFileValidator.js.map +1 -0
- package/lib/envilder/core/domain/ProviderConfiguration.d.ts +22 -0
- package/lib/envilder/core/domain/ProviderConfiguration.d.ts.map +1 -0
- package/lib/envilder/core/domain/ProviderConfiguration.js +65 -0
- package/lib/envilder/core/domain/ProviderConfiguration.js.map +1 -0
- package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.d.ts +1 -6
- package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.d.ts.map +1 -1
- package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.js +4 -13
- package/lib/envilder/core/infrastructure/azure/AzureSecretProviderFactory.js.map +1 -1
- package/lib/envilder/core/types.d.ts +2 -0
- package/lib/envilder/core/types.d.ts.map +1 -1
- package/lib/envilder/core/types.js +1 -0
- package/lib/envilder/core/types.js.map +1 -1
- package/package.json +2 -1
- package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.d.ts +0 -3
- package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.d.ts.map +0 -1
- package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.js +0 -28
- package/lib/envilder/core/infrastructure/azure/AzureVaultUrlValidator.js.map +0 -1
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { MapFileConfig } from '../../domain/MapFileConfig.js';
|
|
2
2
|
import type { ISecretProvider } from '../../domain/ports/ISecretProvider.js';
|
|
3
|
-
export
|
|
4
|
-
export type AzureProviderOptions = {
|
|
5
|
-
allowedVaultHosts?: string[];
|
|
6
|
-
disableChallengeResourceVerification?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare function createAzureSecretProvider(config: MapFileConfig, options?: AzureProviderOptions): ISecretProvider;
|
|
3
|
+
export declare function createAzureSecretProvider(config: MapFileConfig): ISecretProvider;
|
|
9
4
|
//# sourceMappingURL=AzureSecretProviderFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureSecretProviderFactory.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/azure/AzureSecretProviderFactory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"AzureSecretProviderFactory.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/azure/AzureSecretProviderFactory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAG7E,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,aAAa,GACpB,eAAe,CAQjB"}
|
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
import { DefaultAzureCredential } from '@azure/identity';
|
|
2
2
|
import { SecretClient } from '@azure/keyvault-secrets';
|
|
3
3
|
import { DependencyMissingError } from '../../domain/errors/DomainErrors.js';
|
|
4
|
+
import { requiredFieldMessage } from '../../domain/ProviderConfiguration.js';
|
|
4
5
|
import { AzureKeyVaultSecretProvider } from './AzureKeyVaultSecretProvider.js';
|
|
5
|
-
|
|
6
|
-
export { DEFAULT_VAULT_HOSTS } from './AzureVaultUrlValidator.js';
|
|
7
|
-
export function createAzureSecretProvider(config, options) {
|
|
8
|
-
var _a, _b;
|
|
6
|
+
export function createAzureSecretProvider(config) {
|
|
9
7
|
const { vaultUrl } = config;
|
|
10
8
|
if (!vaultUrl) {
|
|
11
|
-
throw new DependencyMissingError('vaultUrl
|
|
12
|
-
' Set it in $config.vaultUrl in your map file' +
|
|
13
|
-
' or via --vault-url flag.');
|
|
9
|
+
throw new DependencyMissingError(requiredFieldMessage('vaultUrl', 'azure'));
|
|
14
10
|
}
|
|
15
|
-
const allowedVaultHosts = (_a = options === null || options === void 0 ? void 0 : options.allowedVaultHosts) !== null && _a !== void 0 ? _a : DEFAULT_VAULT_HOSTS;
|
|
16
|
-
const disableChallengeResourceVerification = (_b = options === null || options === void 0 ? void 0 : options.disableChallengeResourceVerification) !== null && _b !== void 0 ? _b : false;
|
|
17
|
-
validateAzureVaultUrl(vaultUrl, allowedVaultHosts);
|
|
18
11
|
const credential = new DefaultAzureCredential();
|
|
19
|
-
const client = new SecretClient(vaultUrl, credential
|
|
20
|
-
disableChallengeResourceVerification,
|
|
21
|
-
});
|
|
12
|
+
const client = new SecretClient(vaultUrl, credential);
|
|
22
13
|
return new AzureKeyVaultSecretProvider(client);
|
|
23
14
|
}
|
|
24
15
|
//# sourceMappingURL=AzureSecretProviderFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureSecretProviderFactory.js","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/azure/AzureSecretProviderFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"AzureSecretProviderFactory.js","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/azure/AzureSecretProviderFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,MAAM,UAAU,yBAAyB,CACvC,MAAqB;IAErB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAC5B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sBAAsB,CAAC,oBAAoB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;IAChD,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACtD,OAAO,IAAI,2BAA2B,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -12,6 +12,7 @@ export declare const APPLICATION: {
|
|
|
12
12
|
PushSingleCommandHandler: symbol;
|
|
13
13
|
DispatchActionCommandHandler: symbol;
|
|
14
14
|
ExecWithSecretsCommandHandler: symbol;
|
|
15
|
+
ValidateMapFileCommandHandler: symbol;
|
|
15
16
|
};
|
|
16
17
|
export declare const INFRASTRUCTURE: {};
|
|
17
18
|
export declare const TYPES: {
|
|
@@ -26,5 +27,6 @@ export declare const TYPES: {
|
|
|
26
27
|
PushSingleCommandHandler: symbol;
|
|
27
28
|
DispatchActionCommandHandler: symbol;
|
|
28
29
|
ExecWithSecretsCommandHandler: symbol;
|
|
30
|
+
ValidateMapFileCommandHandler: symbol;
|
|
29
31
|
};
|
|
30
32
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/envilder/core/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;IACjB,OAAO;IACP,eAAe;IACf,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW;IACtB,8BAA8B;IAC9B,8BAA8B;IAC9B,wBAAwB;IACxB,4BAA4B;IAC5B,6BAA6B;CAC9B,CAAC;AAEF,eAAO,MAAM,cAAc,IAG1B,CAAC;AAGF,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/envilder/core/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;IACjB,OAAO;IACP,eAAe;IACf,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;CAChB,CAAC;AAEF,eAAO,MAAM,WAAW;IACtB,8BAA8B;IAC9B,8BAA8B;IAC9B,wBAAwB;IACxB,4BAA4B;IAC5B,6BAA6B;IAC7B,6BAA6B;CAC9B,CAAC;AAEF,eAAO,MAAM,cAAc,IAG1B,CAAC;AAGF,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAIjB,CAAC"}
|
|
@@ -12,6 +12,7 @@ export const APPLICATION = {
|
|
|
12
12
|
PushSingleCommandHandler: Symbol.for('PushSingleCommandHandler'),
|
|
13
13
|
DispatchActionCommandHandler: Symbol.for('DispatchActionCommandHandler'),
|
|
14
14
|
ExecWithSecretsCommandHandler: Symbol.for('ExecWithSecretsCommandHandler'),
|
|
15
|
+
ValidateMapFileCommandHandler: Symbol.for('ValidateMapFileCommandHandler'),
|
|
15
16
|
};
|
|
16
17
|
export const INFRASTRUCTURE = {
|
|
17
18
|
// Currently empty - Infrastructure implements domain ports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/envilder/core/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IAC1C,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC5C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,CAAC,GAAG,CAAC,gCAAgC,CAAC;IAC5E,wBAAwB,EAAE,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC;IAChE,4BAA4B,EAAE,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC;IACxE,6BAA6B,EAAE,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC;IAC1E,6BAA6B,EAAE,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC;CAC3E,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;AAC5B,2DAA2D;AAC3D,sDAAsD;CACvD,CAAC;AAEF,+FAA+F;AAC/F,MAAM,CAAC,MAAM,KAAK,iDACb,MAAM,GACN,WAAW,GACX,cAAc,CAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envilder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"packageManager": "pnpm@12.3.4+sha512.961aa41fb077da3a04a441d9f8e15ebc0c96da8ef710b2eb67bf9ee7cb0610eabd48f1fd85f51cffe73846785fa0f87c56a3a872a1d893f8446741b5cce45457",
|
|
5
5
|
"description": "Open-source CLI, GitHub Action, and runtime SDKs for AWS SSM Parameter Store and Azure Key Vault secrets. Run any command with secrets injected (envilder exec), generate .env files, or load them in-process.",
|
|
6
6
|
"homepage": "https://envilder.com",
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"docs/CHANGELOG.md",
|
|
93
93
|
"docs/changelogs/**",
|
|
94
94
|
"docs/exec-command.md",
|
|
95
|
+
"docs/validate-command.md",
|
|
95
96
|
"docs/SECURITY.md"
|
|
96
97
|
],
|
|
97
98
|
"type": "module",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AzureVaultUrlValidator.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/azure/AzureVaultUrlValidator.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,UAK/B,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EAAE,GACrB,IAAI,CAwBN"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { InvalidArgumentError } from '../../domain/errors/DomainErrors.js';
|
|
2
|
-
export const DEFAULT_VAULT_HOSTS = [
|
|
3
|
-
'.vault.azure.net',
|
|
4
|
-
'.vault.azure.cn',
|
|
5
|
-
'.vault.usgovcloudapi.net',
|
|
6
|
-
'.vault.microsoftazure.de',
|
|
7
|
-
];
|
|
8
|
-
export function validateAzureVaultUrl(vaultUrl, allowedHosts) {
|
|
9
|
-
let url;
|
|
10
|
-
try {
|
|
11
|
-
url = new URL(vaultUrl);
|
|
12
|
-
}
|
|
13
|
-
catch (_a) {
|
|
14
|
-
throw new InvalidArgumentError('vaultUrl must be a valid URL');
|
|
15
|
-
}
|
|
16
|
-
if (url.protocol !== 'https:') {
|
|
17
|
-
throw new InvalidArgumentError('vaultUrl must use https:// protocol');
|
|
18
|
-
}
|
|
19
|
-
const isAllowedHost = allowedHosts.some((suffix) => {
|
|
20
|
-
const normalizedSuffix = suffix.startsWith('.') ? suffix.slice(1) : suffix;
|
|
21
|
-
return (url.hostname === normalizedSuffix ||
|
|
22
|
-
url.hostname.endsWith(`.${normalizedSuffix}`));
|
|
23
|
-
});
|
|
24
|
-
if (!isAllowedHost) {
|
|
25
|
-
throw new InvalidArgumentError(`vaultUrl hostname must end with one of: ${allowedHosts.join(', ')}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=AzureVaultUrlValidator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AzureVaultUrlValidator.js","sourceRoot":"","sources":["../../../../../src/envilder/core/infrastructure/azure/AzureVaultUrlValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,kBAAkB;IAClB,iBAAiB;IACjB,0BAA0B;IAC1B,0BAA0B;CAC3B,CAAC;AAEF,MAAM,UAAU,qBAAqB,CACnC,QAAgB,EAChB,YAAsB;IAEtB,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;eAAO,CAAC;QACP,MAAM,IAAI,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,oBAAoB,CAAC,qCAAqC,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACjD,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC3E,OAAO,CACL,GAAG,CAAC,QAAQ,KAAK,gBAAgB;YACjC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,gBAAgB,EAAE,CAAC,CAC9C,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,oBAAoB,CAC5B,2CAA2C,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACrE,CAAC;IACJ,CAAC;AACH,CAAC"}
|