@fnlb-project/shared 1.5.0 → 1.5.2
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/util/index.js +1 -1
- package/package.json +3 -3
package/dist/util/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
class s{static encodeToken(
|
|
1
|
+
class s{static encodeToken(n,r){let t=Buffer.from(n,"hex"),e=Buffer.from(r,"hex"),i=Buffer.from([t.length]);return Buffer.concat([new Uint8Array(i),new Uint8Array(t),new Uint8Array(e)]).toString("base64url")}static decodeToken(n){let r=Buffer.from(n,"base64url"),t=r[0];if(!t||t>=r.length)return null;let e=r.subarray(1,1+t).toString("hex"),i=r.subarray(1+t).toString("hex");return{id:e,auth:i}}}class o{static wait(n){return new Promise((r)=>setTimeout(r,n))}}class a{static cutText(n,r,t=!0){return n.length>r?`${n.slice(0,t?Math.max(r-3,0):r)}${t?"...":""}`:n}}export{a as TextUtil,o as PromiseUtil,s as AuthUtil};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fnlb-project/shared",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "FNLB Shared Library",
|
|
5
5
|
"files": ["dist"],
|
|
6
6
|
"author": "FNLB-Project",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"default": "./dist/types/index.js"
|
|
29
29
|
},
|
|
30
30
|
"./validator": {
|
|
31
|
-
"types": "./dist/
|
|
32
|
-
"default": "./dist/
|
|
31
|
+
"types": "./dist/validator/index.d.ts",
|
|
32
|
+
"default": "./dist/validator/index.js"
|
|
33
33
|
},
|
|
34
34
|
"./util": {
|
|
35
35
|
"types": "./dist/util/index.d.ts",
|