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

Add a proxy to have fast read access on git-based backends #7184

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
200 changes: 200 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/decap-cms-app/package.json
Expand Up @@ -33,6 +33,7 @@
"decap-cms-backend-aws-cognito-github-proxy": "^3.1.2",
"decap-cms-backend-azure": "^3.1.1",
"decap-cms-backend-bitbucket": "^3.1.2",
"decap-cms-backend-git": "^3.1.1",
"decap-cms-backend-git-gateway": "^3.1.1",
"decap-cms-backend-github": "^3.1.2",
"decap-cms-backend-gitlab": "^3.1.3",
Expand Down
3 changes: 3 additions & 0 deletions packages/decap-cms-app/src/extensions.js
Expand Up @@ -3,6 +3,7 @@ import { DecapCmsCore as CMS } from 'decap-cms-core';
// Backends
import { AzureBackend } from 'decap-cms-backend-azure';
import { AwsCognitoGitHubProxyBackend } from 'decap-cms-backend-aws-cognito-github-proxy';
import { GitProxyBackendGenerator } from 'decap-cms-backend-git';
import { GitHubBackend } from 'decap-cms-backend-github';
import { GitLabBackend } from 'decap-cms-backend-gitlab';
import { GiteaBackend } from 'decap-cms-backend-gitea';
Expand Down Expand Up @@ -33,8 +34,10 @@ import * as locales from 'decap-cms-locales';

// Register all the things
CMS.registerBackend('git-gateway', GitGatewayBackend);
CMS.registerBackend('git-gateway-large', GitProxyBackendGenerator(GitGatewayBackend));
CMS.registerBackend('azure', AzureBackend);
CMS.registerBackend('aws-cognito-github-proxy', AwsCognitoGitHubProxyBackend);
CMS.registerBackend('github-large', GitProxyBackendGenerator(GitHubBackend));
CMS.registerBackend('github', GitHubBackend);
CMS.registerBackend('gitlab', GitLabBackend);
CMS.registerBackend('gitea', GiteaBackend);
Expand Down
7 changes: 7 additions & 0 deletions packages/decap-cms-backend-git/README.md
@@ -0,0 +1,7 @@
# Git backend with fast read access

## Code structure

`Implementation` for [File Management System API](https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-lib-util/README.md).

Look at tests or types for more info.
42 changes: 42 additions & 0 deletions packages/decap-cms-backend-git/package.json
@@ -0,0 +1,42 @@
{
"name": "decap-cms-backend-git",
"description": "Git backend for Decap CMS with fast read access",
"version": "3.1.3",
"repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-backend-git",
"bugs": "https://github.com/decaporg/decap-cms/issues",
"license": "MIT",
"module": "dist/esm/index.js",
"main": "dist/decap-cms-backend-git.js",
"keywords": [
"decap-cms",
"backend",
"gitlab"
],
"sideEffects": false,
"scripts": {
"develop": "npm run build:esm -- --watch",
"build": "cross-env NODE_ENV=production webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --extensions \".js,.jsx,.ts,.tsx\""
},
"dependencies": {
"@isomorphic-git/lightning-fs": "^4.6.0",
"apollo-cache-inmemory": "^1.6.2",
"apollo-client": "^2.6.3",
"apollo-link-context": "^1.0.18",
"apollo-link-http": "^1.5.15",
"isomorphic-git": "^1.25.7",
"js-base64": "^3.0.0",
"semaphore": "^1.1.0"
},
"peerDependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"decap-cms-lib-auth": "^3.0.0",
"decap-cms-lib-util": "^3.0.0",
"decap-cms-ui-default": "^3.0.0",
"immutable": "^3.7.6",
"lodash": "^4.17.11",
"prop-types": "^15.7.2",
"react": "^18.2.0"
}
}