Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ jobs:
- name: Build and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
working-directory: backend
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=edificeio_explorer
6 changes: 0 additions & 6 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ Explorer App

### Install

Without Docker, you need to generate a `package.json`

```bash
node scripts/package.cjs
```

Install all dependencies.

```bash
Expand Down
58 changes: 17 additions & 41 deletions frontend/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,50 +52,17 @@ done

clean () {
rm -rf node_modules dist build .gradle .pnpm-store
rm -f package.json pnpm-lock.yaml
rm -f pnpm-lock.yaml
}

doInit () {
echo "[init] Get branch name from jenkins env..."
if [ ! -z "$FRONT_TAG" ]; then
echo "[init] Get tag name from jenkins param... $FRONT_TAG"
BRANCH_NAME="$FRONT_TAG"
else
BRANCH_NAME=`echo $GIT_BRANCH | sed -e "s|origin/||g"`
if [ "$BRANCH_NAME" = "" ]; then
echo "[init] Get branch name from git..."
BRANCH_NAME=`git branch | sed -n -e "s/^\* \(.*\)/\1/p"`
fi
fi

echo "[init] Generate package.json from package.json.template..."
NPM_VERSION_SUFFIX=`date +"%Y%m%d%H%M"`
cp package.json.template package.json
sed -i "s/%branch%/${BRANCH_NAME}/" package.json
sed -i "s/%generateVersion%/${NPM_VERSION_SUFFIX}/" package.json

if [ "$1" == "Dev" ]
then
sed -i "s/%packageVersion%/link:..\/edifice-ts-client\//" package.json
else
sed -i "s/%packageVersion%/${BRANCH_NAME}/" package.json
fi

init() {
if [ "$NO_DOCKER" = "true" ] ; then
pnpm install
else
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "pnpm install"
fi
}

init() {
doInit
}

initDev() {
doInit "Dev"
}

# Install local dependencies as tarball (installing as folder creates symlinks which won't resolve in the docker container)
localDep () {
if [ -e $PWD/../edifice-ts-client ]; then
Expand Down Expand Up @@ -133,6 +100,7 @@ linkDependencies () {

# # Extract dependencies from package.json using sed
DEPENDENCIES=$(sed -n '/"dependencies": {/,/}/p' package.json | sed -n 's/ *"@edifice\.io\/\([^"]*\)":.*/\1/p')
DEPENDENCIES="$DEPENDENCIES $(sed -n '/"peerDependencies": {/,/}/p' package.json | sed -n 's/ *"@edifice\.io\/\([^"]*\)":.*/\1/p')"

# # Link each dependency if it exists in the edifice-frontend-framework
for dep in $DEPENDENCIES; do
Expand Down Expand Up @@ -164,9 +132,20 @@ cleanDependencies() {
publishNPM () {
echo "[publish] Publish package..."
LOCAL_BRANCH=$(echo $GIT_BRANCH | sed -e "s|origin/||g")
TAG_BRANCH=$([ "$LOCAL_BRANCH" = "main" ] && echo "latest" || echo "$LOCAL_BRANCH")

#docker compose run -e NPM_TOKEN=$NPM_TOKEN -e GIT_BRANCH=$GIT_BRANCH --rm -u "$USER_UID:$GROUP_GID" node sh -c "pnpm version:update"
TIMESTAMP=$(date +%Y%m%d%H%M%S)
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "1.0.0")
LATEST_TAG=${LATEST_TAG#v}

if [ "$LOCAL_BRANCH" = "main" ]; then
TAG_BRANCH="latest"
NEW_VERSION="$LATEST_TAG"
else
TAG_BRANCH="$LOCAL_BRANCH"
NEW_VERSION="$LATEST_TAG-$LOCAL_BRANCH.$TIMESTAMP"
echo "[publish] Update version with the exact version"
docker compose run -e NPM_TOKEN=$NPM_PUBLIC_TOKEN --rm -u "$USER_UID:$GROUP_GID" node sh -c "pnpm exec npm version $NEW_VERSION --no-git-tag-version"
fi

docker compose run -e NPM_TOKEN=$NPM_PUBLIC_TOKEN --rm -u "$USER_UID:$GROUP_GID" node sh -c "pnpm publish --no-git-checks --access public --tag $TAG_BRANCH"
}

Expand All @@ -189,9 +168,6 @@ do
init)
init
;;
initDev)
initDev
;;
localDep)
localDep
;;
Expand Down
34 changes: 21 additions & 13 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ode-explorer",
"version": "2.2.12-develop.202510091718",
"version": "2.6.6-develop-enabling.0",
"description": "Edifice Explorer",
"homepage": "https://github.com/edificeio/explorer#readme",
"bugs": {
Expand Down Expand Up @@ -49,30 +49,36 @@
]
},
"dependencies": {
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/core": "6.1.0",
"@dnd-kit/modifiers": "7.0.0",
"@edifice.io/react": "develop-pedago",
"@edifice.io/bootstrap": "develop-pedago",
"@edifice.io/client": "develop-pedago",
"@react-spring/web": "9.7.3",
"@tanstack/react-query": "5.62.7",
"@react-spring/web": "9.7.5",
"clsx": "2.1.1",
"dayjs": "1.11.10",
"i18next": "23.8.1",
"i18next-http-backend": "2.4.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-error-boundary": "4.0.13",
"react-hook-form": "7.53.0",
"react-i18next": "14.1.0",
"react-hook-form": "7.71.1",
"react-i18next": "14.1.3",
"react-router-dom": "6.23.1",
"zustand": "4.5.0"
},
"peerDependencies": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci je ne connaissais pas le concept de peerDependencies 😱

"@edifice.io/bootstrap": "*",
"@edifice.io/client": "*",
"@edifice.io/react": "*",
"@tanstack/react-query": "5.62.7",
"react": "18.3.1",
"react-dom": "18.3.1"
},
"devDependencies": {
"@axe-core/react": "4.10.0",
"@babel/plugin-transform-react-pure-annotations": "7.23.3",
"@edifice.io/bootstrap": "develop-enabling",
"@edifice.io/client": "develop-enabling",
"@edifice.io/react": "develop-enabling",
"@eslint/js": "9.11.1",
"@tanstack/react-query-devtools": "5.59.13",
"@tanstack/react-query": "5.62.7",
"@tanstack/react-query-devtools": "5.62.7",
"@testing-library/jest-dom": "6.5.0",
"@testing-library/react": "16.0.1",
"@testing-library/user-event": "14.5.2",
Expand All @@ -92,6 +98,8 @@
"msw": "2.4.10",
"nx": "19.6.0",
"prettier": "3.3.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "5.4.5",
"typescript-eslint": "8.7.0",
"vite": "5.4.1",
Expand All @@ -104,4 +112,4 @@
"node": "18 || 20"
},
"nx": {}
}
}
107 changes: 0 additions & 107 deletions frontend/package.json.template

This file was deleted.

Loading
Loading