Skip to content

Commit

Permalink
### 5.0.71-rc.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Jan 4, 2024
1 parent 033fcfd commit f831822
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# chat21-web-widget ver 5.0

### 5.0.71-rc.5
- bug-fixed: last-message box is visible also if text is empty

### 5.0.71-rc.4
- added: uploadProfile method into upload.service files
- bug-fixed: if hiddenMessage is present and user restart conversation from header menu, flow does not restart from beginning
Expand Down
15 changes: 11 additions & 4 deletions deploy_amazon_beta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
version=`node -e 'console.log(require("./package.json").version)'`
echo "version $version"

ng build --configuration="pre" --aot=true --base-href --output-hashing none --build-optimizer=true
ng build --configuration="pre" --aot=true --base-href --build-optimizer=true

### SET HASHING : START ###
cp ./src/launch_template.js ./dist/launch.js
node ./src/build_launch.js
### SET HASHING : END ###

# ########## --->>>> NATIVE-MQTT folder START <<<<<------ ########## #

Expand All @@ -23,11 +28,13 @@ ng build --configuration="pre" --aot=true --base-href --output-hashing none --bu

# ########## --->>>> FIREBASE folder START <<<<<------ ########## #
cd dist
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300
aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control max-age=300
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300 --exclude='launch.js' #7days
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control max-age=300 --exclude='launch.js' #7days
aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
cd ..

#aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
aws cloudfront create-invalidation --distribution-id E2V5O0YPR61V8P --paths "/*"
# echo new version deployed $NEW_VER/$NEW_BUILD/ on s3://tiledesk-widget-pre/v2
echo new version deployed $version/ on s3://tiledesk-widget-pre/v5 and s3://tiledesk-widget-pre/v5/$version/
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-widget-pre/v5/index.html
Expand Down
15 changes: 11 additions & 4 deletions deploy_amazon_prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ version=`node -e 'console.log(require("./package.json").version)'`
echo "version $version"

# --build-optimizer=false if localstorage is disabled (webview) appears https://github.com/firebase/angularfire/issues/970
ng build --configuration="prod" --aot=true --base-href --output-hashing none --build-optimizer=true --vendor-chunk=true
ng build --configuration="prod" --aot=true --build-optimizer=true --vendor-chunk=true
##--base-href='./v5/' --output-hashing none

### SET HASHING : START ###
cp ./src/launch_template.js ./dist/launch.js
node ./src/build_launch.js
### SET HASHING : END ###

#### FIREBASE #####
# cd dist
Expand All @@ -12,12 +18,13 @@ ng build --configuration="prod" --aot=true --base-href --output-hashing none --b
# aws s3 sync . s3://tiledesk-widget/v5/ --cache-control max-age=300
# cd ..


# #### MQTT #####
cd dist
# aws s3 sync . s3://tiledesk-widget/v5/latest/
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control max-age=300
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control max-age=300
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control max-age=86400 --exclude='launch.js' #8days
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control max-age=86400 --exclude='launch.js' #8days
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
cd ..

aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@chat21/chat21-web-widget",
"author": "Tiledesk SRL",
"version": "5.0.71-rc.4",
"version": "5.0.71-rc.5",
"license": "MIT",
"homepage": "https://www.tiledesk.com",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/chat21-core/providers/native/native-upload-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class NativeUploadService extends UploadService {

//USE IMAGE API
const that = this;
const url = this.URL_TILEDESK_IMAGES + '/users' + '?path=' + path
const url = this.URL_TILEDESK_IMAGES + '/users' + '?path=' + path.split('path=')[1]
return new Promise((resolve, reject) => {
that.http.delete(url, requestOptions).subscribe(data => {
// const downloadURL = this.URL_TILEDESK_IMAGES + '?path=' + data['filename'];
Expand Down
3 changes: 3 additions & 0 deletions src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export class TiledeskAuthService {
this.logger.debug('[TILEDESK-AUTH] logOut()');
this.appStorage.removeItem('tiledeskToken');
this.appStorage.removeItem('currentUser');
localStorage.removeItem('tiledesk_token')
this.setCurrentUser(null);
}

Expand Down Expand Up @@ -178,6 +179,8 @@ export class TiledeskAuthService {
} else if (storedTiledeskToken && storedTiledeskToken === tiledeskToken) {
this.logger.log('[TILEDESK-AUTH] - checkAndSetInStorageTiledeskToken STORED-TOKEN EXIST AND IS = TO TOKEN ')
}

localStorage.setItem('tiledesk_token', tiledeskToken)
}


Expand Down

0 comments on commit f831822

Please sign in to comment.