@argent/x-shared 1.78.9 → 1.78.11
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.
|
@@ -569,7 +569,7 @@ function we(O) {
|
|
|
569
569
|
return t === null ? s ? (r = "Infinity", s < 0 && (r = "-" + r)) : r = "NaN" : (e == null ? r = t <= C || t >= k ? ne(q(i.c), t) : W(q(i.c), t, "0") : e === 10 && fe ? (i = G(new h(i), x + t + 1, S), r = W(q(i.c), i.e, "0")) : (v(e, 2, K.length, "Base"), r = _(W(q(i.c), t, "0"), 10, e, s, !0)), s < 0 && i.c[0] && (r = "-" + r)), r;
|
|
570
570
|
}, g.valueOf = g.toJSON = function() {
|
|
571
571
|
return V(this);
|
|
572
|
-
}, g._isBigNumber = !0, g[Symbol.toStringTag] = "BigNumber", g[Symbol.for("nodejs.util.inspect.custom")] = g.valueOf, O != null && h.set(O), h;
|
|
572
|
+
}, g._isBigNumber = !0, g[Symbol.toStringTag] = "BigNumber", g[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = g.valueOf, O != null && h.set(O), h;
|
|
573
573
|
}
|
|
574
574
|
function $(O) {
|
|
575
575
|
var E = O | 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(t,e){this.httpService=t,this.baseUrl=e,this.offsetInS=0,this.syncIntervalInMs=60*1e3,this.initialSync=this.syncWithServer(),setInterval(()=>
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(t,e){this.httpService=t,this.baseUrl=e,this.offsetInS=0,this.syncIntervalInMs=60*1e3,this.initialSync=this.syncWithServer(),setInterval(()=>{this.syncWithServer()},this.syncIntervalInMs)}async now(){return await this.initialSync,new Date(Date.now()+this.offsetInS*1e3)}async syncWithServer(){if(typeof window>"u")return;const{time:t}=await this.httpService.get(`${this.baseUrl}/time`),e=Math.floor(Date.now()/1e3),i=t-e;this.offsetInS=i}}exports.DateService=s;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
class n {
|
|
2
2
|
constructor(t, e) {
|
|
3
|
-
this.httpService = t, this.baseUrl = e, this.offsetInS = 0, this.syncIntervalInMs = 60 * 1e3, this.initialSync = this.syncWithServer(), setInterval(() =>
|
|
3
|
+
this.httpService = t, this.baseUrl = e, this.offsetInS = 0, this.syncIntervalInMs = 60 * 1e3, this.initialSync = this.syncWithServer(), setInterval(() => {
|
|
4
|
+
this.syncWithServer();
|
|
5
|
+
}, this.syncIntervalInMs);
|
|
4
6
|
}
|
|
5
7
|
async now() {
|
|
6
8
|
return await this.initialSync, new Date(Date.now() + this.offsetInS * 1e3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argent/x-shared",
|
|
3
|
-
"version": "1.78.
|
|
3
|
+
"version": "1.78.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/argentlabs/x-shared.git"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"ts-to-zod": "5.1.0",
|
|
81
81
|
"tsx": "4.21.0",
|
|
82
82
|
"typescript": "5.9.3",
|
|
83
|
-
"vite": "7.
|
|
83
|
+
"vite": "7.3.0",
|
|
84
84
|
"vite-plugin-dts": "4.5.4",
|
|
85
85
|
"vitest": "4.0.15"
|
|
86
86
|
},
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"lodash-es": "^4.17.21",
|
|
112
112
|
"ua-parser-js": "^1.0.38 || ^2.0.0",
|
|
113
113
|
"url-join": "^5.0.0",
|
|
114
|
-
"zod": "4.
|
|
114
|
+
"zod": "4.2.0"
|
|
115
115
|
},
|
|
116
116
|
"lint-staged": {
|
|
117
117
|
"*": "prettier --ignore-unknown --write",
|