miniscript-languageserver 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
@@ -218,7 +218,7 @@ end if`},IfClause:(n,r)=>{let i=t.make(n.condition),s=[],o;for(o of n.body){let
|
|
218
218
|
return EXPORTED[r]
|
219
219
|
end function`).parseChunk();Ei.MAIN_BOILERPLATE=new eb.Parser('"$0"').parseChunk()});var Rd=m(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.OutputProcessor=void 0;var Ix=tb(),nb=class{constructor(e,n,{header:r=Ix.HEADER_BOILERPLATE,main:i=Ix.MAIN_BOILERPLATE}={}){this.context=e,this.transformer=n,this.processed=[],this.headerBoilerplate=this.transformer.transform(r),this.mainBoilerplate=this.transformer.transform(i)}addLiteralsOptimization(){let e=this.context,n=Array.from(e.literals.getMapping().values()).filter(i=>i.namespace!=null),r=e.variables.get("globals");return n.length>0&&this.processed.push("globals."+r+"=globals",...n.map(i=>`${r}.${i.namespace}=${i.literal.raw}`)),this}addHeader(){return this.processed.push(this.headerBoilerplate),this}addCode(e,n=!1){if(n){let r=this.mainBoilerplate.replace('"$0"',e);this.processed.push(r)}else this.processed.push(e);return this}build(){return this.processed.join(`
|
220
220
|
`)}};Od.OutputProcessor=nb});var Px=m(bo=>{"use strict";var EN=bo&&bo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bo,"__esModule",{value:!0});bo.DirectTranspiler=void 0;var AN=EN(require("events")),xN=Fr(),Dd=md(),kN=za(),CN=Ad(),ON=Cd(),RN=Sd(),DN=Rd(),IN=Object.prototype.hasOwnProperty,rb=class extends AN.default{constructor(e){super();let n=this;n.code=e.code,n.obfuscation=IN.call(e,"obfuscation")?e.obfuscation:!0,n.buildType=e.buildType||Dd.BuildType.DEFAULT,n.buildOptions=e.buildOptions||{isDevMode:!1},n.disableLiteralsOptimization=e.disableLiteralsOptimization||n.buildType!==Dd.BuildType.UGLIFY,n.disableNamespacesOptimization=e.disableNamespacesOptimization||n.buildType!==Dd.BuildType.UGLIFY,n.environmentVariables=e.environmentVariables||new Map,n.excludedNamespaces=e.excludedNamespaces||[]}parse(){let e=this,n=(0,Dd.getFactory)(e.buildType),i=new xN.Parser(e.code).parseChunk(),s=(0,RN.fetchNamespaces)(i),o=[].concat(i.literals),a=(0,ON.generateCharsetMap)(e.obfuscation),u=new kN.Context({variablesCharset:a.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:a.modules});e.disableNamespacesOptimization||new Set(s).forEach(y=>u.variables.createNamespace(y)),e.disableLiteralsOptimization||o.forEach(p=>u.literals.add(p));let c=new CN.Transformer({buildOptions:e.buildOptions,mapFactory:n,context:u,environmentVariables:e.environmentVariables}),l=new DN.OutputProcessor(u,c);e.disableLiteralsOptimization||l.addLiteralsOptimization();let d=c.transform(i);return l.addCode(d),l.build()}};bo.DirectTranspiler=rb});var sb=m(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.ResourceProvider=void 0;var ib=class{getHandler(){let e=require("fs"),n=require("path");return{getTargetRelativeTo:(r,i)=>{let s=n.resolve(r,".."),o=n.resolve(s,i);return Promise.resolve(e.existsSync(o)?o:o+".src")},has:r=>Promise.resolve(e.existsSync(r)),get:r=>Promise.resolve(e.readFileSync(r,"utf8")),resolve:r=>Promise.resolve(n.resolve(r))}}};Id.ResourceProvider=ib});var ab=m(Ai=>{"use strict";var PN=Ai&&Ai.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(l){try{c(r.next(l))}catch(d){o(d)}}function u(l){try{c(r.throw(l))}catch(d){o(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})},MN=Ai&&Ai.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.Target=void 0;var LN=MN(require("events")),NN=Fr(),qN=Yy(),Mx=_d(),ob=class extends LN.default{constructor(e){super();let n=this;n.target=e.target,n.resourceHandler=e.resourceHandler,n.context=e.context}parse(e){return PN(this,void 0,void 0,function*(){let n=this,r=n.resourceHandler,i=yield r.resolve(n.target);if(!(yield r.has(i)))throw new Error("Target "+i+" does not exist...");let s=n.context,o=yield r.get(i);n.emit("parse-before",i);try{let u=new NN.Parser(o,{filename:i}).parseChunk(),c=new qN.Dependency({target:i,resourceHandler:r,chunk:u,context:s}),{namespaces:l,literals:d}=yield c.findDependencies();if(!e.disableNamespacesOptimization){let p=new Set(l);for(let y of p)s.variables.createNamespace(y)}if(!e.disableLiteralsOptimization)for(let p of d)s.literals.add(p);return{main:{chunk:u,dependency:c}}}catch(a){throw a instanceof Mx.BuildError?a:new Mx.BuildError(a.message,{target:this.target,range:a.range})}})}};Ai.Target=ob});var Lx=m(_o=>{"use strict";var jN=_o&&_o.__awaiter||function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(l){try{c(r.next(l))}catch(d){o(d)}}function u(l){try{c(r.throw(l))}catch(d){o(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,u)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(_o,"__esModule",{value:!0});_o.Transpiler=void 0;var FN=cb(),$N=tb(),Pd=md(),BN=za(),UN=sb(),HN=ab(),WN=Ad(),GN=Cd(),VN=Rd(),zN=Object.prototype.hasOwnProperty,ub=class{constructor(e){let n=this;n.target=e.target,n.resourceHandler=e.resourceHandler||new UN.ResourceProvider().getHandler(),n.obfuscation=zN.call(e,"obfuscation")?e.obfuscation:!0;let r=(0,GN.generateCharsetMap)(n.obfuscation);n.context=new BN.Context({variablesCharset:r.variables,variablesExcluded:e.excludedNamespaces,modulesCharset:r.modules}),n.buildType=e.buildType||Pd.BuildType.DEFAULT,n.buildOptions=e.buildOptions||{isDevMode:!1},n.installer=e.installer||!1,n.disableLiteralsOptimization=e.disableLiteralsOptimization||n.buildType!==Pd.BuildType.UGLIFY,n.disableNamespacesOptimization=e.disableNamespacesOptimization||n.buildType!==Pd.BuildType.UGLIFY,n.environmentVariables=e.environmentVariables||new Map}parse(){return jN(this,void 0,void 0,function*(){let e=this,n=(0,Pd.getFactory)(e.buildType),r=e.context,s=yield new HN.Target({target:e.target,resourceHandler:e.resourceHandler,context:e.context}).parse({disableLiteralsOptimization:e.disableLiteralsOptimization,disableNamespacesOptimization:e.disableNamespacesOptimization}),o=new WN.Transformer({buildOptions:e.buildOptions,mapFactory:n,context:r,environmentVariables:e.environmentVariables,resourceHandler:e.resourceHandler}),a=s.main,u=o.transform($N.MODULE_BOILERPLATE),c=(l,d)=>{let p=r.modules.get(l.getId()),y={},v=0,x=function(w){let E=w.getNamespace();if(!(E in y)){if(E!==p&&w.type===FN.DependencyType.Import){let _=o.transform(w.chunk,w);y[E]=u.replace('"$0"','"'+E+'"').replace('"$1"',_),v++}for(let _ of w.dependencies)x(_)}};x(l);let I=new VN.OutputProcessor(r,o);d&&I.addLiteralsOptimization(),v>0&&I.addHeader(),Object.keys(y).forEach(w=>I.addCode(y[w]));let P=o.transform(l.chunk,l);return I.addCode(P,!0),I.build()};return{[e.target]:c(a.dependency,!e.disableLiteralsOptimization)}})}};_o.Transpiler=ub});var cb=m(ee=>{"use strict";var Nx=ee&&ee.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),KN=ee&&ee.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XN=ee&&ee.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&Nx(e,t,n);return KN(e,t),e},YN=ee&&ee.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Nx(e,t,n)};Object.defineProperty(ee,"__esModule",{value:!0});ee.Stack=ee.OutputProcessor=ee.NamespaceGenerator=ee.LiteralsMapper=ee.fetchNamespaces=ee.BuildError=ee.generateCharsetMap=ee.DependencyType=ee.Transpiler=ee.Transformer=ee.Target=ee.DirectTranspiler=ee.Dependency=ee.ContextDataProperty=ee.Context=ee.uglifyFactory=ee.defaultFactory=ee.BeautifyUtils=ee.BeautifyContext=ee.beautifyFactory=ee.getFactory=ee.BuildType=void 0;var qx=md();Object.defineProperty(ee,"BuildType",{enumerable:!0,get:function(){return qx.BuildType}});Object.defineProperty(ee,"getFactory",{enumerable:!0,get:function(){return qx.getFactory}});var JN=Ny();Object.defineProperty(ee,"beautifyFactory",{enumerable:!0,get:function(){return JN.beautifyFactory}});var QN=Ly();Object.defineProperty(ee,"BeautifyContext",{enumerable:!0,get:function(){return QN.BeautifyContext}});ee.BeautifyUtils=XN(dd());var ZN=qy();Object.defineProperty(ee,"defaultFactory",{enumerable:!0,get:function(){return ZN.defaultFactory}});var eq=jy();Object.defineProperty(ee,"uglifyFactory",{enumerable:!0,get:function(){return eq.uglifyFactory}});var jx=za();Object.defineProperty(ee,"Context",{enumerable:!0,get:function(){return jx.Context}});Object.defineProperty(ee,"ContextDataProperty",{enumerable:!0,get:function(){return jx.ContextDataProperty}});var tq=Yy();Object.defineProperty(ee,"Dependency",{enumerable:!0,get:function(){return tq.Dependency}});var nq=Px();Object.defineProperty(ee,"DirectTranspiler",{enumerable:!0,get:function(){return nq.DirectTranspiler}});YN(sb(),ee);var rq=ab();Object.defineProperty(ee,"Target",{enumerable:!0,get:function(){return rq.Target}});var iq=Ad();Object.defineProperty(ee,"Transformer",{enumerable:!0,get:function(){return iq.Transformer}});var sq=Lx();Object.defineProperty(ee,"Transpiler",{enumerable:!0,get:function(){return sq.Transpiler}});var oq=Gy();Object.defineProperty(ee,"DependencyType",{enumerable:!0,get:function(){return oq.DependencyType}});var aq=Cd();Object.defineProperty(ee,"generateCharsetMap",{enumerable:!0,get:function(){return aq.generateCharsetMap}});var uq=_d();Object.defineProperty(ee,"BuildError",{enumerable:!0,get:function(){return uq.BuildError}});var cq=Sd();Object.defineProperty(ee,"fetchNamespaces",{enumerable:!0,get:function(){return cq.fetchNamespaces}});var lq=By();Object.defineProperty(ee,"LiteralsMapper",{enumerable:!0,get:function(){return lq.LiteralsMapper}});var dq=Hy();Object.defineProperty(ee,"NamespaceGenerator",{enumerable:!0,get:function(){return dq.NamespaceGenerator}});var fq=Rd();Object.defineProperty(ee,"OutputProcessor",{enumerable:!0,get:function(){return fq.OutputProcessor}});var pq=Qy();Object.defineProperty(ee,"Stack",{enumerable:!0,get:function(){return pq.Stack}})});var $x=m(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.activate=void 0;var Fx=cb();function hq(t){async function e(n){try{let r=t.getConfiguration();return new Fx.DirectTranspiler({code:n,buildType:Fx.BuildType.BEAUTIFY,buildOptions:{isDevMode:!0,keepParentheses:r.transpiler.beautify.keepParentheses,indentation:r.transpiler.beautify.indentation==="Tab"?0:1,indentationSpaces:r.transpiler.beautify.indentationSpaces}}).parse()}catch{return null}}t.connection.onDocumentFormatting(async n=>{if(!t.getConfiguration().formatter)return;let r=await t.fs.getTextDocument(n.textDocument.uri);if(r==null)return;let i=await t.documentManager.getLatest(r),s=await e(r.getText());return s===null?[]:[{range:{start:{line:0,character:0},end:i.document.end},newText:s}]})}Md.activate=hq});var Ld=m((Xa,lb)=>{(function(t,e){if(typeof Xa=="object"&&typeof lb=="object")lb.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var n=e();for(var r in n)(typeof Xa=="object"?Xa:t)[r]=n[r]}})(Xa,()=>(()=>{"use strict";var t={470:i=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function o(u,c){for(var l,d="",p=0,y=-1,v=0,x=0;x<=u.length;++x){if(x<u.length)l=u.charCodeAt(x);else{if(l===47)break;l=47}if(l===47){if(!(y===x-1||v===1))if(y!==x-1&&v===2){if(d.length<2||p!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var I=d.lastIndexOf("/");if(I!==d.length-1){I===-1?(d="",p=0):p=(d=d.slice(0,I)).length-1-d.lastIndexOf("/"),y=x,v=0;continue}}else if(d.length===2||d.length===1){d="",p=0,y=x,v=0;continue}}c&&(d.length>0?d+="/..":d="..",p=2)}else d.length>0?d+="/"+u.slice(y+1,x):d=u.slice(y+1,x),p=x-y-1;y=x,v=0}else l===46&&v!==-1?++v:v=-1}return d}var a={resolve:function(){for(var u,c="",l=!1,d=arguments.length-1;d>=-1&&!l;d--){var p;d>=0?p=arguments[d]:(u===void 0&&(u=process.cwd()),p=u),s(p),p.length!==0&&(c=p+"/"+c,l=p.charCodeAt(0)===47)}return c=o(c,!l),l?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(u){if(s(u),u.length===0)return".";var c=u.charCodeAt(0)===47,l=u.charCodeAt(u.length-1)===47;return(u=o(u,!c)).length!==0||c||(u="."),u.length>0&&l&&(u+="/"),c?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,c=0;c<arguments.length;++c){var l=arguments[c];s(l),l.length>0&&(u===void 0?u=l:u+="/"+l)}return u===void 0?".":a.normalize(u)},relative:function(u,c){if(s(u),s(c),u===c||(u=a.resolve(u))===(c=a.resolve(c)))return"";for(var l=1;l<u.length&&u.charCodeAt(l)===47;++l);for(var d=u.length,p=d-l,y=1;y<c.length&&c.charCodeAt(y)===47;++y);for(var v=c.length-y,x=p<v?p:v,I=-1,P=0;P<=x;++P){if(P===x){if(v>x){if(c.charCodeAt(y+P)===47)return c.slice(y+P+1);if(P===0)return c.slice(y+P)}else p>x&&(u.charCodeAt(l+P)===47?I=P:P===0&&(I=0));break}var w=u.charCodeAt(l+P);if(w!==c.charCodeAt(y+P))break;w===47&&(I=P)}var E="";for(P=l+I+1;P<=d;++P)P!==d&&u.charCodeAt(P)!==47||(E.length===0?E+="..":E+="/..");return E.length>0?E+c.slice(y+I):(y+=I,c.charCodeAt(y)===47&&++y,c.slice(y))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var c=u.charCodeAt(0),l=c===47,d=-1,p=!0,y=u.length-1;y>=1;--y)if((c=u.charCodeAt(y))===47){if(!p){d=y;break}}else p=!1;return d===-1?l?"/":".":l&&d===1?"//":u.slice(0,d)},basename:function(u,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(u);var l,d=0,p=-1,y=!0;if(c!==void 0&&c.length>0&&c.length<=u.length){if(c.length===u.length&&c===u)return"";var v=c.length-1,x=-1;for(l=u.length-1;l>=0;--l){var I=u.charCodeAt(l);if(I===47){if(!y){d=l+1;break}}else x===-1&&(y=!1,x=l+1),v>=0&&(I===c.charCodeAt(v)?--v==-1&&(p=l):(v=-1,p=x))}return d===p?p=x:p===-1&&(p=u.length),u.slice(d,p)}for(l=u.length-1;l>=0;--l)if(u.charCodeAt(l)===47){if(!y){d=l+1;break}}else p===-1&&(y=!1,p=l+1);return p===-1?"":u.slice(d,p)},extname:function(u){s(u);for(var c=-1,l=0,d=-1,p=!0,y=0,v=u.length-1;v>=0;--v){var x=u.charCodeAt(v);if(x!==47)d===-1&&(p=!1,d=v+1),x===46?c===-1?c=v:y!==1&&(y=1):c!==-1&&(y=-1);else if(!p){l=v+1;break}}return c===-1||d===-1||y===0||y===1&&c===d-1&&c===l+1?"":u.slice(c,d)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(c,l){var d=l.dir||l.root,p=l.base||(l.name||"")+(l.ext||"");return d?d===l.root?d+p:d+"/"+p:p}(0,u)},parse:function(u){s(u);var c={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return c;var l,d=u.charCodeAt(0),p=d===47;p?(c.root="/",l=1):l=0;for(var y=-1,v=0,x=-1,I=!0,P=u.length-1,w=0;P>=l;--P)if((d=u.charCodeAt(P))!==47)x===-1&&(I=!1,x=P+1),d===46?y===-1?y=P:w!==1&&(w=1):y!==-1&&(w=-1);else if(!I){v=P+1;break}return y===-1||x===-1||w===0||w===1&&y===x-1&&y===v+1?x!==-1&&(c.base=c.name=v===0&&p?u.slice(1,x):u.slice(v,x)):(v===0&&p?(c.name=u.slice(1,y),c.base=u.slice(1,x)):(c.name=u.slice(v,y),c.base=u.slice(v,x)),c.ext=u.slice(y,x)),v>0?c.dir=u.slice(0,v-1):p&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,i.exports=a},674:(i,s)=>{if(Object.defineProperty(s,"__esModule",{value:!0}),s.isWindows=void 0,typeof process=="object")s.isWindows=process.platform==="win32";else if(typeof navigator=="object"){let o=navigator.userAgent;s.isWindows=o.indexOf("Windows")>=0}},796:(i,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let a=o(674),u=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//;function d(U,k){if(!U.scheme&&k)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${U.authority}", path: "${U.path}", query: "${U.query}", fragment: "${U.fragment}"}`);if(U.scheme&&!u.test(U.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(U.path){if(U.authority){if(!c.test(U.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(U.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",y="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class x{static isUri(k){return k instanceof x||!!k&&typeof k.authority=="string"&&typeof k.fragment=="string"&&typeof k.path=="string"&&typeof k.query=="string"&&typeof k.scheme=="string"&&typeof k.fsPath=="string"&&typeof k.with=="function"&&typeof k.toString=="function"}scheme;authority;path;query;fragment;constructor(k,M,L,q,ce,ae=!1){typeof k=="object"?(this.scheme=k.scheme||p,this.authority=k.authority||p,this.path=k.path||p,this.query=k.query||p,this.fragment=k.fragment||p):(this.scheme=function(Ct,dt){return Ct||dt?Ct:"file"}(k,ae),this.authority=M||p,this.path=function(Ct,dt){switch(Ct){case"https":case"http":case"file":dt?dt[0]!==y&&(dt=y+dt):dt=y}return dt}(this.scheme,L||p),this.query=q||p,this.fragment=ce||p,d(this,ae))}get fsPath(){return j(this,!1)}with(k){if(!k)return this;let{scheme:M,authority:L,path:q,query:ce,fragment:ae}=k;return M===void 0?M=this.scheme:M===null&&(M=p),L===void 0?L=this.authority:L===null&&(L=p),q===void 0?q=this.path:q===null&&(q=p),ce===void 0?ce=this.query:ce===null&&(ce=p),ae===void 0?ae=this.fragment:ae===null&&(ae=p),M===this.scheme&&L===this.authority&&q===this.path&&ce===this.query&&ae===this.fragment?this:new P(M,L,q,ce,ae)}static parse(k,M=!1){let L=v.exec(k);return L?new P(L[2]||p,fe(L[4]||p),fe(L[5]||p),fe(L[7]||p),fe(L[9]||p),M):new P(p,p,p,p,p)}static file(k){let M=p;if(a.isWindows&&(k=k.replace(/\\/g,y)),k[0]===y&&k[1]===y){let L=k.indexOf(y,2);L===-1?(M=k.substring(2),k=y):(M=k.substring(2,L),k=k.substring(L)||y)}return new P("file",M,k,p,p)}static from(k){let M=new P(k.scheme,k.authority,k.path,k.query,k.fragment);return d(M,!0),M}toString(k=!1){return O(this,k)}toJSON(){return this}static revive(k){if(k){if(k instanceof x)return k;{let M=new P(k);return M._formatted=k.external,M._fsPath=k._sep===I?k.fsPath:null,M}}return k}}s.URI=x;let I=a.isWindows?1:void 0;class P extends x{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=j(this,!1)),this._fsPath}toString(k=!1){return k?O(this,!0):(this._formatted||(this._formatted=O(this,!1)),this._formatted)}toJSON(){let k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=I),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k}}let w={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function E(U,k,M){let L,q=-1;for(let ce=0;ce<U.length;ce++){let ae=U.charCodeAt(ce);if(ae>=97&&ae<=122||ae>=65&&ae<=90||ae>=48&&ae<=57||ae===45||ae===46||ae===95||ae===126||k&&ae===47||M&&ae===91||M&&ae===93||M&&ae===58)q!==-1&&(L+=encodeURIComponent(U.substring(q,ce)),q=-1),L!==void 0&&(L+=U.charAt(ce));else{L===void 0&&(L=U.substr(0,ce));let Ct=w[ae];Ct!==void 0?(q!==-1&&(L+=encodeURIComponent(U.substring(q,ce)),q=-1),L+=Ct):q===-1&&(q=ce)}}return q!==-1&&(L+=encodeURIComponent(U.substring(q))),L!==void 0?L:U}function _(U){let k;for(let M=0;M<U.length;M++){let L=U.charCodeAt(M);L===35||L===63?(k===void 0&&(k=U.substr(0,M)),k+=w[L]):k!==void 0&&(k+=U[M])}return k!==void 0?k:U}function j(U,k){let M;return M=U.authority&&U.path.length>1&&U.scheme==="file"?`//${U.authority}${U.path}`:U.path.charCodeAt(0)===47&&(U.path.charCodeAt(1)>=65&&U.path.charCodeAt(1)<=90||U.path.charCodeAt(1)>=97&&U.path.charCodeAt(1)<=122)&&U.path.charCodeAt(2)===58?k?U.path.substr(1):U.path[1].toLowerCase()+U.path.substr(2):U.path,a.isWindows&&(M=M.replace(/\//g,"\\")),M}function O(U,k){let M=k?_:E,L="",{scheme:q,authority:ce,path:ae,query:Ct,fragment:dt}=U;if(q&&(L+=q,L+=":"),(ce||q==="file")&&(L+=y,L+=y),ce){let Pe=ce.indexOf("@");if(Pe!==-1){let rn=ce.substr(0,Pe);ce=ce.substr(Pe+1),Pe=rn.lastIndexOf(":"),Pe===-1?L+=M(rn,!1,!1):(L+=M(rn.substr(0,Pe),!1,!1),L+=":",L+=M(rn.substr(Pe+1),!1,!0)),L+="@"}ce=ce.toLowerCase(),Pe=ce.lastIndexOf(":"),Pe===-1?L+=M(ce,!1,!0):(L+=M(ce.substr(0,Pe),!1,!0),L+=ce.substr(Pe))}if(ae){if(ae.length>=3&&ae.charCodeAt(0)===47&&ae.charCodeAt(2)===58){let Pe=ae.charCodeAt(1);Pe>=65&&Pe<=90&&(ae=`/${String.fromCharCode(Pe+32)}:${ae.substr(3)}`)}else if(ae.length>=2&&ae.charCodeAt(1)===58){let Pe=ae.charCodeAt(0);Pe>=65&&Pe<=90&&(ae=`${String.fromCharCode(Pe+32)}:${ae.substr(2)}`)}L+=M(ae,!0,!1)}return Ct&&(L+="?",L+=M(Ct,!1,!1)),dt&&(L+="#",L+=k?dt:E(dt,!1,!1)),L}function H(U){try{return decodeURIComponent(U)}catch{return U.length>3?U.substr(0,3)+H(U.substr(3)):U}}s.uriToFsPath=j;let re=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function fe(U){return U.match(re)?U.replace(re,k=>H(k)):U}},679:function(i,s,o){var a=this&&this.__createBinding||(Object.create?function(v,x,I,P){P===void 0&&(P=I);var w=Object.getOwnPropertyDescriptor(x,I);w&&!("get"in w?!x.__esModule:w.writable||w.configurable)||(w={enumerable:!0,get:function(){return x[I]}}),Object.defineProperty(v,P,w)}:function(v,x,I,P){P===void 0&&(P=I),v[P]=x[I]}),u=this&&this.__setModuleDefault||(Object.create?function(v,x){Object.defineProperty(v,"default",{enumerable:!0,value:x})}:function(v,x){v.default=x}),c=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var x={};if(v!=null)for(var I in v)I!=="default"&&Object.prototype.hasOwnProperty.call(v,I)&&a(x,v,I);return u(x,v),x};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let l=c(o(470)),d=l.posix||l,p="/";var y;(function(v){v.joinPath=function(x,...I){return x.with({path:d.join(x.path,...I)})},v.resolvePath=function(x,...I){let P=x.path,w=!1;P[0]!==p&&(P=p+P,w=!0);let E=d.resolve(P,...I);return w&&E[0]===p&&!x.authority&&(E=E.substring(1)),x.with({path:E})},v.dirname=function(x){if(x.path.length===0||x.path===p)return x;let I=d.dirname(x.path);return I.length===1&&I.charCodeAt(0)===46&&(I=""),x.with({path:I})},v.basename=function(x){return d.basename(x.path)},v.extname=function(x){return d.extname(x.path)}})(y||(s.Utils=y={}))}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=n(796);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let o=n(679);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),r})())});var qd=m(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.MarkdownString=void 0;var db=class{constructor(e=""){this.sanitize=!0,this.value=e}appendText(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,n){return this.value+="\n```",this.value+=e,this.value+=`
|
221
|
-
`,this.value+=n,this.value+="\n```\n",this}toString(){return this.value}};Nd.MarkdownString=db});var jd=m(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.createHover=gt.createSignatureInfo=gt.appendTooltipBody=gt.appendTooltipHeader=gt.createTooltipHeader=gt.formatDefaultValue=gt.formatTypes=void 0;var Bx=qs(),Ux=qd();function fb(t
|
221
|
+
`,this.value+=n,this.value+="\n```\n",this}toString(){return this.value}};Nd.MarkdownString=db});var jd=m(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.createHover=gt.createSignatureInfo=gt.appendTooltipBody=gt.appendTooltipHeader=gt.createTooltipHeader=gt.formatDefaultValue=gt.formatTypes=void 0;var Bx=qs(),Ux=qd();function fb(t){return t==null?"":t.map(e=>e.toString().replace(",","\u066B")).join(" or ")}gt.formatTypes=fb;function Hx(t){return typeof t=="string"?`"${t}"`:t.toString()}gt.formatDefaultValue=Hx;var mq=(t,e)=>{let n=e.getArguments()||[],r=fb(e.getReturns())||"null";if(n.length===0)return`(${t.kind}) ${t.label} (): ${r}`;let i=n.map(s=>`${s.getLabel()}${s.isOptional()?"?":""}: ${fb(s.getTypes())}${s.getDefault()?` = ${Hx(s.getDefault().value)}`:""}`).join(", ");return`(${t.kind}) ${t.label} (${i}): ${r}`};gt.createTooltipHeader=mq;var gq=(t,e,n)=>{t.appendCodeblock(Bx.LanguageId,(0,gt.createTooltipHeader)(e,n)),t.appendMarkdown(`***
|
222
222
|
`)};gt.appendTooltipHeader=gq;var yq=(t,e)=>{let n=e.getExample()||[];t.appendMarkdown(e.getDescription()+`
|
223
223
|
`),n.length>0&&(t.appendMarkdown(`#### Examples:
|
224
224
|
`),t.appendCodeblock(Bx.LanguageId,n.join(`
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "miniscript-languageserver",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.4",
|
4
4
|
"description": "Language server for MiniScript",
|
5
5
|
"main": "./index.js",
|
6
6
|
"scripts": {
|
@@ -71,6 +71,6 @@
|
|
71
71
|
"miniscript-meta": "~1.2.3",
|
72
72
|
"greybel-transpiler": "~3.0.9",
|
73
73
|
"miniscript-type-analyzer": "~0.8.2",
|
74
|
-
"miniscript-languageserver-core": "^1.0.
|
74
|
+
"miniscript-languageserver-core": "^1.0.4"
|
75
75
|
}
|
76
76
|
}
|