Skip to content

Commit

Permalink
wip: Upgrade to Quasar 2 / Vue 3 #393
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Oct 10, 2022
1 parent e4b171e commit 3f65cfb
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 35 deletions.
8 changes: 4 additions & 4 deletions .travis.android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ source .travis.env.sh

# Configure rclone
mkdir -p $HOME/.config/rclone
cp $TRAVIS_BUILD_DIR/workspace/common/rclone.conf $HOME/.config/rclone/.
cp $WORKSPACE_DIR/workspace/common/rclone.conf $HOME/.config/rclone/.

# Install the required secret files requied to sign the app
cp $TRAVIS_BUILD_DIR/workspace/common/android/*.json src-cordova/
cp $TRAVIS_BUILD_DIR/workspace/$FLAVOR/android/*.json src-cordova/
cp $TRAVIS_BUILD_DIR/workspace/common/android/$GOOGLE_KEYSTORE src-cordova/
cp $WORKSPACE_DIR/workspace/common/android/*.json src-cordova/
cp $WORKSPACE_DIR/workspace/$FLAVOR/android/*.json src-cordova/
cp $WORKSPACE_DIR/workspace/common/android/$GOOGLE_KEYSTORE src-cordova/

travis_fold end "provision"

Expand Down
8 changes: 6 additions & 2 deletions .travis.app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ check_code $EXIT_CODE 0 "Builing the client"
docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
check_code $? 0 "Connecting to Docker"

# Create an archive to speed docker build process and build the image
# Create an archive to speed docker build process
cd ../..
tar --exclude='kalisio/aktnmap/test' -zcf kalisio.tgz kalisio
tar --exclude='$APP/test' -zcf $TRAVIS_BUILD_DIR/kalisio.tgz kalisio

# Build the image
cd $TRAVIS_BUILD_DIR
docker build --build-arg APP=$APP --build-arg FLAVOR=$FLAVOR --build-arg BUILD_NUMBER=$BUILD_NUMBER -f dockerfile -t kalisio/$APP:$TAG .
check_code $? 0 "Building the app docker image"

Expand All @@ -46,3 +49,4 @@ docker push kalisio/$APP:$FLAVOR
check_code $? 0 "Pushing the $APP:$TAG docker image"

travis_fold end "deploy"

25 changes: 14 additions & 11 deletions .travis.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ parse_semver()
SEMVER=(${BASH_REMATCH[1]} ${BASH_REMATCH[2]} ${BASH_REMATCH[3]})
}

# Extract the name of the app
# Define the application name
APP=$(node -p -e "require('./package.json').name")

# Exports addtionnal variables
# Define the application version
VERSION=$(node -p -e "require('./package.json').version")
parse_semver $VERSION
MAJOR=${SEMVER[0]}
Expand All @@ -27,11 +27,7 @@ PATCH=${SEMVER[2]}

echo "Building $APP v$MAJOR.$MINOR.$PATCH"

# Clone the workspace
echo -e "machine github.com\n login $GITHUB_TOKEN" > ~/.netrc
git clone -b $APP https://github.com/kalisio/kdk-workspaces workspace

# Define the flavor
# Define the flavor build
TEST_FLAVOR_REGEX="^test-*|-test$"
PROD_FLAVOR_REGEX="^prod-v[0-9]+\.[0-9]+\.[0-9]+"
if [[ $TRAVIS_TAG =~ $PROD_FLAVOR_REGEX ]];
Expand All @@ -53,6 +49,14 @@ TAG=$VERSION-$FLAVOR

echo "Build flavor is $FLAVOR on branch $TRAVIS_BRANCH"

# Leave the project directory to avoid Webpack to look for files into the project directory
cd ..

# Clone the workspace where to build the app
echo -e "machine github.com\n login $GITHUB_TOKEN" > ~/.netrc
git clone -b $APP https://github.com/kalisio/kdk-workspaces workspace
export WORKSPACE_DIR=`pwd`/workspace

# Read ci environement variables
cp workspace/common/.travis.env .travis.env
if [ -f workspace/$FLAVOR/.travis.env ]
Expand All @@ -73,11 +77,11 @@ git clone https://github.com/kalisio/kli.git kalisio && cd kalisio && yarn

# In dev flavor we can build different versions on different branches
# so check if a specific file exists for the target branch first otherwise use default one
if [[ -f $TRAVIS_BUILD_DIR/workspace/$FLAVOR/$KDK_PROJECT_FILE-$TRAVIS_BRANCH.js ]];
if [[ -f $WORKSPACE_DIR/$FLAVOR/$KDK_PROJECT_FILE-$TRAVIS_BRANCH.js ]];
then
cp $TRAVIS_BUILD_DIR/workspace/$FLAVOR/$KDK_PROJECT_FILE-$TRAVIS_BRANCH.js $APP.js
cp $WORKSPACE_DIR/$FLAVOR/$KDK_PROJECT_FILE-$TRAVIS_BRANCH.js $APP.js
else
cp $TRAVIS_BUILD_DIR/workspace/$FLAVOR/$KDK_PROJECT_FILE.js $APP.js
cp $WORKSPACE_DIR/$FLAVOR/$KDK_PROJECT_FILE.js $APP.js
fi

# Clone the project and install the dependencies
Expand All @@ -86,4 +90,3 @@ node . $APP.js --install
node . $APP.js --link

cd $APP

14 changes: 7 additions & 7 deletions .travis.ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ source .travis.env.sh

# Configure rclone
mkdir -p $HOME/.config/rclone
cp $TRAVIS_BUILD_DIR/workspace/common/rclone.conf $HOME/.config/rclone/.
cp $WORKSPACE_DIR/workspace/common/rclone.conf $HOME/.config/rclone/.

# Copy the certificates
cp $TRAVIS_BUILD_DIR/workspace/common/ios/*.cer .
cp $TRAVIS_BUILD_DIR/workspace/common/ios/*.p12 .
cp $TRAVIS_BUILD_DIR/workspace/$FLAVOR/ios/*.cer .
cp $TRAVIS_BUILD_DIR/workspace/$FLAVOR/ios/*.p12 .
cp $WORKSPACE_DIR/workspace/common/ios/*.cer .
cp $WORKSPACE_DIR/workspace/common/ios/*.p12 .
cp $WORKSPACE_DIR/workspace/$FLAVOR/ios/*.cer .
cp $WORKSPACE_DIR/workspace/$FLAVOR/ios/*.p12 .

# Create a custom keychain
security create-keychain -p travis ios-build.keychain
Expand All @@ -34,9 +34,9 @@ done
security set-key-partition-list -S apple-tool:,apple: -s -k travis ios-build.keychain

# Install the required secret files requied to sign the app
cp $TRAVIS_BUILD_DIR/workspace/$FLAVOR/ios/build.json src-cordova/.
cp $WORKSPACE_DIR/workspace/$FLAVOR/ios/build.json src-cordova/.
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $TRAVIS_BUILD_DIR/workspace/$FLAVOR/ios/*.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
cp $WORKSPACE_DIR/workspace/$FLAVOR/ios/*.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/

travis_fold end "provision"

Expand Down
1 change: 0 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
]
},
"devDependencies": {
"@feathersjs/client": "^5.0.0-pre.22",
"@slack/webhook": "^5.0.2",
"c8": "^7.11.0",
"chai": "^4.3.4",
Expand Down
2 changes: 1 addition & 1 deletion api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
long-timeout "^0.1.1"
uuid "^8.3.2"

"@feathersjs/client@^5.0.0-pre.22", "@feathersjs/client@^5.0.0-pre.23":
"@feathersjs/client@^5.0.0-pre.23":
version "5.0.0-pre.27"
resolved "https://registry.yarnpkg.com/@feathersjs/client/-/client-5.0.0-pre.27.tgz#3581912ce9f25c3c0b3617283341352e8b424486"
integrity sha512-L8qDtzpQF1LS6+nPy/fIykDkLLK+LE0Ah7Sx6YqWsK3f4cYFJ6aHfx/xJjOWWVT6ALTTrG/8VUTHpAJ4dDUJIg==
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
]
},
"dependencies": {
"@casl/ability": "^6.2.0",
"@casl/mongoose": "^7.1.0",
"@feathersjs/client": "^5.0.0-pre.28",
"@feathersjs/commons": "^5.0.0-pre.28",
"@feathersjs/memory": "^5.0.0-pre.20",
Expand Down Expand Up @@ -117,7 +119,6 @@
"ajv-i18n": "^3.6.0",
"assert": "^2.0.0",
"browserify-zlib": "^0.2.0",
"casl": "^1.0.2",
"chart.js": "^3.7.1",
"chartjs-adapter-moment": "^1.0.0",
"chartjs-chart-matrix": "^1.1.1",
Expand Down
5 changes: 3 additions & 2 deletions src/components/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ export default {
try {
// No need to update/redirect here since the user should be managed by event handler above
await this.restoreSession()
} catch (_) {
} catch (error) {
// Check if we need to redirect based on the fact there is no authenticated user
this.redirect(null)
this.user = null
this.redirect()
}
},
beforeUnmount () {
Expand Down
10 changes: 5 additions & 5 deletions src/components/PlanCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@
<KCardSection :title="$t('PlanCard.EVENTS_SECTION')">
<div class="full-width row justify-between items-center no-wrap">
<KAction
id= "plan-events"
icon= "las la-fire"
id="plan-events"
icon="las la-fire"
:label="$t('PlanCard.EVENTS', { count: eventsCount })"
:route="{ name: 'events-activity', params: { contextId }, query: { plan: item._id } }"
/>
<q-space />
<KAction
v-if="canAccessCatalog"
id= "plan-catalog"
icon= "las la-map"
id="plan-catalog"
icon="las la-map"
:tooltip="$t('PlanCard.VIEW_CATALOG')"
:route="{ name: 'catalog-activity', params: { contextId }, query: { plan: item._id } }"
/>
<KAction
v-if="canAccessArchivedEvents"
id= "plan-archived-events"
id="plan-archived-events"
icon= "las la-clipboard-list"
:tooltip="$t('PlanCard.VIEW_ARCHIVED_EVENTS')"
:route="{ name: 'archived-events-activity', params: { contextId }, query: { plan: item._id } }"
Expand Down
42 changes: 41 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,18 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@casl/ability@^6.2.0":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@casl/ability/-/ability-6.2.0.tgz#f41760616408c433d01d07a7ecdfc06731012fee"
integrity sha512-TjVLUGbbqmfzGNa4pKSct6ickOtIMMF9tvC7551dE14PLFQzkyUmxqSsePL+j8eejMc3ofwUJTGimN5IcguM8A==
dependencies:
"@ucast/mongo2js" "^1.3.0"

"@casl/mongoose@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@casl/mongoose/-/mongoose-7.1.0.tgz#9ba029e8b140350d5ec27dbca38c62eac6b67d20"
integrity sha512-2/nVviBZpl5UCoNqhLSaCVAgRLwSFKJ7+P/9MuBh9ll2y3PYjmrTBj0sNzFFcuciCNH39u4acMsuhBil6ZPmZA==

"@colors/[email protected]":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
Expand Down Expand Up @@ -2585,6 +2597,34 @@
dependencies:
"@types/node" "*"

"@ucast/core@^1.0.0", "@ucast/core@^1.4.1", "@ucast/core@^1.6.1":
version "1.10.1"
resolved "https://registry.yarnpkg.com/@ucast/core/-/core-1.10.1.tgz#03a77a7804bcb5002a5cad3681e86cd1897e2e1f"
integrity sha512-sXKbvQiagjFh2JCpaHUa64P4UdJbOxYeC5xiZFn8y6iYdb0WkismduE+RmiJrIjw/eLDYmIEXiQeIYYowmkcAw==

"@ucast/js@^3.0.0":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@ucast/js/-/js-3.0.2.tgz#862838ee68112c6c262d4f4693cc592ba83157e0"
integrity sha512-zxNkdIPVvqJjHI7D/iK8Aai1+59yqU+N7bpHFodVmiTN7ukeNiGGpNmmSjQgsUw7eNcEBnPrZHNzp5UBxwmaPw==
dependencies:
"@ucast/core" "^1.0.0"

"@ucast/mongo2js@^1.3.0":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@ucast/mongo2js/-/mongo2js-1.3.3.tgz#a683a59cea22887a72e4302f3826e41ccf51dbbe"
integrity sha512-sBPtMUYg+hRnYeVYKL+ATm8FaRPdlU9PijMhGYKgsPGjV9J4Ks41ytIjGayvKUnBOEhiCaKUUnY4qPeifdqATw==
dependencies:
"@ucast/core" "^1.6.1"
"@ucast/js" "^3.0.0"
"@ucast/mongo" "^2.4.0"

"@ucast/mongo@^2.4.0":
version "2.4.2"
resolved "https://registry.yarnpkg.com/@ucast/mongo/-/mongo-2.4.2.tgz#a8a1c32e65ccab623be023e6cedb11d136d50f19"
integrity sha512-/zH1TdBJlYGKKD+Wh0oyD+aBvDSWrwHcD8b4tUL9UgHLhzHtkEnMVFuxbw3SRIRsAa01wmy06+LWt+WoZdj1Bw==
dependencies:
"@ucast/core" "^1.4.1"

"@ungap/[email protected]":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
Expand Down Expand Up @@ -3848,7 +3888,7 @@ caseless@~0.12.0:
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==

casl@^1.0.2, casl@^1.0.3:
casl@^1.0.3:
version "1.1.0"
resolved "https://registry.yarnpkg.com/casl/-/casl-1.1.0.tgz#2b16ae8c3e010f8f3f326fb80fc637e26cae4dec"
integrity sha512-58M7lfbzIDLt/y/f4ierhdFyv56YTtziJGAaObwzkEDutx5ycORBhdJY3V/desmOduUn2/5EKksbDCf260uQvw==
Expand Down

0 comments on commit 3f65cfb

Please sign in to comment.