File tree 6 files changed +63
-3
lines changed
packages/ansible-language-server
6 files changed +63
-3
lines changed Original file line number Diff line number Diff line change
1
+ fund = false
Original file line number Diff line number Diff line change 2
2
3
3
# Ansible Language Server Change Log
4
4
5
- ## v1.2.2
5
+ ## v1.2.3
6
6
7
7
- No notable changes
8
8
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " test-als" ,
3
+ "version" : " 0.0.1" ,
4
+ "description" : " Test als package" ,
5
+ "main" : " index.js" ,
6
+ "repository" : {
7
+ "type" : " git" ,
8
+ "url" : " the repositories url"
9
+ },
10
+ "author" : " your name" ,
11
+ "license" : " N/A"
12
+ }
Original file line number Diff line number Diff line change 4
4
"displayName" : " Ansible" ,
5
5
"description" : " Ansible language server" ,
6
6
"license" : " MIT" ,
7
- "version" : " 1.2.2 " ,
7
+ "version" : " 1.2.3 " ,
8
8
"contributors" : [
9
9
{
10
10
"name" : " Tomasz Maciążek" ,
32
32
"types" : " ./out/server/src/server.d.ts" ,
33
33
"files" : [
34
34
" icon.png" ,
35
- " out/server/src"
35
+ " ./ out/server/src/**/* "
36
36
],
37
37
"categories" : [
38
38
" Programming Languages"
Original file line number Diff line number Diff line change
1
+ import * as cp from "child_process" ;
2
+ import * as rpc from "vscode-jsonrpc/node" ;
3
+
4
+ const lspProcess = cp . spawn ( "npx" , [ "ansible-language-server" , "--stdio" ] ) ;
5
+
6
+ export type LanguageServer = rpc . MessageConnection ;
7
+
8
+ export const exit = async ( languageServer : rpc . MessageConnection ) => {
9
+ const ret = new Promise ( ( resolve ) => {
10
+ languageServer . onClose ( ( ) => {
11
+ languageServer . dispose ( ) ;
12
+ resolve ( null ) ;
13
+ } ) ;
14
+ } ) ;
15
+
16
+ const notification = new rpc . NotificationType < string > ( "exit" ) ;
17
+ languageServer . sendNotification ( notification ) ;
18
+
19
+ return ret ;
20
+ } ;
21
+
22
+ // Use stdin and stdout for communication:
23
+ const connection = rpc . createMessageConnection (
24
+ new rpc . StreamMessageReader ( lspProcess . stdout ) ,
25
+ new rpc . StreamMessageWriter ( lspProcess . stdin ) ,
26
+ ) ;
27
+
28
+ const notification = new rpc . NotificationType < string > (
29
+ "update/ansible-metadata" ,
30
+ ) ;
31
+
32
+ connection . listen ( ) ;
33
+ connection . sendNotification ( notification ) ;
34
+
35
+ exit ( connection ) ;
36
+ console . log ( "Apparently ALS initialized successfully." ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
9
9
done
10
10
DIR=$( cd -P " $( dirname " $SOURCE " ) " > /dev/null 2>&1 && pwd )
11
11
12
+ # installs the package inside an isolated project and executes its entry point
13
+ # in order to check if we packaged everything needed.
14
+ pushd " ${DIR} /../out/test-als"
15
+ git checkout HEAD -- package.json
16
+ npm add ../../@ansible-ansible-language-server-* .tgz
17
+ npm install
18
+ git checkout HEAD -- package.json
19
+ npx ts-node ../../test/validate-ls.ts
20
+ popd
21
+
22
+
12
23
VERSION=$( jq -r ' .version' " ${DIR} /../package.json" )
13
24
# VIEW=$(npm view "@ansible/ansible-language-server@${VERSION}")
14
25
You can’t perform that action at this time.
0 commit comments