@intersystems-community/ascot 0.0.0-stage → 0.1.1
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/README.md +89 -2
- package/dist/index.d.ts +22 -0
- package/dist/index.js +87 -0
- package/dist/index.js.map +1 -0
- package/generated/ascot.d.ts +43 -0
- package/generated/ascot.js +10205 -0
- package/generated/interfaces/iris-ascot-common.d.ts +210 -0
- package/generated/interfaces/iris-ascot-exported.d.ts +26 -0
- package/generated/interfaces/iris-ascot-imported.d.ts +13 -0
- package/lib/ascot.core.wasm +0 -0
- package/lib/ascot.core2.wasm +0 -0
- package/lib/ascot.core3.wasm +0 -0
- package/package.json +36 -4
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/** @module Interface iris:ascot/common **/
|
|
2
|
+
export interface Position {
|
|
3
|
+
line: number,
|
|
4
|
+
character: number,
|
|
5
|
+
}
|
|
6
|
+
export interface NameInfo {
|
|
7
|
+
before: Position,
|
|
8
|
+
content: string,
|
|
9
|
+
after: Position,
|
|
10
|
+
}
|
|
11
|
+
export interface ParameterInfo {
|
|
12
|
+
t?: string,
|
|
13
|
+
v?: string,
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* # Variants
|
|
17
|
+
*
|
|
18
|
+
* ## `"list"`
|
|
19
|
+
*
|
|
20
|
+
* ## `"array"`
|
|
21
|
+
*/
|
|
22
|
+
export type CollectionKind = 'list' | 'array';
|
|
23
|
+
export interface PropertyInfo {
|
|
24
|
+
t?: string,
|
|
25
|
+
collection?: CollectionKind,
|
|
26
|
+
multidimensional: boolean,
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* # Variants
|
|
30
|
+
*
|
|
31
|
+
* ## `"default"`
|
|
32
|
+
*
|
|
33
|
+
* ## `"output"`
|
|
34
|
+
*
|
|
35
|
+
* ## `"by-ref"`
|
|
36
|
+
*/
|
|
37
|
+
export type ArgMode = 'default' | 'output' | 'by-ref';
|
|
38
|
+
export interface Range {
|
|
39
|
+
start: Position,
|
|
40
|
+
end: Position,
|
|
41
|
+
}
|
|
42
|
+
export interface NormalArg {
|
|
43
|
+
mode: ArgMode,
|
|
44
|
+
name: string,
|
|
45
|
+
t?: string,
|
|
46
|
+
'default'?: string,
|
|
47
|
+
declaredAt?: Range,
|
|
48
|
+
}
|
|
49
|
+
export interface VariadicArg {
|
|
50
|
+
mode: ArgMode,
|
|
51
|
+
name: string,
|
|
52
|
+
t?: string,
|
|
53
|
+
declaredAt?: Range,
|
|
54
|
+
}
|
|
55
|
+
export interface MethodInfo {
|
|
56
|
+
normal: Array<NormalArg>,
|
|
57
|
+
variadic?: VariadicArg,
|
|
58
|
+
t?: string,
|
|
59
|
+
procedureBlock?: Array<string>,
|
|
60
|
+
body: Range,
|
|
61
|
+
}
|
|
62
|
+
export type MemberKind = MemberKindParameter | MemberKindProperty | MemberKindRelationship | MemberKindForeignKey | MemberKindIndex | MemberKindProjection | MemberKindTrigger | MemberKindXData | MemberKindStorage | MemberKindQuery | MemberKindMethod | MemberKindClassMethod | MemberKindClientMethod;
|
|
63
|
+
export interface MemberKindParameter {
|
|
64
|
+
tag: 'parameter',
|
|
65
|
+
val: ParameterInfo,
|
|
66
|
+
}
|
|
67
|
+
export interface MemberKindProperty {
|
|
68
|
+
tag: 'property',
|
|
69
|
+
val: PropertyInfo,
|
|
70
|
+
}
|
|
71
|
+
export interface MemberKindRelationship {
|
|
72
|
+
tag: 'relationship',
|
|
73
|
+
val: string | undefined,
|
|
74
|
+
}
|
|
75
|
+
export interface MemberKindForeignKey {
|
|
76
|
+
tag: 'foreign-key',
|
|
77
|
+
}
|
|
78
|
+
export interface MemberKindIndex {
|
|
79
|
+
tag: 'index',
|
|
80
|
+
}
|
|
81
|
+
export interface MemberKindProjection {
|
|
82
|
+
tag: 'projection',
|
|
83
|
+
}
|
|
84
|
+
export interface MemberKindTrigger {
|
|
85
|
+
tag: 'trigger',
|
|
86
|
+
}
|
|
87
|
+
export interface MemberKindXData {
|
|
88
|
+
tag: 'x-data',
|
|
89
|
+
}
|
|
90
|
+
export interface MemberKindStorage {
|
|
91
|
+
tag: 'storage',
|
|
92
|
+
}
|
|
93
|
+
export interface MemberKindQuery {
|
|
94
|
+
tag: 'query',
|
|
95
|
+
}
|
|
96
|
+
export interface MemberKindMethod {
|
|
97
|
+
tag: 'method',
|
|
98
|
+
val: MethodInfo,
|
|
99
|
+
}
|
|
100
|
+
export interface MemberKindClassMethod {
|
|
101
|
+
tag: 'class-method',
|
|
102
|
+
val: MethodInfo,
|
|
103
|
+
}
|
|
104
|
+
export interface MemberKindClientMethod {
|
|
105
|
+
tag: 'client-method',
|
|
106
|
+
val: MethodInfo,
|
|
107
|
+
}
|
|
108
|
+
export interface MemberInfo {
|
|
109
|
+
doc: string,
|
|
110
|
+
before: Position,
|
|
111
|
+
name: NameInfo,
|
|
112
|
+
aliases: Array<string>,
|
|
113
|
+
deprecated: boolean,
|
|
114
|
+
kind: MemberKind,
|
|
115
|
+
after: Position,
|
|
116
|
+
uri?: string,
|
|
117
|
+
origin?: string,
|
|
118
|
+
}
|
|
119
|
+
export interface ClassInfo {
|
|
120
|
+
doc: string,
|
|
121
|
+
name: NameInfo,
|
|
122
|
+
'extends': Array<string>,
|
|
123
|
+
deprecated: boolean,
|
|
124
|
+
members: Array<MemberInfo>,
|
|
125
|
+
propertyClassNames: Array<string>,
|
|
126
|
+
includes: Array<string>,
|
|
127
|
+
isDatatype?: boolean,
|
|
128
|
+
uri?: string,
|
|
129
|
+
}
|
|
130
|
+
export interface RoutineSource {
|
|
131
|
+
text: string,
|
|
132
|
+
uri?: string,
|
|
133
|
+
}
|
|
134
|
+
export interface Location {
|
|
135
|
+
uri: string,
|
|
136
|
+
range: Range,
|
|
137
|
+
}
|
|
138
|
+
export interface DiagnosticRelatedInformation {
|
|
139
|
+
location: Location,
|
|
140
|
+
message: string,
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* # Variants
|
|
144
|
+
*
|
|
145
|
+
* ## `"error"`
|
|
146
|
+
*
|
|
147
|
+
* ## `"warning"`
|
|
148
|
+
*
|
|
149
|
+
* ## `"information"`
|
|
150
|
+
*
|
|
151
|
+
* ## `"hint"`
|
|
152
|
+
*/
|
|
153
|
+
export type DiagnosticSeverity = 'error' | 'warning' | 'information' | 'hint';
|
|
154
|
+
export interface Diagnostic {
|
|
155
|
+
message: string,
|
|
156
|
+
range: Range,
|
|
157
|
+
relatedInformation: Array<DiagnosticRelatedInformation>,
|
|
158
|
+
severity: DiagnosticSeverity,
|
|
159
|
+
}
|
|
160
|
+
export interface InlayHint {
|
|
161
|
+
position: Position,
|
|
162
|
+
label: string,
|
|
163
|
+
paddingLeft: boolean,
|
|
164
|
+
paddingRight: boolean,
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* # Variants
|
|
168
|
+
*
|
|
169
|
+
* ## `"class"`
|
|
170
|
+
*
|
|
171
|
+
* ## `"module"`
|
|
172
|
+
*
|
|
173
|
+
* ## `"method"`
|
|
174
|
+
*
|
|
175
|
+
* ## `"property"`
|
|
176
|
+
*
|
|
177
|
+
* ## `"interface"`
|
|
178
|
+
*
|
|
179
|
+
* ## `"function"`
|
|
180
|
+
*
|
|
181
|
+
* ## `"constant"`
|
|
182
|
+
*
|
|
183
|
+
* ## `"array"`
|
|
184
|
+
*
|
|
185
|
+
* ## `"object"`
|
|
186
|
+
*
|
|
187
|
+
* ## `"key"`
|
|
188
|
+
*
|
|
189
|
+
* ## `"struct"`
|
|
190
|
+
*
|
|
191
|
+
* ## `"event"`
|
|
192
|
+
*/
|
|
193
|
+
export type SymbolKind = 'class' | 'module' | 'method' | 'property' | 'interface' | 'function' | 'constant' | 'array' | 'object' | 'key' | 'struct' | 'event';
|
|
194
|
+
export interface SymbolInfo {
|
|
195
|
+
name: string,
|
|
196
|
+
kind: SymbolKind,
|
|
197
|
+
deprecated: boolean,
|
|
198
|
+
range: Range,
|
|
199
|
+
selectionRange: Range,
|
|
200
|
+
}
|
|
201
|
+
export interface DocumentSymbol {
|
|
202
|
+
root: SymbolInfo,
|
|
203
|
+
members: Array<SymbolInfo>,
|
|
204
|
+
}
|
|
205
|
+
export interface WorkspaceSymbol {
|
|
206
|
+
name: string,
|
|
207
|
+
kind: SymbolKind,
|
|
208
|
+
deprecated: boolean,
|
|
209
|
+
location: Location,
|
|
210
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @module Interface iris:ascot/exported **/
|
|
2
|
+
export type MemberInfo = import('./iris-ascot-common.js').MemberInfo;
|
|
3
|
+
export type ClassInfo = import('./iris-ascot-common.js').ClassInfo;
|
|
4
|
+
export type Position = import('./iris-ascot-common.js').Position;
|
|
5
|
+
export type Diagnostic = import('./iris-ascot-common.js').Diagnostic;
|
|
6
|
+
export type InlayHint = import('./iris-ascot-common.js').InlayHint;
|
|
7
|
+
export type Range = import('./iris-ascot-common.js').Range;
|
|
8
|
+
export type Location = import('./iris-ascot-common.js').Location;
|
|
9
|
+
export type DocumentSymbol = import('./iris-ascot-common.js').DocumentSymbol;
|
|
10
|
+
export type WorkspaceSymbol = import('./iris-ascot-common.js').WorkspaceSymbol;
|
|
11
|
+
export type IrisConnection = import('./iris-ascot-imported.js').IrisConnection;
|
|
12
|
+
|
|
13
|
+
export class Workspace {
|
|
14
|
+
constructor(env: IrisConnection | undefined)
|
|
15
|
+
open(uri: string, text: string): Array<string>;
|
|
16
|
+
close(uri: string): Array<string>;
|
|
17
|
+
diagnostics(uri: string): Promise<Array<Diagnostic>>;
|
|
18
|
+
inlayHint(uri: string, range: Range): Promise<Array<InlayHint>>;
|
|
19
|
+
definition(uri: string, position: Position): Promise<Location | undefined>;
|
|
20
|
+
references(uri: string, position: Position, includeDeclaration: boolean): Promise<Array<Location>>;
|
|
21
|
+
hover(uri: string, position: Position): Promise<string | undefined>;
|
|
22
|
+
queryCls(query: string): Promise<Array<[string, ClassInfo]>>;
|
|
23
|
+
queryMem(cls: string, query: string): Promise<Array<[string, MemberInfo]>>;
|
|
24
|
+
documentSymbol(uri: string): Promise<DocumentSymbol | undefined>;
|
|
25
|
+
workspaceSymbol(query: string): Promise<Array<WorkspaceSymbol>>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @module Interface iris:ascot/imported **/
|
|
2
|
+
export type ClassInfo = import('./iris-ascot-common.js').ClassInfo;
|
|
3
|
+
export type RoutineSource = import('./iris-ascot-common.js').RoutineSource;
|
|
4
|
+
|
|
5
|
+
export class IrisConnection {
|
|
6
|
+
/**
|
|
7
|
+
* This type does not have a public constructor.
|
|
8
|
+
*/
|
|
9
|
+
private constructor();
|
|
10
|
+
getCls(cls: string): Promise<ClassInfo | undefined>;
|
|
11
|
+
getInc(name: string): Promise<RoutineSource | undefined>;
|
|
12
|
+
getIntOrMac(name: string): Promise<RoutineSource | undefined>;
|
|
13
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intersystems-community/ascot",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "ascot, a type checker and code intelligence engine for InterSystems ObjectScript, for Node and other JS consumers.",
|
|
5
|
+
"license": "MIT OR Apache-2.0",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"intersystems",
|
|
8
|
+
"iris",
|
|
9
|
+
"objectscript",
|
|
10
|
+
"type-checker",
|
|
11
|
+
"static-analysis",
|
|
12
|
+
"language-server",
|
|
13
|
+
"wasm"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/intersystems-community/ascot.git",
|
|
18
|
+
"directory": "bindings/js"
|
|
19
|
+
},
|
|
20
|
+
"main": "dist/index.js",
|
|
21
|
+
"types": "dist/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"generated",
|
|
25
|
+
"lib/*.core*.wasm"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=24"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "bash scripts/build.sh"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@bytecodealliance/jco": "^1.37.0",
|
|
35
|
+
"@types/node": "^26.6.5",
|
|
36
|
+
"typescript": "^7.0.2"
|
|
37
|
+
}
|
|
38
|
+
}
|