Skip to content

Commit 1a3d0b0

Browse files
committed
New release
1 parent 9f08ffb commit 1a3d0b0

12 files changed

+44846
-37108
lines changed

demo/module-workers-polyfill.min.js

+218-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,218 @@
1-
!function(e){if(!e||!0!==e._$P){if(e){var n,r=Object.defineProperty({},"type",{get:function(){n=!0}});try{var t=URL.createObjectURL(new Blob([""],{type:"text/javascript"}));new e(t,r).terminate(),URL.revokeObjectURL(t)}catch(e){}if(!n)try{new e("data:text/javascript,",r).terminate()}catch(e){}if(n)return;(self.Worker=function(n,r){return r&&"module"==r.type&&(r={name:n+"\n"+(r.name||"")},n="undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||(new Error).stack.match(/[(@]((file|https?):\/\/[^)]+?):\d+(:\d+)?(?:\)|$)/m)[1]),new e(n,r)})._$P=!0}"undefined"==typeof document&&function(){var e={},n={};function r(e,n){for(n=n.replace(/^(\.\.\/|\.\/)/,e.replace(/[^/]+$/g,"")+"$1");n!==(n=n.replace(/[^/]+\/\.\.\//g,"")););return n.replace(/\.\//g,"")}var t=[],s=t.push.bind(t);addEventListener("message",s);var a=self.name.match(/^[^\n]+/)[0];self.name=self.name.replace(/^[^\n]*\n/g,""),function t(s,a){var u,o=s;return a&&(s=r(a,s)),e[s]||(e[s]=fetch(s).then((function(a){if((o=a.url)!==s){if(null!=e[o])return e[o];e[o]=e[s]}return a.text().then((function(e){if(!a.ok)throw e;var c={exports:{}};u=n[o]||(n[o]=c.exports);var i=function(e){return t(e,o)},f=[];return e=function(e,n){n=n||[];var r,t=[],a=0;function u(e,n){for(var s,a=/(?:^|,)\s*([\w$]+)(?:\s+as\s+([\w$]+))?\s*/g,u=[];s=a.exec(e);)n?t.push((s[2]||s[1])+":"+s[1]):u.push((s[2]||s[1])+"="+r+"."+s[1]);return u}return(e=e.replace(/(^\s*|[;}\s\n]\s*)import\s*(?:(?:([\w$]+)(?:\s*\,\s*\{([^}]+)\})?|(?:\*\s*as\s+([\w$]+))|\{([^}]*)\})\s*from)?\s*(['"])(.+?)\6/g,(function(e,t,s,o,c,i,f,p){return n.push(p),t+="var "+(r="$im$"+ ++a)+"=$require("+f+p+f+")",s&&(t+=";var "+s+" = 'default' in "+r+" ? "+r+".default : "+r),c&&(t+=";var "+c+" = "+r),(o=o||i)&&(t+=";var "+u(o,!1)),t})).replace(/((?:^|[;}\s\n])\s*)export\s*(?:\s+(default)\s+|((?:async\s+)?function\s*\*?|class|const\s|let\s|var\s)\s*([a-zA-Z0-9$_{[]+))/g,(function(e,n,r,s,u){if(r){var o="$im$"+ ++a;return t.push("default:"+o),n+"var "+o+"="}return t.push(u+":"+u),n+s+" "+u})).replace(/((?:^|[;}\s\n])\s*)export\s*\{([^}]+)\}\s*;?/g,(function(e,n,r){return u(r,!0),n})).replace(/((?:^|[^a-zA-Z0-9$_@`'".])\s*)(import\s*\([\s\S]+?\))/g,"$1$$$2")).replace(/((?:^|[^a-zA-Z0-9$_@`'".])\s*)import\.meta\.url/g,"$1"+JSON.stringify(s))+"\n$module.exports={"+t.join(",")+"}"}(e,f),Promise.all(f.map((function(e){var s=r(o,e);return s in n?n[s]:t(s)}))).then((function(n){e+="\n//# sourceURL="+s;try{var r=new Function("$import","$require","$module","$exports",e)}catch(n){var t=n.line-1,a=n.column,o=e.split("\n"),p=(o[t-2]||"")+"\n"+o[t-1]+"\n"+(null==a?"":new Array(a).join("-")+"^\n")+(o[t]||""),l=new Error(n.message+"\n\n"+p,s,t);throw l.sourceURL=l.fileName=s,l.line=t,l.column=a,l}var m=r(i,(function(e){return n[f.indexOf(e)]}),c,c.exports);return null!=m&&(c.exports=m),Object.assign(u,c.exports),c.exports}))}))})))}(a).then((function(){removeEventListener("message",s),t.map(dispatchEvent)})).catch((function(e){setTimeout((function(){throw e}))}))}()}}(self.Worker);
1+
!(function (e) {
2+
if (!e || !0 !== e._$P) {
3+
if (e) {
4+
var n,
5+
r = Object.defineProperty({}, 'type', {
6+
get: function () {
7+
n = !0;
8+
},
9+
});
10+
try {
11+
var t = URL.createObjectURL(
12+
new Blob([''], { type: 'text/javascript' }),
13+
);
14+
new e(t, r).terminate(), URL.revokeObjectURL(t);
15+
} catch (e) {}
16+
if (!n)
17+
try {
18+
new e('data:text/javascript,', r).terminate();
19+
} catch (e) {}
20+
if (n) return;
21+
(self.Worker = function (n, r) {
22+
return (
23+
r &&
24+
'module' == r.type &&
25+
((r = { name: n + '\n' + (r.name || '') }),
26+
(n =
27+
'undefined' == typeof document
28+
? location.href
29+
: (document.currentScript && document.currentScript.src) ||
30+
new Error().stack.match(
31+
/[(@]((file|https?):\/\/[^)]+?):\d+(:\d+)?(?:\)|$)/m,
32+
)[1])),
33+
new e(n, r)
34+
);
35+
})._$P = !0;
36+
}
37+
'undefined' == typeof document &&
38+
(function () {
39+
var e = {},
40+
n = {};
41+
function r(e, n) {
42+
for (
43+
n = n.replace(/^(\.\.\/|\.\/)/, e.replace(/[^/]+$/g, '') + '$1');
44+
n !== (n = n.replace(/[^/]+\/\.\.\//g, ''));
45+
46+
);
47+
return n.replace(/\.\//g, '');
48+
}
49+
var t = [],
50+
s = t.push.bind(t);
51+
addEventListener('message', s);
52+
var a = self.name.match(/^[^\n]+/)[0];
53+
(self.name = self.name.replace(/^[^\n]*\n/g, '')),
54+
(function t(s, a) {
55+
var u,
56+
o = s;
57+
return (
58+
a && (s = r(a, s)),
59+
e[s] ||
60+
(e[s] = fetch(s).then(function (a) {
61+
if ((o = a.url) !== s) {
62+
if (null != e[o]) return e[o];
63+
e[o] = e[s];
64+
}
65+
return a.text().then(function (e) {
66+
if (!a.ok) throw e;
67+
var c = { exports: {} };
68+
u = n[o] || (n[o] = c.exports);
69+
var i = function (e) {
70+
return t(e, o);
71+
},
72+
f = [];
73+
return (
74+
(e = (function (e, n) {
75+
n = n || [];
76+
var r,
77+
t = [],
78+
a = 0;
79+
function u(e, n) {
80+
for (
81+
var s,
82+
a = /(?:^|,)\s*([\w$]+)(?:\s+as\s+([\w$]+))?\s*/g,
83+
u = [];
84+
(s = a.exec(e));
85+
86+
)
87+
n
88+
? t.push((s[2] || s[1]) + ':' + s[1])
89+
: u.push((s[2] || s[1]) + '=' + r + '.' + s[1]);
90+
return u;
91+
}
92+
return (
93+
(e = e
94+
.replace(
95+
/(^\s*|[;}\s\n]\s*)import\s*(?:(?:([\w$]+)(?:\s*\,\s*\{([^}]+)\})?|(?:\*\s*as\s+([\w$]+))|\{([^}]*)\})\s*from)?\s*(['"])(.+?)\6/g,
96+
function (e, t, s, o, c, i, f, p) {
97+
return (
98+
n.push(p),
99+
(t +=
100+
'var ' +
101+
(r = '$im$' + ++a) +
102+
'=$require(' +
103+
f +
104+
p +
105+
f +
106+
')'),
107+
s &&
108+
(t +=
109+
';var ' +
110+
s +
111+
" = 'default' in " +
112+
r +
113+
' ? ' +
114+
r +
115+
'.default : ' +
116+
r),
117+
c && (t += ';var ' + c + ' = ' + r),
118+
(o = o || i) && (t += ';var ' + u(o, !1)),
119+
t
120+
);
121+
},
122+
)
123+
.replace(
124+
/((?:^|[;}\s\n])\s*)export\s*(?:\s+(default)\s+|((?:async\s+)?function\s*\*?|class|const\s|let\s|var\s)\s*([a-zA-Z0-9$_{[]+))/g,
125+
function (e, n, r, s, u) {
126+
if (r) {
127+
var o = '$im$' + ++a;
128+
return (
129+
t.push('default:' + o), n + 'var ' + o + '='
130+
);
131+
}
132+
return t.push(u + ':' + u), n + s + ' ' + u;
133+
},
134+
)
135+
.replace(
136+
/((?:^|[;}\s\n])\s*)export\s*\{([^}]+)\}\s*;?/g,
137+
function (e, n, r) {
138+
return u(r, !0), n;
139+
},
140+
)
141+
.replace(
142+
/((?:^|[^a-zA-Z0-9$_@`'".])\s*)(import\s*\([\s\S]+?\))/g,
143+
'$1$$$2',
144+
)).replace(
145+
/((?:^|[^a-zA-Z0-9$_@`'".])\s*)import\.meta\.url/g,
146+
'$1' + JSON.stringify(s),
147+
) +
148+
'\n$module.exports={' +
149+
t.join(',') +
150+
'}'
151+
);
152+
})(e, f)),
153+
Promise.all(
154+
f.map(function (e) {
155+
var s = r(o, e);
156+
return s in n ? n[s] : t(s);
157+
}),
158+
).then(function (n) {
159+
e += '\n//# sourceURL=' + s;
160+
try {
161+
var r = new Function(
162+
'$import',
163+
'$require',
164+
'$module',
165+
'$exports',
166+
e,
167+
);
168+
} catch (n) {
169+
var t = n.line - 1,
170+
a = n.column,
171+
o = e.split('\n'),
172+
p =
173+
(o[t - 2] || '') +
174+
'\n' +
175+
o[t - 1] +
176+
'\n' +
177+
(null == a
178+
? ''
179+
: new Array(a).join('-') + '^\n') +
180+
(o[t] || ''),
181+
l = new Error(n.message + '\n\n' + p, s, t);
182+
throw (
183+
((l.sourceURL = l.fileName = s),
184+
(l.line = t),
185+
(l.column = a),
186+
l)
187+
);
188+
}
189+
var m = r(
190+
i,
191+
function (e) {
192+
return n[f.indexOf(e)];
193+
},
194+
c,
195+
c.exports,
196+
);
197+
return (
198+
null != m && (c.exports = m),
199+
Object.assign(u, c.exports),
200+
c.exports
201+
);
202+
})
203+
);
204+
});
205+
}))
206+
);
207+
})(a)
208+
.then(function () {
209+
removeEventListener('message', s), t.map(dispatchEvent);
210+
})
211+
.catch(function (e) {
212+
setTimeout(function () {
213+
throw e;
214+
});
215+
});
216+
})();
217+
}
218+
})(self.Worker);

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqlite.org/sqlite-wasm",
3-
"version": "3.48.0-build1",
3+
"version": "3.48.0-build2",
44
"description": "SQLite Wasm conveniently wrapped as an ES Module.",
55
"keywords": [
66
"sqlite",

0 commit comments

Comments
 (0)