image-convert-cli 1.1.3 → 1.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.
package/dist/index.js CHANGED
@@ -8635,6 +8635,33 @@ Conversion settings:`);
8635
8635
  });
8636
8636
  }
8637
8637
  }
8638
+ // package.json
8639
+ var package_default = {
8640
+ name: "image-convert-cli",
8641
+ version: "1.1.4",
8642
+ type: "module",
8643
+ bin: {
8644
+ imgc: "./dist/index.js"
8645
+ },
8646
+ scripts: {
8647
+ start: "bun bin/index.ts",
8648
+ test: "bun test",
8649
+ prepare: "husky install",
8650
+ build: "bun build ./bin/index.ts --outdir ./dist --target bun",
8651
+ publish: "bun run build && bun publish --access public --ignore-scripts"
8652
+ },
8653
+ publishConfig: {
8654
+ access: "public"
8655
+ },
8656
+ dependencies: {
8657
+ "@inquirer/prompts": "^8.2.0",
8658
+ sharp: "^0.34.5"
8659
+ },
8660
+ devDependencies: {
8661
+ "@types/bun": "^1.3.8",
8662
+ husky: "^9.1.7"
8663
+ }
8664
+ };
8638
8665
 
8639
8666
  // src/cli.ts
8640
8667
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/image-convert-cli/latest";
@@ -8682,7 +8709,7 @@ async function handleUpdate(fetchVersion, currentVersion, autoUpdate, promptServ
8682
8709
  const data = await response.json();
8683
8710
  return data.version;
8684
8711
  });
8685
- const version = currentVersion || process.env.npm_package_version || "1.1.0";
8712
+ const version = currentVersion || process.env.npm_package_version || package_default.version;
8686
8713
  try {
8687
8714
  const latestVersion = await fetcher();
8688
8715
  if (latestVersion === version) {
@@ -8711,7 +8738,7 @@ async function runCli(options, promptService) {
8711
8738
  return;
8712
8739
  }
8713
8740
  if (options.version) {
8714
- const version = process.env.npm_package_version || "1.1.0";
8741
+ const version = process.env.npm_package_version || package_default.version;
8715
8742
  console.log(`image-convert-cli v${version}`);
8716
8743
  return;
8717
8744
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "image-convert-cli",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "imgc": "./dist/index.js"
package/src/cli.ts CHANGED
@@ -5,6 +5,7 @@ import { IPromptService, InteractivePromptService } from "./prompts";
5
5
  import { convertImage, displayConversionResult, convertBatch, displayBatchResult } from "./converter";
6
6
  import { getDefaultDestinationPath, isDirectory, getImageFilesFromDirectory } from "./utils/path";
7
7
  import type { BatchConversionSettings } from "./types";
8
+ import packageJson from "../package.json" with { type: "json" };
8
9
 
9
10
  const NPM_REGISTRY_URL = "https://registry.npmjs.org/image-convert-cli/latest";
10
11
 
@@ -68,7 +69,7 @@ export async function handleUpdate(
68
69
  return data.version;
69
70
  });
70
71
 
71
- const version = currentVersion || process.env.npm_package_version || "1.1.0";
72
+ const version = currentVersion || process.env.npm_package_version || packageJson.version;
72
73
 
73
74
  try {
74
75
  const latestVersion = await fetcher();
@@ -106,7 +107,7 @@ export async function runCli(
106
107
  }
107
108
 
108
109
  if (options.version) {
109
- const version = process.env.npm_package_version || "1.1.0";
110
+ const version = process.env.npm_package_version || packageJson.version;
110
111
  console.log(`image-convert-cli v${version}`);
111
112
  return;
112
113
  }