@saidulbadhon/jssm-cli 1.6.2 → 1.6.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 +40 -12
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -5826,7 +5826,7 @@ ${import_chalk.default.bold("Usage in Docker:")}
|
|
|
5826
5826
|
|
|
5827
5827
|
// src/utils/versionCheck.ts
|
|
5828
5828
|
var PACKAGE_NAME = "@saidulbadhon/jssm-cli";
|
|
5829
|
-
var CURRENT_VERSION = "1.
|
|
5829
|
+
var CURRENT_VERSION = "1.6.4";
|
|
5830
5830
|
async function getLatestVersion() {
|
|
5831
5831
|
try {
|
|
5832
5832
|
const response = await fetch(`https://registry.npmjs.org/${PACKAGE_NAME}`);
|
|
@@ -5853,7 +5853,15 @@ function isOlderVersion(version1, version2) {
|
|
|
5853
5853
|
return false;
|
|
5854
5854
|
}
|
|
5855
5855
|
async function checkVersion(currentCommand) {
|
|
5856
|
-
const skipCommands = [
|
|
5856
|
+
const skipCommands = [
|
|
5857
|
+
"help",
|
|
5858
|
+
"--help",
|
|
5859
|
+
"-h",
|
|
5860
|
+
"--version",
|
|
5861
|
+
"-v",
|
|
5862
|
+
"version",
|
|
5863
|
+
void 0
|
|
5864
|
+
];
|
|
5857
5865
|
if (skipCommands.includes(currentCommand)) {
|
|
5858
5866
|
return true;
|
|
5859
5867
|
}
|
|
@@ -5866,17 +5874,35 @@ async function checkVersion(currentCommand) {
|
|
|
5866
5874
|
return true;
|
|
5867
5875
|
}
|
|
5868
5876
|
console.log("");
|
|
5869
|
-
console.log(
|
|
5870
|
-
|
|
5871
|
-
|
|
5877
|
+
console.log(
|
|
5878
|
+
"\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"
|
|
5879
|
+
);
|
|
5880
|
+
console.log(
|
|
5881
|
+
"\u2551 \u26A0\uFE0F UPDATE REQUIRED \u2551"
|
|
5882
|
+
);
|
|
5883
|
+
console.log(
|
|
5884
|
+
"\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"
|
|
5885
|
+
);
|
|
5872
5886
|
console.log(`\u2551 Current version: ${CURRENT_VERSION.padEnd(40)}\u2551`);
|
|
5873
5887
|
console.log(`\u2551 Latest version: ${latestVersion.padEnd(40)}\u2551`);
|
|
5874
|
-
console.log(
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
console.log(
|
|
5878
|
-
|
|
5879
|
-
|
|
5888
|
+
console.log(
|
|
5889
|
+
"\u2551 \u2551"
|
|
5890
|
+
);
|
|
5891
|
+
console.log(
|
|
5892
|
+
"\u2551 A new version of JSSM CLI is available! \u2551"
|
|
5893
|
+
);
|
|
5894
|
+
console.log(
|
|
5895
|
+
"\u2551 Please update to continue using the CLI. \u2551"
|
|
5896
|
+
);
|
|
5897
|
+
console.log(
|
|
5898
|
+
"\u2551 \u2551"
|
|
5899
|
+
);
|
|
5900
|
+
console.log(
|
|
5901
|
+
"\u2551 Run: npm install -g @saidulbadhon/jssm-cli@latest \u2551"
|
|
5902
|
+
);
|
|
5903
|
+
console.log(
|
|
5904
|
+
"\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"
|
|
5905
|
+
);
|
|
5880
5906
|
console.log("");
|
|
5881
5907
|
const shouldUpdate = await dist_default3({
|
|
5882
5908
|
message: "Do you want to update now?",
|
|
@@ -5892,7 +5918,9 @@ async function checkVersion(currentCommand) {
|
|
|
5892
5918
|
console.log("");
|
|
5893
5919
|
process.exit(0);
|
|
5894
5920
|
} else {
|
|
5895
|
-
console.log(
|
|
5921
|
+
console.log(
|
|
5922
|
+
"\n\u274C Update required to continue. Please update and try again.\n"
|
|
5923
|
+
);
|
|
5896
5924
|
process.exit(1);
|
|
5897
5925
|
}
|
|
5898
5926
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saidulbadhon/jssm-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CLI for JSSM - Simple environment variable manager",
|
|
6
6
|
"author": "Saidul Badhon",
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"dev": "bun src/index.ts",
|
|
32
|
-
"
|
|
33
|
-
"build
|
|
32
|
+
"sync-version": "node scripts/sync-version.js",
|
|
33
|
+
"build": "npm run sync-version && bun build src/index.ts --outdir dist --target bun --format esm && chmod +x dist/index.js",
|
|
34
|
+
"build:node": "npm run sync-version && npx esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:os --external:path --external:fs --external:crypto --external:child_process && chmod +x dist/index.js",
|
|
34
35
|
"type-check": "tsc --noEmit",
|
|
35
36
|
"prepublishOnly": "npm run build:node",
|
|
36
37
|
"publish": "npm publish --access public"
|