Technical topology low-code editing tool.
npm install
Usage explanation of scripts in package.json.
Run the application in dev mode.
Build the application in dist folder.
Generate documentation with esdoc.
Run eslint to check on the project.
Run eslint to fix on the project.
Generate issues report with eslint for sonar.
Run all the unit tests.
Run all the unit tests and generate coverage report of the unit tests for sonar.
To run all the e2e tests, you need to run the application with terrator-plugin and use specific url for library of template:
npm ci
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.3.0"
npm run plugin:init
TEMPLATE_LIBRARY_BASE_URL="https://raw.githubusercontent.com/ditrit/leto-modelizer-templates-library/leto-modelizer/e2e_test" npm run dev- Install terrator-plugin
npm ci
npm run plugin:install -- repository-name="terrator-plugin" repository-url="https://github.com/ditrit/terrator-plugin.git#0.3.0"
npm run plugin:init- Build the application for e2e tests
docker build -t leto-modelizer -f DockerfileE2E .- Run the application
docker run -p 8080:80 -d leto-modelizer- Run the e2e tests
npm run test:e2eThis is the default directory structure we use for the project:
leto-modelizer
├ cypress ⇨ Contains all the cypress related files
│ ├ e2e ⇨ Contains all the e2e tests
│ ├ videos ⇨ Contains all videos of each run test (only locally)
│ └ support ⇨ Contains all support files for e2e tests
│ └ step_definitions ⇨ Contains all step definitions for e2e tests
├ dist ⇨ Contains the built application
├ docs ⇨ Contains all files generated by esdoc
├ public ⇨ Contains all public files, like favicon
├ reports ⇨ Contains all the report files for sonar
├ src ⇨ Contains all files for the leto-modelizer application
│ ├ assets ⇨ Contains all the assets
│ ├ boot ⇨ Contains all boot configurations
│ ├ components ⇨ Contains all vue components
│ ├ css ⇨ Contains all style files
│ ├ i18n ⇨ Contains translation engine and translation files
│ ├ layouts ⇨ Contains all the page layouts
│ ├ pages ⇨ Contains all the pages
│ ├ router ⇨ Contains the router engine and the route definitions
│ └ stores ⇨ Contains store engine and all storage definitions
└ tests ⇨ Contains all files related to the tests
We use Semantic Versioning as guideline for the version management.
Steps to release:
- Create a new branch labeled
release/vX.Y.Zfrom the latestmain. - Improve the version number in
package.json,package-lock.jsonandchangelog.md. - Verify the content of the
changelog.md. - Commit the modifications with the label
Release version X.Y.Z. - Create a pull request on github for this branch into
main. - Once the pull request validated and merged, tag the
mainbranch withvX.Y.Z. - After the tag is pushed, make the release on the tag in GitHub.
The default branch is main. Direct commit on it is forbidden. The only way to update the application is through pull request.
Release tag are only done on the main branch.
[BRANCH_TYPE]/[BRANCH_NAME]
BRANCH_TYPEis a prefix to describe the purpose of the branch. Accepted prefixes are:feature, used for feature developmentbugfix, used for bug fiximprovement, used for refactolibrary, used for updating libraryprerelease, used for preparing the branch for the releaserelease, used for releasing projecthotfix, used for applying a hotfix on main
BRANCH_NAMEis managed by this regex:[a-z0-9._-](_is used as space character).
If you want to test an authentication with an OIDC provider, you need to set up leto-modelizer in HTTPS to test the connection with a provider. To do so, you have to change the dev server type, port, add a proxy and change vueRouterMode from hash to history inside quasar.config.js. Here is an example with Github provider:
build: {
vueRouterMode: 'history', // available values: 'hash', 'history'
...
},
devServer: {
server: {
type: 'https',
},
port: 443,
'/auth': {
target: 'https://token.actions.githubusercontent.com/', // url to the oidc metadata of your provider
changeOrigin: true,
pathRewrite: {
'^/auth': '',
},
secure: true,
onProxyRes(proxyRes) {
proxyRes.headers['Access-Control-Allow-Origin'] = '*';
},
},
'/token': {
target: 'https://github.com/login/oauth/access_token/', // url to the oidc token of your provider
changeOrigin: true,
pathRewrite: {
'^/token': '',
},
secure: true,
onProxyRes(proxyRes) {
proxyRes.headers['Access-Control-Allow-Origin'] = '*';
},
},
}Depending on the provider you are using, you will need to follow the provider's documentation to configure the connection.
Example with Github provider:
- Create an OAuth Apps by following this Github documentation. You will retrieve the
CLIENT_IDand theCLIENT_SECRETneeded for the configuration file (see below). You also need to fill the required fields like so : Application name= YOUR_APP_NAME,Homepage URL=https://localhost:443,Authorization callback URL=https://localhost/redirect
Then, inside your global.config.json, (see example), you can replace all the occurences of the following attributes with the corresponging values :
"client_id": YOUR_CLIENT_ID"client_secret": YOUR_CLIENT_SECRET,"authority":"/auth","redirect_uri":"https://localhost/redirect","token_endpoint":"/token","silent_redirect_uri":"https://localhost/silent-refresh",