forked from EVOgeek/Vmeda.Online
		
	Merge pull request #2927 from NoelDeMartin/MOBILE-3833
MOBILE-3833: Fix initialization & Update node version
This commit is contained in:
		
						commit
						76e4fa8678
					
				
							
								
								
									
										2
									
								
								.github/workflows/migration.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/migration.yml
									
									
									
									
										vendored
									
									
								
							| @ -12,7 +12,7 @@ jobs: | |||||||
|     - name: Use Node.js |     - name: Use Node.js | ||||||
|       uses: actions/setup-node@v1 |       uses: actions/setup-node@v1 | ||||||
|       with: |       with: | ||||||
|         node-version: '12.x' |         node-version: '14.x' | ||||||
|     - run: npm ci |     - run: npm ci | ||||||
|     - run: result=$(find src -type f -iname '*.html' -exec sh -c 'cat {} | tr "\n" " " | grep -Eo "class=\"[^\"]+\"[^>]+class=\"" ' \; | wc -l); test $result -eq 0 |     - run: result=$(find src -type f -iname '*.html' -exec sh -c 'cat {} | tr "\n" " " | grep -Eo "class=\"[^\"]+\"[^>]+class=\"" ' \; | wc -l); test $result -eq 0 | ||||||
|     - run: npm install -D @ionic/v4-migration-tslint |     - run: npm install -D @ionic/v4-migration-tslint | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								.github/workflows/testing.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/testing.yml
									
									
									
									
										vendored
									
									
								
							| @ -12,7 +12,7 @@ jobs: | |||||||
|     - name: Use Node.js |     - name: Use Node.js | ||||||
|       uses: actions/setup-node@v1 |       uses: actions/setup-node@v1 | ||||||
|       with: |       with: | ||||||
|         node-version: '12' |         node-version: '14' | ||||||
|     - name: Install npm packages |     - name: Install npm packages | ||||||
|       run: | |       run: | | ||||||
|         npm install -g npm@7 |         npm install -g npm@7 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| os: linux | os: linux | ||||||
| dist: trusty | dist: trusty | ||||||
| node_js: 12 | node_js: 14 | ||||||
| 
 | 
 | ||||||
| git: | git: | ||||||
|   depth: 3 |   depth: 3 | ||||||
| @ -18,7 +18,7 @@ cache: | |||||||
|     - $HOME/.android/build-cache |     - $HOME/.android/build-cache | ||||||
| 
 | 
 | ||||||
| before_install: | before_install: | ||||||
|   - nvm install 12 |   - nvm use | ||||||
|   - node --version |   - node --version | ||||||
|   - npm --version |   - npm --version | ||||||
|   - nvm --version |   - nvm --version | ||||||
|  | |||||||
| @ -173,7 +173,7 @@ | |||||||
|     "typescript": "^3.9.9" |     "typescript": "^3.9.9" | ||||||
|   }, |   }, | ||||||
|   "engines": { |   "engines": { | ||||||
|     "node": ">=12.x" |     "node": ">=14.15.0 <15" | ||||||
|   }, |   }, | ||||||
|   "cordova": { |   "cordova": { | ||||||
|     "platforms": [ |     "platforms": [ | ||||||
|  | |||||||
| @ -24,4 +24,9 @@ export class CoreApplicationInitStatus extends ApplicationInitStatus { | |||||||
|         super(injector.get(APP_INITIALIZER, [])); |         super(injector.get(APP_INITIALIZER, [])); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     whenDone(callback: () => unknown): void { | ||||||
|  |         // eslint-disable-next-line promise/catch-or-return, promise/no-callback-in-promise
 | ||||||
|  |         this.donePromise.then(callback); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -102,17 +102,15 @@ export class CoreFilepoolProvider { | |||||||
|     /** |     /** | ||||||
|      * Initialize queue. |      * Initialize queue. | ||||||
|      */ |      */ | ||||||
|     async initialize(): Promise<void> { |     initialize(): void { | ||||||
|         // Waiting for the app to be ready to start processing the queue.
 |         // Start processing the queue once the app is ready.
 | ||||||
|         await ApplicationInit.donePromise; |         ApplicationInit.whenDone(() => { | ||||||
| 
 |  | ||||||
|             this.checkQueueProcessing(); |             this.checkQueueProcessing(); | ||||||
| 
 | 
 | ||||||
|             // Start queue when device goes online.
 |             // Start queue when device goes online.
 | ||||||
|             Network.onConnect().subscribe(() => { |             Network.onConnect().subscribe(() => { | ||||||
|                 // Execute the callback in the Angular zone, so change detection doesn't stop working.
 |                 // Execute the callback in the Angular zone, so change detection doesn't stop working.
 | ||||||
|             NgZone.run(() => { |                 NgZone.run(() => this.checkQueueProcessing()); | ||||||
|                 this.checkQueueProcessing(); |  | ||||||
|             }); |             }); | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -50,7 +50,7 @@ export class CoreLangProvider { | |||||||
|             document.documentElement.setAttribute('dir', dir); |             document.documentElement.setAttribute('dir', dir); | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         await this.initializeCurrentLanguage(); |         this.initializeCurrentLanguage(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  | |||||||
| @ -57,6 +57,8 @@ import { Zip as ZipService } from '@ionic-native/zip/ngx'; | |||||||
| 
 | 
 | ||||||
| import { TranslateService } from '@ngx-translate/core'; | import { TranslateService } from '@ngx-translate/core'; | ||||||
| 
 | 
 | ||||||
|  | import { CoreApplicationInitStatus } from '@classes/application-init-status'; | ||||||
|  | 
 | ||||||
| /** | /** | ||||||
|  * Injector instance used to resolve singletons. |  * Injector instance used to resolve singletons. | ||||||
|  */ |  */ | ||||||
| @ -198,7 +200,7 @@ export const ModalController = makeSingleton(ModalControllerService); | |||||||
| export const PopoverController = makeSingleton(PopoverControllerService); | export const PopoverController = makeSingleton(PopoverControllerService); | ||||||
| export const ToastController = makeSingleton(ToastControllerService); | export const ToastController = makeSingleton(ToastControllerService); | ||||||
| export const GestureController = makeSingleton(GestureControllerService); | export const GestureController = makeSingleton(GestureControllerService); | ||||||
| export const ApplicationInit = makeSingleton(ApplicationInitStatus); | export const ApplicationInit = makeSingleton<CoreApplicationInitStatus>(ApplicationInitStatus); | ||||||
| export const Application = makeSingleton(ApplicationRef); | export const Application = makeSingleton(ApplicationRef); | ||||||
| export const NavController = makeSingleton(NavControllerService); | export const NavController = makeSingleton(NavControllerService); | ||||||
| export const Router = makeSingleton(RouterService); | export const Router = makeSingleton(RouterService); | ||||||
|  | |||||||
| @ -44,7 +44,7 @@ export class CoreSubscriptions { | |||||||
|                 // Unsubscribe using a timeout because we can receive a value immediately.
 |                 // Unsubscribe using a timeout because we can receive a value immediately.
 | ||||||
|                 setTimeout(() => subscription.unsubscribe(), 0); |                 setTimeout(() => subscription.unsubscribe(), 0); | ||||||
| 
 | 
 | ||||||
|                 onError?.call(error); |                 onError && onError(error); | ||||||
|             }, |             }, | ||||||
|         ); |         ); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user