Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ header:
- '.licenserc.yaml'
- 'frontend/.yarn/**'
- 'amber/src/main/python/proto/**'
- 'pyright-language-service/**'
25 changes: 6 additions & 19 deletions pyright-language-service/src/language-server-runner.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox and others.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
// The source file can be referred to: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/common/node/language-server-runner.ts

import {WebSocketServer} from "ws";
import {Server} from 'node:http';
Expand Down Expand Up @@ -46,4 +33,4 @@ export const runLanguageServer = (
server: httpServer,
wss
});
};
};
19 changes: 1 addition & 18 deletions pyright-language-service/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
//The source file can be referred to: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/python/server/main.ts

import {dirname, resolve} from "node:path";
import {runLanguageServer} from "./language-server-runner.ts";
Expand Down
26 changes: 6 additions & 20 deletions pyright-language-service/src/server-commons.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/* --------------------------------------------------------------------------------------------
* Copyright (c) 2024 TypeFox and others.
* Licensed under the MIT License. See LICENSE in the package root for license information.
* ------------------------------------------------------------------------------------------ */
//The source file can be referred to: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/common/node/server-commons.ts
import {ServerOptions, WebSocketServer} from "ws";
import {IncomingMessage, Server} from "node:http";
import {fileURLToPath, URL} from "node:url";
Expand Down Expand Up @@ -116,4 +102,4 @@ export const upgradeWsServer = (runconfig: LanguageServerRunConfig,
export const getLocalDirectory = (referenceUrl: string | URL) => {
const __filename = fileURLToPath(referenceUrl);
return dirname(__filename);
};
};
21 changes: 1 addition & 20 deletions pyright-language-service/src/types/hocon-parser.d.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

declare module 'hocon-parser' {
/**
* The module itself is callable, accepting a string (HOCON config) and returning a parsed object.
*/
function hoconParser(input: string): any;

export = hoconParser;
}
}
Loading