deep-foundation / deep-foundation/deeplinks

Files support for packager

Open
#257 1 comment 0 reactions 1 assignee Claimed by @konard View on GitHub
enhancement
Dominant language
TypeScript
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Description

There should be away to export binary files to deep.json or a folder near it.

This should be a universal solution that will work with all package managers and all programming languages. NPM, NuGet and so on.

At the moment, the best guess is to use `base64` as the value of `AsyncFile` links.

Later, we can support paths relative to `deep.json` or `deep.xml` instead of `base64` in `value` filed of the link. It should start with `.` to distinguish it from `base64`, for example `./assets/6F9619FF-8B86-D011-B42D-00CF4FC964FF.jpg`. `6F9619FF-8B86-D011-B42D-00CF4FC964FF` is an GUID of `AsyncFile` link (it may be extracted from files table or just regenerated on the fly). The extension `.jpg` and so on can be extract from the name of the file in `files` table or from the meme type. GUID is best to ensure `AsyncFile` with the same upload names will not overlap in `assets` folder.

`assets` folder itself is not mandatory, but optional, and it can be chosen by the user of `Packager` class.

We should start the MVP from only `base64` support, if this becomes a problem we can add support for relative paths, or may be even `https` links to static file storage on the internet.

_Note that NPM may not like that packages are used as file store._

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.