PromucFlow_constructor/app/shared
yatinappsmith fba4b73202
ci: Release 29 sept2022 (#17161)
* feat: audit-logs parity with ee (#17115)

* fix: update rts logic to use updated shared AST logic (#16849)

* update rts logic to use updated shared AST logic

* Make changes to naming conventions

* Add test cases for RTS and rename ast functions

* Add running jest test to RTS workflow

* Install dependencies and then trigger jest tests in workflow

* Close server connection after test ends

* Remove logs

* Improve jest test descriptions

* fix: RTE + Form + JSONForm reskinning (#16956)

* update rich text editor styles

* fix disalbed text  color

* add border

* fix gaps and borders in json form

* fix disabled state

* fix checkbox disabled state color on checkbox + font size of title in json

* fix disabled state of rte not re-rendering

* remove unused import

* fix cypress test

* chore: Add view mode to the analytics events (#15791)

* Add view mode to the analytics events

* Add view mode to the analytics events

* Fix UnSupported operation with template

* Replace hardcoded strings

* feat: Map Chart Reskinning (#16921)

* feat: Map Chart Reskinning
- Update font family based on theme
- Fix caption, spacing, and legend styles

* feat: Add migrations for Font Family of Map Chart

* feat: Add migrations to test

* fix: Fixed NPE issue with analytics event on authentication method configuration (#17112)

* chore: Making the error pages conform to the design system (#17109)

Co-authored-by: f0c1s <anubhav@appsmith.com>
Co-authored-by: Ayangade Adeoluwa <37867493+Irongade@users.noreply.github.com>
Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com>
Co-authored-by: Vishnu Gp <vishnu@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
2022-09-29 10:21:31 +05:30
..
ast ci: Release 29 sept2022 (#17161) 2022-09-29 10:21:31 +05:30
.gitignore feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30
build-shared-dep.js feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30
install-dependencies.js feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30
package.json feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30
Readme.md feat: AST apis for parsing script and returning identifiers (#16252) 2022-09-12 14:45:47 +05:30
shared-dependencies.json feat: AST apis for parsing script and returning identifiers (#16252) 2022-09-12 14:45:47 +05:30
verify-shared-dep.js feat: ast mono repo poc (#15610) 2022-08-11 20:59:26 +05:30

Shared Dependencies

We wanted to share common logic with different applications within our repo, so we picked yarn symlinks as our approach to tackle this problem. Following are the way in which you can take advantage of the module sharing architecture.

Creation of a Shared Module

  • Create a directory inside shared directory with name eg. abc
  • Inside package.json of module, keep the name like @shared/abc
  • Add a rollup config to generate package.json after the module is build

Installation of Shared Modules

  • Add an entry for an application inside shared-dependencies.json eg. for client there should be an entry "client": []
  • Add the name of the shared module in the entry of the application in the above file eg. "client": ["@shared/abc"]
  • If the application does not have any postinstall or preinstall scripts for shared modules then add the two commands described below in the application's (eg. client) package.json : "postinstall": "CURRENT_SCOPE=client node ../shared/install-dependencies.js" "preinstall": "CURRENT_SCOPE=client node ../shared/build-shared-dep.js" CURRENT_SCOPE is the environment variable that's being used in the scripts

Verifying the Installed Shared Modules

  • Run yarn run verify inside shared directory to verify shared dependencies for an application.
  • yarn install : installs packages
  • rollup -c : Module bundler bundles the package and creates a build
  • cd build : Change the present working directory
  • cp -R ../node_modules ./node_modules : copies its own node_modules directory to its build directory to make sure its own version dependencies do not mismatch when its installed in other directories as shared module
  • yarn link : Creates a link for the package to make it available for other directories to use.