@parcel/lsp-protocol 2.8.3-nightly.2862
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/LICENSE +21 -0
- package/index.ts +1 -0
- package/lib/index.js +80 -0
- package/lib/index.js.map +1 -0
- package/package.json +35 -0
- package/src/index.js +68 -0
- package/tsconfig.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-present Devon Govett
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/index';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RequestImporters = exports.RequestDocumentDiagnostics = exports.NotificationWorkspaceDiagnostics = exports.NotificationBuildStatus = exports.NotificationBuild = void 0;
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
NotificationType,
|
|
10
|
+
NotificationType0,
|
|
11
|
+
NotificationType2,
|
|
12
|
+
RequestType
|
|
13
|
+
} = require('vscode-jsonrpc/node'); // -------------------------------- Typescript-specific definitions
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {import("vscode-languageserver")} lsp
|
|
17
|
+
*
|
|
18
|
+
* @typedef PublishDiagnostic
|
|
19
|
+
* @prop {import('vscode-languageserver').DocumentUri} uri
|
|
20
|
+
* @prop {Array<import('vscode-languageserver').Diagnostics>} diagnostics
|
|
21
|
+
*/
|
|
22
|
+
// -------------------------------- Flow-specific defintions
|
|
23
|
+
|
|
24
|
+
/*::
|
|
25
|
+
export type PublishDiagnostic = {|
|
|
26
|
+
uri: DocumentUri,
|
|
27
|
+
diagnostics: Array<Diagnostic>,
|
|
28
|
+
|};
|
|
29
|
+
|
|
30
|
+
import type {Diagnostic, DocumentUri} from 'vscode-languageserver';
|
|
31
|
+
*/
|
|
32
|
+
// --------------------------------
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @type {RequestType<DocumentUri, Array<DocumentUri> | null, void>}
|
|
36
|
+
*/
|
|
37
|
+
// Request: LSP Server -> Reporter
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
const RequestImporters
|
|
41
|
+
/*: RequestType<DocumentUri, Array<DocumentUri> | null, void> */
|
|
42
|
+
= new RequestType('parcel/request-importers');
|
|
43
|
+
/**
|
|
44
|
+
* @type {RequestType<DocumentUri, Array<Diagnostic> | undefined, void>}
|
|
45
|
+
*/
|
|
46
|
+
// Request: LSP Server -> Reporter
|
|
47
|
+
|
|
48
|
+
exports.RequestImporters = RequestImporters;
|
|
49
|
+
const RequestDocumentDiagnostics
|
|
50
|
+
/*: RequestType<DocumentUri, Array<Diagnostic> | void, void> */
|
|
51
|
+
= new RequestType('parcel/request-document-diagnostics');
|
|
52
|
+
/**
|
|
53
|
+
* @type {NotificationType<Array<PublishDiagnostic>>}
|
|
54
|
+
*/
|
|
55
|
+
// Notification: Reporter -> LSP Server
|
|
56
|
+
|
|
57
|
+
exports.RequestDocumentDiagnostics = RequestDocumentDiagnostics;
|
|
58
|
+
const NotificationWorkspaceDiagnostics
|
|
59
|
+
/*: NotificationType<Array<PublishDiagnostic>> */
|
|
60
|
+
= new NotificationType('parcel/notification-workspace-diagnostics');
|
|
61
|
+
/**
|
|
62
|
+
* @type {NotificationType2<'start' | 'progress' | 'end', string | void>}
|
|
63
|
+
*/
|
|
64
|
+
// Notification: Reporter -> LSP Server
|
|
65
|
+
|
|
66
|
+
exports.NotificationWorkspaceDiagnostics = NotificationWorkspaceDiagnostics;
|
|
67
|
+
const NotificationBuildStatus
|
|
68
|
+
/*: NotificationType2<'start' | 'progress' | 'end', string | void> */
|
|
69
|
+
= new NotificationType2('parcel/notification-build-status'); // --------------------------------
|
|
70
|
+
// Notification: LSP Server -> VSC Extension
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @type {import('vscode-languageserver').NotificationType0}
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
exports.NotificationBuildStatus = NotificationBuildStatus;
|
|
77
|
+
const NotificationBuild
|
|
78
|
+
/*: mixed */
|
|
79
|
+
= new NotificationType0('parcel/notification-build');
|
|
80
|
+
exports.NotificationBuild = NotificationBuild;
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;AACA;iDAAM;kDAAA;kDAAA;4CAAA;AAkCC,MAAMK,4CACX,0CAAgB;AAMX,MAAMC,4CACX,0CAAgB;AAMX,MAAMC,4CACX,+CAAqB;AAMhB,MAAMC,4CACX,gDAAsB,qCAExB,mCAHoC;AAS7B,MAAMC,4CAAiC,gDAC5C","sources":["packages/utils/parcel-lsp-protocol/src/index.js"],"sourcesContent":["// @flow\nconst {\n NotificationType,\n NotificationType0,\n NotificationType2,\n RequestType,\n} = require('vscode-jsonrpc/node');\n\n// -------------------------------- Typescript-specific definitions\n\n/**\n * @typedef {import(\"vscode-languageserver\")} lsp\n *\n * @typedef PublishDiagnostic\n * @prop {import('vscode-languageserver').DocumentUri} uri\n * @prop {Array<import('vscode-languageserver').Diagnostics>} diagnostics\n */\n\n// -------------------------------- Flow-specific defintions\n\n/*::\nexport type PublishDiagnostic = {|\n uri: DocumentUri,\n diagnostics: Array<Diagnostic>,\n|};\n\nimport type {Diagnostic, DocumentUri} from 'vscode-languageserver';\n*/\n\n// --------------------------------\n\n/**\n * @type {RequestType<DocumentUri, Array<DocumentUri> | null, void>}\n */\n// Request: LSP Server -> Reporter\nexport const RequestImporters /*: RequestType<DocumentUri, Array<DocumentUri> | null, void> */ =\n new RequestType('parcel/request-importers');\n\n/**\n * @type {RequestType<DocumentUri, Array<Diagnostic> | undefined, void>}\n */\n// Request: LSP Server -> Reporter\nexport const RequestDocumentDiagnostics /*: RequestType<DocumentUri, Array<Diagnostic> | void, void> */ =\n new RequestType('parcel/request-document-diagnostics');\n\n/**\n * @type {NotificationType<Array<PublishDiagnostic>>}\n */\n// Notification: Reporter -> LSP Server\nexport const NotificationWorkspaceDiagnostics /*: NotificationType<Array<PublishDiagnostic>> */ =\n new NotificationType('parcel/notification-workspace-diagnostics');\n\n/**\n * @type {NotificationType2<'start' | 'progress' | 'end', string | void>}\n */\n// Notification: Reporter -> LSP Server\nexport const NotificationBuildStatus /*: NotificationType2<'start' | 'progress' | 'end', string | void> */ =\n new NotificationType2('parcel/notification-build-status');\n\n// --------------------------------\n\n// Notification: LSP Server -> VSC Extension\n/**\n * @type {import('vscode-languageserver').NotificationType0}\n */\nexport const NotificationBuild /*: mixed */ = new NotificationType0(\n 'parcel/notification-build',\n);\n"],"names":["NotificationType","NotificationType0","NotificationType2","RequestType","require","RequestImporters","RequestDocumentDiagnostics","NotificationWorkspaceDiagnostics","NotificationBuildStatus","NotificationBuild"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@parcel/lsp-protocol",
|
|
3
|
+
"version": "2.8.3-nightly.2862+723e84437",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "opencollective",
|
|
10
|
+
"url": "https://opencollective.com/parcel"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/parcel-bundler/parcel.git"
|
|
15
|
+
},
|
|
16
|
+
"main": "lib/index.js",
|
|
17
|
+
"source": "src/index.js",
|
|
18
|
+
"types": "src/index.js",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"watch": "tsc -watch -p ./"
|
|
21
|
+
},
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">= 12.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"typescript": ">=3.0.0"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"vscode-jsonrpc": "^8.0.2"
|
|
30
|
+
},
|
|
31
|
+
"targets": {
|
|
32
|
+
"types": false
|
|
33
|
+
},
|
|
34
|
+
"gitHead": "723e8443757cfb12a1a3af8180f0d923e666e1aa"
|
|
35
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
const {
|
|
3
|
+
NotificationType,
|
|
4
|
+
NotificationType0,
|
|
5
|
+
NotificationType2,
|
|
6
|
+
RequestType,
|
|
7
|
+
} = require('vscode-jsonrpc/node');
|
|
8
|
+
|
|
9
|
+
// -------------------------------- Typescript-specific definitions
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {import("vscode-languageserver")} lsp
|
|
13
|
+
*
|
|
14
|
+
* @typedef PublishDiagnostic
|
|
15
|
+
* @prop {import('vscode-languageserver').DocumentUri} uri
|
|
16
|
+
* @prop {Array<import('vscode-languageserver').Diagnostics>} diagnostics
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
// -------------------------------- Flow-specific defintions
|
|
20
|
+
|
|
21
|
+
/*::
|
|
22
|
+
export type PublishDiagnostic = {|
|
|
23
|
+
uri: DocumentUri,
|
|
24
|
+
diagnostics: Array<Diagnostic>,
|
|
25
|
+
|};
|
|
26
|
+
|
|
27
|
+
import type {Diagnostic, DocumentUri} from 'vscode-languageserver';
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
// --------------------------------
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @type {RequestType<DocumentUri, Array<DocumentUri> | null, void>}
|
|
34
|
+
*/
|
|
35
|
+
// Request: LSP Server -> Reporter
|
|
36
|
+
export const RequestImporters /*: RequestType<DocumentUri, Array<DocumentUri> | null, void> */ =
|
|
37
|
+
new RequestType('parcel/request-importers');
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @type {RequestType<DocumentUri, Array<Diagnostic> | undefined, void>}
|
|
41
|
+
*/
|
|
42
|
+
// Request: LSP Server -> Reporter
|
|
43
|
+
export const RequestDocumentDiagnostics /*: RequestType<DocumentUri, Array<Diagnostic> | void, void> */ =
|
|
44
|
+
new RequestType('parcel/request-document-diagnostics');
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @type {NotificationType<Array<PublishDiagnostic>>}
|
|
48
|
+
*/
|
|
49
|
+
// Notification: Reporter -> LSP Server
|
|
50
|
+
export const NotificationWorkspaceDiagnostics /*: NotificationType<Array<PublishDiagnostic>> */ =
|
|
51
|
+
new NotificationType('parcel/notification-workspace-diagnostics');
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @type {NotificationType2<'start' | 'progress' | 'end', string | void>}
|
|
55
|
+
*/
|
|
56
|
+
// Notification: Reporter -> LSP Server
|
|
57
|
+
export const NotificationBuildStatus /*: NotificationType2<'start' | 'progress' | 'end', string | void> */ =
|
|
58
|
+
new NotificationType2('parcel/notification-build-status');
|
|
59
|
+
|
|
60
|
+
// --------------------------------
|
|
61
|
+
|
|
62
|
+
// Notification: LSP Server -> VSC Extension
|
|
63
|
+
/**
|
|
64
|
+
* @type {import('vscode-languageserver').NotificationType0}
|
|
65
|
+
*/
|
|
66
|
+
export const NotificationBuild /*: mixed */ = new NotificationType0(
|
|
67
|
+
'parcel/notification-build',
|
|
68
|
+
);
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"target": "es6",
|
|
5
|
+
"outDir": "lib",
|
|
6
|
+
"lib": ["es6"],
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"rootDir": "src",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"allowJs": true
|
|
11
|
+
},
|
|
12
|
+
"include": ["src/*"],
|
|
13
|
+
"exclude": ["node_modules", ".vscode-test"]
|
|
14
|
+
}
|