@sheetxl/scripting 0.8.0-beta.3 → 0.8.0-beta.5

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.
@@ -1 +1 @@
1
- exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./DZAweI0sdBfrHzAk.cjs"));return this.workerWrapper=await r(),this.workerWrapper}async compileModule(r){try{return(await this.getWorkerWrapper()).execute(r)}catch(e){throw console.error("Failed to compile using worker:",e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
1
+ exports.TypeScriptCompiler=class{constructor(r={}){this.workerWrapper=null}async getWorkerWrapper(){if(this.workerWrapper)return this.workerWrapper;const{createCompilerWorker:r}=await Promise.resolve().then(()=>require("./DDGcQZ4hlpTNheEg.cjs"));return this.workerWrapper=await r(),this.workerWrapper}async compileModule(r){try{return(await this.getWorkerWrapper()).execute(r)}catch(e){throw console.error("Failed to compile using worker:",e),e}}terminate(){this.workerWrapper?.terminate(),this.workerWrapper=null}};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./C83wXnFq94exmYt9.cjs"),c=require("./Bn3oEXST6uP5oPU2.cjs");let m=require("@sheetxl/utils");var w=s.__exportAll({RUN_INTERRUPTED:()=>a,abort:()=>v,check:()=>g,isInterrupted:()=>b,release:()=>C}),o=new Map,y=256,h=16,a="RunInterrupted";function d(e){const t=new Error(e);return t.name=a,t}function p(e){let t=o.get(e);if(!t){if(o.size>=y){const n=o.keys().next().value;n!==void 0&&o.delete(n)}t={started:Date.now(),calls:0,stopped:null},o.set(e,t)}return t}function g(e,t){const n=p(e);if(n.stopped)throw n.stopped;if(++n.calls%h===0&&Date.now()-n.started>t)throw n.stopped=d(`Run stopped: it exceeded the ${Math.round(t/1e3)} s time limit.`),n.stopped}function v(e,t="Run cancelled."){p(e).stopped=d(t)}function C(e){o.delete(e)}function b(e){return e?.name===a}var u=null,l=null,r=null,i=null;async function P(){return i||(i=(async()=>{const e=await(await Promise.resolve().then(()=>require("./D5np5QScDyDDD_WJ.cjs"))).initialize();if(!e)throw new Error("TypeScript could not be loaded. Check your connection and try again.");return e})()).catch(()=>{i=null}),i}var q=Object.freeze({compile:async function(e){if(!e?.source)return{module:null,diagnostics:[]};if(l&&m.CommonUtils.deepEqual(l,e))return u;const t=await(await(async function(){if(r)return r;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./C94szTiUbmNQa9FD.cjs"));return r=new n})()).compileModule(e);return u=t,l=e,t},lint:async function(e,t){if(!e)return[];const[n,{lintScript:f}]=await Promise.all([P(),Promise.resolve().then(()=>require("./ZKJrH74dcPwEAgmF.cjs"))]);return f(n,e,t)},cleanup:function(){r&&(r.terminate(),r=null,u=null)}});Object.defineProperty(exports,"Constants",{enumerable:!0,get:function(){return s.Constants_exports}}),exports.DiagnosticCode=c.DiagnosticCode,exports.DocTags=c.DocTags,Object.defineProperty(exports,"RunGuard",{enumerable:!0,get:function(){return w}}),exports.ScriptCompiler=q,exports.loadCompiledModule=async function(e,t){const{loadCompiledModule:n}=await Promise.resolve().then(()=>require("./B6RS19boKbA_QGQ6.cjs"));return n(e,t)};
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./C83wXnFq94exmYt9.cjs"),c=require("./Bn3oEXST6uP5oPU2.cjs");let m=require("@sheetxl/utils");var w=s.__exportAll({RUN_INTERRUPTED:()=>a,abort:()=>v,check:()=>g,isInterrupted:()=>b,release:()=>C}),o=new Map,y=256,h=16,a="RunInterrupted";function d(e){const t=new Error(e);return t.name=a,t}function p(e){let t=o.get(e);if(!t){if(o.size>=y){const n=o.keys().next().value;n!==void 0&&o.delete(n)}t={started:Date.now(),calls:0,stopped:null},o.set(e,t)}return t}function g(e,t){const n=p(e);if(n.stopped)throw n.stopped;if(++n.calls%h===0&&Date.now()-n.started>t)throw n.stopped=d(`Run stopped: it exceeded the ${Math.round(t/1e3)} s time limit.`),n.stopped}function v(e,t="Run cancelled."){p(e).stopped=d(t)}function C(e){o.delete(e)}function b(e){return e?.name===a}var u=null,l=null,r=null,i=null;async function P(){return i||(i=(async()=>{const e=await(await Promise.resolve().then(()=>require("./D5np5QScDyDDD_WJ.cjs"))).initialize();if(!e)throw new Error("TypeScript could not be loaded. Check your connection and try again.");return e})()).catch(()=>{i=null}),i}var q=Object.freeze({compile:async function(e){if(!e?.source)return{module:null,diagnostics:[]};if(l&&m.CommonUtils.deepEqual(l,e))return u;const t=await(await(async function(){if(r)return r;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./UzyxN3j4OvoQMXz9.cjs"));return r=new n})()).compileModule(e);return u=t,l=e,t},lint:async function(e,t){if(!e)return[];const[n,{lintScript:f}]=await Promise.all([P(),Promise.resolve().then(()=>require("./ZKJrH74dcPwEAgmF.cjs"))]);return f(n,e,t)},cleanup:function(){r&&(r.terminate(),r=null,u=null)}});Object.defineProperty(exports,"Constants",{enumerable:!0,get:function(){return s.Constants_exports}}),exports.DiagnosticCode=c.DiagnosticCode,exports.DocTags=c.DocTags,Object.defineProperty(exports,"RunGuard",{enumerable:!0,get:function(){return w}}),exports.ScriptCompiler=q,exports.loadCompiledModule=async function(e,t){const{loadCompiledModule:n}=await Promise.resolve().then(()=>require("./B6RS19boKbA_QGQ6.cjs"));return n(e,t)};
@@ -4,7 +4,7 @@ var t = class {
4
4
  }
5
5
  async getWorkerWrapper() {
6
6
  if (this.workerWrapper) return this.workerWrapper;
7
- const { createCompilerWorker: r } = await import("./DP3uAaeZa0hNHrYJ.mjs");
7
+ const { createCompilerWorker: r } = await import("./DiwsulR7CwM-KFcK.mjs");
8
8
  return this.workerWrapper = await r(), this.workerWrapper;
9
9
  }
10
10
  async compileModule(r) {