Merge 49083d7154 into 07eea0f484
				
					
				
			This commit is contained in:
		
						commit
						0c1eb79fe6
					
				| @ -286,6 +286,9 @@ | |||||||
|     "watchTriggerable": true, |     "watchTriggerable": true, | ||||||
|     "watchWithFilter": true, |     "watchWithFilter": true, | ||||||
|     "whenever": true, |     "whenever": true, | ||||||
|     "toValue": true |     "toValue": true, | ||||||
|  |     "injectLocal": true, | ||||||
|  |     "provideLocal": true, | ||||||
|  |     "useClipboardItems": true | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										9
									
								
								auto-imports.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								auto-imports.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -36,6 +36,7 @@ declare global { | |||||||
|   const h: typeof import('vue')['h'] |   const h: typeof import('vue')['h'] | ||||||
|   const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] |   const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] | ||||||
|   const inject: typeof import('vue')['inject'] |   const inject: typeof import('vue')['inject'] | ||||||
|  |   const injectLocal: typeof import('@vueuse/core')['injectLocal'] | ||||||
|   const isDefined: typeof import('@vueuse/core')['isDefined'] |   const isDefined: typeof import('@vueuse/core')['isDefined'] | ||||||
|   const isProxy: typeof import('vue')['isProxy'] |   const isProxy: typeof import('vue')['isProxy'] | ||||||
|   const isReactive: typeof import('vue')['isReactive'] |   const isReactive: typeof import('vue')['isReactive'] | ||||||
| @ -65,6 +66,7 @@ declare global { | |||||||
|   const onUpdated: typeof import('vue')['onUpdated'] |   const onUpdated: typeof import('vue')['onUpdated'] | ||||||
|   const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] |   const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] | ||||||
|   const provide: typeof import('vue')['provide'] |   const provide: typeof import('vue')['provide'] | ||||||
|  |   const provideLocal: typeof import('@vueuse/core')['provideLocal'] | ||||||
|   const reactify: typeof import('@vueuse/core')['reactify'] |   const reactify: typeof import('@vueuse/core')['reactify'] | ||||||
|   const reactifyObject: typeof import('@vueuse/core')['reactifyObject'] |   const reactifyObject: typeof import('@vueuse/core')['reactifyObject'] | ||||||
|   const reactive: typeof import('vue')['reactive'] |   const reactive: typeof import('vue')['reactive'] | ||||||
| @ -128,6 +130,7 @@ declare global { | |||||||
|   const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation'] |   const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation'] | ||||||
|   const useCached: typeof import('@vueuse/core')['useCached'] |   const useCached: typeof import('@vueuse/core')['useCached'] | ||||||
|   const useClipboard: typeof import('@vueuse/core')['useClipboard'] |   const useClipboard: typeof import('@vueuse/core')['useClipboard'] | ||||||
|  |   const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems'] | ||||||
|   const useCloned: typeof import('@vueuse/core')['useCloned'] |   const useCloned: typeof import('@vueuse/core')['useCloned'] | ||||||
|   const useColorMode: typeof import('@vueuse/core')['useColorMode'] |   const useColorMode: typeof import('@vueuse/core')['useColorMode'] | ||||||
|   const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog'] |   const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog'] | ||||||
| @ -326,6 +329,7 @@ declare module 'vue' { | |||||||
|     readonly h: UnwrapRef<typeof import('vue')['h']> |     readonly h: UnwrapRef<typeof import('vue')['h']> | ||||||
|     readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']> |     readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']> | ||||||
|     readonly inject: UnwrapRef<typeof import('vue')['inject']> |     readonly inject: UnwrapRef<typeof import('vue')['inject']> | ||||||
|  |     readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']> | ||||||
|     readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']> |     readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']> | ||||||
|     readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> |     readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> | ||||||
|     readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> |     readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> | ||||||
| @ -355,6 +359,7 @@ declare module 'vue' { | |||||||
|     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> |     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> | ||||||
|     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']> |     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']> | ||||||
|     readonly provide: UnwrapRef<typeof import('vue')['provide']> |     readonly provide: UnwrapRef<typeof import('vue')['provide']> | ||||||
|  |     readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']> | ||||||
|     readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']> |     readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']> | ||||||
|     readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']> |     readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']> | ||||||
|     readonly reactive: UnwrapRef<typeof import('vue')['reactive']> |     readonly reactive: UnwrapRef<typeof import('vue')['reactive']> | ||||||
| @ -418,6 +423,7 @@ declare module 'vue' { | |||||||
|     readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']> |     readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']> | ||||||
|     readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']> |     readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']> | ||||||
|     readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']> |     readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']> | ||||||
|  |     readonly useClipboardItems: UnwrapRef<typeof import('@vueuse/core')['useClipboardItems']> | ||||||
|     readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']> |     readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']> | ||||||
|     readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']> |     readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']> | ||||||
|     readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']> |     readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']> | ||||||
| @ -610,6 +616,7 @@ declare module '@vue/runtime-core' { | |||||||
|     readonly h: UnwrapRef<typeof import('vue')['h']> |     readonly h: UnwrapRef<typeof import('vue')['h']> | ||||||
|     readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']> |     readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']> | ||||||
|     readonly inject: UnwrapRef<typeof import('vue')['inject']> |     readonly inject: UnwrapRef<typeof import('vue')['inject']> | ||||||
|  |     readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']> | ||||||
|     readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']> |     readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']> | ||||||
|     readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> |     readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> | ||||||
|     readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> |     readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> | ||||||
| @ -639,6 +646,7 @@ declare module '@vue/runtime-core' { | |||||||
|     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> |     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> | ||||||
|     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']> |     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']> | ||||||
|     readonly provide: UnwrapRef<typeof import('vue')['provide']> |     readonly provide: UnwrapRef<typeof import('vue')['provide']> | ||||||
|  |     readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']> | ||||||
|     readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']> |     readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']> | ||||||
|     readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']> |     readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']> | ||||||
|     readonly reactive: UnwrapRef<typeof import('vue')['reactive']> |     readonly reactive: UnwrapRef<typeof import('vue')['reactive']> | ||||||
| @ -702,6 +710,7 @@ declare module '@vue/runtime-core' { | |||||||
|     readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']> |     readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']> | ||||||
|     readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']> |     readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']> | ||||||
|     readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']> |     readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']> | ||||||
|  |     readonly useClipboardItems: UnwrapRef<typeof import('@vueuse/core')['useClipboardItems']> | ||||||
|     readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']> |     readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']> | ||||||
|     readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']> |     readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']> | ||||||
|     readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']> |     readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']> | ||||||
|  | |||||||
| @ -92,6 +92,51 @@ const regexesData = [ | |||||||
|       }, |       }, | ||||||
|     ], |     ], | ||||||
|   }, |   }, | ||||||
|  |   { | ||||||
|  |     regex: String.raw`\s([^\s\[]+)(?:\[(\d+)\])?:\s`, | ||||||
|  |     text: 'Nov 11 21:03:26 abc2 def.sh[1]: \nNov 11 21:03:26 abc2 def.sh: ', | ||||||
|  |     flags: 'gm', | ||||||
|  |     result: [ | ||||||
|  |       { | ||||||
|  |         captures: [ | ||||||
|  |           { | ||||||
|  |             end: 27, | ||||||
|  |             name: '1', | ||||||
|  |             start: 21, | ||||||
|  |             value: 'def.sh', | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             end: 29, | ||||||
|  |             name: '2', | ||||||
|  |             start: 28, | ||||||
|  |             value: '1', | ||||||
|  |           }, | ||||||
|  |         ], | ||||||
|  |         groups: [], | ||||||
|  |         index: 20, | ||||||
|  |         value: ' def.sh[1]: ', | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         captures: [ | ||||||
|  |           { | ||||||
|  |             end: 60, | ||||||
|  |             name: '1', | ||||||
|  |             start: 54, | ||||||
|  |             value: 'def.sh', | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             end: -1, | ||||||
|  |             name: '2', | ||||||
|  |             start: -1, | ||||||
|  |             value: undefined, | ||||||
|  |           }, | ||||||
|  |         ], | ||||||
|  |         groups: [], | ||||||
|  |         index: 53, | ||||||
|  |         value: ' def.sh: ', | ||||||
|  |       }, | ||||||
|  |     ], | ||||||
|  |   }, | ||||||
| ]; | ]; | ||||||
| 
 | 
 | ||||||
| describe('regex-tester', () => { | describe('regex-tester', () => { | ||||||
|  | |||||||
| @ -31,21 +31,23 @@ export function matchRegex(regex: string, text: string, flags: string) { | |||||||
|     const captures: Array<GroupCapture> = []; |     const captures: Array<GroupCapture> = []; | ||||||
|     Object.entries(match).forEach(([captureName, captureValue]) => { |     Object.entries(match).forEach(([captureName, captureValue]) => { | ||||||
|       if (captureName !== '0' && captureName.match(/\d+/)) { |       if (captureName !== '0' && captureName.match(/\d+/)) { | ||||||
|  |         const captureIndices = indices[Number(captureName)] || [-1, -1]; | ||||||
|         captures.push({ |         captures.push({ | ||||||
|           name: captureName, |           name: captureName, | ||||||
|           value: captureValue, |           value: captureValue, | ||||||
|           start: indices[Number(captureName)][0], |           start: captureIndices[0], | ||||||
|           end: indices[Number(captureName)][1], |           end: captureIndices[1], | ||||||
|         }); |         }); | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|     const groups: Array<GroupCapture> = []; |     const groups: Array<GroupCapture> = []; | ||||||
|     Object.entries(match.groups || {}).forEach(([groupName, groupValue]) => { |     Object.entries(match.groups || {}).forEach(([groupName, groupValue]) => { | ||||||
|  |       const groupIndices = indices.groups[groupName] || [-1, -1]; | ||||||
|       groups.push({ |       groups.push({ | ||||||
|         name: groupName, |         name: groupName, | ||||||
|         value: groupValue, |         value: groupValue, | ||||||
|         start: indices.groups[groupName][0], |         start: groupIndices[0], | ||||||
|         end: indices.groups[groupName][1], |         end: groupIndices[1], | ||||||
|       }); |       }); | ||||||
|     }); |     }); | ||||||
|     results.push({ |     results.push({ | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user