-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathtypes.ts
More file actions
245 lines (207 loc) Β· 5.83 KB
/
types.ts
File metadata and controls
245 lines (207 loc) Β· 5.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
import { Variables } from "./variables";
export type DeploymentMethod = "all" | "staged" | "unstaged" | "changed" | "compare" | "selected";
export interface StandardIO {
onStdout?: (data: Buffer) => void;
onStderr?: (data: Buffer) => void;
stdin?: string;
}
/**
* External interface for extensions to call `code-for-ibmi.runCommand`
*/
export type ActionType = "member" | "streamfile" | "object" | "file";
export type ActionRefresh = "no" | "parent" | "filter" | "browser";
export type ActionEnvironment = "ile" | "qsh" | "pase";
export enum CcsidOrigin {
User = "user",
System = "system",
};
export interface RemoteCommand {
title?: string;
command: string;
environment?: ActionEnvironment;
cwd?: string;
env?: Record<string, string> | Variables;
noLibList?: boolean,
getSpooledFiles?: boolean
}
export interface CommandData extends StandardIO {
command: string;
directory?: string;
env?: Record<string, string>;
}
export interface CommandResult {
code: number;
signal?: string | null;
stdout: string;
stderr: string;
command?: string;
}
export interface Action {
name: string
command: string
type?: ActionType
environment: ActionEnvironment
extensions?: string[]
deployFirst?: boolean
postDownload?: string[]
refresh?: ActionRefresh
runOnProtected?: boolean
outputToFile?: string
}
export interface ActionResult {
success: boolean,
output: {
path: string,
processed: boolean,
hasRun: boolean,
executionOK: boolean,
output: string[]
}[],
message: string
}
export interface ConnectionData {
name: string;
host: string;
port: number;
username: string;
password?: string;
privateKeyPath?: string;
passphrase?:string;
keepaliveInterval?: number;
readyTimeout?: number;
sshDebug?: boolean;
enableMfa?: boolean;
}
export interface Server {
name: string
}
export interface QsysPath {
asp?: string,
library: string,
name: string,
}
export interface IBMiObject extends QsysPath {
type: string,
text: string,
sourceFile?: boolean
attribute?: string,
sourceLength?: number
size?: number
created?: Date
changed?: Date
created_by?: string
owner?: string
}
export interface IBMiMember {
library: string
file: string
name: string
extension: string
recordLength?: number
text?: string
asp?: string
lines?: number
created?: Date
changed?: Date
}
export interface IFSFile {
type: "directory" | "streamfile"
name: string
path: string
size?: number
modified?: Date
owner?: string
}
export interface IBMiError {
code: string
text: string
}
export interface FileError {
sev: number
lineNum: number
toLineNum: number
column: number
toColumn: number
text: string
code: string
}
export interface QsysFsOptions {
readonly?: boolean
libraries?: string
}
export type IBMiEvent = "connected" | "disconnected" | "deployLocation" | "deploy"
export interface WithPath {
path: string
}
export interface WithLibrary {
library: string
}
export type FocusOptions = { select?: boolean; focus?: boolean; expand?: boolean | number }
export type IBMiMessage = {
id: string
text: string
}
export type IBMiMessages = {
messages: IBMiMessage[]
findId(id: string): IBMiMessage | undefined
}
export const OBJECT_BROWSER_MIMETYPE = "application/vnd.code.tree.objectbrowser";
export const IFS_BROWSER_MIMETYPE = "application/vnd.code.tree.ifsbrowser";
export const LIBRARY_LIST_MIMETYPE = "application/vnd.code.tree.libraryListView";
export const URI_LIST_MIMETYPE = "text/uri-list";
export const URI_LIST_SEPARATOR = "\r\n";
export type ObjectBrowserDrag = {
library: string
object: string
type: string
member?: string
}
export interface WrapResult {
newStatements: string[];
outStmf: string;
}
export type SpecialAuthorities = "*ALLOBJ" | "*AUDIT" | "*IOSYSCFG" | "*JOBCTL" | "*SAVSYS" | "*SECADM" | "*SERVICE" | "*SPLCTL";
export type AttrOperands = 'ACCESS_TIME' | 'ALLOC_SIZE' | 'ALLOC_SIZE_64' | 'ALWCKPWR' | 'ALWSAV' | 'ASP' | 'AUDIT' | 'AUTH_GROUP' | 'AUTH_LIST_NAME' | 'AUTH_OWNER' | 'AUTH_USERS' | 'CCSID' | 'CHANGE_TIME' | 'CHECKED_OUT' | 'CHECKED_OUT_USER' | 'CHECKED_OUT_TIME' | 'CODEPAGE' | 'CREATE_TIME' | 'CRTOBJAUD' | 'CRTOBJSCAN' | 'DATA_SIZE' | 'DATA_SIZE_64' | 'DIR_FORMAT' | 'DISK_STG_OPT' | 'EXTENDED_ATTR_SIZE' | 'FILE_FORMAT' | 'FILE_ID' | 'JOURNAL_APPLY_CHANGES' | 'JOURNAL_ID' | 'JOURNAL_LIBRARY' | 'JOURNAL_NAME' | 'JOURNAL_OPTIONS' | 'JOURNAL_RCVR_ASP' | 'JOURNAL_RCVR_LIBRARY' | 'JOURNAL_RCVR_NAME' | 'JOURNAL_ROLLBACK_ENDED' | 'JOURNAL_START_TIME' | 'JOURNAL_STATUS' | 'LOCAL_REMOTE' | 'MAIN_STG_OPT' | 'MODIFY_TIME' | 'MULT_SIGS' | 'OBJTYPE' | 'PC_ARCHIVE' | 'PC_HIDDEN' | 'PC_READ_ONLY' | 'PC_SYSTEM' | 'RSTDRNMUNL' | 'SCAN' | 'SCAN_BINARY' | 'SCAN_CCSID1' | 'SCAN_CCSID2' | 'SCAN_SIGS_DIFF' | 'SCAN_STATUS' | 'SGID' | 'SIGNED' | 'STG_FREE' | 'SUID' | 'SYSTEM_ARCHIVE' | 'SYSTEM_USE' | 'SYS_SIGNED' | 'UDFS_DEFAULT_FORMAT' | 'USAGE_DAYS_USED' | 'USAGE_LAST_USED_TIME' | 'USAGE_RESET_TIME';
export type SearchResults = {
term: string,
hits: SearchHit[]
}
export type SearchHit = {
path: string
lines: SearchHitLine[]
readonly?: boolean
label?: string
}
export type SearchHitLine = {
number: number
content: string
}
export interface AspInfo {
id: number;
name: string;
type: string;
rdbName: string;
}
export interface ProgramExportImportInfo {
programLibrary: string,
programName: string,
objectType: string,
symbolName: string,
symbolUsage: string,
argumentOptimization: string,
dataItemSize: number
}
export interface ModuleExport {
moduleLibrary: string,
moduleName: string,
moduleAttr: string,
symbolName: string,
symbolType: string,
argumentOptimization: string,
}
export type EditorPath = string | { fsPath: string };
export interface CacheItem<T> {
value: T;
createdAt?: number; // milliseconds elapsed since the epoch
}
export * from "./configuration/config/types";