@chriscode/hush 5.0.5 → 5.0.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAmC,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAmC,WAAW,EAAE,MAAM,aAAa,CAAC;AA4C5F,wBAAsB,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAmHrF"}
|
package/dist/commands/run.js
CHANGED
|
@@ -26,11 +26,7 @@ function getDecryptedSecrets(ctx, projectRoot, env, config) {
|
|
|
26
26
|
varSources.push(parseEnvContent(content));
|
|
27
27
|
}
|
|
28
28
|
if (varSources.length === 0) {
|
|
29
|
-
|
|
30
|
-
` Expected: ${sharedEncrypted}\n` +
|
|
31
|
-
` Project root: ${projectRoot}\n\n` +
|
|
32
|
-
` If you haven't encrypted yet, run: npx hush encrypt\n` +
|
|
33
|
-
` If running from a subdirectory, ensure hush.yaml exists at the project root.`);
|
|
29
|
+
return [];
|
|
34
30
|
}
|
|
35
31
|
const merged = mergeVars(...varSources);
|
|
36
32
|
return interpolateVars(merged);
|
|
@@ -61,6 +57,10 @@ export async function runCommand(ctx, options) {
|
|
|
61
57
|
const { projectRoot } = projectInfo;
|
|
62
58
|
const config = ctx.config.loadConfig(projectRoot);
|
|
63
59
|
const rootSecrets = getDecryptedSecrets(ctx, projectRoot, env, config);
|
|
60
|
+
if (rootSecrets.length === 0) {
|
|
61
|
+
ctx.logger.warn(pc.yellow('No encrypted files found. Running command without secrets.'));
|
|
62
|
+
ctx.logger.warn(pc.dim(' To encrypt secrets, run: npx hush encrypt'));
|
|
63
|
+
}
|
|
64
64
|
const rootSecretsRecord = getRootSecretsAsRecord(rootSecrets);
|
|
65
65
|
const localTemplate = loadLocalTemplates(contextDir, env, ctx.fs);
|
|
66
66
|
// 1. Resolve Template Vars
|