Skip to content

Commit

Permalink
fix minor issues with aem-universal-editor-service
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-ayala committed Sep 13, 2024
1 parent 0604ea7 commit ac27620
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/aem-universal-editor-service/bin/start-ues
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ if [ ! -f "${AEM_UES_FEATURE_DIR}/universal-editor-service.cjs" ]; then
fi

cd ${AEM_UES_FEATURE_DIR}

source ${NVM_DIR}/nvm.sh
nvm install
nvm use

node universal-editor-service.cjs
2 changes: 1 addition & 1 deletion src/aem-universal-editor-service/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "aem-universal-editor-service",
"version": "1.0.0",
"version": "1.0.1",
"name": "Adobe Experience Manager Universal Editor Service",
"description": "Setup the AEM Universal Editor Service for local development.",
"options": {
Expand Down
3 changes: 3 additions & 0 deletions src/aem-universal-editor-service/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ echo "20" > "${AEM_UES_FEATURE_DIR}/.nvmrc"
# create ssl cert and private key
openssl req -newkey rsa:2048 -nodes -keyout "${AEM_UES_FEATURE_DIR}/key.pem" \
-x509 -days 365 -out "${AEM_UES_FEATURE_DIR}/certificate.pem" -subj '/CN=localhost'
# and allow remote user to read private key
chgrp ${_REMOTE_USER} "${AEM_UES_FEATURE_DIR}/key.pem"
chmod g+r "${AEM_UES_FEATURE_DIR}/key.pem"

# create .env file
envfile="${AEM_UES_FEATURE_DIR}/.env"
Expand Down
6 changes: 4 additions & 2 deletions test/aem-universal-editor-service/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ check "start-ues is +x" \
# Check config files created
check "created .nvmrc" \
[ -f "${AEM_UES_FEATURE_DIR}/.nvmrc" ]
check "created key" \
[ -f "${AEM_UES_FEATURE_DIR}/key.pem" ]
check "can read key" \
stat -c '%a' "${AEM_UES_FEATURE_DIR}/key.pem" | grep 640
check "key group set to remote user" \
stat -c '%G' "${AEM_UES_FEATURE_DIR}/key.pem" | grep "${_REMOTE_USER}"
check "created certificate" \
[ -f "${AEM_UES_FEATURE_DIR}/certificate.pem" ]
check "created .env" \
Expand Down

0 comments on commit ac27620

Please sign in to comment.