learn-secrets-sdk 1.11.4 → 1.11.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.
Files changed (2) hide show
  1. package/dist/cli/index.mjs +10 -2
  2. package/package.json +1 -1
@@ -782,6 +782,7 @@ Next steps:`);
782
782
  fs3.writeFileSync(configFile, JSON.stringify(config, null, 2));
783
783
  console.log(`
784
784
  Updated local config: ${configFile}`);
785
+ console.log(`Saved env config: ${envFile} (will be used by 'learn-secrets deploy')`);
785
786
  } catch (error) {
786
787
  console.error("\nUpload failed:", error.message);
787
788
  if (error.status === 401) {
@@ -869,6 +870,13 @@ Deploying secrets to project: ${config.project}`);
869
870
  console.log(`Origins: ${config.origins.join(", ")}
870
871
  `);
871
872
  const envFile = options.env || config.env || ".env";
873
+ if (options.env) {
874
+ console.log(`[Using --env flag: ${options.env}]`);
875
+ } else if (config.env) {
876
+ console.log(`[Using env from config: ${config.env}]`);
877
+ } else {
878
+ console.log(`[Using default: .env]`);
879
+ }
872
880
  let secrets;
873
881
  let envVars = [];
874
882
  try {
@@ -945,13 +953,13 @@ program.name("learn-secrets").description("CLI tool for managing secrets with th
945
953
  program.command("login").description("Authenticate with Learn Secrets via browser").option("--base-url <url>", "Custom base URL for API").action(async (options) => {
946
954
  await loginCommand(options);
947
955
  });
948
- program.command("init").description("Initialize secrets for a new site").requiredOption("-o, --origins <domains>", "Comma-separated list of allowed origins (e.g., mysite.com,localhost)").option("-p, --project <appid>", "Project app ID (auto-detected from login if not specified)").option("-e, --env <file>", "Path to .env file (default: .env)", ".env").option("--base-url <url>", "Custom base URL for API").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
956
+ program.command("init").description("Initialize secrets for a new site").requiredOption("-o, --origins <domains>", "Comma-separated list of allowed origins (e.g., mysite.com,localhost)").option("-p, --project <appid>", "Project app ID (auto-detected from login if not specified)").option("-e, --env <file>", "Path to .env file (defaults to .env if not specified)").option("--base-url <url>", "Custom base URL for API").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
949
957
  await initCommand(options);
950
958
  });
951
959
  program.command("config").description("View or update project configuration").option("-p, --project <appid>", "Change project ID").option("--origins <origins>", "Comma separated origins").option("-e, --env <file>", "Path to .env file").action(async (options) => {
952
960
  await configCommand(options);
953
961
  });
954
- program.command("deploy").description("Deploy secrets from .env to dashboard").option("-e, --env <file>", "Path to .env file (default: .env)", ".env").option("--base-url <url>", "Custom base URL for API").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
962
+ program.command("deploy").description("Deploy secrets from .env to dashboard").option("-e, --env <file>", "Path to .env file (uses config or .env if not specified)").option("--base-url <url>", "Custom base URL for API").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
955
963
  await deployCommand(options);
956
964
  });
957
965
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learn-secrets-sdk",
3
- "version": "1.11.4",
3
+ "version": "1.11.6",
4
4
  "description": "Secrets management SDK for static sites with Learn platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",