-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpackage.json
More file actions
562 lines (562 loc) · 18.6 KB
/
Copy pathpackage.json
File metadata and controls
562 lines (562 loc) · 18.6 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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
{
"name": "ui5plugin",
"displayName": "SAPUI5 Extension",
"description": "Extension for working with UI5 projects",
"version": "1.21.1",
"publisher": "iljapostnovs",
"license": "Apache-2.0",
"author": "Ilja Postnovs <ilja.postnovs@gmail.com>",
"contributors": [
"Ilja Postnovs <ilja.postnovs@gmail.com>"
],
"repository": {
"type": "git",
"url": "https://github.com/iljapostnovs/VSCodeUI5Plugin.git"
},
"bugs": {
"url": "https://github.com/iljapostnovs/VSCodeUI5Plugin/issues"
},
"sponsor": {
"url": "https://github.com/sponsors/iljapostnovs"
},
"icon": "images/ui5.png",
"homepage": "https://github.com/iljapostnovs/VSCodeUI5Plugin/blob/master/README.md",
"funding": [
{
"type": "paypal",
"url": "https://www.paypal.com/donate/?hosted_button_id=HPZ5FA8C3KJ6W"
},
{
"type": "github",
"url": "https://github.com/sponsors/iljapostnovs"
},
{
"type": "individual",
"url": "https://donate.cafe/iljapostnovs"
}
],
"engines": {
"vscode": "^1.86.0"
},
"categories": [
"Linters",
"Programming Languages"
],
"activationEvents": [
"onStartupFinished"
],
"keywords": [
"ui5",
"openui5",
"sapui5",
"fiori",
"linter",
"sap"
],
"main": "./dist/extension.js",
"scripts": {
"vscode:prepublish": "npx webpack --mode production",
"webpack": "npx webpack --mode development",
"webpack-dev": "npx webpack --mode development --watch",
"compile": "npx webpack --mode none",
"compilets": "npx tsc",
"lint": "eslint src",
"test:js": "node ./dist/test/js/TestRunner.js",
"test:ts": "node ./dist/test/ts/TestRunner.js",
"test:ws:multijs": "node ./dist/test/ws/TestRunnerMultiJS.js",
"test:ws:multits": "node ./dist/test/ws/TestRunnerMultiTS.js",
"pretest:js": "npm run compilets",
"pretest:ts": "npm run compilets && cd ./src/test/ts/project && npm install",
"pretest:ws:multijs": "npm run compilets",
"pretest:ws:multits": "npm run compilets && cd ./src/test/ws/project/mix/multits/app1 && npm install && cd ../app2 && npm install",
"watch": "npm run compilets",
"install_ext": "vsce package && PowerShell -Command \"code --install-extension $(node -p -e '`ui5plugin-` + require(`./package.json`).version + `.vsix`')\""
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.30",
"@types/vscode": "^1.86.0",
"@types/webpack": "^5.28.5",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@vscode/test-electron": "^2.5.2",
"axios": "^1.8.4",
"clean-webpack-plugin": "^4.0.0",
"eslint": "^8.56.0",
"mocha": "^11.1.0",
"ts-loader": "^9.5.2",
"webpack": "^5.99.5",
"typescript": "5.8.3",
"webpack-cli": "^6.0.1"
},
"dependencies": {
"ui5plugin-linter": "1.17.1",
"ui5plugin-parser": "1.10.1"
},
"contributes": {
"views": {
"explorer": [
{
"id": "ui5Explorer",
"name": "UI5 Explorer"
},
{
"id": "ui5projectdata",
"name": "UI5 Project Data"
}
]
},
"menus": {
"view/title": [
{
"command": "ui5plugin.refreshClassTree",
"when": "view == ui5Explorer",
"group": "navigation"
},
{
"command": "ui5plugin.refreshUI5ProjectDataTree",
"when": "view == ui5projectdata",
"group": "navigation"
},
{
"command": "ui5plugin.expandClassTree",
"when": "view == ui5Explorer",
"group": "navigation"
}
]
},
"jsonValidation": [
{
"fileMatch": [
"**/manifest.json"
],
"url": "https://raw.githubusercontent.com/SAP/ui5-manifest/master/schema.json"
},
{
"fileMatch": [
"**/package.json",
"**/.ui5pluginrc",
"**/.ui5pluginrc.json"
],
"url": "./schema/packageSchema.json"
}
],
"keybindings": [
{
"command": "editor.action.quickFix",
"key": "alt+enter"
},
{
"command": "ui5plugin.insertCustomClassName",
"key": "f6"
},
{
"command": "ui5plugin.moveDefineToFunctionParameters",
"key": "f5"
},
{
"command": "ui5plugin.switchBetweenVC",
"key": "f3"
},
{
"command": "ui5plugin.exportToi18n",
"key": "f4"
}
],
"configuration": {
"title": "SAPUI5 Plugin",
"properties": {
"ui5.plugin.jsCodeLens": {
"type": "boolean",
"default": true,
"description": "Should javascript CodeLens be enabled"
},
"ui5.plugin.jsReferenceCodeLens": {
"type": "boolean",
"default": true,
"description": "Should javascript Reference CodeLens be enabled"
},
"ui5.plugin.xmlCodeLens": {
"type": "boolean",
"default": true,
"description": "Should xml CodeLens be enabled"
},
"ui5.plugin.propertiesCodeLens": {
"type": "boolean",
"default": true,
"description": "Should properties CodeLens be enabled"
},
"ui5.plugin.signatureHelp": {
"type": "boolean",
"default": true,
"description": "Should UI5 Signature Help be enabled"
},
"ui5.plugin.moveDefineToFunctionParametersOnAutocomplete": {
"type": "boolean",
"default": true,
"description": "Should sap.ui.define class names be moved to function parameters on sap.ui.define autocomplition"
},
"ui5.plugin.codeGeneratorStrategy": {
"type": "string",
"enum": [
"ES5",
"ES6"
],
"default": "ES5",
"description": "Strategy which should be used for code generation. E.g. you will get 'var' with ES5 strategy and 'let' with ES6 strategy when using override completion items."
},
"ui5.plugin.UMLDiagramGenerationStrategy": {
"type": "string",
"enum": [
"DrawIO",
"PlantUML"
],
"default": "PlantUML",
"description": "Which format should be used for UML diagram generation"
},
"ui5.plugin.addI18nTextLengthLimitation": {
"type": "boolean",
"default": true,
"description": "Should text length be added to i18n text id (e.g. #YMSG,14)"
},
"ui5.plugin.textTransformationStrategy": {
"type": "string",
"enum": [
"Pascal Case",
"Snake Upper Case"
],
"default": "Pascal Case",
"description": "Case type which should be used for i18n text id proposal"
},
"ui5.plugin.askUserToConfirmI18nId": {
"type": "boolean",
"default": true,
"description": "Should user confirm proposed i18n id"
},
"ui5.plugin.addInheritedPropertiesAndAggregations": {
"type": "boolean",
"default": false,
"description": "Should inherited properties/aggregations be added in XML completion items"
},
"ui5.plugin.addTagAttributes": {
"type": "boolean",
"default": true,
"description": "Should tag attributes be added in XML completion items"
},
"ui5.plugin.addTagAggregations": {
"type": "boolean",
"default": true,
"description": "Should tag aggregations be added in XML completion items"
},
"ui5.plugin.tsEventModule": {
"type": "string",
"description": "Event module for Typescript, which will be used when creating event handler from XML",
"default": "sap/ui/base/Event"
},
"ui5.plugin.tsEventType": {
"type": "string",
"markdownDescription": "Event type for Typescript, which will be used when creating event handler from XML. (e.g. type of `sap/ui/base/Event` is `Event`). There are four possible optional variables used for replacing: `{classModule}`, `{className}`, `{eventName}`, `{tsEventParameters}`, `{tsEvent}`. Example: if the value for this property is `Event<\"{classModule}\", \"{eventName}\">`, and you are inserting `change` event from `sap.m.Table`, the result will be `oEvent: Event<\"sap/m/Table\", \"change\">`. \n\n> **Hint!** It is recommended to use `{tsEvent}` for TS projects after UI5 Version `1.115.1`+, it will insert event types automatically if the event handler is created from XML.",
"examples": [
"{tsEvent}",
"Event<{tsEventParameters}>"
],
"default": "Event"
},
"ui5.plugin.insertManagedObjectModule": {
"type": "string",
"description": "Module which will be used for automatic insertion on custom class creation",
"default": "sap/ui/base/ManagedObject"
},
"ui5.plugin.insertControllerModule": {
"type": "string",
"description": "Module which will be used for automatic insertion on custom controller creation",
"default": "sap/ui/core/mvc/Controller"
},
"ui5.plugin.xmlFormatterTagEndingNewline": {
"type": "boolean",
"default": true,
"description": "Should XML Formatter put tag ending (\">\", \"/>\") on newline"
},
"ui5.plugin.xmlFormatterSpaceAfterSelfTagEnd": {
"type": "boolean",
"default": true,
"description": "Should XML Formatter leave a space between the last attribute and the self tag end (\"/>\")"
},
"ui5.plugin.umlGenerationPath": {
"type": "string",
"default": "",
"markdownDescription": "Path for file generated by `UI5: Generate UML Class diagram for whole project` command. Relative to project folder. Example: `../diagram/ClassDiagram.pu`"
},
"ui5.plugin.XMLFileInterfacePath": {
"type": "string",
"default": "",
"markdownDescription": "Path for file generated by `UI5: (TS) Generate types for XML files (id to class mapping)` command. Relative to project folder. Example: `./types/ViewFragmentIds.d.ts`"
},
"ui5.plugin.generateXMLFileInterfacesOnSave": {
"type": "boolean",
"default": false,
"title": "Generate types for XML files on save",
"markdownDescription": "Should `UI5: (TS) Generate types for XML files (id to class mapping)` command be executed on XML file save or not. Works only if `ui5.plugin.XMLFileInterfacePath` is set. Works only for TS projects."
},
"ui5.plugin.TSODataInterfacesPath": {
"type": "string",
"default": "",
"markdownDescription": "Path for file generated by `UI5: (TS) Generate interfaces for OData entities` command. Relative to project folder. Example: `./types/ODataTypes.d.ts`"
},
"ui5.plugin.TSODataInterfacesFetchingData": {
"type": "object",
"default": {},
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"url": {
"type": "string"
}
},
"markdownDescription": "URL, username and password for `UI5: (TS) Generate interfaces for OData entities` command."
},
"ui5.plugin.massTSODataInterfacesFetchingData": {
"type": "array",
"default": [],
"items": {
"type": "object",
"default": {},
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"url": {
"type": "string",
"description": "URL to metadata"
},
"path": {
"type": "string",
"description": "Path for file where result will be put. Relative to project folder. Example: `./types/ODataTypes.d.ts`"
}
}
},
"markdownDescription": "Array of URL, username and password for `UI5: (TS) Generate interfaces for OData entities` command (Mass)."
},
"ui5.plugin.ERDiagramPath": {
"type": "string",
"default": "",
"markdownDescription": "Path for file generated by `UI5: Generate ER diagram from metadata.xml` command. Relative to project folder. Example: `../diagram/ERDiagram.pu`"
},
"ui5.plugin.JSTypeDefDocPath": {
"type": "string",
"default": "",
"markdownDescription": "Path for file generated by `UI5: Generate JS typedef JSDoc from metadata` command. Relative to project folder. Example: `./model/ModelTypedef.js`"
},
"ui5.plugin.globalConfigurationPath": {
"type": "string",
"default": "",
"markdownDescription": "Absolute path to global `any_file.json` configuration file, which is used by `UI5 Parser` and `UI5 Linter`. Priority of ui5 config determination: local `package.json` -> global `any_file.json` -> default value. Example: `C:\\Users\\MyUser\\Documents\\ui5config.json`"
},
"ui5.plugin.idGenerationFormula": {
"type": "string",
"default": "id{MeaningAssumption}{TabStop}{Counter}{ControlName}",
"markdownDescription": "Formula for id generation. There are four variables available: `{MeaningAssumption}`, `{Counter}`, `{TabStop}` and `{ControlName}`. \n\n`{MeaningAssumption}` generation is taken from [ui5plugin-linter](https://github.com/iljapostnovs/ui5plugin-linter/blob/master/README.md#meaningassumption-variable). \n\n`{MeaningAssumption}` and `{ControlName}` can be presented in camelCase: `{meaningAssumption}` and `{controlName}`. \n\n`{Counter}` is a number, which will be added in case if same ids will be generated.\n\n`{TabStop}` is used for XML Completion Items, it indicates where the selection will be at after applying completion item. \n\nThis preference entry is used by `ui5plugin.generateIds` command and XML Completion items."
},
"ui5.plugin.eventHandlerGenerationFormula": {
"type": "string",
"default": "on{MeaningAssumption}{TabStop}{ControlName}{EventName}",
"markdownDescription": "Formula for event handler name generation. There are four variables available: `{MeaningAssumption}`, `{EventName}`, `{TabStop}` and `{ControlName}`. \n\n`{MeaningAssumption}` generation is taken from [ui5plugin-linter](https://github.com/iljapostnovs/ui5plugin-linter/blob/master/README.md#meaningassumption-variable). \n\n`{MeaningAssumption}`, `{EventName}` and `{ControlName}` can be presented in camelCase: `{meaningAssumption}`, `{eventName}` and `{controlName}`.\n\n`{TabStop}` is used for XML Completion Items, it indicates where the selection will be at after applying completion item."
},
"ui5.plugin.generateIdsCommandData": {
"type": "object",
"default": {
"excludeClasses": [
"sap.ui.core.mvc.View",
"sap.ui.core.FragmentDefinition"
],
"generateIdsForElements": true
},
"properties": {
"excludeClasses": {
"type": "array",
"items": {
"type": "string"
},
"markdownDescription": "Array of classes to be excluded from ID generation. E.g. `[\"sap.ui.core.mvc.View\"]`"
},
"generateIdsForElements": {
"type": "boolean",
"markdownDescription": "If ids should be generated for Elements as well, or for Controls only"
}
},
"markdownDescription": "Data for `ui5plugin.generateIds` command. Contains array of classes to be excluded from ID generation and a flag if IDs should be generated for Elements as well, or for Controls only"
},
"ui5.plugin.bulkExportToi18nCommandData": {
"type": "array",
"default": [
{
"className": "*",
"properties": [
"text",
"title",
"info",
"placeholder",
"tooltip",
"iconTooltip",
"intro"
]
},
{
"className": "sap.m.ListItemBase",
"applyToChildren": true,
"properties": [
"highlightText"
]
},
{
"className": "sap.m.ListBase",
"applyToChildren": true,
"properties": [
"footerText",
"growingTriggerText",
"headerText",
"noDataText"
]
}
],
"items": {
"type": "object",
"default": {
"className": "",
"applyToChildren": true,
"properties": [
""
]
},
"required": [
"className",
"properties"
],
"properties": {
"className": {
"type": "string",
"markdownDescription": "Class name for which rule will be applied. Example: `sap.m.Button`, `*`"
},
"applyToChildren": {
"type": "boolean",
"markdownDescription": "If current rule should be applied for children classes"
},
"properties": {
"type": "array",
"items": {
"type": "string"
},
"markdownDescription": "List of properties which should be exported. Example: `[\"text\"]`"
}
}
},
"markdownDescription": "Data for `ui5plugin.bulkExportToi18n` command. Contains data about which proprties should be exported to i18n."
},
"ui5.plugin.parsingDelay": {
"type": "number",
"default": 500,
"markdownDescription": "Delay for parsing JS/TS files. Increase it for large projects to gain in performance."
}
}
},
"commands": [
{
"command": "ui5plugin.refreshClassTree",
"title": "UI5: Refresh class tree",
"icon": {
"light": "icons/light/refresh.svg",
"dark": "icons/dark/refresh.svg"
}
},
{
"command": "ui5plugin.refreshUI5ProjectDataTree",
"title": "UI5: Refresh project data tree",
"icon": {
"light": "icons/light/refresh.svg",
"dark": "icons/dark/refresh.svg"
}
},
{
"command": "ui5plugin.openNewDocument",
"title": "UI5: Open new document"
},
{
"command": "ui5plugin.expandClassTree",
"title": "UI5: Expand class tree",
"icon": {
"light": "icons/light/expand-all.svg",
"dark": "icons/dark/expand-all.svg"
}
},
{
"command": "ui5plugin.generateJSTypeDefDocFromMetadata",
"title": "UI5: Generate JS typedef JSDoc from metadata"
},
{
"command": "ui5plugin.moveDefineToFunctionParameters",
"title": "UI5: Move sap.ui.define to parameters"
},
{
"command": "ui5plugin.switchBetweenVC",
"title": "UI5: Switch View/Controller"
},
{
"command": "ui5plugin.clearCache",
"title": "UI5: Clear Cache"
},
{
"command": "ui5plugin.exportToi18n",
"title": "UI5: Export to i18n"
},
{
"command": "ui5plugin.insertCustomClassName",
"title": "UI5: Insert Custom Class name"
},
{
"command": "ui5plugin.generateUMLClassDiagram",
"title": "UI5: Generate UML Class diagram for current document"
},
{
"command": "ui5plugin.generateUMLClassDiagramsForWholeProject",
"title": "UI5: Generate UML Class diagram for whole project"
},
{
"command": "ui5plugin.generateERDiagramFromMetadata",
"title": "UI5: Generate ER diagram from metadata.xml"
},
{
"command": "ui5plugin.generateTSXMLFileInterfaces",
"title": "UI5: (TS) Generate types for XML files (id to class mapping)"
},
{
"command": "ui5plugin.generateTSODataInterfaces",
"title": "UI5: (TS) Generate interfaces for OData entities"
},
{
"command": "ui5plugin.generateMassTSODataInterfaces",
"title": "UI5: (TS) Generate interfaces for OData entities (Mass)"
},
{
"command": "ui5plugin.generateIds",
"title": "UI5: Generate ids for all elements in view or fragment"
},
{
"command": "ui5plugin.bulkExportToi18n",
"title": "UI5: Export to i18n (bulk)"
}
]
},
"__metadata": {
"id": "7a9177b5-9a33-478d-bff3-879dc393cb43",
"publisherDisplayName": "Ilja Postnovs",
"publisherId": "ec65c605-dbb1-4486-bd8a-a99b8c9e30da",
"isPreReleaseVersion": false
}
}