[#1797] enabled goja/process module for accessing the os.Environ
This commit is contained in:
parent
f475967a4a
commit
668698feb2
|
@ -7,6 +7,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/dop251/goja_nodejs/console"
|
"github.com/dop251/goja_nodejs/console"
|
||||||
|
"github.com/dop251/goja_nodejs/process"
|
||||||
"github.com/dop251/goja_nodejs/require"
|
"github.com/dop251/goja_nodejs/require"
|
||||||
"github.com/pocketbase/dbx"
|
"github.com/pocketbase/dbx"
|
||||||
"github.com/pocketbase/pocketbase/core"
|
"github.com/pocketbase/pocketbase/core"
|
||||||
|
@ -28,7 +29,6 @@ type migrations struct {
|
||||||
options *MigrationsOptions
|
options *MigrationsOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// MustRegisterMigrations registers the migrations loader plugin to
|
// MustRegisterMigrations registers the migrations loader plugin to
|
||||||
// the provided app instance and panics if it fails.
|
// the provided app instance and panics if it fails.
|
||||||
//
|
//
|
||||||
|
@ -70,6 +70,7 @@ func RegisterMigrations(app core.App, options *MigrationsOptions) error {
|
||||||
vm := NewBaseVM()
|
vm := NewBaseVM()
|
||||||
registry.Enable(vm)
|
registry.Enable(vm)
|
||||||
console.Enable(vm)
|
console.Enable(vm)
|
||||||
|
process.Enable(vm)
|
||||||
|
|
||||||
vm.Set("migrate", func(up, down func(db dbx.Builder) error) {
|
vm.Set("migrate", func(up, down func(db dbx.Builder) error) {
|
||||||
m.AppMigrations.Register(up, down, file)
|
m.AppMigrations.Register(up, down, file)
|
||||||
|
|
Loading…
Reference in New Issue