mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-13 19:33:55 +03:00
cli: update go.mod
> ### Description Update `go.mod` to allow other packages to import [v2.0.0 versions](https://blog.golang.org/v2-go-modules). ### Changelog - [x] `CHANGELOG.md` is updated with user-facing content relevant to this PR. If no changelog is required, then add the `no-changelog-required` label. ### Affected components - [x] CLI https://github.com/hasura/graphql-engine-mono/pull/1584 GitOrigin-RevId: a5d17ad20289d1cd7217763f56ef3ba6552d69c4
This commit is contained in:
parent
09070769b4
commit
3136ffad1b
@ -27,7 +27,7 @@ build:
|
||||
ifndef HAS_GOX
|
||||
cd ~ && go get github.com/mitchellh/gox && cd -
|
||||
endif
|
||||
gox -ldflags '-X github.com/hasura/graphql-engine/cli/version.BuildVersion=$(VERSION) -X github.com/hasura/graphql-engine/cli/plugins.IndexBranchRef=$(PLUGINS_BRANCH) -s -w -extldflags "-static"' \
|
||||
gox -ldflags '-X github.com/hasura/graphql-engine/cli/v2/version.BuildVersion=$(VERSION) -X github.com/hasura/graphql-engine/cli/v2/plugins.IndexBranchRef=$(PLUGINS_BRANCH) -s -w -extldflags "-static"' \
|
||||
-rebuild \
|
||||
-os="$(OS)" \
|
||||
-arch="amd64" \
|
||||
@ -61,13 +61,13 @@ copy-cli-ext: clean-cli-ext
|
||||
.PHONY: test
|
||||
test: copy-cli-ext
|
||||
if [ -z "${HASURA_TEST_CLI_HGE_DOCKER_IMAGE}" ]; then echo "Please set HASURA_TEST_CLI_HGE_DOCKER_IMAGE env for populating testutil.HasuraDockerImage and run test"; exit 1; fi
|
||||
go test -ldflags "-X github.com/hasura/graphql-engine/cli/version.BuildVersion=$(VERSION)" -v -tags="${TEST_TAGS}" `go list ./... | grep -v integration_test | grep -v commands`
|
||||
go test -ldflags "-X github.com/hasura/graphql-engine/cli/v2/version.BuildVersion=$(VERSION)" -v -tags="${TEST_TAGS}" `go list ./... | grep -v integration_test | grep -v commands`
|
||||
integration_tests_config_v3: copy-cli-ext
|
||||
if [ -z "${HASURA_TEST_CLI_HGE_DOCKER_IMAGE}" ]; then echo "Please set HASURA_TEST_CLI_HGE_DOCKER_IMAGE env for populating testutil.HasuraDockerImage and run test"; exit 1; fi
|
||||
go test -ldflags "-X github.com/hasura/graphql-engine/cli/version.BuildVersion=$(VERSION)" -v -tags="${TEST_TAGS}" -run Commands/config=v3 ./integration_test
|
||||
go test -ldflags "-X github.com/hasura/graphql-engine/cli/v2/version.BuildVersion=$(VERSION)" -v -tags="${TEST_TAGS}" -run Commands/config=v3 ./integration_test
|
||||
integration_tests_config_v2: copy-cli-ext
|
||||
if [ -z "${HASURA_TEST_CLI_HGE_DOCKER_IMAGE}" ]; then echo "Please set HASURA_TEST_CLI_HGE_DOCKER_IMAGE env for populating testutil.HasuraDockerImage and run test"; exit 1; fi
|
||||
go test -ldflags "-X github.com/hasura/graphql-engine/cli/version.BuildVersion=$(VERSION)" -v -tags="${TEST_TAGS}" -run Commands/config=v2 ./integration_test
|
||||
go test -ldflags "-X github.com/hasura/graphql-engine/cli/v2/version.BuildVersion=$(VERSION)" -v -tags="${TEST_TAGS}" -run Commands/config=v2 ./integration_test
|
||||
test-e2e:
|
||||
ifndef HAS_GINKGO
|
||||
cd ~ && go get github.com/onsi/ginkgo/ginkgo && cd -
|
||||
|
34
cli/cli.go
34
cli/cli.go
@ -23,34 +23,34 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/pgdump"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/v1graphql"
|
||||
"github.com/hasura/graphql-engine/cli/migrate/database/hasuradb"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/pgdump"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/v1graphql"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate/database/hasuradb"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/v1metadata"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/v1query"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/v2query"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/v1metadata"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/v1query"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/v2query"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/commonmetadata"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/statestore/settings"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/statestore/settings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/statestore/migrations"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/statestore/migrations"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/statestore"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/statestore"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/Masterminds/semver"
|
||||
"github.com/briandowns/spinner"
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/plugins"
|
||||
"github.com/hasura/graphql-engine/cli/telemetry"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/version"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/v2/plugins"
|
||||
"github.com/hasura/graphql-engine/cli/v2/telemetry"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/version"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -2,7 +2,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -4,12 +4,12 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
@ -4,12 +4,12 @@ import (
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/pkg/console"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/pkg/console"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/cobra/doc"
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -7,21 +7,21 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
crontriggers "github.com/hasura/graphql-engine/cli/internal/metadataobject/cron_triggers"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/functions"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/sources"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/tables"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
crontriggers "github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/cron_triggers"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/functions"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/sources"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/tables"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions"
|
||||
actionMetadataFileTypes "github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/allowlist"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/querycollections"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/remoteschemas"
|
||||
metadataVersion "github.com/hasura/graphql-engine/cli/internal/metadataobject/version"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions"
|
||||
actionMetadataFileTypes "github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/allowlist"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/querycollections"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/remoteschemas"
|
||||
metadataVersion "github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/version"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/manifoldco/promptui"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/goccy/go-yaml"
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
@ -1,12 +1,12 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func newMetadataApplyCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
@ -116,4 +116,4 @@ func errorApplyingMetadata(err error) error {
|
||||
// a helper function to have consistent error messages for errors
|
||||
// when applying metadata
|
||||
return fmt.Errorf("error applying metadata \n%w", err)
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/Pallinder/go-randomdata"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
|
||||
"github.com/aryann/difflib"
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/mgutz/ansi"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/Pallinder/go-randomdata"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -5,13 +5,13 @@ import (
|
||||
"fmt"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
)
|
||||
|
||||
func newMetadataInconsistencyListCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -3,21 +3,21 @@ package commands
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadatautil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadatautil"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/scripts"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
mig "github.com/hasura/graphql-engine/cli/migrate/cmd"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
mig "github.com/hasura/graphql-engine/cli/v2/migrate/cmd"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
// Initialize migration drivers
|
||||
_ "github.com/hasura/graphql-engine/cli/migrate/database/hasuradb"
|
||||
_ "github.com/hasura/graphql-engine/cli/migrate/source/file"
|
||||
_ "github.com/hasura/graphql-engine/cli/v2/migrate/database/hasuradb"
|
||||
_ "github.com/hasura/graphql-engine/cli/v2/migrate/source/file"
|
||||
)
|
||||
|
||||
// NewMigrateCmd returns the migrate command
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadatautil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadatautil"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
migrate "github.com/hasura/graphql-engine/cli/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
migrate "github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/Pallinder/go-randomdata"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -5,13 +5,13 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
mig "github.com/hasura/graphql-engine/cli/migrate/cmd"
|
||||
mig "github.com/hasura/graphql-engine/cli/v2/migrate/cmd"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
mig "github.com/hasura/graphql-engine/cli/migrate/cmd"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
mig "github.com/hasura/graphql-engine/cli/v2/migrate/cmd"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gbytes"
|
||||
|
@ -7,16 +7,16 @@ import (
|
||||
"strings"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
mig "github.com/hasura/graphql-engine/cli/migrate/cmd"
|
||||
mig "github.com/hasura/graphql-engine/cli/v2/migrate/cmd"
|
||||
)
|
||||
|
||||
func newMigrateSquashCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
"os"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gbytes"
|
||||
|
@ -28,7 +28,7 @@ import (
|
||||
"syscall"
|
||||
"unicode"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -10,10 +10,10 @@ source: https://github.com/kubernetes-sigs/krew/blob/master/cmd/krew/cmd/install
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/plugins"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/plugins"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -19,8 +19,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/plugins"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/plugins"
|
||||
)
|
||||
|
||||
func newPluginsListCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
|
@ -10,7 +10,7 @@ source: https://github.com/kubernetes-sigs/krew/blob/master/cmd/krew/cmd/uninsta
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -12,9 +12,9 @@ import (
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/plugins"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/plugins"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/update"
|
||||
"github.com/hasura/graphql-engine/cli/version"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/update"
|
||||
"github.com/hasura/graphql-engine/cli/v2/version"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -7,20 +7,20 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/cliext"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/cliext"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/migrate/database/hasuradb"
|
||||
"github.com/hasura/graphql-engine/cli/migrate/source"
|
||||
"github.com/hasura/graphql-engine/cli/migrate/source/file"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate/database/hasuradb"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate/source"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate/source/file"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -3,11 +3,11 @@ package commands
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gbytes"
|
||||
|
@ -3,13 +3,13 @@ package commands
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/seed"
|
||||
"github.com/hasura/graphql-engine/cli/v2/seed"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadatautil"
|
||||
"github.com/hasura/graphql-engine/cli/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadatautil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/scripts"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"github.com/spf13/afero"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/seed"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/seed"
|
||||
)
|
||||
|
||||
type SeedApplyOptions struct {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -7,15 +7,15 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/editor"
|
||||
"github.com/hasura/graphql-engine/cli/seed"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/editor"
|
||||
"github.com/hasura/graphql-engine/cli/v2/seed"
|
||||
)
|
||||
|
||||
type SeedNewOptions struct {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/Pallinder/go-randomdata"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
|
||||
"github.com/Masterminds/semver"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/update"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/update"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -1,11 +1,11 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"os"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"os"
|
||||
)
|
||||
|
||||
// NewVersionCmd returns the version command
|
||||
@ -19,11 +19,11 @@ func NewVersionCmd(ec *cli.ExecutionContext) *cobra.Command {
|
||||
return ec.Prepare()
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
logger := logrus.New()
|
||||
logger.SetOutput(os.Stdout)
|
||||
logger.SetFormatter(&logrus.TextFormatter{DisableTimestamp: true, DisableColors: ec.NoColor})
|
||||
if !ec.IsTerminal {
|
||||
logger.SetFormatter(&logrus.JSONFormatter{PrettyPrint: false})
|
||||
logger := logrus.New()
|
||||
logger.SetOutput(os.Stdout)
|
||||
logger.SetFormatter(&logrus.TextFormatter{DisableTimestamp: true, DisableColors: ec.NoColor})
|
||||
if !ec.IsTerminal {
|
||||
logger.SetFormatter(&logrus.JSONFormatter{PrettyPrint: false})
|
||||
}
|
||||
|
||||
logger.WithField("version", ec.Version.GetCLIVersion()).Info("hasura cli")
|
||||
|
@ -1,4 +1,4 @@
|
||||
module github.com/hasura/graphql-engine/cli
|
||||
module github.com/hasura/graphql-engine/cli/v2
|
||||
|
||||
go 1.16
|
||||
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -10,13 +10,13 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/briandowns/spinner"
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
integrationtest "github.com/hasura/graphql-engine/cli/integration_test"
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
integrationtest "github.com/hasura/graphql-engine/cli/v2/integration_test"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
v2 "github.com/hasura/graphql-engine/cli/integration_test/v2"
|
||||
v3 "github.com/hasura/graphql-engine/cli/integration_test/v3"
|
||||
v2 "github.com/hasura/graphql-engine/cli/v2/integration_test/v2"
|
||||
v3 "github.com/hasura/graphql-engine/cli/v2/integration_test/v3"
|
||||
"github.com/sirupsen/logrus/hooks/test"
|
||||
)
|
||||
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
)
|
||||
|
||||
func TestConsoleCmd(t *testing.T, ec *cli.ExecutionContext) {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
)
|
||||
|
||||
func TestInitCmd(t *testing.T, ec *cli.ExecutionContext, initDir, hasuraPort string) {
|
||||
|
@ -7,11 +7,11 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -6,12 +6,12 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -9,14 +9,14 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/seed"
|
||||
"github.com/hasura/graphql-engine/cli/v2/seed"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
)
|
||||
|
||||
func TestConsoleCmd(t *testing.T, ec *cli.ExecutionContext) {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
)
|
||||
|
||||
func TestInitCmd(t *testing.T, ec *cli.ExecutionContext, initDir, hasuraPort string) {
|
||||
|
@ -8,11 +8,11 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -6,12 +6,12 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2/migrate"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -10,14 +10,14 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/commands"
|
||||
"github.com/hasura/graphql-engine/cli/v2/commands"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/seed"
|
||||
"github.com/hasura/graphql-engine/cli/v2/seed"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
type ClientCatalogState struct {
|
||||
|
@ -9,9 +9,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
func TestClientCatalogState_Set(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package hasura
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
type GenericSend func(requestBody interface{}) (httpcResponse *httpc.Response, responseBody io.Reader, error error)
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
// implements all metadata operations which does not depend on the database
|
||||
|
@ -11,13 +11,13 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
func TestClient_ExportMetadata(t *testing.T) {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
)
|
||||
|
||||
func (c *ClientCommonMetadataOps) V2ReplaceMetadata(args hasura.V2ReplaceMetadataArgs) (*hasura.V2ReplaceMetadataResponse, error) {
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
func TestClientCommonMetadataOps_V2ReplaceMetadata(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package hasura
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
// general hasura metadata API requests
|
||||
|
@ -7,9 +7,9 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
|
@ -4,14 +4,14 @@ import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
pg "github.com/hasura/graphql-engine/cli/internal/hasura/sourceops/postgres"
|
||||
pg "github.com/hasura/graphql-engine/cli/v2/internal/hasura/sourceops/postgres"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
func TestClient_Send(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
// allow to interact with all hasura opertions on database
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
)
|
||||
|
||||
func (c *SourceOps) MSSQLRunSQL(input hasura.MSSQLRunSQLInput) (*hasura.MSSQLRunSQLOutput, error) {
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
func TestHasuraDatabaseOperations_RunSQL(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
// allow to interact with all hasura opertions on database
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
)
|
||||
|
||||
func (d *SourceOps) PGRunSQL(input hasura.PGRunSQLInput) (*hasura.PGRunSQLOutput, error) {
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
func TestHasuraDatabaseOperations_RunSQL(t *testing.T) {
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
|
@ -7,11 +7,11 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
func TestClient_GetIntrospectionSchema(t *testing.T) {
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/catalogstate"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/catalogstate"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
|
@ -7,11 +7,11 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/sourceops/postgres"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/sourceops/postgres"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
|
@ -7,14 +7,14 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/sourceops/postgres"
|
||||
pg "github.com/hasura/graphql-engine/cli/internal/hasura/sourceops/postgres"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/sourceops/postgres"
|
||||
pg "github.com/hasura/graphql-engine/cli/v2/internal/hasura/sourceops/postgres"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -5,14 +5,14 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
pg "github.com/hasura/graphql-engine/cli/internal/hasura/sourceops/postgres"
|
||||
pg "github.com/hasura/graphql-engine/cli/v2/internal/hasura/sourceops/postgres"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/internal/testutil"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/commonmetadata"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/testutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -7,11 +7,11 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/sourceops/mssql"
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura/sourceops/postgres"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/sourceops/mssql"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura/sourceops/postgres"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/internal/httpc"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/hasura"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/httpc"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
|
@ -5,13 +5,13 @@ import (
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/hasura/graphql-engine/cli"
|
||||
"github.com/hasura/graphql-engine/cli/internal/cliext"
|
||||
cliextension "github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/cli_extension"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/editor"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/util"
|
||||
"github.com/hasura/graphql-engine/cli/version"
|
||||
"github.com/hasura/graphql-engine/cli/v2"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/cliext"
|
||||
cliextension "github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/cli_extension"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/editor"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/v2/util"
|
||||
"github.com/hasura/graphql-engine/cli/v2/version"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"os/exec"
|
||||
|
||||
gyaml "github.com/goccy/go-yaml"
|
||||
"github.com/hasura/graphql-engine/cli/internal/metadataobject/actions/types"
|
||||
"github.com/hasura/graphql-engine/cli/v2/internal/metadataobject/actions/types"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user