envilder 0.12.0 → 0.13.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 (115) hide show
  1. package/README.md +1 -1
  2. package/ROADMAP.md +14 -18
  3. package/docs/SECURITY.md +1 -1
  4. package/docs/changelogs/cli.md +95 -18
  5. package/docs/changelogs/gha.md +70 -8
  6. package/docs/changelogs/sdk-dotnet.md +51 -33
  7. package/docs/changelogs/sdk-nodejs.md +46 -12
  8. package/docs/changelogs/sdk-python.md +38 -20
  9. package/lib/envilder/apps/cli/entry/Cli.d.ts.map +1 -0
  10. package/lib/envilder/apps/cli/{Cli.js → entry/Cli.js} +8 -7
  11. package/lib/envilder/apps/cli/entry/Cli.js.map +1 -0
  12. package/lib/envilder/apps/cli/entry/Index.d.ts.map +1 -0
  13. package/lib/envilder/apps/cli/entry/Index.js +16 -0
  14. package/lib/envilder/apps/cli/entry/Index.js.map +1 -0
  15. package/lib/envilder/apps/cli/errors/CliErrorPresenter.d.ts +2 -0
  16. package/lib/envilder/apps/cli/errors/CliErrorPresenter.d.ts.map +1 -0
  17. package/lib/envilder/apps/cli/errors/CliErrorPresenter.js +78 -0
  18. package/lib/envilder/apps/cli/errors/CliErrorPresenter.js.map +1 -0
  19. package/lib/envilder/apps/cli/errors/SilentExitError.d.ts +5 -0
  20. package/lib/envilder/apps/cli/errors/SilentExitError.d.ts.map +1 -0
  21. package/lib/envilder/apps/cli/errors/SilentExitError.js +7 -0
  22. package/lib/envilder/apps/cli/errors/SilentExitError.js.map +1 -0
  23. package/lib/envilder/apps/cli/recovery/SsoLoginRecovery.d.ts +9 -0
  24. package/lib/envilder/apps/cli/recovery/SsoLoginRecovery.d.ts.map +1 -0
  25. package/lib/envilder/apps/cli/recovery/SsoLoginRecovery.js +120 -0
  26. package/lib/envilder/apps/cli/recovery/SsoLoginRecovery.js.map +1 -0
  27. package/lib/envilder/apps/gha/entry/Gha.d.ts.map +1 -0
  28. package/lib/envilder/apps/gha/{Gha.js → entry/Gha.js} +9 -7
  29. package/lib/envilder/apps/gha/entry/Gha.js.map +1 -0
  30. package/lib/envilder/apps/gha/entry/Index.d.ts.map +1 -0
  31. package/lib/envilder/apps/gha/entry/Index.js +12 -0
  32. package/lib/envilder/apps/gha/entry/Index.js.map +1 -0
  33. package/lib/envilder/apps/gha/errors/GhaErrorPresenter.d.ts +7 -0
  34. package/lib/envilder/apps/gha/errors/GhaErrorPresenter.d.ts.map +1 -0
  35. package/lib/envilder/apps/gha/errors/GhaErrorPresenter.js +32 -0
  36. package/lib/envilder/apps/gha/errors/GhaErrorPresenter.js.map +1 -0
  37. package/lib/envilder/apps/shared/ContainerConfiguration.d.ts.map +1 -1
  38. package/lib/envilder/apps/shared/ContainerConfiguration.js +3 -3
  39. package/lib/envilder/apps/shared/ContainerConfiguration.js.map +1 -1
  40. package/lib/envilder/core/application/dispatch/DispatchActionCommandHandler.d.ts +5 -1
  41. package/lib/envilder/core/application/dispatch/DispatchActionCommandHandler.d.ts.map +1 -1
  42. package/lib/envilder/core/application/dispatch/DispatchActionCommandHandler.js +22 -7
  43. package/lib/envilder/core/application/dispatch/DispatchActionCommandHandler.js.map +1 -1
  44. package/lib/envilder/core/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.d.ts +7 -2
  45. package/lib/envilder/core/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.d.ts.map +1 -1
  46. package/lib/envilder/core/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.js +78 -36
  47. package/lib/envilder/core/application/pullSecretsToEnv/PullSecretsToEnvCommandHandler.js.map +1 -1
  48. package/lib/envilder/core/application/pushSingle/PushSingleCommandHandler.d.ts +1 -0
  49. package/lib/envilder/core/application/pushSingle/PushSingleCommandHandler.d.ts.map +1 -1
  50. package/lib/envilder/core/application/pushSingle/PushSingleCommandHandler.js +10 -4
  51. package/lib/envilder/core/application/pushSingle/PushSingleCommandHandler.js.map +1 -1
  52. package/lib/envilder/core/domain/errors/DomainErrors.d.ts +31 -0
  53. package/lib/envilder/core/domain/errors/DomainErrors.d.ts.map +1 -1
  54. package/lib/envilder/core/domain/errors/DomainErrors.js +39 -0
  55. package/lib/envilder/core/domain/errors/DomainErrors.js.map +1 -1
  56. package/lib/envilder/core/domain/ports/ISecretProvider.d.ts +1 -0
  57. package/lib/envilder/core/domain/ports/ISecretProvider.d.ts.map +1 -1
  58. package/lib/envilder/core/infrastructure/aws/AwsSecretProviderFactory.d.ts +3 -1
  59. package/lib/envilder/core/infrastructure/aws/AwsSecretProviderFactory.d.ts.map +1 -1
  60. package/lib/envilder/core/infrastructure/aws/AwsSecretProviderFactory.js +33 -6
  61. package/lib/envilder/core/infrastructure/aws/AwsSecretProviderFactory.js.map +1 -1
  62. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.d.ts +13 -1
  63. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.d.ts.map +1 -1
  64. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.js +106 -6
  65. package/lib/envilder/core/infrastructure/aws/AwsSsmSecretProvider.js.map +1 -1
  66. package/lib/envilder/core/infrastructure/aws/isExpiredCredentialsError.d.ts +2 -0
  67. package/lib/envilder/core/infrastructure/aws/isExpiredCredentialsError.d.ts.map +1 -0
  68. package/lib/envilder/core/infrastructure/aws/isExpiredCredentialsError.js +12 -0
  69. package/lib/envilder/core/infrastructure/aws/isExpiredCredentialsError.js.map +1 -0
  70. package/lib/envilder/core/infrastructure/aws/isSsoSessionExpiredError.d.ts +2 -0
  71. package/lib/envilder/core/infrastructure/aws/isSsoSessionExpiredError.d.ts.map +1 -0
  72. package/lib/envilder/core/infrastructure/aws/isSsoSessionExpiredError.js +9 -0
  73. package/lib/envilder/core/infrastructure/aws/isSsoSessionExpiredError.js.map +1 -0
  74. package/lib/envilder/core/infrastructure/azure/AzureKeyVaultSecretProvider.d.ts.map +1 -1
  75. package/lib/envilder/core/infrastructure/azure/AzureKeyVaultSecretProvider.js +2 -2
  76. package/lib/envilder/core/infrastructure/azure/AzureKeyVaultSecretProvider.js.map +1 -1
  77. package/lib/envilder/core/infrastructure/describeError.d.ts +9 -0
  78. package/lib/envilder/core/infrastructure/describeError.d.ts.map +1 -0
  79. package/lib/envilder/core/infrastructure/describeError.js +28 -0
  80. package/lib/envilder/core/infrastructure/describeError.js.map +1 -0
  81. package/lib/sdks/nodejs/src/domain/expired-credentials-error.d.ts +14 -0
  82. package/lib/sdks/nodejs/src/domain/expired-credentials-error.d.ts.map +1 -0
  83. package/lib/sdks/nodejs/src/domain/expired-credentials-error.js +29 -0
  84. package/lib/sdks/nodejs/src/domain/expired-credentials-error.js.map +1 -0
  85. package/lib/sdks/nodejs/src/domain/sso-session-expired-error.d.ts +16 -0
  86. package/lib/sdks/nodejs/src/domain/sso-session-expired-error.d.ts.map +1 -0
  87. package/lib/sdks/nodejs/src/domain/sso-session-expired-error.js +34 -0
  88. package/lib/sdks/nodejs/src/domain/sso-session-expired-error.js.map +1 -0
  89. package/lib/sdks/nodejs/src/index.d.ts +2 -0
  90. package/lib/sdks/nodejs/src/index.d.ts.map +1 -1
  91. package/lib/sdks/nodejs/src/index.js +2 -0
  92. package/lib/sdks/nodejs/src/index.js.map +1 -1
  93. package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.d.ts +2 -1
  94. package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.d.ts.map +1 -1
  95. package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.js +22 -8
  96. package/lib/sdks/nodejs/src/infrastructure/aws/aws-ssm-secret-provider.js.map +1 -1
  97. package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.d.ts +1 -0
  98. package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.d.ts.map +1 -1
  99. package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.js +28 -4
  100. package/lib/sdks/nodejs/src/infrastructure/secret-provider-factory.js.map +1 -1
  101. package/package.json +15 -14
  102. package/lib/envilder/apps/cli/Cli.d.ts.map +0 -1
  103. package/lib/envilder/apps/cli/Cli.js.map +0 -1
  104. package/lib/envilder/apps/cli/Index.d.ts.map +0 -1
  105. package/lib/envilder/apps/cli/Index.js +0 -12
  106. package/lib/envilder/apps/cli/Index.js.map +0 -1
  107. package/lib/envilder/apps/gha/Gha.d.ts.map +0 -1
  108. package/lib/envilder/apps/gha/Gha.js.map +0 -1
  109. package/lib/envilder/apps/gha/Index.d.ts.map +0 -1
  110. package/lib/envilder/apps/gha/Index.js +0 -12
  111. package/lib/envilder/apps/gha/Index.js.map +0 -1
  112. /package/lib/envilder/apps/cli/{Cli.d.ts → entry/Cli.d.ts} +0 -0
  113. /package/lib/envilder/apps/cli/{Index.d.ts → entry/Index.d.ts} +0 -0
  114. /package/lib/envilder/apps/gha/{Gha.d.ts → entry/Gha.d.ts} +0 -0
  115. /package/lib/envilder/apps/gha/{Index.d.ts → entry/Index.d.ts} +0 -0
@@ -1,19 +1,53 @@
1
+ ## [0.4.0] - 2026-06-26
2
+
3
+ ### Added
4
+
5
+ * **New exported `ExpiredCredentialsError`**: Thrown by the AWS SSM
6
+ provider when credentials or the security token are expired or
7
+ invalid (e.g. an expired session token), with an actionable message
8
+ guiding you to refresh credentials (e.g. run `aws sso login`)
9
+
10
+ * **New exported `SsoSessionExpiredError`**: Thrown by the AWS SSM
11
+ provider when an AWS SSO session can no longer be resolved, with an
12
+ actionable message that names the AWS profile and the
13
+ `aws sso login --profile <name>` command to run. A plain expired
14
+ session token still throws `ExpiredCredentialsError`
15
+ ([#379](https://github.com/macalbert/envilder/issues/379))
16
+
17
+ ---
18
+
19
+ ## [0.3.1] - 2026-06-26
20
+
21
+ ### Fixed
22
+
23
+ * **Honor the `profile` option for the AWS region, not just credentials**:
24
+ When a profile was set via the `profile` option or `$config.profile`, the
25
+ SDK applied it to credentials only; the AWS SDK fell back to the default
26
+ profile's region and silently read SSM parameters from the wrong
27
+ account-region. The SDK now sets `AWS_PROFILE` so the AWS SDK resolves both
28
+ the profile's region and its (SSO-capable) credentials natively. Region
29
+ resolution order is `AWS_REGION` > `AWS_DEFAULT_REGION` > profile
30
+ region > `us-east-1` fallback
31
+ ([#382](https://github.com/macalbert/envilder/issues/382))
32
+
33
+ ---
34
+
1
35
  ## [0.3.0] - 2026-05-31
2
36
 
3
37
  ### Changed
4
38
 
5
- * **BREAKING: Require Node.js >= 22.12** — Aligns with the rest of the
39
+ * **BREAKING: Require Node.js >= 22.12**: Aligns with the rest of the
6
40
  monorepo. Node 18 and 20 are EOL; Node 22 is the only active LTS
7
41
  ([#291](https://github.com/macalbert/envilder/pull/291))
8
42
 
9
- * **Pin dependencies to minimum viable versions** — AWS SDK `^3.700.0`, Azure
10
- Identity `^4.5.0`, Azure Key Vault Secrets `^4.9.0` — avoids forcing
43
+ * **Pin dependencies to minimum viable versions**: AWS SDK `^3.700.0`, Azure
44
+ Identity `^4.5.0`, Azure Key Vault Secrets `^4.9.0`: avoids forcing
11
45
  consumers to upgrade their cloud SDKs (ADR-0009)
12
46
  ([#291](https://github.com/macalbert/envilder/pull/291))
13
47
 
14
48
  ### Dependencies
15
49
 
16
- * Remove `rimraf` — replaced with zero-dependency `fs.rmSync` in clean script
50
+ * Remove `rimraf`: replaced with zero-dependency `fs.rmSync` in clean script
17
51
  ([#291](https://github.com/macalbert/envilder/pull/291))
18
52
 
19
53
  ---
@@ -22,13 +56,13 @@
22
56
 
23
57
  ### Added
24
58
 
25
- * **Map-file JSON Schema support** — Map files can now include
59
+ * **Map-file JSON Schema support**: Map files can now include
26
60
  `"$schema": "https://envilder.com/schema/map-file.v1.json"` for IDE
27
61
  autocomplete and validation without affecting secret resolution
28
62
 
29
63
  ### Fixed
30
64
 
31
- * **Reserved key filtering** — All `$`-prefixed keys are now excluded from
65
+ * **Reserved key filtering**: All `$`-prefixed keys are now excluded from
32
66
  variable mappings. Previously only `$config` was filtered
33
67
  ([#218](https://github.com/macalbert/envilder/pull/218))
34
68
 
@@ -44,15 +78,15 @@
44
78
 
45
79
  ### Added
46
80
 
47
- * **Initial release** — Node.js runtime SDK for loading secrets directly
81
+ * **Initial release**: Node.js runtime SDK for loading secrets directly
48
82
  into `process.env` from a map file. Supports AWS SSM Parameter Store and
49
83
  Azure Key Vault
50
- * **Envilder facade** — `load()`, `resolveFile()`, `fromMapFile()` fluent
84
+ * **Envilder facade**: `load()`, `resolveFile()`, `fromMapFile()` fluent
51
85
  builder for one-liner or fine-grained secret loading
52
- * **EnvilderClient** — Core resolver with `resolveSecrets()` and
86
+ * **EnvilderClient**: Core resolver with `resolveSecrets()` and
53
87
  `injectIntoEnvironment()` for custom provider usage
54
- * **MapFileParser** — Parse `$config` section and variable mappings from JSON
55
- * **Secret validation** — Opt-in `validateSecrets()` throws
88
+ * **MapFileParser**: Parse `$config` section and variable mappings from JSON
89
+ * **Secret validation**: Opt-in `validateSecrets()` throws
56
90
  `SecretValidationError` for empty or missing values
57
- * **Environment-based routing** — Load different secret files per environment
91
+ * **Environment-based routing**: Load different secret files per environment
58
92
  (production, development, test)
@@ -1,14 +1,32 @@
1
+ ## [0.5.0] - 2026-06-26
2
+
3
+ ### Added
4
+
5
+ * **New `ExpiredCredentialsError`**: Exported from `envilder` and
6
+ raised by the AWS SSM provider on expired or invalid credentials
7
+ (e.g. an expired session token), with an actionable message guiding you
8
+ to refresh credentials (e.g. run `aws sso login`)
9
+
10
+ * **New `SsoSessionExpiredError`**: Exported from `envilder` and raised
11
+ by the AWS SSM provider when an AWS SSO session can no longer be
12
+ resolved, with an actionable message that names the AWS profile and the
13
+ `aws sso login --profile <name>` command to run. A plain expired
14
+ session token still raises `ExpiredCredentialsError`
15
+ ([#378](https://github.com/macalbert/envilder/issues/378))
16
+
17
+ ---
18
+
1
19
  ## [0.4.0] - 2026-05-03
2
20
 
3
21
  ### Added
4
22
 
5
- * **Map-file JSON Schema support** — Map files can now include
23
+ * **Map-file JSON Schema support**: Map files can now include
6
24
  `"$schema": "https://envilder.com/schema/map-file.v1.json"` for IDE
7
25
  autocomplete and validation without affecting secret resolution
8
26
 
9
27
  ### Fixed
10
28
 
11
- * **Reserved key filtering** — All `$`-prefixed keys are now excluded from
29
+ * **Reserved key filtering**: All `$`-prefixed keys are now excluded from
12
30
  variable mappings. Previously only `$config` was filtered
13
31
  ([#218](https://github.com/macalbert/envilder/pull/218))
14
32
 
@@ -18,17 +36,17 @@
18
36
 
19
37
  ### Changed
20
38
 
21
- * **Encapsulate `SecretProviderFactory`** — Renamed to `_SecretProviderFactory` and removed
39
+ * **Encapsulate `SecretProviderFactory`**: Renamed to `_SecretProviderFactory` and removed
22
40
  from public re-exports; consumers should use the `Envilder` facade instead of creating
23
41
  providers manually
24
42
  ([#167](https://github.com/macalbert/envilder/pull/167))
25
- * **Cross-provider validation** — `_SecretProviderFactory.create()` now rejects invalid
43
+ * **Cross-provider validation**: `_SecretProviderFactory.create()` now rejects invalid
26
44
  combinations: AWS profile with Azure provider, or vault URL with AWS provider
27
45
  ([#167](https://github.com/macalbert/envilder/pull/167))
28
46
 
29
47
  ### Fixed
30
48
 
31
- * **Delegate default AWS region resolution to boto3** — When no profile is set, the factory
49
+ * **Delegate default AWS region resolution to boto3**: When no profile is set, the factory
32
50
  no longer manually resolves the region from environment variables. Instead it creates a plain
33
51
  `boto3.Session()` which uses the full AWS SDK resolution chain (env vars → `~/.aws/config` →
34
52
  instance metadata), correctly picking up the default config file settings
@@ -40,7 +58,7 @@
40
58
 
41
59
  ### Fixed
42
60
 
43
- * **Remove `mypy-boto3-ssm` runtime dependency** — `AwsSsmSecretProvider` imported
61
+ * **Remove `mypy-boto3-ssm` runtime dependency**: `AwsSsmSecretProvider` imported
44
62
  `mypy_boto3_ssm.SSMClient` at runtime, but the package is a dev-only type stub.
45
63
  Consumers installing `envilder` from PyPI got `ModuleNotFoundError`. Replaced with
46
64
  `botocore.client.BaseClient` which is already bundled with `boto3`
@@ -52,11 +70,11 @@
52
70
 
53
71
  ### Added
54
72
 
55
- * **Environment-based loading** — `Envilder.load(env, env_mapping)` and
73
+ * **Environment-based loading**: `Envilder.load(env, env_mapping)` and
56
74
  `Envilder.resolve_file(env, env_mapping)` accept a dictionary mapping environment names to
57
75
  map file paths (or `None` to skip). Enables environment-aware secret loading without
58
76
  external branching logic ([#163](https://github.com/macalbert/envilder/pull/163))
59
- * **Source validation** — Empty or whitespace-only file paths in `env_mapping` now raise
77
+ * **Source validation**: Empty or whitespace-only file paths in `env_mapping` now raise
60
78
  `ValueError` with a descriptive message including the environment key
61
79
 
62
80
  ---
@@ -65,10 +83,10 @@
65
83
 
66
84
  ### Added
67
85
 
68
- * **Fluent API facade** — `Envilder` high-level entry point with `load()`, `resolve_file()`,
86
+ * **Fluent API facade**: `Envilder` high-level entry point with `load()`, `resolve_file()`,
69
87
  and `from_map_file()` methods, plus fluent override methods (`with_provider()`, `with_vault_url()`,
70
88
  `with_profile()`) ([#161](https://github.com/macalbert/envilder/pull/161))
71
- * **Facade docstrings** — All public methods on the `Envilder` facade now have docstrings with
89
+ * **Facade docstrings**: All public methods on the `Envilder` facade now have docstrings with
72
90
  usage examples, improving IDE tooltips and `help()` output for external consumers
73
91
 
74
92
  ---
@@ -77,18 +95,18 @@
77
95
 
78
96
  ### Added
79
97
 
80
- * **Initial release** — Runtime library for loading secrets from AWS SSM Parameter Store or
98
+ * **Initial release**: Runtime library for loading secrets from AWS SSM Parameter Store or
81
99
  Azure Key Vault directly into Python applications
82
100
  ([#157](https://github.com/macalbert/envilder/pull/157))
83
- * `Envilder` facade — High-level entry point with `load()`, `resolve_file()`, and `from_map_file()` methods
84
- * `EnvilderClient` — Resolves secrets from a map-file and injects them into `os.environ`
85
- * `MapFileParser` — Parses `envilder.json` files with `$config` section and variable mappings
86
- * `SecretProviderFactory` — Creates the appropriate secret provider based on configuration
87
- * `AwsSsmSecretProvider` — Fetches secrets from AWS SSM Parameter Store via boto3
88
- * `AzureKeyVaultSecretProvider` — Fetches secrets from Azure Key Vault
89
- * `EnvilderOptions` — Runtime overrides for provider, vault URL, and AWS profile
90
- * Synchronous API — no async/await, uses boto3 natively
91
- * Protocol-based ports — Python `Protocol` instead of ABC
101
+ * `Envilder` facade: High-level entry point with `load()`, `resolve_file()`, and `from_map_file()` methods
102
+ * `EnvilderClient`: Resolves secrets from a map-file and injects them into `os.environ`
103
+ * `MapFileParser`: Parses `envilder.json` files with `$config` section and variable mappings
104
+ * `SecretProviderFactory`: Creates the appropriate secret provider based on configuration
105
+ * `AwsSsmSecretProvider`: Fetches secrets from AWS SSM Parameter Store via boto3
106
+ * `AzureKeyVaultSecretProvider`: Fetches secrets from Azure Key Vault
107
+ * `EnvilderOptions`: Runtime overrides for provider, vault URL, and AWS profile
108
+ * Synchronous API: no async/await, uses boto3 natively
109
+ * Protocol-based ports: Python `Protocol` instead of ABC
92
110
  * Python 3.10+ with full type annotations (`py.typed`)
93
111
  * Published to PyPI as `envilder`
94
112
 
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Cli.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AA2B1B,wBAAsB,IAAI,kBAqHzB"}
@@ -23,11 +23,12 @@ import { dirname, join } from 'node:path';
23
23
  import { fileURLToPath } from 'node:url';
24
24
  import { Command } from 'commander';
25
25
  import pc from 'picocolors';
26
- import { DispatchActionCommand } from '../../core/application/dispatch/DispatchActionCommand.js';
27
- import { PackageVersionReader } from '../../core/infrastructure/package/PackageVersionReader.js';
28
- import { readMapFileConfig } from '../../core/infrastructure/variableStore/FileVariableStore.js';
29
- import { TYPES } from '../../core/types.js';
30
- import { Startup } from './Startup.js';
26
+ import { DispatchActionCommand } from '../../../core/application/dispatch/DispatchActionCommand.js';
27
+ import { PackageVersionReader } from '../../../core/infrastructure/package/PackageVersionReader.js';
28
+ import { readMapFileConfig } from '../../../core/infrastructure/variableStore/FileVariableStore.js';
29
+ import { TYPES } from '../../../core/types.js';
30
+ import { executeWithSsoRecovery } from '../recovery/SsoLoginRecovery.js';
31
+ import { Startup } from '../Startup.js';
31
32
  let serviceProvider;
32
33
  function executeCommand(options) {
33
34
  return __awaiter(this, void 0, void 0, function* () {
@@ -106,7 +107,7 @@ export function main() {
106
107
  .configureServices()
107
108
  .configureInfrastructure(config, infraOptions)
108
109
  .create();
109
- yield executeCommand(options);
110
+ yield executeWithSsoRecovery(() => executeCommand(options));
110
111
  }));
111
112
  yield program.parseAsync(process.argv);
112
113
  });
@@ -114,7 +115,7 @@ export function main() {
114
115
  function readPackageVersion() {
115
116
  const __filename = fileURLToPath(import.meta.url);
116
117
  const __dirname = dirname(__filename);
117
- const packageJsonPath = join(__dirname, '../../../../package.json');
118
+ const packageJsonPath = join(__dirname, '../../../../../package.json');
118
119
  return new PackageVersionReader().getVersion(packageJsonPath);
119
120
  }
120
121
  //# sourceMappingURL=Cli.js.map
@@ -0,0 +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;AAIpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,iEAAiE,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,IAAI,eAA0B,CAAC;AAE/B,SAAe,cAAc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CAAC;qBACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBACxB,YAAY,CAAC,oCAAoC,GAAG,IAAI,CAAC;YAC3D,CAAC;YAED,eAAe,GAAG,OAAO,CAAC,KAAK,EAAE;iBAC9B,iBAAiB,EAAE;iBACnB,uBAAuB,CAAC,MAAM,EAAE,YAAY,CAAC;iBAC7C,MAAM,EAAE,CAAC;YAEZ,MAAM,sBAAsB,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9D,CAAC,CAAA,CACF,CAAC;QAEJ,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CAAA;AAED,SAAS,kBAAkB;IACzB,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Index.ts"],"names":[],"mappings":";AAEA;;;GAGG"}
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Entry point for the CLI application
4
+ * This file is executed when the CLI runs
5
+ */
6
+ import { presentError } from '../errors/CliErrorPresenter.js';
7
+ import { SilentExitError } from '../errors/SilentExitError.js';
8
+ import { main } from './Cli.js';
9
+ main().catch((error) => {
10
+ if (error instanceof SilentExitError) {
11
+ process.exit(error.code);
12
+ }
13
+ console.error(presentError(error));
14
+ process.exit(1);
15
+ });
16
+ //# sourceMappingURL=Index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.js","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/entry/Index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function presentError(error: unknown): string;
2
+ //# sourceMappingURL=CliErrorPresenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliErrorPresenter.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/errors/CliErrorPresenter.ts"],"names":[],"mappings":"AAQA,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAWnD"}
@@ -0,0 +1,78 @@
1
+ import pc from 'picocolors';
2
+ import { ExpiredCredentialsError, SecretsFetchError, SsoSessionExpiredError, } from '../../../core/domain/errors/DomainErrors.js';
3
+ import { describeError } from '../../../core/infrastructure/describeError.js';
4
+ export function presentError(error) {
5
+ if (error instanceof SsoSessionExpiredError) {
6
+ return renderSsoSessionExpired(error);
7
+ }
8
+ if (error instanceof ExpiredCredentialsError) {
9
+ return renderExpiredCredentials();
10
+ }
11
+ if (error instanceof SecretsFetchError) {
12
+ return renderSecretsFetchError(error);
13
+ }
14
+ return renderFallback(error);
15
+ }
16
+ function gameOver(title) {
17
+ return `\n${pc.bold(pc.red(`\u{1F4A5} GAME OVER \u2014 ${title}`))}`;
18
+ }
19
+ function renderSsoSessionExpired(error) {
20
+ const body = error.profileName
21
+ ? ` ${pc.dim('Your AWS SSO session for profile ')}${pc.magenta(`"${error.profileName}"`)}${pc.dim(' ran out of lives.')}`
22
+ : ` ${pc.dim('Your AWS SSO session ran out of lives.')}`;
23
+ const command = error.profileName
24
+ ? `aws sso login --profile ${error.profileName}`
25
+ : 'aws sso login';
26
+ return [
27
+ gameOver('SSO session expired'),
28
+ '',
29
+ body,
30
+ '',
31
+ ` ${pc.bold(pc.yellow('\u2B95 CONTINUE?'))}`,
32
+ ` ${pc.dim(' Run: ')}${pc.cyan(command)}`,
33
+ ` ${pc.dim(' then re-run your envilder command.')}`,
34
+ '',
35
+ ].join('\n');
36
+ }
37
+ function renderExpiredCredentials() {
38
+ return [
39
+ gameOver('AWS credentials expired'),
40
+ '',
41
+ ` ${pc.dim('Your security token ran out of time.')}`,
42
+ '',
43
+ ` ${pc.bold(pc.yellow('\u2B95 CONTINUE?'))}`,
44
+ ` ${pc.dim(' Refresh your credentials and retry ')}${pc.dim('(for SSO: ')}${pc.cyan('aws sso login')}${pc.dim(').')}`,
45
+ '',
46
+ ].join('\n');
47
+ }
48
+ function renderFallback(error) {
49
+ const message = describeError(error);
50
+ return [
51
+ gameOver('you fell down the wrong pipe!'),
52
+ '',
53
+ ` ${pc.dim(message)}`,
54
+ '',
55
+ ].join('\n');
56
+ }
57
+ const ACCESS_DENIED_PATTERN = /access.?denied|not authorized|forbidden/i;
58
+ function isAccessDeniedReason(reason) {
59
+ return ACCESS_DENIED_PATTERN.test(reason);
60
+ }
61
+ function renderSecretsFetchError(error) {
62
+ const rule = pc.red('\u2501'.repeat(60));
63
+ const failureLines = error.failures.map((failure) => ` ${pc.red('\u2717 ')}${pc.bold(failure.envVar.padEnd(20))}${pc.dim('\u2192 ')}${pc.dim(failure.path)}`);
64
+ const reasons = [...new Set(error.failures.map((failure) => failure.reason))];
65
+ const reasonLines = reasons.map((reason) => isAccessDeniedReason(reason)
66
+ ? ` ${pc.bold(pc.red(reason))}`
67
+ : ` ${pc.dim(reason)}`);
68
+ return [
69
+ gameOver('some secrets could not be fetched'),
70
+ rule,
71
+ ...failureLines,
72
+ '',
73
+ ` ${pc.bold(pc.yellow('\u2B95 WHY?'))}`,
74
+ ...reasonLines,
75
+ '',
76
+ ].join('\n');
77
+ }
78
+ //# sourceMappingURL=CliErrorPresenter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CliErrorPresenter.js","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/errors/CliErrorPresenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAE9E,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,KAAK,YAAY,sBAAsB,EAAE,CAAC;QAC5C,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IACD,IAAI,KAAK,YAAY,uBAAuB,EAAE,CAAC;QAC7C,OAAO,wBAAwB,EAAE,CAAC;IACpC,CAAC;IACD,IAAI,KAAK,YAAY,iBAAiB,EAAE,CAAC;QACvC,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,8BAA8B,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,uBAAuB,CAAC,KAA6B;IAC5D,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW;QAC5B,CAAC,CAAC,KAAK,EAAE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AAQ,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC7B,CAAC;IACF,OAAO;QACL,QAAQ,CAAC,mCAAmC,CAAC;QAC7C,IAAI;QACJ,GAAG,YAAY;QACf,EAAE;QACF,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE;QACxC,GAAG,WAAW;QACd,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare class SilentExitError extends Error {
2
+ readonly code: number;
3
+ constructor(code: number);
4
+ }
5
+ //# sourceMappingURL=SilentExitError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SilentExitError.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/errors/SilentExitError.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,KAAK;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM;CAGlC"}
@@ -0,0 +1,7 @@
1
+ export class SilentExitError extends Error {
2
+ constructor(code) {
3
+ super('silent exit');
4
+ this.code = code;
5
+ }
6
+ }
7
+ //# sourceMappingURL=SilentExitError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SilentExitError.js","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/errors/SilentExitError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAqB,IAAY;QAC/B,KAAK,CAAC,aAAa,CAAC,CAAC;QADF,SAAI,GAAJ,IAAI,CAAQ;IAEjC,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ export type RecoveryDeps = {
2
+ isInteractive(): boolean;
3
+ confirm(question: string): Promise<boolean>;
4
+ runLogin(profileName?: string): Promise<number>;
5
+ write(message: string): void;
6
+ };
7
+ export declare function buildLoginArgs(profileName?: string): string[];
8
+ export declare function executeWithSsoRecovery(run: () => Promise<void>, deps?: Partial<RecoveryDeps>): Promise<void>;
9
+ //# sourceMappingURL=SsoLoginRecovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SsoLoginRecovery.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/recovery/SsoLoginRecovery.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,IAAI,OAAO,CAAC;IACzB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,wBAAgB,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAK7D;AA4CD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACxB,IAAI,GAAE,OAAO,CAAC,YAAY,CAAM,GAC/B,OAAO,CAAC,IAAI,CAAC,CAaf"}
@@ -0,0 +1,120 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { spawn } from 'node:child_process';
11
+ import { createInterface } from 'node:readline';
12
+ import { SsoSessionExpiredError } from '../../../core/domain/errors/DomainErrors.js';
13
+ import { presentError } from '../errors/CliErrorPresenter.js';
14
+ import { SilentExitError } from '../errors/SilentExitError.js';
15
+ const AWS_CLI_NOT_FOUND = -1;
16
+ const LOGIN_FAILED = 1;
17
+ export function buildLoginArgs(profileName) {
18
+ if (profileName) {
19
+ return ['sso', 'login', '--profile', profileName];
20
+ }
21
+ return ['sso', 'login'];
22
+ }
23
+ function defaultIsInteractive() {
24
+ return [process.stdout.isTTY, process.stdin.isTTY].every(Boolean);
25
+ }
26
+ function defaultConfirm(question) {
27
+ const prompt = createInterface({
28
+ input: process.stdin,
29
+ output: process.stdout,
30
+ });
31
+ return new Promise((resolve) => {
32
+ prompt.question(`${question} `, (answer) => {
33
+ prompt.close();
34
+ resolve(answer.trim().toLowerCase() === 'y');
35
+ });
36
+ });
37
+ }
38
+ function defaultRunLogin(profileName) {
39
+ return new Promise((resolve) => {
40
+ const child = spawn('aws', buildLoginArgs(profileName), {
41
+ stdio: 'inherit',
42
+ });
43
+ child.on('error', (error) => {
44
+ resolve(error.code === 'ENOENT' ? AWS_CLI_NOT_FOUND : LOGIN_FAILED);
45
+ });
46
+ child.on('close', (code) => {
47
+ resolve(code !== null && code !== void 0 ? code : LOGIN_FAILED);
48
+ });
49
+ });
50
+ }
51
+ function defaultWrite(message) {
52
+ console.error(message);
53
+ }
54
+ const defaultDeps = {
55
+ isInteractive: defaultIsInteractive,
56
+ confirm: defaultConfirm,
57
+ runLogin: defaultRunLogin,
58
+ write: defaultWrite,
59
+ };
60
+ export function executeWithSsoRecovery(run_1) {
61
+ return __awaiter(this, arguments, void 0, function* (run, deps = {}) {
62
+ const resolved = Object.assign(Object.assign({}, defaultDeps), deps);
63
+ try {
64
+ return yield run();
65
+ }
66
+ catch (error) {
67
+ if (!(error instanceof SsoSessionExpiredError)) {
68
+ throw error;
69
+ }
70
+ if (!resolved.isInteractive()) {
71
+ throw error;
72
+ }
73
+ yield recoverInteractively(run, error, resolved);
74
+ }
75
+ });
76
+ }
77
+ function recoverInteractively(run, error, deps) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ deps.write(presentError(error));
80
+ const command = error.profileName
81
+ ? `aws sso login --profile ${error.profileName}`
82
+ : 'aws sso login';
83
+ const accepted = yield deps.confirm(`Run '${command}' now? [y/N]`);
84
+ if (!accepted) {
85
+ deps.write('Skipped. Run the command above when ready, then re-run envilder.');
86
+ throw new SilentExitError(LOGIN_FAILED);
87
+ }
88
+ const exitCode = yield deps.runLogin(error.profileName);
89
+ ensureLoginSucceeded(exitCode, deps);
90
+ yield retryOnce(run, deps);
91
+ });
92
+ }
93
+ function ensureLoginSucceeded(exitCode, deps) {
94
+ if (exitCode === AWS_CLI_NOT_FOUND) {
95
+ deps.write('The AWS CLI was not found on your PATH. Install it, then run the command above.');
96
+ throw new SilentExitError(LOGIN_FAILED);
97
+ }
98
+ if (exitCode !== 0) {
99
+ deps.write('Login did not complete. Try again, then re-run envilder.');
100
+ throw new SilentExitError(LOGIN_FAILED);
101
+ }
102
+ }
103
+ function retryOnce(run, deps) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ deps.write('\uD83C\uDF44 1-UP! SSO session restored.');
106
+ deps.write('\u21bb Warping back for your secrets\u2026');
107
+ try {
108
+ yield run();
109
+ deps.write('\u2b50 Level cleared.');
110
+ }
111
+ catch (retryError) {
112
+ if (retryError instanceof SsoSessionExpiredError) {
113
+ deps.write(presentError(retryError));
114
+ throw new SilentExitError(LOGIN_FAILED);
115
+ }
116
+ throw retryError;
117
+ }
118
+ });
119
+ }
120
+ //# sourceMappingURL=SsoLoginRecovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SsoLoginRecovery.js","sourceRoot":"","sources":["../../../../../src/envilder/apps/cli/recovery/SsoLoginRecovery.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,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,YAAY,sBAAsB,EAAE,CAAC;gBACjD,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;gBACrC,MAAM,IAAI,eAAe,CAAC,YAAY,CAAC,CAAC;YAC1C,CAAC;YACD,MAAM,UAAU,CAAC;QACnB,CAAC;IACH,CAAC;CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Gha.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/gha/entry/Gha.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAmD1B,wBAAsB,IAAI,kBA8CzB"}
@@ -8,11 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import 'reflect-metadata';
11
- import { DispatchActionCommand } from '../../core/application/dispatch/DispatchActionCommand.js';
12
- import { ConsoleLogger } from '../../core/infrastructure/logger/ConsoleLogger.js';
13
- import { readMapFileConfig } from '../../core/infrastructure/variableStore/FileVariableStore.js';
14
- import { TYPES } from '../../core/types.js';
15
- import { Startup } from './Startup.js';
11
+ import { DispatchActionCommand } from '../../../core/application/dispatch/DispatchActionCommand.js';
12
+ import { ConsoleLogger } from '../../../core/infrastructure/logger/ConsoleLogger.js';
13
+ import { readMapFileConfig } from '../../../core/infrastructure/variableStore/FileVariableStore.js';
14
+ import { TYPES } from '../../../core/types.js';
15
+ import { presentGhaError } from '../errors/GhaErrorPresenter.js';
16
+ import { Startup } from '../Startup.js';
16
17
  /**
17
18
  * Reads GitHub Actions inputs from environment variables.
18
19
  * GitHub Actions passes inputs as INPUT_<NAME> environment variables.
@@ -70,8 +71,9 @@ export function main() {
70
71
  logger.info('✅ Secrets pulled successfully!');
71
72
  }
72
73
  catch (error) {
73
- logger.error('🚨 Uh-oh! Looks like Mario fell into the wrong pipe! 🍄💥');
74
- logger.error(error instanceof Error ? error.message : String(error));
74
+ for (const line of presentGhaError(error)) {
75
+ logger.error(line);
76
+ }
75
77
  throw error;
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AAC,IAAI,CAAC,gBAAgB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YAC3C,MAAM,CAAC,IAAI,CAAC,gBAAgB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YAE/C,MAAM,cAAc,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;YAE/C,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,KAAK,MAAM,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1C,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/gha/entry/Index.ts"],"names":[],"mappings":";AAEA;;;GAGG"}
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Entry point for the GitHub Action
4
+ * This file is executed when the action runs
5
+ */
6
+ import { main } from './Gha.js';
7
+ main().catch(() => {
8
+ // Gha.ts already logged an actionable message via presentGhaError()
9
+ // before rethrowing; this handler only needs to set the exit code.
10
+ process.exit(1);
11
+ });
12
+ //# sourceMappingURL=Index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Index.js","sourceRoot":"","sources":["../../../../../src/envilder/apps/gha/entry/Index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;IAChB,oEAAoE;IACpE,mEAAmE;IACnE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Renders an error into log lines for the GitHub Action, keeping the
3
+ * retro-arcade tone used across Envilder's failure messages. Returns
4
+ * one entry per log line so the caller can emit each via `ILogger.error`.
5
+ */
6
+ export declare function presentGhaError(error: unknown): string[];
7
+ //# sourceMappingURL=GhaErrorPresenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GhaErrorPresenter.d.ts","sourceRoot":"","sources":["../../../../../src/envilder/apps/gha/errors/GhaErrorPresenter.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAKxD"}