Merge branch 'master' into mononaut/unfurler-mode-headers
This commit is contained in:
		
						commit
						1653f003bc
					
				
							
								
								
									
										14
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							| @ -16,6 +16,20 @@ updates: | |||||||
|   - package-ecosystem: npm |   - package-ecosystem: npm | ||||||
|     directory: "/frontend" |     directory: "/frontend" | ||||||
|     versioning-strategy: increase |     versioning-strategy: increase | ||||||
|  |     groups: | ||||||
|  |       frontend-angular-dependencies: | ||||||
|  |         patterns: | ||||||
|  |           - "@angular*" | ||||||
|  |           - "@ng-*" | ||||||
|  |           - "ngx-*" | ||||||
|  |       frontend-jest-dependencies: | ||||||
|  |         patterns: | ||||||
|  |           - "@types/jest" | ||||||
|  |           - "jest" | ||||||
|  |       frontend-eslint-dependencies: | ||||||
|  |         patterns: | ||||||
|  |           - "@typescript-eslint*" | ||||||
|  |           - "eslint" | ||||||
|     schedule: |     schedule: | ||||||
|       interval: daily |       interval: daily | ||||||
|     open-pull-requests-limit: 10 |     open-pull-requests-limit: 10 | ||||||
|  | |||||||
| @ -191,30 +191,31 @@ describe('Mempool Backend Config', () => { | |||||||
|             } |             } | ||||||
|             continue; |             continue; | ||||||
|           } |           } | ||||||
|           switch (typeof value) { | 
 | ||||||
|             case 'object': { |           if (root) { | ||||||
|               if (Array.isArray(value)) { |  | ||||||
|                 continue; |  | ||||||
|               } else { |  | ||||||
|                 parseJson(value, key); |  | ||||||
|               } |  | ||||||
|               break; |  | ||||||
|             } |  | ||||||
|             default: { |  | ||||||
|               //The flattened string, i.e, __MEMPOOL_ENABLED__
 |               //The flattened string, i.e, __MEMPOOL_ENABLED__
 | ||||||
|               const replaceStr = `${root ? '__' + root + '_' : '__'}${key}__`; |               const replaceStr = `${root ? '__' + root + '_' : '__'}${key}__`; | ||||||
| 
 | 
 | ||||||
|               //The string used as the environment variable, i.e, MEMPOOL_ENABLED
 |               //The string used as the environment variable, i.e, MEMPOOL_ENABLED
 | ||||||
|               const envVarStr = `${root ? root : ''}_${key}`; |               const envVarStr = `${root ? root : ''}_${key}`; | ||||||
| 
 | 
 | ||||||
|  |               let defaultEntry; | ||||||
|               //The string used as the default value, to be checked as a regex, i.e, __MEMPOOL_ENABLED__=${MEMPOOL_ENABLED:=(.*)}
 |               //The string used as the default value, to be checked as a regex, i.e, __MEMPOOL_ENABLED__=${MEMPOOL_ENABLED:=(.*)}
 | ||||||
|               const defaultEntry = replaceStr + '=' + '\\${' + envVarStr + ':=(.*)' + '}'; |               if (Array.isArray(value)) { | ||||||
| 
 |                 defaultEntry = `${replaceStr}=\${${envVarStr}:=[]}`; | ||||||
|               if (process.env.CI) { |                 if (process.env.CI) { | ||||||
|                 console.log(`looking for ${defaultEntry} in the start.sh script`); |                   console.log(`looking for ${defaultEntry} in the start.sh script`); | ||||||
|  |                 } | ||||||
|  |                 //Regex matching does not work with the array values
 | ||||||
|  |                 expect(startSh).toContain(defaultEntry); | ||||||
|  |               } else { | ||||||
|  |                  defaultEntry = replaceStr + '=' + '\\${' + envVarStr + ':=(.*)' + '}'; | ||||||
|  |                  if (process.env.CI) { | ||||||
|  |                   console.log(`looking for ${defaultEntry} in the start.sh script`); | ||||||
|  |                 } | ||||||
|  |                 const re = new RegExp(defaultEntry); | ||||||
|  |                 expect(startSh).toMatch(re); | ||||||
|               } |               } | ||||||
|               const re = new RegExp(defaultEntry); |  | ||||||
|               expect(startSh).toMatch(re); |  | ||||||
| 
 | 
 | ||||||
|               //The string that actually replaces the values in the config file
 |               //The string that actually replaces the values in the config file
 | ||||||
|               const sedStr = 'sed -i "s!' + replaceStr + '!${' + replaceStr + '}!g" mempool-config.json'; |               const sedStr = 'sed -i "s!' + replaceStr + '!${' + replaceStr + '}!g" mempool-config.json'; | ||||||
| @ -222,11 +223,13 @@ describe('Mempool Backend Config', () => { | |||||||
|                 console.log(`looking for ${sedStr} in the start.sh script`); |                 console.log(`looking for ${sedStr} in the start.sh script`); | ||||||
|               } |               } | ||||||
|               expect(startSh).toContain(sedStr); |               expect(startSh).toContain(sedStr); | ||||||
|               break; |  | ||||||
|             } |             } | ||||||
|  |           else { | ||||||
|  |             parseJson(value, key); | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|       parseJson(fixture); |       parseJson(fixture); | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
|  | |||||||
| @ -52,7 +52,7 @@ | |||||||
|     "REST_API_URL": "__ESPLORA_REST_API_URL__", |     "REST_API_URL": "__ESPLORA_REST_API_URL__", | ||||||
|     "UNIX_SOCKET_PATH": "__ESPLORA_UNIX_SOCKET_PATH__", |     "UNIX_SOCKET_PATH": "__ESPLORA_UNIX_SOCKET_PATH__", | ||||||
|     "RETRY_UNIX_SOCKET_AFTER": __ESPLORA_RETRY_UNIX_SOCKET_AFTER__, |     "RETRY_UNIX_SOCKET_AFTER": __ESPLORA_RETRY_UNIX_SOCKET_AFTER__, | ||||||
|     "FALLBACK": __ESPLORA_FALLBACK__, |     "FALLBACK": __ESPLORA_FALLBACK__ | ||||||
|   }, |   }, | ||||||
|   "SECOND_CORE_RPC": { |   "SECOND_CORE_RPC": { | ||||||
|     "HOST": "__SECOND_CORE_RPC_HOST__", |     "HOST": "__SECOND_CORE_RPC_HOST__", | ||||||
|  | |||||||
| @ -53,6 +53,7 @@ __ELECTRUM_TLS_ENABLED__=${ELECTRUM_TLS_ENABLED:=false} | |||||||
| __ESPLORA_REST_API_URL__=${ESPLORA_REST_API_URL:=http://127.0.0.1:3000} | __ESPLORA_REST_API_URL__=${ESPLORA_REST_API_URL:=http://127.0.0.1:3000} | ||||||
| __ESPLORA_UNIX_SOCKET_PATH__=${ESPLORA_UNIX_SOCKET_PATH:="null"} | __ESPLORA_UNIX_SOCKET_PATH__=${ESPLORA_UNIX_SOCKET_PATH:="null"} | ||||||
| __ESPLORA_RETRY_UNIX_SOCKET_AFTER__=${ESPLORA_RETRY_UNIX_SOCKET_AFTER:=30000} | __ESPLORA_RETRY_UNIX_SOCKET_AFTER__=${ESPLORA_RETRY_UNIX_SOCKET_AFTER:=30000} | ||||||
|  | __ESPLORA_FALLBACK__=${ESPLORA_FALLBACK:=[]} | ||||||
| 
 | 
 | ||||||
| # SECOND_CORE_RPC | # SECOND_CORE_RPC | ||||||
| __SECOND_CORE_RPC_HOST__=${SECOND_CORE_RPC_HOST:=127.0.0.1} | __SECOND_CORE_RPC_HOST__=${SECOND_CORE_RPC_HOST:=127.0.0.1} | ||||||
| @ -192,6 +193,7 @@ sed -i "s!__ELECTRUM_TLS_ENABLED__!${__ELECTRUM_TLS_ENABLED__}!g" mempool-config | |||||||
| sed -i "s!__ESPLORA_REST_API_URL__!${__ESPLORA_REST_API_URL__}!g" mempool-config.json | sed -i "s!__ESPLORA_REST_API_URL__!${__ESPLORA_REST_API_URL__}!g" mempool-config.json | ||||||
| sed -i "s!__ESPLORA_UNIX_SOCKET_PATH__!${__ESPLORA_UNIX_SOCKET_PATH__}!g" mempool-config.json | sed -i "s!__ESPLORA_UNIX_SOCKET_PATH__!${__ESPLORA_UNIX_SOCKET_PATH__}!g" mempool-config.json | ||||||
| sed -i "s!__ESPLORA_RETRY_UNIX_SOCKET_AFTER__!${__ESPLORA_RETRY_UNIX_SOCKET_AFTER__}!g" mempool-config.json | sed -i "s!__ESPLORA_RETRY_UNIX_SOCKET_AFTER__!${__ESPLORA_RETRY_UNIX_SOCKET_AFTER__}!g" mempool-config.json | ||||||
|  | sed -i "s!__ESPLORA_FALLBACK__!${__ESPLORA_FALLBACK__}!g" mempool-config.json | ||||||
| 
 | 
 | ||||||
| sed -i "s!__SECOND_CORE_RPC_HOST__!${__SECOND_CORE_RPC_HOST__}!g" mempool-config.json | sed -i "s!__SECOND_CORE_RPC_HOST__!${__SECOND_CORE_RPC_HOST__}!g" mempool-config.json | ||||||
| sed -i "s!__SECOND_CORE_RPC_PORT__!${__SECOND_CORE_RPC_PORT__}!g" mempool-config.json | sed -i "s!__SECOND_CORE_RPC_PORT__!${__SECOND_CORE_RPC_PORT__}!g" mempool-config.json | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user