Skip to content

Conversation

@dOrgJelli
Copy link
Contributor

@dOrgJelli dOrgJelli commented Apr 19, 2023

Non-wrap URI schemes can now be used (ex: https://domain.com/path). The non-wrap scheme will be used as the authority, and all other contents will be shifted into the path.

  • Examples:
    • https://domain.com/path into wrap://https/domain.com/path
    • ipfs://QmHASH into wrap://ipfs/QmHASH

…ity-inference

# Conflicts:
#	packages/core/src/utils/RegExpGroups.ts
@dOrgJelli dOrgJelli marked this pull request as ready for review June 26, 2023 17:18
Copy link
Contributor

@pileks pileks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we see any pitfalls with such a change? For now, this seems to simplify mainly HTTP/S URIs, as the rest is pretty simple as-is.
Examples:

  • ipfs/Qmhash is simpler than ipfs://Qmhash (old shorter than new)
  • fs/path/to/file is simpler than file://path/to/file (old shorter than new)
  • HTTP/S is obviously shorter in the new system, as it mimics the actual HTTP URI

Generally, I think people are used to "browser URIs", and that this change pushes towards that.
With that in mind, and me being in favor of simplification, this gets my approval as an experimental feature!

Copy link
Contributor

@nerfZael nerfZael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
My only nit is that parsing seems overly complex right now. It could probably be simplified.

@dOrgJelli dOrgJelli changed the title URI authority inference for common URI formats feat: Improved URI Inference Jun 27, 2023
@dOrgJelli
Copy link
Contributor Author

dOrgJelli commented Jun 27, 2023

My only nit is that parsing seems overly complex right now. It could probably be simplified.

Working on fixing this now, we shouldn't need regex to parse the URI.

@dOrgJelli dOrgJelli merged commit e727aab into origin-dev Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants