| 
									
										
										
										
											2023-01-03 11:55:46 -08:00
										 |  |  | // Copyright 2018 Signal Messenger, LLC
 | 
					
						
							| 
									
										
										
										
											2021-06-18 10:04:27 -07:00
										 |  |  | // SPDX-License-Identifier: AGPL-3.0-only
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { join } from 'path'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { app } from 'electron'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { start } from './base_config'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const userDataPath = app.getPath('userData'); | 
					
						
							|  |  |  | const targetPath = join(userDataPath, 'ephemeral.json'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-11 13:12:55 -06:00
										 |  |  | export const ephemeralConfig = start({ | 
					
						
							|  |  |  |   name: 'ephemeral', | 
					
						
							|  |  |  |   targetPath, | 
					
						
							|  |  |  |   throwOnFilesystemErrors: false, | 
					
						
							| 
									
										
										
										
											2021-06-18 10:04:27 -07:00
										 |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const get = ephemeralConfig.get.bind(ephemeralConfig); | 
					
						
							|  |  |  | export const remove = ephemeralConfig.remove.bind(ephemeralConfig); | 
					
						
							|  |  |  | export const set = ephemeralConfig.set.bind(ephemeralConfig); |