-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(entry-file): added file upload source (#736)
* feat(entry-file): added file upload source * feat: added method getSourceTypes * feat: added export UploadSource, ExternalUploadSource * feat: added types and handler fallback * build(ssr): added check object and return stubbedExports with obj * feat(types): added SourceTypes in the OutputFileEntry * test(types): added test for source type in the file
- Loading branch information
1 parent
649db3b
commit 6fe5bcd
Showing
12 changed files
with
48 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
// @ts-check | ||
export const ExternalUploadSource = Object.freeze({ | ||
FACEBOOK: 'facebook', | ||
DROPBOX: 'dropbox', | ||
GDRIVE: 'gdrive', | ||
GPHOTOS: 'gphotos', | ||
INSTAGRAM: 'instagram', | ||
FLICKR: 'flickr', | ||
VK: 'vk', | ||
EVERNOTE: 'evernote', | ||
BOX: 'box', | ||
ONEDRIVE: 'onedrive', | ||
HUDDLE: 'huddle', | ||
}); | ||
|
||
export const UploadSource = Object.freeze({ | ||
LOCAL: 'local', | ||
DROP_AREA: 'drop-area', | ||
URL_TAB: 'url-tab', | ||
CAMERA: 'camera', | ||
EXTERNAL: 'external', | ||
API: 'js-api', | ||
URL: 'url', | ||
DRAW: 'draw', | ||
...ExternalUploadSource, | ||
}); | ||
|
||
/** @typedef {(typeof UploadSource)[keyof typeof UploadSource]} SourceTypes */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters