PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

ui5plugin-parser

An npm library that reads the metadata of the standard SAPUI5 classes and parses a project's own UI5 classes into objects listing their fields, methods, properties, aggregations, associations and events.

Tooling for a UI5 project needs to know what a class declares before it can say anything about it. This library answers that from source: on initialisation it reads the metadata of the standard SAPUI5 classes and parses the projects in the working directory, in JavaScript or, when a tsconfig.json and .ts files are present, in TypeScript. A caller creates the parsers with ParserFactory.createInstances and looks a class up through ParserPool. Settings sit under ui5.ui5parser in package.json or an rc file such as .ui5pluginrc.json: ui5version, excludeFolderPatterns, libsToLoad, additionalWorkspaces, nodeProjects and proxyWorkspaces. It parses and checks nothing: the rules are ui5plugin-linter's and the editor features are ui5plugin's, the two packages its README names as its users.

Facts

Latestv1.10.1ReleasedLast pushLicenceApache-2.0

Who is behind it

Ilja PostnovsIlja PostnovsPersonMaintains this
In the atlas: maintains 3, contributes to 3
@iljapostnovs
maintainerMarcello UrbaniPersonContributes to this
In the atlas: maintains 14, contributes to 21
@marcellourbani
1 contributor

Before choosing this

Conditions

PracticalFunctional boundary

A project nested inside another is not parsed: its README says nested projects are not supported any more. A library installed from npm is read only when it ships its -dbg.js files and manifest.json.

What it declares

Every artifact

Type
Package
Origin
Independently maintained

As a package

Where it runs
does not say
Distributed through
npm

Connections2

Install

npm add ui5plugin-parser

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from iljapostnovs/ui5plugin-parser under Apache-2.0, read
iljapostnovs/ui5plugin-parser/README.mdOn GitHub

UI5 Class Parser

Parser package for UI5 based projects

Primarely used by ui5plugin-linter package and Visual Studio Code SAPUI5 Extension


Any support is highly appreciated!


Summary

Configuration

RC and package.json

Configuration can be done in package.json or in any of rc file types:

  • .ui5pluginrc
  • .ui5pluginrc.json
  • .ui5pluginrc.yaml
  • .ui5pluginrc.yml
  • .ui5pluginrc.js

For simplicity purposes all examples are written for package.json, but it works the same way for all file types.

Config interface
interface IUI5PackageConfigEntry {
	ui5?: IUI5ParserEntry;
}
interface IUI5ParserEntry {
	ui5parser?: IUI5ParserEntryFields;
}
interface IUI5ParserEntryFields {
	ui5version?: string;
	excludeFolderPatterns?: string[];
	dataSource?: string;
	rejectUnauthorized?: boolean;
	libsToLoad?: string[];
	additionalWorkspaces?: string[];
	nodeProjects?: string[];
	proxyWorkspaces?: string[];
}
Config default values

Default package.json or rc file config looks as follows:

{
	"ui5": {
		"ui5parser": {
			// UI5 Version for standard library metadata preload from ui5.sap.com. If no patch level is added, latest patch will be loaded and used.
			"ui5version": "1.120",
			// Folder GLOB patterns which should be excluded from reading by parser
			"excludeFolderPatterns": ["**/resources/**", "**/dist/**", "**/node_modules/**"],
			// Source for standard library metadata preload
			"dataSource": "https://ui5.sap.com/",
			// For HTTP requests to dataSource
			"rejectUnauthorized": true,
			// List of libraries to be loaded
			"libsToLoad": [
				"sap.m",
				"sap.ui.comp",
				"sap.f",
				"sap.ui.core",
				"sap.ui.commons",
				"sap.ui.export",
				"sap.ui.layout",
				"sap.ui.support",
				"sap.ui.table",
				"sap.ui.unified",
				"sap.ushell",
				"sap.tnt",
				"sap.suite.ui.microchart"
			],
			//Handy to add additional workspace paths if e.g. library is outside of CWD. See "Additional workspaces" section for more details
			"additionalWorkspaces": ["../MyLibrary"],
			//option to tell explicitly where UI5 projects are relative to CWD, useful for CAP projects. See "Proxy workspaces" section for more details
			"proxyWorkspaces": ["./MyFEApp1", "./MyFEApp2"],
			// This configuration entry tries to parse UI5 project from node_modules folder. Requires "-dbg.js" files and "manifest.json" to be there.
			"nodeProjects": ["my-node-library"]
		}
	}
}

These are default values, which can be overriden.

In case of libsToLoad and excludeFolderPatterns all additional values which are added in package.json will be added to the default values, not rewritten.


Parser instantiation logic

Let's introduce two terms which will be used here:

  • CWD - current working directory, or the root folder of the project which is opened in the VSCode.
  • Workspace - UI5 workspace, or the folder which has manifest.json in it.
--- CWD ---
├── webapp
--- Workspace 1 ---
│   ├── Component.js
│   └── manifest.json
├── library
--- Workspace 2 ---
│   ├── library.js
│   └── manifest.json
└── package.json

The basic way for instantiating the parser looks as follows:

  • Read package.json in CWD and use it as a configuration source
  • Read all Workspaces and create UI5 Parser instance for it, using package.json as configuration source from previous step
  • If CWD has tsconfig.json and any .ts files, it is considered to be TS project. Otherwise it's JS project.

Important! Take in mind that nested projects are not supported anymore, which means that there can be no folders with such structure:

├── webapp
│   ├── library
│   │   ├── library.js
│   │   └── manifest.json
│   ├── Component.js
│   └── manifest.json

The structure which will work as expected:

├── library
│   ├── library.js
│   └── manifest.json
├── webapp
│   ├── Component.js
│   └── manifest.json

Additional Workspaces

If there is a e.g. library outside of the CWD, checkout additionalWorkspaces config for ui5parser. Example:

├── MyApp (CWD)
│   │   ├── webapp
│   │   │   ├── manifest.json
│   │   │   └── Component.js
│   └── package.json
├── MyLibrary (Outside of CWD)
│   │   ├── src
│   │   │   ├── manifest.json
│   │   │   └── library.js
│   └── package.json
└── tsconfig.json

To make this work, corresponding entry in package.json should be added

"ui5": {
   "ui5parser": {
      "additionalWorkspaces" : ["../MyLibrary"]
   }
}

Proxy Workspaces

There are cases when project is mixed, meaning that one folder may contain many different projects inside, non-ui5 as well. Most frequent case would be CAP project with both backend and frontend in one folder.

Example:

├── frontend
│   ├── webapp
│   │   └── manifest.json
│   ├── package.json (<- this file will be used as configuration source after proxyWorkspaces is configured)
│   └── tsconfig.json
├── backend
│   ├── Whatever.js
│   └── package.json
├── package.json (<- proxyWorkspaces should be configured here)
└── tsconfig.json

To make the parser work only for frontend folder, corresponding entry in package.json should be added

"ui5": {
   "ui5parser": {
      "proxyWorkspaces" : ["./frontend"]
   }
}

What happens is that CWD is replaced with the new path from proxyWorkspaces, so at instantiation stage package.json and tsconfig.json from frontend folder will be used instead of root folder.


Node projects

There are cases when custom projects (e.g. libraries) installed via npm are used, for that purpose nodeProjects configuration entry was created. Example:

npm install my-custom-library

package.json:

"ui5": {
   "ui5parser": {
		"nodeProjects": ["my-custom-library"]
   }
}

Important! In order to get the project parsed properly, it should have -dbg.js files and manifest.json. Configuration will be inherited from main project (project in CWD). In other words, npm packages which were not built properly and have no manifest.json will not work.


TS vs JS

Initialization

If tsconfig.json is found in the CWD and any .ts files are found in the workspace, parser considers that it's TS project.
tsconfig.json should be located in CWD.

Folder exclusions

For convenience purposes UI5TSParser ignores src-gen folder, because they contain transpiled JS/XML files, which can make the parser to think that source files are there. If build folder name is different, is should be added to excludeFolderPatterns in your package.json. If you are using older tooling with manual babel transpiler which generates webapp folder, it should be added to excludeFolderPatterns as well


How to use

Initialization process reads the metadata of standard SAPUI5 classes and parses all projects in CWD (Current working directory), it's encapsulated into createInstances method. For getting parsers just call it.

const wsFolders = [new WorkspaceFolder("Absolute path to the workspace")];
const parsers = await ParserFactory.createInstances(wsFolders);

Necessary methods for getting information about the classes exists ParserPool class, which works with all parser instances. As an example, to get the parser for custom class, getParserForCustomClass can be used:

const parser = ParserPool.getParserForCustomClass("com.test.any.class");
const UIClass = parser.classFactory.getUIClass("com.test.any.class");

UIClass will have class metadata such as fields, methods, properties, aggregations, associations, events etc.

TS only! For performance reasons TS parser doesn't parse types right away. If you want to load all type info such as method return type, parameter types etc, please use UIClass.loadTypes()

Apache-2.0, read

History

Latest

v1.10.1

Other 1

Notes
  • Downgrade acorn-loose to 8.4.0
  1. v1.10.0

    Other 1

    Notes
    • Bump ts-morph to 26.0.0 and acorn-loose to 8.5.1
  2. v1.9.0

    Other 2

    Notes
    • validate TLS connections by default (rejectUnauthorized=true)
    • improved proxy support (use custom agent only when not validating TLS connections)
  3. v1.8.2

    Other 1

    Notes
    • fix parser config handler
  4. v1.8.1

    Other 1

    Notes
    • fix parser factory
  5. v1.8.0

    Other 3

    Notes
    • minor parsing improvements
    • default version updated to 1.120
    • UI5 version now can be set w/o patch and latest patch will be fetched
  6. v1.7.8

    Other 1

    Notes
    • fix application/json header issue
  7. v1.7.7

    Other 1

    Notes
    • Update default UI5 version to 1.108.27
  8. v1.7.6

    Other 2

    Notes
    • Refactor resource model data class
    • update dependencies
  9. v1.7.5

    Other 1

    Notes
    • Fragment determination in XML files fix
  10. v1.7.4

    Other 1

    Notes
    • Global variable searching fix
  11. v1.7.3

    Other 1

    Notes
    • Unexpected parsing exception fix
  12. v1.7.2

    Other 1

    Notes
    • API bugfix
  13. v1.7.1

    Other 1

    Notes
    • Various small parsing bugfixes
  14. v1.7.0

    Other 1

    Notes
    • Variable declarations are now being searched above class declaration as well
  15. v1.6.4

    Other 1

    Notes
    • Now as a fallback for TS parsing if no default exported class or object is found, first class declaration is taken as main class in the file which will be parsed
  16. v1.6.3

    Other 1

    Notes
    • Regex bugfix
  17. v1.6.2

    Other 1

    Notes
    • Minor bugfixes
  18. v1.6.1

    Other 1

    Notes
    • Additional dependencies are exported now
  19. v1.6.0

    Other 1

    Notes
    • nodeProjects configuration option added. Readme
  20. v1.5.6

    Other 1

    Notes
    • Add configPath to IParserConfigHandler
  21. v1.5.5

    Other 1

    Notes
    • Fix config finding going into recursive
  22. v1.5.4

    Other 1

    Notes
    • Upgrade typescript to 5.1.3
  23. v1.5.3

    Other 1

    Notes
    • Migrate to fixed version of rc-config-loader
  24. v1.5.2

    Other 1

    Notes
    • Migrate to cosmiconfig
  25. v1.5.1

    Other 1

    Notes
    • Bugfix for package.json config
  26. v1.5.0

    Other 1

    Notes
    • Support for rc files introduced
  27. v1.4.6

    Other 1

    Notes
    • Update readme
  28. v1.4.5

    Other 2

    Notes
    • Fix finding of the default model for TS
    • Fix link generation from UI5 docs
  29. v1.4.4

    Other 1

    Notes
    • Fix links in description of the classes
  30. v1.4.3

    Other 1

    Notes
    • Filter constructor params by depth
  31. v1.4.2

    Other 1

    Notes
    • Add ui5ignored property to ResourceModelData entries
  32. v1.4.1

    Other 1

    Notes
    • Set bigger position difference for JSClass JSDoc finding
  33. v1.4.0

    Other 1

    Notes
  34. v1.3.0

    Other 1

    Notes
    • Add special settings support
  35. v1.2.3

    Other 1

    Notes
    • Fix assigning of any type to variables
  36. v1.2.2

    Other 1

    Notes
    • byId exceptions adapted to new standart types
  37. v1.2.1

    Other 1

    Notes
    • ArrayPattern and ChainExpression support added
  38. v1.2.0

    Other 4

    Notes
    • ForOfStatement and AssignmentPattern support added
    • Minor syntax analyser improvements
    • @ui5model, @abstract jsdoc support for classes added
    • Classes now have description
  39. v1.1.1

    Other 1

    Notes
    • additionalWorkspaces now accepts absolute path as well
  40. v1.1.0

    Other 1

    Notes
    • Global package configuration option added
  41. v1.0.0

    Other 5

    Notes
    • Typescript updated to v5.0.2
    • Remove all singletones. Now parser supports multiple parser instances
    • additionalWorkspaces config entry added
    • proxyWorkspaces config entry added
    • webapp folder is not automatically excluded for TS projects anymore
  42. v0.7.11

    Other 1

    Notes
    • Add exclusion for doctype tag
  43. v0.7.10

    Other 1

    Notes
    • Ignore doctype tags #188
  44. v0.7.9

    Other 1

    Notes
    • Fix xml parser #291
  45. v0.7.8

    Other 1

    Notes
    • Throw errors on failed http requests
  46. v0.7.7

    Other 1

    Notes
    • Bugfix for #61
  47. v0.7.6

    Other 2

    Notes
    • Bugfix for #59
    • Bugfix for #61
  48. v0.7.5

    Other 1

    Notes
    • Now parser checks both for .ts files and tsconfig.json existence
  49. v0.7.4

    Other 1

    Notes
    • Fix initialization
  50. v0.7.3

    Other 1

    Notes
    • Add additional typechecking to xml parser
  51. v0.7.2

    Other 1

    Notes
    • Return type bugfixes
  52. v0.7.1

    Other 1

    Notes
    • Fix i18n regex
  53. v0.7.0

    Other 1

    Notes
    • Add CustomTSObject
  54. v0.6.6

    Other 1

    Notes
    • Fill UIDefine first
  55. v0.6.5

    Other 1

    Notes
    • Try to guess type from UI Define
  56. v0.6.4

    Other 1

    Notes
    • Parsing bugfixes
  57. v0.6.3

    Other 1

    Notes
    • Initialization bugfixes
  58. v0.6.2

    Other 1

    Notes
    • Performance improvements
  59. v0.6.1

    Other 1

    Notes
    • Improve TS caching
  60. v0.6.0

    Other 1

    Notes
    • Add typescript support
  61. v0.5.23

    Other 1

    Notes
    • Add new tag position
  62. v0.5.22

    Other 1

    Notes
    • Bugfixes for parsing class metadata
  63. v0.5.21

    Other 1

    Notes
    • Bugfixes for cmd: support
  64. v0.5.20

    Other 1

    Notes
    • Add cmd: support for XML Parser
  65. v0.5.19

    Other 1

    Notes
    • Acorn syntax analyzer bugfix
  66. v0.5.18

    Other 1

    Notes
    • Make event handler params respect jsdocs
  67. v0.5.17

    Other 1

    Notes
    • Minor bugfixes
  68. v0.5.16

    Other 1

    Notes
    • Improve reference finder
  69. v0.5.15

    Other 1

    Notes
    • Bugfixes
  70. v0.5.14

    Other 1

    Notes
    • Add regexp parsing
  71. v0.5.13

    Other 1

    Notes
    • Add template literal support
  72. v0.5.12

    Other 1

    Notes
    • Bugfixes
  73. v0.5.11

    Other 1

    Notes
    • Remove filter for deprecated methods
  74. v0.5.10

    Other 2

    Notes
    • Remove console.log for "Libs are preloaded"
    • Add deprecated jsdoc support for class members
  75. v0.5.9

    Other 1

    Notes
    • Bugfix for parsing byId method
  76. v0.5.8

    Other 1

    Notes
    • Bugfix for finding type of the fields if it is given in jsdoc
  77. v0.5.7

    Other 1

    Notes
    • Fix error on clear cache
  78. v0.5.6

    Other 1

    Notes
    • Added possibility to clear cache
  79. v0.5.5

    Other 1

    Notes
    • Cache bugfixes
  80. v0.5.4

    Other 1

    Notes
    • Remove dynamic require for package.json reading
  81. v0.5.3

    Other 1

    Notes
    • Bugfixes for case sensitive file reading
  82. v0.5.2

    Other 1

    Notes
    • Readme adjustments
  83. v0.5.1

    Other 1

    Notes
    • Initial release
109downloads per week, npm
Weekly downloads for ui5plugin-parser26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 109.20 Apr – 26 Apr: 48427 Apr – 3 May: 7604 May – 10 May: 89911 May – 17 May: 82818 May – 24 May: 1,46425 May – 31 May: 1,1781 Jun – 7 Jun: 7398 Jun – 14 Jun: 85515 Jun – 21 Jun: 1,74422 Jun – 28 Jun: 1,53229 Jun – 5 Jul: 2,0956 Jul – 12 Jul: 71713 Jul – 19 Jul: 1,69520 Jul – 26 Jul: 72927 Jul – 2 Aug: 5133 Aug – 9 Aug: 82710 Aug – 16 Aug: 61917 Aug – 23 Aug: 61224 Aug – 30 Aug: 78131 Aug – 6 Sept: 2367 Sept – 13 Sept: 35114 Sept – 20 Sept: 68921 Sept – 27 Sept: 71828 Sept – 4 Oct: 1,1445 Oct – 11 Oct: 48212 Oct – 18 Oct: 109

Details

Sources4
Added by handdiscovered herechecked
npm registry, ui5plugin-parserversion, releases, installschecked
github.com/git+https://github.com/iljapostnovs/ui5plugin-parser.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
latestv1.10.1
first release
releases and cadence103, ~21d median
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainui5, developer-experience
Contributors1

From the repository’s contributor list, .

History in the atlas2
  1. Listed on bestofui5.org and not yet in the atlas. Read from the repository README (https://github.com/iljapostnovs/ui5plugin-parser): "Parser package for UI5 based projects"; "Initialization process reads the metadata of standard SAPUI5 classes and parses all projects in CWD"; "UIClass will have class metadata such as fields, methods, properties, aggregations, associations, events etc."; "Primarely used by `ui5plugin-linter` package and Visual Studio Code SAPUI5 Extension"; "nested projects are not supported anymore"; and the npm record for 1.10.1 (Apache-2.0, author Ilja Postnovs). No provides edge: the README describes a parser, and none of the capabilities in the graph is a parsing library. Distribution through npm rests on the registry record alone, since the README gives no install command.
  2. First seen.
For your agent
Ref
artifact:iljapostnovs-ui5plugin-parser
JSON
/artifacts/iljapostnovs-ui5plugin-parser.json
MCP
Connecting an agent