@uagents/syncenv-cli 0.1.3 → 0.1.4

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 +16 -13
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -539,10 +539,10 @@ var StateManager = class {
539
539
  /**
540
540
  * Record a successful sync operation
541
541
  */
542
- async recordSync(projectId, envId, version, contentHash, source) {
542
+ async recordSync(projectId, envId, version2, contentHash, source) {
543
543
  await this.updateEnvironmentState(projectId, envId, (current) => ({
544
544
  lastSync: {
545
- version,
545
+ version: version2,
546
546
  contentHash,
547
547
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
548
548
  source
@@ -554,7 +554,7 @@ var StateManager = class {
554
554
  {
555
555
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
556
556
  action: source,
557
- version
557
+ version: version2
558
558
  }
559
559
  ].slice(-20)
560
560
  }));
@@ -991,11 +991,11 @@ envCommands.command("history").description("Show version history").option("-p, -
991
991
  }
992
992
  console.log(chalk4.bold("\nVERSION DATE AUTHOR MESSAGE"));
993
993
  console.log(chalk4.dim("\u2500".repeat(70)));
994
- for (const version of versions.slice(0, limit)) {
995
- const ver = String(version.versionNumber).padEnd(9);
996
- const date = formatRelativeTime(version.createdAt).padEnd(17);
997
- const author = (version.createdByUser?.slice(0, 12) || "unknown").padEnd(13);
998
- const message = version.changeSummary || "";
994
+ for (const version2 of versions.slice(0, limit)) {
995
+ const ver = String(version2.versionNumber).padEnd(9);
996
+ const date = formatRelativeTime(version2.createdAt).padEnd(17);
997
+ const author = (version2.createdByUser?.slice(0, 12) || "unknown").padEnd(13);
998
+ const message = version2.changeSummary || "";
999
999
  console.log(`${ver} ${date} ${author} ${message}`);
1000
1000
  }
1001
1001
  console.log("");
@@ -1057,7 +1057,7 @@ Version ${version2}:`));
1057
1057
  process.exit(1);
1058
1058
  }
1059
1059
  });
1060
- envCommands.command("rollback <version>").description("Rollback to a specific version").option("-p, --project <id>", "project ID").option("-e, --env <name>", "environment name").option("-y, --yes", "skip confirmation").action(async (version, options) => {
1060
+ envCommands.command("rollback <version>").description("Rollback to a specific version").option("-p, --project <id>", "project ID").option("-e, --env <name>", "environment name").option("-y, --yes", "skip confirmation").action(async (version2, options) => {
1061
1061
  try {
1062
1062
  if (!isAuthenticated()) {
1063
1063
  error("Not authenticated. Run `syncenv auth login` first.");
@@ -1070,7 +1070,7 @@ envCommands.command("rollback <version>").description("Rollback to a specific ve
1070
1070
  process.exit(1);
1071
1071
  }
1072
1072
  const envName = options.env || config?.defaults.environment || "dev";
1073
- const targetVersion = parseInt(version);
1073
+ const targetVersion = parseInt(version2);
1074
1074
  if (!options.yes) {
1075
1075
  const { confirm } = await inquirer2.prompt([
1076
1076
  {
@@ -1159,11 +1159,11 @@ Environments for ${project.name}`));
1159
1159
  console.log(chalk4.dim("\u2500".repeat(70)));
1160
1160
  for (const env of environments) {
1161
1161
  const name = env.name.padEnd(11).slice(0, 11);
1162
- const version = `v${env.currentVersion || 1}`.padEnd(9);
1162
+ const version2 = `v${env.currentVersion || 1}`.padEnd(9);
1163
1163
  const size = formatBytes(env.contentSize || 0).padEnd(9);
1164
1164
  const modified = env.lastModifiedAt ? formatRelativeTime(env.lastModifiedAt).padEnd(17) : "--".padEnd(17);
1165
1165
  const description = env.description || "";
1166
- console.log(`${name} ${version} ${size} ${modified} ${description}`);
1166
+ console.log(`${name} ${version2} ${size} ${modified} ${description}`);
1167
1167
  }
1168
1168
  console.log("");
1169
1169
  } catch (err) {
@@ -2050,10 +2050,13 @@ userKeysCommands.command("rotate").description("Re-encrypt your keys with a new
2050
2050
  });
2051
2051
 
2052
2052
  // src/index.ts
2053
+ import { createRequire } from "module";
2054
+ var require2 = createRequire(import.meta.url);
2055
+ var { version } = require2("../package.json");
2053
2056
  async function main() {
2054
2057
  const program = new Command7();
2055
2058
  await loadConfig();
2056
- program.name("syncenv").description("CLI for SyncEnv - Secure environment variable synchronization").version("0.1.0").option("-v, --verbose", "enable verbose logging").option("--api-url <url>", "API base URL", process.env.SYNCENV_API_URL || "http://localhost:8787").hook("preAction", (thisCommand) => {
2059
+ program.name("syncenv").description("CLI for SyncEnv - Secure environment variable synchronization").version(version).option("-v, --verbose", "enable verbose logging").option("--api-url <url>", "API base URL", process.env.SYNCENV_API_URL || "http://localhost:8787").hook("preAction", (thisCommand) => {
2057
2060
  const opts = thisCommand.opts();
2058
2061
  if (opts.verbose) {
2059
2062
  process.env.SYNCENV_VERBOSE = "true";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uagents/syncenv-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI for SyncEnv - Secure environment variable synchronization",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,8 +25,8 @@
25
25
  "open": "^11.0.0",
26
26
  "ora": "^8.0.0",
27
27
  "zod": "^3.23.0",
28
- "@uagents/syncenv-client": "0.1.0",
29
- "@uagents/syncenv-schemas": "1.0.0"
28
+ "@uagents/syncenv-schemas": "1.0.0",
29
+ "@uagents/syncenv-client": "0.1.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/js-yaml": "^4.0.9",