jwtmoshiur 1.0.0 → 1.0.1

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/bin/cli.js +9 -5
  2. package/package.json +2 -1
package/bin/cli.js CHANGED
@@ -1,6 +1,10 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
- const { initializeJwtMoshiur } = require('../dist/setup');
4
-
5
- console.log(' Initializing JWT Moshiur...');
6
- initializeJwtMoshiur();
3
+ try {
4
+ const { initializeJwtMoshiur } = require('../dist/setup');
5
+ console.log('\n 🔐 Initializing JWT Moshiur...\n');
6
+ initializeJwtMoshiur();
7
+ } catch (error) {
8
+ console.error(' Error during setup:', error.message);
9
+ process.exit(0); // Don't fail npm install if setup fails
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jwtmoshiur",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "JWT auto-setup package with token generation and verification",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "tsc",
12
+ "setup": "node bin/cli.js",
12
13
  "prepublishOnly": "npm run build",
13
14
  "postinstall": "node bin/cli.js"
14
15
  },