57 Commits

Author SHA1 Message Date
dbf2920254 chore: introduce imports ordering (#5463) 2021-05-31 17:46:41 +03:00
fc07ce6854 refactor: introduce type-only imports (#5462) 2021-05-31 15:23:16 +03:00
39f113715a chore: update prettier (#5412) 2021-05-19 15:39:35 +03:00
7b19e30dd2 feat(open-authoring): add alwaysFork option (#5204) 2021-04-04 15:11:45 +03:00
141a2eba56 refactor: convert function expressions to declarations (#4926) 2021-02-08 20:01:21 +02:00
1034086ff6 fix(backend): allow calling 'json' again on 403 failure (#4880) 2021-01-26 19:00:01 +02:00
60f7e0bba6 fix(lib-util): update js-sha256 import (#4699) 2020-12-13 16:09:51 +02:00
4e6dc88efb feat: add azure devops backend (#4427) 2020-11-26 12:55:24 +02:00
cb2ad687ee Feat: multi content authoring (#4139) 2020-09-20 20:30:46 +03:00
6b8fa3fc45 feat: allow setting editorial workflow PR label prefix (#4181) 2020-09-06 21:13:46 +03:00
a80ab123dc fix(api): bitbucket implicit auth login delay (#4243) 2020-09-01 15:36:26 +03:00
af7bbbd9a9 Feat: nested collections (#3716) 2020-06-18 10:11:37 +03:00
a50edc7055 feat: add backend status down indicator (#3889) 2020-06-15 17:59:28 +03:00
da7fbe0638 Fix: handle branch names conflicts (#3879) 2020-06-09 19:03:19 +03:00
285c940562 fix: handle token expiry (#3847) 2020-06-03 12:44:03 +03:00
812716e18b feat: add pre save/ post save hooks (#3812) 2020-05-27 16:14:35 +03:00
088b1a8ab6 fix: clear fetch timeout on successful response (#3768) 2020-05-17 14:09:06 +03:00
3e34e52440 chore: add timeout mechanism for fetch calls (#3649) 2020-05-12 16:51:13 +03:00
8f1b325809 refactor: use fetch cache arg instead of cache busting (#3584) 2020-04-21 17:46:06 +03:00
49098de27f fix: move common api functions to a separate file (#3511) 2020-04-01 11:44:39 +03:00
174d86f0a0 Feat: entry sorting (#3494)
* refactor: typescript search actions, add tests avoid duplicate search

* refactor: switch from promise chain to async/await in loadEntries

* feat: add sorting, initial commit

* fix: set isFetching to true on entries request

* fix: ui improvments and bug fixes

* test: fix tests

* feat(backend-gitlab): cache local tree)

* fix: fix prop type warning

* refactor: code cleanup

* feat(backend-bitbucket): add local tree caching support

* feat: swtich to orderBy and support multiple sort keys

* fix: backoff function

* fix: improve backoff

* feat: infer sortable fields

* feat: fetch file commit metadata - initial commit

* feat: extract file author and date, finalize GitLab & Bitbucket

* refactor: code cleanup

* feat: handle github rate limit errors

* refactor: code cleanup

* fix(github): add missing author and date when traversing cursor

* fix: add missing author and date when traversing cursor

* refactor: code cleanup

* refactor: code cleanup

* refactor: code cleanup

* test: fix tests

* fix: rebuild local tree when head doesn't exist in remote branch

* fix: allow sortable fields to be an empty array

* fix: allow translation of built in sort fields

* build: fix proxy server build

* fix: hide commit author and date fields by default on non git backends

* fix(algolia): add listAllEntries method for alogolia integration

* fix: handle sort fields overflow

* test(bitbucket): re-record some bitbucket e2e tests

* test(bitbucket): fix media library test

* refactor(gitgateway-gitlab): share request code and handle 404 errors

* fix: always show commit date by default

* docs: add sortableFields

* refactor: code cleanup

* improvement: drop multi-sort, rework sort UI

* chore: force main package bumps

Co-authored-by: Shawn Erquhart <shawn@erquh.art>
2020-03-31 23:13:27 -04:00
92e76011e7 feat: add media lib virtualization (#3381) 2020-03-09 08:45:42 +01:00
39f1307e3a feat(backend-github): add pagination (#3379) 2020-03-05 11:58:49 +01:00
7e0a8ad532 feat(core): align GitHub metadata handling with other backends (#3316)
* Revert "Revert "feat(core): Align GitHub metadata handling with other backends (#3292)""

This reverts commit 5bdd3df9ccbb5149c22d79987ebdcd6cab4b261f.

* fix(backend-github): fix migration code

* test(backend-github): fix test

* test(e2e): shorten wait time

* test(e2e): try and fix test on CI
2020-02-24 17:44:10 -05:00
02ef2010e7 Fix: show specific field media files in library, cascade folder templates (#3252)
* feat: cascade & compose media folders - initial commit

* refactor: code cleanup

* fix: pass field instead of folder to getAsset

* fix: only show field media files in library

* test: fix medial library selector test

* fix: fallback to original path when asset not found

* fix: only show field media files in media library

* fix: properly handle empty strings in field folders
2020-02-14 15:31:33 -05:00
97bc0c8dc4 feat: field based media/public folders (#3208) 2020-02-10 11:05:47 -05:00
0a482b1004 fix: filter paginated results (#3216) 2020-02-10 11:44:00 +02:00
834f6b9e45 fix(backend-git-gateway): re-write GitHub pagination links (#3135) 2020-01-23 21:14:33 -05:00
7e8084be87 chore: add proxy backend (#3126)
* feat(backends): add proxy backend

* feat: add proxy server initial commit

* fix: move from joi to @hapi/joi

* test: add joi validation tests

* feat: proxy server initial implementations

* test: add tests, fix build

* chore: update yarn.lock

* build: fix develop command

* fix(back-proxy): fix bugs

* test(backend-proxy): add cypress tests

* chore: cleanup

* chore: support node 10

* chore: code cleanup

* chore: run cypress on ubuntu 16.04

* test(e2e): fix proxy backend cypress tests

* chore: don't start proxy server on yarn develop
2020-01-22 16:47:34 -05:00
a48c02d852 feat(backend-bitbucket): Add Git-LFS support (#3118) 2020-01-21 18:57:36 +02:00
6a13a85e26 fix: use string endsWith to filter by extension (#3097) 2020-01-16 12:03:30 +02:00
6f221ab3c1 Feat: editorial workflow bitbucket gitlab (#3014)
* refactor: typescript the backends

* feat: support multiple files upload for GitLab and BitBucket

* fix: load entry media files from media folder or UI state

* chore: cleanup log message

* chore: code cleanup

* refactor: typescript the test backend

* refactor: cleanup getEntry unsued variables

* refactor: moved shared backend code to lib util

* chore: rename files to preserve history

* fix: bind readFile method to API classes

* test(e2e): switch to chrome in cypress tests

* refactor: extract common api methods

* refactor: remove most of immutable js usage from backends

* feat(backend-gitlab): initial editorial workflow support

* feat(backend-gitlab): implement missing workflow methods

* chore: fix lint error

* feat(backend-gitlab): support files deletion

* test(e2e): add gitlab cypress tests

* feat(backend-bitbucket): implement missing editorial workflow methods

* test(e2e): add BitBucket backend e2e tests

* build: update node version to 12 on netlify builds

* fix(backend-bitbucket): extract BitBucket avatar url

* test: fix git-gateway AuthenticationPage test

* test(e2e): fix some backend tests

* test(e2e): fix tests

* test(e2e): add git-gateway editorial workflow test

* chore: code cleanup

* test(e2e): revert back to electron

* test(e2e): add non editorial workflow tests

* fix(git-gateway-gitlab): don't call unpublishedEntry in simple workflow

gitlab git-gateway doesn't support editorial workflow APIs yet. This change makes sure not to call them in simple workflow

* refactor(backend-bitbucket): switch to diffstat API instead of raw diff

* chore: fix test

* test(e2e): add more git-gateway tests

* fix: post rebase typescript fixes

* test(e2e): fix tests

* fix: fix parsing of content key and add tests

* refactor: rename test file

* test(unit): add getStatues unit tests

* chore: update cypress

* docs: update beta docs
2020-01-14 17:15:14 -05:00
b27748b54f Fix: get files by path depth (#2993)
* fix: get files up to depth specified by colletion path

* test(e2e): update mock data

* chore: fix comment
2019-12-22 15:20:42 +02:00
2b41d8a838 feat: bundle assets with content (#2958)
* fix(media_folder_relative): use collection name in unpublished entry

* refactor: pass arguments as object to AssetProxy ctor

* feat: support media folders per collection

* feat: resolve media files path based on entry path

* fix: asset public path resolving

* refactor: introduce typescript for AssetProxy

* refactor: code cleanup

* refactor(asset-proxy): add tests,switch to typescript,extract arguments

* refactor: typescript for editorialWorkflow

* refactor: add typescript for media library actions

* refactor: fix type error on map set

* refactor: move locale selector into reducer

* refactor: add typescript for entries actions

* refactor: remove duplication between asset store and media lib

* feat: load assets from backend using API

* refactor(github): add typescript, cache media files

* fix: don't load media URL if already loaded

* feat: add media folder config to collection

* fix: load assets from API when not in UI state

* feat: load entry media files when opening media library

* fix: editorial workflow draft media files bug fixes

* test(unit): fix unit tests

* fix: editor control losing focus

* style: add eslint object-shorthand rule

* test(cypress): re-record mock data

* fix: fix non github backends, large media

* test: uncomment only in tests

* fix(backend-test): add missing displayURL property

* test(e2e): add media library tests

* test(e2e): enable visual testing

* test(e2e): add github backend media library tests

* test(e2e): add git-gateway large media tests

* chore: post rebase fixes

* test: fix tests

* test: fix tests

* test(cypress): fix tests

* docs: add media_folder docs

* test(e2e): add media library delete test

* test(e2e): try and fix image comparison on CI

* ci: reduce test machines from 9 to 8

* test: add reducers and selectors unit tests

* test(e2e): disable visual regression testing for now

* test: add getAsset unit tests

* refactor: use Asset class component instead of hooks

* build: don't inline source maps

* test: add more media path tests
2019-12-18 11:16:02 -05:00
465f463959 fix(backend-github): prepend collection name (#2878)
* fix(backend-github): prepend collection name

* chore: prefer migrating entries

* chore: cleanup

* chore: move migration to listUnpublishedBranches

* chore: prefer flowAsync

* chore: feedback updates

* refactor: extract current metadata version to a const

* refactor: don't send pulls request on open authoring

* test: update recorded data

* fix: hardcode migration key/branch logic

* test(backend-github): add unit tests for migration code

* fix(github-graphql): add ref property to result of createBranch

* test(cypress): update recorded data

* fix: load unpublished entries once

* fix: run migration for published draft entry

* fix: failing test

* chore: use hardcoded version number

* fix: use hardcoded version number

* test(cypress): update recorded data
2019-11-26 10:40:27 +02:00
86adca3a18 fix(backend-github): editorial workflow commits (#2867) 2019-11-11 17:06:29 +02:00
97f1f84b69 fix(github-backend): handle race condition in editorial workflow (#2658) 2019-09-09 15:56:47 -04:00
ece136c92e feat(backend-github): GitHub GraphQL API support (#2456)
* add GitHub GraphQL api initial support

* support mutiple backends for e2e tests - initial commit

* add github backend e2e test (currently skipped), fix bugs per tests

* refactor e2e tests, add fork workflow tests, support fork workflow in GraphQL api

* remove log message that might contain authentication token

* return empty error when commit is not found when using GraphQL (align with base class)

* disable github backend tests

* fix bugs introduced after rebase of GraphQL and OpenAuthoring features

* test: update tests per openAuthoring changes, split tests into multiple files

* fix: pass in headers for pagination requests, avoid async iterator as it requires a polyfill on old browsers

* test(e2e): disable github backend tests
2019-09-03 14:56:20 -04:00
a47a29fb8b Allow for relative paths of media files (#2394)
* Allow for relative paths of media files

fixes #325

* Switch to calculating the relative path based on collection

The required relative path is now calculated depending on the
location of the collection of the current entry having the
media inserted into. And the configuration option has now been
changed to a boolean flag.

This allows collections to not neccesarily all be in the same
location relative to the media folder, and simplifies config.

* Clean up code and fix linting

* Add unit tests to resolveMediaFilename()

* Rework insertMedia action to fetch own config

This moves more of the media path resolution logic into the action
which makes it easier to unit test

* Add unit tests for the mediaLibrary.insertMedia action

* yarn run format

* add dependabot config (#2580)
2019-08-24 16:03:09 -04:00
34e1f09105 Open Authoring bugfixes and pagination improvements (#2523)
* Fix handling of displayURLs which are strings

* Add fromFetchArguments to unsentRequest

* Add parseLinkHeader to backendUtil

* Handle paginated endpoints in GitHub API

* Rename fork workflow to Open Authoring across the whole repo

* Fixes for bugs in GitHub API introduced by Open Authoring changes

* Fix getDeployPreview

* Fix incorrect auth header formatting GitHub implementation

cf. https://github.com/netlify/netlify-cms/pull/2456#discussion_r309633387

* Remove unused and broken method from GitHub API

cf. https://github.com/netlify/netlify-cms/pull/2456#discussion_r308687145

* Fix editorialWorkflowGit method in GitHub API

* Request published entry content from origin repo

* Better error when deleting a published post in Open Authoring

* Rename to Open Authoring in fork request message

Also adds a note to the fork request message that an existing fork of
the same repo will be used automatically.

* fix linting
2019-08-24 13:54:59 -04:00
edf0a3afdc feat(backend-github): Open Authoring (#2430)
* Make filterPromises resolve entries before filtering

* Add filterPromisesWith & onlySuccessfulPromises to utility library

* Memoize user method in GitHub API

* Make storeMetadata safe to call concurrently in GitHub API

* Fork workflow: startup and authentication

* Fork workflow: backend support

* Fork workflow: disable unused UI elements

* Fork workflow: docs

* Fork workflow: fix deploy previews

* Suggested edits for fork workflow doc

* Change future tense to present

* Fork workflow: add beta status to docs

* remove debug statement

* rename fork workflow to Open Authoring
2019-07-24 18:20:41 -04:00
82cc7941cc feat: provide usable UMD builds for all packages (#2141) 2019-03-16 18:44:29 -04:00
da2249c651 Netlify Large Media integration (#2124) 2019-02-26 13:11:15 -05:00
da91038067 improvement(backends): changes for registerBackend compatibility (#1880) 2018-11-26 16:30:50 -05:00
0596904e0b feat(media): add external media library support, Uploadcare integration (#1602) 2018-08-30 16:24:28 -04:00
4f3116de4d fix: remove alert modal from localForage error case (#1676) 2018-08-28 17:48:10 -04:00
f801b19221 chore: add code formatting and linting (#952) 2018-08-07 16:46:54 -04:00
88f7dca328 chore(lint): cleanup unused variables in code (#1563) 2018-08-07 11:53:31 -04:00
5a27fb8b9d chore: fix miscellaneous errors from linters (#1555) 2018-07-31 17:03:46 -04:00
4f6e8cea44 chore: remove unused imports (#1534) 2018-07-28 16:33:42 -04:00