@php-wasm/progress 0.3.1 → 0.4.3
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/index.cjs +1 -1
- package/index.js +148 -123
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var P=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var l=(i,e,t)=>(P(i,e,"read from private field"),t?t.call(i):e.get(i)),d=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},_=(i,e,t,s)=>(P(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t);var L=(i,e,t,s)=>({set _(n){_(i,e,n,t)},get _(){return l(i,e,s)}}),g=(i,e,t)=>(P(i,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=5*1024*1024;var f,p,y,M,w,C,m,E;class k extends EventTarget{constructor(t=[]){super();d(this,y);d(this,w);d(this,m);d(this,f,{});d(this,p,{});this.setModules(t),g(this,y,M).call(this)}getEmscriptenOptions(){return{dataFileDownloads:g(this,w,C).call(this)}}setModules(t){_(this,f,t.reduce((s,n)=>{if(n.dependenciesTotalSize>0){const r="http://example.com/",o=new URL(n.dependencyFilename,r).pathname.split("/").pop();s[o]=Math.max(o in s?s[o]:0,n.dependenciesTotalSize)}return s},{})),_(this,p,Object.fromEntries(Object.entries(l(this,f)).map(([s])=>[s,0])))}}f=new WeakMap,p=new WeakMap,y=new WeakSet,M=function(){const t=WebAssembly.instantiateStreaming;WebAssembly.instantiateStreaming=async(s,...n)=>{const r=await s,a=r.url.substring(new URL(r.url).origin.length+1),o=x(r,({detail:{loaded:h,total:u}})=>g(this,m,E).call(this,a,h,u));return t(o,...n)}},w=new WeakSet,C=function(){const t=this,s={};return new Proxy(s,{set(n,r,a){var o;return g(o=t,m,E).call(o,r,a.loaded,a.total),n[r]=new Proxy(JSON.parse(JSON.stringify(a)),{set(h,u,D){var O;return h[u]=D,g(O=t,m,E).call(O,r,h.loaded,h.total),!0}}),!0}})},m=new WeakSet,E=function(t,s,n){const r=new URL(t,"http://example.com").pathname.split("/").pop();n||(n=l(this,f)[r]),r in l(this,p)||console.warn(`Registered a download #progress of an unregistered file "${r}". This may cause a sudden **decrease** in the #progress percentage as the total number of bytes increases during the download.`),l(this,p)[r]=s,this.dispatchEvent(new CustomEvent("progress",{detail:{loaded:R(l(this,p)),total:R(l(this,f))}}))};function R(i){return Object.values(i).reduce((e,t)=>e+t,0)}function x(i,e){const t=i.headers.get("content-length")||"",s=parseInt(t,10)||F;function n(r,a){e(new CustomEvent("progress",{detail:{loaded:r,total:a}}))}return new Response(new ReadableStream({async start(r){if(!i.body){r.close();return}const a=i.body.getReader();let o=0;for(;;)try{const{done:h,value:u}=await a.read();if(u&&(o+=u.byteLength),h){n(o,o),r.close();break}else n(o,s),r.enqueue(u)}catch(h){console.error({e:h}),r.error(h);break}}}),{status:i.status,statusText:i.statusText,headers:i.headers})}var c,v,b,I;class W extends EventTarget{constructor(){super(...arguments);d(this,b);d(this,c,void 0);d(this,v,void 0);_(this,c,{}),_(this,v,0),this.progress=0,this.mode="REAL_TIME",this.caption=""}partialObserver(t,s=""){const n=++L(this,v)._;return l(this,c)[n]=0,r=>{const{loaded:a,total:o}=(r==null?void 0:r.detail)||{};l(this,c)[n]=a/o*t,g(this,b,I).call(this,this.totalProgress,"REAL_TIME",s)}}slowlyIncrementBy(t){const s=++L(this,v)._;l(this,c)[s]=t,g(this,b,I).call(this,this.totalProgress,"SLOWLY_INCREMENT")}get totalProgress(){return Object.values(l(this,c)).reduce((t,s)=>t+s,0)}}c=new WeakMap,v=new WeakMap,b=new WeakSet,I=function(t,s,n){this.dispatchEvent(new CustomEvent("progress",{detail:{progress:t,mode:s,caption:n}}))};const T=1e-5;class S extends EventTarget{constructor({weight:e=1,caption:t="",fillTime:s=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=e,this._selfCaption=t,this._fillTime=s}stage(e,t=""){if(e||(e=this._selfWeight),this._selfWeight-e<-T)throw new Error(`Cannot add a stage with weight ${e} as the total weight of registered stages would exceed 1.`);this._selfWeight-=e;const s=new S({caption:t,weight:e,fillTime:this._fillTime});return this._subTrackers.push(s),s.addEventListener("progress",()=>this.notifyProgress()),s.addEventListener("done",()=>{this.done&&this.notifyDone()}),s}fillSlowly({stopBeforeFinishing:e=!0}={}){if(this._isFilling)return;this._isFilling=!0;const t=100,s=this._fillTime/t;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),e&&this._selfProgress>=99&&clearInterval(this._fillInterval)},s)}set(e){this._selfProgress=Math.min(e,100),this.notifyProgress(),this._selfProgress+T>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let e=this._subTrackers.length-1;e>=0;e--)if(!this._subTrackers[e].done){const t=this._subTrackers[e].caption;if(t)return t}return this._selfCaption}setCaption(e){this._selfCaption=e,this.notifyProgress()}get done(){return this.progress+T>=100}get progress(){if(this._selfDone)return 100;const e=this._subTrackers.reduce((t,s)=>t+s.progress*s.weight,this._selfProgress*this._selfWeight);return Math.round(e*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=e=>{this.set(e)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=e=>{this.set(e.detail.loaded/e.detail.total*100)}),this._loadingListener}pipe(e){e.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",t=>{e.setProgress({progress:t.detail.progress,caption:t.detail.caption})}),this.addEventListener("done",()=>{e.setLoaded()})}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}notifyProgress(){const e=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return e.progress},get caption(){return e.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}exports.EmscriptenDownloadMonitor=k;exports.ProgressObserver=W;exports.ProgressTracker=S;exports.cloneResponseMonitorProgress=x;
|
package/index.js
CHANGED
|
@@ -1,93 +1,115 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var L = (i, e, t) => {
|
|
2
|
+
if (!e.has(i))
|
|
3
|
+
throw TypeError("Cannot " + t);
|
|
4
|
+
};
|
|
5
|
+
var l = (i, e, t) => (L(i, e, "read from private field"), t ? t.call(i) : e.get(i)), d = (i, e, t) => {
|
|
6
|
+
if (e.has(i))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
9
|
+
}, _ = (i, e, t, s) => (L(i, e, "write to private field"), s ? s.call(i, t) : e.set(i, t), t);
|
|
10
|
+
var P = (i, e, t, s) => ({
|
|
11
|
+
set _(n) {
|
|
12
|
+
_(i, e, n, t);
|
|
13
|
+
},
|
|
14
|
+
get _() {
|
|
15
|
+
return l(i, e, s);
|
|
16
|
+
}
|
|
17
|
+
}), g = (i, e, t) => (L(i, e, "access private method"), t);
|
|
18
|
+
var f, p, y, O, w, R, m, b;
|
|
19
|
+
class A extends EventTarget {
|
|
20
|
+
constructor(t = []) {
|
|
21
|
+
super();
|
|
22
|
+
/**
|
|
23
|
+
* Replaces the default WebAssembly.instantiateStreaming with a version
|
|
24
|
+
* that monitors the download #progress.
|
|
25
|
+
*/
|
|
26
|
+
d(this, y);
|
|
27
|
+
/**
|
|
28
|
+
* Creates a `dataFileDownloads` Proxy object that can be passed
|
|
29
|
+
* to `startPHP` to monitor the download #progress of the data
|
|
30
|
+
* dependencies.
|
|
31
|
+
*/
|
|
32
|
+
d(this, w);
|
|
33
|
+
/**
|
|
34
|
+
* Notifies about the download #progress of a file.
|
|
35
|
+
*
|
|
36
|
+
* @param file The file name.
|
|
37
|
+
* @param loaded The number of bytes of that file loaded so far.
|
|
38
|
+
* @param fileSize The total number of bytes in the loaded file.
|
|
39
|
+
*/
|
|
40
|
+
d(this, m);
|
|
41
|
+
d(this, f, {});
|
|
42
|
+
d(this, p, {});
|
|
43
|
+
this.setModules(t), g(this, y, O).call(this);
|
|
6
44
|
}
|
|
7
45
|
getEmscriptenOptions() {
|
|
8
46
|
return {
|
|
9
|
-
dataFileDownloads: this
|
|
47
|
+
dataFileDownloads: g(this, w, R).call(this)
|
|
10
48
|
};
|
|
11
49
|
}
|
|
12
|
-
setModules(
|
|
13
|
-
this
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
50
|
+
setModules(t) {
|
|
51
|
+
_(this, f, t.reduce((s, n) => {
|
|
52
|
+
if (n.dependenciesTotalSize > 0) {
|
|
53
|
+
const r = "http://example.com/", o = new URL(n.dependencyFilename, r).pathname.split("/").pop();
|
|
54
|
+
s[o] = Math.max(
|
|
55
|
+
o in s ? s[o] : 0,
|
|
56
|
+
n.dependenciesTotalSize
|
|
19
57
|
);
|
|
20
58
|
}
|
|
21
|
-
return
|
|
22
|
-
}, {}), this
|
|
23
|
-
Object.entries(this
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Replaces the default WebAssembly.instantiateStreaming with a version
|
|
28
|
-
* that monitors the download #progress.
|
|
29
|
-
*/
|
|
30
|
-
#s() {
|
|
31
|
-
const e = WebAssembly.instantiateStreaming;
|
|
32
|
-
WebAssembly.instantiateStreaming = async (t, ...s) => {
|
|
33
|
-
const i = await t, r = i.url.substring(
|
|
34
|
-
new URL(i.url).origin.length + 1
|
|
35
|
-
), n = c(
|
|
36
|
-
i,
|
|
37
|
-
({ detail: { loaded: a, total: l } }) => this.#i(r, a, l)
|
|
38
|
-
);
|
|
39
|
-
return e(n, ...s);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Creates a `dataFileDownloads` Proxy object that can be passed
|
|
44
|
-
* to `startPHP` to monitor the download #progress of the data
|
|
45
|
-
* dependencies.
|
|
46
|
-
*/
|
|
47
|
-
#r() {
|
|
48
|
-
const e = this, t = {};
|
|
49
|
-
return new Proxy(t, {
|
|
50
|
-
set(s, i, r) {
|
|
51
|
-
return e.#i(i, r.loaded, r.total), s[i] = new Proxy(JSON.parse(JSON.stringify(r)), {
|
|
52
|
-
set(n, a, l) {
|
|
53
|
-
return n[a] = l, e.#i(i, n.loaded, n.total), !0;
|
|
54
|
-
}
|
|
55
|
-
}), !0;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Notifies about the download #progress of a file.
|
|
61
|
-
*
|
|
62
|
-
* @param file The file name.
|
|
63
|
-
* @param loaded The number of bytes of that file loaded so far.
|
|
64
|
-
* @param fileSize The total number of bytes in the loaded file.
|
|
65
|
-
*/
|
|
66
|
-
#i(e, t, s) {
|
|
67
|
-
const i = new URL(e, "http://example.com").pathname.split("/").pop();
|
|
68
|
-
s || (s = this.#e[i]), i in this.#t || console.warn(
|
|
69
|
-
`Registered a download #progress of an unregistered file "${i}". This may cause a sudden **decrease** in the #progress percentage as the total number of bytes increases during the download.`
|
|
70
|
-
), this.#t[i] = t, this.dispatchEvent(
|
|
71
|
-
new CustomEvent("progress", {
|
|
72
|
-
detail: {
|
|
73
|
-
loaded: g(this.#t),
|
|
74
|
-
total: g(this.#e)
|
|
75
|
-
}
|
|
76
|
-
})
|
|
77
|
-
);
|
|
59
|
+
return s;
|
|
60
|
+
}, {})), _(this, p, Object.fromEntries(
|
|
61
|
+
Object.entries(l(this, f)).map(([s]) => [s, 0])
|
|
62
|
+
));
|
|
78
63
|
}
|
|
79
64
|
}
|
|
80
|
-
|
|
81
|
-
|
|
65
|
+
f = new WeakMap(), p = new WeakMap(), y = new WeakSet(), O = function() {
|
|
66
|
+
const t = WebAssembly.instantiateStreaming;
|
|
67
|
+
WebAssembly.instantiateStreaming = async (s, ...n) => {
|
|
68
|
+
const r = await s, a = r.url.substring(
|
|
69
|
+
new URL(r.url).origin.length + 1
|
|
70
|
+
), o = D(
|
|
71
|
+
r,
|
|
72
|
+
({ detail: { loaded: h, total: c } }) => g(this, m, b).call(this, a, h, c)
|
|
73
|
+
);
|
|
74
|
+
return t(o, ...n);
|
|
75
|
+
};
|
|
76
|
+
}, w = new WeakSet(), R = function() {
|
|
77
|
+
const t = this, s = {};
|
|
78
|
+
return new Proxy(s, {
|
|
79
|
+
set(n, r, a) {
|
|
80
|
+
var o;
|
|
81
|
+
return g(o = t, m, b).call(o, r, a.loaded, a.total), n[r] = new Proxy(JSON.parse(JSON.stringify(a)), {
|
|
82
|
+
set(h, c, F) {
|
|
83
|
+
var S;
|
|
84
|
+
return h[c] = F, g(S = t, m, b).call(S, r, h.loaded, h.total), !0;
|
|
85
|
+
}
|
|
86
|
+
}), !0;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}, m = new WeakSet(), b = function(t, s, n) {
|
|
90
|
+
const r = new URL(t, "http://example.com").pathname.split("/").pop();
|
|
91
|
+
n || (n = l(this, f)[r]), r in l(this, p) || console.warn(
|
|
92
|
+
`Registered a download #progress of an unregistered file "${r}". This may cause a sudden **decrease** in the #progress percentage as the total number of bytes increases during the download.`
|
|
93
|
+
), l(this, p)[r] = s, this.dispatchEvent(
|
|
94
|
+
new CustomEvent("progress", {
|
|
95
|
+
detail: {
|
|
96
|
+
loaded: C(l(this, p)),
|
|
97
|
+
total: C(l(this, f))
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
function C(i) {
|
|
103
|
+
return Object.values(i).reduce((e, t) => e + t, 0);
|
|
82
104
|
}
|
|
83
|
-
function
|
|
84
|
-
const t =
|
|
85
|
-
function
|
|
105
|
+
function D(i, e) {
|
|
106
|
+
const t = i.headers.get("content-length") || "", s = parseInt(t, 10) || 5242880;
|
|
107
|
+
function n(r, a) {
|
|
86
108
|
e(
|
|
87
109
|
new CustomEvent("progress", {
|
|
88
110
|
detail: {
|
|
89
111
|
loaded: r,
|
|
90
|
-
total:
|
|
112
|
+
total: a
|
|
91
113
|
}
|
|
92
114
|
})
|
|
93
115
|
);
|
|
@@ -95,70 +117,73 @@ function c(o, e) {
|
|
|
95
117
|
return new Response(
|
|
96
118
|
new ReadableStream({
|
|
97
119
|
async start(r) {
|
|
98
|
-
if (!
|
|
120
|
+
if (!i.body) {
|
|
99
121
|
r.close();
|
|
100
122
|
return;
|
|
101
123
|
}
|
|
102
|
-
const
|
|
103
|
-
let
|
|
124
|
+
const a = i.body.getReader();
|
|
125
|
+
let o = 0;
|
|
104
126
|
for (; ; )
|
|
105
127
|
try {
|
|
106
|
-
const { done:
|
|
107
|
-
if (
|
|
108
|
-
|
|
128
|
+
const { done: h, value: c } = await a.read();
|
|
129
|
+
if (c && (o += c.byteLength), h) {
|
|
130
|
+
n(o, o), r.close();
|
|
109
131
|
break;
|
|
110
132
|
} else
|
|
111
|
-
|
|
112
|
-
} catch (
|
|
113
|
-
console.error({ e:
|
|
133
|
+
n(o, s), r.enqueue(c);
|
|
134
|
+
} catch (h) {
|
|
135
|
+
console.error({ e: h }), r.error(h);
|
|
114
136
|
break;
|
|
115
137
|
}
|
|
116
138
|
}
|
|
117
139
|
}),
|
|
118
140
|
{
|
|
119
|
-
status:
|
|
120
|
-
statusText:
|
|
121
|
-
headers:
|
|
141
|
+
status: i.status,
|
|
142
|
+
statusText: i.statusText,
|
|
143
|
+
headers: i.headers
|
|
122
144
|
}
|
|
123
145
|
);
|
|
124
146
|
}
|
|
125
|
-
|
|
147
|
+
var u, v, E, I;
|
|
148
|
+
class W extends EventTarget {
|
|
126
149
|
constructor() {
|
|
127
|
-
super(...arguments)
|
|
150
|
+
super(...arguments);
|
|
151
|
+
d(this, E);
|
|
152
|
+
d(this, u, void 0);
|
|
153
|
+
d(this, v, void 0);
|
|
154
|
+
_(this, u, {}), _(this, v, 0), this.progress = 0, this.mode = "REAL_TIME", this.caption = "";
|
|
128
155
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const { loaded: r, total: n } = i?.detail || {};
|
|
135
|
-
this.#e[s] = r / n * e, this.#s(this.totalProgress, "REAL_TIME", t);
|
|
156
|
+
partialObserver(t, s = "") {
|
|
157
|
+
const n = ++P(this, v)._;
|
|
158
|
+
return l(this, u)[n] = 0, (r) => {
|
|
159
|
+
const { loaded: a, total: o } = (r == null ? void 0 : r.detail) || {};
|
|
160
|
+
l(this, u)[n] = a / o * t, g(this, E, I).call(this, this.totalProgress, "REAL_TIME", s);
|
|
136
161
|
};
|
|
137
162
|
}
|
|
138
|
-
slowlyIncrementBy(
|
|
139
|
-
const
|
|
140
|
-
this
|
|
163
|
+
slowlyIncrementBy(t) {
|
|
164
|
+
const s = ++P(this, v)._;
|
|
165
|
+
l(this, u)[s] = t, g(this, E, I).call(this, this.totalProgress, "SLOWLY_INCREMENT");
|
|
141
166
|
}
|
|
142
167
|
get totalProgress() {
|
|
143
|
-
return Object.values(this
|
|
144
|
-
(
|
|
168
|
+
return Object.values(l(this, u)).reduce(
|
|
169
|
+
(t, s) => t + s,
|
|
145
170
|
0
|
|
146
171
|
);
|
|
147
172
|
}
|
|
148
|
-
#s(e, t, s) {
|
|
149
|
-
this.dispatchEvent(
|
|
150
|
-
new CustomEvent("progress", {
|
|
151
|
-
detail: {
|
|
152
|
-
progress: e,
|
|
153
|
-
mode: t,
|
|
154
|
-
caption: s
|
|
155
|
-
}
|
|
156
|
-
})
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
173
|
}
|
|
160
|
-
|
|
161
|
-
|
|
174
|
+
u = new WeakMap(), v = new WeakMap(), E = new WeakSet(), I = function(t, s, n) {
|
|
175
|
+
this.dispatchEvent(
|
|
176
|
+
new CustomEvent("progress", {
|
|
177
|
+
detail: {
|
|
178
|
+
progress: t,
|
|
179
|
+
mode: s,
|
|
180
|
+
caption: n
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
const T = 1e-5;
|
|
186
|
+
class x extends EventTarget {
|
|
162
187
|
constructor({
|
|
163
188
|
weight: e = 1,
|
|
164
189
|
caption: t = "",
|
|
@@ -202,12 +227,12 @@ class u extends EventTarget {
|
|
|
202
227
|
* ```
|
|
203
228
|
*/
|
|
204
229
|
stage(e, t = "") {
|
|
205
|
-
if (e || (e = this._selfWeight), this._selfWeight - e < -
|
|
230
|
+
if (e || (e = this._selfWeight), this._selfWeight - e < -T)
|
|
206
231
|
throw new Error(
|
|
207
232
|
`Cannot add a stage with weight ${e} as the total weight of registered stages would exceed 1.`
|
|
208
233
|
);
|
|
209
234
|
this._selfWeight -= e;
|
|
210
|
-
const s = new
|
|
235
|
+
const s = new x({
|
|
211
236
|
caption: t,
|
|
212
237
|
weight: e,
|
|
213
238
|
fillTime: this._fillTime
|
|
@@ -244,7 +269,7 @@ class u extends EventTarget {
|
|
|
244
269
|
}, s);
|
|
245
270
|
}
|
|
246
271
|
set(e) {
|
|
247
|
-
this._selfProgress = Math.min(e, 100), this.notifyProgress(), this._selfProgress +
|
|
272
|
+
this._selfProgress = Math.min(e, 100), this.notifyProgress(), this._selfProgress + T >= 100 && this.finish();
|
|
248
273
|
}
|
|
249
274
|
finish() {
|
|
250
275
|
this._fillInterval && clearInterval(this._fillInterval), this._selfDone = !0, this._selfProgress = 100, this._isFilling = !1, this._fillInterval = void 0, this.notifyProgress(), this.notifyDone();
|
|
@@ -262,7 +287,7 @@ class u extends EventTarget {
|
|
|
262
287
|
this._selfCaption = e, this.notifyProgress();
|
|
263
288
|
}
|
|
264
289
|
get done() {
|
|
265
|
-
return this.progress +
|
|
290
|
+
return this.progress + T >= 100;
|
|
266
291
|
}
|
|
267
292
|
get progress() {
|
|
268
293
|
if (this._selfDone)
|
|
@@ -325,8 +350,8 @@ class u extends EventTarget {
|
|
|
325
350
|
}
|
|
326
351
|
}
|
|
327
352
|
export {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
353
|
+
A as EmscriptenDownloadMonitor,
|
|
354
|
+
W as ProgressObserver,
|
|
355
|
+
x as ProgressTracker,
|
|
356
|
+
D as cloneResponseMonitorProgress
|
|
332
357
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/progress",
|
|
3
|
-
"version": "0.3
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "PHP.wasm – loading progress monitoring",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"type": "module",
|
|
30
30
|
"main": "index.js",
|
|
31
31
|
"types": "index.d.ts",
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "0fd1fdb7375443821b57aad84884b5bc5dca9815",
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=16.15.1",
|
|
35
35
|
"npm": ">=8.11.0"
|