unictive-angular 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.
Files changed (2) hide show
  1. package/index.js +4 -3
  2. package/package.json +2 -3
package/index.js CHANGED
@@ -21,7 +21,7 @@ const { copy_template } = require('./bin/utils/createStructure');
21
21
  const chalk = require('chalk');
22
22
 
23
23
 
24
- require('@dotenvx/dotenvx').config({ path: path.resolve(__dirname, ".env"), silent: true });
24
+ require('@dotenvx/dotenvx').config({ path: path.resolve(__dirname, ".env"), quiet: true });
25
25
 
26
26
  const { login, logout } = require("./bin/utils/auth");
27
27
  const { update_package_json } = require("./bin/utils/updatePackageJson");
@@ -35,8 +35,8 @@ const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "./package.json"), "
35
35
  // ===================== Cek Versi via npm view =====================
36
36
  function check_latest_version() {
37
37
  try {
38
- const latest = execSync(`npm view ${pkg.name} version`, { stdio: "pipe" }).toString().trim();
39
- return latest;
38
+ const latest = execSync(`npm view ${pkg.name} version`, { stdio: "pipe", timeout: 10000 }).toString().trim();
39
+ return /^\d+\.\d+\.\d+/.test(latest) ? latest : null;
40
40
  } catch {
41
41
  return null; // Gagal cek (offline/error), izinkan lanjut
42
42
  }
@@ -47,6 +47,7 @@ function compare_versions(current, latest) {
47
47
  const b = latest.split(".").map(Number);
48
48
  for (let i = 0; i < 3; i++) {
49
49
  if ((b[i] || 0) > (a[i] || 0)) return true;
50
+ if ((b[i] || 0) < (a[i] || 0)) return false;
50
51
  }
51
52
  return false;
52
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unictive-angular",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "CLI untuk membuat project Angular dengan struktur kustom (Modules, Core, API, Shared).",
5
5
  "scripts": {
6
6
  "build": "npm version patch && npm publish --access public"
@@ -18,7 +18,6 @@
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
20
  "@dotenvx/dotenvx": "^1.49.0",
21
- "chalk": "^4.1.2",
22
- "update-notifier": "^5.1.0"
21
+ "chalk": "^4.1.2"
23
22
  }
24
23
  }