@konplit-services/common 1.0.234 → 1.0.236

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.
@@ -27,8 +27,8 @@ exports.generateOpaySign = exports.generateTransactionID = exports.generateBase6
27
27
  const crypto = __importStar(require("crypto"));
28
28
  const forge = __importStar(require("node-forge"));
29
29
  const timestamp_1 = require("./timestamp");
30
- const util_1 = require("../util");
31
30
  const app_configs_1 = require("../app.configs");
31
+ const nanoid_1 = require("nanoid");
32
32
  /**
33
33
  * Hashing a secret using sha256
34
34
  * @param secret - the secret to hash
@@ -149,8 +149,8 @@ exports.authData = authData;
149
149
  */
150
150
  const generateOrderId = () => {
151
151
  const yyyymm = (0, timestamp_1.getYearMonth)();
152
- const id = (0, util_1.uniqueId)("abcdefkpvlxnm0123456789", 22); //by defaul vp is added making it 30
153
- return `${yyyymm}${id}`;
152
+ const nanoid = (0, nanoid_1.customAlphabet)("0123456789", 24);
153
+ return `${yyyymm}${nanoid()}`;
154
154
  };
155
155
  exports.generateOrderId = generateOrderId;
156
156
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.234",
3
+ "version": "1.0.236",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",