# GENERATED BY: test/dependency_services/dependency_services_test.dart

$ cat pubspec.yaml
{"name":"app","dependencies":{"foo":"^1.0.0","bar":"^1.0.0","baz":"1.0.0"},"environment":{"sdk":"^3.0.2"}}
$ cat pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  bar:
    dependency: "direct main"
    description:
      name: bar
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.0.0"
  baz:
    dependency: "direct main"
    description:
      name: baz
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.0.0"
  foo:
    dependency: "direct main"
    description:
      name: foo
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.0.0"
sdks:
  dart: ">=3.0.2 <4.0.0"
-------------------------------- END OF OUTPUT ---------------------------------

## Section list
$ echo '' | dependency_services list
{
  "dependencies": [
    {
      "name": "bar",
      "version": "1.0.0",
      "kind": "direct",
      "constraint": "^1.0.0",
      "source": {
        "type": "hosted",
        "description": {
          "name": "bar",
          "url": "http://localhost:$PORT",
          "sha256": "c6d045d6b6edfb503ae0e2a55114e888861505ccea817c08186ffc17975ea9fe"
        }
      }
    },
    {
      "name": "baz",
      "version": "1.0.0",
      "kind": "direct",
      "constraint": "1.0.0",
      "source": {
        "type": "hosted",
        "description": {
          "name": "baz",
          "url": "http://localhost:$PORT",
          "sha256": "a7efc9c78968fdb7a7eed37efa3d53caf8b0eef7921b512f581966733cc9fc46"
        }
      }
    },
    {
      "name": "foo",
      "version": "1.0.0",
      "kind": "direct",
      "constraint": "^1.0.0",
      "source": {
        "type": "hosted",
        "description": {
          "name": "foo",
          "url": "http://localhost:$PORT",
          "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
        }
      }
    }
  ]
}

-------------------------------- END OF OUTPUT ---------------------------------

## Section report
$ echo '' | dependency_services report
{
  "dependencies": [
    {
      "name": "bar",
      "version": "1.0.0",
      "kind": "direct",
      "source": {
        "type": "hosted",
        "description": {
          "name": "bar",
          "url": "http://localhost:$PORT",
          "sha256": "c6d045d6b6edfb503ae0e2a55114e888861505ccea817c08186ffc17975ea9fe"
        }
      },
      "latest": "2.0.0",
      "constraint": "^1.0.0",
      "compatible": [],
      "singleBreaking": [],
      "multiBreaking": [
        {
          "name": "bar",
          "version": "2.0.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "2b81272d999c7fd2ebe60df3b35dd84b043bccd85dd830dacf503485f50d2333"
            }
          },
          "constraintBumped": "^2.0.0",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.0.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "c6d045d6b6edfb503ae0e2a55114e888861505ccea817c08186ffc17975ea9fe"
            }
          }
        },
        {
          "name": "foo",
          "version": "3.0.1",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "b72007a4addefd6f54367b93d533cd672036dd4c2eb18c554fc96a08ed762a49"
            }
          },
          "constraintBumped": "^3.0.1",
          "constraintWidened": ">=1.0.0 <4.0.0",
          "constraintBumpedIfNeeded": "^3.0.1",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
            }
          }
        }
      ]
    },
    {
      "name": "baz",
      "version": "1.0.0",
      "kind": "direct",
      "source": {
        "type": "hosted",
        "description": {
          "name": "baz",
          "url": "http://localhost:$PORT",
          "sha256": "a7efc9c78968fdb7a7eed37efa3d53caf8b0eef7921b512f581966733cc9fc46"
        }
      },
      "latest": "1.1.0",
      "constraint": "1.0.0",
      "compatible": [],
      "singleBreaking": [
        {
          "name": "baz",
          "version": "1.1.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "baz",
              "url": "http://localhost:$PORT",
              "sha256": "35e6795d39c0f711e99ff2ad2f02fda1dbd14a3f68b92872dc5125c6a716d8ac"
            }
          },
          "constraintBumped": "1.1.0",
          "constraintWidened": "1.1.0",
          "constraintBumpedIfNeeded": "1.1.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "baz",
              "url": "http://localhost:$PORT",
              "sha256": "a7efc9c78968fdb7a7eed37efa3d53caf8b0eef7921b512f581966733cc9fc46"
            }
          }
        }
      ],
      "multiBreaking": [
        {
          "name": "baz",
          "version": "1.1.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "baz",
              "url": "http://localhost:$PORT",
              "sha256": "35e6795d39c0f711e99ff2ad2f02fda1dbd14a3f68b92872dc5125c6a716d8ac"
            }
          },
          "constraintBumped": "1.1.0",
          "constraintWidened": "1.1.0",
          "constraintBumpedIfNeeded": "1.1.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "baz",
              "url": "http://localhost:$PORT",
              "sha256": "a7efc9c78968fdb7a7eed37efa3d53caf8b0eef7921b512f581966733cc9fc46"
            }
          }
        }
      ]
    },
    {
      "name": "foo",
      "version": "1.0.0",
      "kind": "direct",
      "source": {
        "type": "hosted",
        "description": {
          "name": "foo",
          "url": "http://localhost:$PORT",
          "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
        }
      },
      "latest": "3.0.1",
      "constraint": "^1.0.0",
      "compatible": [
        {
          "name": "foo",
          "version": "1.5.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "7e0b3bf6b3b6910e5c961f602b9092c552d46ea5bace09abde039229cce18046"
            }
          },
          "constraintBumped": "^1.0.0",
          "constraintWidened": "^1.0.0",
          "constraintBumpedIfNeeded": "^1.0.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
            }
          }
        }
      ],
      "singleBreaking": [
        {
          "name": "foo",
          "version": "2.0.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "fee5502506315776878d8556f0f041c9c5c552716db3b25fc43ce1f0175a992d"
            }
          },
          "constraintBumped": "^2.0.0",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.0.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
            }
          }
        }
      ],
      "multiBreaking": [
        {
          "name": "foo",
          "version": "3.0.1",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "b72007a4addefd6f54367b93d533cd672036dd4c2eb18c554fc96a08ed762a49"
            }
          },
          "constraintBumped": "^3.0.1",
          "constraintWidened": ">=1.0.0 <4.0.0",
          "constraintBumpedIfNeeded": "^3.0.1",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
            }
          }
        },
        {
          "name": "bar",
          "version": "2.0.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "2b81272d999c7fd2ebe60df3b35dd84b043bccd85dd830dacf503485f50d2333"
            }
          },
          "constraintBumped": "^2.0.0",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.0.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "c6d045d6b6edfb503ae0e2a55114e888861505ccea817c08186ffc17975ea9fe"
            }
          }
        }
      ]
    }
  ]
}

-------------------------------- END OF OUTPUT ---------------------------------

## Section apply
$ echo '{"dependencyChanges":[{"name":"foo","version":"3.0.1","constraint":"^3.0.0"},{"name":"bar","version":"2.0.0"}]}' | dependency_services apply
{"dependencies":[]}

-------------------------------- END OF OUTPUT ---------------------------------

$ cat pubspec.yaml
{"name":"app","dependencies":{"foo":^3.0.0,"bar":^2.0.0,"baz":"1.0.0"},"environment":{"sdk":"^3.0.2"}}
$ cat pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  bar:
    dependency: "direct main"
    description:
      name: bar
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "2.0.0"
  baz:
    dependency: "direct main"
    description:
      name: baz
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.0.0"
  foo:
    dependency: "direct main"
    description:
      name: foo
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "3.0.1"
sdks:
  dart: ">=3.0.2 <4.0.0"
