@rowlabs/ev 0.3.1 → 0.3.2

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/index.js +12 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6306,8 +6306,12 @@ function parseGitEnvConfig(content) {
6306
6306
  if (!parsed.project || typeof parsed.project !== "string") {
6307
6307
  throw new Error("Invalid ev.yaml: missing or invalid 'project' field");
6308
6308
  }
6309
+ if (!parsed.name || typeof parsed.name !== "string") {
6310
+ throw new Error("Invalid ev.yaml: missing or invalid 'name' field");
6311
+ }
6309
6312
  return {
6310
6313
  project: parsed.project,
6314
+ name: parsed.name,
6311
6315
  defaultEnv: parsed.default_env,
6312
6316
  envFiles: parsed.env_files ?? [".env", ".env.local"],
6313
6317
  apps: parsed.apps,
@@ -6877,6 +6881,7 @@ var initCommand = new Command2("init").description("Initialize ev in the current
6877
6881
  await saveProjectKey(project.id, sealedKey);
6878
6882
  const configData = {
6879
6883
  project: project.id,
6884
+ name,
6880
6885
  default_env: "dev",
6881
6886
  env_files: [".env", ".env.local"]
6882
6887
  };
@@ -7325,6 +7330,7 @@ var statusCommand = new Command7("status").description("Show current context").a
7325
7330
  const auth = await loadAuth();
7326
7331
  const keypair = await loadKeypair();
7327
7332
  const resolved = await resolveCurrentContext();
7333
+ const config = await loadEvConfig(process.cwd());
7328
7334
  console.log(chalk9.bold("\nev status\n"));
7329
7335
  if (auth) console.log(` ${chalk9.green("\u25CF")} Logged in (${auth.apiUrl})`);
7330
7336
  else console.log(` ${chalk9.red("\u25CF")} Not logged in`);
@@ -7332,9 +7338,12 @@ var statusCommand = new Command7("status").description("Show current context").a
7332
7338
  else console.log(` ${chalk9.red("\u25CF")} No keypair`);
7333
7339
  if (resolved) {
7334
7340
  const { context } = resolved;
7335
- console.log(` ${chalk9.green("\u25CF")} Project: ${context.project}`);
7341
+ console.log(` ${chalk9.green("\u25CF")} Project: ${config?.name ?? context.project}`);
7336
7342
  console.log(` ${chalk9.green("\u25CF")} App: ${context.app ?? "default"}`);
7337
7343
  console.log(` ${chalk9.green("\u25CF")} Env: ${context.env}`);
7344
+ if (config?.envFiles) {
7345
+ console.log(` ${chalk9.green("\u25CF")} Env files: ${config.envFiles.join(", ")}`);
7346
+ }
7338
7347
  } else {
7339
7348
  console.log(` ${chalk9.yellow("\u25CF")} No ev.yaml found in this directory`);
7340
7349
  }
@@ -8661,7 +8670,7 @@ var updateCommand = new Command18("update").description("Update ev to the latest
8661
8670
  const spinner = ora12("Checking for updates...").start();
8662
8671
  try {
8663
8672
  const latest = execSync2("npm view @rowlabs/ev version", { encoding: "utf-8" }).trim();
8664
- const current = "0.3.1";
8673
+ const current = "0.3.2";
8665
8674
  if (current === latest) {
8666
8675
  spinner.succeed(chalk20.green(`Already on the latest version (${current})`));
8667
8676
  return;
@@ -8677,7 +8686,7 @@ var updateCommand = new Command18("update").description("Update ev to the latest
8677
8686
 
8678
8687
  // src/index.ts
8679
8688
  var program = new Command19();
8680
- program.name("ev").description("Git for env vars \u2014 sync environment variables across teams securely").version("0.3.1");
8689
+ program.name("ev").description("Git for env vars \u2014 sync environment variables across teams securely").version("0.3.2");
8681
8690
  program.addCommand(loginCommand);
8682
8691
  program.addCommand(initCommand);
8683
8692
  program.addCommand(pushCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rowlabs/ev",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Git for env vars — sync environment variables across teams securely",
5
5
  "type": "module",
6
6
  "bin": {