diff --git a/_resources/packs/os/npm/packagejson.go b/providers/os/resources/npm/packagejson.go similarity index 95% rename from _resources/packs/os/npm/packagejson.go rename to providers/os/resources/npm/packagejson.go index 5e1b414d0d..ea998ba798 100644 --- a/_resources/packs/os/npm/packagejson.go +++ b/providers/os/resources/npm/packagejson.go @@ -6,9 +6,8 @@ package npm import ( "encoding/json" "io" - "io/ioutil" - "go.mondoo.com/cnquery/upstream/mvd" + "go.mondoo.com/cnquery/providers-sdk/v1/upstream/mvd" ) // PackageJson allows parsing the package json file @@ -34,7 +33,7 @@ type PackageJsonLock struct { } func ParsePackageJson(r io.Reader) ([]*mvd.Package, error) { - data, err := ioutil.ReadAll(r) + data, err := io.ReadAll(r) if err != nil { return nil, err } @@ -70,7 +69,7 @@ func ParsePackageJson(r io.Reader) ([]*mvd.Package, error) { } func ParsePackageJsonLock(r io.Reader) ([]*mvd.Package, error) { - data, err := ioutil.ReadAll(r) + data, err := io.ReadAll(r) if err != nil { return nil, err } diff --git a/_resources/packs/os/npm/packagejson_test.go b/providers/os/resources/npm/packagejson_test.go similarity index 92% rename from _resources/packs/os/npm/packagejson_test.go rename to providers/os/resources/npm/packagejson_test.go index 32b69dcc7b..d24759d325 100644 --- a/_resources/packs/os/npm/packagejson_test.go +++ b/providers/os/resources/npm/packagejson_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/resources/packs/os/npm" - "go.mondoo.com/cnquery/upstream/mvd" + "go.mondoo.com/cnquery/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/providers/os/resources/npm" ) func TestPackageJsonParser(t *testing.T) { diff --git a/_resources/packs/os/npm/testdata/d3-yarn.lock b/providers/os/resources/npm/testdata/d3-yarn.lock similarity index 100% rename from _resources/packs/os/npm/testdata/d3-yarn.lock rename to providers/os/resources/npm/testdata/d3-yarn.lock diff --git a/_resources/packs/os/npm/testdata/express-package.json b/providers/os/resources/npm/testdata/express-package.json similarity index 100% rename from _resources/packs/os/npm/testdata/express-package.json rename to providers/os/resources/npm/testdata/express-package.json diff --git a/_resources/packs/os/npm/testdata/workbox-package-lock.json b/providers/os/resources/npm/testdata/workbox-package-lock.json similarity index 100% rename from _resources/packs/os/npm/testdata/workbox-package-lock.json rename to providers/os/resources/npm/testdata/workbox-package-lock.json diff --git a/_resources/packs/os/npm/yarn.go b/providers/os/resources/npm/yarn.go similarity index 96% rename from _resources/packs/os/npm/yarn.go rename to providers/os/resources/npm/yarn.go index 7ca8c20d09..7f7a58c854 100644 --- a/_resources/packs/os/npm/yarn.go +++ b/providers/os/resources/npm/yarn.go @@ -12,7 +12,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/upstream/mvd" + "go.mondoo.com/cnquery/providers-sdk/v1/upstream/mvd" "sigs.k8s.io/yaml" ) diff --git a/_resources/packs/os/npm/yarn_test.go b/providers/os/resources/npm/yarn_test.go similarity index 93% rename from _resources/packs/os/npm/yarn_test.go rename to providers/os/resources/npm/yarn_test.go index e595f0f54a..dcbf2482ee 100644 --- a/_resources/packs/os/npm/yarn_test.go +++ b/providers/os/resources/npm/yarn_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/resources/packs/os/npm" - "go.mondoo.com/cnquery/upstream/mvd" + "go.mondoo.com/cnquery/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/providers/os/resources/npm" ) func TestYarnParser(t *testing.T) {