@prismer/sdk 1.3.3 → 1.3.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/cli.js +8 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -838,6 +838,13 @@ var PrismerClient = class {
838
838
  };
839
839
 
840
840
  // src/cli.ts
841
+ var cliVersion = "1.3.3";
842
+ try {
843
+ const pkgPath = path.join(__dirname, "..", "package.json");
844
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
845
+ cliVersion = pkg.version || cliVersion;
846
+ } catch {
847
+ }
841
848
  var CONFIG_DIR = path.join(os.homedir(), ".prismer");
842
849
  var CONFIG_PATH = path.join(CONFIG_DIR, "config.toml");
843
850
  function ensureConfigDir() {
@@ -870,7 +877,7 @@ function setNestedValue(obj, dotPath, value) {
870
877
  current[parts[parts.length - 1]] = value;
871
878
  }
872
879
  var program = new import_commander.Command();
873
- program.name("prismer").description("Prismer Cloud SDK CLI").version("0.1.0");
880
+ program.name("prismer").description("Prismer Cloud SDK CLI").version(cliVersion);
874
881
  program.command("init <api-key>").description("Store API key in ~/.prismer/config.toml").action((apiKey) => {
875
882
  const config = readConfig();
876
883
  if (!config.default) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismer/sdk",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Official TypeScript SDK for Prismer Cloud API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",