Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Refactor script url to be a list of urls #91

Open
skelly37 opened this issue Aug 22, 2022 · 3 comments
Open

Refactor script url to be a list of urls #91

skelly37 opened this issue Aug 22, 2022 · 3 comments
Labels
feature-request New feature or request priority: low No hurry, can wait to any other minor release refactor Code should be refactored

Comments

@skelly37
Copy link
Member

Describe the issue

as in the description

Argumentation

packages can consist of more than one sourcable/usable files

Screenshots and other helpful media

No response

Additional context

No response

@skelly37 skelly37 added feature-request New feature or request refactor Code should be refactored priority: low No hurry, can wait to any other minor release labels Aug 22, 2022
@skelly37 skelly37 added this to the 0.1.0 pre-release milestone Aug 22, 2022
@skelly37
Copy link
Member Author

@Yethal perhaps you could write more about the issue, as you're the inventor

@Yethal Yethal self-assigned this Aug 22, 2022
@Yethal
Copy link
Collaborator

Yethal commented Aug 22, 2022

In our current schema a nupac package may only consist of a single file, which is fine for the packages we have now since they're pretty simple but will be unsuitable for more complex packages containing multiple files which is why our current metadata schema needs to change.
Instead of storing file name, url and checksum as fields on root of the metadata object we should add a files field which contains a list of files (name + url + checksum) to be downloaded during package installation.

@Yethal
Copy link
Collaborator

Yethal commented Aug 22, 2022

This is what I currently have in mind (most fields omitted for brevity). Each file that is part of the package (other than the metadata file itself) is part of the files list. Each file has three attributes: url to the file, name the file should be saved as and the sha256 checksum. File name is kept in a separate field instead of being derived from the url to not force package maintainers to rename files stored in external repositories/cdns specially for us. It is a common practice for e.g apps distributed via releases page on GitHub to contain not only package name but also operating system, architecture, version number etc all embedded within the file name.

  "name": "nupac",
  "files": [
    {
        "name": "nupac.nu",
        "raw-url": "https://raw.githubusercontent.com/skelly37/nupac/91-refactor-script-url-to-be-a-list-of-urls/modules/nupac/nupac.nu",
        "checksum": "7b60d12ff75a19be4f354fd444f9f48efabd43f3844d78e1f2e38228b64a16b6"
    },
    {
        "name": "nupac2.nu",
        "raw-url": "https://raw.githubusercontent.com/skelly37/nupac/91-refactor-script-url-to-be-a-list-of-urls/modules/nupac/nupac.nu",
        "checksum": "7b60d12ff75a19be4f354fd444f9f48efabd43f3844d78e1f2e38228b64a16b6"
    },
    {
        "name": "nupac3.nu",
        "raw-url": "https://raw.githubusercontent.com/skelly37/nupac/91-refactor-script-url-to-be-a-list-of-urls/modules/nupac/nupac.nu",
        "checksum": "7b60d12ff75a19be4f354fd444f9f48efabd43f3844d78e1f2e38228b64a16b7"
    }
  ]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or request priority: low No hurry, can wait to any other minor release refactor Code should be refactored
Projects
None yet
Development

No branches or pull requests

2 participants