astro-vscode 2.6.2 → 2.6.3
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/node/server.js +2 -2
- package/package.json +2 -2
package/dist/node/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var i3=Object.create;var Fd=Object.defineProperty;var s3=Object.getOwnPropertyDescriptor;var o3=Object.getOwnPropertyNames;var a3=Object.getPrototypeOf,l3=Object.prototype.hasOwnProperty;var xe=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_v=(t,e)=>{for(var n in e)Fd(t,n,{get:e[n],enumerable:!0})},l1=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of o3(e))!l3.call(t,i)&&i!==n&&Fd(t,i,{get:()=>e[i],enumerable:!(r=s3(e,i))||r.enumerable});return t};var pn=(t,e,n)=>(n=t!=null?i3(a3(t)):{},l1(e||!t||!t.__esModule?Fd(n,"default",{value:t,enumerable:!0}):n,t)),Ro=t=>l1(Fd({},"__esModule",{value:!0}),t);var c1=L((Aue,c3)=>{c3.exports={name:"@astrojs/language-server",version:"2.6.2",author:"withastro",license:"MIT",repository:{type:"git",url:"https://github.com/withastro/language-tools",directory:"packages/language-server"},type:"commonjs",main:"dist/index.js",files:["bin","dist/**/*.js","dist/**/*.d.ts","types/**/*.d.ts"],bin:{"astro-ls":"./bin/nodeServer.js"},scripts:{build:"tsc",dev:"tsc --watch",test:"mocha --timeout 10000 --require tsx --require test/takedown.ts test/misc/init.test.ts test/**/*.test.ts","test:match":"pnpm run test -g"},dependencies:{"@astrojs/compiler":"^2.4.0","@jridgewell/sourcemap-codec":"^1.4.15","@volar/kit":"~1.11.1","@volar/language-core":"~1.11.1","@volar/language-server":"~1.11.1","@volar/language-service":"~1.11.1","@volar/source-map":"~1.11.1","@volar/typescript":"~1.11.1","fast-glob":"^3.2.12","muggle-string":"^0.3.1","volar-service-css":"0.0.17","volar-service-emmet":"0.0.17","volar-service-html":"0.0.17","volar-service-prettier":"0.0.17","volar-service-typescript":"0.0.17","volar-service-typescript-twoslash-queries":"0.0.17","vscode-html-languageservice":"^5.1.0","vscode-uri":"^3.0.8"},devDependencies:{"@astrojs/svelte":"^4.0.3","@astrojs/vue":"^3.0.1","@types/chai":"^4.3.5","@types/mocha":"^10.0.1","@types/node":"^18.17.8",astro:"^4.1.0",chai:"^4.3.7",mocha:"^10.2.0",tsx:"^3.12.7",typescript:"^5.2.2","vscode-languageserver-protocol":"^3.17.5","vscode-languageserver-textdocument":"^1.0.11"},peerDependencies:{prettier:"^3.0.0","prettier-plugin-astro":">=0.11.0"},peerDependenciesMeta:{prettier:{optional:!0},"prettier-plugin-astro":{optional:!0}}}});var Ad=L(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.thenable=tn.typedArray=tn.stringArray=tn.array=tn.func=tn.error=tn.number=tn.string=tn.boolean=void 0;function u3(t){return t===!0||t===!1}tn.boolean=u3;function u1(t){return typeof t=="string"||t instanceof String}tn.string=u1;function d3(t){return typeof t=="number"||t instanceof Number}tn.number=d3;function h3(t){return t instanceof Error}tn.error=h3;function d1(t){return typeof t=="function"}tn.func=d1;function h1(t){return Array.isArray(t)}tn.array=h1;function p3(t){return h1(t)&&t.every(e=>u1(e))}tn.stringArray=p3;function f3(t,e){return Array.isArray(t)&&t.every(e)}tn.typedArray=f3;function m3(t){return t&&d1(t.then)}tn.thenable=m3});var Fa=L(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.stringArray=_n.array=_n.func=_n.error=_n.number=_n.string=_n.boolean=void 0;function g3(t){return t===!0||t===!1}_n.boolean=g3;function p1(t){return typeof t=="string"||t instanceof String}_n.string=p1;function b3(t){return typeof t=="number"||t instanceof Number}_n.number=b3;function v3(t){return t instanceof Error}_n.error=v3;function y3(t){return typeof t=="function"}_n.func=y3;function f1(t){return Array.isArray(t)}_n.array=f1;function w3(t){return f1(t)&&t.every(e=>p1(e))}_n.stringArray=w3});var Bv=L(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.Message=Ae.NotificationType9=Ae.NotificationType8=Ae.NotificationType7=Ae.NotificationType6=Ae.NotificationType5=Ae.NotificationType4=Ae.NotificationType3=Ae.NotificationType2=Ae.NotificationType1=Ae.NotificationType0=Ae.NotificationType=Ae.RequestType9=Ae.RequestType8=Ae.RequestType7=Ae.RequestType6=Ae.RequestType5=Ae.RequestType4=Ae.RequestType3=Ae.RequestType2=Ae.RequestType1=Ae.RequestType=Ae.RequestType0=Ae.AbstractMessageSignature=Ae.ParameterStructures=Ae.ResponseError=Ae.ErrorCodes=void 0;var Fo=Fa(),Sv;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Sv||(Ae.ErrorCodes=Sv={}));var Gc=class extends Error{constructor(e,n,r){super(n),this.code=Fo.number(e)?e:Sv.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,Gc.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};Ae.ResponseError=Gc;var cn=class{constructor(e){this.kind=e}static is(e){return e===cn.auto||e===cn.byName||e===cn.byPosition}toString(){return this.kind}};Ae.ParameterStructures=cn;cn.auto=new cn("auto");cn.byPosition=new cn("byPosition");cn.byName=new cn("byName");var Tt=class{constructor(e,n){this.method=e,this.numberOfParams=n}get parameterStructures(){return cn.auto}};Ae.AbstractMessageSignature=Tt;var xv=class extends Tt{constructor(e){super(e,0)}};Ae.RequestType0=xv;var Cv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.RequestType=Cv;var kv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.RequestType1=kv;var Tv=class extends Tt{constructor(e){super(e,2)}};Ae.RequestType2=Tv;var Ev=class extends Tt{constructor(e){super(e,3)}};Ae.RequestType3=Ev;var Dv=class extends Tt{constructor(e){super(e,4)}};Ae.RequestType4=Dv;var Rv=class extends Tt{constructor(e){super(e,5)}};Ae.RequestType5=Rv;var Fv=class extends Tt{constructor(e){super(e,6)}};Ae.RequestType6=Fv;var Av=class extends Tt{constructor(e){super(e,7)}};Ae.RequestType7=Av;var Pv=class extends Tt{constructor(e){super(e,8)}};Ae.RequestType8=Pv;var Iv=class extends Tt{constructor(e){super(e,9)}};Ae.RequestType9=Iv;var Mv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.NotificationType=Mv;var Ov=class extends Tt{constructor(e){super(e,0)}};Ae.NotificationType0=Ov;var Lv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.NotificationType1=Lv;var Nv=class extends Tt{constructor(e){super(e,2)}};Ae.NotificationType2=Nv;var zv=class extends Tt{constructor(e){super(e,3)}};Ae.NotificationType3=zv;var qv=class extends Tt{constructor(e){super(e,4)}};Ae.NotificationType4=qv;var jv=class extends Tt{constructor(e){super(e,5)}};Ae.NotificationType5=jv;var Wv=class extends Tt{constructor(e){super(e,6)}};Ae.NotificationType6=Wv;var Uv=class extends Tt{constructor(e){super(e,7)}};Ae.NotificationType7=Uv;var Hv=class extends Tt{constructor(e){super(e,8)}};Ae.NotificationType8=Hv;var $v=class extends Tt{constructor(e){super(e,9)}};Ae.NotificationType9=$v;var m1;(function(t){function e(i){let s=i;return s&&Fo.string(s.method)&&(Fo.string(s.id)||Fo.number(s.id))}t.isRequest=e;function n(i){let s=i;return s&&Fo.string(s.method)&&i.id===void 0}t.isNotification=n;function r(i){let s=i;return s&&(s.result!==void 0||!!s.error)&&(Fo.string(s.id)||Fo.number(s.id)||s.id===null)}t.isResponse=r})(m1||(Ae.Message=m1={}))});var Gv=L(As=>{"use strict";var g1;Object.defineProperty(As,"__esModule",{value:!0});As.LRUCache=As.LinkedMap=As.Touch=void 0;var Sn;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(Sn||(As.Touch=Sn={}));var Pd=class{constructor(){this[g1]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=Sn.None){let r=this._map.get(e);if(r)return n!==Sn.None&&this.touch(r,n),r.value}set(e,n,r=Sn.None){let i=this._map.get(e);if(i)i.value=n,r!==Sn.None&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case Sn.None:this.addItemLast(i);break;case Sn.First:this.addItemFirst(i);break;case Sn.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(g1=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Sn.First&&n!==Sn.Last)){if(n===Sn.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===Sn.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}};As.LinkedMap=Pd;var Vv=class extends Pd{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=Sn.AsNew){return super.get(e,n)}peek(e){return super.get(e,Sn.None)}set(e,n){return super.set(e,n,Sn.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};As.LRUCache=Vv});var v1=L(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.Disposable=void 0;var b1;(function(t){function e(n){return{dispose:n}}t.create=e})(b1||(Id.Disposable=b1={}))});var Ps=L(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var Kv;function Jv(){if(Kv===void 0)throw new Error("No runtime abstraction layer installed");return Kv}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Kv=n}t.install=e})(Jv||(Jv={}));Xv.default=Jv});var Ia=L(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.Emitter=Pa.Event=void 0;var _3=Ps(),y1;(function(t){let e={dispose(){}};t.None=function(){return e}})(y1||(Pa.Event=y1={}));var Qv=class{add(e,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i<s;i++)if(this._callbacks[i]===e)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=r.length;s<o;s++)try{n.push(r[s].apply(i[s],e))}catch(l){(0,_3.default)().console.error(l)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Aa=class{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,n,r)=>{this._callbacks||(this._callbacks=new Qv),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,n),i.dispose=Aa._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Pa.Emitter=Aa;Aa._noop=function(){}});var Ld=L(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.CancellationTokenSource=Ma.CancellationToken=void 0;var S3=Ps(),x3=Fa(),Yv=Ia(),Md;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Yv.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Yv.Event.None});function e(n){let r=n;return r&&(r===t.None||r===t.Cancelled||x3.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.is=e})(Md||(Ma.CancellationToken=Md={}));var C3=Object.freeze(function(t,e){let n=(0,S3.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}}),Od=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?C3:(this._emitter||(this._emitter=new Yv.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Zv=class{get token(){return this._token||(this._token=new Od),this._token}cancel(){this._token?this._token.cancel():this._token=Md.Cancelled}dispose(){this._token?this._token instanceof Od&&this._token.dispose():this._token=Md.None}};Ma.CancellationTokenSource=Zv});var w1=L(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.SharedArrayReceiverStrategy=Oa.SharedArraySenderStrategy=void 0;var k3=Ld(),Kc;(function(t){t.Continue=0,t.Cancelled=1})(Kc||(Kc={}));var ey=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Kc.Continue,this.buffers.set(e.id,n),e.$cancellationData=n}async sendCancellation(e,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Kc.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Oa.SharedArraySenderStrategy=ey;var ty=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Kc.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},ny=class{constructor(e){this.token=new ty(e)}cancel(){}dispose(){}},ry=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new k3.CancellationTokenSource:new ny(n)}};Oa.SharedArrayReceiverStrategy=ry});var sy=L(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.Semaphore=void 0;var T3=Ps(),iy=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,T3.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}};Nd.Semaphore=iy});var S1=L(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.ReadableStreamMessageReader=Is.AbstractMessageReader=Is.MessageReader=void 0;var ay=Ps(),La=Fa(),oy=Ia(),E3=sy(),_1;(function(t){function e(n){let r=n;return r&&La.func(r.listen)&&La.func(r.dispose)&&La.func(r.onError)&&La.func(r.onClose)&&La.func(r.onPartialMessage)}t.is=e})(_1||(Is.MessageReader=_1={}));var zd=class{constructor(){this.errorEmitter=new oy.Emitter,this.closeEmitter=new oy.Emitter,this.partialMessageEmitter=new oy.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${La.string(e.message)?e.message:"unknown"}`)}};Is.AbstractMessageReader=zd;var ly;(function(t){function e(n){let r,i,s,o=new Map,l,a=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(s=n.contentDecoder,o.set(s.name,s)),n.contentDecoders!==void 0)for(let c of n.contentDecoders)o.set(c.name,c);if(n.contentTypeDecoder!==void 0&&(l=n.contentTypeDecoder,a.set(l.name,l)),n.contentTypeDecoders!==void 0)for(let c of n.contentTypeDecoders)a.set(c.name,c)}return l===void 0&&(l=(0,ay.default)().applicationJson.decoder,a.set(l.name,l)),{charset:r,contentDecoder:s,contentDecoders:o,contentTypeDecoder:l,contentTypeDecoders:a}}t.fromOptions=e})(ly||(ly={}));var cy=class extends zd{constructor(e,n){super(),this.readable=e,this.options=ly.fromOptions(n),this.buffer=(0,ay.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new E3.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
2
|
+
var i3=Object.create;var Fd=Object.defineProperty;var s3=Object.getOwnPropertyDescriptor;var o3=Object.getOwnPropertyNames;var a3=Object.getPrototypeOf,l3=Object.prototype.hasOwnProperty;var xe=(t,e)=>()=>(t&&(e=t(t=0)),e);var L=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_v=(t,e)=>{for(var n in e)Fd(t,n,{get:e[n],enumerable:!0})},l1=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of o3(e))!l3.call(t,i)&&i!==n&&Fd(t,i,{get:()=>e[i],enumerable:!(r=s3(e,i))||r.enumerable});return t};var pn=(t,e,n)=>(n=t!=null?i3(a3(t)):{},l1(e||!t||!t.__esModule?Fd(n,"default",{value:t,enumerable:!0}):n,t)),Ro=t=>l1(Fd({},"__esModule",{value:!0}),t);var c1=L((Aue,c3)=>{c3.exports={name:"@astrojs/language-server",version:"2.6.3",author:"withastro",license:"MIT",repository:{type:"git",url:"https://github.com/withastro/language-tools",directory:"packages/language-server"},type:"commonjs",main:"dist/index.js",files:["bin","dist/**/*.js","dist/**/*.d.ts","types/**/*.d.ts"],bin:{"astro-ls":"./bin/nodeServer.js"},scripts:{build:"tsc",dev:"tsc --watch",test:"mocha --timeout 10000 --require tsx --require test/takedown.ts test/misc/init.test.ts test/**/*.test.ts","test:match":"pnpm run test -g"},dependencies:{"@astrojs/compiler":"^2.4.0","@jridgewell/sourcemap-codec":"^1.4.15","@volar/kit":"~1.11.1","@volar/language-core":"~1.11.1","@volar/language-server":"~1.11.1","@volar/language-service":"~1.11.1","@volar/source-map":"~1.11.1","@volar/typescript":"~1.11.1","fast-glob":"^3.2.12","muggle-string":"^0.3.1","volar-service-css":"0.0.17","volar-service-emmet":"0.0.17","volar-service-html":"0.0.17","volar-service-prettier":"0.0.17","volar-service-typescript":"0.0.17","volar-service-typescript-twoslash-queries":"0.0.17","vscode-html-languageservice":"^5.1.0","vscode-uri":"^3.0.8"},devDependencies:{"@astrojs/svelte":"^4.0.3","@astrojs/vue":"^3.0.1","@types/chai":"^4.3.5","@types/mocha":"^10.0.1","@types/node":"^18.17.8",astro:"^4.1.0",chai:"^4.3.7",mocha:"^10.2.0",tsx:"^3.12.7",typescript:"^5.2.2","vscode-languageserver-protocol":"^3.17.5","vscode-languageserver-textdocument":"^1.0.11"},peerDependencies:{prettier:"^3.0.0","prettier-plugin-astro":">=0.11.0"},peerDependenciesMeta:{prettier:{optional:!0},"prettier-plugin-astro":{optional:!0}}}});var Ad=L(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.thenable=tn.typedArray=tn.stringArray=tn.array=tn.func=tn.error=tn.number=tn.string=tn.boolean=void 0;function u3(t){return t===!0||t===!1}tn.boolean=u3;function u1(t){return typeof t=="string"||t instanceof String}tn.string=u1;function d3(t){return typeof t=="number"||t instanceof Number}tn.number=d3;function h3(t){return t instanceof Error}tn.error=h3;function d1(t){return typeof t=="function"}tn.func=d1;function h1(t){return Array.isArray(t)}tn.array=h1;function p3(t){return h1(t)&&t.every(e=>u1(e))}tn.stringArray=p3;function f3(t,e){return Array.isArray(t)&&t.every(e)}tn.typedArray=f3;function m3(t){return t&&d1(t.then)}tn.thenable=m3});var Fa=L(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.stringArray=_n.array=_n.func=_n.error=_n.number=_n.string=_n.boolean=void 0;function g3(t){return t===!0||t===!1}_n.boolean=g3;function p1(t){return typeof t=="string"||t instanceof String}_n.string=p1;function b3(t){return typeof t=="number"||t instanceof Number}_n.number=b3;function v3(t){return t instanceof Error}_n.error=v3;function y3(t){return typeof t=="function"}_n.func=y3;function f1(t){return Array.isArray(t)}_n.array=f1;function w3(t){return f1(t)&&t.every(e=>p1(e))}_n.stringArray=w3});var Bv=L(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.Message=Ae.NotificationType9=Ae.NotificationType8=Ae.NotificationType7=Ae.NotificationType6=Ae.NotificationType5=Ae.NotificationType4=Ae.NotificationType3=Ae.NotificationType2=Ae.NotificationType1=Ae.NotificationType0=Ae.NotificationType=Ae.RequestType9=Ae.RequestType8=Ae.RequestType7=Ae.RequestType6=Ae.RequestType5=Ae.RequestType4=Ae.RequestType3=Ae.RequestType2=Ae.RequestType1=Ae.RequestType=Ae.RequestType0=Ae.AbstractMessageSignature=Ae.ParameterStructures=Ae.ResponseError=Ae.ErrorCodes=void 0;var Fo=Fa(),Sv;(function(t){t.ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3})(Sv||(Ae.ErrorCodes=Sv={}));var Gc=class extends Error{constructor(e,n,r){super(n),this.code=Fo.number(e)?e:Sv.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,Gc.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};Ae.ResponseError=Gc;var cn=class{constructor(e){this.kind=e}static is(e){return e===cn.auto||e===cn.byName||e===cn.byPosition}toString(){return this.kind}};Ae.ParameterStructures=cn;cn.auto=new cn("auto");cn.byPosition=new cn("byPosition");cn.byName=new cn("byName");var Tt=class{constructor(e,n){this.method=e,this.numberOfParams=n}get parameterStructures(){return cn.auto}};Ae.AbstractMessageSignature=Tt;var xv=class extends Tt{constructor(e){super(e,0)}};Ae.RequestType0=xv;var Cv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.RequestType=Cv;var kv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.RequestType1=kv;var Tv=class extends Tt{constructor(e){super(e,2)}};Ae.RequestType2=Tv;var Ev=class extends Tt{constructor(e){super(e,3)}};Ae.RequestType3=Ev;var Dv=class extends Tt{constructor(e){super(e,4)}};Ae.RequestType4=Dv;var Rv=class extends Tt{constructor(e){super(e,5)}};Ae.RequestType5=Rv;var Fv=class extends Tt{constructor(e){super(e,6)}};Ae.RequestType6=Fv;var Av=class extends Tt{constructor(e){super(e,7)}};Ae.RequestType7=Av;var Pv=class extends Tt{constructor(e){super(e,8)}};Ae.RequestType8=Pv;var Iv=class extends Tt{constructor(e){super(e,9)}};Ae.RequestType9=Iv;var Mv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.NotificationType=Mv;var Ov=class extends Tt{constructor(e){super(e,0)}};Ae.NotificationType0=Ov;var Lv=class extends Tt{constructor(e,n=cn.auto){super(e,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};Ae.NotificationType1=Lv;var Nv=class extends Tt{constructor(e){super(e,2)}};Ae.NotificationType2=Nv;var zv=class extends Tt{constructor(e){super(e,3)}};Ae.NotificationType3=zv;var qv=class extends Tt{constructor(e){super(e,4)}};Ae.NotificationType4=qv;var jv=class extends Tt{constructor(e){super(e,5)}};Ae.NotificationType5=jv;var Wv=class extends Tt{constructor(e){super(e,6)}};Ae.NotificationType6=Wv;var Uv=class extends Tt{constructor(e){super(e,7)}};Ae.NotificationType7=Uv;var Hv=class extends Tt{constructor(e){super(e,8)}};Ae.NotificationType8=Hv;var $v=class extends Tt{constructor(e){super(e,9)}};Ae.NotificationType9=$v;var m1;(function(t){function e(i){let s=i;return s&&Fo.string(s.method)&&(Fo.string(s.id)||Fo.number(s.id))}t.isRequest=e;function n(i){let s=i;return s&&Fo.string(s.method)&&i.id===void 0}t.isNotification=n;function r(i){let s=i;return s&&(s.result!==void 0||!!s.error)&&(Fo.string(s.id)||Fo.number(s.id)||s.id===null)}t.isResponse=r})(m1||(Ae.Message=m1={}))});var Gv=L(As=>{"use strict";var g1;Object.defineProperty(As,"__esModule",{value:!0});As.LRUCache=As.LinkedMap=As.Touch=void 0;var Sn;(function(t){t.None=0,t.First=1,t.AsOld=t.First,t.Last=2,t.AsNew=t.Last})(Sn||(As.Touch=Sn={}));var Pd=class{constructor(){this[g1]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=Sn.None){let r=this._map.get(e);if(r)return n!==Sn.None&&this.touch(r,n),r.value}set(e,n,r=Sn.None){let i=this._map.get(e);if(i)i.value=n,r!==Sn.None&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case Sn.None:this.addItemLast(i);break;case Sn.First:this.addItemFirst(i);break;case Sn.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(g1=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Sn.First&&n!==Sn.Last)){if(n===Sn.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===Sn.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}};As.LinkedMap=Pd;var Vv=class extends Pd{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=Sn.AsNew){return super.get(e,n)}peek(e){return super.get(e,Sn.None)}set(e,n){return super.set(e,n,Sn.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};As.LRUCache=Vv});var v1=L(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.Disposable=void 0;var b1;(function(t){function e(n){return{dispose:n}}t.create=e})(b1||(Id.Disposable=b1={}))});var Ps=L(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var Kv;function Jv(){if(Kv===void 0)throw new Error("No runtime abstraction layer installed");return Kv}(function(t){function e(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Kv=n}t.install=e})(Jv||(Jv={}));Xv.default=Jv});var Ia=L(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.Emitter=Pa.Event=void 0;var _3=Ps(),y1;(function(t){let e={dispose(){}};t.None=function(){return e}})(y1||(Pa.Event=y1={}));var Qv=class{add(e,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,n)})}remove(e,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i<s;i++)if(this._callbacks[i]===e)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=r.length;s<o;s++)try{n.push(r[s].apply(i[s],e))}catch(l){(0,_3.default)().console.error(l)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Aa=class{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,n,r)=>{this._callbacks||(this._callbacks=new Qv),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,n);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,n),i.dispose=Aa._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Pa.Emitter=Aa;Aa._noop=function(){}});var Ld=L(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.CancellationTokenSource=Ma.CancellationToken=void 0;var S3=Ps(),x3=Fa(),Yv=Ia(),Md;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Yv.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Yv.Event.None});function e(n){let r=n;return r&&(r===t.None||r===t.Cancelled||x3.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.is=e})(Md||(Ma.CancellationToken=Md={}));var C3=Object.freeze(function(t,e){let n=(0,S3.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}}),Od=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?C3:(this._emitter||(this._emitter=new Yv.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Zv=class{get token(){return this._token||(this._token=new Od),this._token}cancel(){this._token?this._token.cancel():this._token=Md.Cancelled}dispose(){this._token?this._token instanceof Od&&this._token.dispose():this._token=Md.None}};Ma.CancellationTokenSource=Zv});var w1=L(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.SharedArrayReceiverStrategy=Oa.SharedArraySenderStrategy=void 0;var k3=Ld(),Kc;(function(t){t.Continue=0,t.Cancelled=1})(Kc||(Kc={}));var ey=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=Kc.Continue,this.buffers.set(e.id,n),e.$cancellationData=n}async sendCancellation(e,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,Kc.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Oa.SharedArraySenderStrategy=ey;var ty=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Kc.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},ny=class{constructor(e){this.token=new ty(e)}cancel(){}dispose(){}},ry=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new k3.CancellationTokenSource:new ny(n)}};Oa.SharedArrayReceiverStrategy=ry});var sy=L(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.Semaphore=void 0;var T3=Ps(),iy=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((n,r)=>{this._waiting.push({thunk:e,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,T3.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=e.thunk();n instanceof Promise?n.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(n),this.runNext())}catch(n){this._active--,e.reject(n),this.runNext()}}};Nd.Semaphore=iy});var S1=L(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.ReadableStreamMessageReader=Is.AbstractMessageReader=Is.MessageReader=void 0;var ay=Ps(),La=Fa(),oy=Ia(),E3=sy(),_1;(function(t){function e(n){let r=n;return r&&La.func(r.listen)&&La.func(r.dispose)&&La.func(r.onError)&&La.func(r.onClose)&&La.func(r.onPartialMessage)}t.is=e})(_1||(Is.MessageReader=_1={}));var zd=class{constructor(){this.errorEmitter=new oy.Emitter,this.closeEmitter=new oy.Emitter,this.partialMessageEmitter=new oy.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${La.string(e.message)?e.message:"unknown"}`)}};Is.AbstractMessageReader=zd;var ly;(function(t){function e(n){let r,i,s,o=new Map,l,a=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(s=n.contentDecoder,o.set(s.name,s)),n.contentDecoders!==void 0)for(let c of n.contentDecoders)o.set(c.name,c);if(n.contentTypeDecoder!==void 0&&(l=n.contentTypeDecoder,a.set(l.name,l)),n.contentTypeDecoders!==void 0)for(let c of n.contentTypeDecoders)a.set(c.name,c)}return l===void 0&&(l=(0,ay.default)().applicationJson.decoder,a.set(l.name,l)),{charset:r,contentDecoder:s,contentDecoders:o,contentTypeDecoder:l,contentTypeDecoders:a}}t.fromOptions=e})(ly||(ly={}));var cy=class extends zd{constructor(e,n){super(),this.readable=e,this.options=ly.fromOptions(n),this.buffer=(0,ay.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new E3.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
3
3
|
${JSON.stringify(Object.fromEntries(r))}`));return}let s=parseInt(i);if(isNaN(s)){this.fireError(new Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}catch(n){this.fireError(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,ay.default)().timer.setTimeout((e,n)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Is.ReadableStreamMessageReader=cy});var E1=L(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.WriteableStreamMessageWriter=Ms.AbstractMessageWriter=Ms.MessageWriter=void 0;var x1=Ps(),Jc=Fa(),D3=sy(),C1=Ia(),R3="Content-Length: ",k1=`\r
|
|
4
4
|
`,T1;(function(t){function e(n){let r=n;return r&&Jc.func(r.dispose)&&Jc.func(r.onClose)&&Jc.func(r.onError)&&Jc.func(r.write)}t.is=e})(T1||(Ms.MessageWriter=T1={}));var qd=class{constructor(){this.errorEmitter=new C1.Emitter,this.closeEmitter=new C1.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,n,r){this.errorEmitter.fire([this.asError(e),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${Jc.string(e.message)?e.message:"unknown"}`)}};Ms.AbstractMessageWriter=qd;var uy;(function(t){function e(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,x1.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,x1.default)().applicationJson.encoder}}t.fromOptions=e})(uy||(uy={}));var dy=class extends qd{constructor(e,n){super(),this.writable=e,this.options=uy.fromOptions(n),this.errorCount=0,this.writeSemaphore=new D3.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(R3,r.byteLength.toString(),k1),i.push(k1),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,n){this.errorCount++,this.fireError(e,n,this.errorCount)}end(){this.writable.end()}};Ms.WriteableStreamMessageWriter=dy});var D1=L(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.AbstractMessageBuffer=void 0;var F3=13,A3=10,P3=`\r
|
|
5
5
|
`,hy=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let n=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,s=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];i=0;t:for(;i<c.length;){switch(c[i]){case F3:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case A3:switch(n){case 1:n=2;break;case 3:n=4,i++;break e;default:n=0}break;default:n=0}i++}s+=c.byteLength,r++}if(n!==4)return;let o=this._read(s+i),l=new Map,a=this.toString(o,"ascii").split(P3);if(a.length<2)return l;for(let c=0;c<a.length-2;c++){let u=a[c],d=u.indexOf(":");if(d===-1)throw new Error(`Message header must separate key and value using ':'
|
|
@@ -641,7 +641,7 @@ $0
|
|
|
641
641
|
|
|
642
642
|
It's unnecessary to specify the charset attribute, because documents must use UTF-8, and the script element inherits its character encoding from the document.`},{name:"define:vars",description:"Passes serializable server-side variables into a client-side script element",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#definevars"}]},{name:"hoist",description:`**Deprecated in Astro >= 0.26.0**
|
|
643
643
|
|
|
644
|
-
Builds, optimizes, and bundles your script with the other JavaScript on the page`,valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/core-concepts/astro-components/#using-hoisted-scripts"}]},{name:"is:inline",description:"Leave a script tag inline in the page template. No processing will be done on its content",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isinline"}]}]},{name:"style",attributes:[{name:"define:vars",description:"Passes serializable server-side variables into a client-side style element",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#definevars"}]},{name:"global",description:"**Deprecated in favor of `is:global` in >= Astro 0.26.0**\n\nOpts-out of automatic CSS scoping, all contents will be available globally",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isglobal"}]},{name:"is:global",description:"Opts-out of automatic CSS scoping, all contents will be available globally",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isglobal"}]},{name:"is:inline",description:"Leave a style tag inline in the page template. No processing will be done on its content",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isinline"}]}]}]});Ui.astroAttributes=(0,md.newHTMLDataProvider)("astro-attributes",{version:1,globalAttributes:[{name:"set:html",description:"Inject unescaped HTML into this tag",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#sethtml"}]},{name:"set:text",description:"Inject escaped text into this tag",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#settext"}]},{name:"is:raw",description:"Instructs the Astro compiler to treat any children of this element as text",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#israw"}]},{name:"transition:animate",description:"Specifies an animation to use with this element on page transition.",references:[{name:"Astro reference",url:"https://docs.astro.build/en/guides/view-transitions/#transition-directives"}]},{name:"transition:name",description:"Specifies a `view-transition-name` for this element. The name
|
|
644
|
+
Builds, optimizes, and bundles your script with the other JavaScript on the page`,valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/core-concepts/astro-components/#using-hoisted-scripts"}]},{name:"is:inline",description:"Leave a script tag inline in the page template. No processing will be done on its content",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isinline"}]}]},{name:"style",attributes:[{name:"define:vars",description:"Passes serializable server-side variables into a client-side style element",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#definevars"}]},{name:"global",description:"**Deprecated in favor of `is:global` in >= Astro 0.26.0**\n\nOpts-out of automatic CSS scoping, all contents will be available globally",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isglobal"}]},{name:"is:global",description:"Opts-out of automatic CSS scoping, all contents will be available globally",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isglobal"}]},{name:"is:inline",description:"Leave a style tag inline in the page template. No processing will be done on its content",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#isinline"}]}]}]});Ui.astroAttributes=(0,md.newHTMLDataProvider)("astro-attributes",{version:1,globalAttributes:[{name:"set:html",description:"Inject unescaped HTML into this tag",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#sethtml"}]},{name:"set:text",description:"Inject escaped text into this tag",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#settext"}]},{name:"is:raw",description:"Instructs the Astro compiler to treat any children of this element as text",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#israw"}]},{name:"transition:animate",description:"Specifies an animation to use with this element on page transition.",references:[{name:"Astro reference",url:"https://docs.astro.build/en/guides/view-transitions/#transition-directives"}]},{name:"transition:name",description:"Specifies a `view-transition-name` for this element. The name must be unique on the page.",references:[{name:"Astro reference",url:"https://docs.astro.build/en/guides/view-transitions/#transition-directives"}]},{name:"transition:persist",description:"Marks this element to be moved to the next page during view transitions.",references:[{name:"Astro reference",url:"https://docs.astro.build/en/guides/view-transitions/#transition-directives"}]},dre]});Ui.astroDirectives=(0,md.newHTMLDataProvider)("astro-directives",{version:1,globalAttributes:[{name:"client:load",description:"Start importing the component JS at page load. Hydrate the component when import completes.",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#clientload"}]},{name:"client:idle",description:"Start importing the component JS as soon as main thread is free (uses requestIdleCallback()). Hydrate the component when import completes.",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#clientidle"}]},{name:"client:visible",description:"Start importing the component JS as soon as the element enters the viewport (uses IntersectionObserver). Hydrate the component when import completes. Useful for content lower down on the page.",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#clientvisible"}]},{name:"client:media",description:"Start importing the component JS as soon as the browser matches the given media query (uses matchMedia). Hydrate the component when import completes. Useful for sidebar toggles, or other elements that should only display on mobile or desktop devices.",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#clientmedia"}]},{name:"client:only",description:"Start importing the component JS at page load and hydrate when the import completes, similar to client:load. The component will be skipped at build time, useful for components that are entirely dependent on client-side APIs. This is best avoided unless absolutely needed, in most cases it is best to render placeholder content on the server and delay any browser API calls until the component hydrates in the browser.",valueSet:"v",references:[{name:"Astro reference",url:"https://docs.astro.build/en/reference/directives-reference/#clientonly"}]}]})});var xq=L(Cc=>{"use strict";var hre=Cc&&Cc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cc,"__esModule",{value:!0});Cc.create=void 0;var pre=Xs(),fre=hre(E0()),mre=eo(),cC=Sq(),gre=$o(),bre=()=>(t,e)=>{let n=(0,fre.default)()(t,e);return t?(n.provide["html/updateCustomData"]?.([cC.astroAttributes,cC.astroElements,cC.classListAttribute]),{...n,async provideCompletionItems(r,i,s,o){if(r.languageId!=="html")return;let[l,a]=t.documents.getVirtualFileByUri(r.uri),c=a?.root;if(!(c instanceof mre.AstroFile))return;if((0,gre.isInComponentStartTag)(c.htmlDocument,r.offsetAt(i)))return null;let u=await n.provideCompletionItems(r,i,s,o);return u?(u.items=u.items.filter(d=>d.kind!==pre.CompletionItemKind.File),u):null},provideDocumentLinks(){return[]}}):{triggerCharacters:n.triggerCharacters}};Cc.create=bre});var Cq=L(xb=>{"use strict";Object.defineProperty(xb,"__esModule",{value:!0});xb.getSnippetCompletions=void 0;var Sb=Xs();function vre(t){if(t.status==="doesnt-exist")return[];let e={line:t.position.start.line,character:t.position.start.column-1};return[{label:"interface Props",kind:Sb.CompletionItemKind.Snippet,labelDetails:{description:"Create a new interface to type your props"},documentation:{kind:"markdown",value:["Create a new interface to type your props.",`
|
|
645
645
|
`,"[Astro reference](https://docs.astro.build/en/guides/typescript/#component-props)"].join(`
|
|
646
646
|
`)},insertTextFormat:2,filterText:"interface props",insertText:`interface Props {
|
|
647
647
|
$1
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"color": "#17191E",
|
|
25
25
|
"theme": "dark"
|
|
26
26
|
},
|
|
27
|
-
"version": "2.6.
|
|
27
|
+
"version": "2.6.3",
|
|
28
28
|
"author": "withastro",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"publisher": "astro-build",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
]
|
|
209
209
|
},
|
|
210
210
|
"devDependencies": {
|
|
211
|
-
"@astrojs/language-server": "^2.6.
|
|
211
|
+
"@astrojs/language-server": "^2.6.3",
|
|
212
212
|
"@astrojs/ts-plugin": "^1.4.0",
|
|
213
213
|
"@types/glob": "^8.1.0",
|
|
214
214
|
"@types/mocha": "^10.0.1",
|