{"id":20597375,"url":"https://github.com/rk0cc/dart_repourl","last_synced_at":"2025-03-06T15:20:09.481Z","repository":{"id":168600221,"uuid":"644011521","full_name":"rk0cc/dart_repourl","owner":"rk0cc","description":"Alternative Uri object of representing repository URL in Git","archived":false,"fork":false,"pushed_at":"2023-06-04T13:33:06.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T01:08:51.070Z","etag":null,"topics":["dart","git","http","https","parser","repository","repository-url","rsync","ssh","uri","url"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rk0cc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rk0cc"}},"created_at":"2023-05-22T16:08:41.000Z","updated_at":"2023-05-23T11:41:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae7adbd4-8c60-4c70-95cf-6d217aeb2a7e","html_url":"https://github.com/rk0cc/dart_repourl","commit_stats":null,"previous_names":["rk0cc/dart_repourl"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fdart_repourl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fdart_repourl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fdart_repourl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fdart_repourl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rk0cc","download_url":"https://codeload.github.com/rk0cc/dart_repourl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242231442,"owners_count":20093636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","git","http","https","parser","repository","repository-url","rsync","ssh","uri","url"],"created_at":"2024-11-16T08:22:11.160Z","updated_at":"2025-03-06T15:20:09.459Z","avatar_url":"https://github.com/rk0cc.png","language":"Dart","readme":"# Alternative `Uri` object for handling Git repository URL format\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pub.dev/packages/repository_url\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/repository_url?color=%2333FF33\u0026label=Latest%20version%3A\u0026style=flat-square\" alt=\"Pub version\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/sponsors/rk0cc\"\u003e\u003cimg alt=\"GitHub Sponsors\" src=\"https://img.shields.io/github/sponsors/rk0cc?color=%2333FF33\u0026style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/rk0cc/dart_repourl/actions/workflows/dart.yml\"\u003e\u003cimg alt=\"Unit test\" src=\"https://github.com/rk0cc/dart_repourl/actions/workflows/dart.yml/badge.svg\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThere are various format of URL can be applied for fetching Git repository.\nHowever, not every format can be simply handled by `Uri.parse` in Dart.\nFor example, it is possible to parse `https://git-example.com/alice/sample_text.git`\nbut not `git@git-example.com:alice/sample_text.git`.\n\n```dart\n// That works\nfinal Uri httpsGit = Uri.parse(\"https://git-example.com/alice/sample_text.git\");\n\n// FormatException\nfinal Uri altSsh = Uri.parse(\"git@git-example.com:alice/sample_text.git\");\n```\n\nAs a result, `RepositoryUrl` should be used rather than `Uri` which able to resolve URL that `Uri.parse` can't:\n\n```dart\n// Both worked\nfinal RepositoryUrl httpRepo = RepositoryUrl(\"https://git-example.com/alice/sample_text.git\");\nfinal RepositoryUrl altSshRepo = RepositoryUrl(\"git@git-example.com:alice/sample_text.git\");\n```\n\nMore usage can be found in [example](example/main.dart);\n\n## License\n\nBSD-3\n","funding_links":["https://github.com/sponsors/rk0cc"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frk0cc%2Fdart_repourl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frk0cc%2Fdart_repourl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frk0cc%2Fdart_repourl/lists"}