Current state
Sincronia groups scripts by table. So, all Script includes are in single folder, all Business rules are in another folder, etc.
In some of our applications we have hundreds of scripts of the same type.
All files are named after their respective field names in ServiceNow, so we end up with a lot of files named script.js / script.ts.
Problem
It is hard to find a specific script.
When working on multiple files, their names are not helping at all. VSCode shows their folder names, but this makes each tab very wide and adds a lot of unneeded text.
When working on some functionality, it is hard to find related files. You need know all of them and search for each one. TypeScript helps finding references or definition of a class/function, but this is not a perfect solution.
Request
Group scripts by functionality, not only by type.
We can put scripts which are related to specific feature in single folder. And when we work on that feature, we will be able to easily find all related files.
Customize file names. This will make it easier to distinguish different scripts when searching for them or working with multiple files.
Example:
- src/
- FeatureA/
- ScriptIncludes/
- MyScriptInclude.ts
- SecondScriptInclude.ts
- BusinessRules/
- IncidentsTable/
- OnUpdateDoSomthing.ts
- OnInsertCreateSomething.ts
- UsersTable/
- OnDeleteReassignIncidents.ts
- FeatureB/
- ScriptIncludes/
- ...
- UiScripts/
- ...
This means that sinc.manifest.json needs to change its structure, to include file path and name.
And this information needs to be maintained manually by the user, so all files are properly grouped by feature.
The default behaviour can stay the same, so it is easier to make the initial pull and upgrade existing applications.
CLI commands can be created to make it easier to maintain the manifest file and to customize the file hierarchy.
Current state
Sincronia groups scripts by table. So, all Script includes are in single folder, all Business rules are in another folder, etc.
In some of our applications we have hundreds of scripts of the same type.
All files are named after their respective field names in ServiceNow, so we end up with a lot of files named
script.js/script.ts.Problem
It is hard to find a specific script.
When working on multiple files, their names are not helping at all. VSCode shows their folder names, but this makes each tab very wide and adds a lot of unneeded text.
When working on some functionality, it is hard to find related files. You need know all of them and search for each one. TypeScript helps finding references or definition of a class/function, but this is not a perfect solution.
Request
Group scripts by functionality, not only by type.
We can put scripts which are related to specific feature in single folder. And when we work on that feature, we will be able to easily find all related files.
Customize file names. This will make it easier to distinguish different scripts when searching for them or working with multiple files.
Example:
This means that
sinc.manifest.jsonneeds to change its structure, to include file path and name.And this information needs to be maintained manually by the user, so all files are properly grouped by feature.
The default behaviour can stay the same, so it is easier to make the initial pull and upgrade existing applications.
CLI commands can be created to make it easier to maintain the manifest file and to customize the file hierarchy.