## Description 1. Move everything related to client from app folder to client folder (`.yarn`, `yarn.lock`, package.json, .gitignore) 2. Move `ast` and `rst` to client packages 3. Fix running scripts in packages 4. Add running unit tests in packages in CI TODO: It is necessary to consider enabling the `nmHoistingLimits: workspaces` option, since now all packages are hoisted to the root, there may be issues with dependencies in workspaces. Also, there is a possibility of implicit use of packages. https://yarnpkg.com/configuration/yarnrc#nmHoistingLimits #### PR fixes following issue(s) Fixes #23333 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing #### How Has This Been Tested? - [x] Manual - [x] Jest - [x] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
21 lines
877 B
Bash
Executable File
21 lines
877 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
|
|
cd "$(dirname "$0")"
|
|
rm -rf dist/
|
|
# This is required for the first time build as node_modules is not present in the image
|
|
yarn install --immutable
|
|
yarn tsc && yarn tsc-alias
|
|
# Install only production dependencies
|
|
YARN_NM_HOISTING_LIMITS=workspaces yarn workspaces focus --production appsmith-rts
|
|
|
|
# Copying node_modules directory into dist as rts server requires production dependencies to run server build properly.
|
|
# This was previously being done in dockerfile which was copying the symlinks to image rather than the whole directory of shared modules (e.g. AST)
|
|
# Also, we copy node_modules with -L flag in order to follow the symlinks for @shared folder and copy the contents instead of just the symlink
|
|
cp -RL node_modules ./dist
|
|
# Delete production dependencies
|
|
rm -rf node_modules
|
|
# Restore all dependencies
|
|
yarn install --immutable
|