runtime-compiler 4.2.1 → 4.2.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/build.js +1 -1
- package/package.json +1 -1
package/build.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Worker}from"node:worker_threads";let workerOptions={eval:!0};export const runInWorker=code=>new Promise((res,rej)=>{let worker=new Worker(`import"runtime-compiler/env/build";${code};\nimport{__rtcpl_ct__}from"runtime-compiler";import{parentPort as __rtcpl_pp__}from"node:worker_threads";__rtcpl_pp__.postMessage(__rtcpl_ct__)`,workerOptions);worker.once("message",msg=>{res(msg);worker.terminate()});worker.once("error",rej)});export const compile=codes=>`import"runtime-compiler/env/aot";import{__rtcpl_aot_fns__ as a}from"runtime-compiler";a.push(${codes})`;
|
|
1
|
+
import{Worker}from"node:worker_threads";let workerOptions={eval:!0};export const runInWorker=code=>new Promise((res,rej)=>{let worker=new Worker(`import"runtime-compiler/env/build";${code};\nimport{__rtcpl_ct__}from"runtime-compiler";import{parentPort as __rtcpl_pp__}from"node:worker_threads";process.on('beforeExit',()=>__rtcpl_pp__.postMessage(__rtcpl_ct__))`,workerOptions);worker.once("message",msg=>{res(msg);worker.terminate()});worker.once("error",rej)});export const compile=codes=>`import"runtime-compiler/env/aot";import{__rtcpl_aot_fns__ as a}from"runtime-compiler";a.push(${codes})`;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"runtime-compiler","version":"4.2.
|
|
1
|
+
{"name":"runtime-compiler","version":"4.2.2","description":"A code generation system.","keywords":["rolldown-plugin","vite-plugin"],"homepage":"","license":"MIT","repository":"re-utils/runtime-compiler","type":"module","exports":{"./*":"./*.js",".":"./index.js","./env":"./env/index.js"}}
|