@vleap/warps 3.0.0-alpha.32 → 3.0.0-alpha.34
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/chunk-3SAEGOMQ.mjs +1 -0
- package/dist/index.d.mts +603 -41
- package/dist/index.d.ts +603 -41
- package/dist/index.js +12 -65
- package/dist/index.mjs +2 -65
- package/dist/runInVm-5YQ766M3.mjs +11 -0
- package/dist/runInVm-BFUZVHHD.mjs +1 -0
- package/package.json +4 -8
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import"./chunk-3SAEGOMQ.mjs";var u=async(a,n)=>new Promise((c,t)=>{try{let o=new Blob([`
|
|
2
|
+
self.onmessage = function(e) {
|
|
3
|
+
try {
|
|
4
|
+
const result = e.data;
|
|
5
|
+
const output = (${a})(result);
|
|
6
|
+
self.postMessage({ result: output });
|
|
7
|
+
} catch (error) {
|
|
8
|
+
self.postMessage({ error: error.toString() });
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
`],{type:"application/javascript"}),s=URL.createObjectURL(o),r=new Worker(s);r.onmessage=function(e){e.data.error?t(new Error(e.data.error)):c(e.data.result),r.terminate(),URL.revokeObjectURL(s)},r.onerror=function(e){t(new Error(`Error in transform: ${e.message}`)),r.terminate(),URL.revokeObjectURL(s)},r.postMessage(n)}catch(o){return t(o)}});export{u as runInVm};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-3SAEGOMQ.mjs";var i=(e=>typeof r<"u"?r:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof r<"u"?r:n)[t]}):e)(function(e){if(typeof r<"u")return r.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),o=async(e,n)=>{let t;try{t=i("vm2").VM}catch{throw new Error('The optional dependency "vm2" is not installed. To use runInVm in Node.js, please install vm2: npm install vm2 --save.')}let u=new t({timeout:2e3,sandbox:{result:n},eval:!1,wasm:!1});return e.trim().startsWith("(")&&e.includes("=>")?u.run(`(${e})(result)`):null};export{o as runInVm};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vleap/warps",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.34",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -30,12 +30,8 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
},
|
|
37
|
-
"optionalDependencies": {
|
|
38
|
-
"@vleap/warps-adapter-multiversx": "^0.2.0-alpha.3",
|
|
39
|
-
"@vleap/warps-adapter-sui": "^0.2.0-alpha.3"
|
|
33
|
+
"ajv": "^8.17.1",
|
|
34
|
+
"protobufjs": "^7.5.3",
|
|
35
|
+
"qr-code-styling": "^1.9.2"
|
|
40
36
|
}
|
|
41
37
|
}
|