Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize gateway from bos.config.json #127

Closed
7 tasks done
elliotBraem opened this issue Jul 15, 2024 · 0 comments · Fixed by #147
Closed
7 tasks done

Customize gateway from bos.config.json #127

elliotBraem opened this issue Jul 15, 2024 · 0 comments · Fixed by #147
Labels
enhancement New feature or request
Milestone

Comments

@elliotBraem
Copy link
Contributor

elliotBraem commented Jul 15, 2024

bos-workspace supports a custom gateway via a -g flag and either a local file path, or a url to nearfs bundle or CDN. We want to be able to configure this from bos.config.json

Add a "gateway" section to the bos.config.json

I'm thinking something like this:

{
  "gateway": {
    "tagName": "near-social-viewer", // element tag
    "bundleUrl": "https://ipfs.web4.near.page/ipfs/bafybeifvti4qqgrjnyzdzueitruup6rnqwasxt742stdyby2xey3ymnhie", // path to dist
  }
}

Although, also considering a version like this:

{
  "gateway": {
    "tag": "near-social-viewer", // element tag
    "source": "https://ipfs.web4.near.page/ipfs/bafybeifvti4qqgrjnyzdzueitruup6rnqwasxt742stdyby2xey3ymnhie", // path to dist
    "version": "1.0.0", // needed?
    "dependencies": {}, // script tags to include
    "type": "" // type definition
  }
}

Acceptance Criteria

  • gateway is optional in config
  • -g flag should take precedence, even if config is provided
  • should use the bundleUrl in modifyIndexHtml if provided
  • should use the tagName in modifiyIndexHtml if provided
  • bundleUrl supports a trailing slash or no trailing slash
  • bundleUrl supports a relative path to local dist (../../near-bos-webcomponent/dist)
  • throws error if tagName but no bundleUrl, or bundleUrl but no tagName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant