[#6407] added os.Stat jsvm binding
This commit is contained in:
		
							parent
							
								
									9856c59de0
								
							
						
					
					
						commit
						9da7a8f72b
					
				|  | @ -2,6 +2,8 @@ | |||
| 
 | ||||
| - ⚠️ Prioritized the user submitted non-empty `createData.email` (_it will be unverified_) when creating the PocketBase user during the first OAuth2 auth. | ||||
| 
 | ||||
| - Added `$os.stat(file)` JSVM helper ([#6407](https://github.com/pocketbase/pocketbase/discussions/6407)). | ||||
| 
 | ||||
| 
 | ||||
| ## v0.25.0 | ||||
| 
 | ||||
|  |  | |||
|  | @ -715,6 +715,7 @@ func osBinds(vm *goja.Runtime) { | |||
| 	obj.Set("exit", os.Exit) | ||||
| 	obj.Set("getenv", os.Getenv) | ||||
| 	obj.Set("dirFS", os.DirFS) | ||||
| 	obj.Set("stat", os.Stat) | ||||
| 	obj.Set("readFile", os.ReadFile) | ||||
| 	obj.Set("writeFile", os.WriteFile) | ||||
| 	obj.Set("readDir", os.ReadDir) | ||||
|  |  | |||
|  | @ -1614,5 +1614,5 @@ func TestOsBindsCount(t *testing.T) { | |||
| 	vm := goja.New() | ||||
| 	osBinds(vm) | ||||
| 
 | ||||
| 	testBindsCount(vm, "$os", 17, t) | ||||
| 	testBindsCount(vm, "$os", 18, t) | ||||
| } | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -882,6 +882,7 @@ declare namespace $os { | |||
|   export let dirFS:     os.dirFS | ||||
|   export let readFile:  os.readFile | ||||
|   export let writeFile: os.writeFile | ||||
|   export let stat:      os.stat | ||||
|   export let readDir:   os.readDir | ||||
|   export let tempDir:   os.tempDir | ||||
|   export let truncate:  os.truncate | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue